@lifi/sdk-provider-ethereum 4.2.12 → 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 (577) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/cjs/EthereumProvider.d.ts +1 -4
  3. package/dist/cjs/EthereumProvider.js +1 -2
  4. package/dist/cjs/actions/checkPermitSupport.d.ts +1 -4
  5. package/dist/cjs/actions/checkPermitSupport.js +5 -6
  6. package/dist/cjs/actions/checkPermitSupport.js.map +1 -1
  7. package/dist/cjs/actions/constants.d.ts +1 -4
  8. package/dist/cjs/actions/constants.js +1 -2
  9. package/dist/cjs/actions/getAccountCode.d.ts +1 -4
  10. package/dist/cjs/actions/getAccountCode.js +1 -2
  11. package/dist/cjs/actions/getAllowance.d.ts +2 -5
  12. package/dist/cjs/actions/getAllowance.js +6 -7
  13. package/dist/cjs/actions/getAllowance.js.map +1 -1
  14. package/dist/cjs/actions/getEthereumBalance.d.ts +1 -4
  15. package/dist/cjs/actions/getEthereumBalance.js +1 -2
  16. package/dist/cjs/actions/getMaxPriorityFeePerGas.d.ts +1 -4
  17. package/dist/cjs/actions/getMaxPriorityFeePerGas.js +3 -4
  18. package/dist/cjs/actions/getMaxPriorityFeePerGas.js.map +1 -1
  19. package/dist/cjs/actions/getMulticallAddress.d.ts +1 -4
  20. package/dist/cjs/actions/getMulticallAddress.js +1 -2
  21. package/dist/cjs/actions/isBatchingSupported.d.ts +1 -4
  22. package/dist/cjs/actions/isBatchingSupported.js +1 -2
  23. package/dist/cjs/actions/isSafeSignature.d.ts +2 -5
  24. package/dist/cjs/actions/isSafeSignature.js +3 -3
  25. package/dist/cjs/actions/isSafeSignature.js.map +1 -1
  26. package/dist/cjs/actions/isSafeWallet.d.ts +1 -4
  27. package/dist/cjs/actions/isSafeWallet.js +2 -3
  28. package/dist/cjs/actions/isSmartContractWallet.d.ts +1 -4
  29. package/dist/cjs/actions/isSmartContractWallet.js +1 -2
  30. package/dist/cjs/actions/resolveENSAddress.d.ts +1 -4
  31. package/dist/cjs/actions/resolveENSAddress.js +1 -2
  32. package/dist/cjs/actions/resolveEthereumAddress.d.ts +1 -4
  33. package/dist/cjs/actions/resolveEthereumAddress.js +1 -2
  34. package/dist/cjs/actions/resolveTransactionHash.d.ts +1 -4
  35. package/dist/cjs/actions/resolveTransactionHash.js +7 -4
  36. package/dist/cjs/actions/resolveTransactionHash.js.map +1 -1
  37. package/dist/cjs/actions/resolveUNSAddress.d.ts +1 -4
  38. package/dist/cjs/actions/resolveUNSAddress.js +2 -3
  39. package/dist/cjs/actions/setAllowance.d.ts +3 -6
  40. package/dist/cjs/actions/setAllowance.js +10 -7
  41. package/dist/cjs/actions/setAllowance.js.map +1 -1
  42. package/dist/cjs/actions/waitForBatchTransactionReceipt.d.ts +1 -4
  43. package/dist/cjs/actions/waitForBatchTransactionReceipt.js +1 -2
  44. package/dist/cjs/actions/waitForRelayedTransactionReceipt.d.ts +2 -5
  45. package/dist/cjs/actions/waitForRelayedTransactionReceipt.js +50 -12
  46. package/dist/cjs/actions/waitForRelayedTransactionReceipt.js.map +1 -1
  47. package/dist/cjs/actions/waitForSafeTransactionExecution.d.ts +1 -4
  48. package/dist/cjs/actions/waitForSafeTransactionExecution.js +2 -3
  49. package/dist/cjs/actions/waitForTransactionReceipt.d.ts +1 -4
  50. package/dist/cjs/actions/waitForTransactionReceipt.js +1 -2
  51. package/dist/cjs/client/publicClient.d.ts +1 -4
  52. package/dist/cjs/client/publicClient.js +1 -2
  53. package/dist/cjs/client/safeClient.d.ts +1 -4
  54. package/dist/cjs/client/safeClient.js +1 -2
  55. package/dist/cjs/client/types.d.ts +1 -4
  56. package/dist/cjs/core/EthereumStepExecutor.d.ts +1 -4
  57. package/dist/cjs/core/EthereumStepExecutor.js +6 -7
  58. package/dist/cjs/core/EthereumStepExecutor.js.map +1 -1
  59. package/dist/cjs/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts +1 -4
  60. package/dist/cjs/core/tasks/EthereumBatchedSignAndExecuteTask.js +5 -3
  61. package/dist/cjs/core/tasks/EthereumBatchedSignAndExecuteTask.js.map +1 -1
  62. package/dist/cjs/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts +1 -4
  63. package/dist/cjs/core/tasks/EthereumBatchedWaitForTransactionTask.js +1 -2
  64. package/dist/cjs/core/tasks/EthereumBatchedWaitForTransactionTask.js.map +1 -1
  65. package/dist/cjs/core/tasks/EthereumCheckAllowanceAfterPrepareTask.d.ts +1 -4
  66. package/dist/cjs/core/tasks/EthereumCheckAllowanceAfterPrepareTask.js +1 -2
  67. package/dist/cjs/core/tasks/EthereumCheckAllowanceAfterPrepareTask.js.map +1 -1
  68. package/dist/cjs/core/tasks/EthereumCheckAllowanceTask.d.ts +1 -4
  69. package/dist/cjs/core/tasks/EthereumCheckAllowanceTask.js +3 -4
  70. package/dist/cjs/core/tasks/EthereumCheckAllowanceTask.js.map +1 -1
  71. package/dist/cjs/core/tasks/EthereumCheckBalanceTask.d.ts +1 -4
  72. package/dist/cjs/core/tasks/EthereumCheckBalanceTask.js +3 -3
  73. package/dist/cjs/core/tasks/EthereumCheckBalanceTask.js.map +1 -1
  74. package/dist/cjs/core/tasks/EthereumCheckPermitsTask.d.ts +1 -4
  75. package/dist/cjs/core/tasks/EthereumCheckPermitsTask.js +2 -3
  76. package/dist/cjs/core/tasks/EthereumNativePermitTask.d.ts +1 -4
  77. package/dist/cjs/core/tasks/EthereumNativePermitTask.js +5 -6
  78. package/dist/cjs/core/tasks/EthereumNativePermitTask.js.map +1 -1
  79. package/dist/cjs/core/tasks/EthereumPermit2AllowanceTask.d.ts +1 -4
  80. package/dist/cjs/core/tasks/EthereumPermit2AllowanceTask.js +1 -2
  81. package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.d.ts +1 -4
  82. package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.js +7 -6
  83. package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.js.map +1 -1
  84. package/dist/cjs/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts +1 -4
  85. package/dist/cjs/core/tasks/EthereumRelayedSignAndExecuteTask.js +3 -4
  86. package/dist/cjs/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts +1 -4
  87. package/dist/cjs/core/tasks/EthereumRelayedWaitForTransactionTask.js +2 -3
  88. package/dist/cjs/core/tasks/EthereumRelayedWaitForTransactionTask.js.map +1 -1
  89. package/dist/cjs/core/tasks/EthereumResetAllowanceTask.d.ts +1 -4
  90. package/dist/cjs/core/tasks/EthereumResetAllowanceTask.js +6 -6
  91. package/dist/cjs/core/tasks/EthereumResetAllowanceTask.js.map +1 -1
  92. package/dist/cjs/core/tasks/EthereumSetAllowanceTask.d.ts +1 -4
  93. package/dist/cjs/core/tasks/EthereumSetAllowanceTask.js +7 -7
  94. package/dist/cjs/core/tasks/EthereumSetAllowanceTask.js.map +1 -1
  95. package/dist/cjs/core/tasks/EthereumSignAndExecuteTask.d.ts +1 -4
  96. package/dist/cjs/core/tasks/EthereumSignAndExecuteTask.js +2 -3
  97. package/dist/cjs/core/tasks/EthereumSignAndExecuteTask.js.map +1 -1
  98. package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.d.ts +1 -4
  99. package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.js +6 -6
  100. package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.js.map +1 -1
  101. package/dist/cjs/core/tasks/EthereumStandardWaitForTransactionTask.d.ts +1 -4
  102. package/dist/cjs/core/tasks/EthereumStandardWaitForTransactionTask.js +1 -2
  103. package/dist/cjs/core/tasks/EthereumStandardWaitForTransactionTask.js.map +1 -1
  104. package/dist/cjs/core/tasks/EthereumWaitForTransactionStatusTask.d.ts +1 -4
  105. package/dist/cjs/core/tasks/EthereumWaitForTransactionStatusTask.js +1 -2
  106. package/dist/cjs/core/tasks/EthereumWaitForTransactionTask.d.ts +1 -4
  107. package/dist/cjs/core/tasks/EthereumWaitForTransactionTask.js +2 -3
  108. package/dist/cjs/core/tasks/helpers/estimateTransactionRequest.d.ts +1 -4
  109. package/dist/cjs/core/tasks/helpers/estimateTransactionRequest.js +3 -4
  110. package/dist/cjs/core/tasks/helpers/estimateTransactionRequest.js.map +1 -1
  111. package/dist/cjs/core/tasks/helpers/findSignedNativePermit.d.ts +1 -4
  112. package/dist/cjs/core/tasks/helpers/findSignedNativePermit.js +2 -3
  113. package/dist/cjs/core/tasks/helpers/getApprovalAmount.d.ts +1 -4
  114. package/dist/cjs/core/tasks/helpers/getApprovalAmount.js +2 -3
  115. package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.d.ts +1 -4
  116. package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.js +6 -4
  117. package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.js.map +1 -1
  118. package/dist/cjs/core/tasks/helpers/getTxLink.d.ts +1 -4
  119. package/dist/cjs/core/tasks/helpers/getTxLink.js +1 -2
  120. package/dist/cjs/core/tasks/helpers/getUpdatedStep.d.ts +10 -5
  121. package/dist/cjs/core/tasks/helpers/getUpdatedStep.js +11 -20
  122. package/dist/cjs/core/tasks/helpers/getUpdatedStep.js.map +1 -1
  123. package/dist/cjs/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.d.ts +1 -4
  124. package/dist/cjs/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.js +1 -2
  125. package/dist/cjs/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts +1 -4
  126. package/dist/cjs/core/tasks/helpers/hasPermit2AllowanceInFlight.js +1 -2
  127. package/dist/cjs/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.d.ts +1 -4
  128. package/dist/cjs/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.js +1 -2
  129. package/dist/cjs/core/tasks/helpers/isTypedDataAlreadySigned.d.ts +1 -4
  130. package/dist/cjs/core/tasks/helpers/isTypedDataAlreadySigned.js +1 -2
  131. package/dist/cjs/core/tasks/helpers/preservePermit2Allowances.d.ts +1 -4
  132. package/dist/cjs/core/tasks/helpers/preservePermit2Allowances.js +1 -2
  133. package/dist/cjs/core/tasks/helpers/resolveAllowanceSpender.d.ts +1 -4
  134. package/dist/cjs/core/tasks/helpers/resolveAllowanceSpender.js +1 -2
  135. package/dist/cjs/core/tasks/helpers/resolvePermit2Support.d.ts +1 -4
  136. package/dist/cjs/core/tasks/helpers/resolvePermit2Support.js +1 -2
  137. package/dist/cjs/core/tasks/helpers/shouldCheckForAllowance.d.ts +1 -4
  138. package/dist/cjs/core/tasks/helpers/shouldCheckForAllowance.js +2 -2
  139. package/dist/cjs/core/tasks/helpers/shouldCheckForAllowance.js.map +1 -1
  140. package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.d.ts +1 -4
  141. package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.js +3 -4
  142. package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.js.map +1 -1
  143. package/dist/cjs/core/tasks/helpers/signTypedDataEntries.d.ts +1 -4
  144. package/dist/cjs/core/tasks/helpers/signTypedDataEntries.js +1 -2
  145. package/dist/cjs/core/tasks/helpers/signTypedDataEntries.js.map +1 -1
  146. package/dist/cjs/core/tasks/helpers/switchChain.d.ts +1 -4
  147. package/dist/cjs/core/tasks/helpers/switchChain.js +1 -2
  148. package/dist/cjs/core/tasks/helpers/updateActionWithReceipt.d.ts +1 -4
  149. package/dist/cjs/core/tasks/helpers/updateActionWithReceipt.js +1 -2
  150. package/dist/cjs/errors/parseEthereumErrors.d.ts +1 -4
  151. package/dist/cjs/errors/parseEthereumErrors.js +3 -3
  152. package/dist/cjs/errors/parseEthereumErrors.js.map +1 -1
  153. package/dist/cjs/hyperliquid/agentWallet.d.ts +1 -4
  154. package/dist/cjs/hyperliquid/agentWallet.js +1 -2
  155. package/dist/cjs/hyperliquid/isHyperliquidAgentStep.d.ts +1 -4
  156. package/dist/cjs/hyperliquid/isHyperliquidAgentStep.js +1 -2
  157. package/dist/cjs/index.d.ts +2 -2
  158. package/dist/cjs/index.js +8 -8
  159. package/dist/cjs/permits/acceptsRawEcdsaSignature.d.ts +1 -4
  160. package/dist/cjs/permits/acceptsRawEcdsaSignature.js +1 -2
  161. package/dist/cjs/permits/allowanceTransfer.d.ts +1 -4
  162. package/dist/cjs/permits/allowanceTransfer.js +1 -2
  163. package/dist/cjs/permits/allowanceTransfer.js.map +1 -1
  164. package/dist/cjs/permits/canAccountUseNativePermits.d.ts +1 -4
  165. package/dist/cjs/permits/canAccountUseNativePermits.js +1 -2
  166. package/dist/cjs/permits/canAccountUsePermit2.d.ts +1 -4
  167. package/dist/cjs/permits/canAccountUsePermit2.js +1 -2
  168. package/dist/cjs/permits/constants.d.ts +1 -4
  169. package/dist/cjs/permits/constants.js +1 -2
  170. package/dist/cjs/permits/domain.d.ts +1 -4
  171. package/dist/cjs/permits/domain.js +1 -2
  172. package/dist/cjs/permits/encodeNativePermitData.d.ts +1 -4
  173. package/dist/cjs/permits/encodeNativePermitData.js +1 -2
  174. package/dist/cjs/permits/encodePermit2Data.d.ts +1 -4
  175. package/dist/cjs/permits/encodePermit2Data.js +1 -2
  176. package/dist/cjs/permits/getNativePermit.d.ts +1 -4
  177. package/dist/cjs/permits/getNativePermit.js +7 -8
  178. package/dist/cjs/permits/getNativePermit.js.map +1 -1
  179. package/dist/cjs/permits/getPermitTransferFromValues.d.ts +1 -4
  180. package/dist/cjs/permits/getPermitTransferFromValues.js +2 -3
  181. package/dist/cjs/permits/getPermitTransferFromValues.js.map +1 -1
  182. package/dist/cjs/permits/invariant.d.ts +1 -4
  183. package/dist/cjs/permits/invariant.js +1 -2
  184. package/dist/cjs/permits/isDelegationDesignatorCode.d.ts +1 -4
  185. package/dist/cjs/permits/isDelegationDesignatorCode.js +1 -2
  186. package/dist/cjs/permits/isNativePermitValid.d.ts +1 -4
  187. package/dist/cjs/permits/isNativePermitValid.js +2 -3
  188. package/dist/cjs/permits/isNativePermitValid.js.map +1 -1
  189. package/dist/cjs/permits/signPermit2Message.d.ts +1 -4
  190. package/dist/cjs/permits/signPermit2Message.js +1 -2
  191. package/dist/cjs/permits/signPermit2Message.js.map +1 -1
  192. package/dist/cjs/permits/signatureTransfer.d.ts +1 -4
  193. package/dist/cjs/permits/signatureTransfer.js +1 -2
  194. package/dist/cjs/permits/signatureTransfer.js.map +1 -1
  195. package/dist/cjs/permits/types.d.ts +1 -4
  196. package/dist/cjs/types.d.ts +7 -4
  197. package/dist/cjs/types.js +1 -2
  198. package/dist/cjs/types.js.map +1 -1
  199. package/dist/cjs/utils/abi.d.ts +1 -4
  200. package/dist/cjs/utils/abi.js +1 -2
  201. package/dist/cjs/utils/convertExtendedChain.d.ts +1 -4
  202. package/dist/cjs/utils/convertExtendedChain.js +1 -2
  203. package/dist/cjs/utils/getActionWithFallback.d.ts +2 -4
  204. package/dist/cjs/utils/getActionWithFallback.js +3 -4
  205. package/dist/cjs/utils/getActionWithFallback.js.map +1 -1
  206. package/dist/cjs/utils/getDomainChainId.d.ts +1 -4
  207. package/dist/cjs/utils/getDomainChainId.js +1 -2
  208. package/dist/cjs/utils/getSafeApiKey.d.ts +1 -4
  209. package/dist/cjs/utils/getSafeApiKey.js +1 -2
  210. package/dist/cjs/utils/getSendChain.d.ts +2 -0
  211. package/dist/cjs/utils/getSendChain.js +6 -0
  212. package/dist/cjs/utils/getSendChain.js.map +1 -0
  213. package/dist/cjs/utils/getTypedDataLane.d.ts +1 -4
  214. package/dist/cjs/utils/getTypedDataLane.js +1 -2
  215. package/dist/cjs/utils/isContractCallStep.d.ts +1 -4
  216. package/dist/cjs/utils/isContractCallStep.js +1 -2
  217. package/dist/cjs/utils/isExtendedChain.d.ts +1 -4
  218. package/dist/cjs/utils/isExtendedChain.js +1 -2
  219. package/dist/cjs/utils/isGaslessStep.d.ts +8 -4
  220. package/dist/cjs/utils/isGaslessStep.js +8 -2
  221. package/dist/cjs/utils/isGaslessStep.js.map +1 -1
  222. package/dist/cjs/utils/isValidSignature.d.ts +1 -4
  223. package/dist/cjs/utils/isValidSignature.js +1 -2
  224. package/dist/cjs/utils/isZeroAddress.d.ts +1 -4
  225. package/dist/cjs/utils/isZeroAddress.js +1 -2
  226. package/dist/cjs/utils/median.d.ts +1 -4
  227. package/dist/cjs/utils/median.js +1 -2
  228. package/dist/cjs/version.d.ts +1 -4
  229. package/dist/cjs/version.js +2 -3
  230. package/dist/cjs/version.js.map +1 -1
  231. package/dist/esm/EthereumProvider.d.ts +0 -2
  232. package/dist/esm/EthereumProvider.d.ts.map +1 -1
  233. package/dist/esm/EthereumProvider.js +1 -2
  234. package/dist/esm/actions/checkPermitSupport.d.ts +0 -2
  235. package/dist/esm/actions/checkPermitSupport.d.ts.map +1 -1
  236. package/dist/esm/actions/checkPermitSupport.js +5 -6
  237. package/dist/esm/actions/checkPermitSupport.js.map +1 -1
  238. package/dist/esm/actions/constants.d.ts +0 -2
  239. package/dist/esm/actions/constants.d.ts.map +1 -1
  240. package/dist/esm/actions/constants.js +1 -2
  241. package/dist/esm/actions/getAccountCode.d.ts +0 -2
  242. package/dist/esm/actions/getAccountCode.d.ts.map +1 -1
  243. package/dist/esm/actions/getAccountCode.js +1 -2
  244. package/dist/esm/actions/getAllowance.d.ts +1 -3
  245. package/dist/esm/actions/getAllowance.d.ts.map +1 -1
  246. package/dist/esm/actions/getAllowance.js +6 -7
  247. package/dist/esm/actions/getAllowance.js.map +1 -1
  248. package/dist/esm/actions/getEthereumBalance.d.ts +0 -2
  249. package/dist/esm/actions/getEthereumBalance.d.ts.map +1 -1
  250. package/dist/esm/actions/getEthereumBalance.js +1 -2
  251. package/dist/esm/actions/getMaxPriorityFeePerGas.d.ts +1 -3
  252. package/dist/esm/actions/getMaxPriorityFeePerGas.d.ts.map +1 -1
  253. package/dist/esm/actions/getMaxPriorityFeePerGas.js +3 -4
  254. package/dist/esm/actions/getMaxPriorityFeePerGas.js.map +1 -1
  255. package/dist/esm/actions/getMulticallAddress.d.ts +0 -2
  256. package/dist/esm/actions/getMulticallAddress.d.ts.map +1 -1
  257. package/dist/esm/actions/getMulticallAddress.js +1 -2
  258. package/dist/esm/actions/isBatchingSupported.d.ts +0 -2
  259. package/dist/esm/actions/isBatchingSupported.d.ts.map +1 -1
  260. package/dist/esm/actions/isBatchingSupported.js +1 -2
  261. package/dist/esm/actions/isSafeSignature.d.ts +1 -3
  262. package/dist/esm/actions/isSafeSignature.d.ts.map +1 -1
  263. package/dist/esm/actions/isSafeSignature.js +3 -3
  264. package/dist/esm/actions/isSafeSignature.js.map +1 -1
  265. package/dist/esm/actions/isSafeWallet.d.ts +0 -2
  266. package/dist/esm/actions/isSafeWallet.d.ts.map +1 -1
  267. package/dist/esm/actions/isSafeWallet.js +2 -3
  268. package/dist/esm/actions/isSmartContractWallet.d.ts +0 -2
  269. package/dist/esm/actions/isSmartContractWallet.d.ts.map +1 -1
  270. package/dist/esm/actions/isSmartContractWallet.js +1 -2
  271. package/dist/esm/actions/resolveENSAddress.d.ts +0 -2
  272. package/dist/esm/actions/resolveENSAddress.d.ts.map +1 -1
  273. package/dist/esm/actions/resolveENSAddress.js +1 -2
  274. package/dist/esm/actions/resolveEthereumAddress.d.ts +0 -2
  275. package/dist/esm/actions/resolveEthereumAddress.d.ts.map +1 -1
  276. package/dist/esm/actions/resolveEthereumAddress.js +1 -2
  277. package/dist/esm/actions/resolveTransactionHash.d.ts +0 -2
  278. package/dist/esm/actions/resolveTransactionHash.d.ts.map +1 -1
  279. package/dist/esm/actions/resolveTransactionHash.js +7 -4
  280. package/dist/esm/actions/resolveTransactionHash.js.map +1 -1
  281. package/dist/esm/actions/resolveUNSAddress.d.ts +0 -2
  282. package/dist/esm/actions/resolveUNSAddress.d.ts.map +1 -1
  283. package/dist/esm/actions/resolveUNSAddress.js +2 -3
  284. package/dist/esm/actions/setAllowance.d.ts +2 -4
  285. package/dist/esm/actions/setAllowance.d.ts.map +1 -1
  286. package/dist/esm/actions/setAllowance.js +10 -7
  287. package/dist/esm/actions/setAllowance.js.map +1 -1
  288. package/dist/esm/actions/waitForBatchTransactionReceipt.d.ts +0 -2
  289. package/dist/esm/actions/waitForBatchTransactionReceipt.d.ts.map +1 -1
  290. package/dist/esm/actions/waitForBatchTransactionReceipt.js +1 -2
  291. package/dist/esm/actions/waitForRelayedTransactionReceipt.d.ts +1 -3
  292. package/dist/esm/actions/waitForRelayedTransactionReceipt.d.ts.map +1 -1
  293. package/dist/esm/actions/waitForRelayedTransactionReceipt.js +51 -13
  294. package/dist/esm/actions/waitForRelayedTransactionReceipt.js.map +1 -1
  295. package/dist/esm/actions/waitForSafeTransactionExecution.d.ts +0 -2
  296. package/dist/esm/actions/waitForSafeTransactionExecution.d.ts.map +1 -1
  297. package/dist/esm/actions/waitForSafeTransactionExecution.js +2 -3
  298. package/dist/esm/actions/waitForTransactionReceipt.d.ts +0 -2
  299. package/dist/esm/actions/waitForTransactionReceipt.d.ts.map +1 -1
  300. package/dist/esm/actions/waitForTransactionReceipt.js +1 -2
  301. package/dist/esm/client/publicClient.d.ts +0 -2
  302. package/dist/esm/client/publicClient.d.ts.map +1 -1
  303. package/dist/esm/client/publicClient.js +1 -2
  304. package/dist/esm/client/safeClient.d.ts +0 -2
  305. package/dist/esm/client/safeClient.d.ts.map +1 -1
  306. package/dist/esm/client/safeClient.js +1 -2
  307. package/dist/esm/client/types.d.ts +0 -2
  308. package/dist/esm/client/types.d.ts.map +1 -1
  309. package/dist/esm/core/EthereumStepExecutor.d.ts +0 -2
  310. package/dist/esm/core/EthereumStepExecutor.d.ts.map +1 -1
  311. package/dist/esm/core/EthereumStepExecutor.js +6 -7
  312. package/dist/esm/core/EthereumStepExecutor.js.map +1 -1
  313. package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts +0 -2
  314. package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts.map +1 -1
  315. package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.js +5 -3
  316. package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.js.map +1 -1
  317. package/dist/esm/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts +0 -2
  318. package/dist/esm/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts.map +1 -1
  319. package/dist/esm/core/tasks/EthereumBatchedWaitForTransactionTask.js +1 -2
  320. package/dist/esm/core/tasks/EthereumCheckAllowanceAfterPrepareTask.d.ts +0 -2
  321. package/dist/esm/core/tasks/EthereumCheckAllowanceAfterPrepareTask.d.ts.map +1 -1
  322. package/dist/esm/core/tasks/EthereumCheckAllowanceAfterPrepareTask.js +1 -2
  323. package/dist/esm/core/tasks/EthereumCheckAllowanceAfterPrepareTask.js.map +1 -1
  324. package/dist/esm/core/tasks/EthereumCheckAllowanceTask.d.ts +0 -2
  325. package/dist/esm/core/tasks/EthereumCheckAllowanceTask.d.ts.map +1 -1
  326. package/dist/esm/core/tasks/EthereumCheckAllowanceTask.js +3 -4
  327. package/dist/esm/core/tasks/EthereumCheckAllowanceTask.js.map +1 -1
  328. package/dist/esm/core/tasks/EthereumCheckBalanceTask.d.ts +0 -2
  329. package/dist/esm/core/tasks/EthereumCheckBalanceTask.d.ts.map +1 -1
  330. package/dist/esm/core/tasks/EthereumCheckBalanceTask.js +4 -4
  331. package/dist/esm/core/tasks/EthereumCheckBalanceTask.js.map +1 -1
  332. package/dist/esm/core/tasks/EthereumCheckPermitsTask.d.ts +0 -2
  333. package/dist/esm/core/tasks/EthereumCheckPermitsTask.d.ts.map +1 -1
  334. package/dist/esm/core/tasks/EthereumCheckPermitsTask.js +2 -3
  335. package/dist/esm/core/tasks/EthereumNativePermitTask.d.ts +0 -2
  336. package/dist/esm/core/tasks/EthereumNativePermitTask.d.ts.map +1 -1
  337. package/dist/esm/core/tasks/EthereumNativePermitTask.js +5 -6
  338. package/dist/esm/core/tasks/EthereumNativePermitTask.js.map +1 -1
  339. package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.d.ts +0 -2
  340. package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.d.ts.map +1 -1
  341. package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.js +1 -2
  342. package/dist/esm/core/tasks/EthereumPrepareTransactionTask.d.ts +0 -2
  343. package/dist/esm/core/tasks/EthereumPrepareTransactionTask.d.ts.map +1 -1
  344. package/dist/esm/core/tasks/EthereumPrepareTransactionTask.js +8 -7
  345. package/dist/esm/core/tasks/EthereumPrepareTransactionTask.js.map +1 -1
  346. package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts +0 -2
  347. package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts.map +1 -1
  348. package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.js +3 -4
  349. package/dist/esm/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts +0 -2
  350. package/dist/esm/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts.map +1 -1
  351. package/dist/esm/core/tasks/EthereumRelayedWaitForTransactionTask.js +2 -3
  352. package/dist/esm/core/tasks/EthereumResetAllowanceTask.d.ts +0 -2
  353. package/dist/esm/core/tasks/EthereumResetAllowanceTask.d.ts.map +1 -1
  354. package/dist/esm/core/tasks/EthereumResetAllowanceTask.js +6 -6
  355. package/dist/esm/core/tasks/EthereumResetAllowanceTask.js.map +1 -1
  356. package/dist/esm/core/tasks/EthereumSetAllowanceTask.d.ts +0 -2
  357. package/dist/esm/core/tasks/EthereumSetAllowanceTask.d.ts.map +1 -1
  358. package/dist/esm/core/tasks/EthereumSetAllowanceTask.js +7 -7
  359. package/dist/esm/core/tasks/EthereumSetAllowanceTask.js.map +1 -1
  360. package/dist/esm/core/tasks/EthereumSignAndExecuteTask.d.ts +0 -2
  361. package/dist/esm/core/tasks/EthereumSignAndExecuteTask.d.ts.map +1 -1
  362. package/dist/esm/core/tasks/EthereumSignAndExecuteTask.js +2 -3
  363. package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.d.ts +0 -2
  364. package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.d.ts.map +1 -1
  365. package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.js +6 -6
  366. package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.js.map +1 -1
  367. package/dist/esm/core/tasks/EthereumStandardWaitForTransactionTask.d.ts +0 -2
  368. package/dist/esm/core/tasks/EthereumStandardWaitForTransactionTask.d.ts.map +1 -1
  369. package/dist/esm/core/tasks/EthereumStandardWaitForTransactionTask.js +1 -2
  370. package/dist/esm/core/tasks/EthereumWaitForTransactionStatusTask.d.ts +0 -2
  371. package/dist/esm/core/tasks/EthereumWaitForTransactionStatusTask.d.ts.map +1 -1
  372. package/dist/esm/core/tasks/EthereumWaitForTransactionStatusTask.js +1 -2
  373. package/dist/esm/core/tasks/EthereumWaitForTransactionTask.d.ts +0 -2
  374. package/dist/esm/core/tasks/EthereumWaitForTransactionTask.d.ts.map +1 -1
  375. package/dist/esm/core/tasks/EthereumWaitForTransactionTask.js +2 -3
  376. package/dist/esm/core/tasks/helpers/estimateTransactionRequest.d.ts +1 -3
  377. package/dist/esm/core/tasks/helpers/estimateTransactionRequest.d.ts.map +1 -1
  378. package/dist/esm/core/tasks/helpers/estimateTransactionRequest.js +3 -4
  379. package/dist/esm/core/tasks/helpers/estimateTransactionRequest.js.map +1 -1
  380. package/dist/esm/core/tasks/helpers/findSignedNativePermit.d.ts +0 -2
  381. package/dist/esm/core/tasks/helpers/findSignedNativePermit.d.ts.map +1 -1
  382. package/dist/esm/core/tasks/helpers/findSignedNativePermit.js +2 -3
  383. package/dist/esm/core/tasks/helpers/getApprovalAmount.d.ts +0 -2
  384. package/dist/esm/core/tasks/helpers/getApprovalAmount.d.ts.map +1 -1
  385. package/dist/esm/core/tasks/helpers/getApprovalAmount.js +2 -3
  386. package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.d.ts +0 -2
  387. package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.d.ts.map +1 -1
  388. package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.js +6 -4
  389. package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.js.map +1 -1
  390. package/dist/esm/core/tasks/helpers/getTxLink.d.ts +0 -2
  391. package/dist/esm/core/tasks/helpers/getTxLink.d.ts.map +1 -1
  392. package/dist/esm/core/tasks/helpers/getTxLink.js +1 -2
  393. package/dist/esm/core/tasks/helpers/getUpdatedStep.d.ts +10 -4
  394. package/dist/esm/core/tasks/helpers/getUpdatedStep.d.ts.map +1 -1
  395. package/dist/esm/core/tasks/helpers/getUpdatedStep.js +12 -21
  396. package/dist/esm/core/tasks/helpers/getUpdatedStep.js.map +1 -1
  397. package/dist/esm/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.d.ts +0 -2
  398. package/dist/esm/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.d.ts.map +1 -1
  399. package/dist/esm/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.js +1 -2
  400. package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts +0 -2
  401. package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts.map +1 -1
  402. package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.js +1 -2
  403. package/dist/esm/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.d.ts +0 -2
  404. package/dist/esm/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.d.ts.map +1 -1
  405. package/dist/esm/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.js +1 -2
  406. package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.d.ts +0 -2
  407. package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.d.ts.map +1 -1
  408. package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.js +1 -2
  409. package/dist/esm/core/tasks/helpers/preservePermit2Allowances.d.ts +0 -2
  410. package/dist/esm/core/tasks/helpers/preservePermit2Allowances.d.ts.map +1 -1
  411. package/dist/esm/core/tasks/helpers/preservePermit2Allowances.js +1 -2
  412. package/dist/esm/core/tasks/helpers/resolveAllowanceSpender.d.ts +0 -2
  413. package/dist/esm/core/tasks/helpers/resolveAllowanceSpender.d.ts.map +1 -1
  414. package/dist/esm/core/tasks/helpers/resolveAllowanceSpender.js +1 -2
  415. package/dist/esm/core/tasks/helpers/resolvePermit2Support.d.ts +0 -2
  416. package/dist/esm/core/tasks/helpers/resolvePermit2Support.d.ts.map +1 -1
  417. package/dist/esm/core/tasks/helpers/resolvePermit2Support.js +1 -2
  418. package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.d.ts +0 -2
  419. package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.d.ts.map +1 -1
  420. package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.js +3 -3
  421. package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.js.map +1 -1
  422. package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.d.ts +0 -2
  423. package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.d.ts.map +1 -1
  424. package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.js +3 -4
  425. package/dist/esm/core/tasks/helpers/signTypedDataEntries.d.ts +0 -2
  426. package/dist/esm/core/tasks/helpers/signTypedDataEntries.d.ts.map +1 -1
  427. package/dist/esm/core/tasks/helpers/signTypedDataEntries.js +1 -2
  428. package/dist/esm/core/tasks/helpers/switchChain.d.ts +0 -2
  429. package/dist/esm/core/tasks/helpers/switchChain.d.ts.map +1 -1
  430. package/dist/esm/core/tasks/helpers/switchChain.js +1 -2
  431. package/dist/esm/core/tasks/helpers/updateActionWithReceipt.d.ts +0 -2
  432. package/dist/esm/core/tasks/helpers/updateActionWithReceipt.d.ts.map +1 -1
  433. package/dist/esm/core/tasks/helpers/updateActionWithReceipt.js +1 -2
  434. package/dist/esm/errors/parseEthereumErrors.d.ts +0 -2
  435. package/dist/esm/errors/parseEthereumErrors.d.ts.map +1 -1
  436. package/dist/esm/errors/parseEthereumErrors.js +4 -4
  437. package/dist/esm/errors/parseEthereumErrors.js.map +1 -1
  438. package/dist/esm/hyperliquid/agentWallet.d.ts +0 -2
  439. package/dist/esm/hyperliquid/agentWallet.d.ts.map +1 -1
  440. package/dist/esm/hyperliquid/agentWallet.js +1 -2
  441. package/dist/esm/hyperliquid/isHyperliquidAgentStep.d.ts +0 -2
  442. package/dist/esm/hyperliquid/isHyperliquidAgentStep.d.ts.map +1 -1
  443. package/dist/esm/hyperliquid/isHyperliquidAgentStep.js +1 -2
  444. package/dist/esm/index.d.ts +2 -2
  445. package/dist/esm/index.js +8 -8
  446. package/dist/esm/permits/acceptsRawEcdsaSignature.d.ts +0 -2
  447. package/dist/esm/permits/acceptsRawEcdsaSignature.d.ts.map +1 -1
  448. package/dist/esm/permits/acceptsRawEcdsaSignature.js +1 -2
  449. package/dist/esm/permits/allowanceTransfer.d.ts +0 -2
  450. package/dist/esm/permits/allowanceTransfer.d.ts.map +1 -1
  451. package/dist/esm/permits/allowanceTransfer.js +1 -2
  452. package/dist/esm/permits/allowanceTransfer.js.map +1 -1
  453. package/dist/esm/permits/canAccountUseNativePermits.d.ts +0 -2
  454. package/dist/esm/permits/canAccountUseNativePermits.d.ts.map +1 -1
  455. package/dist/esm/permits/canAccountUseNativePermits.js +1 -2
  456. package/dist/esm/permits/canAccountUsePermit2.d.ts +0 -2
  457. package/dist/esm/permits/canAccountUsePermit2.d.ts.map +1 -1
  458. package/dist/esm/permits/canAccountUsePermit2.js +1 -2
  459. package/dist/esm/permits/constants.d.ts +0 -2
  460. package/dist/esm/permits/constants.d.ts.map +1 -1
  461. package/dist/esm/permits/constants.js +1 -2
  462. package/dist/esm/permits/domain.d.ts +0 -2
  463. package/dist/esm/permits/domain.d.ts.map +1 -1
  464. package/dist/esm/permits/domain.js +1 -2
  465. package/dist/esm/permits/encodeNativePermitData.d.ts +0 -2
  466. package/dist/esm/permits/encodeNativePermitData.d.ts.map +1 -1
  467. package/dist/esm/permits/encodeNativePermitData.js +1 -2
  468. package/dist/esm/permits/encodePermit2Data.d.ts +0 -2
  469. package/dist/esm/permits/encodePermit2Data.d.ts.map +1 -1
  470. package/dist/esm/permits/encodePermit2Data.js +1 -2
  471. package/dist/esm/permits/getNativePermit.d.ts +0 -2
  472. package/dist/esm/permits/getNativePermit.d.ts.map +1 -1
  473. package/dist/esm/permits/getNativePermit.js +7 -8
  474. package/dist/esm/permits/getNativePermit.js.map +1 -1
  475. package/dist/esm/permits/getPermitTransferFromValues.d.ts +0 -2
  476. package/dist/esm/permits/getPermitTransferFromValues.d.ts.map +1 -1
  477. package/dist/esm/permits/getPermitTransferFromValues.js +2 -3
  478. package/dist/esm/permits/getPermitTransferFromValues.js.map +1 -1
  479. package/dist/esm/permits/invariant.d.ts +0 -2
  480. package/dist/esm/permits/invariant.d.ts.map +1 -1
  481. package/dist/esm/permits/invariant.js +1 -2
  482. package/dist/esm/permits/isDelegationDesignatorCode.d.ts +0 -2
  483. package/dist/esm/permits/isDelegationDesignatorCode.d.ts.map +1 -1
  484. package/dist/esm/permits/isDelegationDesignatorCode.js +1 -2
  485. package/dist/esm/permits/isNativePermitValid.d.ts +0 -2
  486. package/dist/esm/permits/isNativePermitValid.d.ts.map +1 -1
  487. package/dist/esm/permits/isNativePermitValid.js +2 -3
  488. package/dist/esm/permits/isNativePermitValid.js.map +1 -1
  489. package/dist/esm/permits/signPermit2Message.d.ts +0 -2
  490. package/dist/esm/permits/signPermit2Message.d.ts.map +1 -1
  491. package/dist/esm/permits/signPermit2Message.js +1 -2
  492. package/dist/esm/permits/signatureTransfer.d.ts +0 -2
  493. package/dist/esm/permits/signatureTransfer.d.ts.map +1 -1
  494. package/dist/esm/permits/signatureTransfer.js +1 -2
  495. package/dist/esm/permits/types.d.ts +0 -2
  496. package/dist/esm/permits/types.d.ts.map +1 -1
  497. package/dist/esm/types.d.ts +6 -2
  498. package/dist/esm/types.d.ts.map +1 -1
  499. package/dist/esm/types.js +1 -2
  500. package/dist/esm/types.js.map +1 -1
  501. package/dist/esm/utils/abi.d.ts +0 -2
  502. package/dist/esm/utils/abi.d.ts.map +1 -1
  503. package/dist/esm/utils/abi.js +1 -2
  504. package/dist/esm/utils/convertExtendedChain.d.ts +0 -2
  505. package/dist/esm/utils/convertExtendedChain.d.ts.map +1 -1
  506. package/dist/esm/utils/convertExtendedChain.js +1 -2
  507. package/dist/esm/utils/getActionWithFallback.d.ts +2 -3
  508. package/dist/esm/utils/getActionWithFallback.d.ts.map +1 -1
  509. package/dist/esm/utils/getActionWithFallback.js +3 -4
  510. package/dist/esm/utils/getActionWithFallback.js.map +1 -1
  511. package/dist/esm/utils/getDomainChainId.d.ts +0 -2
  512. package/dist/esm/utils/getDomainChainId.d.ts.map +1 -1
  513. package/dist/esm/utils/getDomainChainId.js +1 -2
  514. package/dist/esm/utils/getSafeApiKey.d.ts +0 -2
  515. package/dist/esm/utils/getSafeApiKey.d.ts.map +1 -1
  516. package/dist/esm/utils/getSafeApiKey.js +1 -2
  517. package/dist/esm/utils/getSendChain.d.ts +3 -0
  518. package/dist/esm/utils/getSendChain.d.ts.map +1 -0
  519. package/dist/esm/utils/getSendChain.js +5 -0
  520. package/dist/esm/utils/getSendChain.js.map +1 -0
  521. package/dist/esm/utils/getTypedDataLane.d.ts +0 -2
  522. package/dist/esm/utils/getTypedDataLane.d.ts.map +1 -1
  523. package/dist/esm/utils/getTypedDataLane.js +1 -2
  524. package/dist/esm/utils/isContractCallStep.d.ts +0 -2
  525. package/dist/esm/utils/isContractCallStep.d.ts.map +1 -1
  526. package/dist/esm/utils/isContractCallStep.js +1 -2
  527. package/dist/esm/utils/isExtendedChain.d.ts +0 -2
  528. package/dist/esm/utils/isExtendedChain.d.ts.map +1 -1
  529. package/dist/esm/utils/isExtendedChain.js +1 -2
  530. package/dist/esm/utils/isGaslessStep.d.ts +7 -2
  531. package/dist/esm/utils/isGaslessStep.d.ts.map +1 -1
  532. package/dist/esm/utils/isGaslessStep.js +8 -2
  533. package/dist/esm/utils/isGaslessStep.js.map +1 -1
  534. package/dist/esm/utils/isValidSignature.d.ts +0 -2
  535. package/dist/esm/utils/isValidSignature.d.ts.map +1 -1
  536. package/dist/esm/utils/isValidSignature.js +1 -2
  537. package/dist/esm/utils/isZeroAddress.d.ts +0 -2
  538. package/dist/esm/utils/isZeroAddress.d.ts.map +1 -1
  539. package/dist/esm/utils/isZeroAddress.js +1 -2
  540. package/dist/esm/utils/median.d.ts +0 -2
  541. package/dist/esm/utils/median.d.ts.map +1 -1
  542. package/dist/esm/utils/median.js +1 -2
  543. package/dist/esm/version.d.ts +1 -3
  544. package/dist/esm/version.d.ts.map +1 -1
  545. package/dist/esm/version.js +2 -3
  546. package/dist/esm/version.js.map +1 -1
  547. package/package.json +3 -3
  548. package/src/actions/checkPermitSupport.ts +4 -2
  549. package/src/actions/getAllowance.ts +8 -4
  550. package/src/actions/getMaxPriorityFeePerGas.ts +4 -2
  551. package/src/actions/isSafeSignature.ts +3 -3
  552. package/src/actions/resolveTransactionHash.ts +10 -3
  553. package/src/actions/setAllowance.ts +31 -6
  554. package/src/actions/waitForRelayedTransactionReceipt.ts +129 -24
  555. package/src/core/tasks/EthereumBatchedSignAndExecuteTask.ts +4 -0
  556. package/src/core/tasks/EthereumCheckAllowanceTask.ts +3 -2
  557. package/src/core/tasks/EthereumCheckBalanceTask.ts +11 -1
  558. package/src/core/tasks/EthereumNativePermitTask.ts +2 -1
  559. package/src/core/tasks/EthereumPrepareTransactionTask.ts +29 -3
  560. package/src/core/tasks/EthereumResetAllowanceTask.ts +4 -2
  561. package/src/core/tasks/EthereumSetAllowanceTask.ts +4 -2
  562. package/src/core/tasks/EthereumStandardSignAndExecuteTask.ts +4 -2
  563. package/src/core/tasks/helpers/estimateTransactionRequest.ts +4 -2
  564. package/src/core/tasks/helpers/getEthereumExecutionStrategy.ts +12 -3
  565. package/src/core/tasks/helpers/getUpdatedStep.ts +26 -25
  566. package/src/core/tasks/helpers/shouldCheckForAllowance.ts +8 -0
  567. package/src/errors/parseEthereumErrors.ts +11 -2
  568. package/src/index.ts +0 -1
  569. package/src/permits/allowanceTransfer.ts +1 -1
  570. package/src/permits/getNativePermit.ts +9 -5
  571. package/src/permits/getPermitTransferFromValues.ts +2 -1
  572. package/src/permits/isNativePermitValid.ts +1 -1
  573. package/src/types.ts +7 -2
  574. package/src/utils/getActionWithFallback.ts +3 -2
  575. package/src/utils/getSendChain.ts +6 -0
  576. package/src/utils/isGaslessStep.ts +7 -0
  577. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumStepExecutor.js","names":["BaseStepExecutor","createDefaultStorage","parseEthereumErrors","switchChain","getAction","getAddresses","TransactionError","LiFiErrorCode","isZeroAddress","EthereumCheckPermitsTask","EthereumCheckAllowanceTask","EthereumNativePermitTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","EthereumCheckBalanceTask","EthereumPermit2AllowanceTask","EthereumPrepareTransactionTask","EthereumCheckAllowanceAfterPrepareTask","EthereumSignAndExecuteTask","EthereumWaitForTransactionTask","EthereumWaitForTransactionStatusTask","shouldCheckForAllowance","hasOpenTransaction","TaskPipeline"],"sources":["../../../src/core/EthereumStepExecutor.ts"],"sourcesContent":["import {\n BaseStepExecutor,\n createDefaultStorage,\n type ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n hasOpenTransaction,\n LiFiErrorCode,\n type LiFiStepExtended,\n type SDKClient,\n type SDKError,\n type SDKStorage,\n type StepExecutorBaseContext,\n type StepExecutorOptions,\n TaskPipeline,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Client, GetAddressesReturnType } from 'viem'\nimport { getAddresses } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { parseEthereumErrors } from '../errors/parseEthereumErrors.js'\nimport type { EthereumStepExecutorContext } from '../types.js'\nimport { isZeroAddress } from '../utils/isZeroAddress.js'\nimport { EthereumCheckAllowanceAfterPrepareTask } from './tasks/EthereumCheckAllowanceAfterPrepareTask.js'\nimport { EthereumCheckAllowanceTask } from './tasks/EthereumCheckAllowanceTask.js'\nimport { EthereumCheckBalanceTask } from './tasks/EthereumCheckBalanceTask.js'\nimport { EthereumCheckPermitsTask } from './tasks/EthereumCheckPermitsTask.js'\nimport { EthereumNativePermitTask } from './tasks/EthereumNativePermitTask.js'\nimport { EthereumPermit2AllowanceTask } from './tasks/EthereumPermit2AllowanceTask.js'\nimport { EthereumPrepareTransactionTask } from './tasks/EthereumPrepareTransactionTask.js'\nimport { EthereumResetAllowanceTask } from './tasks/EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './tasks/EthereumSetAllowanceTask.js'\nimport { EthereumSignAndExecuteTask } from './tasks/EthereumSignAndExecuteTask.js'\nimport { EthereumWaitForTransactionStatusTask } from './tasks/EthereumWaitForTransactionStatusTask.js'\nimport { EthereumWaitForTransactionTask } from './tasks/EthereumWaitForTransactionTask.js'\nimport { shouldCheckForAllowance } from './tasks/helpers/shouldCheckForAllowance.js'\nimport { switchChain } from './tasks/helpers/switchChain.js'\n\ninterface EthereumStepExecutorOptions extends StepExecutorOptions {\n client: Client\n switchChain?: (chainId: number) => Promise<Client | undefined>\n disableMessageSigning?: boolean\n}\n\nexport class EthereumStepExecutor extends BaseStepExecutor {\n private client: Client\n private switchChain?: (chainId: number) => Promise<Client | undefined>\n private storage?: SDKStorage\n private disableMessageSigning?: boolean\n\n constructor(options: EthereumStepExecutorOptions) {\n super(options)\n this.client = options.client\n this.switchChain = options.switchChain\n this.disableMessageSigning = options.disableMessageSigning\n }\n\n private getStorage = (client: SDKClient): SDKStorage => {\n if (!this.storage) {\n this.storage = client.config.storage ?? createDefaultStorage()\n }\n return this.storage\n }\n\n override parseErrors = (\n error: Error,\n step?: LiFiStepExtended,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n ): Promise<SDKError | ExecuteStepRetryError> =>\n parseEthereumErrors(error, step, action, retryParams)\n\n // Ensure that we are using the right chain and wallet when executing transactions.\n checkClient = async (\n step: LiFiStepExtended,\n targetChainId?: number\n ): Promise<Client | undefined> => {\n const updatedClient = await switchChain(\n this.client,\n targetChainId ?? step.action.fromChainId,\n this.allowUserInteraction,\n this.switchChain\n )\n if (updatedClient) {\n this.client = updatedClient\n }\n\n // Prevent execution of the quote by wallet different from the one which requested the quote\n let accountAddress = this.client.account?.address\n if (!accountAddress) {\n const accountAddresses = (await getAction(\n this.client,\n getAddresses,\n 'getAddresses'\n )(undefined)) as GetAddressesReturnType\n accountAddress = accountAddresses?.[0]\n }\n if (\n accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase()\n ) {\n throw new TransactionError(\n LiFiErrorCode.WalletChangedDuringExecution,\n 'The wallet address that requested the quote does not match the wallet address attempting to sign the transaction.'\n )\n }\n return updatedClient\n }\n\n override createContext = async (\n baseContext: StepExecutorBaseContext\n ): Promise<EthereumStepExecutorContext> => {\n const { step, fromChain } = baseContext\n\n const isFromNativeToken =\n fromChain.nativeToken.address === step.action.fromToken.address &&\n isZeroAddress(step.action.fromToken.address)\n\n // Check if message signing is disabled - useful for smart contract wallets\n // We also disable message signing for custom steps\n const disableMessageSigning =\n !!this.disableMessageSigning || step.type !== 'lifi'\n\n return {\n ...baseContext,\n isFromNativeToken,\n disableMessageSigning,\n ethereumClient: this.client,\n checkClient: this.checkClient,\n getStorage: this.getStorage,\n // Signed typed data for native permits and other messages\n signedTypedData: [],\n // Calls for atomic batch transactions (EIP-5792)\n calls: [],\n }\n }\n\n override createPipeline = (\n context: EthereumStepExecutorContext\n ): TaskPipeline => {\n const { step, isBridgeExecution, isFromNativeToken } = context\n\n const tasks = [\n new EthereumCheckPermitsTask(),\n new EthereumCheckAllowanceTask(),\n new EthereumNativePermitTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n new EthereumCheckBalanceTask(),\n new EthereumPermit2AllowanceTask(),\n new EthereumPrepareTransactionTask(),\n new EthereumCheckAllowanceAfterPrepareTask(),\n new EthereumSignAndExecuteTask(),\n new EthereumWaitForTransactionTask(),\n new EthereumWaitForTransactionStatusTask(),\n ]\n\n const doCheckAllowance = shouldCheckForAllowance(\n step,\n isBridgeExecution,\n isFromNativeToken,\n this.statusManager\n )\n\n let firstTask:\n | typeof EthereumCheckPermitsTask\n | typeof EthereumCheckBalanceTask\n | typeof EthereumWaitForTransactionTask\n | typeof EthereumWaitForTransactionStatusTask\n if (doCheckAllowance) {\n firstTask = EthereumCheckPermitsTask\n } else {\n const swapOrBridgeAction = this.statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n // Same predicate as the pre-sign guard: an open transaction is waited\n // for, a FAILED action with a final outcome signs again.\n firstTask = hasOpenTransaction(swapOrBridgeAction)\n ? swapOrBridgeAction?.status === 'DONE'\n ? EthereumWaitForTransactionStatusTask\n : EthereumWaitForTransactionTask\n : EthereumCheckBalanceTask\n }\n\n // Compare classes, not names: a minifier can give two task classes the\n // same name.\n const firstTaskIndex = tasks.findIndex(\n (task) => task.constructor === firstTask\n )\n if (firstTaskIndex === -1) {\n throw new TransactionError(\n LiFiErrorCode.InternalError,\n 'EthereumStepExecutor.createPipeline: first task not found'\n )\n }\n\n const tasksToRun = tasks.slice(firstTaskIndex)\n\n return new TaskPipeline(tasksToRun)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4CA,IAAa,uBAAb,cAA0CA,UAAAA,iBAAiB;CACzD;CACA;CACA;CACA;CAEA,YAAY,SAAsC;EAChD,MAAM,OAAO;EACb,KAAK,SAAS,QAAQ;EACtB,KAAK,cAAc,QAAQ;EAC3B,KAAK,wBAAwB,QAAQ;CACvC;CAEA,cAAsB,WAAkC;EACtD,IAAI,CAAC,KAAK,SACR,KAAK,UAAU,OAAO,OAAO,YAAA,GAAWC,UAAAA,qBAAAA,CAAqB;EAE/D,OAAO,KAAK;CACd;CAEA,eACE,OACA,MACA,QACA,gBAEAC,mCAAAA,oBAAoB,OAAO,MAAM,QAAQ,WAAW;CAGtD,cAAc,OACZ,MACA,kBACgC;EAChC,MAAM,gBAAgB,MAAMC,uCAAAA,YAC1B,KAAK,QACL,iBAAiB,KAAK,OAAO,aAC7B,KAAK,sBACL,KAAK,WACP;EACA,IAAI,eACF,KAAK,SAAS;EAIhB,IAAI,iBAAiB,KAAK,OAAO,SAAS;EAC1C,IAAI,CAAC,gBAMH,kBAAiB,OAAA,GALeC,WAAAA,UAAAA,CAC9B,KAAK,QACLC,aAAAA,cACA,cACF,CAAC,CAAC,KAAA,CAAS,EAAA,GACyB;EAEtC,IACE,gBAAgB,YAAY,MAAM,KAAK,OAAO,aAAa,YAAY,GAEvE,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,8BACd,mHACF;EAEF,OAAO;CACT;CAEA,gBAAyB,OACvB,gBACyC;EACzC,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,oBACJ,UAAU,YAAY,YAAY,KAAK,OAAO,UAAU,WACxDC,4BAAAA,cAAc,KAAK,OAAO,UAAU,OAAO;EAI7C,MAAM,wBACJ,CAAC,CAAC,KAAK,yBAAyB,KAAK,SAAS;EAEhD,OAAO;GACL,GAAG;GACH;GACA;GACA,gBAAgB,KAAK;GACrB,aAAa,KAAK;GAClB,YAAY,KAAK;GAEjB,iBAAiB,CAAC;GAElB,OAAO,CAAC;EACV;CACF;CAEA,kBACE,YACiB;EACjB,MAAM,EAAE,MAAM,mBAAmB,sBAAsB;EAEvD,MAAM,QAAQ;GACZ,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,gDAAAA,6BAA6B;GACjC,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,0DAAAA,uCAAuC;GAC3C,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,wDAAAA,qCAAqC;EAC3C;EAEA,MAAM,mBAAmBC,mDAAAA,wBACvB,MACA,mBACA,mBACA,KAAK,aACP;EAEA,IAAI;EAKJ,IAAI,kBACF,YAAYZ,4CAAAA;OACP;GACL,MAAM,qBAAqB,KAAK,cAAc,WAC5C,MACA,oBAAoB,gBAAgB,MACtC;GAGA,aAAA,GAAYa,UAAAA,mBAAAA,CAAmB,kBAAkB,IAC7C,oBAAoB,WAAW,SAC7BF,wDAAAA,uCACAD,kDAAAA,iCACFL,4CAAAA;EACN;EAIA,MAAM,iBAAiB,MAAM,WAC1B,SAAS,KAAK,gBAAgB,SACjC;EACA,IAAI,mBAAmB,IACrB,MAAM,IAAIR,UAAAA,iBACRC,UAAAA,cAAc,eACd,2DACF;EAGF,MAAM,aAAa,MAAM,MAAM,cAAc;EAE7C,OAAO,IAAIgB,UAAAA,aAAa,UAAU;CACpC;AACF"}
