@lifi/sdk 2.3.1 → 3.0.0-alpha.10

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 (379) hide show
  1. package/dist/cjs/LiFi.js +222 -250
  2. package/dist/cjs/LiFi.js.map +1 -0
  3. package/dist/cjs/allowance/getAllowance.js +82 -0
  4. package/dist/cjs/allowance/getAllowance.js.map +1 -0
  5. package/dist/cjs/allowance/index.js +5 -16
  6. package/dist/cjs/allowance/index.js.map +1 -0
  7. package/dist/cjs/allowance/setAllowance.js +71 -0
  8. package/dist/cjs/allowance/setAllowance.js.map +1 -0
  9. package/dist/cjs/{types/internal.types.js → allowance/types.js} +1 -0
  10. package/dist/cjs/allowance/types.js.map +1 -0
  11. package/dist/cjs/balance/getBalance.js +97 -0
  12. package/dist/cjs/balance/getBalance.js.map +1 -0
  13. package/dist/cjs/balance/getTokenBalance.js +7 -10
  14. package/dist/cjs/balance/getTokenBalance.js.map +1 -0
  15. package/dist/cjs/balance/index.js +4 -24
  16. package/dist/cjs/balance/index.js.map +1 -0
  17. package/dist/cjs/connectors.js +28 -48
  18. package/dist/cjs/connectors.js.map +1 -0
  19. package/dist/cjs/constants.js +7 -0
  20. package/dist/cjs/constants.js.map +1 -0
  21. package/dist/cjs/execution/BaseStepExecutor.js +54 -0
  22. package/dist/cjs/execution/BaseStepExecutor.js.map +1 -0
  23. package/dist/cjs/execution/EVMStepExecutor.js +271 -0
  24. package/dist/cjs/execution/EVMStepExecutor.js.map +1 -0
  25. package/dist/cjs/execution/RouteExecutionManager.js +196 -197
  26. package/dist/cjs/execution/RouteExecutionManager.js.map +1 -0
  27. package/dist/cjs/execution/StatusManager.js +142 -136
  28. package/dist/cjs/execution/StatusManager.js.map +1 -0
  29. package/dist/cjs/execution/StepExecutionManager.js +220 -233
  30. package/dist/cjs/execution/StepExecutionManager.js.map +1 -0
  31. package/dist/cjs/execution/checkAllowance.js +76 -0
  32. package/dist/cjs/execution/checkAllowance.js.map +1 -0
  33. package/dist/cjs/execution/checkBalance.js +42 -0
  34. package/dist/cjs/execution/checkBalance.js.map +1 -0
  35. package/dist/cjs/execution/index.js +4 -15
  36. package/dist/cjs/execution/index.js.map +1 -0
  37. package/dist/cjs/execution/multisig.js +13 -17
  38. package/dist/cjs/execution/multisig.js.map +1 -0
  39. package/dist/cjs/execution/prepareRestart.js +23 -0
  40. package/dist/cjs/execution/prepareRestart.js.map +1 -0
  41. package/dist/cjs/execution/stepComparison.js +5 -17
  42. package/dist/cjs/execution/stepComparison.js.map +1 -0
  43. package/dist/cjs/execution/switchChain.js +10 -22
  44. package/dist/cjs/execution/switchChain.js.map +1 -0
  45. package/dist/cjs/execution/types.js +3 -0
  46. package/dist/cjs/execution/types.js.map +1 -0
  47. package/dist/cjs/execution/utils.js +12 -67
  48. package/dist/cjs/execution/utils.js.map +1 -0
  49. package/dist/cjs/execution/waitForReceivingTransaction.js +56 -0
  50. package/dist/cjs/execution/waitForReceivingTransaction.js.map +1 -0
  51. package/dist/cjs/helpers.js +12 -58
  52. package/dist/cjs/helpers.js.map +1 -0
  53. package/dist/cjs/index.js +16 -22
  54. package/dist/cjs/index.js.map +1 -0
  55. package/dist/cjs/package.json +1 -0
  56. package/dist/cjs/providers/EVM.js +35 -0
  57. package/dist/cjs/providers/EVM.js.map +1 -0
  58. package/dist/cjs/providers/Solana.js +38 -0
  59. package/dist/cjs/providers/Solana.js.map +1 -0
  60. package/dist/cjs/providers/index.js +5 -0
  61. package/dist/cjs/providers/index.js.map +1 -0
  62. package/dist/cjs/providers/types.js +9 -0
  63. package/dist/cjs/providers/types.js.map +1 -0
  64. package/dist/cjs/request.js +10 -13
  65. package/dist/cjs/request.js.map +1 -0
  66. package/dist/cjs/services/ApiService.js +70 -86
  67. package/dist/cjs/services/ApiService.js.map +1 -0
  68. package/dist/cjs/services/ChainsService.js +19 -9
  69. package/dist/cjs/services/ChainsService.js.map +1 -0
  70. package/dist/cjs/services/ConfigService.js +94 -67
  71. package/dist/cjs/services/ConfigService.js.map +1 -0
  72. package/dist/cjs/typeguards.js +1 -0
  73. package/dist/cjs/typeguards.js.map +1 -0
  74. package/dist/cjs/types/abi.js +46 -0
  75. package/dist/cjs/types/abi.js.map +1 -0
  76. package/dist/cjs/types/index.js +4 -20
  77. package/dist/cjs/types/index.js.map +1 -0
  78. package/dist/cjs/types/internal.js +3 -0
  79. package/dist/cjs/types/internal.js.map +1 -0
  80. package/dist/cjs/utils/errors.js +63 -40
  81. package/dist/cjs/utils/errors.js.map +1 -0
  82. package/dist/cjs/utils/getMaxPriorityFeePerGas.js +23 -0
  83. package/dist/cjs/utils/getMaxPriorityFeePerGas.js.map +1 -0
  84. package/dist/cjs/utils/index.js +9 -0
  85. package/dist/cjs/utils/index.js.map +1 -0
  86. package/dist/cjs/utils/median.js +16 -0
  87. package/dist/cjs/utils/median.js.map +1 -0
  88. package/dist/cjs/utils/parseError.js +55 -92
  89. package/dist/cjs/utils/parseError.js.map +1 -0
  90. package/dist/cjs/utils/utils.js +10 -85
  91. package/dist/cjs/utils/utils.js.map +1 -0
  92. package/dist/cjs/version.js +2 -1
  93. package/dist/cjs/version.js.map +1 -0
  94. package/dist/esm/LiFi.js +375 -0
  95. package/dist/esm/LiFi.js.map +1 -0
  96. package/dist/esm/allowance/getAllowance.js +79 -0
  97. package/dist/esm/allowance/getAllowance.js.map +1 -0
  98. package/dist/esm/allowance/index.js +4 -0
  99. package/dist/esm/allowance/index.js.map +1 -0
  100. package/dist/esm/allowance/setAllowance.js +67 -0
  101. package/dist/esm/allowance/setAllowance.js.map +1 -0
  102. package/dist/esm/allowance/types.js +2 -0
  103. package/dist/esm/allowance/types.js.map +1 -0
  104. package/dist/esm/balance/getBalance.js +93 -0
  105. package/dist/esm/balance/getBalance.js.map +1 -0
  106. package/dist/{balance → esm/balance}/getTokenBalance.js +5 -4
  107. package/dist/esm/balance/getTokenBalance.js.map +1 -0
  108. package/dist/esm/balance/index.js +3 -0
  109. package/dist/esm/balance/index.js.map +1 -0
  110. package/dist/esm/connectors.js +42 -0
  111. package/dist/esm/connectors.js.map +1 -0
  112. package/dist/esm/constants.js +7 -0
  113. package/dist/esm/constants.js.map +1 -0
  114. package/dist/esm/execution/BaseStepExecutor.js +51 -0
  115. package/dist/esm/execution/BaseStepExecutor.js.map +1 -0
  116. package/dist/esm/execution/EVMStepExecutor.js +299 -0
  117. package/dist/esm/execution/EVMStepExecutor.js.map +1 -0
  118. package/dist/esm/execution/RouteExecutionManager.js +268 -0
  119. package/dist/esm/execution/RouteExecutionManager.js.map +1 -0
  120. package/dist/esm/execution/StatusManager.js +216 -0
  121. package/dist/esm/execution/StatusManager.js.map +1 -0
  122. package/dist/esm/execution/StepExecutionManager.js +280 -0
  123. package/dist/esm/execution/StepExecutionManager.js.map +1 -0
  124. package/dist/esm/execution/checkAllowance.js +74 -0
  125. package/dist/esm/execution/checkAllowance.js.map +1 -0
  126. package/dist/esm/execution/checkBalance.js +39 -0
  127. package/dist/esm/execution/checkBalance.js.map +1 -0
  128. package/dist/esm/execution/index.js +3 -0
  129. package/dist/esm/execution/index.js.map +1 -0
  130. package/dist/esm/execution/multisig.js +26 -0
  131. package/dist/esm/execution/multisig.js.map +1 -0
  132. package/dist/esm/execution/prepareRestart.js +64 -0
  133. package/dist/esm/execution/prepareRestart.js.map +1 -0
  134. package/dist/{execution → esm/execution}/stepComparison.js +5 -4
  135. package/dist/esm/execution/stepComparison.js.map +1 -0
  136. package/dist/{execution → esm/execution}/switchChain.js +19 -12
  137. package/dist/esm/execution/switchChain.js.map +1 -0
  138. package/dist/esm/execution/types.js +2 -0
  139. package/dist/esm/execution/types.js.map +1 -0
  140. package/dist/esm/execution/utils.js +80 -0
  141. package/dist/esm/execution/utils.js.map +1 -0
  142. package/dist/esm/execution/waitForReceivingTransaction.js +52 -0
  143. package/dist/esm/execution/waitForReceivingTransaction.js.map +1 -0
  144. package/dist/{helpers.js → esm/helpers.js} +9 -37
  145. package/dist/esm/helpers.js.map +1 -0
  146. package/dist/esm/index.js +10 -0
  147. package/dist/esm/index.js.map +1 -0
  148. package/dist/esm/package.json +1 -0
  149. package/dist/esm/providers/EVM.js +30 -0
  150. package/dist/esm/providers/EVM.js.map +1 -0
  151. package/dist/esm/providers/Solana.js +34 -0
  152. package/dist/esm/providers/Solana.js.map +1 -0
  153. package/dist/esm/providers/index.js +2 -0
  154. package/dist/esm/providers/index.js.map +1 -0
  155. package/dist/esm/providers/types.js +6 -0
  156. package/dist/esm/providers/types.js.map +1 -0
  157. package/dist/{request.js → esm/request.js} +6 -5
  158. package/dist/esm/request.js.map +1 -0
  159. package/dist/{services → esm/services}/ApiService.js +29 -26
  160. package/dist/esm/services/ApiService.js.map +1 -0
  161. package/dist/{services → esm/services}/ChainsService.js +16 -4
  162. package/dist/esm/services/ChainsService.js.map +1 -0
  163. package/dist/esm/services/ConfigService.js +143 -0
  164. package/dist/esm/services/ConfigService.js.map +1 -0
  165. package/dist/{typeguards.js → esm/typeguards.js} +1 -0
  166. package/dist/esm/typeguards.js.map +1 -0
  167. package/dist/esm/types/abi.js +43 -0
  168. package/dist/esm/types/abi.js.map +1 -0
  169. package/dist/esm/types/index.js +3 -0
  170. package/dist/esm/types/index.js.map +1 -0
  171. package/dist/esm/types/internal.js +2 -0
  172. package/dist/esm/types/internal.js.map +1 -0
  173. package/dist/{utils → esm/utils}/errors.js +61 -35
  174. package/dist/esm/utils/errors.js.map +1 -0
  175. package/dist/esm/utils/getMaxPriorityFeePerGas.js +19 -0
  176. package/dist/esm/utils/getMaxPriorityFeePerGas.js.map +1 -0
  177. package/dist/esm/utils/index.js +6 -0
  178. package/dist/esm/utils/index.js.map +1 -0
  179. package/dist/esm/utils/median.js +12 -0
  180. package/dist/esm/utils/median.js.map +1 -0
  181. package/dist/{utils → esm/utils}/parseError.js +45 -41
  182. package/dist/esm/utils/parseError.js.map +1 -0
  183. package/dist/esm/utils/utils.js +38 -0
  184. package/dist/esm/utils/utils.js.map +1 -0
  185. package/dist/esm/version.js +3 -0
  186. package/dist/esm/version.js.map +1 -0
  187. package/dist/types/LiFi.d.ts +179 -0
  188. package/dist/types/LiFi.d.ts.map +1 -0
  189. package/dist/types/allowance/getAllowance.d.ts +7 -0
  190. package/dist/types/allowance/getAllowance.d.ts.map +1 -0
  191. package/dist/types/allowance/index.d.ts +4 -0
  192. package/dist/types/allowance/index.d.ts.map +1 -0
  193. package/dist/types/allowance/setAllowance.d.ts +7 -0
  194. package/dist/types/allowance/setAllowance.d.ts.map +1 -0
  195. package/dist/types/allowance/types.d.ts +28 -0
  196. package/dist/types/allowance/types.d.ts.map +1 -0
  197. package/dist/types/balance/getBalance.d.ts +3 -0
  198. package/dist/types/balance/getBalance.d.ts.map +1 -0
  199. package/dist/{balance → types/balance}/getTokenBalance.d.ts +3 -2
  200. package/dist/types/balance/getTokenBalance.d.ts.map +1 -0
  201. package/dist/types/balance/index.d.ts +3 -0
  202. package/dist/types/balance/index.d.ts.map +1 -0
  203. package/dist/types/connectors.d.ts +9 -0
  204. package/dist/types/connectors.d.ts.map +1 -0
  205. package/dist/types/constants.d.ts +7 -0
  206. package/dist/types/constants.d.ts.map +1 -0
  207. package/dist/types/execution/BaseStepExecutor.d.ts +13 -0
  208. package/dist/types/execution/BaseStepExecutor.d.ts.map +1 -0
  209. package/dist/types/execution/EVMStepExecutor.d.ts +14 -0
  210. package/dist/types/execution/EVMStepExecutor.d.ts.map +1 -0
  211. package/dist/types/execution/RouteExecutionManager.d.ts +61 -0
  212. package/dist/types/execution/RouteExecutionManager.d.ts.map +1 -0
  213. package/dist/types/execution/StatusManager.d.ts +69 -0
  214. package/dist/types/execution/StatusManager.d.ts.map +1 -0
  215. package/dist/types/execution/StepExecutionManager.d.ts +8 -0
  216. package/dist/types/execution/StepExecutionManager.d.ts.map +1 -0
  217. package/dist/types/execution/checkAllowance.d.ts +6 -0
  218. package/dist/types/execution/checkAllowance.d.ts.map +1 -0
  219. package/dist/types/execution/checkBalance.d.ts +3 -0
  220. package/dist/types/execution/checkBalance.d.ts.map +1 -0
  221. package/dist/types/execution/index.d.ts +3 -0
  222. package/dist/types/execution/index.d.ts.map +1 -0
  223. package/dist/types/execution/multisig.d.ts +5 -0
  224. package/dist/types/execution/multisig.d.ts.map +1 -0
  225. package/dist/types/execution/prepareRestart.d.ts +3 -0
  226. package/dist/types/execution/prepareRestart.d.ts.map +1 -0
  227. package/dist/{execution → types/execution}/stepComparison.d.ts +6 -4
  228. package/dist/types/execution/stepComparison.d.ts.map +1 -0
  229. package/dist/types/execution/switchChain.d.ts +23 -0
  230. package/dist/types/execution/switchChain.d.ts.map +1 -0
  231. package/dist/types/execution/types.d.ts +83 -0
  232. package/dist/types/execution/types.d.ts.map +1 -0
  233. package/dist/types/execution/utils.d.ts +13 -0
  234. package/dist/types/execution/utils.d.ts.map +1 -0
  235. package/dist/types/execution/waitForReceivingTransaction.d.ts +4 -0
  236. package/dist/types/execution/waitForReceivingTransaction.d.ts.map +1 -0
  237. package/dist/types/helpers.d.ts +19 -0
  238. package/dist/types/helpers.d.ts.map +1 -0
  239. package/dist/types/index.d.ts +9 -3
  240. package/dist/types/index.d.ts.map +1 -0
  241. package/dist/types/providers/EVM.d.ts +11 -0
  242. package/dist/types/providers/EVM.d.ts.map +1 -0
  243. package/dist/types/providers/Solana.d.ts +10 -0
  244. package/dist/types/providers/Solana.d.ts.map +1 -0
  245. package/dist/types/providers/index.d.ts +2 -0
  246. package/dist/types/providers/index.d.ts.map +1 -0
  247. package/dist/types/providers/types.d.ts +13 -0
  248. package/dist/types/providers/types.d.ts.map +1 -0
  249. package/dist/{request.d.ts → types/request.d.ts} +1 -0
  250. package/dist/types/request.d.ts.map +1 -0
  251. package/dist/{cjs → types}/services/ApiService.d.ts +5 -5
  252. package/dist/types/services/ApiService.d.ts.map +1 -0
  253. package/dist/{services → types/services}/ChainsService.d.ts +3 -2
  254. package/dist/types/services/ChainsService.d.ts.map +1 -0
  255. package/dist/{services → types/services}/ConfigService.d.ts +10 -6
  256. package/dist/types/services/ConfigService.d.ts.map +1 -0
  257. package/dist/{cjs → types}/typeguards.d.ts +3 -2
  258. package/dist/types/typeguards.d.ts.map +1 -0
  259. package/dist/types/types/abi.d.ts +6 -0
  260. package/dist/types/types/abi.d.ts.map +1 -0
  261. package/dist/types/types/index.d.ts +3 -0
  262. package/dist/types/types/index.d.ts.map +1 -0
  263. package/dist/types/types/internal.d.ts +61 -0
  264. package/dist/types/types/internal.d.ts.map +1 -0
  265. package/dist/{cjs → types}/utils/errors.d.ts +16 -14
  266. package/dist/types/utils/errors.d.ts.map +1 -0
  267. package/dist/types/utils/getMaxPriorityFeePerGas.d.ts +3 -0
  268. package/dist/types/utils/getMaxPriorityFeePerGas.d.ts.map +1 -0
  269. package/dist/types/utils/index.d.ts +6 -0
  270. package/dist/types/utils/index.d.ts.map +1 -0
  271. package/dist/types/utils/median.d.ts +2 -0
  272. package/dist/types/utils/median.d.ts.map +1 -0
  273. package/dist/{utils → types/utils}/parseError.d.ts +7 -6
  274. package/dist/types/utils/parseError.d.ts.map +1 -0
  275. package/dist/types/utils/utils.d.ts +11 -0
  276. package/dist/types/utils/utils.d.ts.map +1 -0
  277. package/dist/types/version.d.ts +3 -0
  278. package/dist/types/version.d.ts.map +1 -0
  279. package/package.json +37 -95
  280. package/dist/LiFi.d.ts +0 -164
  281. package/dist/LiFi.js +0 -235
  282. package/dist/allowance/checkAllowance.d.ts +0 -4
  283. package/dist/allowance/checkAllowance.js +0 -96
  284. package/dist/allowance/index.d.ts +0 -2
  285. package/dist/allowance/index.js +0 -2
  286. package/dist/allowance/tokenApproval.d.ts +0 -22
  287. package/dist/allowance/tokenApproval.js +0 -59
  288. package/dist/allowance/utils.d.ts +0 -14
  289. package/dist/allowance/utils.js +0 -72
  290. package/dist/balance/checkBalance.d.ts +0 -3
  291. package/dist/balance/checkBalance.js +0 -38
  292. package/dist/balance/index.d.ts +0 -13
  293. package/dist/balance/index.js +0 -10
  294. package/dist/balance/utils.d.ts +0 -6
  295. package/dist/balance/utils.js +0 -143
  296. package/dist/cjs/LiFi.d.ts +0 -164
  297. package/dist/cjs/allowance/checkAllowance.d.ts +0 -4
  298. package/dist/cjs/allowance/checkAllowance.js +0 -103
  299. package/dist/cjs/allowance/index.d.ts +0 -2
  300. package/dist/cjs/allowance/tokenApproval.d.ts +0 -22
  301. package/dist/cjs/allowance/tokenApproval.js +0 -69
  302. package/dist/cjs/allowance/utils.d.ts +0 -14
  303. package/dist/cjs/allowance/utils.js +0 -82
  304. package/dist/cjs/balance/checkBalance.d.ts +0 -3
  305. package/dist/cjs/balance/checkBalance.js +0 -45
  306. package/dist/cjs/balance/getTokenBalance.d.ts +0 -8
  307. package/dist/cjs/balance/index.d.ts +0 -13
  308. package/dist/cjs/balance/utils.d.ts +0 -6
  309. package/dist/cjs/balance/utils.js +0 -150
  310. package/dist/cjs/connectors.d.ts +0 -6
  311. package/dist/cjs/execution/RouteExecutionManager.d.ts +0 -65
  312. package/dist/cjs/execution/StatusManager.d.ts +0 -68
  313. package/dist/cjs/execution/StepExecutionManager.d.ts +0 -7
  314. package/dist/cjs/execution/StepExecutor.d.ts +0 -15
  315. package/dist/cjs/execution/StepExecutor.js +0 -62
  316. package/dist/cjs/execution/index.d.ts +0 -1
  317. package/dist/cjs/execution/multisig.d.ts +0 -3
  318. package/dist/cjs/execution/stepComparison.d.ts +0 -14
  319. package/dist/cjs/execution/switchChain.d.ts +0 -16
  320. package/dist/cjs/execution/utils.d.ts +0 -6
  321. package/dist/cjs/helpers.d.ts +0 -28
  322. package/dist/cjs/index.d.ts +0 -5
  323. package/dist/cjs/request.d.ts +0 -9
  324. package/dist/cjs/services/ChainsService.d.ts +0 -11
  325. package/dist/cjs/services/ConfigService.d.ts +0 -23
  326. package/dist/cjs/types/ERC20.d.ts +0 -22
  327. package/dist/cjs/types/ERC20.js +0 -53
  328. package/dist/cjs/types/index.d.ts +0 -4
  329. package/dist/cjs/types/internal.types.d.ts +0 -151
  330. package/dist/cjs/utils/getProvider.d.ts +0 -3
  331. package/dist/cjs/utils/getProvider.js +0 -11
  332. package/dist/cjs/utils/multicall.d.ts +0 -10
  333. package/dist/cjs/utils/multicall.js +0 -68
  334. package/dist/cjs/utils/multicallAbi.json +0 -313
  335. package/dist/cjs/utils/parseError.d.ts +0 -37
  336. package/dist/cjs/utils/preRestart.d.ts +0 -3
  337. package/dist/cjs/utils/preRestart.js +0 -56
  338. package/dist/cjs/utils/utils.d.ts +0 -25
  339. package/dist/cjs/version.d.ts +0 -2
  340. package/dist/connectors.d.ts +0 -6
  341. package/dist/connectors.js +0 -57
  342. package/dist/execution/RouteExecutionManager.d.ts +0 -65
  343. package/dist/execution/RouteExecutionManager.js +0 -213
  344. package/dist/execution/StatusManager.d.ts +0 -68
  345. package/dist/execution/StatusManager.js +0 -168
  346. package/dist/execution/StepExecutionManager.d.ts +0 -7
  347. package/dist/execution/StepExecutionManager.js +0 -267
  348. package/dist/execution/StepExecutor.d.ts +0 -15
  349. package/dist/execution/StepExecutor.js +0 -58
  350. package/dist/execution/index.d.ts +0 -1
  351. package/dist/execution/index.js +0 -1
  352. package/dist/execution/multisig.d.ts +0 -3
  353. package/dist/execution/multisig.js +0 -27
  354. package/dist/execution/switchChain.d.ts +0 -16
  355. package/dist/execution/utils.d.ts +0 -6
  356. package/dist/execution/utils.js +0 -122
  357. package/dist/helpers.d.ts +0 -28
  358. package/dist/index.d.ts +0 -5
  359. package/dist/index.js +0 -6
  360. package/dist/services/ApiService.d.ts +0 -17
  361. package/dist/services/ConfigService.js +0 -101
  362. package/dist/typeguards.d.ts +0 -4
  363. package/dist/types/ERC20.d.ts +0 -22
  364. package/dist/types/ERC20.js +0 -50
  365. package/dist/types/index.js +0 -4
  366. package/dist/types/internal.types.d.ts +0 -151
  367. package/dist/types/internal.types.js +0 -1
  368. package/dist/utils/errors.d.ts +0 -106
  369. package/dist/utils/getProvider.d.ts +0 -3
  370. package/dist/utils/getProvider.js +0 -7
  371. package/dist/utils/multicall.d.ts +0 -10
  372. package/dist/utils/multicall.js +0 -61
  373. package/dist/utils/multicallAbi.json +0 -313
  374. package/dist/utils/preRestart.d.ts +0 -3
  375. package/dist/utils/preRestart.js +0 -52
  376. package/dist/utils/utils.d.ts +0 -25
  377. package/dist/utils/utils.js +0 -99
  378. package/dist/version.d.ts +0 -2
  379. package/dist/version.js +0 -2
