@lifi/sdk 4.1.0 → 4.3.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 (227) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/actions/getChains.d.ts +7 -8
  3. package/dist/cjs/actions/getConnections.d.ts +6 -7
  4. package/dist/cjs/actions/getContractCallsQuote.d.ts +7 -8
  5. package/dist/cjs/actions/getGasRecommendation.d.ts +7 -8
  6. package/dist/cjs/actions/getNameServiceAddress.d.ts +6 -7
  7. package/dist/cjs/actions/getQuote.d.ts +7 -8
  8. package/dist/cjs/actions/getRelayedTransactionStatus.d.ts +7 -8
  9. package/dist/cjs/actions/getRelayerQuote.d.ts +7 -8
  10. package/dist/cjs/actions/getRoutes.d.ts +7 -8
  11. package/dist/cjs/actions/getStatus.d.ts +7 -8
  12. package/dist/cjs/actions/getStepTransaction.d.ts +7 -8
  13. package/dist/cjs/actions/getStepTransaction.js +2 -0
  14. package/dist/cjs/actions/getStepTransaction.js.map +1 -1
  15. package/dist/cjs/actions/getToken.d.ts +8 -9
  16. package/dist/cjs/actions/getTokenBalance.d.ts +8 -9
  17. package/dist/cjs/actions/getTokenBalances.d.ts +8 -9
  18. package/dist/cjs/actions/getTokenBalancesByChain.d.ts +8 -9
  19. package/dist/cjs/actions/getTokenBalancesByChain.js +4 -2
  20. package/dist/cjs/actions/getTokenBalancesByChain.js.map +1 -1
  21. package/dist/cjs/actions/getTokens.d.ts +6 -7
  22. package/dist/cjs/actions/getTools.d.ts +6 -7
  23. package/dist/cjs/actions/getTransactionHistory.d.ts +13 -19
  24. package/dist/cjs/actions/index.d.ts +105 -113
  25. package/dist/cjs/actions/index.js +0 -2
  26. package/dist/cjs/actions/index.js.map +1 -1
  27. package/dist/cjs/actions/patchContractCalls.d.ts +0 -1
  28. package/dist/cjs/actions/relayTransaction.d.ts +7 -8
  29. package/dist/cjs/client/createClient.d.ts +0 -1
  30. package/dist/cjs/client/getClientStorage.d.ts +0 -1
  31. package/dist/cjs/core/BaseStepExecutionTask.d.ts +0 -1
  32. package/dist/cjs/core/BaseStepExecutor.d.ts +0 -1
  33. package/dist/cjs/core/StatusManager.d.ts +40 -51
  34. package/dist/cjs/core/TaskPipeline.d.ts +0 -1
  35. package/dist/cjs/core/actionMessages.d.ts +0 -1
  36. package/dist/cjs/core/execution.d.ts +29 -30
  37. package/dist/cjs/core/execution.js.map +1 -1
  38. package/dist/cjs/core/executionState.d.ts +0 -1
  39. package/dist/cjs/core/prepareRestart.d.ts +0 -1
  40. package/dist/cjs/core/tasks/CheckBalanceTask.d.ts +6 -7
  41. package/dist/cjs/core/tasks/PrepareTransactionTask.d.ts +0 -1
  42. package/dist/cjs/core/tasks/WaitForTransactionStatusTask.d.ts +0 -1
  43. package/dist/cjs/core/tasks/helpers/checkBalance.d.ts +17 -18
  44. package/dist/cjs/core/tasks/helpers/getTransactionRequestData.d.ts +0 -1
  45. package/dist/cjs/core/tasks/helpers/stepComparison.d.ts +11 -12
  46. package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.d.ts +0 -1
  47. package/dist/cjs/core/utils.d.ts +7 -8
  48. package/dist/cjs/errors/SDKError.d.ts +0 -1
  49. package/dist/cjs/errors/baseError.d.ts +0 -1
  50. package/dist/cjs/errors/errors.d.ts +4 -5
  51. package/dist/cjs/errors/httpError.d.ts +0 -1
  52. package/dist/cjs/errors/utils/baseErrorRootCause.d.ts +0 -1
  53. package/dist/cjs/index.d.ts +1 -2
  54. package/dist/cjs/index.js +0 -2
  55. package/dist/cjs/types/actions.d.ts +7 -7
  56. package/dist/cjs/types/core.d.ts +3 -4
  57. package/dist/cjs/types/execution.d.ts +0 -1
  58. package/dist/cjs/utils/checkPackageUpdates.js +1 -1
  59. package/dist/cjs/utils/convertQuoteToRoute.d.ts +9 -10
  60. package/dist/cjs/utils/formatUnits.d.ts +2 -2
  61. package/dist/cjs/utils/getTransactionMessage.d.ts +0 -1
  62. package/dist/cjs/utils/isHex.d.ts +1 -3
  63. package/dist/cjs/utils/isRoutesRequest.d.ts +0 -1
  64. package/dist/cjs/utils/isStep.d.ts +0 -1
  65. package/dist/cjs/utils/isToken.d.ts +0 -1
  66. package/dist/cjs/utils/parseUnits.d.ts +2 -2
  67. package/dist/cjs/utils/request.d.ts +0 -1
  68. package/dist/cjs/utils/waitForResult.d.ts +8 -8
  69. package/dist/cjs/utils/withDedupe.d.ts +5 -8
  70. package/dist/cjs/utils/withTimeout.d.ts +10 -16
  71. package/dist/cjs/version.d.ts +1 -1
  72. package/dist/cjs/version.js +1 -1
  73. package/dist/cjs/version.js.map +1 -1
  74. package/dist/esm/actions/getChains.d.ts +7 -8
  75. package/dist/esm/actions/getChains.d.ts.map +1 -1
  76. package/dist/esm/actions/getConnections.d.ts +6 -7
  77. package/dist/esm/actions/getConnections.d.ts.map +1 -1
  78. package/dist/esm/actions/getContractCallsQuote.d.ts +7 -8
  79. package/dist/esm/actions/getContractCallsQuote.d.ts.map +1 -1
  80. package/dist/esm/actions/getGasRecommendation.d.ts +7 -8
  81. package/dist/esm/actions/getGasRecommendation.d.ts.map +1 -1
  82. package/dist/esm/actions/getNameServiceAddress.d.ts +6 -7
  83. package/dist/esm/actions/getNameServiceAddress.d.ts.map +1 -1
  84. package/dist/esm/actions/getQuote.d.ts +7 -8
  85. package/dist/esm/actions/getQuote.d.ts.map +1 -1
  86. package/dist/esm/actions/getRelayedTransactionStatus.d.ts +7 -8
  87. package/dist/esm/actions/getRelayedTransactionStatus.d.ts.map +1 -1
  88. package/dist/esm/actions/getRelayerQuote.d.ts +7 -8
  89. package/dist/esm/actions/getRelayerQuote.d.ts.map +1 -1
  90. package/dist/esm/actions/getRoutes.d.ts +7 -8
  91. package/dist/esm/actions/getRoutes.d.ts.map +1 -1
  92. package/dist/esm/actions/getStatus.d.ts +7 -8
  93. package/dist/esm/actions/getStatus.d.ts.map +1 -1
  94. package/dist/esm/actions/getStepTransaction.d.ts +7 -8
  95. package/dist/esm/actions/getStepTransaction.d.ts.map +1 -1
  96. package/dist/esm/actions/getStepTransaction.js +2 -0
  97. package/dist/esm/actions/getStepTransaction.js.map +1 -1
  98. package/dist/esm/actions/getToken.d.ts +8 -9
  99. package/dist/esm/actions/getToken.d.ts.map +1 -1
  100. package/dist/esm/actions/getTokenBalance.d.ts +8 -9
  101. package/dist/esm/actions/getTokenBalance.d.ts.map +1 -1
  102. package/dist/esm/actions/getTokenBalances.d.ts +8 -9
  103. package/dist/esm/actions/getTokenBalances.d.ts.map +1 -1
  104. package/dist/esm/actions/getTokenBalancesByChain.d.ts +8 -9
  105. package/dist/esm/actions/getTokenBalancesByChain.d.ts.map +1 -1
  106. package/dist/esm/actions/getTokenBalancesByChain.js +4 -2
  107. package/dist/esm/actions/getTokenBalancesByChain.js.map +1 -1
  108. package/dist/esm/actions/getTokens.d.ts +6 -7
  109. package/dist/esm/actions/getTokens.d.ts.map +1 -1
  110. package/dist/esm/actions/getTools.d.ts +6 -7
  111. package/dist/esm/actions/getTools.d.ts.map +1 -1
  112. package/dist/esm/actions/getTransactionHistory.d.ts +13 -19
  113. package/dist/esm/actions/getTransactionHistory.d.ts.map +1 -1
  114. package/dist/esm/actions/index.d.ts +105 -113
  115. package/dist/esm/actions/index.d.ts.map +1 -1
  116. package/dist/esm/actions/index.js +0 -2
  117. package/dist/esm/actions/index.js.map +1 -1
  118. package/dist/esm/actions/patchContractCalls.d.ts +0 -1
  119. package/dist/esm/actions/patchContractCalls.d.ts.map +1 -1
  120. package/dist/esm/actions/relayTransaction.d.ts +7 -8
  121. package/dist/esm/actions/relayTransaction.d.ts.map +1 -1
  122. package/dist/esm/client/createClient.d.ts +0 -1
  123. package/dist/esm/client/createClient.d.ts.map +1 -1
  124. package/dist/esm/client/getClientStorage.d.ts +0 -1
  125. package/dist/esm/client/getClientStorage.d.ts.map +1 -1
  126. package/dist/esm/core/BaseStepExecutionTask.d.ts +0 -1
  127. package/dist/esm/core/BaseStepExecutionTask.d.ts.map +1 -1
  128. package/dist/esm/core/BaseStepExecutor.d.ts +0 -1
  129. package/dist/esm/core/BaseStepExecutor.d.ts.map +1 -1
  130. package/dist/esm/core/StatusManager.d.ts +40 -51
  131. package/dist/esm/core/StatusManager.d.ts.map +1 -1
  132. package/dist/esm/core/TaskPipeline.d.ts +0 -1
  133. package/dist/esm/core/TaskPipeline.d.ts.map +1 -1
  134. package/dist/esm/core/actionMessages.d.ts +0 -1
  135. package/dist/esm/core/actionMessages.d.ts.map +1 -1
  136. package/dist/esm/core/execution.d.ts +29 -30
  137. package/dist/esm/core/execution.d.ts.map +1 -1
  138. package/dist/esm/core/execution.js.map +1 -1
  139. package/dist/esm/core/executionState.d.ts +0 -1
  140. package/dist/esm/core/executionState.d.ts.map +1 -1
  141. package/dist/esm/core/prepareRestart.d.ts +0 -1
  142. package/dist/esm/core/prepareRestart.d.ts.map +1 -1
  143. package/dist/esm/core/storage.d.ts.map +1 -1
  144. package/dist/esm/core/tasks/CheckBalanceTask.d.ts +6 -7
  145. package/dist/esm/core/tasks/CheckBalanceTask.d.ts.map +1 -1
  146. package/dist/esm/core/tasks/PrepareTransactionTask.d.ts +0 -1
  147. package/dist/esm/core/tasks/PrepareTransactionTask.d.ts.map +1 -1
  148. package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts +0 -1
  149. package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts.map +1 -1
  150. package/dist/esm/core/tasks/helpers/checkBalance.d.ts +17 -18
  151. package/dist/esm/core/tasks/helpers/checkBalance.d.ts.map +1 -1
  152. package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts +0 -1
  153. package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts.map +1 -1
  154. package/dist/esm/core/tasks/helpers/stepComparison.d.ts +11 -12
  155. package/dist/esm/core/tasks/helpers/stepComparison.d.ts.map +1 -1
  156. package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts +0 -1
  157. package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts.map +1 -1
  158. package/dist/esm/core/utils.d.ts +7 -8
  159. package/dist/esm/core/utils.d.ts.map +1 -1
  160. package/dist/esm/errors/SDKError.d.ts +0 -1
  161. package/dist/esm/errors/SDKError.d.ts.map +1 -1
  162. package/dist/esm/errors/baseError.d.ts +0 -1
  163. package/dist/esm/errors/baseError.d.ts.map +1 -1
  164. package/dist/esm/errors/constants.d.ts.map +1 -1
  165. package/dist/esm/errors/errors.d.ts +4 -5
  166. package/dist/esm/errors/errors.d.ts.map +1 -1
  167. package/dist/esm/errors/httpError.d.ts +0 -1
  168. package/dist/esm/errors/httpError.d.ts.map +1 -1
  169. package/dist/esm/errors/utils/baseErrorRootCause.d.ts +0 -1
  170. package/dist/esm/errors/utils/baseErrorRootCause.d.ts.map +1 -1
  171. package/dist/esm/errors/utils/rootCause.d.ts.map +1 -1
  172. package/dist/esm/index.d.ts +1 -2
  173. package/dist/esm/index.js +1 -2
  174. package/dist/esm/types/actions.d.ts +7 -7
  175. package/dist/esm/types/actions.d.ts.map +1 -1
  176. package/dist/esm/types/core.d.ts +3 -4
  177. package/dist/esm/types/core.d.ts.map +1 -1
  178. package/dist/esm/types/execution.d.ts +0 -1
  179. package/dist/esm/types/execution.d.ts.map +1 -1
  180. package/dist/esm/types/request.d.ts.map +1 -1
  181. package/dist/esm/utils/checkPackageUpdates.d.ts.map +1 -1
  182. package/dist/esm/utils/checkPackageUpdates.js +1 -1
  183. package/dist/esm/utils/convertQuoteToRoute.d.ts +9 -10
  184. package/dist/esm/utils/convertQuoteToRoute.d.ts.map +1 -1
  185. package/dist/esm/utils/decode.d.ts.map +1 -1
  186. package/dist/esm/utils/fetchTxErrorDetails.d.ts.map +1 -1
  187. package/dist/esm/utils/formatUnits.d.ts +2 -2
  188. package/dist/esm/utils/formatUnits.d.ts.map +1 -1
  189. package/dist/esm/utils/getTransactionMessage.d.ts +0 -1
  190. package/dist/esm/utils/getTransactionMessage.d.ts.map +1 -1
  191. package/dist/esm/utils/isHex.d.ts +1 -3
  192. package/dist/esm/utils/isHex.d.ts.map +1 -1
  193. package/dist/esm/utils/isRoutesRequest.d.ts +0 -1
  194. package/dist/esm/utils/isRoutesRequest.d.ts.map +1 -1
  195. package/dist/esm/utils/isStep.d.ts +0 -1
  196. package/dist/esm/utils/isStep.d.ts.map +1 -1
  197. package/dist/esm/utils/isToken.d.ts +0 -1
  198. package/dist/esm/utils/isToken.d.ts.map +1 -1
  199. package/dist/esm/utils/parseUnits.d.ts +2 -2
  200. package/dist/esm/utils/parseUnits.d.ts.map +1 -1
  201. package/dist/esm/utils/request.d.ts +0 -1
  202. package/dist/esm/utils/request.d.ts.map +1 -1
  203. package/dist/esm/utils/sleep.d.ts.map +1 -1
  204. package/dist/esm/utils/toQueryString.d.ts.map +1 -1
  205. package/dist/esm/utils/waitForResult.d.ts +8 -8
  206. package/dist/esm/utils/waitForResult.d.ts.map +1 -1
  207. package/dist/esm/utils/withDedupe.d.ts +5 -8
  208. package/dist/esm/utils/withDedupe.d.ts.map +1 -1
  209. package/dist/esm/utils/withTimeout.d.ts +10 -16
  210. package/dist/esm/utils/withTimeout.d.ts.map +1 -1
  211. package/dist/esm/version.d.ts +1 -1
  212. package/dist/esm/version.d.ts.map +1 -1
  213. package/dist/esm/version.js +1 -1
  214. package/dist/esm/version.js.map +1 -1
  215. package/package.json +2 -2
  216. package/src/actions/getStepTransaction.ts +4 -0
  217. package/src/actions/index.ts +0 -15
  218. package/src/index.ts +0 -1
  219. package/src/version.ts +1 -1
  220. package/dist/cjs/actions/getWalletBalances.d.ts +0 -16
  221. package/dist/cjs/actions/getWalletBalances.js +0 -20
  222. package/dist/cjs/actions/getWalletBalances.js.map +0 -1
  223. package/dist/esm/actions/getWalletBalances.d.ts +0 -16
  224. package/dist/esm/actions/getWalletBalances.d.ts.map +0 -1
  225. package/dist/esm/actions/getWalletBalances.js +0 -19
  226. package/dist/esm/actions/getWalletBalances.js.map +0 -1
  227. package/src/actions/getWalletBalances.ts +0 -36
