@chainlink/ccip-sdk 0.95.0 → 0.97.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 (217) hide show
  1. package/README.md +2 -2
  2. package/dist/all-chains.d.ts +23 -0
  3. package/dist/all-chains.d.ts.map +1 -0
  4. package/dist/all-chains.js +24 -0
  5. package/dist/all-chains.js.map +1 -0
  6. package/dist/api/index.d.ts +31 -19
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/index.js +46 -25
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/api/types.d.ts +24 -30
  11. package/dist/api/types.d.ts.map +1 -1
  12. package/dist/aptos/exec.d.ts +2 -2
  13. package/dist/aptos/exec.d.ts.map +1 -1
  14. package/dist/aptos/exec.js.map +1 -1
  15. package/dist/aptos/hasher.d.ts.map +1 -1
  16. package/dist/aptos/hasher.js +1 -1
  17. package/dist/aptos/hasher.js.map +1 -1
  18. package/dist/aptos/index.d.ts +43 -15
  19. package/dist/aptos/index.d.ts.map +1 -1
  20. package/dist/aptos/index.js +112 -105
  21. package/dist/aptos/index.js.map +1 -1
  22. package/dist/aptos/types.d.ts +2 -19
  23. package/dist/aptos/types.d.ts.map +1 -1
  24. package/dist/aptos/types.js +0 -11
  25. package/dist/aptos/types.js.map +1 -1
  26. package/dist/chain.d.ts +734 -174
  27. package/dist/chain.d.ts.map +1 -1
  28. package/dist/chain.js +216 -31
  29. package/dist/chain.js.map +1 -1
  30. package/dist/commits.d.ts +4 -6
  31. package/dist/commits.d.ts.map +1 -1
  32. package/dist/commits.js +4 -4
  33. package/dist/commits.js.map +1 -1
  34. package/dist/errors/CCIPError.d.ts +33 -4
  35. package/dist/errors/CCIPError.d.ts.map +1 -1
  36. package/dist/errors/CCIPError.js +33 -4
  37. package/dist/errors/CCIPError.js.map +1 -1
  38. package/dist/errors/codes.d.ts +5 -0
  39. package/dist/errors/codes.d.ts.map +1 -1
  40. package/dist/errors/codes.js +5 -1
  41. package/dist/errors/codes.js.map +1 -1
  42. package/dist/errors/index.d.ts +2 -2
  43. package/dist/errors/index.d.ts.map +1 -1
  44. package/dist/errors/index.js +2 -2
  45. package/dist/errors/index.js.map +1 -1
  46. package/dist/errors/recovery.d.ts.map +1 -1
  47. package/dist/errors/recovery.js +6 -1
  48. package/dist/errors/recovery.js.map +1 -1
  49. package/dist/errors/specialized.d.ts +1702 -121
  50. package/dist/errors/specialized.d.ts.map +1 -1
  51. package/dist/errors/specialized.js +1729 -125
  52. package/dist/errors/specialized.js.map +1 -1
  53. package/dist/errors/utils.d.ts.map +1 -1
  54. package/dist/errors/utils.js +0 -1
  55. package/dist/errors/utils.js.map +1 -1
  56. package/dist/evm/abi/OffRamp_2_0.d.ts +764 -0
  57. package/dist/evm/abi/OffRamp_2_0.d.ts.map +1 -0
  58. package/dist/evm/abi/OffRamp_2_0.js +744 -0
  59. package/dist/evm/abi/OffRamp_2_0.js.map +1 -0
  60. package/dist/evm/abi/OnRamp_2_0.d.ts +925 -0
  61. package/dist/evm/abi/OnRamp_2_0.d.ts.map +1 -0
  62. package/dist/evm/abi/OnRamp_2_0.js +992 -0
  63. package/dist/evm/abi/OnRamp_2_0.js.map +1 -0
  64. package/dist/evm/const.d.ts +12 -2
  65. package/dist/evm/const.d.ts.map +1 -1
  66. package/dist/evm/const.js +8 -2
  67. package/dist/evm/const.js.map +1 -1
  68. package/dist/evm/errors.d.ts.map +1 -1
  69. package/dist/evm/errors.js +7 -2
  70. package/dist/evm/errors.js.map +1 -1
  71. package/dist/evm/extra-args.d.ts +25 -0
  72. package/dist/evm/extra-args.d.ts.map +1 -0
  73. package/dist/evm/extra-args.js +309 -0
  74. package/dist/evm/extra-args.js.map +1 -0
  75. package/dist/evm/gas.d.ts.map +1 -1
  76. package/dist/evm/gas.js +7 -12
  77. package/dist/evm/gas.js.map +1 -1
  78. package/dist/evm/hasher.d.ts.map +1 -1
  79. package/dist/evm/hasher.js +23 -13
  80. package/dist/evm/hasher.js.map +1 -1
  81. package/dist/evm/index.d.ts +140 -35
  82. package/dist/evm/index.d.ts.map +1 -1
  83. package/dist/evm/index.js +306 -226
  84. package/dist/evm/index.js.map +1 -1
  85. package/dist/evm/messages.d.ts +59 -5
  86. package/dist/evm/messages.d.ts.map +1 -1
  87. package/dist/evm/messages.js +210 -0
  88. package/dist/evm/messages.js.map +1 -1
  89. package/dist/evm/offchain.js.map +1 -1
  90. package/dist/evm/types.d.ts +7 -2
  91. package/dist/evm/types.d.ts.map +1 -1
  92. package/dist/evm/types.js +22 -1
  93. package/dist/evm/types.js.map +1 -1
  94. package/dist/execution.d.ts +62 -22
  95. package/dist/execution.d.ts.map +1 -1
  96. package/dist/execution.js +102 -51
  97. package/dist/execution.js.map +1 -1
  98. package/dist/extra-args.d.ts +113 -4
  99. package/dist/extra-args.d.ts.map +1 -1
  100. package/dist/extra-args.js +38 -3
  101. package/dist/extra-args.js.map +1 -1
  102. package/dist/gas.d.ts +31 -5
  103. package/dist/gas.d.ts.map +1 -1
  104. package/dist/gas.js +43 -9
  105. package/dist/gas.js.map +1 -1
  106. package/dist/index.d.ts +11 -10
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +8 -8
  109. package/dist/index.js.map +1 -1
  110. package/dist/requests.d.ts +101 -22
  111. package/dist/requests.d.ts.map +1 -1
  112. package/dist/requests.js +115 -24
  113. package/dist/requests.js.map +1 -1
  114. package/dist/selectors.d.ts.map +1 -1
  115. package/dist/selectors.js +24 -0
  116. package/dist/selectors.js.map +1 -1
  117. package/dist/shared/bcs-codecs.d.ts +61 -0
  118. package/dist/shared/bcs-codecs.d.ts.map +1 -0
  119. package/dist/shared/bcs-codecs.js +102 -0
  120. package/dist/shared/bcs-codecs.js.map +1 -0
  121. package/dist/shared/constants.d.ts +3 -0
  122. package/dist/shared/constants.d.ts.map +1 -0
  123. package/dist/shared/constants.js +3 -0
  124. package/dist/shared/constants.js.map +1 -0
  125. package/dist/solana/exec.d.ts +2 -2
  126. package/dist/solana/exec.d.ts.map +1 -1
  127. package/dist/solana/exec.js.map +1 -1
  128. package/dist/solana/index.d.ts +148 -30
  129. package/dist/solana/index.d.ts.map +1 -1
  130. package/dist/solana/index.js +137 -44
  131. package/dist/solana/index.js.map +1 -1
  132. package/dist/sui/hasher.d.ts.map +1 -1
  133. package/dist/sui/hasher.js +1 -1
  134. package/dist/sui/hasher.js.map +1 -1
  135. package/dist/sui/index.d.ts +49 -19
  136. package/dist/sui/index.d.ts.map +1 -1
  137. package/dist/sui/index.js +76 -43
  138. package/dist/sui/index.js.map +1 -1
  139. package/dist/sui/manuallyExec/encoder.d.ts +2 -2
  140. package/dist/sui/manuallyExec/encoder.d.ts.map +1 -1
  141. package/dist/sui/manuallyExec/encoder.js.map +1 -1
  142. package/dist/sui/manuallyExec/index.d.ts +2 -2
  143. package/dist/sui/manuallyExec/index.d.ts.map +1 -1
  144. package/dist/ton/exec.d.ts +2 -2
  145. package/dist/ton/exec.d.ts.map +1 -1
  146. package/dist/ton/exec.js.map +1 -1
  147. package/dist/ton/index.d.ts +66 -27
  148. package/dist/ton/index.d.ts.map +1 -1
  149. package/dist/ton/index.js +172 -47
  150. package/dist/ton/index.js.map +1 -1
  151. package/dist/ton/send.d.ts +52 -0
  152. package/dist/ton/send.d.ts.map +1 -0
  153. package/dist/ton/send.js +166 -0
  154. package/dist/ton/send.js.map +1 -0
  155. package/dist/ton/types.d.ts +2 -2
  156. package/dist/ton/types.d.ts.map +1 -1
  157. package/dist/ton/types.js.map +1 -1
  158. package/dist/types.d.ts +148 -12
  159. package/dist/types.d.ts.map +1 -1
  160. package/dist/types.js +6 -1
  161. package/dist/types.js.map +1 -1
  162. package/dist/utils.d.ts +79 -4
  163. package/dist/utils.d.ts.map +1 -1
  164. package/dist/utils.js +92 -7
  165. package/dist/utils.js.map +1 -1
  166. package/package.json +16 -11
  167. package/src/all-chains.ts +26 -0
  168. package/src/api/index.ts +58 -34
  169. package/src/api/types.ts +24 -31
  170. package/src/aptos/exec.ts +2 -2
  171. package/src/aptos/hasher.ts +1 -1
  172. package/src/aptos/index.ts +127 -129
  173. package/src/aptos/types.ts +2 -15
  174. package/src/chain.ts +837 -191
  175. package/src/commits.ts +9 -9
  176. package/src/errors/CCIPError.ts +33 -4
  177. package/src/errors/codes.ts +5 -1
  178. package/src/errors/index.ts +2 -1
  179. package/src/errors/recovery.ts +9 -1
  180. package/src/errors/specialized.ts +1745 -132
  181. package/src/errors/utils.ts +0 -1
  182. package/src/evm/abi/OffRamp_2_0.ts +743 -0
  183. package/src/evm/abi/OnRamp_2_0.ts +991 -0
  184. package/src/evm/const.ts +10 -3
  185. package/src/evm/errors.ts +6 -2
  186. package/src/evm/extra-args.ts +360 -0
  187. package/src/evm/gas.ts +14 -13
  188. package/src/evm/hasher.ts +30 -18
  189. package/src/evm/index.ts +376 -281
  190. package/src/evm/messages.ts +323 -11
  191. package/src/evm/offchain.ts +2 -2
  192. package/src/evm/types.ts +20 -2
  193. package/src/execution.ts +126 -71
  194. package/src/extra-args.ts +118 -4
  195. package/src/gas.ts +44 -11
  196. package/src/index.ts +14 -11
  197. package/src/requests.ts +128 -24
  198. package/src/selectors.ts +24 -0
  199. package/src/shared/bcs-codecs.ts +132 -0
  200. package/src/shared/constants.ts +2 -0
  201. package/src/solana/exec.ts +4 -4
  202. package/src/solana/index.ts +170 -82
  203. package/src/sui/hasher.ts +1 -1
  204. package/src/sui/index.ts +88 -56
  205. package/src/sui/manuallyExec/encoder.ts +2 -2
  206. package/src/sui/manuallyExec/index.ts +2 -2
  207. package/src/ton/exec.ts +2 -2
  208. package/src/ton/index.ts +220 -58
  209. package/src/ton/send.ts +222 -0
  210. package/src/ton/types.ts +2 -2
  211. package/src/types.ts +173 -30
  212. package/src/utils.ts +91 -7
  213. package/dist/aptos/utils.d.ts +0 -12
  214. package/dist/aptos/utils.d.ts.map +0 -1
  215. package/dist/aptos/utils.js +0 -15
  216. package/dist/aptos/utils.js.map +0 -1
  217. 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',