1
+ {"version":3,"file":"EthereumStepExecutor.js","names":["BaseStepExecutor","createDefaultStorage","parseEthereumErrors","switchChain","getAction","getAddresses","TransactionError","LiFiErrorCode","isZeroAddress","EthereumCheckPermitsTask","EthereumCheckAllowanceTask","EthereumNativePermitTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","EthereumCheckBalanceTask","EthereumPermit2AllowanceTask","EthereumPrepareTransactionTask","EthereumCheckAllowanceAfterPrepareTask","EthereumSignAndExecuteTask","EthereumWaitForTransactionTask","EthereumWaitForTransactionStatusTask","shouldCheckForAllowance","hasOpenTransaction","TaskPipeline"],"sources":["../../../src/core/EthereumStepExecutor.ts"],"sourcesContent":["import {\n BaseStepExecutor,\n createDefaultStorage,\n type ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n hasOpenTransaction,\n LiFiErrorCode,\n type LiFiStepExtended,\n type SDKClient,\n type SDKError,\n type SDKStorage,\n type StepExecutorBaseContext,\n type StepExecutorOptions,\n TaskPipeline,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Client, GetAddressesReturnType } from 'viem'\nimport { getAddresses } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { parseEthereumErrors } from '../errors/parseEthereumErrors.js'\nimport type { EthereumStepExecutorContext } from '../types.js'\nimport { isZeroAddress } from '../utils/isZeroAddress.js'\nimport { EthereumCheckAllowanceAfterPrepareTask } from './tasks/EthereumCheckAllowanceAfterPrepareTask.js'\nimport { EthereumCheckAllowanceTask } from './tasks/EthereumCheckAllowanceTask.js'\nimport { EthereumCheckBalanceTask } from './tasks/EthereumCheckBalanceTask.js'\nimport { EthereumCheckPermitsTask } from './tasks/EthereumCheckPermitsTask.js'\nimport { EthereumNativePermitTask } from './tasks/EthereumNativePermitTask.js'\nimport { EthereumPermit2AllowanceTask } from './tasks/EthereumPermit2AllowanceTask.js'\nimport { EthereumPrepareTransactionTask } from './tasks/EthereumPrepareTransactionTask.js'\nimport { EthereumResetAllowanceTask } from './tasks/EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './tasks/EthereumSetAllowanceTask.js'\nimport { EthereumSignAndExecuteTask } from './tasks/EthereumSignAndExecuteTask.js'\nimport { EthereumWaitForTransactionStatusTask } from './tasks/EthereumWaitForTransactionStatusTask.js'\nimport { EthereumWaitForTransactionTask } from './tasks/EthereumWaitForTransactionTask.js'\nimport { shouldCheckForAllowance } from './tasks/helpers/shouldCheckForAllowance.js'\nimport { switchChain } from './tasks/helpers/switchChain.js'\n\ninterface EthereumStepExecutorOptions extends StepExecutorOptions {\n client: Client\n switchChain?: (chainId: number) => Promise<Client | undefined>\n disableMessageSigning?: boolean\n}\n\nexport class EthereumStepExecutor extends BaseStepExecutor {\n private client: Client\n private switchChain?: (chainId: number) => Promise<Client | undefined>\n private storage?: SDKStorage\n private disableMessageSigning?: boolean\n\n constructor(options: EthereumStepExecutorOptions) {\n super(options)\n this.client = options.client\n this.switchChain = options.switchChain\n this.disableMessageSigning = options.disableMessageSigning\n }\n\n private getStorage = (client: SDKClient): SDKStorage => {\n if (!this.storage) {\n this.storage = client.config.storage ?? createDefaultStorage()\n }\n return this.storage\n }\n\n override parseErrors = (\n error: Error,\n step?: LiFiStepExtended,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n ): Promise<SDKError | ExecuteStepRetryError> =>\n parseEthereumErrors(error, step, action, retryParams)\n\n // Ensure that we are using the right chain and wallet when executing transactions.\n checkClient = async (\n step: LiFiStepExtended,\n targetChainId?: number\n ): Promise<Client | undefined> => {\n const updatedClient = await switchChain(\n this.client,\n targetChainId ?? step.action.fromChainId,\n this.allowUserInteraction,\n this.switchChain\n )\n if (updatedClient) {\n this.client = updatedClient\n }\n\n // Prevent execution of the quote by wallet different from the one which requested the quote\n let accountAddress = this.client.account?.address\n if (!accountAddress) {\n const accountAddresses = (await getAction(\n this.client,\n getAddresses,\n 'getAddresses'\n )(undefined)) as GetAddressesReturnType\n accountAddress = accountAddresses?.[0]\n }\n if (\n accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase()\n ) {\n throw new TransactionError(\n LiFiErrorCode.WalletChangedDuringExecution,\n 'The wallet address that requested the quote does not match the wallet address attempting to sign the transaction.'\n )\n }\n return updatedClient\n }\n\n override createContext = async (\n baseContext: StepExecutorBaseContext\n ): Promise<EthereumStepExecutorContext> => {\n const { step, fromChain } = baseContext\n\n const isFromNativeToken =\n fromChain.nativeToken.address === step.action.fromToken.address &&\n isZeroAddress(step.action.fromToken.address)\n\n // Check if message signing is disabled - useful for smart contract wallets\n // We also disable message signing for custom steps\n const disableMessageSigning =\n !!this.disableMessageSigning || step.type !== 'lifi'\n\n return {\n ...baseContext,\n isFromNativeToken,\n disableMessageSigning,\n ethereumClient: this.client,\n checkClient: this.checkClient,\n getStorage: this.getStorage,\n // Signed typed data for native permits and other messages\n signedTypedData: [],\n // Calls for atomic batch transactions (EIP-5792)\n calls: [],\n }\n }\n\n override createPipeline = (\n context: EthereumStepExecutorContext\n ): TaskPipeline => {\n const { step, isBridgeExecution, isFromNativeToken } = context\n\n const tasks = [\n new EthereumCheckPermitsTask(),\n new EthereumCheckAllowanceTask(),\n new EthereumNativePermitTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n new EthereumCheckBalanceTask(),\n new EthereumPermit2AllowanceTask(),\n new EthereumPrepareTransactionTask(),\n new EthereumCheckAllowanceAfterPrepareTask(),\n new EthereumSignAndExecuteTask(),\n new EthereumWaitForTransactionTask(),\n new EthereumWaitForTransactionStatusTask(),\n ]\n\n const doCheckAllowance = shouldCheckForAllowance(\n step,\n isBridgeExecution,\n isFromNativeToken,\n this.statusManager\n )\n\n let firstTask:\n | typeof EthereumCheckPermitsTask\n | typeof EthereumCheckBalanceTask\n | typeof EthereumWaitForTransactionTask\n | typeof EthereumWaitForTransactionStatusTask\n if (doCheckAllowance) {\n firstTask = EthereumCheckPermitsTask\n } else {\n const swapOrBridgeAction = this.statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n // Same predicate as the pre-sign guard: an open transaction is waited\n // for, a FAILED action with a final outcome signs again.\n firstTask = hasOpenTransaction(swapOrBridgeAction)\n ? swapOrBridgeAction?.status === 'DONE'\n ? EthereumWaitForTransactionStatusTask\n : EthereumWaitForTransactionTask\n : EthereumCheckBalanceTask\n }\n\n // Compare classes, not names: a minifier can give two task classes the\n // same name.\n const firstTaskIndex = tasks.findIndex(\n (task) => task.constructor === firstTask\n )\n if (firstTaskIndex === -1) {\n throw new TransactionError(\n LiFiErrorCode.InternalError,\n 'EthereumStepExecutor.createPipeline: first task not found'\n )\n }\n\n const tasksToRun = tasks.slice(firstTaskIndex)\n\n return new TaskPipeline(tasksToRun)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4CA,IAAa,uBAAb,cAA0CA,UAAAA,iBAAiB;CACjD;CACA;CACA;CACA;CAER,YAAY,SAAsC;EAChD,MAAM,OAAO;EACb,KAAK,SAAS,QAAQ;EACtB,KAAK,cAAc,QAAQ;EAC3B,KAAK,wBAAwB,QAAQ;CACvC;CAEQ,cAAc,WAAkC;EACtD,IAAI,CAAC,KAAK,SACR,KAAK,UAAU,OAAO,OAAO,YAAA,GAAWC,UAAAA,qBAAAA,CAAqB;EAE/D,OAAO,KAAK;CACd;CAES,eACP,OACA,MACA,QACA,gBAEAC,mCAAAA,oBAAoB,OAAO,MAAM,QAAQ,WAAW;CAGtD,cAAc,OACZ,MACA,kBACgC;EAChC,MAAM,gBAAgB,MAAMC,uCAAAA,YAC1B,KAAK,QACL,iBAAiB,KAAK,OAAO,aAC7B,KAAK,sBACL,KAAK,WACP;EACA,IAAI,eACF,KAAK,SAAS;EAIhB,IAAI,iBAAiB,KAAK,OAAO,SAAS;EAC1C,IAAI,CAAC,gBAMH,kBAAiB,OAAA,GALeC,WAAAA,UAAAA,CAC9B,KAAK,QACLC,aAAAA,cACA,cACF,CAAC,CAAC,KAAA,CAAS,EAAA,GACyB;EAEtC,IACE,gBAAgB,YAAY,MAAM,KAAK,OAAO,aAAa,YAAY,GAEvE,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,8BACd,mHACF;EAEF,OAAO;CACT;CAES,gBAAgB,OACvB,gBACyC;EACzC,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,oBACJ,UAAU,YAAY,YAAY,KAAK,OAAO,UAAU,WACxDC,4BAAAA,cAAc,KAAK,OAAO,UAAU,OAAO;EAI7C,MAAM,wBACJ,CAAC,CAAC,KAAK,yBAAyB,KAAK,SAAS;EAEhD,OAAO;GACL,GAAG;GACH;GACA;GACA,gBAAgB,KAAK;GACrB,aAAa,KAAK;GAClB,YAAY,KAAK;GAEjB,iBAAiB,CAAC;GAElB,OAAO,CAAC;EACV;CACF;CAES,kBACP,YACiB;EACjB,MAAM,EAAE,MAAM,mBAAmB,sBAAsB;EAEvD,MAAM,QAAQ;GACZ,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,gDAAAA,6BAA6B;GACjC,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,0DAAAA,uCAAuC;GAC3C,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,wDAAAA,qCAAqC;EAC3C;EAEA,MAAM,mBAAmBC,mDAAAA,wBACvB,MACA,mBACA,mBACA,KAAK,aACP;EAEA,IAAI;EAKJ,IAAI,kBACF,YAAYZ,4CAAAA;OACP;GACL,MAAM,qBAAqB,KAAK,cAAc,WAC5C,MACA,oBAAoB,gBAAgB,MACtC;GAGA,aAAA,GAAYa,UAAAA,mBAAAA,CAAmB,kBAAkB,IAC7C,oBAAoB,WAAW,SAC7BF,wDAAAA,uCACAD,kDAAAA,iCACFL,4CAAAA;EACN;EAIA,MAAM,iBAAiB,MAAM,WAC1B,SAAS,KAAK,gBAAgB,SACjC;EACA,IAAI,mBAAmB,IACrB,MAAM,IAAIR,UAAAA,iBACRC,UAAAA,cAAc,eACd,2DACF;EAGF,MAAM,aAAa,MAAM,MAAM,cAAc;EAE7C,OAAO,IAAIgB,UAAAA,aAAa,UAAU;CACpC;AACF"}
@@ -1,8 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts
4
3
  export declare class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {
5
4
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
6
- }
7
- //#endregion
8
- //# sourceMappingURL=EthereumBatchedSignAndExecuteTask.d.ts.map
5
+ }
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_utils_convertExtendedChain = require("../../utils/convertExtendedChain.js");
3
+ const require_utils_getSendChain = require("../../utils/getSendChain.js");
2
4
  let _lifi_sdk = require("@lifi/sdk");