@@ -1,6 +1,5 @@
1
1
  import { Execution, ExecutionAction, ExecutionActionStatus, ExecutionActionType, LiFiStepExtended } from "../types/core.js";
2
2
  import { ChainId, LiFiStep } from "@lifi/types";
3
-
4
3
  //#region src/core/StatusManager.d.ts
5
4
  type ActionProps = {
6
5
  step: LiFiStepExtended;
@@ -9,69 +8,59 @@ type ActionProps = {
9
8
  status: ExecutionActionStatus;
10
9
  };
11
10
  /**
12
- * Manages status updates of a route and provides various functions for tracking actions.
13
- */
11
+ * Manages status updates of a route and provides various functions for tracking actions.
12
+ */
14
13
  declare class StatusManager {
15
14
  private readonly routeId;
16
15
  private shouldUpdate;
17
16
  constructor(routeId: string);
18
17
  /**
19
- * Initializes the execution object of a Step.
20
- * @param step The current step in execution
21
- * @returns The initialized execution object for this step
22
- */
18
+ * Initializes the execution object of a Step.
19
+ * @param step The current step in execution
20
+ * @returns The initialized execution object for this step
21
+ */
23
22
  initializeExecution: (step: LiFiStepExtended) => Execution;
24
23
  /**
25
- * Updates the execution object of a Step.
26
- * @param step The current step in execution
27
- * @param execution Partial execution data to merge
28
- * @returns The step with the updated execution object
29
- */
24
+ * Updates the execution object of a Step.
25
+ * @param step The current step in execution
26
+ * @param execution Partial execution data to merge
27
+ * @returns The step with the updated execution object
28
+ */
30
29
  updateExecution(step: LiFiStepExtended, execution: Partial<Execution>): LiFiStep;
31
30
  /**
32
- * Finds an action of the specified type in the step's execution
33
- * @param step The step to search in
34
- * @param type The action type to find
35
- * @returns The found action or undefined if not found
36
- */
31
+ * Finds an action of the specified type in the step's execution
32
+ * @param step The step to search in
33
+ * @param type The action type to find
34
+ * @returns The found action or undefined if not found
35
+ */
37
36
  findAction(step: LiFiStepExtended, type: ExecutionActionType): ExecutionAction | undefined;
38
37
  /**
39
- * Create and push a new action into the execution.
40
- * Caller is responsible for ensuring an action of this type does not already exist.
41
- * @param step The step that should contain the new action.
42
- * @param type Type of the action.
43
- * @param chainId Chain Id of the action.
44
- * @param status The initial status for the new action.
45
- * @returns The created action.
46
- */
47
- createAction: ({
48
- step,
49
- type,
50
- chainId,
51
- status
52
- }: ActionProps) => ExecutionAction;
38
+ * Create and push a new action into the execution.
39
+ * Caller is responsible for ensuring an action of this type does not already exist.
40
+ * @param step The step that should contain the new action.
41
+ * @param type Type of the action.
42
+ * @param chainId Chain Id of the action.
43
+ * @param status The initial status for the new action.
44
+ * @returns The created action.
45
+ */
46
+ createAction: ({ step, type, chainId, status }: ActionProps) => ExecutionAction;
53
47
  /**
54
- * Find an existing action by type and update it, or create a new one if none exists.
55
- * @param step The step that should contain the action.
56
- * @param type Type of the action. Used to identify already existing actions.
57
- * @param chainId Chain Id of the action (used when creating).
58
- * @param status The status to set on the found or newly created action.
59
- * @returns The updated or newly created action.
60
- */
61
- initializeAction: ({
62
- step,
63
- type,
64
- chainId,
65
- status
66
- }: ActionProps) => ExecutionAction;
48
+ * Find an existing action by type and update it, or create a new one if none exists.
49
+ * @param step The step that should contain the action.
50
+ * @param type Type of the action. Used to identify already existing actions.
51
+ * @param chainId Chain Id of the action (used when creating).
52
+ * @param status The status to set on the found or newly created action.
53
+ * @returns The updated or newly created action.
54
+ */
55
+ initializeAction: ({ step, type, chainId, status }: ActionProps) => ExecutionAction;
67
56
  /**
68
- * Update an action object.
69
- * @param step The step where the action should be updated
70
- * @param type The action type to update
71
- * @param status The status the action gets.
72
- * @param [params] Additional parameters to append to the action.
73
- * @returns The updated action
74
- */
57
+ * Update an action object.
58
+ * @param step The step where the action should be updated
59
+ * @param type The action type to update
60
+ * @param status The status the action gets.
61
+ * @param [params] Additional parameters to append to the action.
62
+ * @returns The updated action
63
+ */
75
64
  updateAction: (step: LiFiStepExtended, type: ExecutionActionType, status: ExecutionActionStatus, params?: Partial<ExecutionAction & {
76
65
  signedAt?: number;
77
66
  }>) => ExecutionAction;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusManager.d.ts","names":[],"sources":["../../../src/core/StatusManager.ts"],"mappings":";;;;KAWK,WAAA;EACH,IAAA,EAAM,gBAAA;EACN,IAAA,EAAM,mBAAA;EACN,OAAA,EAAS,OAAA;EACT,MAAA,EAAQ,qBAAA;AAAA;;;;cAMG,aAAA;EAAA,iBACM,OAAA;EAAA,QACT,YAAA;EAER,WAAA,CAAY,OAAA;;;;;;EASZ,mBAAA,GAAuB,IAAA,EAAM,gBAAA,KAAmB,SAAA;EAnBxC;AAAA;AAMV;;;;EAyCE,eAAA,CACE,IAAA,EAAM,gBAAA,EACN,SAAA,EAAW,OAAA,CAAQ,SAAA,IAClB,QAAA;;;;;;;EAkBH,UAAA,CACE,IAAA,EAAM,gBAAA,EACN,IAAA,EAAM,mBAAA,GACL,eAAA;;;;;;;;;;EAmBH,YAAA;IACE,IAAA;IACA,IAAA;IACA,OAAA;IACA;EAAA,GACC,WAAA,KAAc,eAAA;;;;;;;;;EAyBjB,gBAAA;IACE,IAAA;IACA,IAAA;IACA,OAAA;IACA;EAAA,GACC,WAAA,KAAc,eAAA;;;;;;;;;EAoBjB,YAAA,GACE,IAAA,EAAM,gBAAA,EACN,IAAA,EAAM,mBAAA,EACN,MAAA,EAAQ,qBAAA,EACR,MAAA,GAAS,OAAA,CAAQ,eAAA;IAAoB,QAAA;EAAA,OACpC,eAAA;EAoDH,iBAAA,GAAqB,IAAA,EAAM,QAAA,KAAW,QAAA;EAwBtC,YAAA,CAAa,KAAA;AAAA"}
1
+ {"version":3,"file":"StatusManager.d.ts","names":[],"sources":["../../../src/core/StatusManager.ts"],"mappings":";;;KAWK;EACH,MAAM;EACN,MAAM;EACN,SAAS;EACT,QAAQ;;;;;cAMG;mBACM;UACT;EAER,YAAY;;;;;;EASZ,sBAAuB,MAAM,qBAAmB;;;;;;;EA4BhD,gBACE,MAAM,kBACN,WAAW,QAAQ,aAClB;;;;;;;EAkBH,WACE,MAAM,kBACN,MAAM,sBACL;;;;;;;;;;EAmBH,iBACE,MACA,MACA,SACA,UACC,gBAAc;;;;;;;;;EAyBjB,qBACE,MACA,MACA,SACA,UACC,gBAAc;;;;;;;;;EAoBjB,eACE,MAAM,kBACN,MAAM,qBACN,QAAQ,uBACR,SAAS,QAAQ;IAAoB;SACpC;EAoDH,oBAAqB,MAAM,aAAW;EAwBtC,aAAa"}
@@ -1,6 +1,5 @@
1
1
  import { StepExecutorContext, TaskResult } from "../types/execution.js";
2
2
  import { BaseStepExecutionTask } from "./BaseStepExecutionTask.js";
3
-
4
3
  //#region src/core/TaskPipeline.d.ts
5
4
  declare class TaskPipeline {
6
5
  private readonly tasks;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskPipeline.d.ts","names":[],"sources":["../../../src/core/TaskPipeline.ts"],"mappings":";;;;cAGa,YAAA;EAAA,iBACM,KAAA;EAEjB,WAAA,CAAY,KAAA,EAAO,qBAAA;EAInB,GAAA,CAAU,OAAA,EAAS,mBAAA,GAAsB,OAAA,CAAQ,UAAA;AAAA"}
1
+ {"version":3,"file":"TaskPipeline.d.ts","names":[],"sources":["../../../src/core/TaskPipeline.ts"],"mappings":";;;cAGa;mBACM;EAEjB,YAAY,OAAO;EAInB,IAAU,SAAS,sBAAsB,QAAQ"}
@@ -1,6 +1,5 @@
1
1
  import { ExecutionActionStatus, ExecutionActionType } from "../types/core.js";
2
2
  import { StatusMessage, Substatus } from "@lifi/types";
3
-
4
3
  //#region src/core/actionMessages.d.ts
5
4
  declare function getActionMessage(type: ExecutionActionType, status: ExecutionActionStatus): string | undefined;
6
5
  declare function getSubstatusMessage(status: StatusMessage, substatus?: Substatus): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"actionMessages.d.ts","names":[],"sources":["../../../src/core/actionMessages.ts"],"mappings":";;;;iBAqFgB,gBAAA,CACd,IAAA,EAAM,mBAAA,EACN,MAAA,EAAQ,qBAAA;AAAA,iBAMM,mBAAA,CACd,MAAA,EAAQ,aAAA,EACR,SAAA,GAAY,SAAA"}
1
+ {"version":3,"file":"actionMessages.d.ts","names":[],"sources":["../../../src/core/actionMessages.ts"],"mappings":";;;iBAqFgB,iBACd,MAAM,qBACN,QAAQ;iBAMM,oBACd,QAAQ,eACR,YAAY"}
@@ -1,47 +1,46 @@
1
1
  import { ExecutionOptions, RouteExtended, SDKClient } from "../types/core.js";
2
2
  import { Route } from "@lifi/types";
3
-
4
3
  //#region src/core/execution.d.ts
5
4
  /**
6
- * Execute a route.
7
- * @param client - The SDK client.
8
- * @param route - The route that should be executed. Cannot be an active route.
9
- * @param executionOptions - An object containing settings and callbacks.
10
- * @returns The executed route.
11
- * @throws {LiFiError} Throws a LiFiError if the execution fails.
12
- */
5
+ * Execute a route.
6
+ * @param client - The SDK client.
7
+ * @param route - The route that should be executed. Cannot be an active route.
8
+ * @param executionOptions - An object containing settings and callbacks.
9
+ * @returns The executed route.
10
+ * @throws {LiFiError} Throws a LiFiError if the execution fails.
11
+ */
13
12
  declare const executeRoute: (client: SDKClient, route: Route, executionOptions?: ExecutionOptions) => Promise<RouteExtended>;
14
13
  /**
15
- * Resume the execution of a route that has been stopped or had an error while executing.
16
- * @param client - The SDK client.
17
- * @param route - The route that is to be executed. Cannot be an active route.
18
- * @param executionOptions - An object containing settings and callbacks.
19
- * @returns The executed route.
20
- * @throws {LiFiError} Throws a LiFiError if the execution fails.
21
- */
14
+ * Resume the execution of a route that has been stopped or had an error while executing.
15
+ * @param client - The SDK client.
16
+ * @param route - The route that is to be executed. Cannot be an active route.
17
+ * @param executionOptions - An object containing settings and callbacks.
18
+ * @returns The executed route.
19
+ * @throws {LiFiError} Throws a LiFiError if the execution fails.
20
+ */
22
21
  declare const resumeRoute: (client: SDKClient, route: Route, executionOptions?: ExecutionOptions) => Promise<RouteExtended>;
23
22
  /**
24
- * Updates route execution to background or foreground state.
25
- * @param route - A route that is currently in execution.
26
- * @param options - An object with execution settings.
27
- */
23
+ * Updates route execution to background or foreground state.
24
+ * @param route - A route that is currently in execution.
25
+ * @param options - An object with execution settings.
26
+ */
28
27
  declare const updateRouteExecution: (route: Route, options: ExecutionOptions) => void;
29
28
  /**
30
- * Stops the execution of an active route.
31
- * @param route - A route that is currently in execution.
32
- * @returns The stopped route.
33
- */
29
+ * Stops the execution of an active route.
30
+ * @param route - A route that is currently in execution.
31
+ * @returns The stopped route.
32
+ */
34
33
  declare const stopRouteExecution: (route: Route) => Route;
35
34
  /**
36
- * Get the list of active routes.
37
- * @returns A list of routes.
38
- */
35
+ * Get the list of active routes.
36
+ * @returns A list of routes.
37
+ */
39
38
  declare const getActiveRoutes: () => RouteExtended[];
40
39
  /**
41
- * Return the current route information for given route. The route has to be active.
42
- * @param routeId - A route id.
43
- * @returns The updated route.
44
- */
40
+ * Return the current route information for given route. The route has to be active.
41
+ * @param routeId - A route id.
42
+ * @returns The updated route.
43
+ */
45
44
  declare const getActiveRoute: (routeId: string) => RouteExtended | undefined;
46
45
  //#endregion
47
46
  export { executeRoute, getActiveRoute, getActiveRoutes, resumeRoute, stopRouteExecution, updateRouteExecution };
@@ -1 +1 @@
1
- {"version":3,"file":"execution.d.ts","names":[],"sources":["../../../src/core/execution.ts"],"mappings":";;;;;;AAqBA;;;;;;cAAa,YAAA,GACX,MAAA,EAAQ,SAAA,EACR,KAAA,EAAO,KAAA,EACP,gBAAA,GAAmB,gBAAA,KAClB,OAAA,CAAQ,aAAA;;;;;;;;;cA4BE,WAAA,GACX,MAAA,EAAQ,SAAA,EACR,KAAA,EAAO,KAAA,EACP,gBAAA,GAAmB,gBAAA,KAClB,OAAA,CAAQ,aAAA;;;;AAhCA;AA4BX;cA8Ha,oBAAA,GACX,KAAA,EAAO,KAAA,EACP,OAAA,EAAS,gBAAA;;;;;;cA2BE,kBAAA,GAAsB,KAAA,EAAO,KAAA,KAAQ,KAAA;;;;;cAqBrC,eAAA,QAAsB,aAAA;;;;;;cAWtB,cAAA,GAAkB,OAAA,aAAkB,aAAA"}
1
+ {"version":3,"file":"execution.d.ts","names":[],"sources":["../../../src/core/execution.ts"],"mappings":";;;;;;;;;;;cAqBa,eACX,QAAQ,WACR,OAAO,OACP,mBAAmB,qBAClB,QAAQ;;;;;;;;;cA4BE,cACX,QAAQ,WACR,OAAO,OACP,mBAAmB,qBAClB,QAAQ;;;;;;cA0HE,uBACX,OAAO,OACP,SAAS;;;;;;cA2BE,qBAAsB,OAAO,UAAQ;;;;;cAqBrC,uBAAsB;;;;;;cAWtB,iBAAkB,oBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"execution.js","names":[],"sources":["../../../src/core/execution.ts"],"sourcesContent":["import type { Route } from '@lifi/types'\nimport { LiFiErrorCode } from '../errors/constants.js'\nimport { ExecuteStepRetryError, ProviderError } from '../errors/errors.js'\nimport type {\n ExecutionOptions,\n LiFiStepExtended,\n RouteExtended,\n SDKClient,\n SDKProvider,\n} from '../types/core.js'\nimport { executionState } from './executionState.js'\nimport { prepareRestart } from './prepareRestart.js'\n\n/**\n * Execute a route.\n * @param client - The SDK client.\n * @param route - The route that should be executed. Cannot be an active route.\n * @param executionOptions - An object containing settings and callbacks.\n * @returns The executed route.\n * @throws {LiFiError} Throws a LiFiError if the execution fails.\n */\nexport const executeRoute = async (\n client: SDKClient,\n route: Route,\n executionOptions?: ExecutionOptions\n): Promise<RouteExtended> => {\n // Deep clone to prevent side effects\n const clonedRoute = structuredClone<Route>(route)\n\n let executionPromise = executionState.get(clonedRoute.id)?.promise\n // Check if route is already running\n if (executionPromise) {\n return executionPromise\n }\n\n executionState.create({ route: clonedRoute, executionOptions })\n executionPromise = executeSteps(client, clonedRoute)\n executionState.update({\n route: clonedRoute,\n promise: executionPromise,\n })\n\n return executionPromise\n}\n\n/**\n * Resume the execution of a route that has been stopped or had an error while executing.\n * @param client - The SDK client.\n * @param route - The route that is to be executed. Cannot be an active route.\n * @param executionOptions - An object containing settings and callbacks.\n * @returns The executed route.\n * @throws {LiFiError} Throws a LiFiError if the execution fails.\n */\nexport const resumeRoute = async (\n client: SDKClient,\n route: Route,\n executionOptions?: ExecutionOptions\n): Promise<RouteExtended> => {\n const execution = executionState.get(route.id)\n\n if (execution) {\n const executionHalted = execution.executors.some(\n (executor) => !executor.allowExecution\n )\n if (!executionHalted) {\n // Check if we want to resume route execution in the background\n updateRouteExecution(route, {\n executeInBackground: executionOptions?.executeInBackground,\n })\n if (!execution.promise) {\n // We should never reach this point if we do clean-up properly\n throw new Error('Route execution promise not found.')\n }\n return execution.promise\n }\n }\n\n prepareRestart(route)\n\n return executeRoute(client, route, executionOptions)\n}\n\nconst executeSteps = async (\n client: SDKClient,\n route: RouteExtended\n): Promise<RouteExtended> => {\n // Loop over steps and execute them\n for (let index = 0; index < route.steps.length; index++) {\n const execution = executionState.get(route.id)\n // Check if execution has stopped in the meantime\n if (!execution) {\n break\n }\n\n const step = route.steps[index]\n const previousStep = route.steps[index - 1]\n // Check if the step is already done\n if (step.execution?.status === 'DONE') {\n continue\n }\n\n // Update step fromAmount using output of the previous step execution. In the future this should be handled by calling `updateRoute`\n if (previousStep?.execution?.toAmount) {\n step.action.fromAmount = previousStep.execution.toAmount\n if (step.includedSteps?.length) {\n step.includedSteps[0].action.fromAmount =\n previousStep.execution.toAmount\n }\n }\n\n try {\n const fromAddress = step.action.fromAddress\n if (!fromAddress) {\n throw new Error('Action fromAddress is not specified.')\n }\n\n const provider = client.providers.find((provider: SDKProvider) =>\n provider.isAddress(fromAddress)\n )\n\n if (!provider) {\n throw new ProviderError(\n LiFiErrorCode.ProviderUnavailable,\n 'SDK Execution Provider not found.'\n )\n }\n\n const stepExecutor = await provider.getStepExecutor({\n routeId: route.id,\n executionOptions: execution.executionOptions,\n })\n execution.executors.push(stepExecutor)\n\n // Check if we want to execute this step in the background\n if (execution.executionOptions) {\n updateRouteExecution(route, execution.executionOptions)\n }\n\n let executedStep: LiFiStepExtended\n try {\n executedStep = await stepExecutor.executeStep(client, step)\n } catch (e) {\n if (e instanceof ExecuteStepRetryError) {\n step.execution = undefined\n executedStep = await stepExecutor.executeStep(\n client,\n step,\n e.retryParams\n )\n } else {\n throw e\n }\n }\n\n // We may reach this point if user interaction isn't allowed. We want to stop execution until we resume it\n if (executedStep.execution?.status !== 'DONE') {\n stopRouteExecution(route)\n }\n\n // Execution stopped during the current step, we don't want to continue to the next step so we return already\n if (!stepExecutor.allowExecution) {\n return route\n }\n } catch (e) {\n stopRouteExecution(route)\n throw e\n }\n }\n\n // Clean up after the execution\n executionState.delete(route.id)\n return route\n}\n\n/**\n * Updates route execution to background or foreground state.\n * @param route - A route that is currently in execution.\n * @param options - An object with execution settings.\n */\nexport const updateRouteExecution = (\n route: Route,\n options: ExecutionOptions\n): void => {\n const execution = executionState.get(route.id)\n if (!execution) {\n return\n }\n\n if ('executeInBackground' in options) {\n for (const executor of execution.executors) {\n executor.setInteraction({\n allowInteraction: !options?.executeInBackground,\n allowUpdates: true,\n })\n }\n }\n // Update active route settings so we know what the current state of execution is\n execution.executionOptions = {\n ...execution.executionOptions,\n ...options,\n }\n}\n\n/**\n * Stops the execution of an active route.\n * @param route - A route that is currently in execution.\n * @returns The stopped route.\n */\nexport const stopRouteExecution = (route: Route): Route => {\n const execution = executionState.get(route.id)\n if (!execution) {\n return route\n }\n\n for (const executor of execution.executors) {\n executor.setInteraction({\n allowInteraction: false,\n allowUpdates: false,\n allowExecution: false,\n })\n }\n executionState.delete(route.id)\n return execution.route\n}\n\n/**\n * Get the list of active routes.\n * @returns A list of routes.\n */\nexport const getActiveRoutes = (): RouteExtended[] => {\n return Object.values(executionState.state)\n .map((dict) => dict?.route)\n .filter(Boolean) as RouteExtended[]\n}\n\n/**\n * Return the current route information for given route. The route has to be active.\n * @param routeId - A route id.\n * @returns The updated route.\n */\nexport const getActiveRoute = (routeId: string): RouteExtended | undefined => {\n return executionState.get(routeId)?.route\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"execution.js","names":[],"sources":["../../../src/core/execution.ts"],"sourcesContent":["import type { Route } from '@lifi/types'\nimport { LiFiErrorCode } from '../errors/constants.js'\nimport { ExecuteStepRetryError, ProviderError } from '../errors/errors.js'\nimport type {\n ExecutionOptions,\n LiFiStepExtended,\n RouteExtended,\n SDKClient,\n SDKProvider,\n} from '../types/core.js'\nimport { executionState } from './executionState.js'\nimport { prepareRestart } from './prepareRestart.js'\n\n/**\n * Execute a route.\n * @param client - The SDK client.\n * @param route - The route that should be executed. Cannot be an active route.\n * @param executionOptions - An object containing settings and callbacks.\n * @returns The executed route.\n * @throws {LiFiError} Throws a LiFiError if the execution fails.\n */\nexport const executeRoute = async (\n client: SDKClient,\n route: Route,\n executionOptions?: ExecutionOptions\n): Promise<RouteExtended> => {\n // Deep clone to prevent side effects\n const clonedRoute = structuredClone<Route>(route)\n\n let executionPromise = executionState.get(clonedRoute.id)?.promise\n // Check if route is already running\n if (executionPromise) {\n return executionPromise\n }\n\n executionState.create({ route: clonedRoute, executionOptions })\n executionPromise = executeSteps(client, clonedRoute)\n executionState.update({\n route: clonedRoute,\n promise: executionPromise,\n })\n\n return executionPromise\n}\n\n/**\n * Resume the execution of a route that has been stopped or had an error while executing.\n * @param client - The SDK client.\n * @param route - The route that is to be executed. Cannot be an active route.\n * @param executionOptions - An object containing settings and callbacks.\n * @returns The executed route.\n * @throws {LiFiError} Throws a LiFiError if the execution fails.\n */\nexport const resumeRoute = async (\n client: SDKClient,\n route: Route,\n executionOptions?: ExecutionOptions\n): Promise<RouteExtended> => {\n const execution = executionState.get(route.id)\n\n if (execution) {\n const executionHalted = execution.executors.some(\n (executor) => !executor.allowExecution\n )\n if (!executionHalted) {\n // Check if we want to resume route execution in the background\n updateRouteExecution(route, {\n executeInBackground: executionOptions?.executeInBackground,\n })\n if (!execution.promise) {\n // We should never reach this point if we do clean-up properly\n throw new Error('Route execution promise not found.')\n }\n return execution.promise\n }\n }\n\n prepareRestart(route)\n\n return executeRoute(client, route, executionOptions)\n}\n\nconst executeSteps = async (\n client: SDKClient,\n route: RouteExtended\n): Promise<RouteExtended> => {\n // Loop over steps and execute them\n for (let index = 0; index < route.steps.length; index++) {\n const execution = executionState.get(route.id)\n // Check if execution has stopped in the meantime\n if (!execution) {\n break\n }\n\n const step = route.steps[index]\n const previousStep = route.steps[index - 1]\n // Check if the step is already done\n if (step.execution?.status === 'DONE') {\n continue\n }\n\n // Update step fromAmount using output of the previous step execution. In the future this should be handled by calling `updateRoute`\n if (previousStep?.execution?.toAmount) {\n step.action.fromAmount = previousStep.execution.toAmount\n if (step.includedSteps?.length) {\n step.includedSteps[0].action.fromAmount =\n previousStep.execution.toAmount\n }\n }\n\n try {\n const fromAddress = step.action.fromAddress\n if (!fromAddress) {\n throw new Error('Action fromAddress is not specified.')\n }\n\n const provider = client.providers.find((provider: SDKProvider) =>\n provider.isAddress(fromAddress)\n )\n\n if (!provider) {\n throw new ProviderError(\n LiFiErrorCode.ProviderUnavailable,\n 'SDK Execution Provider not found.'\n )\n }\n\n const stepExecutor = await provider.getStepExecutor({\n routeId: route.id,\n executionOptions: execution.executionOptions,\n })\n execution.executors.push(stepExecutor)\n\n // Check if we want to execute this step in the background\n if (execution.executionOptions) {\n updateRouteExecution(route, execution.executionOptions)\n }\n\n let executedStep: LiFiStepExtended\n try {\n executedStep = await stepExecutor.executeStep(client, step)\n } catch (e) {\n if (e instanceof ExecuteStepRetryError) {\n step.execution = undefined\n executedStep = await stepExecutor.executeStep(\n client,\n step,\n e.retryParams\n )\n } else {\n throw e\n }\n }\n\n // We may reach this point if user interaction isn't allowed. We want to stop execution until we resume it\n if (executedStep.execution?.status !== 'DONE') {\n stopRouteExecution(route)\n }\n\n // Execution stopped during the current step, we don't want to continue to the next step so we return already\n if (!stepExecutor.allowExecution) {\n return route\n }\n } catch (e) {\n stopRouteExecution(route)\n throw e\n }\n }\n\n // Clean up after the execution\n executionState.delete(route.id)\n return route\n}\n\n/**\n * Updates route execution to background or foreground state.\n * @param route - A route that is currently in execution.\n * @param options - An object with execution settings.\n */\nexport const updateRouteExecution = (\n route: Route,\n options: ExecutionOptions\n): void => {\n const execution = executionState.get(route.id)\n if (!execution) {\n return\n }\n\n if ('executeInBackground' in options) {\n for (const executor of execution.executors) {\n executor.setInteraction({\n allowInteraction: !options?.executeInBackground,\n allowUpdates: true,\n })\n }\n }\n // Update active route settings so we know what the current state of execution is\n execution.executionOptions = {\n ...execution.executionOptions,\n ...options,\n }\n}\n\n/**\n * Stops the execution of an active route.\n * @param route - A route that is currently in execution.\n * @returns The stopped route.\n */\nexport const stopRouteExecution = (route: Route): Route => {\n const execution = executionState.get(route.id)\n if (!execution) {\n return route\n }\n\n for (const executor of execution.executors) {\n executor.setInteraction({\n allowInteraction: false,\n allowUpdates: false,\n allowExecution: false,\n })\n }\n executionState.delete(route.id)\n return execution.route\n}\n\n/**\n * Get the list of active routes.\n * @returns A list of routes.\n */\nexport const getActiveRoutes = (): RouteExtended[] => {\n return Object.values(executionState.state)\n .map((dict) => dict?.route)\n .filter(Boolean) as RouteExtended[]\n}\n\n/**\n * Return the current route information for given route. The route has to be active.\n * @param routeId - A route id.\n * @returns The updated route.\n */\nexport const getActiveRoute = (routeId: string): RouteExtended | undefined => {\n return executionState.get(routeId)?.route\n}\n"],"mappings":"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"}
@@ -1,5 +1,4 @@
1
1
  import { ExecutionOptions, RouteExtended, StepExecutor } from "../types/core.js";
2
-
3
2
  //#region src/core/executionState.d.ts
4
3
  interface ExecutionData {
5
4
  route: RouteExtended;
@@ -1 +1 @@
1
- {"version":3,"file":"executionState.d.ts","names":[],"sources":["../../../src/core/executionState.ts"],"mappings":";;;UAMU,aAAA;EACR,KAAA,EAAO,aAAA;EACP,SAAA,EAAW,YAAA;EACX,gBAAA,GAAmB,gBAAA;EACnB,OAAA,GAAU,OAAA,CAAQ,aAAA;AAAA;AAAA,KAGf,oBAAA,GAAuB,IAAA,CAAK,aAAA;AAAA,UAEvB,cAAA;EACR,KAAA,EAAO,OAAA,CAAQ,MAAA,SAAe,aAAA;EAC9B,GAAA,CAAI,OAAA,WAAkB,aAAA;EACtB,MAAA,CAAO,MAAA,EAAQ,oBAAA,GAAuB,aAAA;EACtC,MAAA,CAAO,MAAA,EAAQ,oBAAA;EACf,MAAA,CAAO,OAAA;AAAA;AAAA,cAGI,cAAA,EAAgB,cAAA"}
1
+ {"version":3,"file":"executionState.d.ts","names":[],"sources":["../../../src/core/executionState.ts"],"mappings":";;UAMU;EACR,OAAO;EACP,WAAW;EACX,mBAAmB;EACnB,UAAU,QAAQ;;KAGf,uBAAuB,KAAK;UAEvB;EACR,OAAO,QAAQ,eAAe;EAC9B,IAAI,kBAAkB;EACtB,OAAO,QAAQ,uBAAuB;EACtC,OAAO,QAAQ;EACf,OAAO;;cAGI,gBAAgB"}
@@ -1,5 +1,4 @@
1
1
  import { RouteExtended } from "../types/core.js";
2
-
3
2
  //#region src/core/prepareRestart.d.ts
4
3
  declare const prepareRestart: (route: RouteExtended) => void;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"prepareRestart.d.ts","names":[],"sources":["../../../src/core/prepareRestart.ts"],"mappings":";;;cAEa,cAAA,GAAkB,KAAO,EAAA,aAAA"}
1
+ {"version":3,"file":"prepareRestart.d.ts","names":[],"sources":["../../../src/core/prepareRestart.ts"],"mappings":";;cAEa,iBAAkB,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","names":[],"sources":["../../../src/core/storage.ts"],"mappings":";UAAiB,UAAA;EACf,GAAA,CAAI,GAAA,2BAA8B,OAAA;EAClC,GAAA,CAAI,GAAA,UAAa,KAAA,kBAAuB,OAAA;EACxC,MAAA,CAAO,GAAA,kBAAqB,OAAA;AAAA;AAAA,cAGjB,mBAAA,YAA+B,UAAA;EAC1C,GAAA,CAAI,GAAA;EAIJ,GAAA,CAAI,GAAA,UAAa,KAAA;EAIjB,MAAA,CAAO,GAAA;AAAA;AAAA,cAKI,eAAA,YAA2B,UAAA;EAAA,QAC9B,KAAA;EAER,GAAA,CAAI,GAAA;EAIJ,GAAA,CAAI,GAAA,UAAa,KAAA;EAIjB,MAAA,CAAO,GAAA;AAAA;AAAA,iBAKO,oBAAA,IAAwB,UAAA"}
1
+ {"version":3,"file":"storage.d.ts","names":[],"sources":["../../../src/core/storage.ts"],"mappings":";UAAiB;EACf,IAAI,8BAA8B;EAClC,IAAI,aAAa,uBAAuB;EACxC,OAAO,qBAAqB;;cAGjB,+BAA+B;EAC1C,IAAI;EAIJ,IAAI,aAAa;EAIjB,OAAO;;cAKI,2BAA2B;UAC9B;EAER,IAAI;EAIJ,IAAI,aAAa;EAIjB,OAAO;;iBAKO,wBAAwB"}
@@ -1,16 +1,15 @@
1
1
  import { StepExecutorContext, TaskResult } from "../../types/execution.js";
2
2
  import { BaseStepExecutionTask } from "../BaseStepExecutionTask.js";
3
3
  import { CheckBalanceOptions } from "./helpers/checkBalance.js";
4
-
5
4
  //#region src/core/tasks/CheckBalanceTask.d.ts
6
5
  declare class CheckBalanceTask extends BaseStepExecutionTask {
7
6
  /**
8
- * Per-step options hook for chain-specific subclasses (e.g. skip the
9
- * gas check for smart-contract wallets or relayed steps). Default `{}`
10
- * keeps behavior unchanged for every provider that doesn't override.
11
- * Resolved lazily inside `run()` — pipelines that resume past
12
- * `CheckBalance` pay no cost.
13
- */
7
+ * Per-step options hook for chain-specific subclasses (e.g. skip the
8
+ * gas check for smart-contract wallets or relayed steps). Default `{}`
9
+ * keeps behavior unchanged for every provider that doesn't override.
10
+ * Resolved lazily inside `run()` — pipelines that resume past
11
+ * `CheckBalance` pay no cost.
12
+ */
14
13
  protected getCheckBalanceOptions(_context: StepExecutorContext): Promise<CheckBalanceOptions>;
15
14
  run(context: StepExecutorContext): Promise<TaskResult>;
16
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBalanceTask.d.ts","names":[],"sources":["../../../../src/core/tasks/CheckBalanceTask.ts"],"mappings":";;;;;cASa,gBAAA,SAAyB,qBAAA;;AAAtC;;;;;;YAQY,sBAAA,CACR,QAAA,EAAU,mBAAA,GACT,OAAA,CAAQ,mBAAA;EAIX,GAAA,CAAU,OAAA,EAAS,mBAAA,GAAsB,OAAA,CAAQ,UAAA;AAAA"}
1
+ {"version":3,"file":"CheckBalanceTask.d.ts","names":[],"sources":["../../../../src/core/tasks/CheckBalanceTask.ts"],"mappings":";;;;cASa,yBAAyB;;;;;;;;YAQ1B,uBACR,UAAU,sBACT,QAAQ;EAIX,IAAU,SAAS,sBAAsB,QAAQ"}
@@ -1,6 +1,5 @@
1
1
  import { StepExecutorContext, TaskResult } from "../../types/execution.js";
2
2
  import { BaseStepExecutionTask } from "../BaseStepExecutionTask.js";
3
-
4
3
  //#region src/core/tasks/PrepareTransactionTask.d.ts
5
4
  declare class PrepareTransactionTask extends BaseStepExecutionTask {
6
5
  run(context: StepExecutorContext): Promise<TaskResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"PrepareTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/PrepareTransactionTask.ts"],"mappings":";;;;cAOa,sBAAA,SAA+B,qBAAA;EAC1C,GAAA,CAAU,OAAA,EAAS,mBAAA,GAAsB,OAAA,CAAQ,UAAA;AAAA"}
1
+ {"version":3,"file":"PrepareTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/PrepareTransactionTask.ts"],"mappings":";;;cAOa,+BAA+B;EAC1C,IAAU,SAAS,sBAAsB,QAAQ"}
@@ -1,7 +1,6 @@
1
1
  import { ExecutionActionType } from "../../types/core.js";
2
2
  import { StepExecutorContext, TaskResult } from "../../types/execution.js";
3
3
  import { BaseStepExecutionTask } from "../BaseStepExecutionTask.js";
4
-
5
4
  //#region src/core/tasks/WaitForTransactionStatusTask.d.ts
6
5
  declare class WaitForTransactionStatusTask extends BaseStepExecutionTask {
7
6
  readonly actionType: ExecutionActionType;
@@ -1 +1 @@
1
- {"version":3,"file":"WaitForTransactionStatusTask.d.ts","names":[],"sources":["../../../../src/core/tasks/WaitForTransactionStatusTask.ts"],"mappings":";;;;;cASa,4BAAA,SAAqC,qBAAA;EAAA,SACvC,UAAA,EAAY,mBAAA;EAErB,WAAA,CAAY,UAAA,EAAY,mBAAA;EAKxB,GAAA,CAAU,OAAA,EAAS,mBAAA,GAAsB,OAAA,CAAQ,UAAA;AAAA"}
1
+ {"version":3,"file":"WaitForTransactionStatusTask.d.ts","names":[],"sources":["../../../../src/core/tasks/WaitForTransactionStatusTask.ts"],"mappings":";;;;cASa,qCAAqC;WACvC,YAAY;EAErB,YAAY,YAAY;EAKxB,IAAU,SAAS,sBAAsB,QAAQ"}
@@ -1,29 +1,28 @@
1
1
  import { SDKClient } from "../../../types/core.js";
2
2
  import { LiFiStep } from "@lifi/types";
3
-
4
3
  //#region src/core/tasks/helpers/checkBalance.d.ts
5
4
  type CheckBalanceOptions = {
6
5
  /**
7
- * Set to `false` when outer-tx gas is paid by something other than
8
- * `walletAddress` (SCA executor, 4337 bundler / paymaster, relayer):
9
- * `gasPart` is excluded from the sufficiency check and slippage rescue.
10
- * Source amount and non-included fees (e.g. LZ `msg.value`) are still
11
- * verified. Defaults to `true` (strict, today's behavior).
12
- */
6
+ * Set to `false` when outer-tx gas is paid by something other than
7
+ * `walletAddress` (SCA executor, 4337 bundler / paymaster, relayer):
8
+ * `gasPart` is excluded from the sufficiency check and slippage rescue.
9
+ * Source amount and non-included fees (e.g. LZ `msg.value`) are still
10
+ * verified. Defaults to `true` (strict, today's behavior).
11
+ */
13
12
  walletPaysGas?: boolean;
14
13
  };
15
14
  /**
16
- * Verifies that the wallet holds enough of every token required to execute
17
- * the step on its source chain — the source-token amount, any gas costs, and
18
- * any non-included fee costs. Reads all balances in one batched provider
19
- * call, retries within a bounded budget to absorb transient RPC failures and
20
- * post-confirmation propagation lag, and applies slippage to the source-token
21
- * portion only as a last resort (overhead is never trimmed).
22
- *
23
- * Throws BalanceError("The balance is too low.") on a genuine shortfall, or
24
- * BalanceError("Could not read wallet balance.") if the balance can't be read
25
- * after retries.
26
- */
15
+ * Verifies that the wallet holds enough of every token required to execute
16
+ * the step on its source chain — the source-token amount, any gas costs, and
17
+ * any non-included fee costs. Reads all balances in one batched provider
18
+ * call, retries within a bounded budget to absorb transient RPC failures and
19
+ * post-confirmation propagation lag, and applies slippage to the source-token
20
+ * portion only as a last resort (overhead is never trimmed).
21
+ *
22
+ * Throws BalanceError("The balance is too low.") on a genuine shortfall, or
23
+ * BalanceError("Could not read wallet balance.") if the balance can't be read
24
+ * after retries.
25
+ */
27
26
  declare const checkBalance: (client: SDKClient, walletAddress: string, step: LiFiStep, options?: CheckBalanceOptions) => Promise<void>;
28
27
  //#endregion
29
28
  export { CheckBalanceOptions, checkBalance };
@@ -1 +1 @@
1
- {"version":3,"file":"checkBalance.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/checkBalance.ts"],"mappings":";;;;KAsBY,mBAAA;;AAAZ;;;;AAQE;AAeF;EAfE,aAAA;AAAA;;;;;;;;;;;;;cAeW,YAAA,GACX,MAAA,EAAQ,SAAA,EACR,aAAA,UACA,IAAA,EAAM,QAAA,EACN,OAAA,GAAS,mBAAA,KACR,OAAA"}
1
+ {"version":3,"file":"checkBalance.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/checkBalance.ts"],"mappings":";;;KAsBY;;;;;;;;EAQV;;;;;;;;;;;;;;cAeW,eACX,QAAQ,WACR,uBACA,MAAM,UACN,UAAS,wBACR"}
@@ -1,5 +1,4 @@
1
1
  import { ExecutionOptions, LiFiStepExtended } from "../../../types/core.js";
2
-
3
2
  //#region src/core/tasks/helpers/getTransactionRequestData.d.ts
4
3
  declare const getTransactionRequestData: (step: LiFiStepExtended, executionOptions?: ExecutionOptions) => Promise<string>;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"getTransactionRequestData.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/getTransactionRequestData.ts"],"mappings":";;;cAQa,yBAAA,GACX,IAAA,EAAM,gBAAA,EACN,gBAAA,GAAmB,gBAAA,KAClB,OAAA"}
1
+ {"version":3,"file":"getTransactionRequestData.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/getTransactionRequestData.ts"],"mappings":";;cAQa,4BACX,MAAM,kBACN,mBAAmB,qBAClB"}
@@ -1,20 +1,19 @@
1
1
  import { ExecutionOptions } from "../../../types/core.js";
