@lifi/sdk-provider-ethereum 4.2.12 → 4.3.1

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 +61 -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,6 +1,6 @@
1
1
  import { LiFiErrorCode, TransactionError } from "@lifi/sdk";
2
2
  import { isHex } from "viem";
3
- //#region src/utils/isValidSignature.ts
3
+ // src/utils/isValidSignature.ts
4
4
  /**
5
5
  * Checks that a wallet-returned signature is a usable hex string.
6
6
  * Some wallets can resolve `signTypedData` with a nullish or empty ('0x')
@@ -14,7 +14,6 @@ function isValidSignature(signature) {
14
14
  function assertValidSignature(signature) {
15
15
  if (!isValidSignature(signature)) throw new TransactionError(LiFiErrorCode.SignatureRejected, "Wallet did not return a valid signature.");
16
16
  }
17
- //#endregion
18
17
  export { assertValidSignature, isValidSignature };
19
18
 
20
19
  //# sourceMappingURL=isValidSignature.js.map
@@ -1,5 +1,3 @@
1
- //#region src/utils/isZeroAddress.d.ts
2
1
  export declare const AlternativeAddressZero = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
3
2
  export declare const isZeroAddress: (address: string) => boolean;
4
- //#endregion
5
3
  //# sourceMappingURL=isZeroAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isZeroAddress.d.ts","names":[],"sources":["../../../src/utils/isZeroAddress.ts"],"mappings":";qBAEa;qBAGA,gBAAiB"}
1
+ {"version":3,"file":"isZeroAddress.d.ts","names":[],"sources":["../../../src/utils/isZeroAddress.ts"],"mappings":"A,qBAEa;qBAGA,gBAAiB"}
@@ -1,11 +1,10 @@
1
1
  import { zeroAddress } from "viem";
2
- //#region src/utils/isZeroAddress.ts
2
+ // src/utils/isZeroAddress.ts
3
3
  const AlternativeAddressZero = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
4
4
  const isZeroAddress = (address) => {
5
5
  const lowercaseAddress = address?.toLowerCase();
6
6
  return lowercaseAddress === zeroAddress || lowercaseAddress === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
7
7
  };
8
- //#endregion
9
8
  export { AlternativeAddressZero, isZeroAddress };
10
9
 
11
10
  //# sourceMappingURL=isZeroAddress.js.map
@@ -1,4 +1,2 @@
1
- //#region src/utils/median.d.ts
2
1
  export declare const median: (arr: bigint[]) => bigint | undefined;
3
- //#endregion
4
2
  //# sourceMappingURL=median.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"median.d.ts","names":[],"sources":["../../../src/utils/median.ts"],"mappings":";qBAAa,SAAU"}
1
+ {"version":3,"file":"median.d.ts","names":[],"sources":["../../../src/utils/median.ts"],"mappings":"A,qBAAa,SAAU"}
@@ -1,4 +1,4 @@
1
- //#region src/utils/median.ts
1
+ // src/utils/median.ts
2
2
  const median = (arr) => {
3
3
  if (!arr.length) return;
4
4
  const s = [...arr].sort((a, b) => a > b ? 1 : a < b ? -1 : 0);
@@ -6,7 +6,6 @@ const median = (arr) => {
6
6
  if (s.length % 2 === 0) return (s[mid - 1] + s[mid]) / 2n;
7
7
  return s[mid];
8
8
  };
9
- //#endregion
10
9
  export { median };
11
10
 
12
11
  //# sourceMappingURL=median.js.map
@@ -1,5 +1,3 @@
1
- //#region src/version.d.ts
2
1
  export declare const name = "@lifi/sdk-provider-ethereum";
3
- export declare const version = "4.2.12";
4
- //#endregion
2
+ export declare const version = "4.3.1";
5
3
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","names":[],"sources":["../../src/version.ts"],"mappings":";qBAAa;qBACA"}
1
+ {"version":3,"file":"version.d.ts","names":[],"sources":["../../src/version.ts"],"mappings":"A,qBAAa;qBACA"}
@@ -1,7 +1,6 @@
1
- //#region src/version.ts
1
+ // src/version.ts
2
2
  const name = "@lifi/sdk-provider-ethereum";
3
- const version = "4.2.12";
4
- //#endregion
3
+ const version = "4.3.1";
5
4
  export { name, version };
6
5
 
7
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-ethereum'\nexport const version = '4.2.12'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-ethereum'\nexport const version = '4.3.1'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/sdk-provider-ethereum",
3
- "version": "4.2.12",
3
+ "version": "4.3.1",
4
4
  "description": "LI.FI Ethereum SDK Provider for Any-to-Any Cross-Chain-Swap",
5
5
  "homepage": "https://github.com/lifinance/sdk",
6
6
  "bugs": {
@@ -28,8 +28,8 @@
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "dependencies": {
31
- "@lifi/sdk": "4.12.1",
32
- "viem": "^2.57.7"
31
+ "@lifi/sdk": "4.13.0",
32
+ "viem": "^2.58.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -64,7 +64,8 @@ export const checkPermitSupport = async (
64
64
  spenderAddress: chain.permit2Proxy as Address,
65
65
  amount,
66
66
  ownerAddress,
67
- }
67
+ },
68
+ chain.id
68
69
  )
69
70
 
70
71
  let permit2Allowance: bigint | undefined
@@ -87,7 +88,8 @@ export const checkPermitSupport = async (
87
88
  viemClient,
88
89
  tokenAddress,
89
90
  ownerAddress,
90
- chain.permit2 as Address
91
+ chain.permit2 as Address,
92
+ chain.id
91
93
  )
92
94
  }
93
95
 
@@ -17,7 +17,8 @@ export const getAllowance = async (
17
17
  viemClient: Client,
18
18
  tokenAddress: Address,
19
19
  ownerAddress: Address,
20
- spenderAddress: Address
20
+ spenderAddress: Address,
21
+ chainId: number | undefined
21
22
  ): Promise<bigint> => {
22
23
  try {
23
24
  const approved = await getActionWithFallback(
@@ -30,7 +31,8 @@ export const getAllowance = async (
30
31
  abi: allowanceAbi,
31
32
  functionName: 'allowance' as const,
32
33
  args: [ownerAddress, spenderAddress] as const,
33
- }
34
+ },
35
+ chainId
34
36
  )
35
37
  return approved as bigint
36
38
  } catch (_e) {
@@ -67,7 +69,8 @@ export const getAllowanceMulticall = async (
67
69
  {
68
70
  contracts,
69
71
  multicallAddress: multicallAddress as Address,
70
- }
72
+ },
73
+ chainId
71
74
  )
72
75
 
73
76
  if (!results.length) {
@@ -109,7 +112,8 @@ export const getTokenAllowance = async (
109
112
  viemClient,
110
113
  token.address as Address,
111
114
  ownerAddress,
112
- spenderAddress
115
+ spenderAddress,
116
+ token.chainId
113
117
  )
114
118
  return approved
115
119
  }
@@ -6,7 +6,8 @@ import { median } from '../utils/median.js'
6
6
 
7
7
  export const getMaxPriorityFeePerGas = async (
8
8
  client: SDKClient,
9
- viemClient: Client
9
+ viemClient: Client,
10
+ chainId: number | undefined
10
11
  ): Promise<bigint | undefined> => {
11
12
  const block = await getActionWithFallback(
12
13
  client,
@@ -15,7 +16,8 @@ export const getMaxPriorityFeePerGas = async (
15
16
  'getBlock',
16
17
  {
17
18
  includeTransactions: true,
18
- }
19
+ },
20
+ chainId
19
21
  )
20
22
 
21
23
  const maxPriorityFeePerGasList = (block.transactions as Transaction[])
@@ -1,10 +1,10 @@
1
1
  import type { SDKClient } from '@lifi/sdk'
2
- import type { Address } from 'viem'
2
+ import { type Address, isHex } from 'viem'
3
3
  import { getSafeApiKey } from '../utils/getSafeApiKey.js'
4
4
  import { isSafeWallet } from './isSafeWallet.js'
5
5
 
6
6
  export interface IsSafeSignatureProps {
7
- hash: string
7
+ hash: unknown
8
8
  chainId: number
9
9
  address?: Address
10
10
  }
@@ -21,7 +21,7 @@ export async function isSafeSignature(
21
21
  ): Promise<boolean> {
22
22
  // Signature: 65 bytes = 130 hex chars + 0x prefix = 132 chars
23
23
  // Tx hash: 32 bytes = 64 hex chars + 0x prefix = 66 chars
24
- if (!hash.startsWith('0x') || hash.length <= 66) {
24
+ if (!isHex(hash) || hash.length <= 66) {
25
25
  return false
26
26
  }
27
27
 
@@ -1,5 +1,5 @@
1
1
  import { LiFiErrorCode, type SDKClient, TransactionError } from '@lifi/sdk'
2
- import type { Client, Hash } from 'viem'
2
+ import { type Client, type Hash, isHex } from 'viem'
3
3
  import { isSafeSignature } from './isSafeSignature.js'
4
4
  import { waitForSafeTransactionExecution } from './waitForSafeTransactionExecution.js'
5
5
 
@@ -16,14 +16,21 @@ export const resolveTransactionHash = async (
16
16
  })
17
17
 
18
18
  if (!isSignature) {
19
+ // Unchecked wallet answer; longer hex can be a Safe signature the lookup missed.
20
+ if (!isHex(txHashOrSignature) || txHashOrSignature.length < 66) {
21
+ throw new TransactionError(
22
+ LiFiErrorCode.TransactionFailed,
23
+ 'The wallet did not return a transaction hash. The wallet may have sent the transaction. Before you try again, check the activity in your wallet.'
24
+ )
25
+ }
19
26
  return txHashOrSignature
20
27
  }
21
28
 
22
29
  const safeAddress = viemClient.account?.address
23
- if (!safeAddress || !txHashOrSignature) {
30
+ if (!safeAddress) {
24
31
  throw new TransactionError(
25
32
  LiFiErrorCode.TransactionFailed,
26
- 'Safe address or signature not available for transaction tracking.'
33
+ 'Safe address not available for transaction tracking.'
27
34
  )
28
35
  }
29
36
 
@@ -5,6 +5,7 @@ import type {
5
5
  } from '@lifi/sdk'
6
6
  import type {
7
7
  Address,
8
+ Chain,
8
9
  Client,
9
10
  Hash,
10
11
  Hex,
@@ -15,6 +16,8 @@ import { sendTransaction } from 'viem/actions'
15
16
  import { getAction } from 'viem/utils'
16
17
  import type { ApproveTokenRequest, RevokeApprovalRequest } from '../types.js'
17
18
  import { approveAbi } from '../utils/abi.js'
19
+ import { convertExtendedChain } from '../utils/convertExtendedChain.js'
20
+ import { getSendChain } from '../utils/getSendChain.js'
18
21
  import { isZeroAddress } from '../utils/isZeroAddress.js'
19
22
  import { getAllowance } from './getAllowance.js'
20
23
  import { getMaxPriorityFeePerGas } from './getMaxPriorityFeePerGas.js'
@@ -26,7 +29,9 @@ export const setAllowance = async (
26
29
  contractAddress: Address,
27
30
  amount: bigint,
28
31
  executionOptions?: ExecutionOptions,
29
- returnPopulatedTransaction?: boolean
32
+ returnPopulatedTransaction?: boolean,
33
+ // Without it viem uses `viemClient.chain`, which can be stale.
34
+ chain?: Chain
30
35
  ): Promise<Hash | Hex> => {
31
36
  const data = encodeFunctionData({
32
37
  abi: approveAbi,
@@ -43,7 +48,11 @@ export const setAllowance = async (
43
48
  data,
44
49
  maxPriorityFeePerGas:
45
50
  viemClient.account?.type === 'local'
46
- ? await getMaxPriorityFeePerGas(client, viemClient)
51
+ ? await getMaxPriorityFeePerGas(
52
+ client,
53
+ viemClient,
54
+ chain?.id ?? viemClient.chain?.id
55
+ )
47
56
  : undefined,
48
57
  }
49
58
 
@@ -72,9 +81,17 @@ export const setAllowance = async (
72
81
  gasPrice: transactionRequest.gasPrice,
73
82
  maxFeePerGas: transactionRequest.maxFeePerGas,
74
83
  maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas,
84
+ ...(chain && { chain: getSendChain(viemClient, chain) }),
75
85
  } as SendTransactionParameters)
76
86
  }
77
87
 
88
+ // Without a known chain, viem keeps `walletClient.chain`, as before.
89
+ const getTokenChain = (
90
+ client: SDKClient,
91
+ chainId: number
92
+ ): Promise<Chain | undefined> =>
93
+ client.getChainById(chainId).then(convertExtendedChain, () => undefined)
94
+
78
95
  /**
79
96
  * Set approval for a certain token and amount.
80
97
  * @param client - The SDK client
@@ -98,7 +115,8 @@ export const setTokenAllowance = async (
98
115
  walletClient,
99
116
  token.address as Address,
100
117
  walletClient.account!.address,
101
- spenderAddress as Address
118
+ spenderAddress as Address,
119
+ token.chainId
102
120
  )
103
121
 
104
122
  if (amount > approvedAmount) {
@@ -107,7 +125,10 @@ export const setTokenAllowance = async (
107
125
  walletClient,
108
126
  token.address as Address,
109
127
  spenderAddress as Address,
110
- amount
128
+ amount,
129
+ undefined,
130
+ false,
131
+ await getTokenChain(client, token.chainId)
111
132
  )
112
133
 
113
134
  return approveTx
@@ -136,7 +157,8 @@ export const revokeTokenApproval = async (
136
157
  walletClient,
137
158
  token.address as Address,
138
159
  walletClient.account!.address,
139
- spenderAddress as Address
160
+ spenderAddress as Address,
161
+ token.chainId
140
162
  )
141
163
  if (approvedAmount > 0) {
142
164
  const approveTx = await setAllowance(
@@ -144,7 +166,10 @@ export const revokeTokenApproval = async (
144
166
  walletClient,
145
167
  token.address as Address,
146
168
  spenderAddress as Address,
147
- 0n
169
+ 0n,
170
+ undefined,
171
+ false,
172
+ await getTokenChain(client, token.chainId)
148
173
  )
149
174
 
150
175
  return approveTx
@@ -3,14 +3,47 @@ import {
3
3
  type ExtendedTransactionInfo,
4
4
  type FullStatusData,
5
5
  getRelayedTransactionStatus,
6
+ getStatus,
7
+ isGaslessStep,
6
8
  LiFiErrorCode,
7
9
  type LiFiStep,
10
+ type RelayStatusResponseData,
8
11
  TransactionError,
9
12
  waitForResult,
10
13
  } from '@lifi/sdk'
11
14
  import type { Hash } from 'viem'
15
+ import { getTransactionReceipt } from 'viem/actions'
16
+ import { getAction } from 'viem/utils'
17
+ import { getPublicClient } from '../client/publicClient.js'
12
18
  import type { WalletCallReceipt } from '../types.js'
13
19
 
20
+ /**
21
+ * Status errors in a row that end the wait. A failed request, `NOT_FOUND`, the
22
+ * 422/1004 answer of a failed lookup and a source receipt that cannot be
23
+ * loaded each count; a PENDING answer resets the count, so a long relay does
24
+ * not collect errors over its whole wait.
25
+ */
26
+ const MAX_STATUS_ERRORS = 5
27
+
28
+ /** The on-chain outcome of a source transaction, or `undefined` when its receipt cannot be loaded. */
29
+ const getSourceOutcome = async (
30
+ client: SDKClient,
31
+ chainId: number,
32
+ hash: Hash
33
+ ): Promise<'success' | 'reverted' | undefined> => {
34
+ try {
35
+ const publicClient = await getPublicClient(client, chainId)
36
+ const receipt = await getAction(
37
+ publicClient,
38
+ getTransactionReceipt,
39
+ 'getTransactionReceipt'
40
+ )({ hash })
41
+ return receipt.status
42
+ } catch {
43
+ return undefined
44
+ }
45
+ }
46
+
14
47
  /**
15
48
  * Polls the relayer until the relayed transaction is done or has failed.
16
49
  *
@@ -20,7 +53,7 @@ import type { WalletCallReceipt } from '../types.js'
20
53
  * @param timeout - How long to wait for a result in milliseconds. Defaults to 24 hours.
21
54
  * @param signal - Ends the wait: no status request starts after it aborts, and the request in flight and the sleep end at once.
22
55
  * @returns The receipt of the relayed transaction.
23
- * @throws {TransactionError} If the transaction failed, was not found, or no result arrived before the timeout. Only the failed transaction is a final outcome.
56
+ * @throws {TransactionError} If the transaction failed, the status was not found after five status errors in a row, or no result arrived before the timeout. Only the failed transaction is a final outcome.
24
57
  * @throws The abort reason of `signal` once it aborts.
25
58
  */
