@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":"getUpdatedStep.js","names":[],"sources":["../../../../../src/core/tasks/helpers/getUpdatedStep.ts"],"sourcesContent":["import {\n convertQuoteToRoute,\n type ExecutionOptions,\n type ExtendedChain,\n getContractCallsQuote,\n getRelayerQuote,\n getStepTransaction,\n LiFiErrorCode,\n type LiFiStepExtended,\n patchContractCalls,\n type SDKClient,\n type SignedTypedData,\n TransactionError,\n} from '@lifi/sdk'\nimport { PatcherMagicNumber } from '../../../permits/constants.js'\nimport { isContractCallStep } from '../../../utils/isContractCallStep.js'\nimport { isGaslessStep } from '../../../utils/isGaslessStep.js'\n\n/** Re-quotes the step through the endpoint that matches how it will execute. */\nexport const getUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n fromChain: ExtendedChain,\n executionOptions?: ExecutionOptions,\n signedTypedData?: SignedTypedData[]\n): Promise<LiFiStepExtended> => {\n if (isContractCallStep(step)) {\n return getContractCallUpdatedStep(client, step, executionOptions)\n }\n // Do NOT substitute `hasRelayerMessage` for `isGaslessStep`: an `Order` retry\n // would fetch a relayer quote instead of `/advanced/stepTransaction`. Pinned\n // by `re-quotes an Order step ...` in `getUpdatedStep.unit.spec.ts`.\n if (isGaslessStep(step, fromChain)) {\n return getRelayerUpdatedStep(client, step)\n }\n return getStandardUpdatedStep(client, step, signedTypedData)\n}\n\nconst getContractCallUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n executionOptions?: ExecutionOptions\n): Promise<LiFiStepExtended> => {\n const contractCallsResult = await executionOptions?.getContractCalls?.({\n fromAddress: step.action.fromAddress!,\n fromAmount: BigInt(step.action.fromAmount),\n fromChainId: step.action.fromChainId,\n fromTokenAddress: step.action.fromToken.address,\n slippage: step.action.slippage,\n toAddress: step.action.toAddress,\n toAmount: BigInt(step.estimate.toAmount),\n toChainId: step.action.toChainId,\n toTokenAddress: step.action.toToken.address,\n })\n\n if (!contractCallsResult?.contractCalls?.length) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Contract calls are not found.'\n )\n }\n\n if (contractCallsResult.patcher) {\n const patchedContractCalls = await patchContractCalls(\n client,\n contractCallsResult.contractCalls.map((call) => ({\n chainId: step.action.toChainId,\n fromTokenAddress: call.fromTokenAddress,\n targetContractAddress: call.toContractAddress,\n callDataToPatch: call.toContractCallData,\n delegateCall: false,\n patches: [\n {\n amountToReplace: PatcherMagicNumber.toString(),\n },\n ],\n }))\n )\n\n contractCallsResult.contractCalls.forEach((call, index) => {\n call.toContractAddress = patchedContractCalls[index].target\n call.toContractCallData = patchedContractCalls[index].callData\n })\n }\n\n /**\n * Limitations of the retry logic for contract calls:\n * - denyBridges and denyExchanges are not supported\n * - allowBridges and allowExchanges are not supported\n * - fee is not supported\n * - toAmount is not supported\n */\n const contractCallQuote = await getContractCallsQuote(client, {\n fromAddress: step.action.fromAddress!,\n fromChain: step.action.fromChainId,\n fromToken: step.action.fromToken.address,\n fromAmount: step.action.fromAmount,\n toChain: step.action.toChainId,\n toToken: step.action.toToken.address,\n contractCalls: contractCallsResult.contractCalls,\n toFallbackAddress: step.action.toAddress,\n slippage: step.action.slippage,\n })\n\n contractCallQuote.action.toToken = step.action.toToken\n\n const customStep = contractCallQuote.includedSteps?.find(\n (s) => s.type === 'custom'\n )\n if (customStep && contractCallsResult?.contractTool) {\n const toolDetails = {\n key: contractCallsResult.contractTool.name,\n name: contractCallsResult.contractTool.name,\n logoURI: contractCallsResult.contractTool.logoURI,\n }\n customStep.toolDetails = toolDetails\n contractCallQuote.toolDetails = toolDetails\n }\n\n const route = convertQuoteToRoute(contractCallQuote, {\n adjustZeroOutputFromPreviousStep:\n executionOptions?.adjustZeroOutputFromPreviousStep,\n })\n\n return {\n ...route.steps[0],\n id: step.id,\n }\n}\n\nconst getRelayerUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended\n): Promise<LiFiStepExtended> => {\n const updatedRelayedStep = await getRelayerQuote(client, {\n fromChain: step.action.fromChainId,\n fromToken: step.action.fromToken.address,\n fromAddress: step.action.fromAddress!,\n fromAmount: step.action.fromAmount,\n toChain: step.action.toChainId,\n toToken: step.action.toToken.address,\n slippage: step.action.slippage,\n toAddress: step.action.toAddress,\n allowBridges: [step.tool],\n })\n return {\n ...updatedRelayedStep,\n id: step.id,\n }\n}\n\nconst getStandardUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n signedTypedData?: SignedTypedData[]\n): Promise<LiFiStepExtended> => {\n const filteredSignedTypedData = signedTypedData?.filter(\n (item) => item.signature\n )\n const { typedData: _, ...restStep } = step\n const params = filteredSignedTypedData?.length\n ? { ...restStep, typedData: filteredSignedTypedData }\n : restStep\n return getStepTransaction(client, params)\n}\n"],"mappings":";;;;;;AAmBA,MAAa,iBAAiB,OAC5B,QACA,MACA,WACA,kBACA,oBAC8B;CAC9B,IAAI,mBAAmB,IAAI,GACzB,OAAO,2BAA2B,QAAQ,MAAM,gBAAgB;CAKlE,IAAI,cAAc,MAAM,SAAS,GAC/B,OAAO,sBAAsB,QAAQ,IAAI;CAE3C,OAAO,uBAAuB,QAAQ,MAAM,eAAe;AAC7D;AAEA,MAAM,6BAA6B,OACjC,QACA,MACA,qBAC8B;CAC9B,MAAM,sBAAsB,MAAM,kBAAkB,mBAAmB;EACrE,aAAa,KAAK,OAAO;EACzB,YAAY,OAAO,KAAK,OAAO,UAAU;EACzC,aAAa,KAAK,OAAO;EACzB,kBAAkB,KAAK,OAAO,UAAU;EACxC,UAAU,KAAK,OAAO;EACtB,WAAW,KAAK,OAAO;EACvB,UAAU,OAAO,KAAK,SAAS,QAAQ;EACvC,WAAW,KAAK,OAAO;EACvB,gBAAgB,KAAK,OAAO,QAAQ;CACtC,CAAC;CAED,IAAI,CAAC,qBAAqB,eAAe,QACvC,MAAM,IAAI,iBACR,cAAc,uBACd,8DACF;CAGF,IAAI,oBAAoB,SAAS;EAC/B,MAAM,uBAAuB,MAAM,mBACjC,QACA,oBAAoB,cAAc,KAAK,UAAU;GAC/C,SAAS,KAAK,OAAO;GACrB,kBAAkB,KAAK;GACvB,uBAAuB,KAAK;GAC5B,iBAAiB,KAAK;GACtB,cAAc;GACd,SAAS,CACP,EACE,iBAAiB,mBAAmB,SAAS,EAC/C,CACF;EACF,EAAE,CACJ;EAEA,oBAAoB,cAAc,SAAS,MAAM,UAAU;GACzD,KAAK,oBAAoB,qBAAqB,MAAM,CAAC;GACrD,KAAK,qBAAqB,qBAAqB,MAAM,CAAC;EACxD,CAAC;CACH;;;;;;;;CASA,MAAM,oBAAoB,MAAM,sBAAsB,QAAQ;EAC5D,aAAa,KAAK,OAAO;EACzB,WAAW,KAAK,OAAO;EACvB,WAAW,KAAK,OAAO,UAAU;EACjC,YAAY,KAAK,OAAO;EACxB,SAAS,KAAK,OAAO;EACrB,SAAS,KAAK,OAAO,QAAQ;EAC7B,eAAe,oBAAoB;EACnC,mBAAmB,KAAK,OAAO;EAC/B,UAAU,KAAK,OAAO;CACxB,CAAC;CAED,kBAAkB,OAAO,UAAU,KAAK,OAAO;CAE/C,MAAM,aAAa,kBAAkB,eAAe,MACjD,MAAM,EAAE,SAAS,QACpB;CACA,IAAI,cAAc,qBAAqB,cAAc;EACnD,MAAM,cAAc;GAClB,KAAK,oBAAoB,aAAa;GACtC,MAAM,oBAAoB,aAAa;GACvC,SAAS,oBAAoB,aAAa;EAC5C;EACA,WAAW,cAAc;EACzB,kBAAkB,cAAc;CAClC;CAOA,OAAO;EACL,GANY,oBAAoB,mBAAmB,EACnD,kCACE,kBAAkB,iCACtB,CAGS,CAAC,CAAC,MAAM;EACf,IAAI,KAAK;CACX;AACF;AAEA,MAAM,wBAAwB,OAC5B,QACA,SAC8B;CAY9B,OAAO;EACL,GAAG,MAZ4B,gBAAgB,QAAQ;GACvD,WAAW,KAAK,OAAO;GACvB,WAAW,KAAK,OAAO,UAAU;GACjC,aAAa,KAAK,OAAO;GACzB,YAAY,KAAK,OAAO;GACxB,SAAS,KAAK,OAAO;GACrB,SAAS,KAAK,OAAO,QAAQ;GAC7B,UAAU,KAAK,OAAO;GACtB,WAAW,KAAK,OAAO;GACvB,cAAc,CAAC,KAAK,IAAI;EAC1B,CAAC;EAGC,IAAI,KAAK;CACX;AACF;AAEA,MAAM,yBAAyB,OAC7B,QACA,MACA,oBAC8B;CAC9B,MAAM,0BAA0B,iBAAiB,QAC9C,SAAS,KAAK,SACjB;CACA,MAAM,EAAE,WAAW,GAAG,GAAG,aAAa;CACtC,MAAM,SAAS,yBAAyB,SACpC;EAAE,GAAG;EAAU,WAAW;CAAwB,IAClD;CACJ,OAAO,mBAAmB,QAAQ,MAAM;AAC1C"}
1
+ {"version":3,"file":"getUpdatedStep.js","names":[],"sources":["../../../../../src/core/tasks/helpers/getUpdatedStep.ts"],"sourcesContent":["import {\n convertQuoteToRoute,\n type ExecutionOptions,\n getContractCallsQuote,\n getStepTransaction,\n isGaslessStep,\n LiFiErrorCode,\n type LiFiStepExtended,\n patchContractCalls,\n type SDKClient,\n type SignedTypedData,\n TransactionError,\n} from '@lifi/sdk'\nimport { PatcherMagicNumber } from '../../../permits/constants.js'\nimport { isContractCallStep } from '../../../utils/isContractCallStep.js'\n\n/** Re-quotes the step through the endpoint that matches how it will execute. */\nexport const getUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n executionOptions?: ExecutionOptions,\n signedTypedData?: SignedTypedData[]\n): Promise<LiFiStepExtended> => {\n if (isContractCallStep(step)) {\n return getContractCallUpdatedStep(client, step, executionOptions)\n }\n if (isGaslessStep(step)) {\n return getGaslessUpdatedStep(client, step)\n }\n return getStandardUpdatedStep(client, step, signedTypedData)\n}\n\nconst getContractCallUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n executionOptions?: ExecutionOptions\n): Promise<LiFiStepExtended> => {\n const contractCallsResult = await executionOptions?.getContractCalls?.({\n fromAddress: step.action.fromAddress!,\n fromAmount: BigInt(step.action.fromAmount),\n fromChainId: step.action.fromChainId,\n fromTokenAddress: step.action.fromToken.address,\n slippage: step.action.slippage,\n toAddress: step.action.toAddress,\n toAmount: BigInt(step.estimate.toAmount),\n toChainId: step.action.toChainId,\n toTokenAddress: step.action.toToken.address,\n })\n\n if (!contractCallsResult?.contractCalls?.length) {\n throw new TransactionError(\n LiFiErrorCode.TransactionUnprepared,\n 'Unable to prepare transaction. Contract calls are not found.'\n )\n }\n\n if (contractCallsResult.patcher) {\n const patchedContractCalls = await patchContractCalls(\n client,\n contractCallsResult.contractCalls.map((call) => ({\n chainId: step.action.toChainId,\n fromTokenAddress: call.fromTokenAddress,\n targetContractAddress: call.toContractAddress,\n callDataToPatch: call.toContractCallData,\n delegateCall: false,\n patches: [\n {\n amountToReplace: PatcherMagicNumber.toString(),\n },\n ],\n }))\n )\n\n contractCallsResult.contractCalls.forEach((call, index) => {\n call.toContractAddress = patchedContractCalls[index].target\n call.toContractCallData = patchedContractCalls[index].callData\n })\n }\n\n /**\n * Limitations of the retry logic for contract calls:\n * - denyBridges and denyExchanges are not supported\n * - allowBridges and allowExchanges are not supported\n * - fee is not supported\n * - toAmount is not supported\n */\n const contractCallQuote = await getContractCallsQuote(client, {\n fromAddress: step.action.fromAddress!,\n fromChain: step.action.fromChainId,\n fromToken: step.action.fromToken.address,\n fromAmount: step.action.fromAmount,\n toChain: step.action.toChainId,\n toToken: step.action.toToken.address,\n contractCalls: contractCallsResult.contractCalls,\n toFallbackAddress: step.action.toAddress,\n slippage: step.action.slippage,\n })\n\n contractCallQuote.action.toToken = step.action.toToken\n\n const customStep = contractCallQuote.includedSteps?.find(\n (s) => s.type === 'custom'\n )\n if (customStep && contractCallsResult?.contractTool) {\n const toolDetails = {\n key: contractCallsResult.contractTool.name,\n name: contractCallsResult.contractTool.name,\n logoURI: contractCallsResult.contractTool.logoURI,\n }\n customStep.toolDetails = toolDetails\n contractCallQuote.toolDetails = toolDetails\n }\n\n const route = convertQuoteToRoute(contractCallQuote, {\n adjustZeroOutputFromPreviousStep:\n executionOptions?.adjustZeroOutputFromPreviousStep,\n })\n\n return {\n ...route.steps[0],\n id: step.id,\n }\n}\n\n/**\n * Fields `/advanced/stepTransaction` adds to a gasless step. They are not in\n * `@lifi/types` yet.\n */\nexport type GaslessStepFields = {\n expiresAt?: number\n authorization?: unknown\n}\n\n/**\n * A gasless step is re-quoted as the routes response gave it: the backend\n * rejects typed data without signatures, and it builds new typed data, a new\n * deadline and new nonces for every quote anyway.\n */\nconst getGaslessUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended\n): Promise<LiFiStepExtended> => {\n const {\n typedData: _typedData,\n expiresAt: _expiresAt,\n authorization: _authorization,\n execution: _execution,\n ...restStep\n } = step as LiFiStepExtended & GaslessStepFields\n return getStepTransaction(client, restStep)\n}\n\nconst getStandardUpdatedStep = async (\n client: SDKClient,\n step: LiFiStepExtended,\n signedTypedData?: SignedTypedData[]\n): Promise<LiFiStepExtended> => {\n const filteredSignedTypedData = signedTypedData?.filter(\n (item) => item.signature\n )\n const { typedData: _, ...restStep } = step\n const params = filteredSignedTypedData?.length\n ? { ...restStep, typedData: filteredSignedTypedData }\n : restStep\n return getStepTransaction(client, params)\n}\n"],"mappings":";;;;;AAiBA,MAAa,iBAAiB,OAC5B,QACA,MACA,kBACA,oBAC8B;CAC9B,IAAI,mBAAmB,IAAI,GACzB,OAAO,2BAA2B,QAAQ,MAAM,gBAAgB;CAElE,IAAI,cAAc,IAAI,GACpB,OAAO,sBAAsB,QAAQ,IAAI;CAE3C,OAAO,uBAAuB,QAAQ,MAAM,eAAe;AAC7D;AAEA,MAAM,6BAA6B,OACjC,QACA,MACA,qBAC8B;CAC9B,MAAM,sBAAsB,MAAM,kBAAkB,mBAAmB;EACrE,aAAa,KAAK,OAAO;EACzB,YAAY,OAAO,KAAK,OAAO,UAAU;EACzC,aAAa,KAAK,OAAO;EACzB,kBAAkB,KAAK,OAAO,UAAU;EACxC,UAAU,KAAK,OAAO;EACtB,WAAW,KAAK,OAAO;EACvB,UAAU,OAAO,KAAK,SAAS,QAAQ;EACvC,WAAW,KAAK,OAAO;EACvB,gBAAgB,KAAK,OAAO,QAAQ;CACtC,CAAC;CAED,IAAI,CAAC,qBAAqB,eAAe,QACvC,MAAM,IAAI,iBACR,cAAc,uBACd,8DACF;CAGF,IAAI,oBAAoB,SAAS;EAC/B,MAAM,uBAAuB,MAAM,mBACjC,QACA,oBAAoB,cAAc,KAAK,UAAU;GAC/C,SAAS,KAAK,OAAO;GACrB,kBAAkB,KAAK;GACvB,uBAAuB,KAAK;GAC5B,iBAAiB,KAAK;GACtB,cAAc;GACd,SAAS,CACP,EACE,iBAAiB,mBAAmB,SAAS,EAC/C,CACF;EACF,EAAE,CACJ;EAEA,oBAAoB,cAAc,SAAS,MAAM,UAAU;GACzD,KAAK,oBAAoB,qBAAqB,MAAM,CAAC;GACrD,KAAK,qBAAqB,qBAAqB,MAAM,CAAC;EACxD,CAAC;CACH;;;;;;;;CASA,MAAM,oBAAoB,MAAM,sBAAsB,QAAQ;EAC5D,aAAa,KAAK,OAAO;EACzB,WAAW,KAAK,OAAO;EACvB,WAAW,KAAK,OAAO,UAAU;EACjC,YAAY,KAAK,OAAO;EACxB,SAAS,KAAK,OAAO;EACrB,SAAS,KAAK,OAAO,QAAQ;EAC7B,eAAe,oBAAoB;EACnC,mBAAmB,KAAK,OAAO;EAC/B,UAAU,KAAK,OAAO;CACxB,CAAC;CAED,kBAAkB,OAAO,UAAU,KAAK,OAAO;CAE/C,MAAM,aAAa,kBAAkB,eAAe,MACjD,MAAM,EAAE,SAAS,QACpB;CACA,IAAI,cAAc,qBAAqB,cAAc;EACnD,MAAM,cAAc;GAClB,KAAK,oBAAoB,aAAa;GACtC,MAAM,oBAAoB,aAAa;GACvC,SAAS,oBAAoB,aAAa;EAC5C;EACA,WAAW,cAAc;EACzB,kBAAkB,cAAc;CAClC;CAOA,OAAO;EACL,GANY,oBAAoB,mBAAmB,EACnD,kCACE,kBAAkB,iCACtB,CAGS,CAAC,CAAC,MAAM;EACf,IAAI,KAAK;CACX;AACF;;;;;;AAgBA,MAAM,wBAAwB,OAC5B,QACA,SAC8B;CAC9B,MAAM,EACJ,WAAW,YACX,WAAW,YACX,eAAe,gBACf,WAAW,YACX,GAAG,aACD;CACJ,OAAO,mBAAmB,QAAQ,QAAQ;AAC5C;AAEA,MAAM,yBAAyB,OAC7B,QACA,MACA,oBAC8B;CAC9B,MAAM,0BAA0B,iBAAiB,QAC9C,SAAS,KAAK,SACjB;CACA,MAAM,EAAE,WAAW,GAAG,GAAG,aAAa;CACtC,MAAM,SAAS,yBAAyB,SACpC;EAAE,GAAG;EAAU,WAAW;CAAwB,IAClD;CACJ,OAAO,mBAAmB,QAAQ,MAAM;AAC1C"}
@@ -1,5 +1,4 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
- //#region src/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.d.ts
3
2
  /**
4
3
  * Whether the step had no `estimate.approvalAddress` before prepare and the
5
4
  * re-quote brought one. No allowance was checked then (`allowanceSpender` is
@@ -7,5 +6,4 @@ import { EthereumStepExecutorContext } from "../../../types.js";
7
6
  * spender themselves, so on a Permit2 chain they approve `fromChain.permit2`.
8
7
  */
9
8
  export declare const hasApprovalAddressAppearedAtPrepare: (context: EthereumStepExecutorContext) => boolean;
10
- //#endregion
11
9
  //# sourceMappingURL=hasApprovalAddressAppearedAtPrepare.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasApprovalAddressAppearedAtPrepare.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.ts"],"mappings":";;;;;;;;qBASa,sCACX,SAAS"}
1
+ {"version":3,"file":"hasApprovalAddressAppearedAtPrepare.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.ts"],"mappings":";;;;;;;qBASa,sCACX,SAAS"}
@@ -1,5 +1,5 @@
1
1
  import { shouldCheckForAllowance } from "./shouldCheckForAllowance.js";