3
5
  let viem_actions = require("viem/actions");
4
6
  let viem_utils = require("viem/utils");
5
- //#region src/core/tasks/EthereumBatchedSignAndExecuteTask.ts
7
+ // src/core/tasks/EthereumBatchedSignAndExecuteTask.ts
6
8
  var EthereumBatchedSignAndExecuteTask = class extends _lifi_sdk.BaseStepExecutionTask {
7
9
  async run(context) {
8
10
  const { step, fromChain, statusManager, checkClient, transactionRequest, calls: currentCalls, isBridgeExecution } = context;
@@ -22,7 +24,8 @@ var EthereumBatchedSignAndExecuteTask = class extends _lifi_sdk.BaseStepExecutio
22
24
  (0, _lifi_sdk.assertNoOpenTransaction)(statusManager.findAction(step, action.type));
23
25
  const { id } = await (0, viem_utils.getAction)(updatedClient, viem_actions.sendCalls, "sendCalls")({
24
26
  account: updatedClient.account,
25
- calls
27
+ calls,
28
+ chain: require_utils_getSendChain.getSendChain(updatedClient, require_utils_convertExtendedChain.convertExtendedChain(fromChain))
26
29
  });
27
30
  statusManager.updateAction(step, action.type, "PENDING", {
28
31
  ..._lifi_sdk.CLEARED_TRANSACTION_FIELDS,
@@ -37,7 +40,6 @@ var EthereumBatchedSignAndExecuteTask = class extends _lifi_sdk.BaseStepExecutio
37
40
  };
38
41
  }
39
42
  };
40
- //#endregion
41
43
  exports.EthereumBatchedSignAndExecuteTask = EthereumBatchedSignAndExecuteTask;
42
44
 
43
45
  //# sourceMappingURL=EthereumBatchedSignAndExecuteTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumBatchedSignAndExecuteTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","getAction","sendCalls","CLEARED_TRANSACTION_FIELDS"],"sources":["../../../../src/core/tasks/EthereumBatchedSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Address, Hash, Hex } from 'viem'\nimport { sendCalls } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport type { Call, EthereumStepExecutorContext } from '../../types.js'\n\nexport class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n fromChain,\n statusManager,\n checkClient,\n transactionRequest,\n calls: currentCalls,\n isBridgeExecution,\n } = context\n\n const calls = [...currentCalls]\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Make sure that the chain is still correct\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n if (!transactionRequest) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Transaction request is not found.'\n )\n }\n\n const transferCall: Call = {\n chainId: fromChain.id,\n data: transactionRequest.data as Hex,\n to: transactionRequest.to as Address,\n value: transactionRequest.value,\n }\n\n calls.push(transferCall)\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the awaits above\n // (strategy, chain switch).\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const { id } = await getAction(\n updatedClient,\n sendCalls,\n 'sendCalls'\n )({\n account: updatedClient.account!,\n calls,\n })\n\n statusManager.updateAction(step, action.type, 'PENDING', {\n // A new transaction: nothing of the previous one may survive, least of\n // all its `txFinal` verdict.\n ...CLEARED_TRANSACTION_FIELDS,\n taskId: id as Hash,\n txType: 'batched',\n callCount: calls.length,\n signedAt: Date.now(),\n })\n\n return { status: 'COMPLETED', context: { calls } }\n }\n}\n"],"mappings":";;;;;AAaA,IAAa,oCAAb,cAAuDA,UAAAA,sBAAsB;CAC3E,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,WACA,eACA,aACA,oBACA,OAAO,cACP,sBACE;EAEJ,MAAM,QAAQ,CAAC,GAAG,YAAY;EAE9B,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EACA,IAAI,CAAC,QACH,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAIF,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,IAAI,CAAC,oBACH,MAAM,IAAID,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kEACF;EAGF,MAAM,eAAqB;GACzB,SAAS,UAAU;GACnB,MAAM,mBAAmB;GACzB,IAAI,mBAAmB;GACvB,OAAO,mBAAmB;EAC5B;EAEA,MAAM,KAAK,YAAY;EAKvB,CAAA,GAAA,UAAA,wBAAA,CAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,MAAM,EAAE,OAAO,OAAA,GAAMC,WAAAA,UAAAA,CACnB,eACAC,aAAAA,WACA,WACF,CAAC,CAAC;GACA,SAAS,cAAc;GACvB;EACF,CAAC;EAED,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW;GAGvD,GAAGC,UAAAA;GACH,QAAQ;GACR,QAAQ;GACR,WAAW,MAAM;GACjB,UAAU,KAAK,IAAI;EACrB,CAAC;EAED,OAAO;GAAE,QAAQ;GAAa,SAAS,EAAE,MAAM;EAAE;CACnD;AACF"}
1
+ {"version":3,"file":"EthereumBatchedSignAndExecuteTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","assertNoOpenTransaction","getAction","sendCalls","getSendChain","convertExtendedChain","CLEARED_TRANSACTION_FIELDS"],"sources":["../../../../src/core/tasks/EthereumBatchedSignAndExecuteTask.ts"],"sourcesContent":["import {\n assertNoOpenTransaction,\n BaseStepExecutionTask,\n CLEARED_TRANSACTION_FIELDS,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Address, Hash, Hex } from 'viem'\nimport { sendCalls } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport type { Call, EthereumStepExecutorContext } from '../../types.js'\nimport { convertExtendedChain } from '../../utils/convertExtendedChain.js'\nimport { getSendChain } from '../../utils/getSendChain.js'\n\nexport class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n fromChain,\n statusManager,\n checkClient,\n transactionRequest,\n calls: currentCalls,\n isBridgeExecution,\n } = context\n\n const calls = [...currentCalls]\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // Make sure that the chain is still correct\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n if (!transactionRequest) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Transaction request is not found.'\n )\n }\n\n const transferCall: Call = {\n chainId: fromChain.id,\n data: transactionRequest.data as Hex,\n to: transactionRequest.to as Address,\n value: transactionRequest.value,\n }\n\n calls.push(transferCall)\n\n // Checked again right before the wallet: a late write of an older run\n // can merge its transaction into this action during the awaits above\n // (strategy, chain switch).\n assertNoOpenTransaction(statusManager.findAction(step, action.type))\n\n const { id } = await getAction(\n updatedClient,\n sendCalls,\n 'sendCalls'\n )({\n account: updatedClient.account!,\n calls,\n // Without it `sendCalls` uses `client.chain`, which can be stale.\n chain: getSendChain(updatedClient, convertExtendedChain(fromChain)),\n })\n\n statusManager.updateAction(step, action.type, 'PENDING', {\n // A new transaction: nothing of the previous one may survive, least of\n // all its `txFinal` verdict.\n ...CLEARED_TRANSACTION_FIELDS,\n taskId: id as Hash,\n txType: 'batched',\n callCount: calls.length,\n signedAt: Date.now(),\n })\n\n return { status: 'COMPLETED', context: { calls } }\n }\n}\n"],"mappings":";;;;;;;AAeA,IAAa,oCAAb,cAAuDA,UAAAA,sBAAsB;CAC3E,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,WACA,eACA,aACA,oBACA,OAAO,cACP,sBACE;EAEJ,MAAM,QAAQ,CAAC,GAAG,YAAY;EAE9B,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EACA,IAAI,CAAC,QACH,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAIF,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,IAAI,CAAC,oBACH,MAAM,IAAID,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kEACF;EAGF,MAAM,eAAqB;GACzB,SAAS,UAAU;GACnB,MAAM,mBAAmB;GACzB,IAAI,mBAAmB;GACvB,OAAO,mBAAmB;EAC5B;EAEA,MAAM,KAAK,YAAY;EAKvBC,CAAAA,GAAAA,UAAAA,wBAAAA,CAAwB,cAAc,WAAW,MAAM,OAAO,IAAI,CAAC;EAEnE,MAAM,EAAE,OAAO,OAAA,GAAMC,WAAAA,UAAAA,CACnB,eACAC,aAAAA,WACA,WACF,CAAC,CAAC;GACA,SAAS,cAAc;GACvB;GAEA,OAAOC,2BAAAA,aAAa,eAAeC,mCAAAA,qBAAqB,SAAS,CAAC;EACpE,CAAC;EAED,cAAc,aAAa,MAAM,OAAO,MAAM,WAAW;GAGvD,GAAGC,UAAAA;GACH,QAAQ;GACR,QAAQ;GACR,WAAW,MAAM;GACjB,UAAU,KAAK,IAAI;EACrB,CAAC;EAED,OAAO;GAAE,QAAQ;GAAa,SAAS,EAAE,MAAM;EAAE;CACnD;AACF"}
@@ -1,8 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts
4
3
  export declare class EthereumBatchedWaitForTransactionTask extends BaseStepExecutionTask {
5
4
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
6
- }
7
- //#endregion
8
- //# sourceMappingURL=EthereumBatchedWaitForTransactionTask.d.ts.map
5
+ }
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_actions_waitForBatchTransactionReceipt = require("../../actions/waitForBatchTransactionReceipt.js");
3
3
  const require_core_tasks_helpers_updateActionWithReceipt = require("./helpers/updateActionWithReceipt.js");