2
2
  import { StatusManager } from "../../StatusManager.js";
3
3
  import { LiFiStep } from "@lifi/types";
4
-
5
4
  //#region src/core/tasks/helpers/stepComparison.d.ts
6
5
  /**
7
- * This method checks whether the new and updated Step meets the required exchange rate conditions.
8
- * If yes it returns the updated Step.
9
- * If no and if user interaction is allowed it triggers the acceptExchangeRateUpdateHook. If no user interaction is allowed it aborts.
10
- * @param statusManager
11
- * @param oldStep
12
- * @param newStep
13
- * @param settings
14
- * @param allowUserInteraction
15
- * @param executionOptions
16
- * @returns Return LiFiStep
17
- */
6
+ * This method checks whether the new and updated Step meets the required exchange rate conditions.
7
+ * If yes it returns the updated Step.
8
+ * If no and if user interaction is allowed it triggers the acceptExchangeRateUpdateHook. If no user interaction is allowed it aborts.
9
+ * @param statusManager
10
+ * @param oldStep
11
+ * @param newStep
12
+ * @param settings
13
+ * @param allowUserInteraction
14
+ * @param executionOptions
15
+ * @returns Return LiFiStep
16
+ */
18
17
  declare const stepComparison: (statusManager: StatusManager, oldStep: LiFiStep, newStep: LiFiStep, allowUserInteraction: boolean, executionOptions?: ExecutionOptions) => Promise<LiFiStep>;