2
- //#region src/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.ts
2
+ // src/core/tasks/helpers/hasApprovalAddressAppearedAtPrepare.ts
3
3
  /**
4
4
  * Whether the step had no `estimate.approvalAddress` before prepare and the
5
5
  * re-quote brought one. No allowance was checked then (`allowanceSpender` is
@@ -10,7 +10,6 @@ const hasApprovalAddressAppearedAtPrepare = (context) => {
10
10
  const { step, allowanceSpender, isBridgeExecution, isFromNativeToken, statusManager } = context;
11
11
  return !allowanceSpender && shouldCheckForAllowance(step, isBridgeExecution, isFromNativeToken, statusManager);
12
12
  };
13
- //#endregion
14
13
  export { hasApprovalAddressAppearedAtPrepare };
15
14
 
16
15
  //# sourceMappingURL=hasApprovalAddressAppearedAtPrepare.js.map
@@ -1,8 +1,6 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
- //#region src/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts
3
2
  /** Whether this execution carries a caller-supplied Permit2 allowance, declared or signed. */
4
3
  export declare function hasPermit2AllowanceInFlight(context: EthereumStepExecutorContext): boolean;
5
4
  /** `isPermit2AllowanceLane`, for gates that run after prepare may have replaced `step.typedData`. */
