@lifi/sdk 3.0.0-alpha.1 → 3.0.0-alpha.11

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 (349) hide show
  1. package/dist/cjs/LiFi.js +222 -261
  2. package/dist/cjs/LiFi.js.map +1 -0
  3. package/dist/cjs/allowance/getAllowance.js +13 -16
  4. package/dist/cjs/allowance/getAllowance.js.map +1 -0
  5. package/dist/cjs/allowance/index.js +5 -17
  6. package/dist/cjs/allowance/index.js.map +1 -0
  7. package/dist/cjs/allowance/setAllowance.js +33 -18
  8. package/dist/cjs/allowance/setAllowance.js.map +1 -0
  9. package/dist/cjs/allowance/types.js +1 -0
  10. package/dist/cjs/allowance/types.js.map +1 -0
  11. package/dist/cjs/balance/getBalance.js +14 -14
  12. package/dist/cjs/balance/getBalance.js.map +1 -0
  13. package/dist/cjs/balance/getTokenBalance.js +3 -3
  14. package/dist/cjs/balance/getTokenBalance.js.map +1 -0
  15. package/dist/cjs/balance/index.js +4 -16
  16. package/dist/cjs/balance/index.js.map +1 -0
  17. package/dist/cjs/connectors.js +7 -35
  18. package/dist/cjs/connectors.js.map +1 -0
  19. package/dist/cjs/constants.js +2 -4
  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 -179
  26. package/dist/cjs/execution/RouteExecutionManager.js.map +1 -0
  27. package/dist/cjs/execution/StatusManager.js +142 -135
  28. package/dist/cjs/execution/StatusManager.js.map +1 -0
  29. package/dist/cjs/execution/StepExecutionManager.js +223 -229
  30. package/dist/cjs/execution/StepExecutionManager.js.map +1 -0
  31. package/dist/cjs/execution/checkAllowance.js +9 -10
  32. package/dist/cjs/execution/checkAllowance.js.map +1 -0
  33. package/dist/cjs/execution/checkBalance.js +5 -5
  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 +6 -8
  38. package/dist/cjs/execution/multisig.js.map +1 -0
  39. package/dist/cjs/execution/prepareRestart.js +2 -44
  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 +4 -21
  44. package/dist/cjs/execution/switchChain.js.map +1 -0
  45. package/dist/cjs/{types/internal.types.js → execution/types.js} +1 -0
  46. package/dist/cjs/execution/types.js.map +1 -0
  47. package/dist/cjs/execution/utils.js +1 -9
  48. package/dist/cjs/execution/utils.js.map +1 -0
  49. package/dist/cjs/execution/waitForReceivingTransaction.js +9 -11
  50. package/dist/cjs/execution/waitForReceivingTransaction.js.map +1 -0
  51. package/dist/cjs/helpers.js +11 -25
  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 +19 -16
  65. package/dist/cjs/request.js.map +1 -0
  66. package/dist/cjs/services/ApiService.js +72 -90
  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 -65
  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 +1 -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 +25 -3
  81. package/dist/cjs/utils/errors.js.map +1 -0
  82. package/dist/cjs/utils/getMaxPriorityFeePerGas.js +3 -2
  83. package/dist/cjs/utils/getMaxPriorityFeePerGas.js.map +1 -0
  84. package/dist/cjs/utils/index.js +7 -19
  85. package/dist/cjs/utils/index.js.map +1 -0
  86. package/dist/cjs/utils/median.js +1 -0
  87. package/dist/cjs/utils/median.js.map +1 -0
  88. package/dist/cjs/utils/parseError.js +39 -79
  89. package/dist/cjs/utils/parseError.js.map +1 -0
  90. package/dist/cjs/utils/utils.js +5 -11
  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/{allowance → esm/allowance}/getAllowance.js +5 -4
  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/{allowance → esm/allowance}/setAllowance.js +28 -11
  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/{balance → esm/balance}/getBalance.js +5 -5
  105. package/dist/esm/balance/getBalance.js.map +1 -0
  106. package/dist/{balance → esm/balance}/getTokenBalance.js +2 -1
  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/{connectors.js → esm/connectors.js} +3 -2
  111. package/dist/esm/connectors.js.map +1 -0
  112. package/dist/{constants.js → esm/constants.js} +1 -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/{execution → esm/execution}/checkAllowance.js +5 -4
  125. package/dist/esm/execution/checkAllowance.js.map +1 -0
  126. package/dist/{execution → esm/execution}/checkBalance.js +3 -2
  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/{execution → esm/execution}/multisig.js +3 -2
  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 +4 -3
  135. package/dist/esm/execution/stepComparison.js.map +1 -0
  136. package/dist/{execution → esm/execution}/switchChain.js +3 -1
  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/{execution → esm/execution}/utils.js +1 -0
  141. package/dist/esm/execution/utils.js.map +1 -0
  142. package/dist/{execution → esm/execution}/waitForReceivingTransaction.js +5 -4
  143. package/dist/esm/execution/waitForReceivingTransaction.js.map +1 -0
  144. package/dist/{helpers.js → esm/helpers.js} +4 -3
  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} +16 -9
  158. package/dist/esm/request.js.map +1 -0
  159. package/dist/{services → esm/services}/ApiService.js +29 -28
  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/{types → esm/types}/abi.js +1 -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 +25 -0
  174. package/dist/esm/utils/errors.js.map +1 -0
  175. package/dist/{utils → esm/utils}/getMaxPriorityFeePerGas.js +2 -1
  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/{utils → esm/utils}/median.js +1 -0
  180. package/dist/esm/utils/median.js.map +1 -0
  181. package/dist/{utils → esm/utils}/parseError.js +4 -3
  182. package/dist/esm/utils/parseError.js.map +1 -0
  183. package/dist/{utils → esm/utils}/utils.js +2 -1
  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/{LiFi.d.ts → types/LiFi.d.ts} +29 -21
  188. package/dist/types/LiFi.d.ts.map +1 -0
  189. package/dist/{cjs → types}/allowance/getAllowance.d.ts +2 -1
  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/{allowance → types/allowance}/types.d.ts +1 -0
  196. package/dist/types/allowance/types.d.ts.map +1 -0
  197. package/dist/{balance → types/balance}/getBalance.d.ts +1 -0
  198. package/dist/types/balance/getBalance.d.ts.map +1 -0
  199. package/dist/{balance → types/balance}/getTokenBalance.d.ts +1 -0
  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/{cjs → types}/connectors.d.ts +2 -1
  204. package/dist/types/connectors.d.ts.map +1 -0
  205. package/dist/{cjs → types}/constants.d.ts +1 -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/{cjs → types}/execution/RouteExecutionManager.d.ts +10 -8
  212. package/dist/types/execution/RouteExecutionManager.d.ts.map +1 -0
  213. package/dist/{execution → types/execution}/StatusManager.d.ts +9 -7
  214. package/dist/types/execution/StatusManager.d.ts.map +1 -0
  215. package/dist/{execution → types/execution}/StepExecutionManager.d.ts +4 -3
  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/{cjs → types}/execution/stepComparison.d.ts +6 -4
  228. package/dist/types/execution/stepComparison.d.ts.map +1 -0
  229. package/dist/{cjs → types}/execution/switchChain.d.ts +6 -4
  230. package/dist/types/execution/switchChain.d.ts.map +1 -0
  231. package/dist/types/{internal.types.d.ts → execution/types.d.ts} +38 -98
  232. package/dist/types/execution/types.d.ts.map +1 -0
  233. package/dist/{execution → types/execution}/utils.d.ts +3 -2
  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/{helpers.d.ts → types/helpers.d.ts} +4 -3
  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/{services → types/services}/ApiService.d.ts +5 -5
  252. package/dist/types/services/ApiService.d.ts.map +1 -0
  253. package/dist/{cjs → types}/services/ChainsService.d.ts +2 -1
  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/{cjs → types}/types/abi.d.ts +1 -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 +1 -0
  266. package/dist/types/utils/errors.d.ts.map +1 -0
  267. package/dist/{cjs → types}/utils/getMaxPriorityFeePerGas.d.ts +1 -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/{cjs → types}/utils/median.d.ts +1 -0
  272. package/dist/types/utils/median.d.ts.map +1 -0
  273. package/dist/{cjs → types}/utils/parseError.d.ts +6 -5
  274. package/dist/types/utils/parseError.d.ts.map +1 -0
  275. package/dist/{cjs → types}/utils/utils.d.ts +1 -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 -96
  280. package/dist/LiFi.js +0 -246
  281. package/dist/allowance/getAllowance.d.ts +0 -6
  282. package/dist/allowance/index.d.ts +0 -3
  283. package/dist/allowance/index.js +0 -3
  284. package/dist/allowance/setAllowance.d.ts +0 -5
  285. package/dist/allowance/types.js +0 -1
  286. package/dist/balance/index.d.ts +0 -2
  287. package/dist/balance/index.js +0 -2
  288. package/dist/cjs/LiFi.d.ts +0 -171
  289. package/dist/cjs/allowance/index.d.ts +0 -3
  290. package/dist/cjs/allowance/setAllowance.d.ts +0 -5
  291. package/dist/cjs/allowance/types.d.ts +0 -27
  292. package/dist/cjs/balance/getBalance.d.ts +0 -2
  293. package/dist/cjs/balance/getTokenBalance.d.ts +0 -8
  294. package/dist/cjs/balance/index.d.ts +0 -2
  295. package/dist/cjs/execution/StatusManager.d.ts +0 -67
  296. package/dist/cjs/execution/StepExecutionManager.d.ts +0 -7
  297. package/dist/cjs/execution/StepExecutor.d.ts +0 -15
  298. package/dist/cjs/execution/StepExecutor.js +0 -62
  299. package/dist/cjs/execution/checkAllowance.d.ts +0 -4
  300. package/dist/cjs/execution/checkBalance.d.ts +0 -2
  301. package/dist/cjs/execution/index.d.ts +0 -1
  302. package/dist/cjs/execution/multisig.d.ts +0 -4
  303. package/dist/cjs/execution/prepareRestart.d.ts +0 -3
  304. package/dist/cjs/execution/utils.d.ts +0 -12
  305. package/dist/cjs/execution/waitForReceivingTransaction.d.ts +0 -3
  306. package/dist/cjs/helpers.d.ts +0 -18
  307. package/dist/cjs/index.d.ts +0 -5
  308. package/dist/cjs/request.d.ts +0 -9
  309. package/dist/cjs/services/ApiService.d.ts +0 -17
  310. package/dist/cjs/services/ConfigService.d.ts +0 -23
  311. package/dist/cjs/types/index.d.ts +0 -4
  312. package/dist/cjs/types/internal.types.d.ts +0 -143
  313. package/dist/cjs/utils/index.d.ts +0 -5
  314. package/dist/cjs/version.d.ts +0 -2
  315. package/dist/connectors.d.ts +0 -8
  316. package/dist/constants.d.ts +0 -6
  317. package/dist/execution/RouteExecutionManager.d.ts +0 -59
  318. package/dist/execution/RouteExecutionManager.js +0 -195
  319. package/dist/execution/StatusManager.js +0 -167
  320. package/dist/execution/StepExecutionManager.js +0 -260
  321. package/dist/execution/StepExecutor.d.ts +0 -15
  322. package/dist/execution/StepExecutor.js +0 -58
  323. package/dist/execution/checkAllowance.d.ts +0 -4
  324. package/dist/execution/checkBalance.d.ts +0 -2
  325. package/dist/execution/index.d.ts +0 -1
  326. package/dist/execution/index.js +0 -1
  327. package/dist/execution/multisig.d.ts +0 -4
  328. package/dist/execution/prepareRestart.d.ts +0 -3
  329. package/dist/execution/prepareRestart.js +0 -61
  330. package/dist/execution/stepComparison.d.ts +0 -14
  331. package/dist/execution/switchChain.d.ts +0 -21
  332. package/dist/execution/waitForReceivingTransaction.d.ts +0 -3
  333. package/dist/index.d.ts +0 -5
  334. package/dist/index.js +0 -6
  335. package/dist/services/ChainsService.d.ts +0 -11
  336. package/dist/services/ConfigService.js +0 -99
  337. package/dist/typeguards.d.ts +0 -4
  338. package/dist/types/abi.d.ts +0 -5
  339. package/dist/types/index.js +0 -4
  340. package/dist/types/internal.types.js +0 -1
  341. package/dist/utils/errors.d.ts +0 -107
  342. package/dist/utils/getMaxPriorityFeePerGas.d.ts +0 -2
  343. package/dist/utils/index.d.ts +0 -5
  344. package/dist/utils/index.js +0 -5
  345. package/dist/utils/median.d.ts +0 -1
  346. package/dist/utils/parseError.d.ts +0 -37
  347. package/dist/utils/utils.d.ts +0 -10
  348. package/dist/version.d.ts +0 -2
  349. package/dist/version.js +0 -2