19
18
  //#endregion
20
19
  export { stepComparison };
@@ -1 +1 @@
1
- {"version":3,"file":"stepComparison.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/stepComparison.ts"],"mappings":";;;;;;;AAmBA;;;;;;;;;;cAAa,cAAA,GACX,aAAA,EAAe,aAAA,EACf,OAAA,EAAS,QAAA,EACT,OAAA,EAAS,QAAA,EACT,oBAAA,WACA,gBAAA,GAAmB,gBAAA,KAClB,OAAA,CAAQ,QAAA"}
1
+ {"version":3,"file":"stepComparison.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/stepComparison.ts"],"mappings":";;;;;;;;;;;;;;;;cAmBa,iBACX,eAAe,eACf,SAAS,UACT,SAAS,UACT,+BACA,mBAAmB,qBAClB,QAAQ"}
@@ -1,7 +1,6 @@
1
1
  import { ExecutionActionType, SDKClient } from "../../../types/core.js";
2
2
  import { StatusManager } from "../../StatusManager.js";
3
3
  import { LiFiStep, StatusResponse } from "@lifi/types";
4
-
5
4
  //#region src/core/tasks/helpers/waitForTransactionStatus.d.ts
6
5
  declare function waitForTransactionStatus(client: SDKClient, statusManager: StatusManager, txHash: string, step: LiFiStep, actionType: ExecutionActionType, interval?: number): Promise<StatusResponse>;