6
5
  export declare function isPermit2AllowanceLaneInFlight(context: EthereumStepExecutorContext): boolean;
7
- //#endregion
8
6
  //# sourceMappingURL=hasPermit2AllowanceInFlight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasPermit2AllowanceInFlight.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/hasPermit2AllowanceInFlight.ts"],"mappings":";;;wBAQgB,4BACd,SAAS;;wBAcK,+BACd,SAAS"}
1
+ {"version":3,"file":"hasPermit2AllowanceInFlight.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/hasPermit2AllowanceInFlight.ts"],"mappings":";;wBAQgB,4BACd,SAAS;;wBAcK,+BACd,SAAS"}
@@ -1,5 +1,5 @@
1
1
  import { getTypedDataLane, hasPermit2Allowance, hasRelayerMessage } from "../../../utils/getTypedDataLane.js";
2
- //#region src/core/tasks/helpers/hasPermit2AllowanceInFlight.ts
2
+ // src/core/tasks/helpers/hasPermit2AllowanceInFlight.ts
3
3
  /** Whether this execution carries a caller-supplied Permit2 allowance, declared or signed. */
4
4
  function hasPermit2AllowanceInFlight(context) {
5
5
  const { step, fromChain, signedTypedData } = context;
@@ -9,7 +9,6 @@ function hasPermit2AllowanceInFlight(context) {
9
9
  function isPermit2AllowanceLaneInFlight(context) {
10
10
  return hasPermit2AllowanceInFlight(context) && !hasRelayerMessage(context.step, context.fromChain);
11
11
  }
12
- //#endregion
13
12
  export { hasPermit2AllowanceInFlight, isPermit2AllowanceLaneInFlight };
14
13
 
15
14
  //# sourceMappingURL=hasPermit2AllowanceInFlight.js.map
@@ -1,6 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
2
  import { TransactionMethodType } from "@lifi/sdk";
3
- //#region src/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.d.ts
4
3
  /**
5
4
  * Whether the allowance work done in `preparedFor` does not fit `needed`, the
6
5
  * strategy prepare established. Two things can break:
@@ -13,5 +12,4 @@ import { TransactionMethodType } from "@lifi/sdk";
13
12
  * prepare has already replaced the step with the re-quote.
14
13
  */
15
14
  export declare const isAllowancePreparedForAnotherStrategy: (context: EthereumStepExecutorContext, preparedFor: TransactionMethodType, needed: TransactionMethodType) => Promise<boolean>;
16
- //#endregion
17
15
  //# sourceMappingURL=isAllowancePreparedForAnotherStrategy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isAllowancePreparedForAnotherStrategy.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.ts"],"mappings":";;;;;;;;;;;;;;qBAea,wCACX,SAAS,6BACT,aAAa,uBACb,QAAQ,0BACP"}
1
+ {"version":3,"file":"isAllowancePreparedForAnotherStrategy.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.ts"],"mappings":";;;;;;;;;;;;;qBAea,wCACX,SAAS,6BACT,aAAa,uBACb,QAAQ,0BACP"}
@@ -1,5 +1,5 @@
1
1
  import { resolveAllowanceSpender } from "./resolveAllowanceSpender.js";
2
- //#region src/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.ts
2
+ // src/core/tasks/helpers/isAllowancePreparedForAnotherStrategy.ts
3
3
  /**
4
4
  * Whether the allowance work done in `preparedFor` does not fit `needed`, the
5
5
  * strategy prepare established. Two things can break:
@@ -20,7 +20,6 @@ const isAllowancePreparedForAnotherStrategy = async (context, preparedFor, neede
20
20
  const { spenderAddress } = await resolveAllowanceSpender(context, needed);
21
21
  return allowanceSpender.toLowerCase() !== spenderAddress?.toLowerCase();
22
22
  };
23
- //#endregion
24
23
  export { isAllowancePreparedForAnotherStrategy };
25
24
 
26
25
  //# sourceMappingURL=isAllowancePreparedForAnotherStrategy.js.map
@@ -1,6 +1,4 @@
1
1
  import { SignedTypedData, TypedData } from "@lifi/sdk";
2
- //#region src/core/tasks/helpers/isTypedDataAlreadySigned.d.ts
3
2
  /** Whether `signedTypedData` already holds a signature for this exact entry. */
4
3
  export declare function isTypedDataAlreadySigned(signedTypedData: SignedTypedData[], typedData: TypedData): boolean;
5
- //#endregion
6
4
  //# sourceMappingURL=isTypedDataAlreadySigned.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isTypedDataAlreadySigned.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/isTypedDataAlreadySigned.ts"],"mappings":";;;wBAIgB,yBACd,iBAAiB,mBACjB,WAAW"}
1
+ {"version":3,"file":"isTypedDataAlreadySigned.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/isTypedDataAlreadySigned.ts"],"mappings":";;wBAIgB,yBACd,iBAAiB,mBACjB,WAAW"}
@@ -1,5 +1,5 @@
1
1
  import { isValidSignature } from "../../../utils/isValidSignature.js";
2
- //#region src/core/tasks/helpers/isTypedDataAlreadySigned.ts
2
+ // src/core/tasks/helpers/isTypedDataAlreadySigned.ts
3
3
  /** Whether `signedTypedData` already holds a signature for this exact entry. */