26
59
  export const waitForRelayedTransactionReceipt = async (
@@ -31,11 +64,14 @@ export const waitForRelayedTransactionReceipt = async (
31
64
  signal?: AbortSignal
32
65
  ): Promise<WalletCallReceipt> => {
33
66
  const startTime = Date.now()
67
+ const isGasless = isGaslessStep(step)
68
+ const isCrossChain = step.action.fromChainId !== step.action.toChainId
69
+ let statusErrors = 0
34
70
  return waitForResult(
35
71
  async () => {
36
72
  // Without this check, a task that stays PENDING is polled forever:
37
- // PENDING is not an error, so the retry limit does not apply.
38
- // TransactionFailed is not retried, so this ends the poll. Not final:
73
+ // PENDING is no status error, so the error limit does not apply. An
74
+ // error the poll throws ends it. Not final:
39
75
  // the relayer may still execute the task, so the action keeps its task
40
76
  // id and a resume waits for it again instead of signing a new one.
41
77
  if (Date.now() - startTime > timeout) {
@@ -45,15 +81,28 @@ export const waitForRelayedTransactionReceipt = async (
45
81
  )
46
82
  }
47
83
 
48
- const result = await getRelayedTransactionStatus(
49
- client,
50
- {
51
- taskId,
52
- fromChain: step.action.fromChainId,
53
- toChain: step.action.toChainId,
54
- ...(step.tool !== 'custom' && { bridge: step.tool }),
55
- },
56
- { signal }
84
+ // A gasless task id is a hash like a 1inch `Order` task id, so the step
85
+ // selects the endpoint. The task id alone routes a gasless request: a
86
+ // `bridge` would let a proxy such as the Jumper backend answer it with
87
+ // its own order lookup. The cast is the one `getRelayedTransactionStatus`
88
+ // makes for the Hyperliquid answer of the same endpoint.
89
+ const result = await (
90
+ isGasless
91
+ ? (getStatus(
92
+ client,
93
+ { taskId },
94
+ { signal }
95
+ ) as unknown as Promise<RelayStatusResponseData>)
96
+ : getRelayedTransactionStatus(
97
+ client,
98
+ {
99
+ taskId,
100
+ fromChain: step.action.fromChainId,
101
+ toChain: step.action.toChainId,
102
+ ...(step.tool !== 'custom' && { bridge: step.tool }),
103
+ },
104
+ { signal }
105
+ )
57
106
  ).catch((e) => {
58
107
  // A request that the abort ended is no failure of the relayer.
59
108
  if (process.env.NODE_ENV === 'development' && !signal?.aborted) {
@@ -62,9 +111,39 @@ export const waitForRelayedTransactionReceipt = async (
62
111
  return undefined
63
112
  })
64
113
 
114
+ // A gasless answer is the transfer status of `/v1/status`: it reports
115
+ // the relayed source transaction in `sending` once the relayer sent it.
116
+ // Only a bridge transfer ends the wait at its source; on one chain the
117
+ // relayed transaction is the whole transfer.
118
+ const gaslessStatus = isGasless
119
+ ? (result as unknown as FullStatusData | undefined)
120
+ : undefined
121
+ const bridgeSource =
122
+ isCrossChain && gaslessStatus?.sending?.txHash
123
+ ? ({
124
+ status: 'success',
125
+ transactionHash: gaslessStatus.sending.txHash,
126
+ transactionLink: gaslessStatus.sending.txLink,
127
+ } as unknown as WalletCallReceipt)
128
+ : undefined
129
+
130
+ const statusError = (error: TransactionError): undefined => {
131
+ statusErrors++
132
+ if (statusErrors < MAX_STATUS_ERRORS) {
133
+ return undefined
134
+ }
135
+ throw error
136
+ }
137
+
65
138
  switch (result?.status) {
66
139
  case 'PENDING':
67
- return undefined
140
+ statusErrors = 0
141
+ // A gasless bridge transfer whose source transaction landed waits for
142
+ // its destination. The source wait ends here, so a later bridge
143
+ // failure reaches the status task, not the FAILED below.
144
+ return gaslessStatus?.substatus === 'WAIT_DESTINATION_TRANSACTION'
145
+ ? bridgeSource
146
+ : undefined
68
147
  case 'DONE': {
69
148
  const sending: ExtendedTransactionInfo | undefined =
70
149
  (result?.transactionStatus?.sending as ExtendedTransactionInfo) ||
@@ -73,11 +152,38 @@ export const waitForRelayedTransactionReceipt = async (
73
152
  return {
74
153
  status: 'success',
75
154
  gasUsed: sending?.gasUsed,
76
- transactionHash: result?.metadata.txHash || sending?.txHash,
155
+ transactionHash: result?.metadata?.txHash || sending?.txHash,
77
156
  transactionLink: sending?.txLink,
78
157
  } as unknown as WalletCallReceipt
79
158
  }
80
159
  case 'FAILED':
160
+ // FAILED with a hash is mostly a relayed source transaction that
161
+ // reverted and moved nothing, so a resume may sign again. A bridge
162
+ // can also fail after its source landed: the tokens left the wallet,
163
+ // and a resume must not sign and relay a second transfer. The status
164
+ // task follows that transfer, as for any bridge. The source receipt
165
+ // tells the two apart.
166
+ if (bridgeSource) {
167
+ const outcome = await getSourceOutcome(
168
+ client,
169
+ step.action.fromChainId,
170
+ bridgeSource.transactionHash
171
+ )
172
+ if (outcome === 'success') {
173
+ return bridgeSource
174
+ }
175
+ if (outcome === undefined) {
176
+ // The node may not have the receipt yet, so this counts as a
177
+ // status error. Not final: a resume waits for the same task and
178
+ // checks again.
179
+ return statusError(
180
+ new TransactionError(
181
+ LiFiErrorCode.TransactionFailed,
182
+ 'The relayed transaction failed, and its source transaction could not be checked.'
183
+ )
184
+ )
185
+ }
186
+ }
81
187
  throw new TransactionError(
82
188
  LiFiErrorCode.TransactionFailed,
83
189
  'Transaction was reverted.',
@@ -85,20 +191,19 @@ export const waitForRelayedTransactionReceipt = async (
85
191
  { final: true }
86
192
  )
87
193
  default:
88
- throw new TransactionError(
89
- LiFiErrorCode.TransactionNotFound,
90
- 'Transaction not found.'
194
+ return statusError(
195
+ new TransactionError(
196
+ LiFiErrorCode.TransactionNotFound,
197
+ 'Transaction not found.'
198
+ )
91
199
  )
92
200
  }
93
201
  },
94
202
  5000,
95
- 3,
96
- (_, error) => {
97
- return !(
98
- error instanceof TransactionError &&
99
- error.code === LiFiErrorCode.TransactionFailed
100
- )
101
- },
203
+ undefined,
204
+ // The poll counts its own status errors, so every error it throws ends
205
+ // the wait.
206
+ () => false,
102
207
  signal
103
208
  )
104
209
  }
@@ -10,6 +10,8 @@ import type { Address, Hash, Hex } from 'viem'
10
10
  import { sendCalls } from 'viem/actions'
11
11
  import { getAction } from 'viem/utils'
12
12
  import type { Call, EthereumStepExecutorContext } from '../../types.js'
13
+ import { convertExtendedChain } from '../../utils/convertExtendedChain.js'
14
+ import { getSendChain } from '../../utils/getSendChain.js'
13
15
 
14
16
  export class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {
15
17
  async run(context: EthereumStepExecutorContext): Promise<TaskResult> {
@@ -70,6 +72,8 @@ export class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {
70
72
  )({
71
73
  account: updatedClient.account!,
72
74
  calls,
75
+ // Without it `sendCalls` uses `client.chain`, which can be stale.
76
+ chain: getSendChain(updatedClient, convertExtendedChain(fromChain)),
73
77
  })
74
78
 
75
79
  statusManager.updateAction(step, action.type, 'PENDING', {
@@ -13,7 +13,7 @@ export class EthereumCheckAllowanceTask extends BaseStepExecutionTask {
13
13
  }
14
14
 
15
15
  async run(context: EthereumStepExecutorContext): Promise<TaskResult> {
16
- const { step, checkClient, client, statusManager } = context
16
+ const { step, checkClient, client, statusManager, fromChain } = context
17
17
 
18
18
  // Start new allowance check
19
19
  const action = statusManager.initializeAction({
@@ -41,7 +41,8 @@ export class EthereumCheckAllowanceTask extends BaseStepExecutionTask {
41
41
  updatedClient,
42
42
  step.action.fromToken.address as Address,
43
43
  updatedClient.account!.address,
44
- spenderAddress
44
+ spenderAddress,
45
+ fromChain.id
45
46
  )
46
47
 
47
48
  statusManager.updateAction(step, action.type, 'DONE')
@@ -1,4 +1,8 @@
1
- import { type CheckBalanceOptions, CheckBalanceTask } from '@lifi/sdk'
1
+ import {
2
+ type CheckBalanceOptions,
3
+ CheckBalanceTask,
4
+ isGaslessStep,
5
+ } from '@lifi/sdk'
2
6
  import type { Address } from 'viem'
3
7
  import { getAccountCode } from '../../actions/getAccountCode.js'
4
8
  import { isSmartContractWalletCode } from '../../actions/isSmartContractWallet.js'
@@ -20,6 +24,12 @@ export class EthereumCheckBalanceTask extends CheckBalanceTask {
20
24
  ): Promise<CheckBalanceOptions> {
21
25
  const { client, step, fromChain } = context
22
26
 
27
+ // The relayer pays the gas of a gasless step. Before prepare the step has
28
+ // no typed data yet, so the relay fee is the only signal.
29
+ if (isGaslessStep(step)) {
30
+ return { walletPaysGas: false }
31
+ }
32
+
23
33
  const userFundsTransaction = isPermit2AllowanceLane(step, fromChain)
24
34
  if (step.typedData?.length && !userFundsTransaction) {
25
35
  return { walletPaysGas: false }
@@ -83,7 +83,8 @@ export class EthereumNativePermitTask extends BaseStepExecutionTask {
83
83
  spenderAddress: fromChain.permit2Proxy as Address,
84
84
  amount: fromAmount,
85
85
  ownerAddress: updatedClient.account!.address,
86
- }
86
+ },
87
+ fromChain.id
87
88
  )
88
89
 
89
90
  if (!nativePermitData) {