7
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"waitForTransactionStatus.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/waitForTransactionStatus.ts"],"mappings":";;;;;iBAUsB,wBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,aAAA,EAAe,aAAA,EACf,MAAA,UACA,IAAA,EAAM,QAAA,EACN,UAAA,EAAY,mBAAA,EACZ,QAAA,YACC,OAAA,CAAQ,cAAA"}
1
+ {"version":3,"file":"waitForTransactionStatus.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/waitForTransactionStatus.ts"],"mappings":";;;;iBAUsB,yBACpB,QAAQ,WACR,eAAe,eACf,gBACA,MAAM,UACN,YAAY,qBACZ,oBACC,QAAQ"}
@@ -1,15 +1,14 @@
1
1
  import { RPCUrls } from "../types/core.js";
2
2
  import { ChainId, ExtendedChain, LiFiStep } from "@lifi/types";
3
-
4
3
  //#region src/core/utils.d.ts
5
4
  /**
6
- * Used to check if changed exchange rate is in the range of slippage threshold.
7
- * We use a slippage value as a threshold to trigger the rate change hook.
8
- * This can result in almost doubled slippage for the user and need to be revisited.
9
- * @param oldStep - old step
10
- * @param newStep - new step
11
- * @returns Boolean
12
- */
5
+ * Used to check if changed exchange rate is in the range of slippage threshold.
6
+ * We use a slippage value as a threshold to trigger the rate change hook.
7
+ * This can result in almost doubled slippage for the user and need to be revisited.
8
+ * @param oldStep - old step
9
+ * @param newStep - new step
10
+ * @returns Boolean
11
+ */
13
12
  declare function checkStepSlippageThreshold(oldStep: LiFiStep, newStep: LiFiStep): boolean;