4
4
  function isTypedDataAlreadySigned(signedTypedData, typedData) {
5
5
  if (typedData.primaryType === "Permit") return false;
@@ -22,7 +22,6 @@ function isSameValue(a, b) {
22
22
  return String(a) === String(b);
23
23
  }
24
24
  const isRecord = (value) => typeof value === "object" && value !== null;
25
- //#endregion
26
25
  export { isTypedDataAlreadySigned };
27
26
 
28
27
  //# sourceMappingURL=isTypedDataAlreadySigned.js.map
@@ -1,5 +1,4 @@
1
1
  import { ExtendedChain, LiFiStep, LiFiStepExtended, TypedData } from "@lifi/sdk";
2
- //#region src/core/tasks/helpers/preservePermit2Allowances.d.ts
3
2
  /**
4
3
  * `??` keeps the Permit2 allowance only when the answer omits `typedData`. An
5
4
  * answer that carries entries of its own — native permits, or `[]` from a
@@ -7,5 +6,4 @@ import { ExtendedChain, LiFiStep, LiFiStepExtended, TypedData } from "@lifi/sdk"
7
6
  * `executeStep`, so a retry would let the Permit2 proxy hijack the calldata.
8
7
  */
9
8
  export declare function preservePermit2Allowances(step: LiFiStepExtended | LiFiStep, updatedTypedData: TypedData[] | undefined, chain: ExtendedChain): TypedData[] | undefined;
10
- //#endregion
11
9
  //# sourceMappingURL=preservePermit2Allowances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preservePermit2Allowances.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/preservePermit2Allowances.ts"],"mappings":";;;;;;;;wBAkBgB,0BACd,MAAM,mBAAmB,UACzB,kBAAkB,yBAClB,OAAO,gBACN"}
1
+ {"version":3,"file":"preservePermit2Allowances.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/preservePermit2Allowances.ts"],"mappings":";;;;;;;wBAkBgB,0BACd,MAAM,mBAAmB,UACzB,kBAAkB,yBAClB,OAAO,gBACN"}
@@ -1,5 +1,5 @@
1
1
  import { getTypedDataInLane, getTypedDataLane, isPermit2AllowanceLane } from "../../../utils/getTypedDataLane.js";
2
- //#region src/core/tasks/helpers/preservePermit2Allowances.ts
2
+ // src/core/tasks/helpers/preservePermit2Allowances.ts
3
3
  /**
4
4
  * `??` keeps the Permit2 allowance only when the answer omits `typedData`. An
5
5
  * answer that carries entries of its own — native permits, or `[]` from a
@@ -15,7 +15,6 @@ function preservePermit2Allowances(step, updatedTypedData, chain) {
15
15
  })) return updatedTypedData;
16
16
  return [...updatedTypedData, ...getTypedDataInLane(step, "permit2-allowance", chain)];
17
17
  }
18
- //#endregion
19
18
  export { preservePermit2Allowances };
20
19
 
21
20
  //# sourceMappingURL=preservePermit2Allowances.js.map
@@ -1,7 +1,6 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
2
  import { TransactionMethodType } from "@lifi/sdk";
3
3
  import { Address } from "viem";
4
- //#region src/core/tasks/helpers/resolveAllowanceSpender.d.ts
5
4
  /**
6
5
  * The spender the allowance tasks check and approve in `strategy`: canonical
7
6
  * Permit2 when the step takes the Permit2 flow there, `approvalAddress`
@@ -12,5 +11,4 @@ export declare const resolveAllowanceSpender: (context: EthereumStepExecutorCont
12
11
  permit2Supported: boolean;
13
12
  spenderAddress: Address;
14
13
  }>;
15
- //#endregion
16
14
  //# sourceMappingURL=resolveAllowanceSpender.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveAllowanceSpender.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/resolveAllowanceSpender.ts"],"mappings":";;;;;;;;;;qBAWa,0BACX,SAAS,6BACT,UAAU,0BACT;EAAU;EAA2B,gBAAgB"}
1
+ {"version":3,"file":"resolveAllowanceSpender.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/resolveAllowanceSpender.ts"],"mappings":";;;;;;;;;qBAWa,0BACX,SAAS,6BACT,UAAU,0BACT;EAAU;EAA2B,gBAAgB"}
@@ -1,5 +1,5 @@
1
1
  import { resolvePermit2Support } from "./resolvePermit2Support.js";
2
- //#region src/core/tasks/helpers/resolveAllowanceSpender.ts
2
+ // src/core/tasks/helpers/resolveAllowanceSpender.ts
3
3
  /**
4
4
  * The spender the allowance tasks check and approve in `strategy`: canonical
5
5
  * Permit2 when the step takes the Permit2 flow there, `approvalAddress`
@@ -14,7 +14,6 @@ const resolveAllowanceSpender = async (context, strategy) => {
14
14
  spenderAddress: permit2Supported ? fromChain.permit2 : step.estimate.approvalAddress
15
15
  };
16
16
  };
17
- //#endregion
18
17
  export { resolveAllowanceSpender };
19
18
 
20
19
  //# sourceMappingURL=resolveAllowanceSpender.js.map
@@ -1,6 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
2
  import { TransactionMethodType } from "@lifi/sdk";
3
- //#region src/core/tasks/helpers/resolvePermit2Support.d.ts
4
3
  /**
5
4
  * Whether this step should use the Permit2 signature flow.
6
5
  *
@@ -22,5 +21,4 @@ import { TransactionMethodType } from "@lifi/sdk";
22
21
  * approval into a revert.
23
22
  */
24
23
  export declare const resolvePermit2Support: (context: EthereumStepExecutorContext, strategy: TransactionMethodType) => Promise<boolean>;
25
- //#endregion
26
24
  //# sourceMappingURL=resolvePermit2Support.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolvePermit2Support.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/resolvePermit2Support.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBAkDa,wBACX,SAAS,6BACT,UAAU,0BACT"}
1
+ {"version":3,"file":"resolvePermit2Support.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/resolvePermit2Support.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBAkDa,wBACX,SAAS,6BACT,UAAU,0BACT"}
@@ -1,6 +1,6 @@
1
1
  import { canAccountUsePermit2 } from "../../../permits/canAccountUsePermit2.js";
2
2
  import { isPermit2AllowanceLaneInFlight } from "./hasPermit2AllowanceInFlight.js";
3
- //#region src/core/tasks/helpers/resolvePermit2Support.ts
3
+ // src/core/tasks/helpers/resolvePermit2Support.ts
4
4
  /**
5
5
  * Cheap, synchronous part of the gate: does the step/chain combination allow
6
6
  * the Permit2 flow at all? Permit2 should not be available for atomic batch.
@@ -41,7 +41,6 @@ const resolvePermit2Support = async (context, strategy) => {
41
41
  });
42
42
  return context.permit2SignerSupported;
43
43
  };
44
- //#endregion
45
44
  export { resolvePermit2Support };
46
45
 
47
46
  //# sourceMappingURL=resolvePermit2Support.js.map
@@ -1,5 +1,3 @@
1
1
  import { LiFiStepExtended, StatusManager } from "@lifi/sdk";
2
- //#region src/core/tasks/helpers/shouldCheckForAllowance.d.ts
3
2
  export declare const shouldCheckForAllowance: (step: LiFiStepExtended, isBridgeExecution: boolean, isFromNativeToken: boolean, statusManager: StatusManager) => boolean;
4
- //#endregion
5
3
  //# sourceMappingURL=shouldCheckForAllowance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldCheckForAllowance.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/shouldCheckForAllowance.ts"],"mappings":";;qBAMa,0BACX,MAAM,kBACN,4BACA,4BACA,eAAe"}
1
+ {"version":3,"file":"shouldCheckForAllowance.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/shouldCheckForAllowance.ts"],"mappings":";qBAOa,0BACX,MAAM,kBACN,4BACA,4BACA,eAAe"}
@@ -1,11 +1,11 @@
1
- import { hasOpenTransaction } from "@lifi/sdk";
2
- //#region src/core/tasks/helpers/shouldCheckForAllowance.ts
1
+ import { hasOpenTransaction, isGaslessStep } from "@lifi/sdk";
2
+ // src/core/tasks/helpers/shouldCheckForAllowance.ts
3
3
  const shouldCheckForAllowance = (step, isBridgeExecution, isFromNativeToken, statusManager) => {
4
+ if (isGaslessStep(step)) return false;
4
5
  const exchangeActionType = isBridgeExecution ? "CROSS_CHAIN" : "SWAP";
5
6
  const swapOrBridgeAction = statusManager.findAction(step, exchangeActionType);
6
7
  return !hasOpenTransaction(swapOrBridgeAction) && !isFromNativeToken && !!step.estimate.approvalAddress && !step.estimate.skipApproval;
7
8
  };
8
- //#endregion
9
9
  export { shouldCheckForAllowance };
10
10
 
11
11
  //# sourceMappingURL=shouldCheckForAllowance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldCheckForAllowance.js","names":[],"sources":["../../../../../src/core/tasks/helpers/shouldCheckForAllowance.ts"],"sourcesContent":["import {\n hasOpenTransaction,\n type LiFiStepExtended,\n type StatusManager,\n} from '@lifi/sdk'\n\nexport const shouldCheckForAllowance = (\n step: LiFiStepExtended,\n isBridgeExecution: boolean,\n isFromNativeToken: boolean,\n statusManager: StatusManager\n): boolean => {\n const exchangeActionType = isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n\n const swapOrBridgeAction = statusManager.findAction(step, exchangeActionType)\n\n return (\n // No swap/bridge transaction (hash, batch/relay id or stored bytes) that may\n // still land. A FAILED action with a final outcome does not count, so the\n // allowance is checked again before the new transaction.\n !hasOpenTransaction(swapOrBridgeAction) &&\n // Token is not native (address is not zero)\n !isFromNativeToken &&\n // Approval address is required for allowance checks, but may be null in special cases (e.g. direct transfers)\n !!step.estimate.approvalAddress &&\n !step.estimate.skipApproval\n )\n}\n"],"mappings":";;AAMA,MAAa,2BACX,MACA,mBACA,mBACA,kBACY;CACZ,MAAM,qBAAqB,oBAAoB,gBAAgB;CAE/D,MAAM,qBAAqB,cAAc,WAAW,MAAM,kBAAkB;CAE5E,OAIE,CAAC,mBAAmB,kBAAkB,KAEtC,CAAC,qBAED,CAAC,CAAC,KAAK,SAAS,mBAChB,CAAC,KAAK,SAAS;AAEnB"}
1
+ {"version":3,"file":"shouldCheckForAllowance.js","names":[],"sources":["../../../../../src/core/tasks/helpers/shouldCheckForAllowance.ts"],"sourcesContent":["import {\n hasOpenTransaction,\n isGaslessStep,\n type LiFiStepExtended,\n type StatusManager,\n} from '@lifi/sdk'\n\nexport const shouldCheckForAllowance = (\n step: LiFiStepExtended,\n isBridgeExecution: boolean,\n isFromNativeToken: boolean,\n statusManager: StatusManager\n): boolean => {\n // The relayer handles the allowance of a gasless step: the backend signs it\n // in as a `Permit` companion or uses the Permit2 allowance the account has.\n // An approve or an SDK permit here would cost the user gas they do not have.\n if (isGaslessStep(step)) {\n return false\n }\n\n const exchangeActionType = isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n\n const swapOrBridgeAction = statusManager.findAction(step, exchangeActionType)\n\n return (\n // No swap/bridge transaction (hash, batch/relay id or stored bytes) that may\n // still land. A FAILED action with a final outcome does not count, so the\n // allowance is checked again before the new transaction.\n !hasOpenTransaction(swapOrBridgeAction) &&\n // Token is not native (address is not zero)\n !isFromNativeToken &&\n // Approval address is required for allowance checks, but may be null in special cases (e.g. direct transfers)\n !!step.estimate.approvalAddress &&\n !step.estimate.skipApproval\n )\n}\n"],"mappings":";;AAOA,MAAa,2BACX,MACA,mBACA,mBACA,kBACY;CAIZ,IAAI,cAAc,IAAI,GACpB,OAAO;CAGT,MAAM,qBAAqB,oBAAoB,gBAAgB;CAE/D,MAAM,qBAAqB,cAAc,WAAW,MAAM,kBAAkB;CAE5E,OAIE,CAAC,mBAAmB,kBAAkB,KAEtC,CAAC,qBAED,CAAC,CAAC,KAAK,SAAS,mBAChB,CAAC,KAAK,SAAS;AAEnB"}
@@ -1,10 +1,8 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
2
  import { SignedTypedData, TypedData } from "@lifi/sdk";
3
- //#region src/core/tasks/helpers/signHyperliquidTypedData.d.ts
4
3
  /**
5
4
  * `beforeSignature` runs right before each signature, the agent's included,
6
5
  * after every await before it; it throws to stop the signing.
7
6
  */