@@ -1,202 +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 StatusManager_1 = require("./StatusManager");
10
- const StepExecutor_1 = require("./StepExecutor");
11
- const prepareRestart_1 = require("./prepareRestart");
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 walletClient - The walletClient required to send the transactions.
19
- * @param route - The route that should be executed. Cannot be an active route.
20
- * @param settings - An object containing settings and callbacks.
21
- * @returns The executed route.
22
- * @throws {LiFiError} Throws a LiFiError if the execution fails.
23
- */
24
- this.executeRoute = async (walletClient, 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(walletClient, 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 walletClient - The walletClient required to send the transactions.
39
- * @param route - The route that is to be executed. Cannot be an active route.
40
- * @param settings - An object containing settings and callbacks.
41
- * @returns The executed route.
42
- * @throws {LiFiError} Throws a LiFiError if the execution fails.
43
- */
44
- this.resumeRoute = async (walletClient, 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, prepareRestart_1.prepareRestart)(clonedRoute, walletClient);
60
- const executionPromise = this.executeSteps(walletClient, clonedRoute, settings);
61
- this.executionPromiseDictionary[clonedRoute.id] = executionPromise;
62
- return executionPromise;
63
- };
64
- this.executeSteps = async (walletClient, 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(walletClient, 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 - A route that is currently in execution.
122
- * @param 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 settings - An object with execution settings.
144
- * @param 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.");
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);
151
195
  }
152
- const config = this.configService.getConfig();
153
- execution.settings = {
154
- ...config.defaultExecutionSettings,
155
- ...settings,
156
- };
157
- };
158
- /**
159
- * Stops the execution of an active route.
160
- * @param route - A route that is currently in execution.
161
- * @returns The stopped route.
162
- */
163
- this.stopExecution = (route) => {
164
- const execution = this.executionDictionary[route.id];
165
- if (!execution) {
166
- 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;
167
203
  }
168
- for (const executor of execution.executors) {
169
- executor.setInteraction({
170
- allowInteraction: false,
171
- allowUpdates: false,
172
- stopExecution: true,
173
- });
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);
174
211
  }
175
- delete this.executionDictionary[route.id];
176
- return route;
177
- };
178
- /**
179
- * Get the list of active routes.
180
- * @returns A list of routes.
181
- */
182
- this.getActiveRoutes = () => {
183
- return Object.values(this.executionDictionary)
184
- .map((dict) => dict?.route)
185
- .filter(Boolean);
186
- };
187
- /**
188
- * Return the current route information for given route. The route has to be active.
189
- * @param route - A route object.
190
- * @returns The updated route.
191
- */
192
- this.getActiveRoute = (route) => {
193
- return this.executionDictionary[route.id]?.route;
194
- };
195
- this.configService = ConfigService_1.default.getInstance();
196
- if (configUpdate) {
197
- // Update API urls before we request chains
198
- this.configService.updateConfig(configUpdate);
199
- }
212
+ });
213
+ this.configService = ConfigService_js_1.ConfigService.getInstance();
214
+ this.configService.updateConfig(options);
215
+ this.providers = options.providers;
200
216
  }
201
217
  }
202
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,C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