14
13
  declare function getRpcUrlsFromChains(existingRpcUrls: RPCUrls, chains: ExtendedChain[], skipChains?: ChainId[]): RPCUrls;
15
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/core/utils.ts"],"mappings":";;;;;;AAcA;;;;;;iBAAgB,0BAAA,CACd,OAAA,EAAS,QAAA,EACT,OAAA,EAAS,QAAA;AAAA,iBAgBK,oBAAA,CACd,eAAA,EAAiB,OAAA,EACjB,MAAA,EAAQ,aAAA,IACR,UAAA,GAAa,OAAA,KACZ,OAAA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/core/utils.ts"],"mappings":";;;;;;;;;;;iBAcgB,2BACd,SAAS,UACT,SAAS;iBAgBK,qBACd,iBAAiB,SACjB,QAAQ,iBACR,aAAa,YACZ"}
@@ -2,7 +2,6 @@ import { ExecutionAction } from "../types/core.js";
2
2
  import { ErrorCode } from "./constants.js";
3
3
  import { BaseError } from "./baseError.js";
4
4
  import { LiFiStep } from "@lifi/types";
5
-
6
5
  //#region src/errors/SDKError.d.ts
7
6
  declare class SDKError extends Error {
8
7
  step?: LiFiStep;
@@ -1 +1 @@
1
- {"version":3,"file":"SDKError.d.ts","names":[],"sources":["../../../src/errors/SDKError.ts"],"mappings":";;;;;;cAQa,QAAA,SAAiB,KAAA;EAC5B,IAAA,GAAO,QAAA;EACP,MAAA,GAAS,eAAA;EACT,IAAA,EAAM,SAAA;EAAA,SACG,IAAA;EAAA,SACA,KAAA,EAAO,SAAA;EAEhB,WAAA,CAAY,KAAA,EAAO,SAAA,EAAW,IAAA,GAAO,QAAA,EAAU,MAAA,GAAS,eAAA;AAAA"}
1
+ {"version":3,"file":"SDKError.d.ts","names":[],"sources":["../../../src/errors/SDKError.ts"],"mappings":";;;;;cAQa,iBAAiB;EAC5B,OAAO;EACP,SAAS;EACT,MAAM;WACG;WACA,OAAO;EAEhB,YAAY,OAAO,WAAW,OAAO,UAAU,SAAS"}
@@ -1,5 +1,4 @@
1
1
  import { ErrorCode, ErrorName } from "./constants.js";
2
-
3
2
  //#region src/errors/baseError.d.ts
4
3
  declare class BaseError extends Error {
5
4
  code: ErrorCode;
@@ -1 +1 @@
1
- {"version":3,"file":"baseError.d.ts","names":[],"sources":["../../../src/errors/baseError.ts"],"mappings":";;;cAKa,SAAA,SAAkB,KAAA;EAC7B,IAAA,EAAM,SAAA;EAAA,SACG,KAAA,GAAQ,KAAA;EAEjB,WAAA,CAAY,IAAA,EAAM,SAAA,EAAW,IAAA,UAAc,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA"}
1
+ {"version":3,"file":"baseError.d.ts","names":[],"sources":["../../../src/errors/baseError.ts"],"mappings":";;cAKa,kBAAkB;EAC7B,MAAM;WACG,QAAQ;EAEjB,YAAY,MAAM,WAAW,cAAc,iBAAiB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/errors/constants.ts"],"mappings":";aAAY,SAAA;EACV,QAAA;EACA,aAAA;EACA,WAAA;EACA,gBAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,SAAA;EACA,WAAA;EACA,qBAAA;AAAA;AAAA,KAGU,SAAA,GAAY,aAAA;AAAA,aAEZ,aAAA;EACV,aAAA;EACA,eAAA;EACA,sBAAA;EACA,iBAAA;EACA,OAAA;EACA,mBAAA;EACA,QAAA;EACA,gBAAA;EACA,qBAAA;EACA,aAAA;EACA,mBAAA;EACA,aAAA;EACA,iBAAA;EACA,YAAA;EACA,iBAAA;EACA,iBAAA;EACA,0BAAA;EACA,4BAAA;EACA,kBAAA;EACA,2BAAA;EACA,mBAAA;EACA,mBAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;EACA,eAAA;EACA,WAAA;AAAA;AAAA,aAGU,YAAA;EACV,YAAA;EACA,aAAA;EACA,WAAA;EACA,sBAAA;EACA,mBAAA;AAAA"}
1
+ {"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/errors/constants.ts"],"mappings":";aAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,YAAY;aAEZ;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAGU;EACV;EACA;EACA;EACA;EACA"}
@@ -1,7 +1,6 @@
1
1
  import { ExecuteStepRetryParams } from "../types/core.js";