8
7
  export declare const signHyperliquidTypedData: (context: EthereumStepExecutorContext, allowanceTypedData: TypedData[], beforeSignature?: () => void) => Promise<SignedTypedData[] | undefined>;
9
- //#endregion
10
8
  //# sourceMappingURL=signHyperliquidTypedData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signHyperliquidTypedData.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/signHyperliquidTypedData.ts"],"mappings":";;;;;;;qBAiBa,2BACX,SAAS,6BACT,oBAAoB,aACpB,iCACC,QAAQ"}
1
+ {"version":3,"file":"signHyperliquidTypedData.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/signHyperliquidTypedData.ts"],"mappings":";;;;;;qBAiBa,2BACX,SAAS,6BACT,oBAAoB,aACpB,iCACC,QAAQ"}
@@ -1,10 +1,10 @@
1
+ import { getOrCreateAgentWallet } from "../../../hyperliquid/agentWallet.js";
2
+ import { isApproveAgentMessage, isApproveBuilderFeeMessage, isHyperliquidOrderMessage } from "../../../hyperliquid/isHyperliquidAgentStep.js";
1
3
  import { getDomainChainId } from "../../../utils/getDomainChainId.js";
2
4
  import { assertValidSignature } from "../../../utils/isValidSignature.js";
3
- import { isApproveAgentMessage, isApproveBuilderFeeMessage, isHyperliquidOrderMessage } from "../../../hyperliquid/isHyperliquidAgentStep.js";
4
- import { getOrCreateAgentWallet } from "../../../hyperliquid/agentWallet.js";
5
5
  import { signTypedData } from "viem/actions";
6
6
  import { getAction } from "viem/utils";
7
- //#region src/core/tasks/helpers/signHyperliquidTypedData.ts
7
+ // src/core/tasks/helpers/signHyperliquidTypedData.ts
8
8
  /**
9
9
  * `beforeSignature` runs right before each signature, the agent's included,
10
10
  * after every await before it; it throws to stop the signing.
@@ -71,7 +71,6 @@ const signHyperliquidTypedData = async (context, allowanceTypedData, beforeSigna
71
71
  }
72
72
  return signedResults;
73
73
  };
74
- //#endregion
75
74
  export { signHyperliquidTypedData };
76
75
 
77
76
  //# sourceMappingURL=signHyperliquidTypedData.js.map
@@ -1,6 +1,5 @@
1
1
  import { EthereumStepExecutorContext } from "../../../types.js";
2
2
  import { ExecutionActionStatus, ExecutionActionType, SignedTypedData, TypedData } from "@lifi/sdk";
3
- //#region src/core/tasks/helpers/signTypedDataEntries.d.ts
4
3
  export type SignTypedDataEntriesResult = {
5
4
  status: "PAUSED";
6
5
  } | {
@@ -13,5 +12,4 @@ export type SignTypedDataEntriesResult = {
13
12
  * chain switch; it throws to stop the signing.
14
13
  */
15
14
  export declare function signTypedDataEntries(context: EthereumStepExecutorContext, entries: TypedData[], actionType: ExecutionActionType, actionStatus?: ExecutionActionStatus, beforeSignature?: () => void): Promise<SignTypedDataEntriesResult>;
16
- //#endregion
17
15
  //# sourceMappingURL=signTypedDataEntries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signTypedDataEntries.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/signTypedDataEntries.ts"],"mappings":";;;YAYY;EACN;;EACA;EAAqB,iBAAiB;;;;;;;wBAOtB,qBACpB,SAAS,6BACT,SAAS,aACT,YAAY,qBACZ,eAAc,uBACd,+BACC,QAAQ"}
1
+ {"version":3,"file":"signTypedDataEntries.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/signTypedDataEntries.ts"],"mappings":";;YAYY;EACN;;EACA;EAAqB,iBAAiB;;;;;;;wBAOtB,qBACpB,SAAS,6BACT,SAAS,aACT,YAAY,qBACZ,eAAc,uBACd,+BACC,QAAQ"}
@@ -2,7 +2,7 @@ import { getDomainChainId } from "../../../utils/getDomainChainId.js";
2
2
  import { assertValidSignature } from "../../../utils/isValidSignature.js";
3
3
  import { signTypedData } from "viem/actions";
4
4
  import { getAction } from "viem/utils";
5
- //#region src/core/tasks/helpers/signTypedDataEntries.ts
5
+ // src/core/tasks/helpers/signTypedDataEntries.ts
6
6
  /**
7
7
  * Signs the entries in order, switching chains per entry, and appends the
8
8
  * signatures. `beforeSignature` runs right before each wallet call, after the
@@ -35,7 +35,6 @@ async function signTypedDataEntries(context, entries, actionType, actionStatus =
35
35
  signedTypedData
36
36
  };
37
37
  }
38
- //#endregion
39
38
  export { signTypedDataEntries };
40
39
 
41
40
  //# sourceMappingURL=signTypedDataEntries.js.map
@@ -1,5 +1,4 @@
1
1
  import { Client } from "viem";
2
- //#region src/core/tasks/helpers/switchChain.d.ts
3
2
  /**
4
3
  * This method checks whether the wallet client is configured for the correct chain.
5
4
  * If yes it returns the wallet clien.
@@ -17,5 +16,4 @@ import { Client } from "viem";
17
16
  * @returns New connector client
18
17
  */
19
18
  export declare const switchChain: (client: Client, targetChainId: number, allowUserInteraction: boolean, switchChainCallback?: (chainId: number) => Promise<Client | undefined>) => Promise<Client | undefined>;
20
- //#endregion
21
19
  //# sourceMappingURL=switchChain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switchChain.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/switchChain.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAqBa,cACX,QAAQ,QACR,uBACA,+BACA,uBAAuB,oBAAoB,QAAQ,wBAClD,QAAQ"}
