@chainlink/ccip-sdk 0.92.1 → 0.93.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 (223) hide show
  1. package/README.md +20 -18
  2. package/dist/api/index.d.ts +103 -0
  3. package/dist/api/index.d.ts.map +1 -0
  4. package/dist/api/index.js +141 -0
  5. package/dist/api/index.js.map +1 -0
  6. package/dist/api/types.d.ts +38 -0
  7. package/dist/api/types.d.ts.map +1 -0
  8. package/dist/api/types.js +2 -0
  9. package/dist/api/types.js.map +1 -0
  10. package/dist/aptos/index.d.ts +20 -33
  11. package/dist/aptos/index.d.ts.map +1 -1
  12. package/dist/aptos/index.js +34 -26
  13. package/dist/aptos/index.js.map +1 -1
  14. package/dist/aptos/logs.js +1 -1
  15. package/dist/aptos/logs.js.map +1 -1
  16. package/dist/aptos/token.js.map +1 -1
  17. package/dist/chain.d.ts +206 -71
  18. package/dist/chain.d.ts.map +1 -1
  19. package/dist/chain.js +89 -20
  20. package/dist/chain.js.map +1 -1
  21. package/dist/commits.d.ts +2 -2
  22. package/dist/commits.d.ts.map +1 -1
  23. package/dist/commits.js +4 -4
  24. package/dist/commits.js.map +1 -1
  25. package/dist/errors/CCIPError.d.ts.map +1 -1
  26. package/dist/errors/CCIPError.js +3 -2
  27. package/dist/errors/CCIPError.js.map +1 -1
  28. package/dist/errors/codes.d.ts +4 -1
  29. package/dist/errors/codes.d.ts.map +1 -1
  30. package/dist/errors/codes.js +6 -1
  31. package/dist/errors/codes.js.map +1 -1
  32. package/dist/errors/index.d.ts +5 -2
  33. package/dist/errors/index.d.ts.map +1 -1
  34. package/dist/errors/index.js +8 -2
  35. package/dist/errors/index.js.map +1 -1
  36. package/dist/errors/recovery.d.ts.map +1 -1
  37. package/dist/errors/recovery.js +4 -1
  38. package/dist/errors/recovery.js.map +1 -1
  39. package/dist/errors/specialized.d.ts +29 -4
  40. package/dist/errors/specialized.d.ts.map +1 -1
  41. package/dist/errors/specialized.js +48 -6
  42. package/dist/errors/specialized.js.map +1 -1
  43. package/dist/evm/errors.js.map +1 -1
  44. package/dist/evm/index.d.ts +24 -48
  45. package/dist/evm/index.d.ts.map +1 -1
  46. package/dist/evm/index.js +71 -59
  47. package/dist/evm/index.js.map +1 -1
  48. package/dist/evm/logs.js.map +1 -1
  49. package/dist/evm/offchain.js +3 -2
  50. package/dist/evm/offchain.js.map +1 -1
  51. package/dist/evm/viem/client-adapter.d.ts +68 -0
  52. package/dist/evm/viem/client-adapter.d.ts.map +1 -0
  53. package/dist/evm/viem/client-adapter.js +104 -0
  54. package/dist/evm/viem/client-adapter.js.map +1 -0
  55. package/dist/evm/viem/index.d.ts +29 -0
  56. package/dist/evm/viem/index.d.ts.map +1 -0
  57. package/dist/evm/viem/index.js +28 -0
  58. package/dist/evm/viem/index.js.map +1 -0
  59. package/dist/evm/viem/types.d.ts +13 -0
  60. package/dist/evm/viem/types.d.ts.map +1 -0
  61. package/dist/evm/viem/types.js +2 -0
  62. package/dist/evm/viem/types.js.map +1 -0
  63. package/dist/evm/viem/wallet-adapter.d.ts +58 -0
  64. package/dist/evm/viem/wallet-adapter.d.ts.map +1 -0
  65. package/dist/evm/viem/wallet-adapter.js +197 -0
  66. package/dist/evm/viem/wallet-adapter.js.map +1 -0
  67. package/dist/execution.d.ts +1 -1
  68. package/dist/execution.d.ts.map +1 -1
  69. package/dist/execution.js +2 -2
  70. package/dist/execution.js.map +1 -1
  71. package/dist/explorer.d.ts +74 -0
  72. package/dist/explorer.d.ts.map +1 -0
  73. package/dist/explorer.js +67 -0
  74. package/dist/explorer.js.map +1 -0
  75. package/dist/gas.js.map +1 -1
  76. package/dist/hasher/merklemulti.js.map +1 -1
  77. package/dist/http-status.d.ts +20 -0
  78. package/dist/http-status.d.ts.map +1 -0
  79. package/dist/http-status.js +25 -0
  80. package/dist/http-status.js.map +1 -0
  81. package/dist/index.d.ts +10 -3
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +4 -2
  84. package/dist/index.js.map +1 -1
  85. package/dist/offchain.js.map +1 -1
  86. package/dist/requests.d.ts +4 -4
  87. package/dist/requests.d.ts.map +1 -1
  88. package/dist/requests.js +6 -6
  89. package/dist/requests.js.map +1 -1
  90. package/dist/solana/cleanup.js +2 -2
  91. package/dist/solana/cleanup.js.map +1 -1
  92. package/dist/solana/exec.js +1 -5
  93. package/dist/solana/exec.js.map +1 -1
  94. package/dist/solana/index.d.ts +28 -57
  95. package/dist/solana/index.d.ts.map +1 -1
  96. package/dist/solana/index.js +66 -70
  97. package/dist/solana/index.js.map +1 -1
  98. package/dist/solana/logs.js +2 -2
  99. package/dist/solana/logs.js.map +1 -1
  100. package/dist/solana/offchain.js +3 -3
  101. package/dist/solana/offchain.js.map +1 -1
  102. package/dist/solana/send.js +1 -1
  103. package/dist/solana/send.js.map +1 -1
  104. package/dist/solana/utils.js +1 -1
  105. package/dist/solana/utils.js.map +1 -1
  106. package/dist/sui/discovery.d.ts.map +1 -1
  107. package/dist/sui/discovery.js +2 -5
  108. package/dist/sui/discovery.js.map +1 -1
  109. package/dist/sui/events.d.ts.map +1 -1
  110. package/dist/sui/events.js +1 -4
  111. package/dist/sui/events.js.map +1 -1
  112. package/dist/sui/index.d.ts +18 -29
  113. package/dist/sui/index.d.ts.map +1 -1
  114. package/dist/sui/index.js +24 -26
  115. package/dist/sui/index.js.map +1 -1
  116. package/dist/sui/manuallyExec/encoder.d.ts.map +1 -1
  117. package/dist/sui/manuallyExec/encoder.js +0 -3
  118. package/dist/sui/manuallyExec/encoder.js.map +1 -1
  119. package/dist/sui/manuallyExec/index.d.ts.map +1 -1
  120. package/dist/sui/manuallyExec/index.js +1 -2
  121. package/dist/sui/manuallyExec/index.js.map +1 -1
  122. package/dist/sui/objects.js +4 -4
  123. package/dist/sui/objects.js.map +1 -1
  124. package/dist/ton/exec.d.ts +2 -2
  125. package/dist/ton/exec.d.ts.map +1 -1
  126. package/dist/ton/exec.js.map +1 -1
  127. package/dist/ton/hasher.js +5 -5
  128. package/dist/ton/hasher.js.map +1 -1
  129. package/dist/ton/index.d.ts +54 -49
  130. package/dist/ton/index.d.ts.map +1 -1
  131. package/dist/ton/index.js +331 -236
  132. package/dist/ton/index.js.map +1 -1
  133. package/dist/ton/logs.d.ts +11 -22
  134. package/dist/ton/logs.d.ts.map +1 -1
  135. package/dist/ton/logs.js +95 -118
  136. package/dist/ton/logs.js.map +1 -1
  137. package/dist/ton/types.d.ts +9 -9
  138. package/dist/ton/types.d.ts.map +1 -1
  139. package/dist/ton/types.js +5 -9
  140. package/dist/ton/types.js.map +1 -1
  141. package/dist/ton/utils.d.ts +8 -27
  142. package/dist/ton/utils.d.ts.map +1 -1
  143. package/dist/ton/utils.js +31 -111
  144. package/dist/ton/utils.js.map +1 -1
  145. package/dist/types.d.ts +34 -0
  146. package/dist/types.d.ts.map +1 -1
  147. package/dist/types.js +30 -0
  148. package/dist/types.js.map +1 -1
  149. package/dist/utils.d.ts +6 -5
  150. package/dist/utils.d.ts.map +1 -1
  151. package/dist/utils.js +76 -52
  152. package/dist/utils.js.map +1 -1
  153. package/dist/viem.d.ts +6 -0
  154. package/dist/viem.d.ts.map +1 -0
  155. package/dist/viem.js +6 -0
  156. package/dist/viem.js.map +1 -0
  157. package/package.json +17 -2
  158. package/src/api/index.ts +167 -0
  159. package/src/api/types.ts +39 -0
  160. package/src/aptos/index.ts +57 -64
  161. package/src/aptos/logs.ts +10 -10
  162. package/src/aptos/token.ts +1 -1
  163. package/src/chain.ts +274 -97
  164. package/src/commits.ts +5 -5
  165. package/src/errors/CCIPError.ts +5 -2
  166. package/src/errors/codes.ts +8 -1
  167. package/src/errors/index.ts +15 -2
  168. package/src/errors/recovery.ts +9 -1
  169. package/src/errors/specialized.ts +61 -6
  170. package/src/evm/errors.ts +2 -2
  171. package/src/evm/index.ts +107 -120
  172. package/src/evm/logs.ts +4 -4
  173. package/src/evm/offchain.ts +5 -4
  174. package/src/evm/viem/client-adapter.ts +124 -0
  175. package/src/evm/viem/index.ts +29 -0
  176. package/src/evm/viem/types.ts +14 -0
  177. package/src/evm/viem/wallet-adapter.ts +233 -0
  178. package/src/execution.ts +9 -9
  179. package/src/explorer.ts +90 -0
  180. package/src/gas.ts +2 -2
  181. package/src/hasher/merklemulti.ts +7 -7
  182. package/src/http-status.ts +31 -0
  183. package/src/index.ts +18 -1
  184. package/src/offchain.ts +1 -1
  185. package/src/requests.ts +9 -12
  186. package/src/solana/cleanup.ts +4 -4
  187. package/src/solana/exec.ts +13 -18
  188. package/src/solana/index.ts +92 -117
  189. package/src/solana/logs.ts +8 -8
  190. package/src/solana/offchain.ts +3 -3
  191. package/src/solana/send.ts +20 -20
  192. package/src/solana/utils.ts +4 -4
  193. package/src/sui/discovery.ts +4 -10
  194. package/src/sui/events.ts +4 -8
  195. package/src/sui/index.ts +36 -48
  196. package/src/sui/manuallyExec/encoder.ts +0 -4
  197. package/src/sui/manuallyExec/index.ts +1 -3
  198. package/src/sui/objects.ts +14 -14
  199. package/src/ton/exec.ts +2 -5
  200. package/src/ton/hasher.ts +5 -5
  201. package/src/ton/index.ts +392 -316
  202. package/src/ton/logs.ts +122 -143
  203. package/src/ton/types.ts +17 -21
  204. package/src/ton/utils.ts +39 -145
  205. package/src/types.ts +36 -0
  206. package/src/utils.ts +96 -66
  207. package/src/viem.ts +5 -0
  208. package/tsconfig.json +3 -2
  209. package/dist/ton/bindings/offramp.d.ts +0 -48
  210. package/dist/ton/bindings/offramp.d.ts.map +0 -1
  211. package/dist/ton/bindings/offramp.js +0 -63
  212. package/dist/ton/bindings/offramp.js.map +0 -1
  213. package/dist/ton/bindings/onramp.d.ts +0 -40
  214. package/dist/ton/bindings/onramp.d.ts.map +0 -1
  215. package/dist/ton/bindings/onramp.js +0 -51
  216. package/dist/ton/bindings/onramp.js.map +0 -1
  217. package/dist/ton/bindings/router.d.ts +0 -47
  218. package/dist/ton/bindings/router.d.ts.map +0 -1
  219. package/dist/ton/bindings/router.js +0 -51
  220. package/dist/ton/bindings/router.js.map +0 -1
  221. package/src/ton/bindings/offramp.ts +0 -96
  222. package/src/ton/bindings/onramp.ts +0 -72
  223. package/src/ton/bindings/router.ts +0 -65