@@ -1,220 +1,219 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.RouteExecutionManager = void 0;
7
- const ConfigService_1 = __importDefault(require("../services/ConfigService"));
8
- const errors_1 = require("../utils/errors");
9
- const preRestart_1 = require("../utils/preRestart");
10
- const StatusManager_1 = require("./StatusManager");
11
- const StepExecutor_1 = require("./StepExecutor");
4
+ const ConfigService_js_1 = require("../services/ConfigService.js");
5
+ const errors_js_1 = require("../utils/errors.js");
6
+ const StatusManager_js_1 = require("./StatusManager.js");
7
+ const prepareRestart_js_1 = require("./prepareRestart.js");
12
8
  class RouteExecutionManager {
13
- constructor(configUpdate) {
14
- this.executionDictionary = {};
15
- this.executionPromiseDictionary = {};
16
- /**
17
- * Execute a route.
18
- * @param {Signer} signer - The signer required to send the transactions.
19
- * @param {Route} route - The route that should be executed. Cannot be an active route.
20
- * @param {ExecutionSettings} settings - An object containing settings and callbacks.
21
- * @return {Promise<Route>} The executed route.
22
- * @throws {LifiError} Throws a LifiError if the execution fails.
23
- */
24
- this.executeRoute = async (signer, route, settings) => {
25
- // Deep clone to prevent side effects
26
- const clonedRoute = structuredClone(route);
27
- let executionPromise = this.executionPromiseDictionary[clonedRoute.id];
28
- // Check if route is already running
29
- if (executionPromise) {
9
+ constructor(options) {
10
+ Object.defineProperty(this, "executionDictionary", {
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true,
14
+ value: {}
15
+ });
16
+ Object.defineProperty(this, "executionPromiseDictionary", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: {}
21
+ });
22
+ Object.defineProperty(this, "configService", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: void 0
27
+ });
28
+ Object.defineProperty(this, "providers", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: void 0
33
+ });
34
+ Object.defineProperty(this, "executeRoute", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: async (route, settings) => {
39
+ const clonedRoute = structuredClone(route);
40
+ let executionPromise = this.executionPromiseDictionary[clonedRoute.id];
41
+ if (executionPromise) {
42
+ return executionPromise;
43
+ }
44
+ executionPromise = this.executeSteps(clonedRoute, settings);
45
+ this.executionPromiseDictionary[clonedRoute.id] = executionPromise;
30
46
  return executionPromise;
31
47
  }
32
- executionPromise = this.executeSteps(signer, clonedRoute, settings);
33
- this.executionPromiseDictionary[clonedRoute.id] = executionPromise;
34
- return executionPromise;
35
- };
36
- /**
37
- * Resume the execution of a route that has been stopped or had an error while executing.
38
- * @param {Signer} signer - The signer required to send the transactions.
39
- * @param {Route} route - The route that is to be executed. Cannot be an active route.
40
- * @param {ExecutionSettings} settings - An object containing settings and callbacks.
41
- * @return {Promise<Route>} The executed route.
42
- * @throws {LifiError} Throws a LifiError if the execution fails.
43
- */
44
- this.resumeRoute = async (signer, route, settings) => {
45
- // Deep clone to prevent side effects
46
- const clonedRoute = structuredClone(route);
47
- const execution = this.executionDictionary[clonedRoute.id];
48
- if (execution) {
49
- const executionHalted = execution.executors.some((executor) => executor.executionStopped);
50
- if (!executionHalted) {
51
- // Check if we want to resume route execution in the background
52
- this.updateRouteExecution(route, {
53
- executeInBackground: settings?.executeInBackground,
54
- });
55
- const executionPromise = this.executionPromiseDictionary[clonedRoute.id];
56
- return executionPromise ?? clonedRoute;
48
+ });
49
+ Object.defineProperty(this, "resumeRoute", {
50
+ enumerable: true,
51
+ configurable: true,
52
+ writable: true,
53
+ value: async (route, settings) => {
54
+ const clonedRoute = structuredClone(route);
55
+ const execution = this.executionDictionary[clonedRoute.id];
56
+ if (execution) {
57
+ const executionHalted = execution.executors.some((executor) => !executor.allowExecution);
58
+ if (!executionHalted) {
59
+ this.updateRouteExecution(route, {
60
+ executeInBackground: settings?.executeInBackground,
61
+ });
62
+ const executionPromise = this.executionPromiseDictionary[clonedRoute.id];
63
+ return executionPromise ?? clonedRoute;
64
+ }
57
65
  }
66
+ await (0, prepareRestart_js_1.prepareRestart)(clonedRoute);
67
+ const executionPromise = this.executeSteps(clonedRoute, settings);
68
+ this.executionPromiseDictionary[clonedRoute.id] = executionPromise;
69
+ return executionPromise;
58
70
  }
59
- await (0, preRestart_1.handlePreRestart)(clonedRoute, signer);
60
- const executionPromise = this.executeSteps(signer, clonedRoute, settings);
61
- this.executionPromiseDictionary[clonedRoute.id] = executionPromise;
62
- return executionPromise;
63
- };
64
- this.executeSteps = async (signer, route, settings) => {
65
- const config = this.configService.getConfig();
66
- const execution = {
67
- route,
68
- executors: [],
69
- settings: { ...config.defaultExecutionSettings, ...settings },
70
- };
71
- this.executionDictionary[route.id] = execution;
72
- const statusManager = new StatusManager_1.StatusManager(route, execution.settings, (route) => {
73
- if (this.executionDictionary[route.id]) {
74
- execution.route = route;
71
+ });
72
+ Object.defineProperty(this, "executeSteps", {
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true,
76
+ value: async (route, settings) => {
77
+ const config = this.configService.getConfig();
78
+ const execution = {
79
+ route,
80
+ executors: [],
81
+ settings: { ...config.defaultExecutionSettings, ...settings },
82
+ };
83
+ this.executionDictionary[route.id] = execution;
84
+ const statusManager = new StatusManager_js_1.StatusManager(route, execution.settings, (route) => {
85
+ if (this.executionDictionary[route.id]) {
86
+ execution.route = route;
87
+ }
88
+ });
89
+ for (let index = 0; index < route.steps.length; index++) {
90
+ const execution = this.executionDictionary[route.id];
91
+ if (!execution) {
92
+ break;
93
+ }
94
+ const step = route.steps[index];
95
+ const previousStep = route.steps[index - 1];
96
+ if (step.execution?.status === 'DONE') {
97
+ continue;
98
+ }
99
+ if (previousStep?.execution?.toAmount) {
100
+ step.action.fromAmount = previousStep.execution.toAmount;
101
+ }
102
+ try {
103
+ const provider = this.providers?.find((provider) => provider.isProviderStep(step));
104
+ if (!provider) {
105
+ throw new Error('SDK Execution Provider not found.');
106
+ }
107
+ const stepExecutor = await provider.getStepExecutor({
108
+ statusManager,
109
+ settings: execution.settings,
110
+ });
111
+ execution.executors.push(stepExecutor);
112
+ this.updateRouteExecution(route, execution.settings);
113
+ const executedStep = await stepExecutor.executeStep(step);
114
+ if (executedStep.execution?.status !== 'DONE') {
115
+ this.stopExecution(route);
116
+ }
117
+ if (stepExecutor.allowExecution) {
118
+ return route;
119
+ }
120
+ }
121
+ catch (e) {
122
+ this.stopExecution(route);
123
+ throw e;
124
+ }
75
125
  }
76
- });
77
- // Loop over steps and execute them
78
- for (let index = 0; index < route.steps.length; index++) {
126
+ delete this.executionDictionary[route.id];
127
+ return route;
128
+ }
129
+ });
130
+ Object.defineProperty(this, "updateRouteExecution", {
131
+ enumerable: true,
132
+ configurable: true,
133
+ writable: true,
134
+ value: (route, settings) => {
79
135
  const execution = this.executionDictionary[route.id];
80
- // Check if execution has stopped in the meantime
81
136
  if (!execution) {
82
- break;
137
+ return;
83
138
  }
84
- const step = route.steps[index];
85
- const previousStep = route.steps[index - 1];
86
- // Check if the step is already done
87
- //
88
- if (step.execution?.status === 'DONE') {
89
- continue;
139
+ for (const executor of execution.executors) {
140
+ executor.setInteraction({
141
+ allowInteraction: !settings.executeInBackground,
142
+ allowUpdates: true,
143
+ });
90
144
  }
91
- // Update amount using output of previous execution. In the future this should be handled by calling `updateRoute`
92
- if (previousStep?.execution?.toAmount) {
93
- step.action.fromAmount = previousStep.execution.toAmount;
145
+ execution.settings = {
146
+ ...execution.settings,
147
+ ...settings,
148
+ };
149
+ }
150
+ });
151
+ Object.defineProperty(this, "updateExecutionSettings", {
152
+ enumerable: true,
153
+ configurable: true,
154
+ writable: true,
155
+ value: (settings, route) => {
156
+ const execution = this.executionDictionary[route.id];
157
+ if (!execution) {
158
+ throw new errors_js_1.ValidationError("Can't set ExecutionSettings for the inactive route.");
94
159
  }
95
- try {
96
- const stepExecutor = new StepExecutor_1.StepExecutor(statusManager, execution.settings);
97
- execution.executors.push(stepExecutor);
98
- // Check if we want to execute this step in the background
99
- this.updateRouteExecution(route, execution.settings);
100
- const executedStep = await stepExecutor.executeStep(signer, step);
101
- // We may reach this point if user interaction isn't allowed. We want to stop execution until we resume it
102
- if (executedStep.execution?.status !== 'DONE') {
103
- this.stopExecution(route);
104
- }
105
- // Execution stopped during the current step, we don't want to continue to the next step so we return already
106
- if (stepExecutor.executionStopped) {
107
- return route;
108
- }
160
+ const config = this.configService.getConfig();
161
+ execution.settings = {
162
+ ...config.defaultExecutionSettings,
163
+ ...settings,
164
+ };
165
+ }
166
+ });
167
+ Object.defineProperty(this, "stopExecution", {
168
+ enumerable: true,
169
+ configurable: true,
170
+ writable: true,
171
+ value: (route) => {
172
+ const execution = this.executionDictionary[route.id];
173
+ if (!execution) {
174
+ return route;
109
175
  }
110
- catch (e) {
111
- this.stopExecution(route);
112
- throw e;
176
+ for (const executor of execution.executors) {
177
+ executor.setInteraction({
178
+ allowInteraction: false,
179
+ allowUpdates: false,
180
+ allowExecution: false,
181
+ });
113
182
  }
183
+ delete this.executionDictionary[route.id];
184
+ return route;
114
185
  }
115
- // Clean up after the execution
116
- delete this.executionDictionary[route.id];
117
- return route;
118
- };
119
- /**
120
- * Updates route execution to background or foreground state.
121
- * @param {Route} route - A route that is currently in execution.
122
- * @param {boolean} settings - An object with execution settings.
123
- */
124
- this.updateRouteExecution = (route, settings) => {
125
- const execution = this.executionDictionary[route.id];
126
- if (!execution) {
127
- return;
128
- }
129
- for (const executor of execution.executors) {
130
- executor.setInteraction({
131
- allowInteraction: !settings.executeInBackground,
132
- allowUpdates: true,
133
- });
134
- }
135
- // Update active route settings so we know what the current state of execution is
136
- execution.settings = {
137
- ...execution.settings,
138
- ...settings,
139
- };
140
- };
141
- /**
142
- * Update the ExecutionSettings for an active route.
143
- * @param {ExecutionSettings} settings - An object with execution settings.
144
- * @param {Route} route - The active route that gets the new execution settings.
145
- * @throws {ValidationError} Throws a ValidationError if parameters are invalid.
146
- */
147
- this.updateExecutionSettings = (settings, route) => {
148
- const execution = this.executionDictionary[route.id];
149
- if (!execution) {
150
- throw new errors_1.ValidationError("Can't set ExecutionSettings for the inactive route.");
151
- }
152
- const config = this.configService.getConfig();
153
- execution.settings = {
154
- ...config.defaultExecutionSettings,
155
- ...settings,
156
- };
157
- };
158
- /**
159
- * Executes a route until a user interaction is necessary (signing transactions, etc.) and then halts until the route is resumed.
160
- * @param {Route} route - A route that is currently in execution.
161
- * @deprecated use updateRouteExecution instead.
162
- */
163
- this.moveExecutionToBackground = (route) => {
164
- const execution = this.executionDictionary[route.id];
165
- if (!execution) {
166
- return;
167
- }
168
- for (const executor of execution.executors) {
169
- executor.setInteraction({ allowInteraction: false, allowUpdates: true });
186
+ });
187
+ Object.defineProperty(this, "getActiveRoutes", {
188
+ enumerable: true,
189
+ configurable: true,
190
+ writable: true,
191
+ value: () => {
192
+ return Object.values(this.executionDictionary)
193
+ .map((dict) => dict?.route)
194
+ .filter(Boolean);
170
195
  }
171
- execution.settings = {
172
- ...execution.settings,
173
- executeInBackground: true,
174
- };
175
- };
176
- /**
177
- * Stops the execution of an active route.
178
- * @param {Route} route - A route that is currently in execution.
179
- * @return {Route} The stopped route.
180
- */
181
- this.stopExecution = (route) => {
182
- const execution = this.executionDictionary[route.id];
183
- if (!execution) {
184
- return route;
196
+ });
197
+ Object.defineProperty(this, "getActiveRoute", {
198
+ enumerable: true,
199
+ configurable: true,
200
+ writable: true,
201
+ value: (route) => {
202
+ return this.executionDictionary[route.id]?.route;
185
203
  }
186
- for (const executor of execution.executors) {
187
- executor.setInteraction({
188
- allowInteraction: false,
189
- allowUpdates: false,
190
- stopExecution: true,
191
- });
204
+ });
205
+ Object.defineProperty(this, "getProvider", {
206
+ enumerable: true,
207
+ configurable: true,
208
+ writable: true,
209
+ value: (type) => {
210
+ return this.providers?.find((provider) => provider.type === type);
192
211
  }
193
- delete this.executionDictionary[route.id];
194
- return route;
195
- };
196
- /**
197
- * Get the list of active routes.
198
- * @return {Route[]} A list of routes.
199
- */
200
- this.getActiveRoutes = () => {
201
- return Object.values(this.executionDictionary)
202
- .map((dict) => dict?.route)
203
- .filter(Boolean);
204
- };
205
- /**
206
- * Return the current route information for given route. The route has to be active.
207
- * @param {Route} route - A route object.
208
- * @return {Route} The updated route.
209
- */
210
- this.getActiveRoute = (route) => {
211
- return this.executionDictionary[route.id]?.route;
212
- };
213
- this.configService = ConfigService_1.default.getInstance();
214
- if (configUpdate) {
215
- // Update API urls before we request chains
216
- this.configService.updateConfig(configUpdate);
217
- }
212
+ });
213
+ this.configService = ConfigService_js_1.ConfigService.getInstance();
214
+ this.configService.updateConfig(options);
215
+ this.providers = options.providers;
218
216
  }
219
217
  }
220
218
  exports.RouteExecutionManager = RouteExecutionManager;
219
+ //# sourceMappingURL=RouteExecutionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouteExecutionManager.js","sourceRoot":"","sources":["../../../src/execution/RouteExecutionManager.ts"],"names":[],"mappings":";;;AAGA,mEAA4D;AAE5D,kDAAoD;AACpD,yDAAkD;AAClD,2DAAoD;AAQpD,MAAa,qBAAqB;IAMhC,YAAY,OAAmB;QALvB;;;;mBAAgD,EAAE;WAAA;QAClD;;;;mBAA8D,EAAE;WAAA;QAC9D;;;;;WAA4B;QAC9B;;;;;WAAyB;QAejC;;;;mBAAe,KAAK,EAClB,KAAY,EACZ,QAA4B,EACZ,EAAE;gBAElB,MAAM,WAAW,GAAG,eAAe,CAAQ,KAAK,CAAC,CAAA;gBAEjD,IAAI,gBAAgB,GAAG,IAAI,CAAC,0BAA0B,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;gBAEtE,IAAI,gBAAgB,EAAE;oBACpB,OAAO,gBAAgB,CAAA;iBACxB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