@chainlink/ccip-sdk 0.96.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +12 -9
  2. package/dist/api/index.d.ts +21 -8
  3. package/dist/api/index.d.ts.map +1 -1
  4. package/dist/api/index.js +42 -13
  5. package/dist/api/index.js.map +1 -1
  6. package/dist/api/types.d.ts +0 -2
  7. package/dist/api/types.d.ts.map +1 -1
  8. package/dist/aptos/exec.d.ts +2 -2
  9. package/dist/aptos/exec.d.ts.map +1 -1
  10. package/dist/aptos/exec.js.map +1 -1
  11. package/dist/aptos/hasher.d.ts.map +1 -1
  12. package/dist/aptos/hasher.js +1 -1
  13. package/dist/aptos/hasher.js.map +1 -1
  14. package/dist/aptos/index.d.ts +17 -16
  15. package/dist/aptos/index.d.ts.map +1 -1
  16. package/dist/aptos/index.js +42 -73
  17. package/dist/aptos/index.js.map +1 -1
  18. package/dist/aptos/logs.d.ts +2 -2
  19. package/dist/aptos/logs.d.ts.map +1 -1
  20. package/dist/aptos/types.d.ts +2 -19
  21. package/dist/aptos/types.d.ts.map +1 -1
  22. package/dist/aptos/types.js +0 -11
  23. package/dist/aptos/types.js.map +1 -1
  24. package/dist/chain.d.ts +538 -158
  25. package/dist/chain.d.ts.map +1 -1
  26. package/dist/chain.js +132 -19
  27. package/dist/chain.js.map +1 -1
  28. package/dist/commits.d.ts +4 -6
  29. package/dist/commits.d.ts.map +1 -1
  30. package/dist/commits.js +4 -4
  31. package/dist/commits.js.map +1 -1
  32. package/dist/errors/CCIPError.d.ts +33 -4
  33. package/dist/errors/CCIPError.d.ts.map +1 -1
  34. package/dist/errors/CCIPError.js +33 -4
  35. package/dist/errors/CCIPError.js.map +1 -1
  36. package/dist/errors/codes.d.ts +3 -0
  37. package/dist/errors/codes.d.ts.map +1 -1
  38. package/dist/errors/codes.js +3 -1
  39. package/dist/errors/codes.js.map +1 -1
  40. package/dist/errors/index.d.ts +4 -4
  41. package/dist/errors/index.d.ts.map +1 -1
  42. package/dist/errors/index.js +4 -4
  43. package/dist/errors/index.js.map +1 -1
  44. package/dist/errors/recovery.d.ts.map +1 -1
  45. package/dist/errors/recovery.js +4 -1
  46. package/dist/errors/recovery.js.map +1 -1
  47. package/dist/errors/specialized.d.ts +1695 -120
  48. package/dist/errors/specialized.d.ts.map +1 -1
  49. package/dist/errors/specialized.js +1715 -123
  50. package/dist/errors/specialized.js.map +1 -1
  51. package/dist/errors/utils.d.ts.map +1 -1
  52. package/dist/errors/utils.js +0 -1
  53. package/dist/errors/utils.js.map +1 -1
  54. package/dist/evm/abi/OffRamp_2_0.d.ts +764 -0
  55. package/dist/evm/abi/OffRamp_2_0.d.ts.map +1 -0
  56. package/dist/evm/abi/OffRamp_2_0.js +744 -0
  57. package/dist/evm/abi/OffRamp_2_0.js.map +1 -0
  58. package/dist/evm/abi/OnRamp_2_0.d.ts +925 -0
  59. package/dist/evm/abi/OnRamp_2_0.d.ts.map +1 -0
  60. package/dist/evm/abi/OnRamp_2_0.js +992 -0
  61. package/dist/evm/abi/OnRamp_2_0.js.map +1 -0
  62. package/dist/evm/const.d.ts +12 -2
  63. package/dist/evm/const.d.ts.map +1 -1
  64. package/dist/evm/const.js +8 -2
  65. package/dist/evm/const.js.map +1 -1
  66. package/dist/evm/errors.d.ts.map +1 -1
  67. package/dist/evm/errors.js +7 -2
  68. package/dist/evm/errors.js.map +1 -1
  69. package/dist/evm/extra-args.d.ts.map +1 -1
  70. package/dist/evm/extra-args.js +5 -24
  71. package/dist/evm/extra-args.js.map +1 -1
  72. package/dist/evm/hasher.d.ts.map +1 -1
  73. package/dist/evm/hasher.js +23 -13
  74. package/dist/evm/hasher.js.map +1 -1
  75. package/dist/evm/index.d.ts +73 -16
  76. package/dist/evm/index.d.ts.map +1 -1
  77. package/dist/evm/index.js +241 -146
  78. package/dist/evm/index.js.map +1 -1
  79. package/dist/evm/logs.d.ts +1 -1
  80. package/dist/evm/logs.js +1 -1
  81. package/dist/evm/messages.d.ts +59 -5
  82. package/dist/evm/messages.d.ts.map +1 -1
  83. package/dist/evm/messages.js +210 -0
  84. package/dist/evm/messages.js.map +1 -1
  85. package/dist/evm/offchain.d.ts +1 -14
  86. package/dist/evm/offchain.d.ts.map +1 -1
  87. package/dist/evm/offchain.js +1 -133
  88. package/dist/evm/offchain.js.map +1 -1
  89. package/dist/evm/types.d.ts +7 -2
  90. package/dist/evm/types.d.ts.map +1 -1
  91. package/dist/evm/types.js +22 -1
  92. package/dist/evm/types.js.map +1 -1
  93. package/dist/execution.d.ts +62 -22
  94. package/dist/execution.d.ts.map +1 -1
  95. package/dist/execution.js +98 -61
  96. package/dist/execution.js.map +1 -1
  97. package/dist/extra-args.d.ts +13 -3
  98. package/dist/extra-args.d.ts.map +1 -1
  99. package/dist/extra-args.js +13 -3
  100. package/dist/extra-args.js.map +1 -1
  101. package/dist/gas.d.ts +25 -2
  102. package/dist/gas.d.ts.map +1 -1
  103. package/dist/gas.js +30 -4
  104. package/dist/gas.js.map +1 -1
  105. package/dist/index.d.ts +3 -2
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +2 -1
  108. package/dist/index.js.map +1 -1
  109. package/dist/offchain.d.ts +23 -6
  110. package/dist/offchain.d.ts.map +1 -1
  111. package/dist/offchain.js +92 -17
  112. package/dist/offchain.js.map +1 -1
  113. package/dist/requests.d.ts +85 -14
  114. package/dist/requests.d.ts.map +1 -1
  115. package/dist/requests.js +99 -17
  116. package/dist/requests.js.map +1 -1
  117. package/dist/selectors.d.ts.map +1 -1
  118. package/dist/selectors.js +12 -0
  119. package/dist/selectors.js.map +1 -1
  120. package/dist/shared/bcs-codecs.d.ts +61 -0
  121. package/dist/shared/bcs-codecs.d.ts.map +1 -0
  122. package/dist/shared/bcs-codecs.js +102 -0
  123. package/dist/shared/bcs-codecs.js.map +1 -0
  124. package/dist/shared/constants.d.ts +3 -0
  125. package/dist/shared/constants.d.ts.map +1 -0
  126. package/dist/shared/constants.js +3 -0
  127. package/dist/shared/constants.js.map +1 -0
  128. package/dist/solana/exec.d.ts +2 -2
  129. package/dist/solana/exec.d.ts.map +1 -1
  130. package/dist/solana/exec.js.map +1 -1
  131. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.d.ts +1 -1
  132. package/dist/solana/idl/1.6.0/BASE_TOKEN_POOL.js +1 -1
  133. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.d.ts +1 -1
  134. package/dist/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.js +1 -1
  135. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.d.ts +1 -1
  136. package/dist/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.js +1 -1
  137. package/dist/solana/idl/1.6.0/CCIP_COMMON.d.ts +16 -1
  138. package/dist/solana/idl/1.6.0/CCIP_COMMON.d.ts.map +1 -1
  139. package/dist/solana/idl/1.6.0/CCIP_COMMON.js +16 -1
  140. package/dist/solana/idl/1.6.0/CCIP_COMMON.js.map +1 -1
  141. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.d.ts +1 -1
  142. package/dist/solana/idl/1.6.0/CCIP_OFFRAMP.js +1 -1
  143. package/dist/solana/idl/1.6.0/CCIP_ROUTER.d.ts +1 -1
  144. package/dist/solana/idl/1.6.0/CCIP_ROUTER.js +1 -1
  145. package/dist/solana/index.d.ts +85 -24
  146. package/dist/solana/index.d.ts.map +1 -1
  147. package/dist/solana/index.js +69 -37
  148. package/dist/solana/index.js.map +1 -1
  149. package/dist/solana/offchain.d.ts +1 -13
  150. package/dist/solana/offchain.d.ts.map +1 -1
  151. package/dist/solana/offchain.js +1 -66
  152. package/dist/solana/offchain.js.map +1 -1
  153. package/dist/solana/utils.d.ts +4 -4
  154. package/dist/solana/utils.d.ts.map +1 -1
  155. package/dist/solana/utils.js +1 -1
  156. package/dist/solana/utils.js.map +1 -1
  157. package/dist/sui/hasher.d.ts.map +1 -1
  158. package/dist/sui/hasher.js +1 -1
  159. package/dist/sui/hasher.js.map +1 -1
  160. package/dist/sui/index.d.ts +18 -18
  161. package/dist/sui/index.d.ts.map +1 -1
  162. package/dist/sui/index.js +38 -39
  163. package/dist/sui/index.js.map +1 -1
  164. package/dist/sui/manuallyExec/encoder.d.ts +2 -2
  165. package/dist/sui/manuallyExec/encoder.d.ts.map +1 -1
  166. package/dist/sui/manuallyExec/encoder.js.map +1 -1
  167. package/dist/sui/manuallyExec/index.d.ts +2 -2
  168. package/dist/sui/manuallyExec/index.d.ts.map +1 -1
  169. package/dist/ton/exec.d.ts +3 -3
  170. package/dist/ton/exec.d.ts.map +1 -1
  171. package/dist/ton/exec.js +1 -1
  172. package/dist/ton/exec.js.map +1 -1
  173. package/dist/ton/index.d.ts +14 -22
  174. package/dist/ton/index.d.ts.map +1 -1
  175. package/dist/ton/index.js +26 -35
  176. package/dist/ton/index.js.map +1 -1
  177. package/dist/ton/types.d.ts +3 -5
  178. package/dist/ton/types.d.ts.map +1 -1
  179. package/dist/ton/types.js.map +1 -1
  180. package/dist/types.d.ts +55 -20
  181. package/dist/types.d.ts.map +1 -1
  182. package/dist/types.js +6 -1
  183. package/dist/types.js.map +1 -1
  184. package/dist/utils.d.ts +65 -2
  185. package/dist/utils.d.ts.map +1 -1
  186. package/dist/utils.js +74 -2
  187. package/dist/utils.js.map +1 -1
  188. package/package.json +14 -10
  189. package/src/api/index.ts +53 -17
  190. package/src/api/types.ts +0 -2
  191. package/src/aptos/exec.ts +2 -2
  192. package/src/aptos/hasher.ts +1 -1
  193. package/src/aptos/index.ts +55 -100
  194. package/src/aptos/logs.ts +2 -2
  195. package/src/aptos/types.ts +2 -15
  196. package/src/chain.ts +594 -171
  197. package/src/commits.ts +9 -9
  198. package/src/errors/CCIPError.ts +33 -4
  199. package/src/errors/codes.ts +3 -1
  200. package/src/errors/index.ts +4 -0
  201. package/src/errors/recovery.ts +7 -1
  202. package/src/errors/specialized.ts +1726 -130
  203. package/src/errors/utils.ts +0 -1
  204. package/src/evm/abi/OffRamp_2_0.ts +743 -0
  205. package/src/evm/abi/OnRamp_2_0.ts +991 -0
  206. package/src/evm/const.ts +10 -3
  207. package/src/evm/errors.ts +6 -2
  208. package/src/evm/extra-args.ts +4 -21
  209. package/src/evm/hasher.ts +30 -18
  210. package/src/evm/index.ts +314 -176
  211. package/src/evm/logs.ts +1 -1
  212. package/src/evm/messages.ts +323 -11
  213. package/src/evm/offchain.ts +2 -191
  214. package/src/evm/types.ts +20 -2
  215. package/src/execution.ts +125 -86
  216. package/src/extra-args.ts +13 -3
  217. package/src/gas.ts +29 -3
  218. package/src/index.ts +10 -3
  219. package/src/offchain.ts +125 -28
  220. package/src/requests.ts +114 -19
  221. package/src/selectors.ts +12 -0
  222. package/src/shared/bcs-codecs.ts +132 -0
  223. package/src/shared/constants.ts +2 -0
  224. package/src/solana/exec.ts +4 -4
  225. package/src/solana/idl/1.6.0/BASE_TOKEN_POOL.ts +2 -2
  226. package/src/solana/idl/1.6.0/BURN_MINT_TOKEN_POOL.ts +2 -2
  227. package/src/solana/idl/1.6.0/CCIP_CCTP_TOKEN_POOL.ts +2 -2
  228. package/src/solana/idl/1.6.0/CCIP_COMMON.ts +32 -2
  229. package/src/solana/idl/1.6.0/CCIP_OFFRAMP.ts +2 -2
  230. package/src/solana/idl/1.6.0/CCIP_ROUTER.ts +2 -2
  231. package/src/solana/index.ts +110 -85
  232. package/src/solana/offchain.ts +3 -100
  233. package/src/solana/utils.ts +8 -5
  234. package/src/sui/hasher.ts +1 -1
  235. package/src/sui/index.ts +55 -59
  236. package/src/sui/manuallyExec/encoder.ts +2 -2
  237. package/src/sui/manuallyExec/index.ts +2 -2
  238. package/src/ton/exec.ts +4 -7
  239. package/src/ton/index.ts +45 -53
  240. package/src/ton/types.ts +4 -7
  241. package/src/types.ts +81 -37
  242. package/src/utils.ts +73 -2
  243. package/dist/aptos/utils.d.ts +0 -12
  244. package/dist/aptos/utils.d.ts.map +0 -1
  245. package/dist/aptos/utils.js +0 -15
  246. package/dist/aptos/utils.js.map +0 -1
  247. package/src/aptos/utils.ts +0 -24