2
2
  import { LiFiErrorCode } from "./constants.js";
3
3
  import { BaseError } from "./baseError.js";
4
-
5
4
  //#region src/errors/errors.d.ts
6
5
  declare class RPCError extends BaseError {
7
6
  constructor(code: LiFiErrorCode, message: string, cause?: Error);
@@ -25,10 +24,10 @@ declare class ValidationError extends BaseError {
25
24
  constructor(message: string);
26
25
  }
27
26
  /**
28
- * Thrown by a step executor when executeStep should be retried with the given params
29
- * (e.g. wallet rejected 7702 upgrade → retry with atomicityNotReady).
30
- * The execution layer catches this and retries executeStep(client, step, retryParams).
31
- */
27
+ * Thrown by a step executor when executeStep should be retried with the given params
28
+ * (e.g. wallet rejected 7702 upgrade → retry with atomicityNotReady).
29
+ * The execution layer catches this and retries executeStep(client, step, retryParams).
30
+ */
32
31
  declare class ExecuteStepRetryError extends BaseError {
33
32
  readonly retryParams: ExecuteStepRetryParams;
34
33
  constructor(message: string, retryParams: ExecuteStepRetryParams, cause?: Error);
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","names":[],"sources":["../../../src/errors/errors.ts"],"mappings":";;;;;cAIa,QAAA,SAAiB,SAAA;EAC5B,WAAA,CAAY,IAAA,EAAM,aAAA,EAAe,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA;AAAA,cAK/C,aAAA,SAAsB,SAAA;EACjC,WAAA,CAAY,IAAA,EAAM,aAAA,EAAe,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA;AAAA,cAK/C,gBAAA,SAAyB,SAAA;EACpC,WAAA,CAAY,IAAA,EAAM,aAAA,EAAe,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA;AAAA,cAK/C,YAAA,SAAqB,SAAA;EAChC,WAAA,CAAY,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA;AAAA,cAK1B,YAAA,SAAqB,SAAA;EAChC,WAAA,CAAY,OAAA,UAAiB,KAAA,GAAQ,KAAA;AAAA;AAAA,cAK1B,WAAA,SAAoB,SAAA;EAC/B,WAAA,CAAY,OAAA;AAAA;AAAA,cAKD,eAAA,SAAwB,SAAA;EACnC,WAAA,CAAY,OAAA;AAAA;;;;;;cAUD,qBAAA,SAA8B,SAAA;EAAA,SAChC,WAAA,EAAa,sBAAA;EAEtB,WAAA,CACE,OAAA,UACA,WAAA,EAAa,sBAAA,EACb,KAAA,GAAQ,KAAA;AAAA"}
1
+ {"version":3,"file":"errors.d.ts","names":[],"sources":["../../../src/errors/errors.ts"],"mappings":";;;;cAIa,iBAAiB;EAC5B,YAAY,MAAM,eAAe,iBAAiB,QAAQ;;cAK/C,sBAAsB;EACjC,YAAY,MAAM,eAAe,iBAAiB,QAAQ;;cAK/C,yBAAyB;EACpC,YAAY,MAAM,eAAe,iBAAiB,QAAQ;;cAK/C,qBAAqB;EAChC,YAAY,iBAAiB,QAAQ;;cAK1B,qBAAqB;EAChC,YAAY,iBAAiB,QAAQ;;cAK1B,oBAAoB;EAC/B,YAAY;;cAKD,wBAAwB;EACnC,YAAY;;;;;;;cAUD,8BAA8B;WAChC,aAAa;EAEtB,YACE,iBACA,aAAa,wBACb,QAAQ"}
@@ -2,7 +2,6 @@ import { ExtendedRequestInit } from "../types/request.js";
2
2
  import { ErrorName } from "./constants.js";
3
3
  import { BaseError } from "./baseError.js";
4
4
  import { UnavailableRoutes } from "@lifi/types";
5
-
6
5
  //#region src/errors/httpError.d.ts
7
6
  interface ServerErrorResponseBody {
8
7
  code: number;