4
4
  let _lifi_sdk = require("@lifi/sdk");
5
- //#region src/core/tasks/EthereumBatchedWaitForTransactionTask.ts
5
+ // src/core/tasks/EthereumBatchedWaitForTransactionTask.ts
6
6
  var EthereumBatchedWaitForTransactionTask = class extends _lifi_sdk.BaseStepExecutionTask {
7
7
  async run(context) {
8
8
  const { step, statusManager, fromChain, isBridgeExecution, checkClient } = context;
@@ -23,7 +23,6 @@ var EthereumBatchedWaitForTransactionTask = class extends _lifi_sdk.BaseStepExec
23
23
  return { status: "COMPLETED" };
24
24
  }
25
25
  };
26
- //#endregion
27
26
  exports.EthereumBatchedWaitForTransactionTask = EthereumBatchedWaitForTransactionTask;
28
27
 
29
28
  //# sourceMappingURL=EthereumBatchedWaitForTransactionTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumBatchedWaitForTransactionTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","waitForBatchTransactionReceipt"],"sources":["../../../../src/core/tasks/EthereumBatchedWaitForTransactionTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Hash } from 'viem'\nimport { waitForBatchTransactionReceipt } from '../../actions/waitForBatchTransactionReceipt.js'\nimport type {\n EthereumStepExecutorContext,\n WalletCallReceipt,\n} from '../../types.js'\nimport { updateActionWithReceipt } from './helpers/updateActionWithReceipt.js'\n\nexport class EthereumBatchedWaitForTransactionTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const { step, statusManager, fromChain, isBridgeExecution, checkClient } =\n context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const transactionReceipt = await waitForBatchTransactionReceipt(\n updatedClient,\n action.taskId as Hash,\n {\n onFailed: (result) => {\n const receipt = result.receipts?.find(\n (r) => r.status === 'reverted'\n ) as WalletCallReceipt | undefined\n if (receipt) {\n updateActionWithReceipt(\n statusManager,\n step,\n fromChain,\n receipt,\n action\n )\n }\n },\n signedAt: step.execution?.signedAt,\n callCount: action.callCount,\n }\n )\n\n updateActionWithReceipt(\n statusManager,\n step,\n fromChain,\n transactionReceipt,\n action\n )\n\n if (isBridgeExecution) {\n statusManager.updateAction(step, action.type, 'DONE')\n }\n\n return { status: 'COMPLETED' }\n }\n}\n"],"mappings":";;;;;AAcA,IAAa,wCAAb,cAA2DA,UAAAA,sBAAsB;CAC/E,MAAM,IAAI,SAA2D;EACnE,MAAM,EAAE,MAAM,eAAe,WAAW,mBAAmB,gBACzD;EAEF,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EAEA,IAAI,CAAC,QACH,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAGF,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,qBAAqB,MAAMC,+CAAAA,+BAC/B,eACA,OAAO,QACP;GACE,WAAW,WAAW;IACpB,MAAM,UAAU,OAAO,UAAU,MAC9B,MAAM,EAAE,WAAW,UACtB;IACA,IAAI,SACF,mDAAA,wBACE,eACA,MACA,WACA,SACA,MACF;GAEJ;GACA,UAAU,KAAK,WAAW;GAC1B,WAAW,OAAO;EACpB,CACF;EAEA,mDAAA,wBACE,eACA,MACA,WACA,oBACA,MACF;EAEA,IAAI,mBACF,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAGtD,OAAO,EAAE,QAAQ,YAAY;CAC/B;AACF"}
