@lifi/sdk-provider-ethereum 4.0.14 → 4.2.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.
- package/CHANGELOG.md +36 -0
- package/README.md +24 -8
- package/dist/cjs/EthereumProvider.d.ts +1 -2
- package/dist/cjs/EthereumProvider.js +5 -0
- package/dist/cjs/EthereumProvider.js.map +1 -1
- package/dist/cjs/actions/checkPermitSupport.d.ts +1 -2
- package/dist/cjs/actions/constants.d.ts +6 -7
- package/dist/cjs/actions/getAccountCode.d.ts +1 -2
- package/dist/cjs/actions/getAllowance.d.ts +4 -5
- package/dist/cjs/actions/getEthereumBalance.d.ts +1 -2
- package/dist/cjs/actions/getMaxPriorityFeePerGas.d.ts +1 -2
- package/dist/cjs/actions/getMulticallAddress.d.ts +1 -2
- package/dist/cjs/actions/isBatchingSupported.d.ts +1 -2
- package/dist/cjs/actions/isSafeSignature.d.ts +2 -3
- package/dist/cjs/actions/isSafeWallet.d.ts +1 -2
- package/dist/cjs/actions/isSmartContractWallet.d.ts +1 -2
- package/dist/cjs/actions/resolveENSAddress.d.ts +1 -2
- package/dist/cjs/actions/resolveEthereumAddress.d.ts +1 -2
- package/dist/cjs/actions/resolveTransactionHash.d.ts +1 -2
- package/dist/cjs/actions/resolveUNSAddress.d.ts +1 -2
- package/dist/cjs/actions/setAllowance.d.ts +3 -4
- package/dist/cjs/actions/waitForBatchTransactionReceipt.d.ts +1 -2
- package/dist/cjs/actions/waitForRelayedTransactionReceipt.d.ts +1 -2
- package/dist/cjs/actions/waitForSafeTransactionExecution.d.ts +2 -3
- package/dist/cjs/actions/waitForTransactionReceipt.d.ts +1 -2
- package/dist/cjs/client/publicClient.d.ts +1 -2
- package/dist/cjs/client/safeClient.d.ts +3 -4
- package/dist/cjs/client/types.d.ts +3 -4
- package/dist/cjs/core/EthereumStepExecutor.d.ts +1 -2
- package/dist/cjs/core/EthereumStepExecutor.js +2 -0
- package/dist/cjs/core/EthereumStepExecutor.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumCheckAllowanceTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumCheckBalanceTask.d.ts +3 -4
- package/dist/cjs/core/tasks/EthereumCheckBalanceTask.js +6 -5
- package/dist/cjs/core/tasks/EthereumCheckBalanceTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumCheckPermitsTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumCheckPermitsTask.js +11 -29
- package/dist/cjs/core/tasks/EthereumCheckPermitsTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumNativePermitTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumNativePermitTask.js +2 -0
- package/dist/cjs/core/tasks/EthereumNativePermitTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumPermit2AllowanceTask.d.ts +10 -0
- package/dist/cjs/core/tasks/EthereumPermit2AllowanceTask.js +33 -0
- package/dist/cjs/core/tasks/EthereumPermit2AllowanceTask.js.map +1 -0
- package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.js +6 -4
- package/dist/cjs/core/tasks/EthereumPrepareTransactionTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumRelayedSignAndExecuteTask.js +14 -27
- package/dist/cjs/core/tasks/EthereumRelayedSignAndExecuteTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumResetAllowanceTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumSetAllowanceTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumSetAllowanceTask.js +2 -3
- package/dist/cjs/core/tasks/EthereumSetAllowanceTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumSignAndExecuteTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.js +3 -4
- package/dist/cjs/core/tasks/EthereumStandardSignAndExecuteTask.js.map +1 -1
- package/dist/cjs/core/tasks/EthereumStandardWaitForTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumWaitForTransactionStatusTask.d.ts +1 -2
- package/dist/cjs/core/tasks/EthereumWaitForTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/estimateTransactionRequest.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/findSignedNativePermit.d.ts +7 -0
- package/dist/cjs/core/tasks/helpers/findSignedNativePermit.js +15 -0
- package/dist/cjs/core/tasks/helpers/findSignedNativePermit.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/getApprovalAmount.d.ts +6 -0
- package/dist/cjs/core/tasks/helpers/getApprovalAmount.js +16 -0
- package/dist/cjs/core/tasks/helpers/getApprovalAmount.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.d.ts +7 -2
- package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.js +12 -4
- package/dist/cjs/core/tasks/helpers/getEthereumExecutionStrategy.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/getTxLink.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/getUpdatedStep.d.ts +3 -3
- package/dist/cjs/core/tasks/helpers/getUpdatedStep.js +4 -4
- package/dist/cjs/core/tasks/helpers/getUpdatedStep.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts +8 -0
- package/dist/cjs/core/tasks/helpers/hasPermit2AllowanceInFlight.js +17 -0
- package/dist/cjs/core/tasks/helpers/hasPermit2AllowanceInFlight.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/isTypedDataAlreadySigned.d.ts +6 -0
- package/dist/cjs/core/tasks/helpers/isTypedDataAlreadySigned.js +29 -0
- package/dist/cjs/core/tasks/helpers/isTypedDataAlreadySigned.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/preservePermit2Allowances.d.ts +11 -0
- package/dist/cjs/core/tasks/helpers/preservePermit2Allowances.js +22 -0
- package/dist/cjs/core/tasks/helpers/preservePermit2Allowances.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/resolvePermit2Support.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/resolvePermit2Support.js +2 -1
- package/dist/cjs/core/tasks/helpers/resolvePermit2Support.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/shouldCheckForAllowance.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.js +3 -3
- package/dist/cjs/core/tasks/helpers/signHyperliquidTypedData.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/signTypedDataEntries.d.ts +13 -0
- package/dist/cjs/core/tasks/helpers/signTypedDataEntries.js +37 -0
- package/dist/cjs/core/tasks/helpers/signTypedDataEntries.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/switchChain.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/updateActionWithReceipt.d.ts +1 -2
- package/dist/cjs/errors/parseEthereumErrors.d.ts +2 -3
- package/dist/cjs/hyperliquid/agentWallet.d.ts +2 -3
- package/dist/cjs/hyperliquid/isHyperliquidAgentStep.d.ts +4 -5
- package/dist/cjs/index.d.ts +1 -2
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/permits/acceptsRawEcdsaSignature.d.ts +1 -2
- package/dist/cjs/permits/allowanceTransfer.d.ts +12 -13
- package/dist/cjs/permits/canAccountUseNativePermits.d.ts +1 -2
- package/dist/cjs/permits/canAccountUsePermit2.d.ts +1 -2
- package/dist/cjs/permits/constants.d.ts +20 -21
- package/dist/cjs/permits/domain.d.ts +1 -2
- package/dist/cjs/permits/encodeNativePermitData.d.ts +1 -2
- package/dist/cjs/permits/encodePermit2Data.d.ts +1 -2
- package/dist/cjs/permits/getNativePermit.d.ts +1 -2
- package/dist/cjs/permits/getPermitTransferFromValues.d.ts +1 -2
- package/dist/cjs/permits/invariant.d.ts +1 -2
- package/dist/cjs/permits/isDelegationDesignatorCode.d.ts +1 -2
- package/dist/cjs/permits/isNativePermitValid.d.ts +1 -2
- package/dist/cjs/permits/signPermit2Message.d.ts +1 -2
- package/dist/cjs/permits/signatureTransfer.d.ts +11 -12
- package/dist/cjs/permits/types.d.ts +3 -4
- package/dist/cjs/types.d.ts +13 -14
- package/dist/cjs/utils/abi.d.ts +6 -7
- package/dist/cjs/utils/convertExtendedChain.d.ts +1 -2
- package/dist/cjs/utils/getActionWithFallback.d.ts +1 -2
- package/dist/cjs/utils/getDomainChainId.d.ts +1 -2
- package/dist/cjs/utils/getSafeApiKey.d.ts +1 -2
- package/dist/cjs/utils/getTypedDataLane.d.ts +15 -0
- package/dist/cjs/utils/getTypedDataLane.js +33 -0
- package/dist/cjs/utils/getTypedDataLane.js.map +1 -0
- package/dist/cjs/utils/isContractCallStep.d.ts +1 -2
- package/dist/cjs/utils/isExtendedChain.d.ts +1 -2
- package/dist/cjs/utils/isGaslessStep.d.ts +4 -3
- package/dist/cjs/utils/isGaslessStep.js +7 -1
- package/dist/cjs/utils/isGaslessStep.js.map +1 -1
- package/dist/cjs/utils/isValidSignature.d.ts +2 -3
- package/dist/cjs/utils/isZeroAddress.d.ts +3 -4
- package/dist/cjs/utils/median.d.ts +1 -2
- package/dist/cjs/version.d.ts +2 -3
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/EthereumProvider.d.ts +1 -2
- package/dist/esm/EthereumProvider.d.ts.map +1 -1
- package/dist/esm/EthereumProvider.js +5 -0
- package/dist/esm/EthereumProvider.js.map +1 -1
- package/dist/esm/actions/checkPermitSupport.d.ts +1 -2
- package/dist/esm/actions/checkPermitSupport.d.ts.map +1 -1
- package/dist/esm/actions/constants.d.ts +6 -7
- package/dist/esm/actions/constants.d.ts.map +1 -1
- package/dist/esm/actions/getAccountCode.d.ts +1 -2
- package/dist/esm/actions/getAccountCode.d.ts.map +1 -1
- package/dist/esm/actions/getAllowance.d.ts +4 -5
- package/dist/esm/actions/getAllowance.d.ts.map +1 -1
- package/dist/esm/actions/getEthereumBalance.d.ts +1 -2
- package/dist/esm/actions/getEthereumBalance.d.ts.map +1 -1
- package/dist/esm/actions/getMaxPriorityFeePerGas.d.ts +1 -2
- package/dist/esm/actions/getMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/esm/actions/getMulticallAddress.d.ts +1 -2
- package/dist/esm/actions/getMulticallAddress.d.ts.map +1 -1
- package/dist/esm/actions/isBatchingSupported.d.ts +1 -2
- package/dist/esm/actions/isBatchingSupported.d.ts.map +1 -1
- package/dist/esm/actions/isSafeSignature.d.ts +2 -3
- package/dist/esm/actions/isSafeSignature.d.ts.map +1 -1
- package/dist/esm/actions/isSafeWallet.d.ts +1 -2
- package/dist/esm/actions/isSafeWallet.d.ts.map +1 -1
- package/dist/esm/actions/isSmartContractWallet.d.ts +1 -2
- package/dist/esm/actions/isSmartContractWallet.d.ts.map +1 -1
- package/dist/esm/actions/resolveENSAddress.d.ts +1 -2
- package/dist/esm/actions/resolveENSAddress.d.ts.map +1 -1
- package/dist/esm/actions/resolveEthereumAddress.d.ts +1 -2
- package/dist/esm/actions/resolveEthereumAddress.d.ts.map +1 -1
- package/dist/esm/actions/resolveTransactionHash.d.ts +1 -2
- package/dist/esm/actions/resolveTransactionHash.d.ts.map +1 -1
- package/dist/esm/actions/resolveUNSAddress.d.ts +1 -2
- package/dist/esm/actions/resolveUNSAddress.d.ts.map +1 -1
- package/dist/esm/actions/setAllowance.d.ts +3 -4
- package/dist/esm/actions/setAllowance.d.ts.map +1 -1
- package/dist/esm/actions/waitForBatchTransactionReceipt.d.ts +1 -2
- package/dist/esm/actions/waitForBatchTransactionReceipt.d.ts.map +1 -1
- package/dist/esm/actions/waitForRelayedTransactionReceipt.d.ts +1 -2
- package/dist/esm/actions/waitForRelayedTransactionReceipt.d.ts.map +1 -1
- package/dist/esm/actions/waitForSafeTransactionExecution.d.ts +2 -3
- package/dist/esm/actions/waitForSafeTransactionExecution.d.ts.map +1 -1
- package/dist/esm/actions/waitForTransactionReceipt.d.ts +1 -2
- package/dist/esm/actions/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/esm/client/publicClient.d.ts +1 -2
- package/dist/esm/client/publicClient.d.ts.map +1 -1
- package/dist/esm/client/safeClient.d.ts +3 -4
- package/dist/esm/client/safeClient.d.ts.map +1 -1
- package/dist/esm/client/types.d.ts +3 -4
- package/dist/esm/client/types.d.ts.map +1 -1
- package/dist/esm/core/EthereumStepExecutor.d.ts +1 -2
- package/dist/esm/core/EthereumStepExecutor.d.ts.map +1 -1
- package/dist/esm/core/EthereumStepExecutor.js +2 -0
- package/dist/esm/core/EthereumStepExecutor.js.map +1 -1
- package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumCheckAllowanceTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumCheckAllowanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumCheckBalanceTask.d.ts +3 -4
- package/dist/esm/core/tasks/EthereumCheckBalanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumCheckBalanceTask.js +6 -5
- package/dist/esm/core/tasks/EthereumCheckBalanceTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumCheckPermitsTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumCheckPermitsTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumCheckPermitsTask.js +11 -29
- package/dist/esm/core/tasks/EthereumCheckPermitsTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumNativePermitTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumNativePermitTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumNativePermitTask.js +2 -0
- package/dist/esm/core/tasks/EthereumNativePermitTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.d.ts +10 -0
- package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.d.ts.map +1 -0
- package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.js +32 -0
- package/dist/esm/core/tasks/EthereumPermit2AllowanceTask.js.map +1 -0
- package/dist/esm/core/tasks/EthereumPrepareTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumPrepareTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumPrepareTransactionTask.js +6 -4
- package/dist/esm/core/tasks/EthereumPrepareTransactionTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.js +14 -27
- package/dist/esm/core/tasks/EthereumRelayedSignAndExecuteTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumRelayedWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumResetAllowanceTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumResetAllowanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumSetAllowanceTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumSetAllowanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumSetAllowanceTask.js +2 -3
- package/dist/esm/core/tasks/EthereumSetAllowanceTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumSignAndExecuteTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumSignAndExecuteTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.js +3 -4
- package/dist/esm/core/tasks/EthereumStandardSignAndExecuteTask.js.map +1 -1
- package/dist/esm/core/tasks/EthereumStandardWaitForTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumStandardWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumWaitForTransactionStatusTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumWaitForTransactionStatusTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/EthereumWaitForTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/EthereumWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/estimateTransactionRequest.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/estimateTransactionRequest.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/findSignedNativePermit.d.ts +7 -0
- package/dist/esm/core/tasks/helpers/findSignedNativePermit.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/findSignedNativePermit.js +14 -0
- package/dist/esm/core/tasks/helpers/findSignedNativePermit.js.map +1 -0
- package/dist/esm/core/tasks/helpers/getApprovalAmount.d.ts +6 -0
- package/dist/esm/core/tasks/helpers/getApprovalAmount.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/getApprovalAmount.js +15 -0
- package/dist/esm/core/tasks/helpers/getApprovalAmount.js.map +1 -0
- package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.d.ts +7 -2
- package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.js +12 -4
- package/dist/esm/core/tasks/helpers/getEthereumExecutionStrategy.js.map +1 -1
- package/dist/esm/core/tasks/helpers/getTxLink.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/getTxLink.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/getUpdatedStep.d.ts +3 -3
- package/dist/esm/core/tasks/helpers/getUpdatedStep.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/getUpdatedStep.js +4 -4
- package/dist/esm/core/tasks/helpers/getUpdatedStep.js.map +1 -1
- package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts +8 -0
- package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.js +15 -0
- package/dist/esm/core/tasks/helpers/hasPermit2AllowanceInFlight.js.map +1 -0
- package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.d.ts +6 -0
- package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.js +28 -0
- package/dist/esm/core/tasks/helpers/isTypedDataAlreadySigned.js.map +1 -0
- package/dist/esm/core/tasks/helpers/preservePermit2Allowances.d.ts +11 -0
- package/dist/esm/core/tasks/helpers/preservePermit2Allowances.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/preservePermit2Allowances.js +21 -0
- package/dist/esm/core/tasks/helpers/preservePermit2Allowances.js.map +1 -0
- package/dist/esm/core/tasks/helpers/resolvePermit2Support.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/resolvePermit2Support.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/resolvePermit2Support.js +2 -1
- package/dist/esm/core/tasks/helpers/resolvePermit2Support.js.map +1 -1
- package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/shouldCheckForAllowance.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.js +3 -3
- package/dist/esm/core/tasks/helpers/signHyperliquidTypedData.js.map +1 -1
- package/dist/esm/core/tasks/helpers/signTypedDataEntries.d.ts +13 -0
- package/dist/esm/core/tasks/helpers/signTypedDataEntries.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/signTypedDataEntries.js +36 -0
- package/dist/esm/core/tasks/helpers/signTypedDataEntries.js.map +1 -0
- package/dist/esm/core/tasks/helpers/switchChain.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/switchChain.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/updateActionWithReceipt.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/updateActionWithReceipt.d.ts.map +1 -1
- package/dist/esm/errors/parseEthereumErrors.d.ts +2 -3
- package/dist/esm/errors/parseEthereumErrors.d.ts.map +1 -1
- package/dist/esm/hyperliquid/agentWallet.d.ts +2 -3
- package/dist/esm/hyperliquid/agentWallet.d.ts.map +1 -1
- package/dist/esm/hyperliquid/isHyperliquidAgentStep.d.ts +4 -5
- package/dist/esm/hyperliquid/isHyperliquidAgentStep.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/permits/acceptsRawEcdsaSignature.d.ts +1 -2
- package/dist/esm/permits/acceptsRawEcdsaSignature.d.ts.map +1 -1
- package/dist/esm/permits/allowanceTransfer.d.ts +12 -13
- package/dist/esm/permits/allowanceTransfer.d.ts.map +1 -1
- package/dist/esm/permits/canAccountUseNativePermits.d.ts +1 -2
- package/dist/esm/permits/canAccountUseNativePermits.d.ts.map +1 -1
- package/dist/esm/permits/canAccountUsePermit2.d.ts +1 -2
- package/dist/esm/permits/canAccountUsePermit2.d.ts.map +1 -1
- package/dist/esm/permits/constants.d.ts +20 -21
- package/dist/esm/permits/constants.d.ts.map +1 -1
- package/dist/esm/permits/domain.d.ts +1 -2
- package/dist/esm/permits/domain.d.ts.map +1 -1
- package/dist/esm/permits/encodeNativePermitData.d.ts +1 -2
- package/dist/esm/permits/encodeNativePermitData.d.ts.map +1 -1
- package/dist/esm/permits/encodePermit2Data.d.ts +1 -2
- package/dist/esm/permits/encodePermit2Data.d.ts.map +1 -1
- package/dist/esm/permits/getNativePermit.d.ts +1 -2
- package/dist/esm/permits/getNativePermit.d.ts.map +1 -1
- package/dist/esm/permits/getPermitTransferFromValues.d.ts +1 -2
- package/dist/esm/permits/getPermitTransferFromValues.d.ts.map +1 -1
- package/dist/esm/permits/invariant.d.ts +1 -2
- package/dist/esm/permits/invariant.d.ts.map +1 -1
- package/dist/esm/permits/isDelegationDesignatorCode.d.ts +1 -2
- package/dist/esm/permits/isDelegationDesignatorCode.d.ts.map +1 -1
- package/dist/esm/permits/isNativePermitValid.d.ts +1 -2
- package/dist/esm/permits/isNativePermitValid.d.ts.map +1 -1
- package/dist/esm/permits/signPermit2Message.d.ts +1 -2
- package/dist/esm/permits/signPermit2Message.d.ts.map +1 -1
- package/dist/esm/permits/signatureTransfer.d.ts +11 -12
- package/dist/esm/permits/signatureTransfer.d.ts.map +1 -1
- package/dist/esm/permits/types.d.ts +3 -4
- package/dist/esm/permits/types.d.ts.map +1 -1
- package/dist/esm/types.d.ts +13 -14
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/utils/abi.d.ts +6 -7
- package/dist/esm/utils/abi.d.ts.map +1 -1
- package/dist/esm/utils/convertExtendedChain.d.ts +1 -2
- package/dist/esm/utils/convertExtendedChain.d.ts.map +1 -1
- package/dist/esm/utils/getActionWithFallback.d.ts +1 -2
- package/dist/esm/utils/getActionWithFallback.d.ts.map +1 -1
- package/dist/esm/utils/getDomainChainId.d.ts +1 -2
- package/dist/esm/utils/getDomainChainId.d.ts.map +1 -1
- package/dist/esm/utils/getSafeApiKey.d.ts +1 -2
- package/dist/esm/utils/getSafeApiKey.d.ts.map +1 -1
- package/dist/esm/utils/getTypedDataLane.d.ts +15 -0
- package/dist/esm/utils/getTypedDataLane.d.ts.map +1 -0
- package/dist/esm/utils/getTypedDataLane.js +28 -0
- package/dist/esm/utils/getTypedDataLane.js.map +1 -0
- package/dist/esm/utils/isContractCallStep.d.ts +1 -2
- package/dist/esm/utils/isContractCallStep.d.ts.map +1 -1
- package/dist/esm/utils/isExtendedChain.d.ts +1 -2
- package/dist/esm/utils/isExtendedChain.d.ts.map +1 -1
- package/dist/esm/utils/isGaslessStep.d.ts +4 -3
- package/dist/esm/utils/isGaslessStep.d.ts.map +1 -1
- package/dist/esm/utils/isGaslessStep.js +7 -2
- package/dist/esm/utils/isGaslessStep.js.map +1 -1
- package/dist/esm/utils/isValidSignature.d.ts +2 -3
- package/dist/esm/utils/isValidSignature.d.ts.map +1 -1
- package/dist/esm/utils/isZeroAddress.d.ts +3 -4
- package/dist/esm/utils/isZeroAddress.d.ts.map +1 -1
- package/dist/esm/utils/median.d.ts +1 -2
- package/dist/esm/utils/median.d.ts.map +1 -1
- package/dist/esm/version.d.ts +2 -3
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +3 -3
- package/src/EthereumProvider.ts +6 -0
- package/src/core/EthereumStepExecutor.ts +2 -0
- package/src/core/tasks/EthereumCheckBalanceTask.ts +6 -7
- package/src/core/tasks/EthereumCheckPermitsTask.ts +31 -63
- package/src/core/tasks/EthereumNativePermitTask.ts +5 -0
- package/src/core/tasks/EthereumPermit2AllowanceTask.ts +53 -0
- package/src/core/tasks/EthereumPrepareTransactionTask.ts +11 -2
- package/src/core/tasks/EthereumRelayedSignAndExecuteTask.ts +25 -47
- package/src/core/tasks/EthereumSetAllowanceTask.ts +2 -3
- package/src/core/tasks/EthereumStandardSignAndExecuteTask.ts +2 -9
- package/src/core/tasks/helpers/findSignedNativePermit.ts +23 -0
- package/src/core/tasks/helpers/getApprovalAmount.ts +30 -0
- package/src/core/tasks/helpers/getEthereumExecutionStrategy.ts +31 -5
- package/src/core/tasks/helpers/getUpdatedStep.ts +7 -2
- package/src/core/tasks/helpers/hasPermit2AllowanceInFlight.ts +31 -0
- package/src/core/tasks/helpers/isTypedDataAlreadySigned.ts +56 -0
- package/src/core/tasks/helpers/preservePermit2Allowances.ts +44 -0
- package/src/core/tasks/helpers/resolvePermit2Support.ts +3 -1
- package/src/core/tasks/helpers/signHyperliquidTypedData.ts +3 -3
- package/src/core/tasks/helpers/signTypedDataEntries.ts +70 -0
- package/src/index.ts +0 -1
- package/src/utils/getTypedDataLane.ts +76 -0
- package/src/utils/isGaslessStep.ts +22 -9
- package/src/version.ts +1 -1
- package/dist/cjs/utils/isRelayerStep.d.ts +0 -7
- package/dist/cjs/utils/isRelayerStep.js +0 -9
- package/dist/cjs/utils/isRelayerStep.js.map +0 -1
- package/dist/esm/utils/isRelayerStep.d.ts +0 -7
- package/dist/esm/utils/isRelayerStep.d.ts.map +0 -1
- package/dist/esm/utils/isRelayerStep.js +0 -8
- package/dist/esm/utils/isRelayerStep.js.map +0 -1
- package/src/utils/isRelayerStep.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @lifi/sdk-provider-ethereum
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#475](https://github.com/lifinance/sdk/pull/475) [`252a06d`](https://github.com/lifinance/sdk/commit/252a06de1db75fad3d8501e05cc128b0a4c9d914) Thanks [@chybisov](https://github.com/chybisov)! - Sign a caller-supplied Permit2 `PermitSingle` inline and send the swap as one ordinary user transaction. A custom swap provider can now attach a Permit2 message for its own spender — Uniswap's Universal Router, for example — to its quote step; the SDK signs it before `/advanced/stepTransaction`, which returns router calldata with the signature embedded. No relayer, no LI.FI Permit2 proxy, and no hand-rolled approve/relay/status steps.
|
|
8
|
+
|
|
9
|
+
Execution routing no longer keys off the mere presence of `step.typedData`. One classifier assigns each entry to a lane — `native-permit` for EIP-2612, `permit2-allowance` for a Permit2 `PermitSingle` the user signs and then spends itself, and `relayer-message` for anything the LI.FI relayer submits — and each decision point reads the lane. Concretely:
|
|
10
|
+
|
|
11
|
+
- A step whose only typed data is a Permit2 allowance executes as `standard` or `batched` instead of being force-routed to the relayer. That is the sole shape carved out: every other typed-data step — native permits, Order-based tools and gasless steps included — keeps the relayer route it already had.
|
|
12
|
+
- `EthereumCheckBalanceTask` keeps the gas check for a Permit2 allowance step, because the user funds that transaction.
|
|
13
|
+
- The token approval to Permit2 is unlimited when `estimate.approvalAddress` is the same contract every Permit2 allowance on the step names in `domain.verifyingContract`, so repeat swaps need a signature only. It stays at the swap amount otherwise, including when message signing is disabled and the allowance is therefore never signed.
|
|
14
|
+
- `isRelayerStep` is removed. Use `isGaslessStep` to ask whether the relayer pays the gas. `isRelayerStep` only told you the step carried typed data, which no longer says how the step executes: a caller-supplied Permit2 allowance is signed inline and sent by the user. It had no callers left inside the SDK.
|
|
15
|
+
- A step the API marks `executionType: 'message'` routes to the relayer even before its typed data arrives. The backend declares that at routes time while `typedData` only arrives at `/advanced/stepTransaction`, and in that window the SDK used to queue an approval into a batch the relayer then discarded. It is an additional signal, never a replacement: the gasless lane reports `executionType: 'transaction'` while being signature-only, so it still relies on the typed-data inference.
|
|
16
|
+
- A step that carries typed data and receives no `transactionRequest` executes through the relayer. `batched` needs a transaction request and `standard` throws without one, so that is the only path a signature-only step can take. The strategy applies that test only after the step is prepared, because before prepare a Permit2 allowance that will receive a transaction and one that never will look identical — testing there would cost every batchable step its EIP-5792 batch.
|
|
17
|
+
- The relayer never asks for a signature it already holds. An entry already in `signedTypedData` — a Permit2 allowance signed before prepare, for example — is relayed with that signature instead of being signed a second time, so a signature-only step raises one wallet prompt and not two.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#484](https://github.com/lifinance/sdk/pull/484) [`13c19c4`](https://github.com/lifinance/sdk/commit/13c19c4441341683b9dbaa8943e950b8f7571304) Thanks [@chybisov](https://github.com/chybisov)! - Refresh runtime dependencies: `@lifi/types` to `^18.10.0`, `viem` to `^2.56.8`,
|
|
22
|
+
`@mysten/sui` to `^2.31.3`, `@solana/kit` to `^8.3.0`,
|
|
23
|
+
`@solana/wallet-standard-features` to `^1.5.0`, `@stellar/stellar-sdk` to `^17.1.0`,
|
|
24
|
+
`@bigmi/core` to `^0.9.2` and `tronweb` to `^6.5.1`.
|
|
25
|
+
- Updated dependencies [[`13c19c4`](https://github.com/lifinance/sdk/commit/13c19c4441341683b9dbaa8943e950b8f7571304), [`252a06d`](https://github.com/lifinance/sdk/commit/252a06de1db75fad3d8501e05cc128b0a4c9d914), [`252a06d`](https://github.com/lifinance/sdk/commit/252a06de1db75fad3d8501e05cc128b0a4c9d914)]:
|
|
26
|
+
- @lifi/sdk@4.8.0
|
|
27
|
+
|
|
28
|
+
## 4.1.0
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- [#471](https://github.com/lifinance/sdk/pull/471) [`a57b439`](https://github.com/lifinance/sdk/commit/a57b4391b52d9bc535577dcbfad1523ab4d2e32f) Thanks [@chybisov](https://github.com/chybisov)! - Add optional `SDKProvider.isTokenAddress`, so callers can validate a token identifier without knowing how each ecosystem shapes one: `C…` contract ids on Stellar, `0x…::module::TYPE` coin types on Sui, an address in any letter case on Ethereum, and the wallet format on Solana and Tron. `BitcoinProvider` omits the method, because the token list names its native coin `bitcoin` rather than giving it an address. A missing method means the ecosystem has no token address format, so a caller must not fall back to `isAddress`.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [[`d7d8abb`](https://github.com/lifinance/sdk/commit/d7d8abb776aa943aafda62d17926b8575f770478), [`a57b439`](https://github.com/lifinance/sdk/commit/a57b4391b52d9bc535577dcbfad1523ab4d2e32f)]:
|
|
37
|
+
- @lifi/sdk@4.7.0
|
|
38
|
+
|
|
3
39
|
## 4.0.14
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
[**LI.FI SDK**](https://docs.li.fi/sdk/overview) features include:
|
|
15
15
|
|
|
16
|
-
- **Modular architecture** - Install only the provider packages you need for your supported blockchain ecosystems (EVM, Solana, Bitcoin, Sui, Tron)
|
|
16
|
+
- **Modular architecture** - Install only the provider packages you need for your supported blockchain ecosystems (EVM, Solana, Bitcoin, Sui, Tron, Stellar)
|
|
17
17
|
- All ecosystems, chains, bridges, exchanges, and solvers that [LI.FI](https://docs.li.fi/introduction/chains) supports
|
|
18
18
|
- Complete functionality covering full-cycle from obtaining routes/quotes to executing transactions
|
|
19
19
|
- Easy tracking of the route and quote execution through the robust event and hooks handling
|
|
20
20
|
- Highly customizable settings to tailor the SDK to your specific needs including configuration of RPCs and options to allow or deny certain chains, tokens, bridges, exchanges, solvers
|
|
21
21
|
- Supports widely adopted industry standards, including [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792), [ERC-2612](https://eips.ethereum.org/EIPS/eip-2612), [EIP-712](https://eips.ethereum.org/EIPS/eip-712), and [Permit2](https://github.com/Uniswap/permit2)
|
|
22
|
-
- SDK ecosystem providers are based on industry-standard libraries ([Viem](https://viem.sh/) for EVM, [Solana Kit](https://github.com/
|
|
22
|
+
- SDK ecosystem providers are based on industry-standard libraries ([Viem](https://viem.sh/) for EVM, [Solana Kit](https://github.com/anza-xyz/kit) for Solana, [Bigmi](https://github.com/lifinance/bigmi) for Bitcoin, [Mysten Sui SDK](https://github.com/MystenLabs/sui/tree/main/sdk) for Sui, [TronWeb](https://tronweb.network/) for Tron, [Stellar SDK](https://github.com/stellar/js-stellar-sdk) for Stellar)
|
|
23
23
|
- Support for arbitrary contract calls on the destination chain
|
|
24
24
|
- Designed for optimal performance with tree-shaking and dead-code elimination, ensuring minimal bundle sizes and faster page load times in front-end environments
|
|
25
25
|
- Compatibility tested with Node.js and popular front-end tools like Vite
|
|
@@ -42,33 +42,47 @@ npm install --save @lifi/sdk
|
|
|
42
42
|
|
|
43
43
|
### Provider Packages
|
|
44
44
|
|
|
45
|
-
Install provider packages based on the blockchain ecosystems you want to support
|
|
45
|
+
Install provider packages based on the blockchain ecosystems you want to support.
|
|
46
|
+
|
|
47
|
+
Each provider bundles its ecosystem library, but you configure a provider by handing it a
|
|
48
|
+
wallet or client object that **you** construct — so install the ecosystem library alongside
|
|
49
|
+
the provider whenever you import from it in your own code:
|
|
46
50
|
|
|
47
51
|
**EVM Chains (Ethereum, Polygon, Arbitrum, Optimism, etc.)**
|
|
48
52
|
```bash
|
|
49
|
-
pnpm add @lifi/sdk-provider-ethereum
|
|
53
|
+
pnpm add @lifi/sdk-provider-ethereum viem
|
|
50
54
|
```
|
|
51
55
|
|
|
52
56
|
**Solana**
|
|
53
57
|
```bash
|
|
54
|
-
pnpm add @lifi/sdk-provider-solana
|
|
58
|
+
pnpm add @lifi/sdk-provider-solana @wallet-standard/base
|
|
55
59
|
```
|
|
56
60
|
|
|
57
61
|
**Bitcoin**
|
|
58
62
|
```bash
|
|
59
|
-
pnpm add @lifi/sdk-provider-bitcoin
|
|
63
|
+
pnpm add @lifi/sdk-provider-bitcoin @bigmi/core
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
**Sui**
|
|
63
67
|
```bash
|
|
64
|
-
pnpm add @lifi/sdk-provider-sui
|
|
68
|
+
pnpm add @lifi/sdk-provider-sui @mysten/sui
|
|
65
69
|
```
|
|
66
70
|
|
|
67
71
|
**Tron**
|
|
68
72
|
```bash
|
|
69
|
-
pnpm add @lifi/sdk-provider-tron
|
|
73
|
+
pnpm add @lifi/sdk-provider-tron @tronweb3/tronwallet-abstract-adapter
|
|
70
74
|
```
|
|
71
75
|
|
|
76
|
+
**Stellar**
|
|
77
|
+
```bash
|
|
78
|
+
pnpm add @lifi/sdk-provider-stellar
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`StellarProvider` takes a small `StellarWallet` interface the package defines itself, so it
|
|
82
|
+
needs no ecosystem library. To discover and connect browser wallets such as Freighter,
|
|
83
|
+
xBull, or Lobstr, we recommend
|
|
84
|
+
[Stellar Wallets Kit](https://github.com/Creit-Tech/Stellar-Wallets-Kit).
|
|
85
|
+
|
|
72
86
|
## Architecture
|
|
73
87
|
|
|
74
88
|
The LI.FI SDK uses a modular provider architecture:
|
|
@@ -119,6 +133,7 @@ import { SolanaProvider } from '@lifi/sdk-provider-solana'
|
|
|
119
133
|
import { BitcoinProvider } from '@lifi/sdk-provider-bitcoin'
|
|
120
134
|
import { SuiProvider } from '@lifi/sdk-provider-sui'
|
|
121
135
|
import { TronProvider } from '@lifi/sdk-provider-tron'
|
|
136
|
+
import { StellarProvider } from '@lifi/sdk-provider-stellar'
|
|
122
137
|
|
|
123
138
|
const client = createClient({
|
|
124
139
|
integrator: 'Your dApp/company name',
|
|
@@ -128,6 +143,7 @@ const client = createClient({
|
|
|
128
143
|
BitcoinProvider({ /* options */ }),
|
|
129
144
|
SuiProvider({ /* options */ }),
|
|
130
145
|
TronProvider({ /* options */ }),
|
|
146
|
+
StellarProvider({ /* options */ }),
|
|
131
147
|
],
|
|
132
148
|
})
|
|
133
149
|
```
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EthereumProviderOptions, EthereumSDKProvider } from "./types.js";
|
|
2
2
|
//#region src/EthereumProvider.d.ts
|
|
3
|
-
declare function EthereumProvider(options?: EthereumProviderOptions): EthereumSDKProvider;
|
|
3
|
+
export declare function EthereumProvider(options?: EthereumProviderOptions): EthereumSDKProvider;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { EthereumProvider };
|
|
6
5
|
//# sourceMappingURL=EthereumProvider.d.ts.map
|
|
@@ -5,6 +5,10 @@ const require_core_EthereumStepExecutor = require("./core/EthereumStepExecutor.j
|
|
|
5
5
|
let _lifi_sdk = require("@lifi/sdk");
|
|
6
6
|
let viem = require("viem");
|
|
7
7
|
//#region src/EthereumProvider.ts
|
|
8
|
+
/** The wallet format without the checksum: a pasted address keeps its case. */
|
|
9
|
+
function isEthereumTokenAddress(address) {
|
|
10
|
+
return (0, viem.isAddress)(address, { strict: false });
|
|
11
|
+
}
|
|
8
12
|
function EthereumProvider(options) {
|
|
9
13
|
const _options = options ?? {};
|
|
10
14
|
return {
|
|
@@ -15,6 +19,7 @@ function EthereumProvider(options) {
|
|
|
15
19
|
return _options;
|
|
16
20
|
},
|
|
17
21
|
isAddress: viem.isAddress,
|
|
22
|
+
isTokenAddress: isEthereumTokenAddress,
|
|
18
23
|
resolveAddress: require_actions_resolveEthereumAddress.resolveEthereumAddress,
|
|
19
24
|
getBalance: require_actions_getEthereumBalance.getEthereumBalance,
|
|
20
25
|
getWalletClient: _options.getWalletClient,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumProvider.js","names":["ChainType","resolveEthereumAddress","getEthereumBalance","EthereumStepExecutor"],"sources":["../../src/EthereumProvider.ts"],"sourcesContent":["import { ChainType, type StepExecutorOptions } from '@lifi/sdk'\nimport { isAddress } from 'viem'\nimport { getEthereumBalance } from './actions/getEthereumBalance.js'\nimport { resolveEthereumAddress } from './actions/resolveEthereumAddress.js'\nimport { EthereumStepExecutor } from './core/EthereumStepExecutor.js'\nimport type { EthereumProviderOptions, EthereumSDKProvider } from './types.js'\n\nexport function EthereumProvider(\n options?: EthereumProviderOptions\n): EthereumSDKProvider {\n const _options: EthereumProviderOptions = options ?? {}\n return {\n get type() {\n return ChainType.EVM\n },\n get options() {\n return _options\n },\n isAddress,\n resolveAddress: resolveEthereumAddress,\n getBalance: getEthereumBalance,\n getWalletClient: _options.getWalletClient,\n async getStepExecutor(\n options: StepExecutorOptions\n ): Promise<EthereumStepExecutor> {\n if (!_options.getWalletClient) {\n throw new Error('Client is not provided.')\n }\n\n const walletClient = await _options.getWalletClient()\n\n const executor = new EthereumStepExecutor({\n client: walletClient,\n switchChain: _options.switchChain,\n disableMessageSigning: _options.disableMessageSigning,\n routeId: options.routeId,\n executionOptions: {\n ...options.executionOptions,\n },\n })\n\n return executor\n },\n setOptions(options: EthereumProviderOptions) {\n Object.assign(_options, options)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EthereumProvider.js","names":["isAddress","ChainType","resolveEthereumAddress","getEthereumBalance","EthereumStepExecutor"],"sources":["../../src/EthereumProvider.ts"],"sourcesContent":["import { ChainType, type StepExecutorOptions } from '@lifi/sdk'\nimport { isAddress } from 'viem'\nimport { getEthereumBalance } from './actions/getEthereumBalance.js'\nimport { resolveEthereumAddress } from './actions/resolveEthereumAddress.js'\nimport { EthereumStepExecutor } from './core/EthereumStepExecutor.js'\nimport type { EthereumProviderOptions, EthereumSDKProvider } from './types.js'\n\n/** The wallet format without the checksum: a pasted address keeps its case. */\nfunction isEthereumTokenAddress(address: string): boolean {\n return isAddress(address, { strict: false })\n}\n\nexport function EthereumProvider(\n options?: EthereumProviderOptions\n): EthereumSDKProvider {\n const _options: EthereumProviderOptions = options ?? {}\n return {\n get type() {\n return ChainType.EVM\n },\n get options() {\n return _options\n },\n isAddress,\n isTokenAddress: isEthereumTokenAddress,\n resolveAddress: resolveEthereumAddress,\n getBalance: getEthereumBalance,\n getWalletClient: _options.getWalletClient,\n async getStepExecutor(\n options: StepExecutorOptions\n ): Promise<EthereumStepExecutor> {\n if (!_options.getWalletClient) {\n throw new Error('Client is not provided.')\n }\n\n const walletClient = await _options.getWalletClient()\n\n const executor = new EthereumStepExecutor({\n client: walletClient,\n switchChain: _options.switchChain,\n disableMessageSigning: _options.disableMessageSigning,\n routeId: options.routeId,\n executionOptions: {\n ...options.executionOptions,\n },\n })\n\n return executor\n },\n setOptions(options: EthereumProviderOptions) {\n Object.assign(_options, options)\n },\n }\n}\n"],"mappings":";;;;;;;;AAQA,SAAS,uBAAuB,SAA0B;CACxD,QAAA,GAAOA,KAAAA,UAAAA,CAAU,SAAS,EAAE,QAAQ,MAAM,CAAC;AAC7C;AAEA,SAAgB,iBACd,SACqB;CACrB,MAAM,WAAoC,WAAW,CAAC;CACtD,OAAO;EACL,IAAI,OAAO;GACT,OAAOC,UAAAA,UAAU;EACnB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,WAAA,KAAA;EACA,gBAAgB;EAChB,gBAAgBC,uCAAAA;EAChB,YAAYC,mCAAAA;EACZ,iBAAiB,SAAS;EAC1B,MAAM,gBACJ,SAC+B;GAC/B,IAAI,CAAC,SAAS,iBACZ,MAAM,IAAI,MAAM,yBAAyB;GAG3C,MAAM,eAAe,MAAM,SAAS,gBAAgB;GAYpD,OAAO,IAVcC,kCAAAA,qBAAqB;IACxC,QAAQ;IACR,aAAa,SAAS;IACtB,uBAAuB,SAAS;IAChC,SAAS,QAAQ;IACjB,kBAAkB,EAChB,GAAG,QAAQ,iBACb;GACF,CAEc;EAChB;EACA,WAAW,SAAkC;GAC3C,OAAO,OAAO,UAAU,OAAO;EACjC;CACF;AACF"}
|
|
@@ -21,12 +21,11 @@ type PermitSupport = {
|
|
|
21
21
|
* @param amount - The amount to check allowance against for Permit2
|
|
22
22
|
* @returns Object indicating which permit types are supported
|
|
23
23
|
*/
|
|
24
|
-
declare const checkPermitSupport: (client: SDKClient, { chain, tokenAddress, ownerAddress, amount }: {
|
|
24
|
+
export declare const checkPermitSupport: (client: SDKClient, { chain, tokenAddress, ownerAddress, amount }: {
|
|
25
25
|
chain: ExtendedChain;
|
|
26
26
|
tokenAddress: Address;
|
|
27
27
|
ownerAddress: Address;
|
|
28
28
|
amount: bigint;
|
|
29
29
|
}) => Promise<PermitSupport>;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { checkPermitSupport };
|
|
32
31
|
//# sourceMappingURL=checkPermitSupport.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChainId, ChainType } from "@lifi/sdk";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
//#region src/actions/constants.d.ts
|
|
4
|
-
declare const UNS_PROXY_READER_ADDRESSES: Record<number, Address>;
|
|
5
|
-
declare const getUNSProxyAddress: (chainId: number) => Address | undefined;
|
|
6
|
-
declare const UNSProxyReaderABI: readonly [{
|
|
4
|
+
export declare const UNS_PROXY_READER_ADDRESSES: Record<number, Address>;
|
|
5
|
+
export declare const getUNSProxyAddress: (chainId: number) => Address | undefined;
|
|
6
|
+
export declare const UNSProxyReaderABI: readonly [{
|
|
7
7
|
readonly constant: true;
|
|
8
8
|
readonly inputs: readonly [{
|
|
9
9
|
readonly internalType: "string[]";
|
|
@@ -46,9 +46,8 @@ declare const UNSProxyReaderABI: readonly [{
|
|
|
46
46
|
readonly stateMutability: "view";
|
|
47
47
|
readonly type: "function";
|
|
48
48
|
}];
|
|
49
|
-
declare const CHAIN_TYPE_UNS_CHAIN_MAP: Record<ChainType, string>;
|
|
50
|
-
declare const CHAIN_ID_UNS_CHAIN_MAP: Partial<Record<ChainId, string>>;
|
|
51
|
-
declare const CHAIN_TYPE_FAMILY_MAP: Record<ChainType, string>;
|
|
49
|
+
export declare const CHAIN_TYPE_UNS_CHAIN_MAP: Record<ChainType, string>;
|
|
50
|
+
export declare const CHAIN_ID_UNS_CHAIN_MAP: Partial<Record<ChainId, string>>;
|
|
51
|
+
export declare const CHAIN_TYPE_FAMILY_MAP: Record<ChainType, string>;
|
|
52
52
|
//#endregion
|
|
53
|
-
export { CHAIN_ID_UNS_CHAIN_MAP, CHAIN_TYPE_FAMILY_MAP, CHAIN_TYPE_UNS_CHAIN_MAP, UNSProxyReaderABI, UNS_PROXY_READER_ADDRESSES, getUNSProxyAddress };
|
|
54
53
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -24,7 +24,6 @@ type GetAccountCodeParams = {
|
|
|
24
24
|
* `undefined`, which would otherwise make a plain EOA indistinguishable from
|
|
25
25
|
* a failed RPC and silently push every EOA down the failure path.
|
|
26
26
|
*/
|
|
27
|
-
declare const getAccountCode: ({ client, chainId, address }: GetAccountCodeParams) => Promise<Hex | undefined>;
|
|
27
|
+
export declare const getAccountCode: ({ client, chainId, address }: GetAccountCodeParams) => Promise<Hex | undefined>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { getAccountCode };
|
|
30
29
|
//# sourceMappingURL=getAccountCode.d.ts.map
|
|
@@ -2,8 +2,8 @@ import { TokenAllowance, TokenSpender, TokenSpenderAllowance } from "../types.js
|
|
|
2
2
|
import { BaseToken, ChainId, SDKClient } from "@lifi/sdk";
|
|
3
3
|
import { Address, Client } from "viem";
|
|
4
4
|
//#region src/actions/getAllowance.d.ts
|
|
5
|
-
declare const getAllowance: (client: SDKClient, viemClient: Client, tokenAddress: Address, ownerAddress: Address, spenderAddress: Address) => Promise<bigint>;
|
|
6
|
-
declare const getAllowanceMulticall: (client: SDKClient, viemClient: Client, chainId: ChainId, tokens: TokenSpender[], ownerAddress: Address) => Promise<TokenSpenderAllowance[]>;
|
|
5
|
+
export declare const getAllowance: (client: SDKClient, viemClient: Client, tokenAddress: Address, ownerAddress: Address, spenderAddress: Address) => Promise<bigint>;
|
|
6
|
+
export declare const getAllowanceMulticall: (client: SDKClient, viemClient: Client, chainId: ChainId, tokens: TokenSpender[], ownerAddress: Address) => Promise<TokenSpenderAllowance[]>;
|
|
7
7
|
/**
|
|
8
8
|
* Get the current allowance for a certain token.
|
|
9
9
|
* @param client - The SDK client
|
|
@@ -12,7 +12,7 @@ declare const getAllowanceMulticall: (client: SDKClient, viemClient: Client, cha
|
|
|
12
12
|
* @param spenderAddress - The spender address that has to be approved
|
|
13
13
|
* @returns Returns allowance
|
|
14
14
|
*/
|
|
15
|
-
declare const getTokenAllowance: (client: SDKClient, token: BaseToken, ownerAddress: Address, spenderAddress: Address) => Promise<bigint | undefined>;
|
|
15
|
+
export declare const getTokenAllowance: (client: SDKClient, token: BaseToken, ownerAddress: Address, spenderAddress: Address) => Promise<bigint | undefined>;
|
|
16
16
|
/**
|
|
17
17
|
* Get the current allowance for a list of token/spender address pairs.
|
|
18
18
|
* @param client - The SDK client
|
|
@@ -20,7 +20,6 @@ declare const getTokenAllowance: (client: SDKClient, token: BaseToken, ownerAddr
|
|
|
20
20
|
* @param tokens - A list of token and spender address pairs
|
|
21
21
|
* @returns Returns array of tokens and their allowance
|
|
22
22
|
*/
|
|
23
|
-
declare const getTokenAllowanceMulticall: (client: SDKClient, ownerAddress: Address, tokens: TokenSpender[]) => Promise<TokenAllowance[]>;
|
|
23
|
+
export declare const getTokenAllowanceMulticall: (client: SDKClient, ownerAddress: Address, tokens: TokenSpender[]) => Promise<TokenAllowance[]>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { getAllowance, getAllowanceMulticall, getTokenAllowance, getTokenAllowanceMulticall };
|
|
26
25
|
//# sourceMappingURL=getAllowance.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SDKClient, Token, TokenAmount } from "@lifi/sdk";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
//#region src/actions/getEthereumBalance.d.ts
|
|
4
|
-
declare const getEthereumBalance: (client: SDKClient, walletAddress: Address, tokens: Token[]) => Promise<TokenAmount[]>;
|
|
4
|
+
export declare const getEthereumBalance: (client: SDKClient, walletAddress: Address, tokens: Token[]) => Promise<TokenAmount[]>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getEthereumBalance };
|
|
7
6
|
//# sourceMappingURL=getEthereumBalance.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Client } from "viem";
|
|
3
3
|
//#region src/actions/getMaxPriorityFeePerGas.d.ts
|
|
4
|
-
declare const getMaxPriorityFeePerGas: (client: SDKClient, viemClient: Client) => Promise<bigint | undefined>;
|
|
4
|
+
export declare const getMaxPriorityFeePerGas: (client: SDKClient, viemClient: Client) => Promise<bigint | undefined>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getMaxPriorityFeePerGas };
|
|
7
6
|
//# sourceMappingURL=getMaxPriorityFeePerGas.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChainId, SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
//#region src/actions/getMulticallAddress.d.ts
|
|
4
|
-
declare const getMulticallAddress: (client: SDKClient, chainId: ChainId) => Promise<Address | undefined>;
|
|
4
|
+
export declare const getMulticallAddress: (client: SDKClient, chainId: ChainId) => Promise<Address | undefined>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getMulticallAddress };
|
|
7
6
|
//# sourceMappingURL=getMulticallAddress.d.ts.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Client } from "viem";
|
|
3
3
|
//#region src/actions/isBatchingSupported.d.ts
|
|
4
|
-
declare function isBatchingSupported(client: SDKClient, { client: viemClient, chainId, skipReady }: {
|
|
4
|
+
export declare function isBatchingSupported(client: SDKClient, { client: viemClient, chainId, skipReady }: {
|
|
5
5
|
client?: Client;
|
|
6
6
|
chainId: number;
|
|
7
7
|
skipReady?: boolean;
|
|
8
8
|
}): Promise<boolean>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { isBatchingSupported };
|
|
11
10
|
//# sourceMappingURL=isBatchingSupported.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
//#region src/actions/isSafeSignature.d.ts
|
|
4
|
-
interface IsSafeSignatureProps {
|
|
4
|
+
export interface IsSafeSignatureProps {
|
|
5
5
|
hash: string;
|
|
6
6
|
chainId: number;
|
|
7
7
|
address?: Address;
|
|
@@ -12,7 +12,6 @@ interface IsSafeSignatureProps {
|
|
|
12
12
|
* Safe wallets via Rabby return a signature (65 bytes = 132 chars) instead of
|
|
13
13
|
* a transaction hash (32 bytes = 66 chars) for queued transactions.
|
|
14
14
|
*/
|
|
15
|
-
declare function isSafeSignature(client: SDKClient, { hash, chainId, address }: IsSafeSignatureProps): Promise<boolean>;
|
|
15
|
+
export declare function isSafeSignature(client: SDKClient, { hash, chainId, address }: IsSafeSignatureProps): Promise<boolean>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { IsSafeSignatureProps, isSafeSignature };
|
|
18
17
|
//# sourceMappingURL=isSafeSignature.d.ts.map
|
|
@@ -11,7 +11,6 @@ type IsSafeWalletParams = {
|
|
|
11
11
|
* Check if an address is a Safe wallet via the Safe Transaction Service,
|
|
12
12
|
* short-circuiting on `eth_getCode` for EOAs (incl. EIP-7702 delegated).
|
|
13
13
|
*/
|
|
14
|
-
declare function isSafeWallet({ client, chainId, address, safeApiKey }: IsSafeWalletParams): Promise<boolean>;
|
|
14
|
+
export declare function isSafeWallet({ client, chainId, address, safeApiKey }: IsSafeWalletParams): Promise<boolean>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { isSafeWallet };
|
|
17
16
|
//# sourceMappingURL=isSafeWallet.d.ts.map
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* custom). Plain EOAs and EIP-7702 delegated EOAs (which still pay their
|
|
5
5
|
* own gas / can sign ECDSA) return false.
|
|
6
6
|
*/
|
|
7
|
-
declare const isSmartContractWalletCode: (code?: string) => boolean;
|
|
7
|
+
export declare const isSmartContractWalletCode: (code?: string) => boolean;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { isSmartContractWalletCode };
|
|
10
9
|
//# sourceMappingURL=isSmartContractWallet.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
//#region src/actions/resolveENSAddress.d.ts
|
|
3
|
-
declare const resolveENSAddress: (client: SDKClient, name: string) => Promise<string | undefined>;
|
|
3
|
+
export declare const resolveENSAddress: (client: SDKClient, name: string) => Promise<string | undefined>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { resolveENSAddress };
|
|
6
5
|
//# sourceMappingURL=resolveENSAddress.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChainId, CoinKey, SDKClient } from "@lifi/sdk";
|
|
2
2
|
//#region src/actions/resolveEthereumAddress.d.ts
|
|
3
|
-
declare function resolveEthereumAddress(name: string, client: SDKClient, chainId?: ChainId, token?: CoinKey): Promise<string | undefined>;
|
|
3
|
+
export declare function resolveEthereumAddress(name: string, client: SDKClient, chainId?: ChainId, token?: CoinKey): Promise<string | undefined>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { resolveEthereumAddress };
|
|
6
5
|
//# sourceMappingURL=resolveEthereumAddress.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Client, Hash } from "viem";
|
|
3
3
|
//#region src/actions/resolveTransactionHash.d.ts
|
|
4
|
-
declare const resolveTransactionHash: (client: SDKClient, viemClient: Client, txHashOrSignature: Hash, chainId: number) => Promise<Hash>;
|
|
4
|
+
export declare const resolveTransactionHash: (client: SDKClient, viemClient: Client, txHashOrSignature: Hash, chainId: number) => Promise<Hash>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { resolveTransactionHash };
|
|
7
6
|
//# sourceMappingURL=resolveTransactionHash.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChainId, ChainType, CoinKey, SDKClient } from "@lifi/sdk";
|
|
2
2
|
//#region src/actions/resolveUNSAddress.d.ts
|
|
3
|
-
declare const resolveUNSAddress: (client: SDKClient, name: string, chainType: ChainType, chain?: ChainId, token?: CoinKey) => Promise<string | undefined>;
|
|
3
|
+
export declare const resolveUNSAddress: (client: SDKClient, name: string, chainType: ChainType, chain?: ChainId, token?: CoinKey) => Promise<string | undefined>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { resolveUNSAddress };
|
|
6
5
|
//# sourceMappingURL=resolveUNSAddress.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { ApproveTokenRequest, RevokeApprovalRequest } from "../types.js";
|
|
|
2
2
|
import { ExecutionOptions, SDKClient } from "@lifi/sdk";
|
|
3
3
|
import { Address, Client, Hash, Hex } from "viem";
|
|
4
4
|
//#region src/actions/setAllowance.d.ts
|
|
5
|
-
declare const setAllowance: (client: SDKClient, viemClient: Client, tokenAddress: Address, contractAddress: Address, amount: bigint, executionOptions?: ExecutionOptions, returnPopulatedTransaction?: boolean) => Promise<Hash | Hex>;
|
|
5
|
+
export declare const setAllowance: (client: SDKClient, viemClient: Client, tokenAddress: Address, contractAddress: Address, amount: bigint, executionOptions?: ExecutionOptions, returnPopulatedTransaction?: boolean) => Promise<Hash | Hex>;
|
|
6
6
|
/**
|
|
7
7
|
* Set approval for a certain token and amount.
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -13,7 +13,7 @@ declare const setAllowance: (client: SDKClient, viemClient: Client, tokenAddress
|
|
|
13
13
|
* @param request.amount - The amount of tokens to approve
|
|
14
14
|
* @returns Returns Hash or nothing
|
|
15
15
|
*/
|
|
16
|
-
declare const setTokenAllowance: (client: SDKClient, { walletClient, token, spenderAddress, amount }: ApproveTokenRequest) => Promise<Hash | void>;
|
|
16
|
+
export declare const setTokenAllowance: (client: SDKClient, { walletClient, token, spenderAddress, amount }: ApproveTokenRequest) => Promise<Hash | void>;
|
|
17
17
|
/**
|
|
18
18
|
* Revoke approval for a certain token.
|
|
19
19
|
* @param client - The SDK client
|
|
@@ -23,7 +23,6 @@ declare const setTokenAllowance: (client: SDKClient, { walletClient, token, spen
|
|
|
23
23
|
* @param request.spenderAddress - The address of the spender
|
|
24
24
|
* @returns Returns Hash or nothing
|
|
25
25
|
*/
|
|
26
|
-
declare const revokeTokenApproval: (client: SDKClient, { walletClient, token, spenderAddress }: RevokeApprovalRequest) => Promise<Hash | void>;
|
|
26
|
+
export declare const revokeTokenApproval: (client: SDKClient, { walletClient, token, spenderAddress }: RevokeApprovalRequest) => Promise<Hash | void>;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { revokeTokenApproval, setAllowance, setTokenAllowance };
|
|
29
28
|
//# sourceMappingURL=setAllowance.d.ts.map
|
|
@@ -2,7 +2,6 @@ import { WalletCallReceipt as WalletCallReceipt$1 } from "../types.js";
|
|
|
2
2
|
import { Client, Hash } from "viem";
|
|
3
3
|
import { GetCallsStatusReturnType } from "viem/actions";
|
|
4
4
|
//#region src/actions/waitForBatchTransactionReceipt.d.ts
|
|
5
|
-
declare const waitForBatchTransactionReceipt: (client: Client, batchHash: Hash, onFailed?: (result: GetCallsStatusReturnType) => void) => Promise<WalletCallReceipt$1>;
|
|
5
|
+
export declare const waitForBatchTransactionReceipt: (client: Client, batchHash: Hash, onFailed?: (result: GetCallsStatusReturnType) => void) => Promise<WalletCallReceipt$1>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { waitForBatchTransactionReceipt };
|
|
8
7
|
//# sourceMappingURL=waitForBatchTransactionReceipt.d.ts.map
|
|
@@ -2,7 +2,6 @@ import { WalletCallReceipt as WalletCallReceipt$1 } from "../types.js";
|
|
|
2
2
|
import { LiFiStep, SDKClient } from "@lifi/sdk";
|
|
3
3
|
import { Hash } from "viem";
|
|
4
4
|
//#region src/actions/waitForRelayedTransactionReceipt.d.ts
|
|
5
|
-
declare const waitForRelayedTransactionReceipt: (client: SDKClient, taskId: Hash, step: LiFiStep) => Promise<WalletCallReceipt$1>;
|
|
5
|
+
export declare const waitForRelayedTransactionReceipt: (client: SDKClient, taskId: Hash, step: LiFiStep) => Promise<WalletCallReceipt$1>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { waitForRelayedTransactionReceipt };
|
|
8
7
|
//# sourceMappingURL=waitForRelayedTransactionReceipt.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Address, Hash } from "viem";
|
|
3
3
|
//#region src/actions/waitForSafeTransactionExecution.d.ts
|
|
4
|
-
interface WaitForSafeTransactionExecutionProps {
|
|
4
|
+
export interface WaitForSafeTransactionExecutionProps {
|
|
5
5
|
chainId: number;
|
|
6
6
|
safeAddress: Address;
|
|
7
7
|
signature: string;
|
|
@@ -17,7 +17,6 @@ interface WaitForSafeTransactionExecutionProps {
|
|
|
17
17
|
* @returns The on-chain transaction hash once the Safe transaction is executed.
|
|
18
18
|
* @throws {TransactionError} If the transaction fails, is replaced, or polling times out.
|
|
19
19
|
*/
|
|
20
|
-
declare function waitForSafeTransactionExecution(client: SDKClient, { chainId, safeAddress, signature, pollingInterval, timeout: timeoutMs }: WaitForSafeTransactionExecutionProps): Promise<Hash>;
|
|
20
|
+
export declare function waitForSafeTransactionExecution(client: SDKClient, { chainId, safeAddress, signature, pollingInterval, timeout: timeoutMs }: WaitForSafeTransactionExecutionProps): Promise<Hash>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { WaitForSafeTransactionExecutionProps, waitForSafeTransactionExecution };
|
|
23
22
|
//# sourceMappingURL=waitForSafeTransactionExecution.d.ts.map
|
|
@@ -7,7 +7,6 @@ interface WaitForTransactionReceiptProps {
|
|
|
7
7
|
txHash: Hash;
|
|
8
8
|
onReplaced?: (response: ReplacementReturnType<Chain | undefined>) => void;
|
|
9
9
|
}
|
|
10
|
-
declare function waitForTransactionReceipt(client: SDKClient, { client: viemClient, chainId, txHash, onReplaced }: WaitForTransactionReceiptProps): Promise<TransactionReceipt | undefined>;
|
|
10
|
+
export declare function waitForTransactionReceipt(client: SDKClient, { client: viemClient, chainId, txHash, onReplaced }: WaitForTransactionReceiptProps): Promise<TransactionReceipt | undefined>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { waitForTransactionReceipt };
|
|
13
12
|
//# sourceMappingURL=waitForTransactionReceipt.d.ts.map
|
|
@@ -7,7 +7,6 @@ import { Client } from "viem";
|
|
|
7
7
|
* @param chainId - Id of the chain the provider is for
|
|
8
8
|
* @returns The public client for the given chain
|
|
9
9
|
*/
|
|
10
|
-
declare const getPublicClient: (client: SDKClient, chainId: number) => Promise<Client>;
|
|
10
|
+
export declare const getPublicClient: (client: SDKClient, chainId: number) => Promise<Client>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { getPublicClient };
|
|
13
12
|
//# sourceMappingURL=publicClient.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafeInfo, SafeMultisigTransaction, SafeMultisigTransactionList } from "./types.js";
|
|
2
2
|
import { Address, Hash } from "viem";
|
|
3
3
|
//#region src/client/safeClient.d.ts
|
|
4
|
-
interface SafeClientInterface {
|
|
4
|
+
export interface SafeClientInterface {
|
|
5
5
|
getInfo: (address: Address) => Promise<SafeInfo>;
|
|
6
6
|
getTransaction: (safeTxHash: Hash) => Promise<SafeMultisigTransaction>;
|
|
7
7
|
getTransactions: (safeAddress: Address, options?: {
|
|
@@ -9,8 +9,7 @@ interface SafeClientInterface {
|
|
|
9
9
|
limit?: number;
|
|
10
10
|
}) => Promise<SafeMultisigTransactionList>;
|
|
11
11
|
}
|
|
12
|
-
declare const getSafeClient: (chainId: number, apiKey?: string) => SafeClientInterface;
|
|
13
|
-
type SafeClient = ReturnType<typeof getSafeClient>;
|
|
12
|
+
export declare const getSafeClient: (chainId: number, apiKey?: string) => SafeClientInterface;
|
|
13
|
+
export type SafeClient = ReturnType<typeof getSafeClient>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { SafeClient, SafeClientInterface, getSafeClient };
|
|
16
15
|
//# sourceMappingURL=safeClient.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/client/types.d.ts
|
|
2
|
-
interface SafeInfo {
|
|
2
|
+
export interface SafeInfo {
|
|
3
3
|
threshold: number;
|
|
4
4
|
owners: string[];
|
|
5
5
|
}
|
|
6
|
-
interface SafeMultisigTransaction {
|
|
6
|
+
export interface SafeMultisigTransaction {
|
|
7
7
|
safeTxHash: string;
|
|
8
8
|
nonce: number;
|
|
9
9
|
isExecuted: boolean;
|
|
@@ -13,10 +13,9 @@ interface SafeMultisigTransaction {
|
|
|
13
13
|
signature?: string;
|
|
14
14
|
}>;
|
|
15
15
|
}
|
|
16
|
-
interface SafeMultisigTransactionList {
|
|
16
|
+
export interface SafeMultisigTransactionList {
|
|
17
17
|
count: number;
|
|
18
18
|
results: SafeMultisigTransaction[];
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
|
-
export { SafeInfo, SafeMultisigTransaction, SafeMultisigTransactionList };
|
|
22
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -7,7 +7,7 @@ interface EthereumStepExecutorOptions extends StepExecutorOptions {
|
|
|
7
7
|
switchChain?: (chainId: number) => Promise<Client | undefined>;
|
|
8
8
|
disableMessageSigning?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare class EthereumStepExecutor extends BaseStepExecutor {
|
|
10
|
+
export declare class EthereumStepExecutor extends BaseStepExecutor {
|
|
11
11
|
private client;
|
|
12
12
|
private switchChain?;
|
|
13
13
|
private storage?;
|
|
@@ -20,5 +20,4 @@ declare class EthereumStepExecutor extends BaseStepExecutor {
|
|
|
20
20
|
override createPipeline: (context: EthereumStepExecutorContext) => TaskPipeline;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
export { EthereumStepExecutor };
|
|
24
23
|
//# sourceMappingURL=EthereumStepExecutor.d.ts.map
|
|
@@ -5,6 +5,7 @@ const require_core_tasks_EthereumCheckAllowanceTask = require("./tasks/EthereumC
|
|
|
5
5
|
const require_core_tasks_EthereumCheckBalanceTask = require("./tasks/EthereumCheckBalanceTask.js");
|
|
6
6
|
const require_core_tasks_EthereumCheckPermitsTask = require("./tasks/EthereumCheckPermitsTask.js");
|
|
7
7
|
const require_core_tasks_EthereumNativePermitTask = require("./tasks/EthereumNativePermitTask.js");
|
|
8
|
+
const require_core_tasks_EthereumPermit2AllowanceTask = require("./tasks/EthereumPermit2AllowanceTask.js");
|
|
8
9
|
const require_core_tasks_EthereumPrepareTransactionTask = require("./tasks/EthereumPrepareTransactionTask.js");
|
|
9
10
|
const require_core_tasks_EthereumResetAllowanceTask = require("./tasks/EthereumResetAllowanceTask.js");
|
|
10
11
|
const require_core_tasks_EthereumSetAllowanceTask = require("./tasks/EthereumSetAllowanceTask.js");
|
|
@@ -65,6 +66,7 @@ var EthereumStepExecutor = class extends _lifi_sdk.BaseStepExecutor {
|
|
|
65
66
|
new require_core_tasks_EthereumResetAllowanceTask.EthereumResetAllowanceTask(),
|
|
66
67
|
new require_core_tasks_EthereumSetAllowanceTask.EthereumSetAllowanceTask(),
|
|
67
68
|
new require_core_tasks_EthereumCheckBalanceTask.EthereumCheckBalanceTask(),
|
|
69
|
+
new require_core_tasks_EthereumPermit2AllowanceTask.EthereumPermit2AllowanceTask(),
|
|
68
70
|
new require_core_tasks_EthereumPrepareTransactionTask.EthereumPrepareTransactionTask(),
|
|
69
71
|
new require_core_tasks_EthereumSignAndExecuteTask.EthereumSignAndExecuteTask(),
|
|
70
72
|
new require_core_tasks_EthereumWaitForTransactionTask.EthereumWaitForTransactionTask(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumStepExecutor.js","names":["BaseStepExecutor","createDefaultStorage","parseEthereumErrors","switchChain","getAction","getAddresses","TransactionError","LiFiErrorCode","isZeroAddress","EthereumCheckPermitsTask","EthereumCheckAllowanceTask","EthereumNativePermitTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","EthereumCheckBalanceTask","EthereumPrepareTransactionTask","EthereumSignAndExecuteTask","EthereumWaitForTransactionTask","EthereumWaitForTransactionStatusTask","shouldCheckForAllowance","TaskPipeline"],"sources":["../../../src/core/EthereumStepExecutor.ts"],"sourcesContent":["import {\n BaseStepExecutor,\n createDefaultStorage,\n type ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n LiFiErrorCode,\n type LiFiStepExtended,\n type SDKClient,\n type SDKError,\n type SDKStorage,\n type StepExecutorBaseContext,\n type StepExecutorOptions,\n TaskPipeline,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Client, GetAddressesReturnType } from 'viem'\nimport { getAddresses } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { parseEthereumErrors } from '../errors/parseEthereumErrors.js'\nimport type { EthereumStepExecutorContext } from '../types.js'\nimport { isZeroAddress } from '../utils/isZeroAddress.js'\nimport { EthereumCheckAllowanceTask } from './tasks/EthereumCheckAllowanceTask.js'\nimport { EthereumCheckBalanceTask } from './tasks/EthereumCheckBalanceTask.js'\nimport { EthereumCheckPermitsTask } from './tasks/EthereumCheckPermitsTask.js'\nimport { EthereumNativePermitTask } from './tasks/EthereumNativePermitTask.js'\nimport { EthereumPrepareTransactionTask } from './tasks/EthereumPrepareTransactionTask.js'\nimport { EthereumResetAllowanceTask } from './tasks/EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './tasks/EthereumSetAllowanceTask.js'\nimport { EthereumSignAndExecuteTask } from './tasks/EthereumSignAndExecuteTask.js'\nimport { EthereumWaitForTransactionStatusTask } from './tasks/EthereumWaitForTransactionStatusTask.js'\nimport { EthereumWaitForTransactionTask } from './tasks/EthereumWaitForTransactionTask.js'\nimport { shouldCheckForAllowance } from './tasks/helpers/shouldCheckForAllowance.js'\nimport { switchChain } from './tasks/helpers/switchChain.js'\n\ninterface EthereumStepExecutorOptions extends StepExecutorOptions {\n client: Client\n switchChain?: (chainId: number) => Promise<Client | undefined>\n disableMessageSigning?: boolean\n}\n\nexport class EthereumStepExecutor extends BaseStepExecutor {\n private client: Client\n private switchChain?: (chainId: number) => Promise<Client | undefined>\n private storage?: SDKStorage\n private disableMessageSigning?: boolean\n\n constructor(options: EthereumStepExecutorOptions) {\n super(options)\n this.client = options.client\n this.switchChain = options.switchChain\n this.disableMessageSigning = options.disableMessageSigning\n }\n\n private getStorage = (client: SDKClient): SDKStorage => {\n if (!this.storage) {\n this.storage = client.config.storage ?? createDefaultStorage()\n }\n return this.storage\n }\n\n override parseErrors = (\n error: Error,\n step?: LiFiStepExtended,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n ): Promise<SDKError | ExecuteStepRetryError> =>\n parseEthereumErrors(error, step, action, retryParams)\n\n // Ensure that we are using the right chain and wallet when executing transactions.\n checkClient = async (\n step: LiFiStepExtended,\n targetChainId?: number\n ): Promise<Client | undefined> => {\n const updatedClient = await switchChain(\n this.client,\n targetChainId ?? step.action.fromChainId,\n this.allowUserInteraction,\n this.switchChain\n )\n if (updatedClient) {\n this.client = updatedClient\n }\n\n // Prevent execution of the quote by wallet different from the one which requested the quote\n let accountAddress = this.client.account?.address\n if (!accountAddress) {\n const accountAddresses = (await getAction(\n this.client,\n getAddresses,\n 'getAddresses'\n )(undefined)) as GetAddressesReturnType\n accountAddress = accountAddresses?.[0]\n }\n if (\n accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase()\n ) {\n throw new TransactionError(\n LiFiErrorCode.WalletChangedDuringExecution,\n 'The wallet address that requested the quote does not match the wallet address attempting to sign the transaction.'\n )\n }\n return updatedClient\n }\n\n override createContext = async (\n baseContext: StepExecutorBaseContext\n ): Promise<EthereumStepExecutorContext> => {\n const { step, fromChain } = baseContext\n\n const isFromNativeToken =\n fromChain.nativeToken.address === step.action.fromToken.address &&\n isZeroAddress(step.action.fromToken.address)\n\n // Check if message signing is disabled - useful for smart contract wallets\n // We also disable message signing for custom steps\n const disableMessageSigning =\n !!this.disableMessageSigning || step.type !== 'lifi'\n\n return {\n ...baseContext,\n isFromNativeToken,\n disableMessageSigning,\n ethereumClient: this.client,\n checkClient: this.checkClient,\n getStorage: this.getStorage,\n // Signed typed data for native permits and other messages\n signedTypedData: [],\n // Calls for atomic batch transactions (EIP-5792)\n calls: [],\n }\n }\n\n override createPipeline = (\n context: EthereumStepExecutorContext\n ): TaskPipeline => {\n const { step, isBridgeExecution, isFromNativeToken } = context\n\n const tasks = [\n new EthereumCheckPermitsTask(),\n new EthereumCheckAllowanceTask(),\n new EthereumNativePermitTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n new EthereumCheckBalanceTask(),\n new EthereumPrepareTransactionTask(),\n new EthereumSignAndExecuteTask(),\n new EthereumWaitForTransactionTask(),\n new EthereumWaitForTransactionStatusTask(),\n ]\n\n const doCheckAllowance = shouldCheckForAllowance(\n step,\n isBridgeExecution,\n isFromNativeToken,\n this.statusManager\n )\n\n let taskName: string\n if (doCheckAllowance) {\n taskName = EthereumCheckPermitsTask.name\n } else {\n const swapOrBridgeAction = this.statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n taskName =\n swapOrBridgeAction?.txHash || swapOrBridgeAction?.taskId\n ? swapOrBridgeAction?.status === 'DONE'\n ? EthereumWaitForTransactionStatusTask.name\n : EthereumWaitForTransactionTask.name\n : EthereumCheckBalanceTask.name\n }\n\n const firstTaskIndex = tasks.findIndex(\n (task) => task.constructor.name === taskName\n )\n\n const tasksToRun = tasks.slice(firstTaskIndex)\n\n return new TaskPipeline(tasksToRun)\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EthereumStepExecutor.js","names":["BaseStepExecutor","createDefaultStorage","parseEthereumErrors","switchChain","getAction","getAddresses","TransactionError","LiFiErrorCode","isZeroAddress","EthereumCheckPermitsTask","EthereumCheckAllowanceTask","EthereumNativePermitTask","EthereumResetAllowanceTask","EthereumSetAllowanceTask","EthereumCheckBalanceTask","EthereumPermit2AllowanceTask","EthereumPrepareTransactionTask","EthereumSignAndExecuteTask","EthereumWaitForTransactionTask","EthereumWaitForTransactionStatusTask","shouldCheckForAllowance","TaskPipeline"],"sources":["../../../src/core/EthereumStepExecutor.ts"],"sourcesContent":["import {\n BaseStepExecutor,\n createDefaultStorage,\n type ExecuteStepRetryError,\n type ExecuteStepRetryParams,\n type ExecutionAction,\n LiFiErrorCode,\n type LiFiStepExtended,\n type SDKClient,\n type SDKError,\n type SDKStorage,\n type StepExecutorBaseContext,\n type StepExecutorOptions,\n TaskPipeline,\n TransactionError,\n} from '@lifi/sdk'\nimport type { Client, GetAddressesReturnType } from 'viem'\nimport { getAddresses } from 'viem/actions'\nimport { getAction } from 'viem/utils'\nimport { parseEthereumErrors } from '../errors/parseEthereumErrors.js'\nimport type { EthereumStepExecutorContext } from '../types.js'\nimport { isZeroAddress } from '../utils/isZeroAddress.js'\nimport { EthereumCheckAllowanceTask } from './tasks/EthereumCheckAllowanceTask.js'\nimport { EthereumCheckBalanceTask } from './tasks/EthereumCheckBalanceTask.js'\nimport { EthereumCheckPermitsTask } from './tasks/EthereumCheckPermitsTask.js'\nimport { EthereumNativePermitTask } from './tasks/EthereumNativePermitTask.js'\nimport { EthereumPermit2AllowanceTask } from './tasks/EthereumPermit2AllowanceTask.js'\nimport { EthereumPrepareTransactionTask } from './tasks/EthereumPrepareTransactionTask.js'\nimport { EthereumResetAllowanceTask } from './tasks/EthereumResetAllowanceTask.js'\nimport { EthereumSetAllowanceTask } from './tasks/EthereumSetAllowanceTask.js'\nimport { EthereumSignAndExecuteTask } from './tasks/EthereumSignAndExecuteTask.js'\nimport { EthereumWaitForTransactionStatusTask } from './tasks/EthereumWaitForTransactionStatusTask.js'\nimport { EthereumWaitForTransactionTask } from './tasks/EthereumWaitForTransactionTask.js'\nimport { shouldCheckForAllowance } from './tasks/helpers/shouldCheckForAllowance.js'\nimport { switchChain } from './tasks/helpers/switchChain.js'\n\ninterface EthereumStepExecutorOptions extends StepExecutorOptions {\n client: Client\n switchChain?: (chainId: number) => Promise<Client | undefined>\n disableMessageSigning?: boolean\n}\n\nexport class EthereumStepExecutor extends BaseStepExecutor {\n private client: Client\n private switchChain?: (chainId: number) => Promise<Client | undefined>\n private storage?: SDKStorage\n private disableMessageSigning?: boolean\n\n constructor(options: EthereumStepExecutorOptions) {\n super(options)\n this.client = options.client\n this.switchChain = options.switchChain\n this.disableMessageSigning = options.disableMessageSigning\n }\n\n private getStorage = (client: SDKClient): SDKStorage => {\n if (!this.storage) {\n this.storage = client.config.storage ?? createDefaultStorage()\n }\n return this.storage\n }\n\n override parseErrors = (\n error: Error,\n step?: LiFiStepExtended,\n action?: ExecutionAction,\n retryParams?: ExecuteStepRetryParams\n ): Promise<SDKError | ExecuteStepRetryError> =>\n parseEthereumErrors(error, step, action, retryParams)\n\n // Ensure that we are using the right chain and wallet when executing transactions.\n checkClient = async (\n step: LiFiStepExtended,\n targetChainId?: number\n ): Promise<Client | undefined> => {\n const updatedClient = await switchChain(\n this.client,\n targetChainId ?? step.action.fromChainId,\n this.allowUserInteraction,\n this.switchChain\n )\n if (updatedClient) {\n this.client = updatedClient\n }\n\n // Prevent execution of the quote by wallet different from the one which requested the quote\n let accountAddress = this.client.account?.address\n if (!accountAddress) {\n const accountAddresses = (await getAction(\n this.client,\n getAddresses,\n 'getAddresses'\n )(undefined)) as GetAddressesReturnType\n accountAddress = accountAddresses?.[0]\n }\n if (\n accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase()\n ) {\n throw new TransactionError(\n LiFiErrorCode.WalletChangedDuringExecution,\n 'The wallet address that requested the quote does not match the wallet address attempting to sign the transaction.'\n )\n }\n return updatedClient\n }\n\n override createContext = async (\n baseContext: StepExecutorBaseContext\n ): Promise<EthereumStepExecutorContext> => {\n const { step, fromChain } = baseContext\n\n const isFromNativeToken =\n fromChain.nativeToken.address === step.action.fromToken.address &&\n isZeroAddress(step.action.fromToken.address)\n\n // Check if message signing is disabled - useful for smart contract wallets\n // We also disable message signing for custom steps\n const disableMessageSigning =\n !!this.disableMessageSigning || step.type !== 'lifi'\n\n return {\n ...baseContext,\n isFromNativeToken,\n disableMessageSigning,\n ethereumClient: this.client,\n checkClient: this.checkClient,\n getStorage: this.getStorage,\n // Signed typed data for native permits and other messages\n signedTypedData: [],\n // Calls for atomic batch transactions (EIP-5792)\n calls: [],\n }\n }\n\n override createPipeline = (\n context: EthereumStepExecutorContext\n ): TaskPipeline => {\n const { step, isBridgeExecution, isFromNativeToken } = context\n\n const tasks = [\n new EthereumCheckPermitsTask(),\n new EthereumCheckAllowanceTask(),\n new EthereumNativePermitTask(),\n new EthereumResetAllowanceTask(),\n new EthereumSetAllowanceTask(),\n new EthereumCheckBalanceTask(),\n new EthereumPermit2AllowanceTask(),\n new EthereumPrepareTransactionTask(),\n new EthereumSignAndExecuteTask(),\n new EthereumWaitForTransactionTask(),\n new EthereumWaitForTransactionStatusTask(),\n ]\n\n const doCheckAllowance = shouldCheckForAllowance(\n step,\n isBridgeExecution,\n isFromNativeToken,\n this.statusManager\n )\n\n let taskName: string\n if (doCheckAllowance) {\n taskName = EthereumCheckPermitsTask.name\n } else {\n const swapOrBridgeAction = this.statusManager.findAction(\n step,\n isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP'\n )\n taskName =\n swapOrBridgeAction?.txHash || swapOrBridgeAction?.taskId\n ? swapOrBridgeAction?.status === 'DONE'\n ? EthereumWaitForTransactionStatusTask.name\n : EthereumWaitForTransactionTask.name\n : EthereumCheckBalanceTask.name\n }\n\n const firstTaskIndex = tasks.findIndex(\n (task) => task.constructor.name === taskName\n )\n\n const tasksToRun = tasks.slice(firstTaskIndex)\n\n return new TaskPipeline(tasksToRun)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,IAAa,uBAAb,cAA0CA,UAAAA,iBAAiB;CACzD;CACA;CACA;CACA;CAEA,YAAY,SAAsC;EAChD,MAAM,OAAO;EACb,KAAK,SAAS,QAAQ;EACtB,KAAK,cAAc,QAAQ;EAC3B,KAAK,wBAAwB,QAAQ;CACvC;CAEA,cAAsB,WAAkC;EACtD,IAAI,CAAC,KAAK,SACR,KAAK,UAAU,OAAO,OAAO,YAAA,GAAWC,UAAAA,qBAAAA,CAAqB;EAE/D,OAAO,KAAK;CACd;CAEA,eACE,OACA,MACA,QACA,gBAEAC,mCAAAA,oBAAoB,OAAO,MAAM,QAAQ,WAAW;CAGtD,cAAc,OACZ,MACA,kBACgC;EAChC,MAAM,gBAAgB,MAAMC,uCAAAA,YAC1B,KAAK,QACL,iBAAiB,KAAK,OAAO,aAC7B,KAAK,sBACL,KAAK,WACP;EACA,IAAI,eACF,KAAK,SAAS;EAIhB,IAAI,iBAAiB,KAAK,OAAO,SAAS;EAC1C,IAAI,CAAC,gBAMH,kBAAiB,OAAA,GALeC,WAAAA,UAAAA,CAC9B,KAAK,QACLC,aAAAA,cACA,cACF,CAAC,CAAC,KAAA,CAAS,EAAA,GACyB;EAEtC,IACE,gBAAgB,YAAY,MAAM,KAAK,OAAO,aAAa,YAAY,GAEvE,MAAM,IAAIC,UAAAA,iBACRC,UAAAA,cAAc,8BACd,mHACF;EAEF,OAAO;CACT;CAEA,gBAAyB,OACvB,gBACyC;EACzC,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,oBACJ,UAAU,YAAY,YAAY,KAAK,OAAO,UAAU,WACxDC,4BAAAA,cAAc,KAAK,OAAO,UAAU,OAAO;EAI7C,MAAM,wBACJ,CAAC,CAAC,KAAK,yBAAyB,KAAK,SAAS;EAEhD,OAAO;GACL,GAAG;GACH;GACA;GACA,gBAAgB,KAAK;GACrB,aAAa,KAAK;GAClB,YAAY,KAAK;GAEjB,iBAAiB,CAAC;GAElB,OAAO,CAAC;EACV;CACF;CAEA,kBACE,YACiB;EACjB,MAAM,EAAE,MAAM,mBAAmB,sBAAsB;EAEvD,MAAM,QAAQ;GACZ,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,4CAAAA,yBAAyB;GAC7B,IAAIC,gDAAAA,6BAA6B;GACjC,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,8CAAAA,2BAA2B;GAC/B,IAAIC,kDAAAA,+BAA+B;GACnC,IAAIC,wDAAAA,qCAAqC;EAC3C;EAEA,MAAM,mBAAmBC,mDAAAA,wBACvB,MACA,mBACA,mBACA,KAAK,aACP;EAEA,IAAI;EACJ,IAAI,kBACF,WAAWX,4CAAAA,yBAAyB;OAC/B;GACL,MAAM,qBAAqB,KAAK,cAAc,WAC5C,MACA,oBAAoB,gBAAgB,MACtC;GACA,WACE,oBAAoB,UAAU,oBAAoB,SAC9C,oBAAoB,WAAW,SAC7BU,wDAAAA,qCAAqC,OACrCD,kDAAAA,+BAA+B,OACjCJ,4CAAAA,yBAAyB;EACjC;EAEA,MAAM,iBAAiB,MAAM,WAC1B,SAAS,KAAK,YAAY,SAAS,QACtC;EAEA,MAAM,aAAa,MAAM,MAAM,cAAc;EAE7C,OAAO,IAAIO,UAAAA,aAAa,UAAU;CACpC;AACF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { EthereumStepExecutorContext } from "../../types.js";
|
|
2
2
|
import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
|
|
3
3
|
//#region src/core/tasks/EthereumBatchedSignAndExecuteTask.d.ts
|
|
4
|
-
declare class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {
|
|
4
|
+
export declare class EthereumBatchedSignAndExecuteTask extends BaseStepExecutionTask {
|
|
5
5
|
run(context: EthereumStepExecutorContext): Promise<TaskResult>;
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
|
-
export { EthereumBatchedSignAndExecuteTask };
|
|
9
8
|
//# sourceMappingURL=EthereumBatchedSignAndExecuteTask.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { EthereumStepExecutorContext } from "../../types.js";
|
|
2
2
|
import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
|
|
3
3
|
//#region src/core/tasks/EthereumBatchedWaitForTransactionTask.d.ts
|
|
4
|
-
declare class EthereumBatchedWaitForTransactionTask extends BaseStepExecutionTask {
|
|
4
|
+
export declare class EthereumBatchedWaitForTransactionTask extends BaseStepExecutionTask {
|
|
5
5
|
run(context: EthereumStepExecutorContext): Promise<TaskResult>;
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
|
-
export { EthereumBatchedWaitForTransactionTask };
|
|
9
8
|
//# sourceMappingURL=EthereumBatchedWaitForTransactionTask.d.ts.map
|