1
+ {"version":3,"file":"switchChain.d.ts","names":[],"sources":["../../../../../src/core/tasks/helpers/switchChain.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAqBa,cACX,QAAQ,QACR,uBACA,+BACA,uBAAuB,oBAAoB,QAAQ,wBAClD,QAAQ"}
@@ -1,7 +1,7 @@
1
1
  import { LiFiErrorCode, ProviderError } from "@lifi/sdk";
2
2
  import { getChainId } from "viem/actions";
3
3
  import { getAction } from "viem/utils";
4
- //#region src/core/tasks/helpers/switchChain.ts
4
+ // src/core/tasks/helpers/switchChain.ts
5
5
  /**
6
6
  * This method checks whether the wallet client is configured for the correct chain.
7
7
  * If yes it returns the wallet clien.
@@ -28,7 +28,6 @@ const switchChain = async (client, targetChainId, allowUserInteraction, switchCh
28
28
  if (updatedChainId !== targetChainId) throw new ProviderError(LiFiErrorCode.ChainSwitchError, "Chain switch required.");
29
29
  return updatedClient;
30
30
  };
31
- //#endregion
32
31
  export { switchChain };
33
32
 
34
33
  //# sourceMappingURL=switchChain.js.map
@@ -1,11 +1,9 @@
1
1
  import { WalletCallReceipt as WalletCallReceipt$1 } from "../../../types.js";
2
2
  import { ExecutionAction, ExtendedChain, LiFiStepExtended, StatusManager } from "@lifi/sdk";
3
3
  import { TransactionReceipt } from "viem";
4
- //#region src/core/tasks/helpers/updateActionWithReceipt.d.ts
5
4
  /**
6
5
  * Update action to PENDING with txHash/txLink from a transaction receipt when the receipt hash differs from current action.
7
6
  * Returns the updated action or the same action if no update.
8
7
  */
9
8
  export declare function updateActionWithReceipt(statusManager: StatusManager, step: LiFiStepExtended, fromChain: ExtendedChain, receipt: TransactionReceipt | WalletCallReceipt$1 | undefined, action: ExecutionAction): ExecutionAction;
10
- //#endregion
11
9
  //# sourceMappingURL=updateActionWithReceipt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateActionWithReceipt.d.ts","names":["WalletCallReceipt"],"sources":["../../../../../src/core/tasks/helpers/updateActionWithReceipt.ts"],"mappings":";;;;;;;;wBAcgB,wBACd,eAAe,eACf,MAAM,kBACN,WAAW,eACX,SAAS,qBAAqBA,iCAC9B,QAAQ,kBACP"}
1
+ {"version":3,"file":"updateActionWithReceipt.d.ts","names":["WalletCallReceipt"],"sources":["../../../../../src/core/tasks/helpers/updateActionWithReceipt.ts"],"mappings":";;;;;;;wBAcgB,wBACd,eAAe,eACf,MAAM,kBACN,WAAW,eACX,SAAS,qBAAqBA,iCAC9B,QAAQ,kBACP"}
@@ -1,5 +1,5 @@
1
1
  import { isHex } from "viem/utils";
2
- //#region src/core/tasks/helpers/updateActionWithReceipt.ts
2
+ // src/core/tasks/helpers/updateActionWithReceipt.ts
3
3
  /**
4
4
  * Update action to PENDING with txHash/txLink from a transaction receipt when the receipt hash differs from current action.
5
5
  * Returns the updated action or the same action if no update.
@@ -12,7 +12,6 @@ function updateActionWithReceipt(statusManager, step, fromChain, receipt, action
12
12
  txLink: receipt.transactionLink || (txHash ? `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}` : void 0)
13
13
  });
14
14
  }
15
- //#endregion
16
15
  export { updateActionWithReceipt };
17
16
 
18
17
  //# sourceMappingURL=updateActionWithReceipt.js.map
@@ -1,6 +1,4 @@
1
1
  import { ExecuteStepRetryError, ExecuteStepRetryParams, ExecutionAction, LiFiStep, SDKError } from "@lifi/sdk";
2
- //#region src/errors/parseEthereumErrors.d.ts
3
2
  export declare const parseEthereumErrors: (e: Error, step?: LiFiStep, action?: ExecutionAction, retryParams?: ExecuteStepRetryParams) => Promise<SDKError | ExecuteStepRetryError>;
4
3
  export declare const isAtomicReadyWalletRejectedUpgradeError: (e: any) => boolean;
5
- //#endregion
6
4
  //# sourceMappingURL=parseEthereumErrors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseEthereumErrors.d.ts","names":[],"sources":["../../../src/errors/parseEthereumErrors.ts"],"mappings":";;qBAea,sBACX,GAAG,OACH,OAAO,UACP,SAAS,iBACT,cAAc,2BACb,QAAQ,WAAW;qBAkHT,0CAA2C"}
1
+ {"version":3,"file":"parseEthereumErrors.d.ts","names":[],"sources":["../../../src/errors/parseEthereumErrors.ts"],"mappings":";qBAgBa,sBACX,GAAG,OACH,OAAO,UACP,SAAS,iBACT,cAAc,2BACb,QAAQ,WAAW;qBA0HT,0CAA2C"}
@@ -1,6 +1,6 @@
1
- import { BaseError, ErrorMessage, ExecuteStepRetryError, LiFiErrorCode, SDKError, TransactionError, UnknownError, fetchTxErrorDetails } from "@lifi/sdk";
1
+ import { BaseError, ErrorMessage, ExecuteStepRetryError, LiFiErrorCode, ProviderError, SDKError, TransactionError, UnknownError, fetchTxErrorDetails } from "@lifi/sdk";
2
2
  import { AtomicReadyWalletRejectedUpgradeError } from "viem";
3
- //#region src/errors/parseEthereumErrors.ts
3
+ // src/errors/parseEthereumErrors.ts
4
4
  const parseEthereumErrors = async (e, step, action, retryParams) => {
5
5
  if (e instanceof ExecuteStepRetryError) return e;
6
6
  if (isAtomicReadyWalletRejectedUpgradeError(e) && !retryParams) return new ExecuteStepRetryError("Wallet rejected 7702 upgrade based on the EIP-5792 capabilities; retry with atomicityNotReady", { atomicityNotReady: true }, e);
@@ -13,7 +13,7 @@ const parseEthereumErrors = async (e, step, action, retryParams) => {
13
13
  return new SDKError(baseError, step, action);
14
14
  };
15
15
  const handleSpecificErrors = async (e, step, action) => {
16
- if (e.name === "UserRejectedRequestError" || e.cause?.name === "UserRejectedRequestError") return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e);
16
+ if (e.name === "UserRejectedRequestError" || e.cause?.name === "UserRejectedRequestError" || e.code === 4001 || e.cause?.code === 4001) return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e);
17
17
  /**
18
18
  * The wallet has no record of an EIP-5792 bundle (5730), so the outcome is unknown: the bundle may still land.
19
19
  * No call reaches this branch today, because `waitForBatchTransactionReceipt` handles 5730 first. A later call that reaches it gets the unknown outcome.
@@ -38,6 +38,7 @@ const handleSpecificErrors = async (e, step, action) => {
38
38
  * }
39
39
  */
40
40
  if (e.cause?.code === -32603) return new TransactionError(LiFiErrorCode.TransactionRejected, e.message, e);
41
+ if (e.name === "SwitchChainError") return new ProviderError(LiFiErrorCode.ChainSwitchError, e.message, e);
41
42
  /**
42
43
  * This error is specific to Smart Accounts and thrown when the user doesn't have enough gas to pay for the transaction.
43
44
  */
@@ -56,7 +57,6 @@ const isAtomicReadyWalletRejectedUpgradeError = (e) => {
56
57
  const has7702ErrorCode = details?.includes("7702");
57
58
  return isTransactionError && (hasRejectedUpgrade || has7702ErrorCode);
58
59
  };
59
- //#endregion
60
60
  export { isAtomicReadyWalletRejectedUpgradeError, parseEthereumErrors };
61
61
 
62
62
  //# sourceMappingURL=parseEthereumErrors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseEthereumErrors.js","names":[],"sources":["../../../src/errors/parseEthereumErrors.ts"],"sourcesContent":["import {\n BaseError,\n ErrorMessage,\n ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n fetchTxErrorDetails,\n LiFiErrorCode,\n type LiFiStep,\n SDKError,\n TransactionError,\n UnknownError,\n} from '@lifi/sdk'\nimport { AtomicReadyWalletRejectedUpgradeError } from 'viem'\n\nexport const parseEthereumErrors = async (\n e: Error,\n step?: LiFiStep,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n): Promise<SDKError | ExecuteStepRetryError> => {\n // A task raised it to request a replay; it is not an error to classify.\n if (e instanceof ExecuteStepRetryError) {\n return e\n }\n\n // `executeRoute` replays a step only once, so only the first attempt asks for\n // this retry.\n if (isAtomicReadyWalletRejectedUpgradeError(e) && !retryParams) {\n return new ExecuteStepRetryError(\n 'Wallet rejected 7702 upgrade based on the EIP-5792 capabilities; retry with atomicityNotReady',\n { atomicityNotReady: true },\n e\n )\n }\n\n if (e instanceof SDKError) {\n e.step = e.step ?? step\n e.action = e.action ?? action\n return e\n }\n\n const baseError = await handleSpecificErrors(e, step, action)\n\n return new SDKError(baseError, step, action)\n}\n\nconst handleSpecificErrors = async (\n e: any,\n step?: LiFiStep,\n action?: ExecutionAction\n) => {\n if (\n e.name === 'UserRejectedRequestError' ||\n e.cause?.name === 'UserRejectedRequestError'\n ) {\n return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e)\n }\n /**\n * The wallet has no record of an EIP-5792 bundle (5730), so the outcome is unknown: the bundle may still land.\n * No call reaches this branch today, because `waitForBatchTransactionReceipt` handles 5730 first. A later call that reaches it gets the unknown outcome.\n * Only the error itself matches: an error of the batched wait carries it as a cause and keeps its own code.\n * @see https://github.com/MetaMask/core/blob/main/packages/eip-5792-middleware/src/hooks/getCallsStatus.ts\n */\n if (e.name === 'UnknownBundleIdError') {\n return new TransactionError(LiFiErrorCode.CallBundleNotFound, e.message, e)\n }\n /**\n * Safe Wallet via WalletConnect returns -32000 code when user rejects the signature\n * {\n * code: -32000,\n * message: 'User rejected transaction',\n * }\n */\n if (\n e.cause?.code === -32000 ||\n // Safe doesn't return proper code, but the error details includes 'rejected'\n (e.name === 'TransactionExecutionError' &&\n e.cause?.details?.includes('rejected'))\n ) {\n return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e)\n }\n /**\n * Some wallets reject transactions sometimes with this code because of internal and JSON-RPC errors, e.g.:\n * {\n * \"code\": -32603,\n * \"message\": \"Pop up window failed to open\",\n * \"docUrl\": \"https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\"\n * }\n */\n if (e.cause?.code === -32603) {\n return new TransactionError(LiFiErrorCode.TransactionRejected, e.message, e)\n }\n\n /**\n * This error is specific to Smart Accounts and thrown when the user doesn't have enough gas to pay for the transaction.\n */\n if (\n e.name === 'InsufficientPrefundError' ||\n e.cause?.name === 'InsufficientPrefundError' ||\n e.cause?.cause?.name === 'InsufficientPrefundError'\n ) {\n return new TransactionError(LiFiErrorCode.InsufficientGas, e.message, e)\n }\n\n if (\n step &&\n action?.txHash &&\n e.code === LiFiErrorCode.TransactionFailed &&\n e.message === ErrorMessage.TransactionReverted\n ) {\n const response = await fetchTxErrorDetails(\n action.txHash,\n step.action.fromChainId\n )\n\n const errorMessage = (response as Record<string, string>)?.error_message\n\n if (errorMessage?.toLowerCase().includes('out of gas')) {\n return new TransactionError(\n LiFiErrorCode.GasLimitError,\n ErrorMessage.GasLimitLow,\n e\n )\n }\n }\n\n if (e instanceof BaseError) {\n return e\n }\n\n return new UnknownError(e.message || ErrorMessage.UnknownError, e)\n}\n\nexport const isAtomicReadyWalletRejectedUpgradeError = (e: any): boolean => {\n if (e.cause?.code === AtomicReadyWalletRejectedUpgradeError.code) {\n return true\n }\n\n const details = e.cause?.details?.toLowerCase()\n const isTransactionError =\n e.name === 'TransactionExecutionError' ||\n e.cause?.name === 'TransactionExecutionError'\n const hasRejectedUpgrade =\n details?.includes('rejected') && details?.includes('upgrade')\n const has7702ErrorCode = details?.includes('7702')\n\n return isTransactionError && (hasRejectedUpgrade || has7702ErrorCode)\n}\n"],"mappings":";;;AAeA,MAAa,sBAAsB,OACjC,GACA,MACA,QACA,gBAC8C;CAE9C,IAAI,aAAa,uBACf,OAAO;CAKT,IAAI,wCAAwC,CAAC,KAAK,CAAC,aACjD,OAAO,IAAI,sBACT,iGACA,EAAE,mBAAmB,KAAK,GAC1B,CACF;CAGF,IAAI,aAAa,UAAU;EACzB,EAAE,OAAO,EAAE,QAAQ;EACnB,EAAE,SAAS,EAAE,UAAU;EACvB,OAAO;CACT;CAEA,MAAM,YAAY,MAAM,qBAAqB,GAAG,MAAM,MAAM;CAE5D,OAAO,IAAI,SAAS,WAAW,MAAM,MAAM;AAC7C;AAEA,MAAM,uBAAuB,OAC3B,GACA,MACA,WACG;CACH,IACE,EAAE,SAAS,8BACX,EAAE,OAAO,SAAS,4BAElB,OAAO,IAAI,iBAAiB,cAAc,mBAAmB,EAAE,SAAS,CAAC;;;;;;;CAQ3E,IAAI,EAAE,SAAS,wBACb,OAAO,IAAI,iBAAiB,cAAc,oBAAoB,EAAE,SAAS,CAAC;;;;;;;;CAS5E,IACE,EAAE,OAAO,SAAS,SAEjB,EAAE,SAAS,+BACV,EAAE,OAAO,SAAS,SAAS,UAAU,GAEvC,OAAO,IAAI,iBAAiB,cAAc,mBAAmB,EAAE,SAAS,CAAC;;;;;;;;;CAU3E,IAAI,EAAE,OAAO,SAAS,QACpB,OAAO,IAAI,iBAAiB,cAAc,qBAAqB,EAAE,SAAS,CAAC;;;;CAM7E,IACE,EAAE,SAAS,8BACX,EAAE,OAAO,SAAS,8BAClB,EAAE,OAAO,OAAO,SAAS,4BAEzB,OAAO,IAAI,iBAAiB,cAAc,iBAAiB,EAAE,SAAS,CAAC;CAGzE,IACE,QACA,QAAQ,UACR,EAAE,SAAS,cAAc,qBACzB,EAAE,YAAY,aAAa,qBAOL;QAAA,MALC,oBACrB,OAAO,QACP,KAAK,OAAO,WACd,EAAA,EAE2D,cAAA,EAEzC,YAAY,CAAC,CAAC,SAAS,YAAY,GACnD,OAAO,IAAI,iBACT,cAAc,eACd,aAAa,aACb,CACF;CAAA;CAIJ,IAAI,aAAa,WACf,OAAO;CAGT,OAAO,IAAI,aAAa,EAAE,WAAW,aAAa,cAAc,CAAC;AACnE;AAEA,MAAa,2CAA2C,MAAoB;CAC1E,IAAI,EAAE,OAAO,SAAS,sCAAsC,MAC1D,OAAO;CAGT,MAAM,UAAU,EAAE,OAAO,SAAS,YAAY;CAC9C,MAAM,qBACJ,EAAE,SAAS,+BACX,EAAE,OAAO,SAAS;CACpB,MAAM,qBACJ,SAAS,SAAS,UAAU,KAAK,SAAS,SAAS,SAAS;CAC9D,MAAM,mBAAmB,SAAS,SAAS,MAAM;CAEjD,OAAO,uBAAuB,sBAAsB;AACtD"}
1
+ {"version":3,"file":"parseEthereumErrors.js","names":[],"sources":["../../../src/errors/parseEthereumErrors.ts"],"sourcesContent":["import {\n BaseError,\n ErrorMessage,\n ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n fetchTxErrorDetails,\n LiFiErrorCode,\n type LiFiStep,\n ProviderError,\n SDKError,\n TransactionError,\n UnknownError,\n} from '@lifi/sdk'\nimport { AtomicReadyWalletRejectedUpgradeError } from 'viem'\n\nexport const parseEthereumErrors = async (\n e: Error,\n step?: LiFiStep,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n): Promise<SDKError | ExecuteStepRetryError> => {\n // A task raised it to request a replay; it is not an error to classify.\n if (e instanceof ExecuteStepRetryError) {\n return e\n }\n\n // `executeRoute` replays a step only once, so only the first attempt asks for\n // this retry.\n if (isAtomicReadyWalletRejectedUpgradeError(e) && !retryParams) {\n return new ExecuteStepRetryError(\n 'Wallet rejected 7702 upgrade based on the EIP-5792 capabilities; retry with atomicityNotReady',\n { atomicityNotReady: true },\n e\n )\n }\n\n if (e instanceof SDKError) {\n e.step = e.step ?? step\n e.action = e.action ?? action\n return e\n }\n\n const baseError = await handleSpecificErrors(e, step, action)\n\n return new SDKError(baseError, step, action)\n}\n\nconst handleSpecificErrors = async (\n e: any,\n step?: LiFiStep,\n action?: ExecutionAction\n): Promise<BaseError> => {\n if (\n e.name === 'UserRejectedRequestError' ||\n e.cause?.name === 'UserRejectedRequestError' ||\n // A raw EIP-1193 rejection, for example from a hook that calls the provider directly.\n e.code === 4001 ||\n e.cause?.code === 4001\n ) {\n return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e)\n }\n /**\n * The wallet has no record of an EIP-5792 bundle (5730), so the outcome is unknown: the bundle may still land.\n * No call reaches this branch today, because `waitForBatchTransactionReceipt` handles 5730 first. A later call that reaches it gets the unknown outcome.\n * Only the error itself matches: an error of the batched wait carries it as a cause and keeps its own code.\n * @see https://github.com/MetaMask/core/blob/main/packages/eip-5792-middleware/src/hooks/getCallsStatus.ts\n */\n if (e.name === 'UnknownBundleIdError') {\n return new TransactionError(LiFiErrorCode.CallBundleNotFound, e.message, e)\n }\n /**\n * Safe Wallet via WalletConnect returns -32000 code when user rejects the signature\n * {\n * code: -32000,\n * message: 'User rejected transaction',\n * }\n */\n if (\n e.cause?.code === -32000 ||\n // Safe doesn't return proper code, but the error details includes 'rejected'\n (e.name === 'TransactionExecutionError' &&\n e.cause?.details?.includes('rejected'))\n ) {\n return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e)\n }\n /**\n * Some wallets reject transactions sometimes with this code because of internal and JSON-RPC errors, e.g.:\n * {\n * \"code\": -32603,\n * \"message\": \"Pop up window failed to open\",\n * \"docUrl\": \"https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\"\n * }\n */\n if (e.cause?.code === -32603) {\n return new TransactionError(LiFiErrorCode.TransactionRejected, e.message, e)\n }\n // wagmi connectors throw it for a failed switch that is not a rejection,\n // for example for a chain that the wallet does not support.\n if (e.name === 'SwitchChainError') {\n return new ProviderError(LiFiErrorCode.ChainSwitchError, e.message, e)\n }\n\n /**\n * This error is specific to Smart Accounts and thrown when the user doesn't have enough gas to pay for the transaction.\n */\n if (\n e.name === 'InsufficientPrefundError' ||\n e.cause?.name === 'InsufficientPrefundError' ||\n e.cause?.cause?.name === 'InsufficientPrefundError'\n ) {\n return new TransactionError(LiFiErrorCode.InsufficientGas, e.message, e)\n }\n\n if (\n step &&\n action?.txHash &&\n e.code === LiFiErrorCode.TransactionFailed &&\n e.message === ErrorMessage.TransactionReverted\n ) {\n const response = await fetchTxErrorDetails(\n action.txHash,\n step.action.fromChainId\n )\n\n const errorMessage = (response as Record<string, string>)?.error_message\n\n if (errorMessage?.toLowerCase().includes('out of gas')) {\n return new TransactionError(\n LiFiErrorCode.GasLimitError,\n ErrorMessage.GasLimitLow,\n e\n )\n }\n }\n\n if (e instanceof BaseError) {\n return e\n }\n\n return new UnknownError(e.message || ErrorMessage.UnknownError, e)\n}\n\nexport const isAtomicReadyWalletRejectedUpgradeError = (e: any): boolean => {\n if (e.cause?.code === AtomicReadyWalletRejectedUpgradeError.code) {\n return true\n }\n\n const details = e.cause?.details?.toLowerCase()\n const isTransactionError =\n e.name === 'TransactionExecutionError' ||\n e.cause?.name === 'TransactionExecutionError'\n const hasRejectedUpgrade =\n details?.includes('rejected') && details?.includes('upgrade')\n const has7702ErrorCode = details?.includes('7702')\n\n return isTransactionError && (hasRejectedUpgrade || has7702ErrorCode)\n}\n"],"mappings":";;;AAgBA,MAAa,sBAAsB,OACjC,GACA,MACA,QACA,gBAC8C;CAE9C,IAAI,aAAa,uBACf,OAAO;CAKT,IAAI,wCAAwC,CAAC,KAAK,CAAC,aACjD,OAAO,IAAI,sBACT,iGACA,EAAE,mBAAmB,KAAK,GAC1B,CACF;CAGF,IAAI,aAAa,UAAU;EACzB,EAAE,OAAO,EAAE,QAAQ;EACnB,EAAE,SAAS,EAAE,UAAU;EACvB,OAAO;CACT;CAEA,MAAM,YAAY,MAAM,qBAAqB,GAAG,MAAM,MAAM;CAE5D,OAAO,IAAI,SAAS,WAAW,MAAM,MAAM;AAC7C;AAEA,MAAM,uBAAuB,OAC3B,GACA,MACA,WACuB;CACvB,IACE,EAAE,SAAS,8BACX,EAAE,OAAO,SAAS,8BAElB,EAAE,SAAS,QACX,EAAE,OAAO,SAAS,MAElB,OAAO,IAAI,iBAAiB,cAAc,mBAAmB,EAAE,SAAS,CAAC;;;;;;;CAQ3E,IAAI,EAAE,SAAS,wBACb,OAAO,IAAI,iBAAiB,cAAc,oBAAoB,EAAE,SAAS,CAAC;;;;;;;;CAS5E,IACE,EAAE,OAAO,SAAS,SAEjB,EAAE,SAAS,+BACV,EAAE,OAAO,SAAS,SAAS,UAAU,GAEvC,OAAO,IAAI,iBAAiB,cAAc,mBAAmB,EAAE,SAAS,CAAC;;;;;;;;;CAU3E,IAAI,EAAE,OAAO,SAAS,QACpB,OAAO,IAAI,iBAAiB,cAAc,qBAAqB,EAAE,SAAS,CAAC;CAI7E,IAAI,EAAE,SAAS,oBACb,OAAO,IAAI,cAAc,cAAc,kBAAkB,EAAE,SAAS,CAAC;;;;CAMvE,IACE,EAAE,SAAS,8BACX,EAAE,OAAO,SAAS,8BAClB,EAAE,OAAO,OAAO,SAAS,4BAEzB,OAAO,IAAI,iBAAiB,cAAc,iBAAiB,EAAE,SAAS,CAAC;CAGzE,IACE,QACA,QAAQ,UACR,EAAE,SAAS,cAAc,qBACzB,EAAE,YAAY,aAAa,qBAOL;QAAA,MALC,oBACrB,OAAO,QACP,KAAK,OAAO,WACd,EAAA,EAE2D,cAAA,EAEzC,YAAY,CAAC,CAAC,SAAS,YAAY,GACnD,OAAO,IAAI,iBACT,cAAc,eACd,aAAa,aACb,CACF;CAAA;CAIJ,IAAI,aAAa,WACf,OAAO;CAGT,OAAO,IAAI,aAAa,EAAE,WAAW,aAAa,cAAc,CAAC;AACnE;AAEA,MAAa,2CAA2C,MAAoB;CAC1E,IAAI,EAAE,OAAO,SAAS,sCAAsC,MAC1D,OAAO;CAGT,MAAM,UAAU,EAAE,OAAO,SAAS,YAAY;CAC9C,MAAM,qBACJ,EAAE,SAAS,+BACX,EAAE,OAAO,SAAS;CACpB,MAAM,qBACJ,SAAS,SAAS,UAAU,KAAK,SAAS,SAAS,SAAS;CAC9D,MAAM,mBAAmB,SAAS,SAAS,MAAM;CAEjD,OAAO,uBAAuB,sBAAsB;AACtD"}
@@ -1,11 +1,9 @@
1
1
  import { SDKStorage } from "@lifi/sdk";
2
2
  import { LocalAccount } from "viem";
3
- //#region src/hyperliquid/agentWallet.d.ts
4
3
  export interface AgentWalletResult {
5
4
  account: LocalAccount;
6
5
  needsApproval: boolean;
7
6
  expiresAt: number;
8
7
  }
9
8
  export declare function getOrCreateAgentWallet(storage: SDKStorage, ownerAddress: string, existingAgentAddress?: string, keyPrefix?: string): Promise<AgentWalletResult>;
10
- //#endregion
11
9
  //# sourceMappingURL=agentWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentWallet.d.ts","names":[],"sources":["../../../src/hyperliquid/agentWallet.ts"],"mappings":";;;iBAoBiB;EACf,SAAS;EACT;EACA;;wBAqGoB,uBACpB,SAAS,YACT,sBACA,+BACA,qBACC,QAAQ"}
1
+ {"version":3,"file":"agentWallet.d.ts","names":[],"sources":["../../../src/hyperliquid/agentWallet.ts"],"mappings":";;iBAoBiB;EACf,SAAS;EACT;EACA;;wBAqGoB,uBACpB,SAAS,YACT,sBACA,+BACA,qBACC,QAAQ"}
@@ -1,5 +1,5 @@
1
1
  import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
2
- //#region src/hyperliquid/agentWallet.ts
2
+ // src/hyperliquid/agentWallet.ts
3
3
  const DEFAULT_STORAGE_KEY_PREFIX = "li.fi-sdk:hyperliquid:agent";
4
4
  const DEFAULT_EXPIRATION_MS = 6048e5;
5
5
  const EXPIRATION_BUFFER_MS = 36e5;
@@ -84,7 +84,6 @@ async function getOrCreateAgentWallet(storage, ownerAddress, existingAgentAddres
84
84
  expiresAt
85
85
  };
86
86
  }