1
+ {"version":3,"file":"EthereumBatchedWaitForTransactionTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","waitForBatchTransactionReceipt","updateActionWithReceipt"],"sources":["../../../../src/core/tasks/EthereumBatchedWaitForTransactionTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n LiFiErrorCode,\n type TaskResult,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Hash } from 'viem'\nimport { waitForBatchTransactionReceipt } from '../../actions/waitForBatchTransactionReceipt.js'\nimport type {\n EthereumStepExecutorContext,\n WalletCallReceipt,\n} from '../../types.js'\nimport { updateActionWithReceipt } from './helpers/updateActionWithReceipt.js'\n\nexport class EthereumBatchedWaitForTransactionTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const { step, statusManager, fromChain, isBridgeExecution, checkClient } =\n context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const transactionReceipt = await waitForBatchTransactionReceipt(\n updatedClient,\n action.taskId as Hash,\n {\n onFailed: (result) => {\n const receipt = result.receipts?.find(\n (r) => r.status === 'reverted'\n ) as WalletCallReceipt | undefined\n if (receipt) {\n updateActionWithReceipt(\n statusManager,\n step,\n fromChain,\n receipt,\n action\n )\n }\n },\n signedAt: step.execution?.signedAt,\n callCount: action.callCount,\n }\n )\n\n updateActionWithReceipt(\n statusManager,\n step,\n fromChain,\n transactionReceipt,\n action\n )\n\n if (isBridgeExecution) {\n statusManager.updateAction(step, action.type, 'DONE')\n }\n\n return { status: 'COMPLETED' }\n }\n}\n"],"mappings":";;;;;AAcA,IAAa,wCAAb,cAA2DA,UAAAA,sBAAsB;CAC/E,MAAM,IAAI,SAA2D;EACnE,MAAM,EAAE,MAAM,eAAe,WAAW,mBAAmB,gBACzD;EAEF,MAAM,SAAS,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MACtC;EAEA,IAAI,CAAC,QACH,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAGF,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,qBAAqB,MAAMC,+CAAAA,+BAC/B,eACA,OAAO,QACP;GACE,WAAW,WAAW;IACpB,MAAM,UAAU,OAAO,UAAU,MAC9B,MAAM,EAAE,WAAW,UACtB;IACA,IAAI,SACFC,mDAAAA,wBACE,eACA,MACA,WACA,SACA,MACF;GAEJ;GACA,UAAU,KAAK,WAAW;GAC1B,WAAW,OAAO;EACpB,CACF;EAEAA,mDAAAA,wBACE,eACA,MACA,WACA,oBACA,MACF;EAEA,IAAI,mBACF,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAGtD,OAAO,EAAE,QAAQ,YAAY;CAC/B;AACF"}
@@ -1,6 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumCheckAllowanceAfterPrepareTask.d.ts
4
3
  /**
5
4
  * Runs after PrepareTransaction. Some providers only know the spender once
6
5
  * `/stepTransaction` builds the executable transaction, so the routing-time
@@ -15,6 +14,4 @@ export declare class EthereumCheckAllowanceAfterPrepareTask extends BaseStepExec
15
14
  private readonly allowancePipeline;
16
15
  override shouldRun(context: EthereumStepExecutorContext): Promise<boolean>;
17
16
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
18
- }
19
- //#endregion
20
- //# sourceMappingURL=EthereumCheckAllowanceAfterPrepareTask.d.ts.map
17
+ }
@@ -4,7 +4,7 @@ const require_core_tasks_EthereumResetAllowanceTask = require("./EthereumResetAl
4
4
  const require_core_tasks_EthereumSetAllowanceTask = require("./EthereumSetAllowanceTask.js");
5
5
  const require_core_tasks_helpers_hasApprovalAddressAppearedAtPrepare = require("./helpers/hasApprovalAddressAppearedAtPrepare.js");
6
6
  let _lifi_sdk = require("@lifi/sdk");
7
- //#region src/core/tasks/EthereumCheckAllowanceAfterPrepareTask.ts
7
+ // src/core/tasks/EthereumCheckAllowanceAfterPrepareTask.ts
8
8
  /**
9
9
  * Runs after PrepareTransaction. Some providers only know the spender once
10
10
  * `/stepTransaction` builds the executable transaction, so the routing-time
@@ -28,7 +28,6 @@ var EthereumCheckAllowanceAfterPrepareTask = class extends _lifi_sdk.BaseStepExe
28
28
  return this.allowancePipeline.run(context);
29
29
  }
30
30
  };
31
- //#endregion
32
31
  exports.EthereumCheckAllowanceAfterPrepareTask = EthereumCheckAllowanceAfterPrepareTask;
33
32
 
34
33
  //# sourceMappingURL=EthereumCheckAllowanceAfterPrepareTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumCheckAllowanceAfterPrepareTask.js","names":["BaseStepExecutionTask","TaskPipeline","EthereumCheckAllowanceTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","hasApprovalAddressAppearedAtPrepare"],"sources":["../../../../src/core/tasks/EthereumCheckAllowanceAfterPrepareTask.ts"],"sourcesContent":["import { BaseStepExecutionTask, TaskPipeline, type TaskResult } from '@lifi/sdk'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { EthereumCheckAllowanceTask } from './EthereumCheckAllowanceTask.js'\nimport { EthereumResetAllowanceTask } from './EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './EthereumSetAllowanceTask.js'\nimport { hasApprovalAddressAppearedAtPrepare } from './helpers/hasApprovalAddressAppearedAtPrepare.js'\n\n/**\n * Runs after PrepareTransaction. Some providers only know the spender once\n * `/stepTransaction` builds the executable transaction, so the routing-time\n * step carries no `estimate.approvalAddress` and the allowance tasks before\n * prepare do not run. When the re-quote brings one, the allowance is read for\n * it, and reset and set only if it falls short, before the transaction is\n * signed.\n *\n * A spender that was already set before prepare is not checked again here.\n */\nexport class EthereumCheckAllowanceAfterPrepareTask extends BaseStepExecutionTask {\n private readonly allowancePipeline = new TaskPipeline([\n new EthereumCheckAllowanceTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n ])\n\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n return hasApprovalAddressAppearedAtPrepare(context)\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n return this.allowancePipeline.run(context)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAa,yCAAb,cAA4DA,UAAAA,sBAAsB;CAChF,oBAAqC,IAAIC,UAAAA,aAAa;EACpD,IAAIC,8CAAAA,2BAA2B;EAC/B,IAAIC,8CAAAA,2BAA2B;EAC/B,IAAIC,4CAAAA,yBAAyB;CAC/B,CAAC;CAED,MAAe,UACb,SACkB;EAClB,OAAOC,+DAAAA,oCAAoC,OAAO;CACpD;CAEA,MAAM,IAAI,SAA2D;EACnE,OAAO,KAAK,kBAAkB,IAAI,OAAO;CAC3C;AACF"}
1
+ {"version":3,"file":"EthereumCheckAllowanceAfterPrepareTask.js","names":["BaseStepExecutionTask","TaskPipeline","EthereumCheckAllowanceTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","hasApprovalAddressAppearedAtPrepare"],"sources":["../../../../src/core/tasks/EthereumCheckAllowanceAfterPrepareTask.ts"],"sourcesContent":["import { BaseStepExecutionTask, TaskPipeline, type TaskResult } from '@lifi/sdk'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { EthereumCheckAllowanceTask } from './EthereumCheckAllowanceTask.js'\nimport { EthereumResetAllowanceTask } from './EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './EthereumSetAllowanceTask.js'\nimport { hasApprovalAddressAppearedAtPrepare } from './helpers/hasApprovalAddressAppearedAtPrepare.js'\n\n/**\n * Runs after PrepareTransaction. Some providers only know the spender once\n * `/stepTransaction` builds the executable transaction, so the routing-time\n * step carries no `estimate.approvalAddress` and the allowance tasks before\n * prepare do not run. When the re-quote brings one, the allowance is read for\n * it, and reset and set only if it falls short, before the transaction is\n * signed.\n *\n * A spender that was already set before prepare is not checked again here.\n */\nexport class EthereumCheckAllowanceAfterPrepareTask extends BaseStepExecutionTask {\n private readonly allowancePipeline = new TaskPipeline([\n new EthereumCheckAllowanceTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n ])\n\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n return hasApprovalAddressAppearedAtPrepare(context)\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n return this.allowancePipeline.run(context)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAa,yCAAb,cAA4DA,UAAAA,sBAAsB;CAC/D,oBAAoB,IAAIC,UAAAA,aAAa;EACpD,IAAIC,8CAAAA,2BAA2B;EAC/B,IAAIC,8CAAAA,2BAA2B;EAC/B,IAAIC,4CAAAA,yBAAyB;CAC/B,CAAC;CAED,MAAe,UACb,SACkB;EAClB,OAAOC,+DAAAA,oCAAoC,OAAO;CACpD;CAEA,MAAM,IAAI,SAA2D;EACnE,OAAO,KAAK,kBAAkB,IAAI,OAAO;CAC3C;AACF"}
@@ -1,9 +1,6 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumCheckAllowanceTask.d.ts
4
3
  export declare class EthereumCheckAllowanceTask extends BaseStepExecutionTask {
5
4
  override shouldRun(context: EthereumStepExecutorContext): Promise<boolean>;
6
5
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
7
- }
8
- //#endregion
9
- //# sourceMappingURL=EthereumCheckAllowanceTask.d.ts.map
6
+ }
@@ -3,13 +3,13 @@ const require_actions_getAllowance = require("../../actions/getAllowance.js");
3
3
  const require_core_tasks_helpers_getEthereumExecutionStrategy = require("./helpers/getEthereumExecutionStrategy.js");
4
4
  const require_core_tasks_helpers_resolveAllowanceSpender = require("./helpers/resolveAllowanceSpender.js");
5
5
  let _lifi_sdk = require("@lifi/sdk");
6
- //#region src/core/tasks/EthereumCheckAllowanceTask.ts
6
+ // src/core/tasks/EthereumCheckAllowanceTask.ts
7
7
  var EthereumCheckAllowanceTask = class extends _lifi_sdk.BaseStepExecutionTask {
8
8
  async shouldRun(context) {
9
9
  return !context.hasMatchingPermit;
10
10
  }
11
11
  async run(context) {
12
- const { step, checkClient, client, statusManager } = context;
12
+ const { step, checkClient, client, statusManager, fromChain } = context;
13
13
  const action = statusManager.initializeAction({
14
14
  step,
15
15
  type: "CHECK_ALLOWANCE",
@@ -21,7 +21,7 @@ var EthereumCheckAllowanceTask = class extends _lifi_sdk.BaseStepExecutionTask {
21
21
  const fromAmount = BigInt(step.action.fromAmount);
22
22
  const updatedClient = await checkClient(step);
23
23
  if (!updatedClient) return { status: "PAUSED" };
24
- const allowance = await require_actions_getAllowance.getAllowance(client, updatedClient, step.action.fromToken.address, updatedClient.account.address, spenderAddress);
24
+ const allowance = await require_actions_getAllowance.getAllowance(client, updatedClient, step.action.fromToken.address, updatedClient.account.address, spenderAddress, fromChain.id);
25
25
  statusManager.updateAction(step, action.type, "DONE");
26
26
  return {
27
27
  status: "COMPLETED",
@@ -34,7 +34,6 @@ var EthereumCheckAllowanceTask = class extends _lifi_sdk.BaseStepExecutionTask {
34
34
  };
35
35
  }
36
36
  };
37
- //#endregion
38
37
  exports.EthereumCheckAllowanceTask = EthereumCheckAllowanceTask;
39
38
 
40
39
  //# sourceMappingURL=EthereumCheckAllowanceTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumCheckAllowanceTask.js","names":["BaseStepExecutionTask","getEthereumExecutionStrategy","resolveAllowanceSpender","getAllowance"],"sources":["../../../../src/core/tasks/EthereumCheckAllowanceTask.ts"],"sourcesContent":["import { BaseStepExecutionTask, type TaskResult } from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { getAllowance } from '../../actions/getAllowance.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { getEthereumExecutionStrategy } from './helpers/getEthereumExecutionStrategy.js'\nimport { resolveAllowanceSpender } from './helpers/resolveAllowanceSpender.js'\n\nexport class EthereumCheckAllowanceTask extends BaseStepExecutionTask {\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n return !context.hasMatchingPermit\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const { step, checkClient, client, statusManager } = context\n\n // Start new allowance check\n const action = statusManager.initializeAction({\n step,\n type: 'CHECK_ALLOWANCE',\n chainId: step.action.fromChainId,\n status: 'STARTED',\n })\n\n const executionStrategy = await getEthereumExecutionStrategy(context)\n const { spenderAddress } = await resolveAllowanceSpender(\n context,\n executionStrategy\n )\n\n const fromAmount = BigInt(step.action.fromAmount)\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const allowance = await getAllowance(\n client,\n updatedClient,\n step.action.fromToken.address as Address,\n updatedClient.account!.address,\n spenderAddress\n )\n\n statusManager.updateAction(step, action.type, 'DONE')\n\n return {\n status: 'COMPLETED',\n context: {\n hasAllowance: allowance > 0n,\n hasSufficientAllowance: fromAmount <= allowance,\n executionStrategy,\n allowanceSpender: spenderAddress,\n },\n }\n }\n}\n"],"mappings":";;;;;;AAOA,IAAa,6BAAb,cAAgDA,UAAAA,sBAAsB;CACpE,MAAe,UACb,SACkB;EAClB,OAAO,CAAC,QAAQ;CAClB;CAEA,MAAM,IAAI,SAA2D;EACnE,MAAM,EAAE,MAAM,aAAa,QAAQ,kBAAkB;EAGrD,MAAM,SAAS,cAAc,iBAAiB;GAC5C;GACA,MAAM;GACN,SAAS,KAAK,OAAO;GACrB,QAAQ;EACV,CAAC;EAED,MAAM,oBAAoB,MAAMC,wDAAAA,6BAA6B,OAAO;EACpE,MAAM,EAAE,mBAAmB,MAAMC,mDAAAA,wBAC/B,SACA,iBACF;EAEA,MAAM,aAAa,OAAO,KAAK,OAAO,UAAU;EAEhD,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,YAAY,MAAMC,6BAAAA,aACtB,QACA,eACA,KAAK,OAAO,UAAU,SACtB,cAAc,QAAS,SACvB,cACF;EAEA,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAEpD,OAAO;GACL,QAAQ;GACR,SAAS;IACP,cAAc,YAAY;IAC1B,wBAAwB,cAAc;IACtC;IACA,kBAAkB;GACpB;EACF;CACF;AACF"}
1
+ {"version":3,"file":"EthereumCheckAllowanceTask.js","names":["BaseStepExecutionTask","getEthereumExecutionStrategy","resolveAllowanceSpender","getAllowance"],"sources":["../../../../src/core/tasks/EthereumCheckAllowanceTask.ts"],"sourcesContent":["import { BaseStepExecutionTask, type TaskResult } from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { getAllowance } from '../../actions/getAllowance.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { getEthereumExecutionStrategy } from './helpers/getEthereumExecutionStrategy.js'\nimport { resolveAllowanceSpender } from './helpers/resolveAllowanceSpender.js'\n\nexport class EthereumCheckAllowanceTask extends BaseStepExecutionTask {\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n return !context.hasMatchingPermit\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const { step, checkClient, client, statusManager, fromChain } = context\n\n // Start new allowance check\n const action = statusManager.initializeAction({\n step,\n type: 'CHECK_ALLOWANCE',\n chainId: step.action.fromChainId,\n status: 'STARTED',\n })\n\n const executionStrategy = await getEthereumExecutionStrategy(context)\n const { spenderAddress } = await resolveAllowanceSpender(\n context,\n executionStrategy\n )\n\n const fromAmount = BigInt(step.action.fromAmount)\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const allowance = await getAllowance(\n client,\n updatedClient,\n step.action.fromToken.address as Address,\n updatedClient.account!.address,\n spenderAddress,\n fromChain.id\n )\n\n statusManager.updateAction(step, action.type, 'DONE')\n\n return {\n status: 'COMPLETED',\n context: {\n hasAllowance: allowance > 0n,\n hasSufficientAllowance: fromAmount <= allowance,\n executionStrategy,\n allowanceSpender: spenderAddress,\n },\n }\n }\n}\n"],"mappings":";;;;;;AAOA,IAAa,6BAAb,cAAgDA,UAAAA,sBAAsB;CACpE,MAAe,UACb,SACkB;EAClB,OAAO,CAAC,QAAQ;CAClB;CAEA,MAAM,IAAI,SAA2D;EACnE,MAAM,EAAE,MAAM,aAAa,QAAQ,eAAe,cAAc;EAGhE,MAAM,SAAS,cAAc,iBAAiB;GAC5C;GACA,MAAM;GACN,SAAS,KAAK,OAAO;GACrB,QAAQ;EACV,CAAC;EAED,MAAM,oBAAoB,MAAMC,wDAAAA,6BAA6B,OAAO;EACpE,MAAM,EAAE,mBAAmB,MAAMC,mDAAAA,wBAC/B,SACA,iBACF;EAEA,MAAM,aAAa,OAAO,KAAK,OAAO,UAAU;EAEhD,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,YAAY,MAAMC,6BAAAA,aACtB,QACA,eACA,KAAK,OAAO,UAAU,SACtB,cAAc,QAAS,SACvB,gBACA,UAAU,EACZ;EAEA,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAEpD,OAAO;GACL,QAAQ;GACR,SAAS;IACP,cAAc,YAAY;IAC1B,wBAAwB,cAAc;IACtC;IACA,kBAAkB;GACpB;EACF;CACF;AACF"}
@@ -1,6 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { CheckBalanceOptions, CheckBalanceTask } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumCheckBalanceTask.d.ts
4
3
  /**
5
4
  * Skips the outer-tx gas check for steps where the wallet doesn't fund it:
6
5
  * smart-contract wallets (Safe Apps, 4337, 7579, …) where the
@@ -12,6 +11,4 @@ import { CheckBalanceOptions, CheckBalanceTask } from "@lifi/sdk";
12
11
  */
13
12
  export declare class EthereumCheckBalanceTask extends CheckBalanceTask {
14
13
  protected override getCheckBalanceOptions(context: EthereumStepExecutorContext): Promise<CheckBalanceOptions>;
15
- }
16
- //#endregion
17
- //# sourceMappingURL=EthereumCheckBalanceTask.d.ts.map
14
+ }
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
3
2
  const require_actions_getAccountCode = require("../../actions/getAccountCode.js");
4
3
  const require_actions_isSmartContractWallet = require("../../actions/isSmartContractWallet.js");
4
+ const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
5
5
  let _lifi_sdk = require("@lifi/sdk");
6
- //#region src/core/tasks/EthereumCheckBalanceTask.ts
6
+ // src/core/tasks/EthereumCheckBalanceTask.ts
7
7
  /**
8
8
  * Skips the outer-tx gas check for steps where the wallet doesn't fund it:
9
9
  * smart-contract wallets (Safe Apps, 4337, 7579, …) where the
@@ -16,6 +16,7 @@ let _lifi_sdk = require("@lifi/sdk");
16
16
  var EthereumCheckBalanceTask = class extends _lifi_sdk.CheckBalanceTask {
17
17
  async getCheckBalanceOptions(context) {
18
18
  const { client, step, fromChain } = context;
19
+ if ((0, _lifi_sdk.isGaslessStep)(step)) return { walletPaysGas: false };
19
20
  const userFundsTransaction = require_utils_getTypedDataLane.isPermit2AllowanceLane(step, fromChain);
20
21
  if (step.typedData?.length && !userFundsTransaction) return { walletPaysGas: false };
21
22
  const fromAddress = step.action.fromAddress;
@@ -28,7 +29,6 @@ var EthereumCheckBalanceTask = class extends _lifi_sdk.CheckBalanceTask {
28
29
  return { walletPaysGas: !require_actions_isSmartContractWallet.isSmartContractWalletCode(code) };
29
30
  }
30
31
  };
31
- //#endregion
32
32
  exports.EthereumCheckBalanceTask = EthereumCheckBalanceTask;
33
33
 
34
34
  //# sourceMappingURL=EthereumCheckBalanceTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumCheckBalanceTask.js","names":["CheckBalanceTask","isPermit2AllowanceLane","getAccountCode","isSmartContractWalletCode"],"sources":["../../../../src/core/tasks/EthereumCheckBalanceTask.ts"],"sourcesContent":["import { type CheckBalanceOptions, CheckBalanceTask } from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { getAccountCode } from '../../actions/getAccountCode.js'\nimport { isSmartContractWalletCode } from '../../actions/isSmartContractWallet.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { isPermit2AllowanceLane } from '../../utils/getTypedDataLane.js'\n\n/**\n * Skips the outer-tx gas check for steps where the wallet doesn't fund it:\n * smart-contract wallets (Safe Apps, 4337, 7579, …) where the\n * executor / bundler / paymaster pays, and typed-data steps the user does not\n * fund. Source amount and non-included native fees are still verified.\n *\n * Skip-bias is intentional: a wrong skip is caught by the wallet rejecting\n * the tx; a wrong enforce blocks a tx that would have succeeded.\n */\nexport class EthereumCheckBalanceTask extends CheckBalanceTask {\n protected override async getCheckBalanceOptions(\n context: EthereumStepExecutorContext\n ): Promise<CheckBalanceOptions> {\n const { client, step, fromChain } = context\n\n const userFundsTransaction = isPermit2AllowanceLane(step, fromChain)\n if (step.typedData?.length && !userFundsTransaction) {\n return { walletPaysGas: false }\n }\n\n // Funding wallet (NOT signer) — for Safe Apps these usually match, but\n // the balance question is about the funder. Compare with\n // `canAccountUseNativePermits`, which uses the signer.\n const fromAddress = step.action.fromAddress as Address | undefined\n if (!fromAddress) {\n return {}\n }\n\n // `step.action.fromChainId` (NOT wallet's connected chain) so cross-\n // chain / post-chain-switch flows query the chain that executes the step.\n const code = await getAccountCode({\n client,\n chainId: step.action.fromChainId,\n address: fromAddress,\n })\n\n // `code === undefined` on RPC failure → falls through to \"treat as EOA\"\n // since `isSmartContractWalletCode(undefined)` is `false` (conservative:\n // strict gas check stays on, today's behavior).\n return { walletPaysGas: !isSmartContractWalletCode(code) }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,2BAAb,cAA8CA,UAAAA,iBAAiB;CAC7D,MAAyB,uBACvB,SAC8B;EAC9B,MAAM,EAAE,QAAQ,MAAM,cAAc;EAEpC,MAAM,uBAAuBC,+BAAAA,uBAAuB,MAAM,SAAS;EACnE,IAAI,KAAK,WAAW,UAAU,CAAC,sBAC7B,OAAO,EAAE,eAAe,MAAM;EAMhC,MAAM,cAAc,KAAK,OAAO;EAChC,IAAI,CAAC,aACH,OAAO,CAAC;EAKV,MAAM,OAAO,MAAMC,+BAAAA,eAAe;GAChC;GACA,SAAS,KAAK,OAAO;GACrB,SAAS;EACX,CAAC;EAKD,OAAO,EAAE,eAAe,CAACC,sCAAAA,0BAA0B,IAAI,EAAE;CAC3D;AACF"}
1
+ {"version":3,"file":"EthereumCheckBalanceTask.js","names":["CheckBalanceTask","isGaslessStep","isPermit2AllowanceLane","getAccountCode","isSmartContractWalletCode"],"sources":["../../../../src/core/tasks/EthereumCheckBalanceTask.ts"],"sourcesContent":["import {\n type CheckBalanceOptions,\n CheckBalanceTask,\n isGaslessStep,\n} from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { getAccountCode } from '../../actions/getAccountCode.js'\nimport { isSmartContractWalletCode } from '../../actions/isSmartContractWallet.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { isPermit2AllowanceLane } from '../../utils/getTypedDataLane.js'\n\n/**\n * Skips the outer-tx gas check for steps where the wallet doesn't fund it:\n * smart-contract wallets (Safe Apps, 4337, 7579, …) where the\n * executor / bundler / paymaster pays, and typed-data steps the user does not\n * fund. Source amount and non-included native fees are still verified.\n *\n * Skip-bias is intentional: a wrong skip is caught by the wallet rejecting\n * the tx; a wrong enforce blocks a tx that would have succeeded.\n */\nexport class EthereumCheckBalanceTask extends CheckBalanceTask {\n protected override async getCheckBalanceOptions(\n context: EthereumStepExecutorContext\n ): Promise<CheckBalanceOptions> {\n const { client, step, fromChain } = context\n\n // The relayer pays the gas of a gasless step. Before prepare the step has\n // no typed data yet, so the relay fee is the only signal.\n if (isGaslessStep(step)) {\n return { walletPaysGas: false }\n }\n\n const userFundsTransaction = isPermit2AllowanceLane(step, fromChain)\n if (step.typedData?.length && !userFundsTransaction) {\n return { walletPaysGas: false }\n }\n\n // Funding wallet (NOT signer) — for Safe Apps these usually match, but\n // the balance question is about the funder. Compare with\n // `canAccountUseNativePermits`, which uses the signer.\n const fromAddress = step.action.fromAddress as Address | undefined\n if (!fromAddress) {\n return {}\n }\n\n // `step.action.fromChainId` (NOT wallet's connected chain) so cross-\n // chain / post-chain-switch flows query the chain that executes the step.\n const code = await getAccountCode({\n client,\n chainId: step.action.fromChainId,\n address: fromAddress,\n })\n\n // `code === undefined` on RPC failure → falls through to \"treat as EOA\"\n // since `isSmartContractWalletCode(undefined)` is `false` (conservative:\n // strict gas check stays on, today's behavior).\n return { walletPaysGas: !isSmartContractWalletCode(code) }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,IAAa,2BAAb,cAA8CA,UAAAA,iBAAiB;CAC7D,MAAyB,uBACvB,SAC8B;EAC9B,MAAM,EAAE,QAAQ,MAAM,cAAc;EAIpC,KAAA,GAAIC,UAAAA,cAAAA,CAAc,IAAI,GACpB,OAAO,EAAE,eAAe,MAAM;EAGhC,MAAM,uBAAuBC,+BAAAA,uBAAuB,MAAM,SAAS;EACnE,IAAI,KAAK,WAAW,UAAU,CAAC,sBAC7B,OAAO,EAAE,eAAe,MAAM;EAMhC,MAAM,cAAc,KAAK,OAAO;EAChC,IAAI,CAAC,aACH,OAAO,CAAC;EAKV,MAAM,OAAO,MAAMC,+BAAAA,eAAe;GAChC;GACA,SAAS,KAAK,OAAO;GACrB,SAAS;EACX,CAAC;EAKD,OAAO,EAAE,eAAe,CAACC,sCAAAA,0BAA0B,IAAI,EAAE;CAC3D;AACF"}
@@ -1,9 +1,6 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumCheckPermitsTask.d.ts
4
3
  export declare class EthereumCheckPermitsTask extends BaseStepExecutionTask {
5
4
  override shouldRun(context: EthereumStepExecutorContext): Promise<boolean>;
6
5
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
7
- }
8
- //#endregion
9
- //# sourceMappingURL=EthereumCheckPermitsTask.d.ts.map
6
+ }
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
3
2
  const require_utils_getDomainChainId = require("../../utils/getDomainChainId.js");
3
+ const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
4
4
  const require_core_tasks_helpers_signTypedDataEntries = require("./helpers/signTypedDataEntries.js");
5
5
  let _lifi_sdk = require("@lifi/sdk");
6
- //#region src/core/tasks/EthereumCheckPermitsTask.ts
6
+ // src/core/tasks/EthereumCheckPermitsTask.ts
7
7
  var EthereumCheckPermitsTask = class extends _lifi_sdk.BaseStepExecutionTask {
8
8
  async shouldRun(context) {
9
9
  const { step, fromChain, disableMessageSigning } = context;
@@ -32,7 +32,6 @@ var EthereumCheckPermitsTask = class extends _lifi_sdk.BaseStepExecutionTask {
32
32
  };
33
33
  }
34
34
  };
35
- //#endregion
36
35
  exports.EthereumCheckPermitsTask = EthereumCheckPermitsTask;
37
36
 
38
37
  //# sourceMappingURL=EthereumCheckPermitsTask.js.map
@@ -1,9 +1,6 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumNativePermitTask.d.ts
4
3
  export declare class EthereumNativePermitTask extends BaseStepExecutionTask {
5
4
  override shouldRun(context: EthereumStepExecutorContext): Promise<boolean>;
6
5
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
7
- }
8
- //#endregion
9
- //# sourceMappingURL=EthereumNativePermitTask.d.ts.map
6
+ }
@@ -1,14 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_permits_getNativePermit = require("../../permits/getNativePermit.js");
3
+ const require_permits_isNativePermitValid = require("../../permits/isNativePermitValid.js");
2
4
  const require_utils_getActionWithFallback = require("../../utils/getActionWithFallback.js");
3
5
  const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
4
- const require_core_tasks_helpers_getEthereumExecutionStrategy = require("./helpers/getEthereumExecutionStrategy.js");
5
6
  const require_utils_isValidSignature = require("../../utils/isValidSignature.js");
6
- const require_permits_getNativePermit = require("../../permits/getNativePermit.js");
7
- const require_permits_isNativePermitValid = require("../../permits/isNativePermitValid.js");
7
+ const require_core_tasks_helpers_getEthereumExecutionStrategy = require("./helpers/getEthereumExecutionStrategy.js");
8
8
  let _lifi_sdk = require("@lifi/sdk");
9
9
  let viem_actions = require("viem/actions");
10
10
  let viem_utils = require("viem/utils");
11
- //#region src/core/tasks/EthereumNativePermitTask.ts
11
+ // src/core/tasks/EthereumNativePermitTask.ts
12
12
  var EthereumNativePermitTask = class extends _lifi_sdk.BaseStepExecutionTask {
13
13
  async shouldRun(context) {
14
14
  const { step, fromChain, hasMatchingPermit, hasSufficientAllowance, disableMessageSigning } = context;
@@ -36,7 +36,7 @@ var EthereumNativePermitTask = class extends _lifi_sdk.BaseStepExecutionTask {
36
36
  spenderAddress: fromChain.permit2Proxy,
37
37
  amount: fromAmount,
38
38
  ownerAddress: updatedClient.account.address
39
- });
39
+ }, fromChain.id);
40
40
  if (!nativePermitData) {
41
41
  statusManager.updateAction(step, action.type, "DONE");
42
42
  return { status: "COMPLETED" };
@@ -72,7 +72,6 @@ var EthereumNativePermitTask = class extends _lifi_sdk.BaseStepExecutionTask {
72
72
  };
73
73
  }
74
74
  };
75
- //#endregion
76
75
  exports.EthereumNativePermitTask = EthereumNativePermitTask;
77
76
 
78
77
  //# sourceMappingURL=EthereumNativePermitTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumNativePermitTask.js","names":["BaseStepExecutionTask","isPermit2AllowanceLane","getEthereumExecutionStrategy","getActionWithFallback","getNativePermit","isNativePermitValid","getAction","signTypedData","isValidSignature"],"sources":["../../../../src/core/tasks/EthereumNativePermitTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n type SignedTypedData,\n type TaskResult,\n} from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { signTypedData } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { getNativePermit } from '../../permits/getNativePermit.js'\nimport { isNativePermitValid } from '../../permits/isNativePermitValid.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { getActionWithFallback } from '../../utils/getActionWithFallback.js'\nimport { isPermit2AllowanceLane } from '../../utils/getTypedDataLane.js'\nimport { isValidSignature } from '../../utils/isValidSignature.js'\nimport { getEthereumExecutionStrategy } from './helpers/getEthereumExecutionStrategy.js'\n\nexport class EthereumNativePermitTask extends BaseStepExecutionTask {\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n const {\n step,\n fromChain,\n hasMatchingPermit,\n hasSufficientAllowance,\n disableMessageSigning,\n } = context\n\n if (hasMatchingPermit || hasSufficientAllowance) {\n return false\n }\n\n if (isPermit2AllowanceLane(step, fromChain)) {\n return false\n }\n\n const executionStrategy = await getEthereumExecutionStrategy(context)\n const batchingSupported = executionStrategy === 'batched'\n // Check if proxy contract is available and message signing is not disabled, also not available for atomic batch\n const isNativePermitAvailable =\n !!fromChain.permit2Proxy &&\n !batchingSupported &&\n !disableMessageSigning &&\n !step.estimate.skipPermit\n return isNativePermitAvailable\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n client,\n fromChain,\n statusManager,\n allowUserInteraction,\n checkClient,\n signedTypedData: currentSignedTypedData,\n } = context\n\n const action = statusManager.initializeAction({\n step,\n type: 'NATIVE_PERMIT',\n chainId: step.action.fromChainId,\n status: 'STARTED',\n })\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const fromAmount = BigInt(step.action.fromAmount)\n\n const nativePermitData = await getActionWithFallback(\n client,\n updatedClient,\n getNativePermit,\n 'getNativePermit',\n {\n client,\n viemClient: updatedClient,\n chainId: fromChain.id,\n tokenAddress: step.action.fromToken.address as Address,\n spenderAddress: fromChain.permit2Proxy as Address,\n amount: fromAmount,\n ownerAddress: updatedClient.account!.address,\n }\n )\n\n if (!nativePermitData) {\n statusManager.updateAction(step, action.type, 'DONE')\n return { status: 'COMPLETED' }\n }\n\n const signedTypedData = [...currentSignedTypedData]\n\n // Check if we already have a valid permit for this chain and requirements\n const signedTypedDataForChain = signedTypedData.find((signedTypedData) =>\n isNativePermitValid(signedTypedData, nativePermitData)\n )\n\n if (!signedTypedDataForChain) {\n statusManager.updateAction(step, action.type, 'ACTION_REQUIRED')\n\n if (!allowUserInteraction) {\n return { status: 'PAUSED' }\n }\n\n // Sign the permit\n const signature = await getAction(\n updatedClient,\n signTypedData,\n 'signTypedData'\n )({\n account: updatedClient.account!,\n domain: nativePermitData.domain,\n types: nativePermitData.types,\n primaryType: nativePermitData.primaryType,\n message: nativePermitData.message,\n })\n\n // Some wallets resolve signTypedData with a nullish or empty value\n // instead of rejecting — skip the permit and fall back to the\n // Permit2/standard approval flow\n if (!isValidSignature(signature)) {\n statusManager.updateAction(step, action.type, 'DONE')\n return { status: 'COMPLETED' }\n }\n\n // Add the new permit to the signed permits array\n const signedPermit: SignedTypedData = {\n ...nativePermitData,\n signature,\n }\n signedTypedData.push(signedPermit)\n }\n\n statusManager.updateAction(step, action.type, 'DONE')\n\n return {\n status: 'COMPLETED',\n context: { signedTypedData, hasMatchingPermit: true },\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAgBA,IAAa,2BAAb,cAA8CA,UAAAA,sBAAsB;CAClE,MAAe,UACb,SACkB;EAClB,MAAM,EACJ,MACA,WACA,mBACA,wBACA,0BACE;EAEJ,IAAI,qBAAqB,wBACvB,OAAO;EAGT,IAAIC,+BAAAA,uBAAuB,MAAM,SAAS,GACxC,OAAO;EAIT,MAAM,oBAAoB,MADMC,wDAAAA,6BAA6B,OAAO,MACpB;EAOhD,OAJE,CAAC,CAAC,UAAU,gBACZ,CAAC,qBACD,CAAC,yBACD,CAAC,KAAK,SAAS;CAEnB;CAEA,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,QACA,WACA,eACA,sBACA,aACA,iBAAiB,2BACf;EAEJ,MAAM,SAAS,cAAc,iBAAiB;GAC5C;GACA,MAAM;GACN,SAAS,KAAK,OAAO;GACrB,QAAQ;EACV,CAAC;EAED,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,aAAa,OAAO,KAAK,OAAO,UAAU;EAEhD,MAAM,mBAAmB,MAAMC,oCAAAA,sBAC7B,QACA,eACAC,gCAAAA,iBACA,mBACA;GACE;GACA,YAAY;GACZ,SAAS,UAAU;GACnB,cAAc,KAAK,OAAO,UAAU;GACpC,gBAAgB,UAAU;GAC1B,QAAQ;GACR,cAAc,cAAc,QAAS;EACvC,CACF;EAEA,IAAI,CAAC,kBAAkB;GACrB,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;GACpD,OAAO,EAAE,QAAQ,YAAY;EAC/B;EAEA,MAAM,kBAAkB,CAAC,GAAG,sBAAsB;EAOlD,IAAI,CAJ4B,gBAAgB,MAAM,oBACpDC,oCAAAA,oBAAoB,iBAAiB,gBAAgB,CAG5B,GAAG;GAC5B,cAAc,aAAa,MAAM,OAAO,MAAM,iBAAiB;GAE/D,IAAI,CAAC,sBACH,OAAO,EAAE,QAAQ,SAAS;GAI5B,MAAM,YAAY,OAAA,GAAMC,WAAAA,UAAAA,CACtB,eACAC,aAAAA,eACA,eACF,CAAC,CAAC;IACA,SAAS,cAAc;IACvB,QAAQ,iBAAiB;IACzB,OAAO,iBAAiB;IACxB,aAAa,iBAAiB;IAC9B,SAAS,iBAAiB;GAC5B,CAAC;GAKD,IAAI,CAACC,+BAAAA,iBAAiB,SAAS,GAAG;IAChC,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;IACpD,OAAO,EAAE,QAAQ,YAAY;GAC/B;GAGA,MAAM,eAAgC;IACpC,GAAG;IACH;GACF;GACA,gBAAgB,KAAK,YAAY;EACnC;EAEA,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAEpD,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAiB,mBAAmB;GAAK;EACtD;CACF;AACF"}
1
+ {"version":3,"file":"EthereumNativePermitTask.js","names":["BaseStepExecutionTask","isPermit2AllowanceLane","getEthereumExecutionStrategy","getActionWithFallback","getNativePermit","isNativePermitValid","getAction","signTypedData","isValidSignature"],"sources":["../../../../src/core/tasks/EthereumNativePermitTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n type SignedTypedData,\n type TaskResult,\n} from '@lifi/sdk'\nimport type { Address } from 'viem'\nimport { signTypedData } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { getNativePermit } from '../../permits/getNativePermit.js'\nimport { isNativePermitValid } from '../../permits/isNativePermitValid.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport { getActionWithFallback } from '../../utils/getActionWithFallback.js'\nimport { isPermit2AllowanceLane } from '../../utils/getTypedDataLane.js'\nimport { isValidSignature } from '../../utils/isValidSignature.js'\nimport { getEthereumExecutionStrategy } from './helpers/getEthereumExecutionStrategy.js'\n\nexport class EthereumNativePermitTask extends BaseStepExecutionTask {\n override async shouldRun(\n context: EthereumStepExecutorContext\n ): Promise<boolean> {\n const {\n step,\n fromChain,\n hasMatchingPermit,\n hasSufficientAllowance,\n disableMessageSigning,\n } = context\n\n if (hasMatchingPermit || hasSufficientAllowance) {\n return false\n }\n\n if (isPermit2AllowanceLane(step, fromChain)) {\n return false\n }\n\n const executionStrategy = await getEthereumExecutionStrategy(context)\n const batchingSupported = executionStrategy === 'batched'\n // Check if proxy contract is available and message signing is not disabled, also not available for atomic batch\n const isNativePermitAvailable =\n !!fromChain.permit2Proxy &&\n !batchingSupported &&\n !disableMessageSigning &&\n !step.estimate.skipPermit\n return isNativePermitAvailable\n }\n\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n client,\n fromChain,\n statusManager,\n allowUserInteraction,\n checkClient,\n signedTypedData: currentSignedTypedData,\n } = context\n\n const action = statusManager.initializeAction({\n step,\n type: 'NATIVE_PERMIT',\n chainId: step.action.fromChainId,\n status: 'STARTED',\n })\n\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n\n const fromAmount = BigInt(step.action.fromAmount)\n\n const nativePermitData = await getActionWithFallback(\n client,\n updatedClient,\n getNativePermit,\n 'getNativePermit',\n {\n client,\n viemClient: updatedClient,\n chainId: fromChain.id,\n tokenAddress: step.action.fromToken.address as Address,\n spenderAddress: fromChain.permit2Proxy as Address,\n amount: fromAmount,\n ownerAddress: updatedClient.account!.address,\n },\n fromChain.id\n )\n\n if (!nativePermitData) {\n statusManager.updateAction(step, action.type, 'DONE')\n return { status: 'COMPLETED' }\n }\n\n const signedTypedData = [...currentSignedTypedData]\n\n // Check if we already have a valid permit for this chain and requirements\n const signedTypedDataForChain = signedTypedData.find((signedTypedData) =>\n isNativePermitValid(signedTypedData, nativePermitData)\n )\n\n if (!signedTypedDataForChain) {\n statusManager.updateAction(step, action.type, 'ACTION_REQUIRED')\n\n if (!allowUserInteraction) {\n return { status: 'PAUSED' }\n }\n\n // Sign the permit\n const signature = await getAction(\n updatedClient,\n signTypedData,\n 'signTypedData'\n )({\n account: updatedClient.account!,\n domain: nativePermitData.domain,\n types: nativePermitData.types,\n primaryType: nativePermitData.primaryType,\n message: nativePermitData.message,\n })\n\n // Some wallets resolve signTypedData with a nullish or empty value\n // instead of rejecting — skip the permit and fall back to the\n // Permit2/standard approval flow\n if (!isValidSignature(signature)) {\n statusManager.updateAction(step, action.type, 'DONE')\n return { status: 'COMPLETED' }\n }\n\n // Add the new permit to the signed permits array\n const signedPermit: SignedTypedData = {\n ...nativePermitData,\n signature,\n }\n signedTypedData.push(signedPermit)\n }\n\n statusManager.updateAction(step, action.type, 'DONE')\n\n return {\n status: 'COMPLETED',\n context: { signedTypedData, hasMatchingPermit: true },\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAgBA,IAAa,2BAAb,cAA8CA,UAAAA,sBAAsB;CAClE,MAAe,UACb,SACkB;EAClB,MAAM,EACJ,MACA,WACA,mBACA,wBACA,0BACE;EAEJ,IAAI,qBAAqB,wBACvB,OAAO;EAGT,IAAIC,+BAAAA,uBAAuB,MAAM,SAAS,GACxC,OAAO;EAIT,MAAM,oBAAoB,MADMC,wDAAAA,6BAA6B,OAAO,MACpB;EAOhD,OAJE,CAAC,CAAC,UAAU,gBACZ,CAAC,qBACD,CAAC,yBACD,CAAC,KAAK,SAAS;CAEnB;CAEA,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,QACA,WACA,eACA,sBACA,aACA,iBAAiB,2BACf;EAEJ,MAAM,SAAS,cAAc,iBAAiB;GAC5C;GACA,MAAM;GACN,SAAS,KAAK,OAAO;GACrB,QAAQ;EACV,CAAC;EAED,MAAM,gBAAgB,MAAM,YAAY,IAAI;EAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;EAG5B,MAAM,aAAa,OAAO,KAAK,OAAO,UAAU;EAEhD,MAAM,mBAAmB,MAAMC,oCAAAA,sBAC7B,QACA,eACAC,gCAAAA,iBACA,mBACA;GACE;GACA,YAAY;GACZ,SAAS,UAAU;GACnB,cAAc,KAAK,OAAO,UAAU;GACpC,gBAAgB,UAAU;GAC1B,QAAQ;GACR,cAAc,cAAc,QAAS;EACvC,GACA,UAAU,EACZ;EAEA,IAAI,CAAC,kBAAkB;GACrB,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;GACpD,OAAO,EAAE,QAAQ,YAAY;EAC/B;EAEA,MAAM,kBAAkB,CAAC,GAAG,sBAAsB;EAOlD,IAAI,CAJ4B,gBAAgB,MAAM,oBACpDC,oCAAAA,oBAAoB,iBAAiB,gBAAgB,CAG5B,GAAG;GAC5B,cAAc,aAAa,MAAM,OAAO,MAAM,iBAAiB;GAE/D,IAAI,CAAC,sBACH,OAAO,EAAE,QAAQ,SAAS;GAI5B,MAAM,YAAY,OAAA,GAAMC,WAAAA,UAAAA,CACtB,eACAC,aAAAA,eACA,eACF,CAAC,CAAC;IACA,SAAS,cAAc;IACvB,QAAQ,iBAAiB;IACzB,OAAO,iBAAiB;IACxB,aAAa,iBAAiB;IAC9B,SAAS,iBAAiB;GAC5B,CAAC;GAKD,IAAI,CAACC,+BAAAA,iBAAiB,SAAS,GAAG;IAChC,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;IACpD,OAAO,EAAE,QAAQ,YAAY;GAC/B;GAGA,MAAM,eAAgC;IACpC,GAAG;IACH;GACF;GACA,gBAAgB,KAAK,YAAY;EACnC;EAEA,cAAc,aAAa,MAAM,OAAO,MAAM,MAAM;EAEpD,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAiB,mBAAmB;GAAK;EACtD;CACF;AACF"}
@@ -1,10 +1,7 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumPermit2AllowanceTask.d.ts
4
3
  /** Signs the Permit2 allowances a caller attached to its own step, before prepare. */
5
4
  export declare class EthereumPermit2AllowanceTask extends BaseStepExecutionTask {
6
5
  override shouldRun(context: EthereumStepExecutorContext): Promise<boolean>;
7
6
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
8
- }
9
- //#endregion
10
- //# sourceMappingURL=EthereumPermit2AllowanceTask.d.ts.map
7
+ }
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_utils_getTypedDataLane = require("../../utils/getTypedDataLane.js");
3
3
  const require_core_tasks_helpers_signTypedDataEntries = require("./helpers/signTypedDataEntries.js");
4
4
  let _lifi_sdk = require("@lifi/sdk");
5
- //#region src/core/tasks/EthereumPermit2AllowanceTask.ts
5
+ // src/core/tasks/EthereumPermit2AllowanceTask.ts
6
6
  /** Signs the Permit2 allowances a caller attached to its own step, before prepare. */
7
7
  var EthereumPermit2AllowanceTask = class extends _lifi_sdk.BaseStepExecutionTask {
8
8
  async shouldRun(context) {
@@ -27,7 +27,6 @@ var EthereumPermit2AllowanceTask = class extends _lifi_sdk.BaseStepExecutionTask
27
27
  };
28
28
  }
29
29
  };
30
- //#endregion
31
30
  exports.EthereumPermit2AllowanceTask = EthereumPermit2AllowanceTask;
32
31
 
33
32
  //# sourceMappingURL=EthereumPermit2AllowanceTask.js.map
@@ -1,8 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumPrepareTransactionTask.d.ts
4
3
  export declare class EthereumPrepareTransactionTask extends BaseStepExecutionTask {
5
4
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
6
- }
7
- //#endregion
8
- //# sourceMappingURL=EthereumPrepareTransactionTask.d.ts.map
5
+ }
@@ -1,17 +1,19 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_core_tasks_helpers_getEthereumExecutionStrategy = require("./helpers/getEthereumExecutionStrategy.js");
3
2
  const require_actions_getMaxPriorityFeePerGas = require("../../actions/getMaxPriorityFeePerGas.js");
3
+ const require_core_tasks_helpers_getEthereumExecutionStrategy = require("./helpers/getEthereumExecutionStrategy.js");
4
4
  const require_core_tasks_helpers_getUpdatedStep = require("./helpers/getUpdatedStep.js");
5
5
  const require_core_tasks_helpers_isAllowancePreparedForAnotherStrategy = require("./helpers/isAllowancePreparedForAnotherStrategy.js");
6
6
  const require_core_tasks_helpers_preservePermit2Allowances = require("./helpers/preservePermit2Allowances.js");
7
7
  let _lifi_sdk = require("@lifi/sdk");
8
- //#region src/core/tasks/EthereumPrepareTransactionTask.ts
8
+ // src/core/tasks/EthereumPrepareTransactionTask.ts
9
9
  var EthereumPrepareTransactionTask = class extends _lifi_sdk.BaseStepExecutionTask {
10
10
  async run(context) {
11
- const { step, client, executionOptions, statusManager, allowUserInteraction, checkClient, isBridgeExecution, signedTypedData, ethereumClient, fromChain } = context;
11
+ const { step, client, executionOptions, statusManager, allowUserInteraction, checkClient, isBridgeExecution, signedTypedData, ethereumClient, fromChain, disableMessageSigning } = context;
12
12
  if (!statusManager.findAction(step, isBridgeExecution ? "CROSS_CHAIN" : "SWAP")) throw new _lifi_sdk.TransactionError(_lifi_sdk.LiFiErrorCode.TransactionUnprepared, "Unable to prepare transaction. Action not found.");
13
+ if ((0, _lifi_sdk.isGaslessStep)(step) && disableMessageSigning) throw new _lifi_sdk.TransactionError(_lifi_sdk.LiFiErrorCode.TransactionUnprepared, "Unable to prepare transaction. A gasless step needs message signing, which is disabled.");
13
14
  const typedDataBeforePrepare = step.typedData;
14
- const updatedStep = await require_core_tasks_helpers_getUpdatedStep.getUpdatedStep(client, step, fromChain, executionOptions, signedTypedData);
15
+ const updatedStep = await require_core_tasks_helpers_getUpdatedStep.getUpdatedStep(client, step, executionOptions, signedTypedData);
16
+ if ((0, _lifi_sdk.isGaslessStep)(step) && updatedStep.authorization) throw new _lifi_sdk.TransactionError(_lifi_sdk.LiFiErrorCode.TransactionUnprepared, "Unable to prepare transaction. The gasless step needs an EIP-7702 authorization, which the relayer does not support yet.");
15
17
  const comparedStep = await (0, _lifi_sdk.stepComparison)(statusManager, step, updatedStep, allowUserInteraction, executionOptions);
16
18
  const answeredTypedData = updatedStep.typedData ?? step.typedData;
17
19
  Object.assign(step, {
@@ -34,7 +36,7 @@ var EthereumPrepareTransactionTask = class extends _lifi_sdk.BaseStepExecutionTa
34
36
  if (ethereumClient.account?.type === "local") {
35
37
  const updatedClient = await checkClient(step);
36
38
  if (!updatedClient) return { status: "PAUSED" };
37
- maxPriorityFeePerGas = await require_actions_getMaxPriorityFeePerGas.getMaxPriorityFeePerGas(client, updatedClient);
39
+ maxPriorityFeePerGas = await require_actions_getMaxPriorityFeePerGas.getMaxPriorityFeePerGas(client, updatedClient, fromChain.id);
38
40
  } else maxPriorityFeePerGas = step.transactionRequest.maxPriorityFeePerGas ? BigInt(step.transactionRequest.maxPriorityFeePerGas) : void 0;
39
41
  transactionRequest = {
40
42
  chainId: step.transactionRequest.chainId,
@@ -65,7 +67,6 @@ var EthereumPrepareTransactionTask = class extends _lifi_sdk.BaseStepExecutionTa
65
67
  };
66
68
  }
67
69
  };
68
- //#endregion
69
70
  exports.EthereumPrepareTransactionTask = EthereumPrepareTransactionTask;
70
71
 
71
72
  //# sourceMappingURL=EthereumPrepareTransactionTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumPrepareTransactionTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","getUpdatedStep","stepComparison","preservePermit2Allowances","getEthereumExecutionStrategy","isAllowancePreparedForAnotherStrategy","ExecuteStepRetryError","STRATEGY_AFTER_PREPARE","getMaxPriorityFeePerGas"],"sources":["../../../../src/core/tasks/EthereumPrepareTransactionTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n ExecuteStepRetryError,\n LiFiErrorCode,\n stepComparison,\n type TaskResult,\n TransactionError,\n type TransactionParameters,\n} from '@lifi/sdk'\nimport { getMaxPriorityFeePerGas } from '../../actions/getMaxPriorityFeePerGas.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport {\n getEthereumExecutionStrategy,\n STRATEGY_AFTER_PREPARE,\n} from './helpers/getEthereumExecutionStrategy.js'\nimport { getUpdatedStep } from './helpers/getUpdatedStep.js'\nimport { isAllowancePreparedForAnotherStrategy } from './helpers/isAllowancePreparedForAnotherStrategy.js'\nimport { preservePermit2Allowances } from './helpers/preservePermit2Allowances.js'\n\nexport class EthereumPrepareTransactionTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n client,\n executionOptions,\n statusManager,\n allowUserInteraction,\n checkClient,\n isBridgeExecution,\n signedTypedData,\n ethereumClient,\n fromChain,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // A replay restores it, so the replay re-quotes like this attempt did.\n const typedDataBeforePrepare = step.typedData\n\n // Try to prepare a new transaction request and update the step with typed data\n const updatedStep = await getUpdatedStep(\n client,\n step,\n fromChain,\n executionOptions,\n signedTypedData\n )\n\n const comparedStep = await stepComparison(\n statusManager,\n step,\n updatedStep,\n allowUserInteraction,\n executionOptions\n )\n\n const answeredTypedData = updatedStep.typedData ?? step.typedData\n\n Object.assign(step, {\n ...comparedStep,\n execution: step.execution,\n typedData: preservePermit2Allowances(\n step,\n updatedStep.typedData,\n fromChain\n ),\n })\n\n if (!step.transactionRequest && !answeredTypedData?.length) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Transaction request is not found.'\n )\n }\n\n // Recompute execution strategy after PrepareTransaction mutates step\n const executionStrategy = await getEthereumExecutionStrategy(context, true)\n\n // The allowance tasks ran before prepare, in the strategy the step seemed\n // to have. In `batched` they only queued their work. If the re-quote moves\n // the step to a strategy that work does not fit, replay the step in the new\n // strategy (JUMEMB-102): only the batched task sends queued calls, and the\n // new strategy can need another spender. Sending the queued calls instead\n // could approve that wrong spender.\n //\n // A first run in `standard` is not replayed: its approval can already be\n // on-chain, and a signer that fails the Permit2 probe cannot use the relayed\n // lane anyway. A replay is checked again, whatever its strategy.\n const allowanceStrategy = context.executionStrategy\n const isReplay = context.retryParams !== undefined\n if (\n allowanceStrategy &&\n (allowanceStrategy === 'batched' || isReplay) &&\n (await isAllowancePreparedForAnotherStrategy(\n context,\n allowanceStrategy,\n executionStrategy\n ))\n ) {\n // `executeRoute` replays a step only once, so a second change fails it.\n if (isReplay) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n `Unable to prepare transaction. The step resolved to the ${executionStrategy} strategy after its allowance was prepared for ${allowanceStrategy}.`\n )\n }\n step.typedData = typedDataBeforePrepare\n throw new ExecuteStepRetryError(\n `The step resolved to the ${executionStrategy} strategy after its allowance was prepared for ${allowanceStrategy}; retry in that strategy`,\n { [STRATEGY_AFTER_PREPARE]: executionStrategy }\n )\n }\n\n let transactionRequest: TransactionParameters | undefined\n if (step.transactionRequest) {\n // Only fetch maxPriorityFeePerGas for local accounts\n let maxPriorityFeePerGas: bigint | undefined\n if (ethereumClient.account?.type === 'local') {\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n maxPriorityFeePerGas = await getMaxPriorityFeePerGas(\n client,\n updatedClient\n )\n } else {\n maxPriorityFeePerGas = step.transactionRequest.maxPriorityFeePerGas\n ? BigInt(step.transactionRequest.maxPriorityFeePerGas)\n : undefined\n }\n transactionRequest = {\n chainId: step.transactionRequest.chainId,\n to: step.transactionRequest.to,\n from: step.transactionRequest.from,\n data: step.transactionRequest.data,\n value: step.transactionRequest.value\n ? BigInt(step.transactionRequest.value)\n : undefined,\n gas: step.transactionRequest.gasLimit\n ? BigInt(step.transactionRequest.gasLimit)\n : undefined,\n // gasPrice: step.transactionRequest.gasPrice\n // ? BigInt(step.transactionRequest.gasPrice as string)\n // : undefined,\n // maxFeePerGas: step.transactionRequest.maxFeePerGas\n // ? BigInt(step.transactionRequest.maxFeePerGas as string)\n // : undefined,\n maxPriorityFeePerGas,\n }\n }\n\n if (executionOptions?.updateTransactionRequestHook && transactionRequest) {\n const customizedTransactionRequest: TransactionParameters =\n await executionOptions.updateTransactionRequestHook({\n requestType: 'transaction',\n ...transactionRequest,\n })\n transactionRequest = {\n ...transactionRequest,\n ...customizedTransactionRequest,\n }\n }\n\n return {\n status: 'COMPLETED',\n context: { transactionRequest, executionStrategy },\n }\n }\n}\n"],"mappings":";;;;;;;;AAmBA,IAAa,iCAAb,cAAoDA,UAAAA,sBAAsB;CACxE,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,QACA,kBACA,eACA,sBACA,aACA,mBACA,iBACA,gBACA,cACE;EAOJ,IAAI,CALW,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MAG5B,GACR,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAIF,MAAM,yBAAyB,KAAK;EAGpC,MAAM,cAAc,MAAMC,0CAAAA,eACxB,QACA,MACA,WACA,kBACA,eACF;EAEA,MAAM,eAAe,OAAA,GAAMC,UAAAA,eAAAA,CACzB,eACA,MACA,aACA,sBACA,gBACF;EAEA,MAAM,oBAAoB,YAAY,aAAa,KAAK;EAExD,OAAO,OAAO,MAAM;GAClB,GAAG;GACH,WAAW,KAAK;GAChB,WAAWC,qDAAAA,0BACT,MACA,YAAY,WACZ,SACF;EACF,CAAC;EAED,IAAI,CAAC,KAAK,sBAAsB,CAAC,mBAAmB,QAClD,MAAM,IAAIJ,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kEACF;EAIF,MAAM,oBAAoB,MAAMI,wDAAAA,6BAA6B,SAAS,IAAI;EAY1E,MAAM,oBAAoB,QAAQ;EAClC,MAAM,WAAW,QAAQ,gBAAgB,KAAA;EACzC,IACE,sBACC,sBAAsB,aAAa,aACnC,MAAMC,iEAAAA,sCACL,SACA,mBACA,iBACF,GACA;GAEA,IAAI,UACF,MAAM,IAAIN,UAAAA,iBACRC,UAAAA,cAAc,uBACd,2DAA2D,kBAAkB,iDAAiD,kBAAkB,EAClJ;GAEF,KAAK,YAAY;GACjB,MAAM,IAAIM,UAAAA,sBACR,4BAA4B,kBAAkB,iDAAiD,kBAAkB,2BACjH,GAAGC,wDAAAA,yBAAyB,kBAAkB,CAChD;EACF;EAEA,IAAI;EACJ,IAAI,KAAK,oBAAoB;GAE3B,IAAI;GACJ,IAAI,eAAe,SAAS,SAAS,SAAS;IAC5C,MAAM,gBAAgB,MAAM,YAAY,IAAI;IAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;IAE5B,uBAAuB,MAAMC,wCAAAA,wBAC3B,QACA,aACF;GACF,OACE,uBAAuB,KAAK,mBAAmB,uBAC3C,OAAO,KAAK,mBAAmB,oBAAoB,IACnD,KAAA;GAEN,qBAAqB;IACnB,SAAS,KAAK,mBAAmB;IACjC,IAAI,KAAK,mBAAmB;IAC5B,MAAM,KAAK,mBAAmB;IAC9B,MAAM,KAAK,mBAAmB;IAC9B,OAAO,KAAK,mBAAmB,QAC3B,OAAO,KAAK,mBAAmB,KAAK,IACpC,KAAA;IACJ,KAAK,KAAK,mBAAmB,WACzB,OAAO,KAAK,mBAAmB,QAAQ,IACvC,KAAA;IAOJ;GACF;EACF;EAEA,IAAI,kBAAkB,gCAAgC,oBAAoB;GACxE,MAAM,+BACJ,MAAM,iBAAiB,6BAA6B;IAClD,aAAa;IACb,GAAG;GACL,CAAC;GACH,qBAAqB;IACnB,GAAG;IACH,GAAG;GACL;EACF;EAEA,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAoB;GAAkB;EACnD;CACF;AACF"}
1
+ {"version":3,"file":"EthereumPrepareTransactionTask.js","names":["BaseStepExecutionTask","TransactionError","LiFiErrorCode","isGaslessStep","getUpdatedStep","stepComparison","preservePermit2Allowances","getEthereumExecutionStrategy","isAllowancePreparedForAnotherStrategy","ExecuteStepRetryError","STRATEGY_AFTER_PREPARE","getMaxPriorityFeePerGas"],"sources":["../../../../src/core/tasks/EthereumPrepareTransactionTask.ts"],"sourcesContent":["import {\n BaseStepExecutionTask,\n ExecuteStepRetryError,\n isGaslessStep,\n LiFiErrorCode,\n stepComparison,\n type TaskResult,\n TransactionError,\n type TransactionParameters,\n} from '@lifi/sdk'\nimport { getMaxPriorityFeePerGas } from '../../actions/getMaxPriorityFeePerGas.js'\nimport type { EthereumStepExecutorContext } from '../../types.js'\nimport {\n getEthereumExecutionStrategy,\n STRATEGY_AFTER_PREPARE,\n} from './helpers/getEthereumExecutionStrategy.js'\nimport {\n type GaslessStepFields,\n getUpdatedStep,\n} from './helpers/getUpdatedStep.js'\nimport { isAllowancePreparedForAnotherStrategy } from './helpers/isAllowancePreparedForAnotherStrategy.js'\nimport { preservePermit2Allowances } from './helpers/preservePermit2Allowances.js'\n\nexport class EthereumPrepareTransactionTask extends BaseStepExecutionTask {\n async run(context: EthereumStepExecutorContext): Promise<TaskResult> {\n const {\n step,\n client,\n executionOptions,\n statusManager,\n allowUserInteraction,\n checkClient,\n isBridgeExecution,\n signedTypedData,\n ethereumClient,\n fromChain,\n disableMessageSigning,\n } = context\n\n const action = statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n\n if (!action) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Action not found.'\n )\n }\n\n // The relayer executes a gasless step from the user's signature, and the\n // user has no gas to send it themselves. Fail before the re-quote.\n if (isGaslessStep(step) && disableMessageSigning) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. A gasless step needs message signing, which is disabled.'\n )\n }\n\n // A replay restores it, so the replay re-quotes like this attempt did.\n const typedDataBeforePrepare = step.typedData\n\n // Try to prepare a new transaction request and update the step with typed data\n const updatedStep = await getUpdatedStep(\n client,\n step,\n executionOptions,\n signedTypedData\n )\n\n // An EIP-7702 authorization installs a delegation on an account that has\n // none. The relayer rejects it for now, so signing it would be wasted.\n if (\n isGaslessStep(step) &&\n (updatedStep as GaslessStepFields).authorization\n ) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. The gasless step needs an EIP-7702 authorization, which the relayer does not support yet.'\n )\n }\n\n const comparedStep = await stepComparison(\n statusManager,\n step,\n updatedStep,\n allowUserInteraction,\n executionOptions\n )\n\n const answeredTypedData = updatedStep.typedData ?? step.typedData\n\n Object.assign(step, {\n ...comparedStep,\n execution: step.execution,\n typedData: preservePermit2Allowances(\n step,\n updatedStep.typedData,\n fromChain\n ),\n })\n\n if (!step.transactionRequest && !answeredTypedData?.length) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Transaction request is not found.'\n )\n }\n\n // Recompute execution strategy after PrepareTransaction mutates step\n const executionStrategy = await getEthereumExecutionStrategy(context, true)\n\n // The allowance tasks ran before prepare, in the strategy the step seemed\n // to have. In `batched` they only queued their work. If the re-quote moves\n // the step to a strategy that work does not fit, replay the step in the new\n // strategy (JUMEMB-102): only the batched task sends queued calls, and the\n // new strategy can need another spender. Sending the queued calls instead\n // could approve that wrong spender.\n //\n // A first run in `standard` is not replayed: its approval can already be\n // on-chain, and a signer that fails the Permit2 probe cannot use the relayed\n // lane anyway. A replay is checked again, whatever its strategy.\n const allowanceStrategy = context.executionStrategy\n const isReplay = context.retryParams !== undefined\n if (\n allowanceStrategy &&\n (allowanceStrategy === 'batched' || isReplay) &&\n (await isAllowancePreparedForAnotherStrategy(\n context,\n allowanceStrategy,\n executionStrategy\n ))\n ) {\n // `executeRoute` replays a step only once, so a second change fails it.\n if (isReplay) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n `Unable to prepare transaction. The step resolved to the ${executionStrategy} strategy after its allowance was prepared for ${allowanceStrategy}.`\n )\n }\n step.typedData = typedDataBeforePrepare\n throw new ExecuteStepRetryError(\n `The step resolved to the ${executionStrategy} strategy after its allowance was prepared for ${allowanceStrategy}; retry in that strategy`,\n { [STRATEGY_AFTER_PREPARE]: executionStrategy }\n )\n }\n\n let transactionRequest: TransactionParameters | undefined\n if (step.transactionRequest) {\n // Only fetch maxPriorityFeePerGas for local accounts\n let maxPriorityFeePerGas: bigint | undefined\n if (ethereumClient.account?.type === 'local') {\n const updatedClient = await checkClient(step)\n if (!updatedClient) {\n return { status: 'PAUSED' }\n }\n maxPriorityFeePerGas = await getMaxPriorityFeePerGas(\n client,\n updatedClient,\n fromChain.id\n )\n } else {\n maxPriorityFeePerGas = step.transactionRequest.maxPriorityFeePerGas\n ? BigInt(step.transactionRequest.maxPriorityFeePerGas)\n : undefined\n }\n transactionRequest = {\n chainId: step.transactionRequest.chainId,\n to: step.transactionRequest.to,\n from: step.transactionRequest.from,\n data: step.transactionRequest.data,\n value: step.transactionRequest.value\n ? BigInt(step.transactionRequest.value)\n : undefined,\n gas: step.transactionRequest.gasLimit\n ? BigInt(step.transactionRequest.gasLimit)\n : undefined,\n // gasPrice: step.transactionRequest.gasPrice\n // ? BigInt(step.transactionRequest.gasPrice as string)\n // : undefined,\n // maxFeePerGas: step.transactionRequest.maxFeePerGas\n // ? BigInt(step.transactionRequest.maxFeePerGas as string)\n // : undefined,\n maxPriorityFeePerGas,\n }\n }\n\n if (executionOptions?.updateTransactionRequestHook && transactionRequest) {\n const customizedTransactionRequest: TransactionParameters =\n await executionOptions.updateTransactionRequestHook({\n requestType: 'transaction',\n ...transactionRequest,\n })\n transactionRequest = {\n ...transactionRequest,\n ...customizedTransactionRequest,\n }\n }\n\n return {\n status: 'COMPLETED',\n context: { transactionRequest, executionStrategy },\n }\n }\n}\n"],"mappings":";;;;;;;;AAuBA,IAAa,iCAAb,cAAoDA,UAAAA,sBAAsB;CACxE,MAAM,IAAI,SAA2D;EACnE,MAAM,EACJ,MACA,QACA,kBACA,eACA,sBACA,aACA,mBACA,iBACA,gBACA,WACA,0BACE;EAOJ,IAAI,CALW,cAAc,WAC3B,MACA,oBAAoB,gBAAgB,MAG5B,GACR,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kDACF;EAKF,KAAA,GAAIC,UAAAA,cAAAA,CAAc,IAAI,KAAK,uBACzB,MAAM,IAAIF,UAAAA,iBACRC,UAAAA,cAAc,uBACd,yFACF;EAIF,MAAM,yBAAyB,KAAK;EAGpC,MAAM,cAAc,MAAME,0CAAAA,eACxB,QACA,MACA,kBACA,eACF;EAIA,KAAA,GACED,UAAAA,cAAAA,CAAc,IAAI,KACjB,YAAkC,eAEnC,MAAM,IAAIF,UAAAA,iBACRC,UAAAA,cAAc,uBACd,0HACF;EAGF,MAAM,eAAe,OAAA,GAAMG,UAAAA,eAAAA,CACzB,eACA,MACA,aACA,sBACA,gBACF;EAEA,MAAM,oBAAoB,YAAY,aAAa,KAAK;EAExD,OAAO,OAAO,MAAM;GAClB,GAAG;GACH,WAAW,KAAK;GAChB,WAAWC,qDAAAA,0BACT,MACA,YAAY,WACZ,SACF;EACF,CAAC;EAED,IAAI,CAAC,KAAK,sBAAsB,CAAC,mBAAmB,QAClD,MAAM,IAAIL,UAAAA,iBACRC,UAAAA,cAAc,uBACd,kEACF;EAIF,MAAM,oBAAoB,MAAMK,wDAAAA,6BAA6B,SAAS,IAAI;EAY1E,MAAM,oBAAoB,QAAQ;EAClC,MAAM,WAAW,QAAQ,gBAAgB,KAAA;EACzC,IACE,sBACC,sBAAsB,aAAa,aACnC,MAAMC,iEAAAA,sCACL,SACA,mBACA,iBACF,GACA;GAEA,IAAI,UACF,MAAM,IAAIP,UAAAA,iBACRC,UAAAA,cAAc,uBACd,2DAA2D,kBAAkB,iDAAiD,kBAAkB,EAClJ;GAEF,KAAK,YAAY;GACjB,MAAM,IAAIO,UAAAA,sBACR,4BAA4B,kBAAkB,iDAAiD,kBAAkB,2BACjH,GAAGC,wDAAAA,yBAAyB,kBAAkB,CAChD;EACF;EAEA,IAAI;EACJ,IAAI,KAAK,oBAAoB;GAE3B,IAAI;GACJ,IAAI,eAAe,SAAS,SAAS,SAAS;IAC5C,MAAM,gBAAgB,MAAM,YAAY,IAAI;IAC5C,IAAI,CAAC,eACH,OAAO,EAAE,QAAQ,SAAS;IAE5B,uBAAuB,MAAMC,wCAAAA,wBAC3B,QACA,eACA,UAAU,EACZ;GACF,OACE,uBAAuB,KAAK,mBAAmB,uBAC3C,OAAO,KAAK,mBAAmB,oBAAoB,IACnD,KAAA;GAEN,qBAAqB;IACnB,SAAS,KAAK,mBAAmB;IACjC,IAAI,KAAK,mBAAmB;IAC5B,MAAM,KAAK,mBAAmB;IAC9B,MAAM,KAAK,mBAAmB;IAC9B,OAAO,KAAK,mBAAmB,QAC3B,OAAO,KAAK,mBAAmB,KAAK,IACpC,KAAA;IACJ,KAAK,KAAK,mBAAmB,WACzB,OAAO,KAAK,mBAAmB,QAAQ,IACvC,KAAA;IAOJ;GACF;EACF;EAEA,IAAI,kBAAkB,gCAAgC,oBAAoB;GACxE,MAAM,+BACJ,MAAM,iBAAiB,6BAA6B;IAClD,aAAa;IACb,GAAG;GACL,CAAC;GACH,qBAAqB;IACnB,GAAG;IACH,GAAG;GACL;EACF;EAEA,OAAO;GACL,QAAQ;GACR,SAAS;IAAE;IAAoB;GAAkB;EACnD;CACF;AACF"}
@@ -1,8 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
- //#region src/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts
4
3
  export declare class EthereumRelayedSignAndExecuteTask extends BaseStepExecutionTask {
5
4
  run(context: EthereumStepExecutorContext): Promise<TaskResult>;
6
- }
7
- //#endregion
8
- //# sourceMappingURL=EthereumRelayedSignAndExecuteTask.d.ts.map
5
+ }