@@ -80,6 +81,7 @@ export const CCIPErrorCode = {
80
81
  TOKEN_NOT_IN_REGISTRY: 'TOKEN_NOT_IN_REGISTRY',
81
82
  TOKEN_NOT_CONFIGURED: 'TOKEN_NOT_CONFIGURED',
82
83
  TOKEN_NOT_REGISTERED: 'TOKEN_NOT_REGISTERED',
84
+ TOKEN_REMOTE_NOT_CONFIGURED: 'TOKEN_REMOTE_NOT_CONFIGURED',
83
85
  TOKEN_DECIMALS_INSUFFICIENT: 'TOKEN_DECIMALS_INSUFFICIENT',
84
86
  TOKEN_INVALID_SPL: 'TOKEN_INVALID_SPL',
85
87
  TOKEN_DATA_PARSE_FAILED: 'TOKEN_DATA_PARSE_FAILED',
@@ -89,6 +91,7 @@ export const CCIPErrorCode = {
89
91
  TOKEN_POOL_STATE_NOT_FOUND: 'TOKEN_POOL_STATE_NOT_FOUND',
90
92
  TOKEN_POOL_INFO_NOT_FOUND: 'TOKEN_POOL_INFO_NOT_FOUND',
91
93
  TOKEN_ACCOUNT_NOT_FOUND: 'TOKEN_ACCOUNT_NOT_FOUND',
94
+ LEGACY_TOKEN_POOLS_UNSUPPORTED: 'LEGACY_TOKEN_POOLS_UNSUPPORTED',
92
95
 
93
96
  // Wallet & Signer
94
97
  WALLET_NOT_SIGNER: 'WALLET_NOT_SIGNER',
@@ -135,6 +138,7 @@ export const CCIPErrorCode = {
135
138
  APTOS_TX_TYPE_UNEXPECTED: 'APTOS_TX_TYPE_UNEXPECTED',
136
139
  APTOS_ADDRESS_MODULE_REQUIRED: 'APTOS_ADDRESS_MODULE_REQUIRED',
137
140
  APTOS_HASHER_VERSION_UNSUPPORTED: 'APTOS_HASHER_VERSION_UNSUPPORTED',
141
+ APTOS_TOPIC_INVALID: 'APTOS_TOPIC_INVALID',
138
142
 
139
143
  // HTTP & RPC
140
144
  HTTP_ERROR: 'HTTP_ERROR',
@@ -153,6 +157,7 @@ export const CCIPErrorCode = {
153
157
 
154
158
  // CLI & Validation
155
159
  ARGUMENT_INVALID: 'ARGUMENT_INVALID',
160
+ INSUFFICIENT_BALANCE: 'INSUFFICIENT_BALANCE',
156
161
 
157
162
  // Internal
158
163
  NOT_IMPLEMENTED: 'NOT_IMPLEMENTED',
@@ -171,7 +176,6 @@ export const TRANSIENT_ERROR_CODES = new Set<CCIPErrorCode>([
171
176
  CCIPErrorCode.TRANSACTION_NOT_FOUND,
172
177
  CCIPErrorCode.BLOCK_TIME_NOT_FOUND,
173
178
  CCIPErrorCode.TRANSACTION_NOT_FINALIZED,
174
- CCIPErrorCode.MESSAGE_NOT_FOUND_IN_TX,
175
179
  CCIPErrorCode.MESSAGE_ID_NOT_FOUND,
176
180
  CCIPErrorCode.MESSAGE_BATCH_INCOMPLETE,
177
181
  CCIPErrorCode.COMMIT_NOT_FOUND,
@@ -144,6 +144,7 @@ export {
144
144
  // Specialized errors - Sui-specific
145
145
  export {
146
146
  CCIPSuiHasherVersionUnsupportedError,
147
+ CCIPSuiLogInvalidError,
147
148
  CCIPSuiMessageVersionInvalidError,
148
149
  } from './specialized.ts'
149
150
 
@@ -179,7 +180,7 @@ export { CCIPAddressInvalidEvmError } from './specialized.ts'
179
180
  export { CCIPSourceChainUnsupportedError } from './specialized.ts'
180
181
 
181
182
  // Specialized errors - CLI & Validation
182
- export { CCIPArgumentInvalidError } from './specialized.ts'
183
+ export { CCIPArgumentInvalidError, CCIPInsufficientBalanceError } from './specialized.ts'
183
184
 
184
185
  // HTTP Status codes (re-exported from root)
185
186
  export { HttpStatus, isServerError, isTransientHttpStatus } from '../http-status.ts'
@@ -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).',
@@ -96,6 +98,7 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
96
98
  TOKEN_NOT_IN_REGISTRY: 'Token not found in TokenAdminRegistry.',
97
99
  TOKEN_NOT_CONFIGURED: 'Token is not configured in the registry.',
98
100
  TOKEN_NOT_REGISTERED: 'Token is not registered in the TokenAdminRegistry.',
101
+ TOKEN_REMOTE_NOT_CONFIGURED: 'Remote network is not registered in TokenPool.',
99
102
  TOKEN_DECIMALS_INSUFFICIENT: 'Destination token has insufficient decimals.',
100
103
  TOKEN_INVALID_SPL: 'Invalid SPL token or Token-2022.',
101
104
  TOKEN_DATA_PARSE_FAILED:
@@ -109,6 +112,8 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
109
112
  'Check that the token pool is deployed and configured for this lane. Verify supported tokens: https://docs.chain.link/ccip/directory',
110
113
  TOKEN_ACCOUNT_NOT_FOUND:
111
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.',
112
117
 
113
118
  WALLET_NOT_SIGNER: 'Provide a wallet with signing capability (Signer interface).',
114
119
  WALLET_INVALID: 'Provide a valid Wallet instance.',
@@ -158,6 +163,8 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
158
163
  'Check that the transaction is a standard user transaction, not a script or module deployment.',
159
164
  APTOS_ADDRESS_MODULE_REQUIRED: 'Provide an address with module for Aptos log filtering.',
160
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.',
161
168
 
162
169
  HTTP_ERROR: 'HTTP request failed. 429 indicates rate limiting.',
163
170
  RPC_NOT_FOUND: 'No RPC endpoint found. Configure an RPC URL.',
@@ -178,6 +185,7 @@ export const DEFAULT_RECOVERY_HINTS: Partial<Record<CCIPErrorCode, string>> = {
178
185
  BORSH_METHOD_UNKNOWN: 'Unknown Borsh method.',
179
186
 
180
187
  ARGUMENT_INVALID: 'Check the command-line argument format and requirements.',
188
+ INSUFFICIENT_BALANCE: 'Fund the wallet to cover the transaction fee.',
181
189
 
182
190
  NOT_IMPLEMENTED: 'This feature is not yet implemented.',
183
191
  UNKNOWN: 'An unknown error occurred. Check the error details.',