package/src/commits.ts CHANGED
@@ -2,33 +2,33 @@ import type { PickDeep } from 'type-fest'
2
2
 
3
3
  import type { Chain, ChainStatic, LogFilter } from './chain.ts'
4
4
  import { CCIPCommitNotFoundError } from './errors/index.ts'
5
- import { type CCIPCommit, type CCIPRequest, CCIPVersion } from './types.ts'
5
+ import { type CCIPRequest, type CCIPVerifications, CCIPVersion } from './types.ts'
6
6
 
7
7
  /**
8
8
  * Look for a CommitReport at dest for given CCIPRequest
9
9
  * Provides a basic/generic implementation, but subclasses of Chain may override with more specific
10
- * logic in Chain.getCommitReport method
10
+ * logic in Chain.getVerifications method
11
11
  *
12
12
  * @param dest - Destination network provider
13
- * @param commitStore - Commit store address
13
+ * @param offRamp - Commit store address
14
14
  * @param request - CCIP request info
15
15
  * @param hints - Additional filtering hints
16
16
  * @returns CCIP commit info
17
17
  **/
18
- export async function getCommitReport(
18
+ export async function getOnchainCommitReport(
19
19
  dest: Chain,
20
- commitStore: string,
20
+ offRamp: string,
21
21
  {
22
22
  lane,
23
23
  message,
24
24
  tx: { timestamp: requestTimestamp },
25
- }: PickDeep<CCIPRequest, 'lane' | 'message.sequenceNumber' | 'tx.timestamp'>,
26
- hints?: Pick<LogFilter, 'page' | 'watch'> & { startBlock?: number },
27
- ): Promise<CCIPCommit> {
25
+ }: PickDeep<CCIPRequest, 'lane' | `message.${'sequenceNumber' | 'messageId'}` | 'tx.timestamp'>,
26
+ hints?: Pick<LogFilter, 'page' | 'watch' | 'startBlock'>,
27
+ ): Promise<CCIPVerifications> {
28
28
  for await (const log of dest.getLogs({
29
29
  ...hints,
30
30
  ...(!hints?.startBlock ? { startTime: requestTimestamp } : { startBlock: hints.startBlock }),
31
- address: commitStore,
31
+ address: offRamp,
32
32
  topics: [lane.version < CCIPVersion.V1_6 ? 'ReportAccepted' : 'CommitReportAccepted'],
33
33
  })) {
34
34
  const reports = (dest.constructor as ChainStatic).decodeCommits(log, lane)
@@ -41,7 +41,13 @@ export class CCIPError extends Error {
41
41
 
42
42
  override readonly name: string = 'CCIPError'
43
43
 
44
- /** Creates CCIPError with code, message, and options. */
44
+ /**
45
+ * Creates a CCIPError with code, message, and options.
46
+ *
47
+ * @param code - Machine-readable error code
48
+ * @param message - Human-readable error message
49
+ * @param options - Additional error options (cause, context, isTransient, etc.)
50
+ */
45
51
  constructor(code: CCIPErrorCode, message: string, options?: CCIPErrorOptions) {
46
52
  super(message, { cause: options?.cause })
47
53
  Object.setPrototypeOf(this, new.target.prototype)
@@ -55,7 +61,15 @@ export class CCIPError extends Error {
55
61
  Error.captureStackTrace(this, this.constructor)
56
62
  }
57
63
 
58
- /** Type guard. Prefer over instanceof (handles dual package hazard). */
64
+ /**
65
+ * Type guard for CCIPError.
66
+ *
67
+ * Prefer this over `instanceof` to handle the dual package hazard
68
+ * when multiple versions of the SDK may be present.
69
+ *
70
+ * @param error - The error to check
71
+ * @returns True if the error is a CCIPError instance
72
+ */
59
73
  static isCCIPError(error: unknown): error is CCIPError {
60
74
  return (
61
75
  error instanceof CCIPError ||
@@ -63,7 +77,15 @@ export class CCIPError extends Error {
63
77
  )
64
78
  }
65
79
 
66
- /** Wrap unknown catch value in CCIPError. */
80
+ /**
81
+ * Wraps an unknown caught value in a CCIPError.
82
+ *
83
+ * Useful for normalizing errors in catch blocks.
84
+ *
85
+ * @param error - The error to wrap
86
+ * @param code - Optional error code (defaults to 'UNKNOWN')
87
+ * @returns A CCIPError wrapping the original error
88
+ */
67
89
  static from(error: unknown, code?: CCIPErrorCode): CCIPError {
68
90
  if (error instanceof CCIPError) return error
69
91
  if (error instanceof Error) {
@@ -72,7 +94,14 @@ export class CCIPError extends Error {
72
94
  return new CCIPError(code ?? 'UNKNOWN', String(error))
73
95
  }
74
96
 
75
- /** Serialize for logging (JSON.stringify loses non-enumerable props). */
97
+ /**
98
+ * Serializes the error for logging.
99
+ *
100
+ * Use this instead of `JSON.stringify(error)` directly, as Error properties
101
+ * are non-enumerable and would be lost.
102
+ *
103
+ * @returns An object containing all error properties
104
+ */
76
105
  toJSON(): Record<string, unknown> {
77
106
  return {
78
107
  name: this.name,
@@ -4,6 +4,7 @@ export const CCIPErrorCode = {
4
4
  CHAIN_NOT_FOUND: 'CHAIN_NOT_FOUND',
5
5
  CHAIN_SELECTOR_NOT_FOUND: 'CHAIN_SELECTOR_NOT_FOUND',
6
6
  CHAIN_FAMILY_UNSUPPORTED: 'CHAIN_FAMILY_UNSUPPORTED',
7
+ NETWORK_FAMILY_UNSUPPORTED: 'NETWORK_FAMILY_UNSUPPORTED',
7
8
  METHOD_UNSUPPORTED: 'METHOD_UNSUPPORTED',
8
9
  CHAIN_FAMILY_MISMATCH: 'CHAIN_FAMILY_MISMATCH',
9
10
  APTOS_NETWORK_UNKNOWN: 'APTOS_NETWORK_UNKNOWN',
@@ -90,6 +91,7 @@ export const CCIPErrorCode = {
90
91
  TOKEN_POOL_STATE_NOT_FOUND: 'TOKEN_POOL_STATE_NOT_FOUND',
91
92
  TOKEN_POOL_INFO_NOT_FOUND: 'TOKEN_POOL_INFO_NOT_FOUND',
92
93
  TOKEN_ACCOUNT_NOT_FOUND: 'TOKEN_ACCOUNT_NOT_FOUND',
94
+ LEGACY_TOKEN_POOLS_UNSUPPORTED: 'LEGACY_TOKEN_POOLS_UNSUPPORTED',
93
95
 
94
96
  // Wallet & Signer
95
97
  WALLET_NOT_SIGNER: 'WALLET_NOT_SIGNER',
@@ -136,6 +138,7 @@ export const CCIPErrorCode = {
136
138
  APTOS_TX_TYPE_UNEXPECTED: 'APTOS_TX_TYPE_UNEXPECTED',
137
139
  APTOS_ADDRESS_MODULE_REQUIRED: 'APTOS_ADDRESS_MODULE_REQUIRED',
138
140
  APTOS_HASHER_VERSION_UNSUPPORTED: 'APTOS_HASHER_VERSION_UNSUPPORTED',
141
+ APTOS_TOPIC_INVALID: 'APTOS_TOPIC_INVALID',
139
142
 
140
143
  // HTTP & RPC
141
144
  HTTP_ERROR: 'HTTP_ERROR',
@@ -173,7 +176,6 @@ export const TRANSIENT_ERROR_CODES = new Set<CCIPErrorCode>([
173
176
  CCIPErrorCode.TRANSACTION_NOT_FOUND,
174
177
  CCIPErrorCode.BLOCK_TIME_NOT_FOUND,
175
178
  CCIPErrorCode.TRANSACTION_NOT_FINALIZED,
176
- CCIPErrorCode.MESSAGE_NOT_FOUND_IN_TX,
177
179
  CCIPErrorCode.MESSAGE_ID_NOT_FOUND,
178
180
  CCIPErrorCode.MESSAGE_BATCH_INCOMPLETE,
179
181
  CCIPErrorCode.COMMIT_NOT_FOUND,
@@ -10,6 +10,7 @@ export {
10
10
  CCIPChainFamilyUnsupportedError,
11
11
  CCIPChainNotFoundError,
12
12
  CCIPMethodUnsupportedError,
13
+ CCIPNetworkFamilyUnsupportedError,
13
14
  } from './specialized.ts'
14
15
 
15
16
  // Specialized errors - Block & Transaction
@@ -67,6 +68,7 @@ export { CCIPExtraArgsInvalidError, CCIPExtraArgsParseError } from './specialize
67
68
 
68
69
  // Specialized errors - Token & Registry
69
70
  export {
71
+ CCIPLegacyTokenPoolsUnsupportedError,
70
72
  CCIPTokenDecimalsInsufficientError,
71
73
  CCIPTokenNotConfiguredError,
72
74
  CCIPTokenNotFoundError,
@@ -135,6 +137,7 @@ export {
135
137
  CCIPAptosNetworkUnknownError,
136
138
  CCIPAptosRegistryTypeInvalidError,
137
139
  CCIPAptosTokenNotRegisteredError,
140
+ CCIPAptosTopicInvalidError,
138
141
  CCIPAptosTransactionInvalidError,
139
142
  CCIPAptosTransactionTypeInvalidError,
140
143
  CCIPAptosTransactionTypeUnexpectedError,
@@ -144,6 +147,7 @@ export {
144
147
  // Specialized errors - Sui-specific
145
148
  export {
146
149
  CCIPSuiHasherVersionUnsupportedError,
150
+ CCIPSuiLogInvalidError,
147
151
  CCIPSuiMessageVersionInvalidError,
148
152
  } from './specialized.ts'
149
153
 
@@ -8,6 +8,8 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
8
8
  'Verify the chain selector is valid. Use networkInfo() to look up selectors.',
9
9
  CHAIN_FAMILY_UNSUPPORTED:
10
10
  'This chain family is not supported. Check the method documentation for supported chain families.',
11
+ NETWORK_FAMILY_UNSUPPORTED:
12
+ 'This network family is not supported. Supported families: evm, solana, aptos, sui, ton.',
11
13
  CHAIN_FAMILY_MISMATCH:
12
14
  'Use the correct Chain class for this chain family (e.g., EVMChain for EVM, SolanaChain for Solana).',
13
15
  METHOD_UNSUPPORTED:
@@ -25,7 +27,7 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
25
27
  'Ensure the data is a valid CCIPSendRequested event log. Check the transaction on the source chain explorer.',
26
28
  MESSAGE_CCIP_DECODE_FAILED:
27
29
  'Ensure the log data is from a CCIPSendRequested event. Verify the source chain and transaction hash.',
28
- MESSAGE_NOT_FOUND_IN_TX: 'No CCIPSendRequested event found. Verify the transaction hash.',
30
+ MESSAGE_NOT_FOUND_IN_TX: 'No CCIP request event found in tx. Verify the transaction hash.',
29
31
  MESSAGE_ID_NOT_FOUND: 'Wait and retry. The message may still be in transit (5-20 min typical).',
30
32
  MESSAGE_ID_INVALID:
31
33
  'Verify the message ID format. Must be a valid 32-byte hex string (0x-prefixed, 64 hex chars).',
@@ -110,6 +112,8 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
110
112
  'Check that the token pool is deployed and configured for this lane. Verify supported tokens: https://docs.chain.link/ccip/directory',
111
113
  TOKEN_ACCOUNT_NOT_FOUND:
112
114
  'The token account does not exist for this holder. The holder has never held this token. You may treat this as zero balance.',
115
+ LEGACY_TOKEN_POOLS_UNSUPPORTED:
116
+ 'Legacy token pools (CCIP <1.5) are not supported. Upgrade to CCIP 1.5+ token pools.',
113
117
 
114
118
  WALLET_NOT_SIGNER: 'Provide a wallet with signing capability (Signer interface).',
115
119
  WALLET_INVALID: 'Provide a valid Wallet instance.',
@@ -159,6 +163,8 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
159
163
  'Check that the transaction is a standard user transaction, not a script or module deployment.',
160
164
  APTOS_ADDRESS_MODULE_REQUIRED: 'Provide an address with module for Aptos log filtering.',
161
165
  APTOS_HASHER_VERSION_UNSUPPORTED: 'This hasher version is not supported for Aptos.',
166
+ APTOS_TOPIC_INVALID:
167
+ 'Invalid Aptos event topic. Ensure the topic matches a known CCIP event type.',
162
168
 
163
169
  HTTP_ERROR: 'HTTP request failed. 429 indicates rate limiting.',
164
170
  RPC_NOT_FOUND: 'No RPC endpoint found. Configure an RPC URL.',