87
- //#endregion
88
87
  export { getOrCreateAgentWallet };
89
88
 
90
89
  //# sourceMappingURL=agentWallet.js.map
@@ -1,8 +1,6 @@
1
1
  import { LiFiStep, LiFiStepExtended, TypedData } from "@lifi/sdk";
2
- //#region src/hyperliquid/isHyperliquidAgentStep.d.ts
3
2
  export declare function isHyperliquidAgentStep(step: LiFiStepExtended | LiFiStep): boolean;
4
3
  export declare function isApproveAgentMessage(typedData: TypedData): boolean;
5
4
  export declare function isApproveBuilderFeeMessage(typedData: TypedData): boolean;
6
5
  export declare function isHyperliquidOrderMessage(typedData: TypedData): boolean;
7
- //#endregion
8
6
  //# sourceMappingURL=isHyperliquidAgentStep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHyperliquidAgentStep.d.ts","names":[],"sources":["../../../src/hyperliquid/isHyperliquidAgentStep.ts"],"mappings":";;wBAEgB,uBACd,MAAM,mBAAmB;wBAUX,sBAAsB,WAAW;wBAIjC,2BAA2B,WAAW;wBAItC,0BAA0B,WAAW"}
1
+ {"version":3,"file":"isHyperliquidAgentStep.d.ts","names":[],"sources":["../../../src/hyperliquid/isHyperliquidAgentStep.ts"],"mappings":";wBAEgB,uBACd,MAAM,mBAAmB;wBAUX,sBAAsB,WAAW;wBAIjC,2BAA2B,WAAW;wBAItC,0BAA0B,WAAW"}