package/src/index.ts CHANGED
@@ -1,5 +1,9 @@
1
+ export type { APIErrorResponse, CCIPAPIClientContext, LaneLatencyResponse } from './api/index.ts'
2
+ export { CCIPAPIClient, DEFAULT_API_BASE_URL } from './api/index.ts'
3
+
1
4
  export type {
2
5
  Chain,
6
+ ChainContext,
3
7
  ChainGetter,
4
8
  ChainStatic,
5
9
  LogFilter,
@@ -18,7 +22,7 @@ export {
18
22
  encodeExtraArgs,
19
23
  } from './extra-args.ts'
20
24
  export { estimateExecGasForRequest } from './gas.ts'
21
- export { decodeMessage, fetchRequestsForSender, sourceToDestTokenAmounts } from './requests.ts'
25
+ export { decodeMessage, getMessagesForSender, sourceToDestTokenAmounts } from './requests.ts'
22
26
  export {
23
27
  type AnyMessage,
24
28
  type CCIPCommit,
@@ -36,6 +40,8 @@ export {
36
40
  type WithLogger,
37
41
  CCIPVersion,
38
42
  ExecutionState,
43
+ IntentStatus,
44
+ MessageStatus,
39
45
  } from './types.ts'
40
46
  export {
41
47
  bigIntReplacer,
@@ -46,16 +52,27 @@ export {
46
52
  isSupportedTxHash,
47
53
  networkInfo,
48
54
  } from './utils.ts'
55
+ export {
56
+ type CCIPExplorerLinks,
57
+ type ExplorerLinkType,
58
+ CCIP_EXPLORER_BASE_URL,
59
+ getCCIPExplorerLinks,
60
+ getCCIPExplorerUrl,
61
+ } from './explorer.ts'
49
62
 
50
63
  // errors
51
64
  export * from './errors/index.ts'
52
65
 
53
66
  // chains
54
67
  import { AptosChain } from './aptos/index.ts'
68
+ export type { UnsignedAptosTx } from './aptos/index.ts'
55
69
  import { EVMChain } from './evm/index.ts'
70
+ export type { UnsignedEVMTx } from './evm/index.ts'
56
71
  import { SolanaChain } from './solana/index.ts'
72
+ export type { UnsignedSolanaTx } from './solana/index.ts'
57
73
  import { SuiChain } from './sui/index.ts'
58
74
  import { TONChain } from './ton/index.ts'
75
+ export type { UnsignedTONTx } from './ton/index.ts'
59
76
  import { ChainFamily } from './types.ts'
60
77
  export { AptosChain, ChainFamily, EVMChain, SolanaChain, SuiChain, TONChain }
61
78
  // use `supportedChains` to override/register derived classes, if needed
package/src/offchain.ts CHANGED
@@ -64,7 +64,7 @@ export async function getLbtcAttestation(
64
64
  method: 'POST',
65
65
  body: JSON.stringify({ messageHash: [payloadHash] }),
66
66
  })
67
- const response = (await res.json()) as LombardAttestationsResponse
67
+ const response = (await res.json()) as LombardAttestationsResponse | null
68
68
  if (response == null || !('attestations' in response)) {
69
69
  throw new CCIPLbtcAttestationNotFoundError(payloadHash, response)
70
70
  }
package/src/requests.ts CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  } from './types.ts'
26
26
  import { convertKeysToCamelCase, decodeAddress, leToBigInt, networkInfo } from './utils.ts'
27
27
 
28
- function decodeJsonMessage(data: Record<string, unknown>) {
28
+ function decodeJsonMessage(data: Record<string, unknown> | undefined) {
29
29
  if (!data || typeof data != 'object') throw new CCIPMessageInvalidError(data)
30
30
  if (data.message) data = data.message as Record<string, unknown>
31
31
  if (data.header) {
@@ -60,7 +60,7 @@ function decodeJsonMessage(data: Record<string, unknown>) {
60
60
  }
61
61
 
62
62
  for (const ta of data_.tokenAmounts) {
63
- if (ta.destGasAmount != null || ta.destExecData == null) continue
63
+ if (ta.destGasAmount != null || !ta.destExecData) continue
64
64
  switch (sourceNetwork.family) {
65
65
  // EVM & Solana encode destExecData as big-endian
66
66
  case ChainFamily.EVM:
@@ -90,7 +90,7 @@ function decodeJsonMessage(data: Record<string, unknown>) {
90
90
  export function decodeMessage(data: string | Uint8Array | Record<string, unknown>): CCIPMessage {
91
91
  if (
92
92
  (typeof data === 'string' && data.startsWith('{')) ||
93
- (typeof data === 'object' && data !== null && !isBytesLike(data))
93
+ (typeof data === 'object' && !isBytesLike(data))
94
94
  ) {
95
95
  if (typeof data === 'string')
96
96
  data = yaml.parse(data, { intAsBigInt: true }) as Record<string, unknown>
@@ -115,10 +115,7 @@ export function decodeMessage(data: string | Uint8Array | Record<string, unknown
115
115
  * @param tx - ChainTransaction to search in
116
116
  * @returns CCIP requests (messages) in the transaction (at least one)
117
117
  **/
118
- export async function fetchCCIPRequestsInTx(
119
- source: Chain,
120
- tx: ChainTransaction,
121
- ): Promise<CCIPRequest[]> {
118
+ export async function getMessagesInTx(source: Chain, tx: ChainTransaction): Promise<CCIPRequest[]> {
122
119
  const txHash = tx.hash
123
120
 
124
121
  const requests: CCIPRequest[] = []
@@ -156,7 +153,7 @@ export async function fetchCCIPRequestsInTx(
156
153
  * @param hints - Optional hints for pagination (e.g., `address` for onRamp, `page` for pagination size).
157
154
  * @returns CCIPRequest with given messageId.
158
155
  */
159
- export async function fetchCCIPRequestById(
156
+ export async function getMessageById(
160
157
  source: Chain,
161
158
  messageId: string,
162
159
  hints?: { page?: number; address?: string },
@@ -201,7 +198,7 @@ const BLOCK_LOG_WINDOW_SIZE = 5000
201
198
  * @param opts - Optional log filtering parameters.
202
199
  * @returns Array of messages in the batch.
203
200
  */
204
- export async function fetchAllMessagesInBatch<
201
+ export async function getMessagesInBatch<
205
202
  C extends Chain,
206
203
  R extends PickDeep<
207
204
  CCIPRequest,
@@ -249,7 +246,7 @@ export async function fetchAllMessagesInBatch<
249
246
  messages.push(message)
250
247
  if (message.sequenceNumber >= maxSeqNr) break
251
248
  }
252
- if (messages.length && messages[0].sequenceNumber > minSeqNr) {
249
+ if (messages.length && messages[0]!.sequenceNumber > minSeqNr) {
253
250
  // still work to be done backwards
254
251
  delete filter['startBlock']
255
252
  filter['endBlock'] = backwardsEndBlock
@@ -287,7 +284,7 @@ export async function fetchAllMessagesInBatch<
287
284
  * @param filter - Log filter options.
288
285
  * @returns Async generator of CCIP requests.
289
286
  */
290
- export async function* fetchRequestsForSender(
287
+ export async function* getMessagesForSender(
291
288
  source: Chain,
292
289
  sender: string,
293
290
  filter: Pick<LogFilter, 'address' | 'startBlock' | 'startTime' | 'endBlock'>,
@@ -348,7 +345,7 @@ export async function sourceToDestTokenAmounts<S extends { token: string }>(
348
345
  return {
349
346
  ...rest,
350
347
  sourcePoolAddress,
351
- destTokenAddress: remotes[networkInfo(destChainSelector).name].remoteToken,
348
+ destTokenAddress: remotes[networkInfo(destChainSelector).name]!.remoteToken,
352
349
  }
353
350
  }),
354
351
  )
@@ -92,7 +92,7 @@ export async function cleanUpBuffers(
92
92
  logger.info('🗑️ Closed lookup table', altAddr, ': tx =>', sig)
93
93
  } catch (err) {
94
94
  const info = await connection.getAddressLookupTable(lookupTable)
95
- if (!info?.value) break
95
+ if (!info.value) break
96
96
  else if (info.value.state.deactivationSlot < 2n ** 63n)
97
97
  deactivationSlot = Number(info.value.state.deactivationSlot)
98
98
  logger.warn('Failed to close lookup table', altAddr, err)
@@ -181,12 +181,12 @@ export async function cleanUpBuffers(
181
181
  }
182
182
  case 'Instruction: DeactivateLookupTable':
183
183
  case 'Instruction: CreateLookupTable': {
184
- const lookupTable = tx.tx.transaction.message.staticAccountKeys[1]
184
+ const lookupTable = tx.tx.transaction.message.staticAccountKeys[1]!
185
185
  if (seenAccs.has(lookupTable.toBase58())) continue
186
186
  seenAccs.add(lookupTable.toBase58())
187
187
 
188
188
  const info = await connection.getAddressLookupTable(lookupTable)
189
- if (!info?.value) {
189
+ if (!info.value) {
190
190
  alreadyClosed++ // assume we're done when we hit Nth closed ALT; maybe add an option to keep going?
191
191
  logger.debug('Lookup table', lookupTable.toBase58(), 'already closed')
192
192
  } else if (info.value.state.authority?.toBase58() !== wallet.publicKey.toBase58()) {
@@ -201,7 +201,7 @@ export async function cleanUpBuffers(
201
201
  pendingPromises.push(closeAlt(lookupTable, Number(info.value.state.deactivationSlot)))
202
202
  } else if (
203
203
  info.value.state.addresses.length >= 18 &&
204
- info.value.state.addresses[6].equals(wallet.publicKey)
204
+ info.value.state.addresses[6]!.equals(wallet.publicKey)
205
205
  ) {
206
206
  // the conditions above match for ALTs created for ccip manualExec
207
207
  const deactivateIx = AddressLookupTableProgram.deactivateLookupTable({
@@ -105,18 +105,18 @@ export async function generateUnsignedExecuteReport(
105
105
  const execIx = await program.methods
106
106
  .manuallyExecute(serializedReport, tokenIndexes)
107
107
  .accounts({
108
- config: accounts[0].pubkey,
109
- referenceAddresses: accounts[1].pubkey,
110
- sourceChain: accounts[2].pubkey,
111
- commitReport: accounts[3].pubkey,
112
- offramp: accounts[4].pubkey,
113
- allowedOfframp: accounts[5].pubkey,
114
- authority: accounts[6].pubkey,
115
- systemProgram: accounts[7].pubkey,
116
- sysvarInstructions: accounts[8].pubkey,
117
- rmnRemote: accounts[9].pubkey,
118
- rmnRemoteCurses: accounts[10].pubkey,
119
- rmnRemoteConfig: accounts[11].pubkey,
108
+ config: accounts[0]!.pubkey,
109
+ referenceAddresses: accounts[1]!.pubkey,
110
+ sourceChain: accounts[2]!.pubkey,
111
+ commitReport: accounts[3]!.pubkey,
112
+ offramp: accounts[4]!.pubkey,
113
+ allowedOfframp: accounts[5]!.pubkey,
114
+ authority: accounts[6]!.pubkey,
115
+ systemProgram: accounts[7]!.pubkey,
116
+ sysvarInstructions: accounts[8]!.pubkey,
117
+ rmnRemote: accounts[9]!.pubkey,
118
+ rmnRemoteCurses: accounts[10]!.pubkey,
119
+ rmnRemoteConfig: accounts[11]!.pubkey,
120
120
  })
121
121
  .remainingAccounts(accounts.slice(12))
122
122
  .instruction()
@@ -414,7 +414,7 @@ async function autoDeriveExecutionAccounts({
414
414
 
415
415
  const [configPDA] = PublicKey.findProgramAddressSync([Buffer.from('config')], offramp.programId)
416
416
 
417
- while (true) {
417
+ while (stage) {
418
418
  const params: IdlTypes<typeof CCIP_OFFRAMP_IDL>['DeriveAccountsExecuteParams'] = {
419
419
  executeCaller: payer,
420
420
  messageAccounts: messagingAccounts,
@@ -481,11 +481,6 @@ async function autoDeriveExecutionAccounts({
481
481
  // Collect lookup tables
482
482
  lookupTables.push(...response.lookUpTablesToSave)
483
483
 
484
- // Check if derivation is complete
485
- if (!response.nextStage || response.nextStage.length === 0) {
486
- break
487
- }
488
-
489
484
  stage = response.nextStage
490
485
  }
491
486