@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/dist/cjs/utils/abi.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Abi } from "viem";
|
|
2
2
|
//#region src/utils/abi.d.ts
|
|
3
|
-
declare const permit2ProxyAbi: Abi;
|
|
4
|
-
declare const eip2612Abi: Abi;
|
|
5
|
-
declare const approveAbi: Abi;
|
|
6
|
-
declare const allowanceAbi: Abi;
|
|
7
|
-
declare const getEthBalanceAbi: Abi;
|
|
8
|
-
declare const balanceOfAbi: Abi;
|
|
3
|
+
export declare const permit2ProxyAbi: Abi;
|
|
4
|
+
export declare const eip2612Abi: Abi;
|
|
5
|
+
export declare const approveAbi: Abi;
|
|
6
|
+
export declare const allowanceAbi: Abi;
|
|
7
|
+
export declare const getEthBalanceAbi: Abi;
|
|
8
|
+
export declare const balanceOfAbi: Abi;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { allowanceAbi, approveAbi, balanceOfAbi, eip2612Abi, getEthBalanceAbi, permit2ProxyAbi };
|
|
11
10
|
//# sourceMappingURL=abi.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ExtendedChain } from "@lifi/sdk";
|
|
2
2
|
import { Chain } from "viem";
|
|
3
3
|
//#region src/utils/convertExtendedChain.d.ts
|
|
4
|
-
declare const convertExtendedChain: (chain: ExtendedChain) => Chain;
|
|
4
|
+
export declare const convertExtendedChain: (chain: ExtendedChain) => Chain;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { convertExtendedChain };
|
|
7
6
|
//# sourceMappingURL=convertExtendedChain.d.ts.map
|
|
@@ -15,9 +15,8 @@ import { Account, Chain, Client, PublicActions, RpcSchema, Transport, WalletActi
|
|
|
15
15
|
* @param params - The parameters for the action
|
|
16
16
|
* @returns The result of the action
|
|
17
17
|
*/
|
|
18
|
-
declare const getActionWithFallback: <transport extends Transport, chain extends Chain | undefined, account extends Account | undefined, rpcSchema extends RpcSchema | undefined, extended extends {
|
|
18
|
+
export declare const getActionWithFallback: <transport extends Transport, chain extends Chain | undefined, account extends Account | undefined, rpcSchema extends RpcSchema | undefined, extended extends {
|
|
19
19
|
[key: string]: unknown;
|
|
20
20
|
}, client extends Client<transport, chain, account, rpcSchema, extended>, parameters, returnType>(client: SDKClient, walletClient: client, actionFn: (_: client, parameters: parameters) => returnType, name: keyof PublicActions | keyof WalletActions | (string & {}), params: parameters) => Promise<Awaited<returnType>>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { getActionWithFallback };
|
|
23
22
|
//# sourceMappingURL=getActionWithFallback.d.ts.map
|
|
@@ -5,7 +5,6 @@ import { TypedDataDomain } from "viem";
|
|
|
5
5
|
* Extracts the chain ID from either the chainId field or the salt field.
|
|
6
6
|
* The salt is expected to be a padded hex string representation of the chainId.
|
|
7
7
|
*/
|
|
8
|
-
declare const getDomainChainId: (domain: TypedDataDomain) => number | null;
|
|
8
|
+
export declare const getDomainChainId: (domain: TypedDataDomain) => number | null;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getDomainChainId };
|
|
11
10
|
//# sourceMappingURL=getDomainChainId.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
//#region src/utils/getSafeApiKey.d.ts
|
|
3
|
-
declare function getSafeApiKey(client: SDKClient): string | undefined;
|
|
3
|
+
export declare function getSafeApiKey(client: SDKClient): string | undefined;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { getSafeApiKey };
|
|
6
5
|
//# sourceMappingURL=getSafeApiKey.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExtendedChain, LiFiStep, LiFiStepExtended, TypedData } from "@lifi/sdk";
|
|
2
|
+
//#region src/utils/getTypedDataLane.d.ts
|
|
3
|
+
/** Which execution lane one `step.typedData` entry belongs to. */
|
|
4
|
+
export type TypedDataLane = "native-permit" | "permit2-allowance" | "relayer-message";
|
|
5
|
+
export declare function getTypedDataLane(typedData: TypedData, chain: ExtendedChain): TypedDataLane;
|
|
6
|
+
/** Whether the step carries a Permit2 allowance the SDK signs for a caller's own spender. */
|
|
7
|
+
export declare function hasPermit2Allowance(step: LiFiStepExtended | LiFiStep, chain: ExtendedChain): boolean;
|
|
8
|
+
/** The step's typed-data entries that belong to `lane`. */
|
|
9
|
+
export declare function getTypedDataInLane(step: LiFiStepExtended | LiFiStep, lane: TypedDataLane, chain: ExtendedChain): TypedData[];
|
|
10
|
+
/** Whether the step still carries typed data a relayer must sign and submit. */
|
|
11
|
+
export declare function hasRelayerMessage(step: LiFiStepExtended | LiFiStep, chain: ExtendedChain): boolean;
|
|
12
|
+
/** Whether the step carries a Permit2 allowance and nothing a relayer must sign. */
|
|
13
|
+
export declare function isPermit2AllowanceLane(step: LiFiStepExtended | LiFiStep, chain: ExtendedChain): boolean;
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=getTypedDataLane.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils_isGaslessStep = require("./isGaslessStep.js");
|
|
3
|
+
//#region src/utils/getTypedDataLane.ts
|
|
4
|
+
function getTypedDataLane(typedData, chain) {
|
|
5
|
+
if (typedData.primaryType === "Permit") return "native-permit";
|
|
6
|
+
if (require_utils_isGaslessStep.isGaslessTypedData(typedData, chain)) return "relayer-message";
|
|
7
|
+
if (typedData.primaryType === "PermitSingle") return "permit2-allowance";
|
|
8
|
+
return "relayer-message";
|
|
9
|
+
}
|
|
10
|
+
/** Whether the step carries a Permit2 allowance the SDK signs for a caller's own spender. */
|
|
11
|
+
function hasPermit2Allowance(step, chain) {
|
|
12
|
+
return !!step.typedData?.some((typedData) => getTypedDataLane(typedData, chain) === "permit2-allowance");
|
|
13
|
+
}
|
|
14
|
+
/** The step's typed-data entries that belong to `lane`. */
|
|
15
|
+
function getTypedDataInLane(step, lane, chain) {
|
|
16
|
+
return step.typedData?.filter((typedData) => getTypedDataLane(typedData, chain) === lane) ?? [];
|
|
17
|
+
}
|
|
18
|
+
/** Whether the step still carries typed data a relayer must sign and submit. */
|
|
19
|
+
function hasRelayerMessage(step, chain) {
|
|
20
|
+
return !!step.typedData?.some((typedData) => getTypedDataLane(typedData, chain) === "relayer-message");
|
|
21
|
+
}
|
|
22
|
+
/** Whether the step carries a Permit2 allowance and nothing a relayer must sign. */
|
|
23
|
+
function isPermit2AllowanceLane(step, chain) {
|
|
24
|
+
return hasPermit2Allowance(step, chain) && !hasRelayerMessage(step, chain);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.getTypedDataInLane = getTypedDataInLane;
|
|
28
|
+
exports.getTypedDataLane = getTypedDataLane;
|
|
29
|
+
exports.hasPermit2Allowance = hasPermit2Allowance;
|
|
30
|
+
exports.hasRelayerMessage = hasRelayerMessage;
|
|
31
|
+
exports.isPermit2AllowanceLane = isPermit2AllowanceLane;
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=getTypedDataLane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTypedDataLane.js","names":["isGaslessTypedData"],"sources":["../../../src/utils/getTypedDataLane.ts"],"sourcesContent":["import type {\n ExtendedChain,\n LiFiStep,\n LiFiStepExtended,\n TypedData,\n} from '@lifi/sdk'\nimport { isGaslessTypedData } from './isGaslessStep.js'\n\n/** Which execution lane one `step.typedData` entry belongs to. */\nexport type TypedDataLane =\n | 'native-permit'\n | 'permit2-allowance'\n | 'relayer-message'\n\n// `chain` is required, and nothing else enforces it: `chain?` compiles and\n// every test still passes, but a relayer message then classifies as\n// `permit2-allowance` and gets signed inline. Do NOT relax it.\nexport function getTypedDataLane(\n typedData: TypedData,\n chain: ExtendedChain\n): TypedDataLane {\n // A native `Permit` is classified BEFORE the gasless rule: LI.FI's relayer\n // signs a permit whose spender is `chain.permit2`, and calling that a relayer\n // message makes a gasless step ask the user to fund an approval.\n if (typedData.primaryType === 'Permit') {\n return 'native-permit'\n }\n if (isGaslessTypedData(typedData, chain)) {\n return 'relayer-message'\n }\n if (typedData.primaryType === 'PermitSingle') {\n return 'permit2-allowance'\n }\n return 'relayer-message'\n}\n\n/** Whether the step carries a Permit2 allowance the SDK signs for a caller's own spender. */\nexport function hasPermit2Allowance(\n step: LiFiStepExtended | LiFiStep,\n chain: ExtendedChain\n): boolean {\n return !!step.typedData?.some(\n (typedData) => getTypedDataLane(typedData, chain) === 'permit2-allowance'\n )\n}\n\n/** The step's typed-data entries that belong to `lane`. */\nexport function getTypedDataInLane(\n step: LiFiStepExtended | LiFiStep,\n lane: TypedDataLane,\n chain: ExtendedChain\n): TypedData[] {\n return (\n step.typedData?.filter(\n (typedData) => getTypedDataLane(typedData, chain) === lane\n ) ?? []\n )\n}\n\n/** Whether the step still carries typed data a relayer must sign and submit. */\nexport function hasRelayerMessage(\n step: LiFiStepExtended | LiFiStep,\n chain: ExtendedChain\n): boolean {\n return !!step.typedData?.some(\n (typedData) => getTypedDataLane(typedData, chain) === 'relayer-message'\n )\n}\n\n/** Whether the step carries a Permit2 allowance and nothing a relayer must sign. */\nexport function isPermit2AllowanceLane(\n step: LiFiStepExtended | LiFiStep,\n chain: ExtendedChain\n): boolean {\n return hasPermit2Allowance(step, chain) && !hasRelayerMessage(step, chain)\n}\n"],"mappings":";;;AAiBA,SAAgB,iBACd,WACA,OACe;CAIf,IAAI,UAAU,gBAAgB,UAC5B,OAAO;CAET,IAAIA,4BAAAA,mBAAmB,WAAW,KAAK,GACrC,OAAO;CAET,IAAI,UAAU,gBAAgB,gBAC5B,OAAO;CAET,OAAO;AACT;;AAGA,SAAgB,oBACd,MACA,OACS;CACT,OAAO,CAAC,CAAC,KAAK,WAAW,MACtB,cAAc,iBAAiB,WAAW,KAAK,MAAM,mBACxD;AACF;;AAGA,SAAgB,mBACd,MACA,MACA,OACa;CACb,OACE,KAAK,WAAW,QACb,cAAc,iBAAiB,WAAW,KAAK,MAAM,IACxD,KAAK,CAAC;AAEV;;AAGA,SAAgB,kBACd,MACA,OACS;CACT,OAAO,CAAC,CAAC,KAAK,WAAW,MACtB,cAAc,iBAAiB,WAAW,KAAK,MAAM,iBACxD;AACF;;AAGA,SAAgB,uBACd,MACA,OACS;CACT,OAAO,oBAAoB,MAAM,KAAK,KAAK,CAAC,kBAAkB,MAAM,KAAK;AAC3E"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LiFiStep, LiFiStepExtended } from "@lifi/sdk";
|
|
2
2
|
//#region src/utils/isContractCallStep.d.ts
|
|
3
|
-
declare function isContractCallStep(step: LiFiStepExtended | LiFiStep): boolean;
|
|
3
|
+
export declare function isContractCallStep(step: LiFiStepExtended | LiFiStep): boolean;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { isContractCallStep };
|
|
6
5
|
//# sourceMappingURL=isContractCallStep.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ExtendedChain } from "@lifi/sdk";
|
|
2
2
|
//#region src/utils/isExtendedChain.d.ts
|
|
3
|
-
declare function isExtendedChain(chain: any): chain is ExtendedChain;
|
|
3
|
+
export declare function isExtendedChain(chain: any): chain is ExtendedChain;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { isExtendedChain };
|
|
6
5
|
//# sourceMappingURL=isExtendedChain.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RelayerStep } from "../types.js";
|
|
2
|
-
import { ExtendedChain, LiFiStep, LiFiStepExtended } from "@lifi/sdk";
|
|
2
|
+
import { ExtendedChain, LiFiStep, LiFiStepExtended, TypedData } from "@lifi/sdk";
|
|
3
3
|
//#region src/utils/isGaslessStep.d.ts
|
|
4
|
-
|
|
4
|
+
/** Whether one typed-data entry is one a relayer must sign and submit. */
|
|
5
|
+
export declare function isGaslessTypedData(typedData: TypedData, chain?: ExtendedChain): boolean;
|
|
6
|
+
export declare function isGaslessStep(step: LiFiStepExtended | LiFiStep, chain?: ExtendedChain): step is RelayerStep;
|
|
5
7
|
//#endregion
|
|
6
|
-
export { isGaslessStep };
|
|
7
8
|
//# sourceMappingURL=isGaslessStep.d.ts.map
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/utils/isGaslessStep.ts
|
|
3
|
+
/** Whether one typed-data entry is one a relayer must sign and submit. */
|
|
4
|
+
function isGaslessTypedData(typedData, chain) {
|
|
5
|
+
const spender = typedData.message?.spender;
|
|
6
|
+
return typedData.primaryType === "PermitWitnessTransferFrom" || !!chain?.permit2 && typeof spender === "string" && spender.toLowerCase() === chain.permit2.toLowerCase();
|
|
7
|
+
}
|
|
3
8
|
function isGaslessStep(step, chain) {
|
|
4
|
-
return !!step.typedData?.some((
|
|
9
|
+
return !!step.typedData?.some((typedData) => isGaslessTypedData(typedData, chain));
|
|
5
10
|
}
|
|
6
11
|
//#endregion
|
|
7
12
|
exports.isGaslessStep = isGaslessStep;
|
|
13
|
+
exports.isGaslessTypedData = isGaslessTypedData;
|
|
8
14
|
|
|
9
15
|
//# sourceMappingURL=isGaslessStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isGaslessStep.js","names":[],"sources":["../../../src/utils/isGaslessStep.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"isGaslessStep.js","names":[],"sources":["../../../src/utils/isGaslessStep.ts"],"sourcesContent":["import type {\n ExtendedChain,\n LiFiStep,\n LiFiStepExtended,\n TypedData,\n} from '@lifi/sdk'\nimport type { RelayerStep } from '../types.js'\n\n/** Whether one typed-data entry is one a relayer must sign and submit. */\nexport function isGaslessTypedData(\n typedData: TypedData,\n chain?: ExtendedChain\n): boolean {\n const spender = typedData.message?.spender\n return (\n typedData.primaryType === 'PermitWitnessTransferFrom' ||\n (!!chain?.permit2 &&\n typeof spender === 'string' &&\n spender.toLowerCase() === chain.permit2.toLowerCase())\n )\n}\n\nexport function isGaslessStep(\n step: LiFiStepExtended | LiFiStep,\n chain?: ExtendedChain\n): step is RelayerStep {\n return !!step.typedData?.some((typedData) =>\n isGaslessTypedData(typedData, chain)\n )\n}\n"],"mappings":";;;AASA,SAAgB,mBACd,WACA,OACS;CACT,MAAM,UAAU,UAAU,SAAS;CACnC,OACE,UAAU,gBAAgB,+BACzB,CAAC,CAAC,OAAO,WACR,OAAO,YAAY,YACnB,QAAQ,YAAY,MAAM,MAAM,QAAQ,YAAY;AAE1D;AAEA,SAAgB,cACd,MACA,OACqB;CACrB,OAAO,CAAC,CAAC,KAAK,WAAW,MAAM,cAC7B,mBAAmB,WAAW,KAAK,CACrC;AACF"}
|
|
@@ -7,8 +7,7 @@ import { Hex } from "viem";
|
|
|
7
7
|
* Signature length is intentionally not validated: 65-byte, EIP-2098 compact
|
|
8
8
|
* and arbitrary-length smart account (ERC-1271) signatures are all valid.
|
|
9
9
|
*/
|
|
10
|
-
declare function isValidSignature(signature: Hex | null | undefined): signature is Hex;
|
|
11
|
-
declare function assertValidSignature(signature: Hex | null | undefined): asserts signature is Hex;
|
|
10
|
+
export declare function isValidSignature(signature: Hex | null | undefined): signature is Hex;
|
|
11
|
+
export declare function assertValidSignature(signature: Hex | null | undefined): asserts signature is Hex;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { assertValidSignature, isValidSignature };
|
|
14
13
|
//# sourceMappingURL=isValidSignature.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/utils/isZeroAddress.d.ts
|
|
2
|
-
declare const AddressZero = "0x0000000000000000000000000000000000000000";
|
|
3
|
-
declare const AlternativeAddressZero = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
4
|
-
declare const isZeroAddress: (address: string) => boolean;
|
|
2
|
+
export declare const AddressZero = "0x0000000000000000000000000000000000000000";
|
|
3
|
+
export declare const AlternativeAddressZero = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
4
|
+
export declare const isZeroAddress: (address: string) => boolean;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { AddressZero, AlternativeAddressZero, isZeroAddress };
|
|
7
6
|
//# sourceMappingURL=isZeroAddress.d.ts.map
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/version.d.ts
|
|
2
|
-
declare const name = "@lifi/sdk-provider-ethereum";
|
|
3
|
-
declare const version = "4.0
|
|
2
|
+
export declare const name = "@lifi/sdk-provider-ethereum";
|
|
3
|
+
export declare const version = "4.2.0";
|
|
4
4
|
//#endregion
|
|
5
|
-
export { name, version };
|
|
6
5
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/version.ts
|
|
3
3
|
const name = "@lifi/sdk-provider-ethereum";
|
|
4
|
-
const version = "4.0
|
|
4
|
+
const version = "4.2.0";
|
|
5
5
|
//#endregion
|
|
6
6
|
exports.name = name;
|
|
7
7
|
exports.version = version;
|
package/dist/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-ethereum'\nexport const version = '4.0
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-ethereum'\nexport const version = '4.2.0'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumProvider.d.ts","names":[],"sources":["../../src/EthereumProvider.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"EthereumProvider.d.ts","names":[],"sources":["../../src/EthereumProvider.ts"],"mappings":";;wBAYgB,iBACd,UAAU,0BACT"}
|
|
@@ -4,6 +4,10 @@ import { EthereumStepExecutor } from "./core/EthereumStepExecutor.js";
|
|
|
4
4
|
import { ChainType } from "@lifi/sdk";
|
|
5
5
|
import { isAddress } from "viem";
|
|
6
6
|
//#region src/EthereumProvider.ts
|
|
7
|
+
/** The wallet format without the checksum: a pasted address keeps its case. */
|
|
8
|
+
function isEthereumTokenAddress(address) {
|
|
9
|
+
return isAddress(address, { strict: false });
|
|
10
|
+
}
|
|
7
11
|
function EthereumProvider(options) {
|
|
8
12
|
const _options = options ?? {};
|
|
9
13
|
return {
|
|
@@ -14,6 +18,7 @@ function EthereumProvider(options) {
|
|
|
14
18
|
return _options;
|
|
15
19
|
},
|
|
16
20
|
isAddress,
|
|
21
|
+
isTokenAddress: isEthereumTokenAddress,
|
|
17
22
|
resolveAddress: resolveEthereumAddress,
|
|
18
23
|
getBalance: getEthereumBalance,
|
|
19
24
|
getWalletClient: _options.getWalletClient,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumProvider.js","names":[],"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":[],"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,OAAO,UAAU,SAAS,EAAE,QAAQ,MAAM,CAAC;AAC7C;AAEA,SAAgB,iBACd,SACqB;CACrB,MAAM,WAAoC,WAAW,CAAC;CACtD,OAAO;EACL,IAAI,OAAO;GACT,OAAO,UAAU;EACnB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA;EACA,gBAAgB;EAChB,gBAAgB;EAChB,YAAY;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,IAVc,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkPermitSupport.d.ts","names":[],"sources":["../../../src/actions/checkPermitSupport.ts"],"mappings":";;;KASK;;EAEH;;EAEA;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"checkPermitSupport.d.ts","names":[],"sources":["../../../src/actions/checkPermitSupport.ts"],"mappings":";;;KASK;;EAEH;;EAEA;;;;;;;;;;;;;;;;qBAiBW,qBACX,QAAQ,aAEN,OACA,cACA,cACA;EAEA,OAAO;EACP,cAAc;EACd,cAAc;EACd;MAED,QAAQ"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/actions/constants.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/actions/constants.ts"],"mappings":";;;qBAGa,4BAA4B,eAAe;qBAK3C,qBAAsB,oBAAkB;qBAGxC;WAET;WACA;aAEI;aACA;aACA;;aAGA;aACA;aACA;;WAGJ;WACA;aAEI;aACA;aACA;;aAGA;aACA;aACA;;aAGA;aACA;aACA;;WAGJ;WACA;WACA;;WAGA;aAAW;aAAyB;aAAiB;;WACrD;WACA;aAAY;aAAsB;aAAU;;WAC5C;WACA;;qBAIS,0BAA0B,OAAO;qBASjC,wBAAwB,QAAQ,OAAO;qBAWvC,uBAAuB,OAAO"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccountCode.d.ts","names":[],"sources":["../../../src/actions/getAccountCode.ts"],"mappings":";;;KAMK;EACH,QAAQ;EACR;EACA,SAAS;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getAccountCode.d.ts","names":[],"sources":["../../../src/actions/getAccountCode.ts"],"mappings":";;;KAMK;EACH,QAAQ;EACR;EACA,SAAS;;;;;;;;;;;;;;;;;;;;qBAqBE,mBACX,QACA,SACA,WACC,yBAAuB,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllowance.d.ts","names":[],"sources":["../../../src/actions/getAllowance.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"getAllowance.d.ts","names":[],"sources":["../../../src/actions/getAllowance.ts"],"mappings":";;;;qBAca,eACX,QAAQ,WACR,YAAY,QACZ,cAAc,SACd,cAAc,SACd,gBAAgB,YACf;qBAoBU,wBACX,QAAQ,WACR,YAAY,QACZ,SAAS,SACT,QAAQ,gBACR,cAAc,YACb,QAAQ;;;;;;;;;qBA+CE,oBACX,QAAQ,WACR,OAAO,WACP,cAAc,SACd,gBAAgB,YACf;;;;;;;;qBAyBU,6BACX,QAAQ,WACR,cAAc,SACd,QAAQ,mBACP,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEthereumBalance.d.ts","names":[],"sources":["../../../src/actions/getEthereumBalance.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getEthereumBalance.d.ts","names":[],"sources":["../../../src/actions/getEthereumBalance.ts"],"mappings":";;;qBAaa,qBACX,QAAQ,WACR,eAAe,SACf,QAAQ,YACP,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMaxPriorityFeePerGas.d.ts","names":[],"sources":["../../../src/actions/getMaxPriorityFeePerGas.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getMaxPriorityFeePerGas.d.ts","names":[],"sources":["../../../src/actions/getMaxPriorityFeePerGas.ts"],"mappings":";;;qBAMa,0BACX,QAAQ,WACR,YAAY,WACX"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMulticallAddress.d.ts","names":[],"sources":["../../../src/actions/getMulticallAddress.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getMulticallAddress.d.ts","names":[],"sources":["../../../src/actions/getMulticallAddress.ts"],"mappings":";;;qBAGa,sBACX,QAAQ,WACR,SAAS,YACR,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isBatchingSupported.d.ts","names":[],"sources":["../../../src/actions/isBatchingSupported.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"isBatchingSupported.d.ts","names":[],"sources":["../../../src/actions/isBatchingSupported.ts"],"mappings":";;;wBAMsB,oBACpB,QAAQ,aAEN,QAAQ,YACR,SACA;EAEA,SAAS;EACT;EACA;IAED"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSafeSignature.d.ts","names":[],"sources":["../../../src/actions/isSafeSignature.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"isSafeSignature.d.ts","names":[],"sources":["../../../src/actions/isSafeSignature.ts"],"mappings":";;;iBAKiB;EACf;EACA;EACA,UAAU;;;;;;;;wBASU,gBACpB,QAAQ,aACN,MAAM,SAAS,WAAW,uBAC3B"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSafeWallet.d.ts","names":[],"sources":["../../../src/actions/isSafeWallet.ts"],"mappings":";;;KAUK;EACH,QAAQ;EACR;EACA,SAAS;EACT;;;;;;
|
|
1
|
+
{"version":3,"file":"isSafeWallet.d.ts","names":[],"sources":["../../../src/actions/isSafeWallet.ts"],"mappings":";;;KAUK;EACH,QAAQ;EACR;EACA,SAAS;EACT;;;;;;wBAOoB,eACpB,QACA,SACA,SACA,cACC,qBAAqB"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSmartContractWallet.d.ts","names":[],"sources":["../../../src/actions/isSmartContractWallet.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"isSmartContractWallet.d.ts","names":[],"sources":["../../../src/actions/isSmartContractWallet.ts"],"mappings":";;;;;;qBAOa,4BAA6B"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveENSAddress.d.ts","names":[],"sources":["../../../src/actions/resolveENSAddress.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolveENSAddress.d.ts","names":[],"sources":["../../../src/actions/resolveENSAddress.ts"],"mappings":";;qBAIa,oBACX,QAAQ,WACR,iBACC"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveEthereumAddress.d.ts","names":[],"sources":["../../../src/actions/resolveEthereumAddress.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolveEthereumAddress.d.ts","names":[],"sources":["../../../src/actions/resolveEthereumAddress.ts"],"mappings":";;wBASsB,uBACpB,cACA,QAAQ,WACR,UAAU,SACV,QAAQ,UACP"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveTransactionHash.d.ts","names":[],"sources":["../../../src/actions/resolveTransactionHash.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"resolveTransactionHash.d.ts","names":[],"sources":["../../../src/actions/resolveTransactionHash.ts"],"mappings":";;;qBAKa,yBACX,QAAQ,WACR,YAAY,QACZ,mBAAmB,MACnB,oBACC,QAAQ"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveUNSAddress.d.ts","names":[],"sources":["../../../src/actions/resolveUNSAddress.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolveUNSAddress.d.ts","names":[],"sources":["../../../src/actions/resolveUNSAddress.ts"],"mappings":";;qBAmBa,oBACX,QAAQ,WACR,cACA,WAAW,WACX,QAAQ,SACR,QAAQ,YACP"}
|
|
@@ -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
|