@lifi/sdk 0.0.0-preview-1b774eec → 0.0.0-preview-6fd9ec48
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 +65 -2
- package/README.md +1 -1
- package/dist/cjs/actions/getChains.d.ts +1 -4
- package/dist/cjs/actions/getChains.js +1 -2
- package/dist/cjs/actions/getConnections.d.ts +1 -4
- package/dist/cjs/actions/getConnections.js +1 -2
- package/dist/cjs/actions/getContractCallsQuote.d.ts +1 -4
- package/dist/cjs/actions/getContractCallsQuote.js +2 -3
- package/dist/cjs/actions/getGasRecommendation.d.ts +1 -4
- package/dist/cjs/actions/getGasRecommendation.js +2 -3
- package/dist/cjs/actions/getNameServiceAddress.d.ts +1 -4
- package/dist/cjs/actions/getNameServiceAddress.js +1 -2
- package/dist/cjs/actions/getQuote.d.ts +2 -5
- package/dist/cjs/actions/getQuote.js +2 -3
- package/dist/cjs/actions/getRelayedTransactionStatus.d.ts +1 -4
- package/dist/cjs/actions/getRelayedTransactionStatus.js +3 -4
- package/dist/cjs/actions/getRelayerQuote.d.ts +5 -5
- package/dist/cjs/actions/getRelayerQuote.js +5 -3
- package/dist/cjs/actions/getRelayerQuote.js.map +1 -1
- package/dist/cjs/actions/getRoutes.d.ts +2 -5
- package/dist/cjs/actions/getRoutes.js +3 -4
- package/dist/cjs/actions/getStatus.d.ts +2 -5
- package/dist/cjs/actions/getStatus.js +2 -3
- package/dist/cjs/actions/getStepTransaction.d.ts +2 -5
- package/dist/cjs/actions/getStepTransaction.js +2 -3
- package/dist/cjs/actions/getToken.d.ts +1 -4
- package/dist/cjs/actions/getToken.js +2 -3
- package/dist/cjs/actions/getTokenBalance.d.ts +1 -4
- package/dist/cjs/actions/getTokenBalance.js +1 -2
- package/dist/cjs/actions/getTokenBalances.d.ts +1 -4
- package/dist/cjs/actions/getTokenBalances.js +1 -2
- package/dist/cjs/actions/getTokenBalancesByChain.d.ts +1 -4
- package/dist/cjs/actions/getTokenBalancesByChain.js +1 -2
- package/dist/cjs/actions/getTokens.d.ts +1 -4
- package/dist/cjs/actions/getTokens.js +1 -2
- package/dist/cjs/actions/getTools.d.ts +1 -4
- package/dist/cjs/actions/getTools.js +1 -2
- package/dist/cjs/actions/getTransactionHistory.d.ts +1 -4
- package/dist/cjs/actions/getTransactionHistory.js +1 -2
- package/dist/cjs/actions/index.d.ts +4 -5
- package/dist/cjs/actions/index.js +4 -5
- package/dist/cjs/actions/index.js.map +1 -1
- package/dist/cjs/actions/patchContractCalls.d.ts +1 -4
- package/dist/cjs/actions/patchContractCalls.js +1 -2
- package/dist/cjs/actions/relayTransaction.d.ts +1 -4
- package/dist/cjs/actions/relayTransaction.js +3 -5
- package/dist/cjs/actions/relayTransaction.js.map +1 -1
- package/dist/cjs/client/createClient.d.ts +1 -4
- package/dist/cjs/client/createClient.js +2 -3
- package/dist/cjs/client/findProvider.d.ts +1 -4
- package/dist/cjs/client/findProvider.js +1 -2
- package/dist/cjs/client/getClientStorage.d.ts +1 -4
- package/dist/cjs/client/getClientStorage.js +1 -2
- package/dist/cjs/core/BaseStepExecutionTask.d.ts +1 -4
- package/dist/cjs/core/BaseStepExecutionTask.js +1 -2
- package/dist/cjs/core/BaseStepExecutor.d.ts +5 -8
- package/dist/cjs/core/BaseStepExecutor.js +22 -11
- package/dist/cjs/core/BaseStepExecutor.js.map +1 -1
- package/dist/cjs/core/StatusManager.d.ts +11 -3
- package/dist/cjs/core/StatusManager.js +108 -5
- package/dist/cjs/core/StatusManager.js.map +1 -1
- package/dist/cjs/core/TaskPipeline.d.ts +1 -4
- package/dist/cjs/core/TaskPipeline.js +1 -2
- package/dist/cjs/core/actionMessages.d.ts +1 -4
- package/dist/cjs/core/actionMessages.js +1 -2
- package/dist/cjs/core/execution.d.ts +1 -4
- package/dist/cjs/core/execution.js +31 -16
- package/dist/cjs/core/execution.js.map +1 -1
- package/dist/cjs/core/executionState.d.ts +35 -5
- package/dist/cjs/core/executionState.js +45 -3
- package/dist/cjs/core/executionState.js.map +1 -1
- package/dist/cjs/core/prepareRestart.d.ts +1 -4
- package/dist/cjs/core/prepareRestart.js +15 -8
- package/dist/cjs/core/prepareRestart.js.map +1 -1
- package/dist/cjs/core/storage.d.ts +1 -4
- package/dist/cjs/core/storage.js +1 -2
- package/dist/cjs/core/tasks/CheckBalanceTask.d.ts +1 -4
- package/dist/cjs/core/tasks/CheckBalanceTask.js +1 -2
- package/dist/cjs/core/tasks/PrepareTransactionTask.d.ts +1 -4
- package/dist/cjs/core/tasks/PrepareTransactionTask.js +2 -3
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.d.ts +1 -4
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.js +6 -5
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/checkBalance.d.ts +1 -4
- package/dist/cjs/core/tasks/helpers/checkBalance.js +2 -3
- package/dist/cjs/core/tasks/helpers/getStepStatusRequest.d.ts +7 -0
- package/dist/cjs/core/tasks/helpers/getStepStatusRequest.js +19 -0
- package/dist/cjs/core/tasks/helpers/getStepStatusRequest.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/getTransactionRequestData.d.ts +1 -4
- package/dist/cjs/core/tasks/helpers/getTransactionRequestData.js +1 -2
- package/dist/cjs/core/tasks/helpers/isKnownToStatusApi.d.ts +18 -0
- package/dist/cjs/core/tasks/helpers/isKnownToStatusApi.js +43 -0
- package/dist/cjs/core/tasks/helpers/isKnownToStatusApi.js.map +1 -0
- package/dist/cjs/core/tasks/helpers/stepComparison.d.ts +2 -5
- package/dist/cjs/core/tasks/helpers/stepComparison.js +2 -3
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.d.ts +23 -4
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.js +79 -21
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.js.map +1 -1
- package/dist/cjs/core/transactionState.d.ts +120 -0
- package/dist/cjs/core/transactionState.js +166 -0
- package/dist/cjs/core/transactionState.js.map +1 -0
- package/dist/cjs/core/utils.d.ts +1 -4
- package/dist/cjs/core/utils.js +1 -2
- package/dist/cjs/errors/SDKError.d.ts +2 -5
- package/dist/cjs/errors/SDKError.js +1 -2
- package/dist/cjs/errors/baseError.d.ts +1 -4
- package/dist/cjs/errors/baseError.js +1 -2
- package/dist/cjs/errors/constants.d.ts +3 -5
- package/dist/cjs/errors/constants.js +2 -2
- package/dist/cjs/errors/constants.js.map +1 -1
- package/dist/cjs/errors/errors.d.ts +15 -7
- package/dist/cjs/errors/errors.js +6 -4
- package/dist/cjs/errors/errors.js.map +1 -1
- package/dist/cjs/errors/httpError.d.ts +2 -4
- package/dist/cjs/errors/httpError.js +1 -2
- package/dist/cjs/errors/utils/baseErrorRootCause.d.ts +1 -4
- package/dist/cjs/errors/utils/baseErrorRootCause.js +1 -2
- package/dist/cjs/errors/utils/rootCause.d.ts +1 -4
- package/dist/cjs/errors/utils/rootCause.js +1 -2
- package/dist/cjs/index.d.ts +19 -16
- package/dist/cjs/index.js +35 -20
- package/dist/cjs/types/actions.d.ts +1 -3
- package/dist/cjs/types/core.d.ts +44 -5
- package/dist/cjs/types/execution.d.ts +10 -5
- package/dist/cjs/types/request.d.ts +1 -4
- package/dist/cjs/utils/abort.d.ts +1 -4
- package/dist/cjs/utils/abort.js +1 -2
- package/dist/cjs/utils/checkPackageUpdates.d.ts +1 -4
- package/dist/cjs/utils/checkPackageUpdates.js +2 -3
- package/dist/cjs/utils/convertQuoteToRoute.d.ts +1 -3
- package/dist/cjs/utils/convertQuoteToRoute.js +2 -3
- package/dist/cjs/utils/decode.d.ts +1 -4
- package/dist/cjs/utils/decode.js +1 -2
- package/dist/cjs/utils/fetchTxErrorDetails.d.ts +1 -4
- package/dist/cjs/utils/fetchTxErrorDetails.js +4 -2
- package/dist/cjs/utils/fetchTxErrorDetails.js.map +1 -1
- package/dist/cjs/utils/formatUnits.d.ts +1 -4
- package/dist/cjs/utils/formatUnits.js +1 -2
- package/dist/cjs/utils/getTransactionMessage.d.ts +1 -4
- package/dist/cjs/utils/getTransactionMessage.js +1 -2
- package/dist/cjs/utils/isGaslessStep.d.ts +13 -0
- package/dist/cjs/utils/isGaslessStep.js +20 -0
- package/dist/cjs/utils/isGaslessStep.js.map +1 -0
- package/dist/cjs/utils/isHex.d.ts +1 -4
- package/dist/cjs/utils/isHex.js +1 -2
- package/dist/cjs/utils/isRoutesRequest.d.ts +1 -4
- package/dist/cjs/utils/isRoutesRequest.js +1 -2
- package/dist/cjs/utils/isStep.d.ts +1 -4
- package/dist/cjs/utils/isStep.js +1 -2
- package/dist/cjs/utils/isToken.d.ts +1 -4
- package/dist/cjs/utils/isToken.js +1 -2
- package/dist/cjs/utils/lru.d.ts +1 -4
- package/dist/cjs/utils/lru.js +1 -2
- package/dist/cjs/utils/parseUnits.d.ts +1 -4
- package/dist/cjs/utils/parseUnits.js +1 -2
- package/dist/cjs/utils/request.d.ts +2 -5
- package/dist/cjs/utils/request.js +3 -4
- package/dist/cjs/utils/sleep.d.ts +1 -4
- package/dist/cjs/utils/sleep.js +1 -2
- package/dist/cjs/utils/toQueryString.d.ts +1 -4
- package/dist/cjs/utils/toQueryString.js +1 -2
- package/dist/cjs/utils/waitForResult.d.ts +3 -4
- package/dist/cjs/utils/waitForResult.js +16 -12
- package/dist/cjs/utils/waitForResult.js.map +1 -1
- package/dist/cjs/utils/withDedupe.d.ts +1 -3
- package/dist/cjs/utils/withDedupe.js +1 -2
- package/dist/cjs/utils/withDedupe.js.map +1 -1
- package/dist/cjs/utils/withTimeout.d.ts +1 -4
- package/dist/cjs/utils/withTimeout.js +1 -2
- package/dist/cjs/version.d.ts +1 -4
- package/dist/cjs/version.js +2 -3
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/actions/getChains.d.ts +0 -2
- package/dist/esm/actions/getChains.d.ts.map +1 -1
- package/dist/esm/actions/getChains.js +1 -2
- package/dist/esm/actions/getConnections.d.ts +0 -2
- package/dist/esm/actions/getConnections.d.ts.map +1 -1
- package/dist/esm/actions/getConnections.js +1 -2
- package/dist/esm/actions/getContractCallsQuote.d.ts +0 -2
- package/dist/esm/actions/getContractCallsQuote.d.ts.map +1 -1
- package/dist/esm/actions/getContractCallsQuote.js +2 -3
- package/dist/esm/actions/getGasRecommendation.d.ts +0 -2
- package/dist/esm/actions/getGasRecommendation.d.ts.map +1 -1
- package/dist/esm/actions/getGasRecommendation.js +2 -3
- package/dist/esm/actions/getNameServiceAddress.d.ts +0 -2
- package/dist/esm/actions/getNameServiceAddress.d.ts.map +1 -1
- package/dist/esm/actions/getNameServiceAddress.js +1 -2
- package/dist/esm/actions/getQuote.d.ts +1 -3
- package/dist/esm/actions/getQuote.d.ts.map +1 -1
- package/dist/esm/actions/getQuote.js +2 -3
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts +0 -2
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts.map +1 -1
- package/dist/esm/actions/getRelayedTransactionStatus.js +3 -4
- package/dist/esm/actions/getRelayerQuote.d.ts +4 -3
- package/dist/esm/actions/getRelayerQuote.d.ts.map +1 -1
- package/dist/esm/actions/getRelayerQuote.js +5 -3
- package/dist/esm/actions/getRelayerQuote.js.map +1 -1
- package/dist/esm/actions/getRoutes.d.ts +1 -3
- package/dist/esm/actions/getRoutes.d.ts.map +1 -1
- package/dist/esm/actions/getRoutes.js +3 -4
- package/dist/esm/actions/getStatus.d.ts +1 -3
- package/dist/esm/actions/getStatus.d.ts.map +1 -1
- package/dist/esm/actions/getStatus.js +2 -3
- package/dist/esm/actions/getStepTransaction.d.ts +1 -3
- package/dist/esm/actions/getStepTransaction.d.ts.map +1 -1
- package/dist/esm/actions/getStepTransaction.js +2 -3
- package/dist/esm/actions/getToken.d.ts +0 -2
- package/dist/esm/actions/getToken.d.ts.map +1 -1
- package/dist/esm/actions/getToken.js +2 -3
- package/dist/esm/actions/getTokenBalance.d.ts +0 -2
- package/dist/esm/actions/getTokenBalance.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalance.js +1 -2
- package/dist/esm/actions/getTokenBalances.d.ts +0 -2
- package/dist/esm/actions/getTokenBalances.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalances.js +1 -2
- package/dist/esm/actions/getTokenBalancesByChain.d.ts +0 -2
- package/dist/esm/actions/getTokenBalancesByChain.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalancesByChain.js +1 -2
- package/dist/esm/actions/getTokens.d.ts +0 -2
- package/dist/esm/actions/getTokens.d.ts.map +1 -1
- package/dist/esm/actions/getTokens.js +1 -2
- package/dist/esm/actions/getTools.d.ts +0 -2
- package/dist/esm/actions/getTools.d.ts.map +1 -1
- package/dist/esm/actions/getTools.js +1 -2
- package/dist/esm/actions/getTransactionHistory.d.ts +0 -2
- package/dist/esm/actions/getTransactionHistory.d.ts.map +1 -1
- package/dist/esm/actions/getTransactionHistory.js +1 -2
- package/dist/esm/actions/index.d.ts +3 -3
- package/dist/esm/actions/index.d.ts.map +1 -1
- package/dist/esm/actions/index.js +4 -5
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/actions/patchContractCalls.d.ts +0 -2
- package/dist/esm/actions/patchContractCalls.d.ts.map +1 -1
- package/dist/esm/actions/patchContractCalls.js +1 -2
- package/dist/esm/actions/relayTransaction.d.ts +0 -2
- package/dist/esm/actions/relayTransaction.d.ts.map +1 -1
- package/dist/esm/actions/relayTransaction.js +3 -5
- package/dist/esm/actions/relayTransaction.js.map +1 -1
- package/dist/esm/client/createClient.d.ts +0 -2
- package/dist/esm/client/createClient.d.ts.map +1 -1
- package/dist/esm/client/createClient.js +2 -3
- package/dist/esm/client/findProvider.d.ts +0 -2
- package/dist/esm/client/findProvider.d.ts.map +1 -1
- package/dist/esm/client/findProvider.js +1 -2
- package/dist/esm/client/getClientStorage.d.ts +0 -2
- package/dist/esm/client/getClientStorage.d.ts.map +1 -1
- package/dist/esm/client/getClientStorage.js +1 -2
- package/dist/esm/core/BaseStepExecutionTask.d.ts +0 -2
- package/dist/esm/core/BaseStepExecutionTask.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutionTask.js +1 -2
- package/dist/esm/core/BaseStepExecutor.d.ts +4 -6
- package/dist/esm/core/BaseStepExecutor.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutor.js +23 -12
- package/dist/esm/core/BaseStepExecutor.js.map +1 -1
- package/dist/esm/core/StatusManager.d.ts +11 -2
- package/dist/esm/core/StatusManager.d.ts.map +1 -1
- package/dist/esm/core/StatusManager.js +108 -5
- package/dist/esm/core/StatusManager.js.map +1 -1
- package/dist/esm/core/TaskPipeline.d.ts +0 -2
- package/dist/esm/core/TaskPipeline.d.ts.map +1 -1
- package/dist/esm/core/TaskPipeline.js +1 -2
- package/dist/esm/core/actionMessages.d.ts +0 -2
- package/dist/esm/core/actionMessages.d.ts.map +1 -1
- package/dist/esm/core/actionMessages.js +1 -2
- package/dist/esm/core/execution.d.ts +0 -2
- package/dist/esm/core/execution.d.ts.map +1 -1
- package/dist/esm/core/execution.js +31 -16
- package/dist/esm/core/execution.js.map +1 -1
- package/dist/esm/core/executionState.d.ts +35 -4
- package/dist/esm/core/executionState.d.ts.map +1 -1
- package/dist/esm/core/executionState.js +45 -3
- package/dist/esm/core/executionState.js.map +1 -1
- package/dist/esm/core/prepareRestart.d.ts +0 -2
- package/dist/esm/core/prepareRestart.d.ts.map +1 -1
- package/dist/esm/core/prepareRestart.js +15 -8
- package/dist/esm/core/prepareRestart.js.map +1 -1
- package/dist/esm/core/storage.d.ts +0 -2
- package/dist/esm/core/storage.d.ts.map +1 -1
- package/dist/esm/core/storage.js +1 -2
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts +0 -2
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/CheckBalanceTask.js +1 -2
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts +0 -2
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/PrepareTransactionTask.js +2 -3
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts +0 -2
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.js +6 -5
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.js.map +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts +0 -2
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.js +2 -3
- package/dist/esm/core/tasks/helpers/getStepStatusRequest.d.ts +8 -0
- package/dist/esm/core/tasks/helpers/getStepStatusRequest.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/getStepStatusRequest.js +18 -0
- package/dist/esm/core/tasks/helpers/getStepStatusRequest.js.map +1 -0
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts +0 -2
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.js +1 -2
- package/dist/esm/core/tasks/helpers/isKnownToStatusApi.d.ts +19 -0
- package/dist/esm/core/tasks/helpers/isKnownToStatusApi.d.ts.map +1 -0
- package/dist/esm/core/tasks/helpers/isKnownToStatusApi.js +42 -0
- package/dist/esm/core/tasks/helpers/isKnownToStatusApi.js.map +1 -0
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts +1 -3
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/stepComparison.js +2 -3
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts +23 -3
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.js +79 -22
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.js.map +1 -1
- package/dist/esm/core/transactionState.d.ts +121 -0
- package/dist/esm/core/transactionState.d.ts.map +1 -0
- package/dist/esm/core/transactionState.js +154 -0
- package/dist/esm/core/transactionState.js.map +1 -0
- package/dist/esm/core/utils.d.ts +0 -2
- package/dist/esm/core/utils.d.ts.map +1 -1
- package/dist/esm/core/utils.js +1 -2
- package/dist/esm/errors/SDKError.d.ts +1 -3
- package/dist/esm/errors/SDKError.d.ts.map +1 -1
- package/dist/esm/errors/SDKError.js +1 -2
- package/dist/esm/errors/baseError.d.ts +0 -2
- package/dist/esm/errors/baseError.d.ts.map +1 -1
- package/dist/esm/errors/baseError.js +1 -2
- package/dist/esm/errors/constants.d.ts +2 -3
- package/dist/esm/errors/constants.d.ts.map +1 -1
- package/dist/esm/errors/constants.js +2 -2
- package/dist/esm/errors/constants.js.map +1 -1
- package/dist/esm/errors/errors.d.ts +14 -5
- package/dist/esm/errors/errors.d.ts.map +1 -1
- package/dist/esm/errors/errors.js +6 -4
- package/dist/esm/errors/errors.js.map +1 -1
- package/dist/esm/errors/httpError.d.ts +2 -3
- package/dist/esm/errors/httpError.d.ts.map +1 -1
- package/dist/esm/errors/httpError.js +1 -2
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts +0 -2
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts.map +1 -1
- package/dist/esm/errors/utils/baseErrorRootCause.js +1 -2
- package/dist/esm/errors/utils/rootCause.d.ts +0 -2
- package/dist/esm/errors/utils/rootCause.d.ts.map +1 -1
- package/dist/esm/errors/utils/rootCause.js +1 -2
- package/dist/esm/index.d.ts +19 -16
- package/dist/esm/index.js +24 -21
- package/dist/esm/types/actions.d.ts +1 -2
- package/dist/esm/types/actions.d.ts.map +1 -1
- package/dist/esm/types/core.d.ts +43 -3
- package/dist/esm/types/core.d.ts.map +1 -1
- package/dist/esm/types/execution.d.ts +9 -3
- package/dist/esm/types/execution.d.ts.map +1 -1
- package/dist/esm/types/request.d.ts +0 -2
- package/dist/esm/types/request.d.ts.map +1 -1
- package/dist/esm/utils/abort.d.ts +0 -2
- package/dist/esm/utils/abort.d.ts.map +1 -1
- package/dist/esm/utils/abort.js +1 -2
- package/dist/esm/utils/checkPackageUpdates.d.ts +0 -2
- package/dist/esm/utils/checkPackageUpdates.d.ts.map +1 -1
- package/dist/esm/utils/checkPackageUpdates.js +2 -3
- package/dist/esm/utils/convertQuoteToRoute.d.ts +1 -2
- package/dist/esm/utils/convertQuoteToRoute.d.ts.map +1 -1
- package/dist/esm/utils/convertQuoteToRoute.js +2 -3
- package/dist/esm/utils/decode.d.ts +0 -2
- package/dist/esm/utils/decode.d.ts.map +1 -1
- package/dist/esm/utils/decode.js +1 -2
- package/dist/esm/utils/fetchTxErrorDetails.d.ts +0 -2
- package/dist/esm/utils/fetchTxErrorDetails.d.ts.map +1 -1
- package/dist/esm/utils/fetchTxErrorDetails.js +4 -2
- package/dist/esm/utils/fetchTxErrorDetails.js.map +1 -1
- package/dist/esm/utils/formatUnits.d.ts +0 -2
- package/dist/esm/utils/formatUnits.d.ts.map +1 -1
- package/dist/esm/utils/formatUnits.js +1 -2
- package/dist/esm/utils/getTransactionMessage.d.ts +0 -2
- package/dist/esm/utils/getTransactionMessage.d.ts.map +1 -1
- package/dist/esm/utils/getTransactionMessage.js +1 -2
- package/dist/esm/utils/isGaslessStep.d.ts +14 -0
- package/dist/esm/utils/isGaslessStep.d.ts.map +1 -0
- package/dist/esm/utils/isGaslessStep.js +18 -0
- package/dist/esm/utils/isGaslessStep.js.map +1 -0
- package/dist/esm/utils/isHex.d.ts +0 -2
- package/dist/esm/utils/isHex.d.ts.map +1 -1
- package/dist/esm/utils/isHex.js +1 -2
- package/dist/esm/utils/isRoutesRequest.d.ts +0 -2
- package/dist/esm/utils/isRoutesRequest.d.ts.map +1 -1
- package/dist/esm/utils/isRoutesRequest.js +1 -2
- package/dist/esm/utils/isStep.d.ts +0 -2
- package/dist/esm/utils/isStep.d.ts.map +1 -1
- package/dist/esm/utils/isStep.js +1 -2
- package/dist/esm/utils/isToken.d.ts +0 -2
- package/dist/esm/utils/isToken.d.ts.map +1 -1
- package/dist/esm/utils/isToken.js +1 -2
- package/dist/esm/utils/lru.d.ts +0 -2
- package/dist/esm/utils/lru.d.ts.map +1 -1
- package/dist/esm/utils/lru.js +1 -2
- package/dist/esm/utils/parseUnits.d.ts +0 -2
- package/dist/esm/utils/parseUnits.d.ts.map +1 -1
- package/dist/esm/utils/parseUnits.js +1 -2
- package/dist/esm/utils/request.d.ts +1 -3
- package/dist/esm/utils/request.d.ts.map +1 -1
- package/dist/esm/utils/request.js +3 -4
- package/dist/esm/utils/sleep.d.ts +0 -2
- package/dist/esm/utils/sleep.d.ts.map +1 -1
- package/dist/esm/utils/sleep.js +1 -2
- package/dist/esm/utils/toQueryString.d.ts +0 -2
- package/dist/esm/utils/toQueryString.d.ts.map +1 -1
- package/dist/esm/utils/toQueryString.js +1 -2
- package/dist/esm/utils/waitForResult.d.ts +3 -3
- package/dist/esm/utils/waitForResult.d.ts.map +1 -1
- package/dist/esm/utils/waitForResult.js +16 -12
- package/dist/esm/utils/waitForResult.js.map +1 -1
- package/dist/esm/utils/withDedupe.d.ts +1 -2
- package/dist/esm/utils/withDedupe.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.js +1 -2
- package/dist/esm/utils/withTimeout.d.ts +0 -2
- package/dist/esm/utils/withTimeout.d.ts.map +1 -1
- package/dist/esm/utils/withTimeout.js +1 -2
- package/dist/esm/version.d.ts +1 -3
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +2 -3
- package/dist/esm/version.js.map +1 -1
- package/package.json +2 -2
- package/src/actions/getRelayerQuote.ts +3 -0
- package/src/actions/index.ts +2 -0
- package/src/actions/relayTransaction.ts +1 -9
- package/src/core/BaseStepExecutor.ts +40 -6
- package/src/core/StatusManager.ts +214 -2
- package/src/core/execution.ts +69 -20
- package/src/core/executionState.ts +84 -1
- package/src/core/prepareRestart.ts +29 -13
- package/src/core/tasks/WaitForTransactionStatusTask.ts +10 -1
- package/src/core/tasks/helpers/getStepStatusRequest.ts +20 -0
- package/src/core/tasks/helpers/isKnownToStatusApi.ts +57 -0
- package/src/core/tasks/helpers/waitForTransactionStatus.ts +128 -17
- package/src/core/transactionState.ts +200 -0
- package/src/errors/constants.ts +1 -0
- package/src/errors/errors.ts +21 -2
- package/src/index.ts +17 -0
- package/src/types/core.ts +44 -1
- package/src/types/execution.ts +8 -0
- package/src/utils/fetchTxErrorDetails.ts +16 -0
- package/src/utils/isGaslessStep.ts +21 -0
- package/src/utils/waitForResult.ts +16 -6
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,76 @@
|
|
|
1
1
|
# @lifi/sdk
|
|
2
2
|
|
|
3
|
-
## 0.0.0-preview-
|
|
3
|
+
## 0.0.0-preview-6fd9ec48
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#548](https://github.com/lifinance/sdk/pull/548) [`de384d3`](https://github.com/lifinance/sdk/commit/de384d3fffbe0f87f73f268529b8f528cf2c4a8b) Thanks [@chybisov](https://github.com/chybisov)! - Support the new LI.FI gasless flow and remove the legacy gasless service.
|
|
8
|
+
|
|
9
|
+
A gasless route is requested with `options.gasless: true`. Its step is marked by the `LIFI Gasless Relay Fee` entry in `estimate.feeCosts`. The new `isGaslessStep(step)` in `@lifi/sdk` checks for this marker, and `GASLESS_RELAY_FEE_NAME` holds its name.
|
|
10
|
+
|
|
11
|
+
For a gasless step, the EVM provider now does the following:
|
|
12
|
+
|
|
13
|
+
- It executes the step through the relayer from the start.
|
|
14
|
+
- It does not check native gas, does not approve, and does not sign its own permit. The relayer pays the gas, and the backend handles the allowance.
|
|
15
|
+
- It re-quotes through `/advanced/stepTransaction` without the old typed data.
|
|
16
|
+
- It relays every typed-data step through `/advanced/relay`, including `PermitWitnessTransferFrom`.
|
|
17
|
+
- It tracks the relay on `/v1/status?taskId=`. Other relayed steps keep `getRelayedTransactionStatus`.
|
|
18
|
+
- It fails before signing when `disableMessageSigning` is set, or when the step needs an EIP-7702 authorization.
|
|
19
|
+
|
|
20
|
+
Deprecated (still exported, so that published consumers keep building):
|
|
21
|
+
|
|
22
|
+
- `getRelayerQuote` in `@lifi/sdk` and in the client actions. The legacy relayer endpoint is shut down. Use `getRoutes` with `options.gasless: true`.
|
|
23
|
+
- `isGaslessStep(step, chain)` in `@lifi/sdk-provider-ethereum`. It detects only the legacy typed data. Use `isGaslessStep(step)` from `@lifi/sdk`.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [#539](https://github.com/lifinance/sdk/pull/539) [`b80e5f4`](https://github.com/lifinance/sdk/commit/b80e5f49941190812935644c55d5c9c075bac354) Thanks [@chybisov](https://github.com/chybisov)! - Bump runtime dependencies: @lifi/types to 18.16.0, bitcoinjs-lib to 7.0.5, viem to 2.57.17, @solana/kit to 8.6.0, @stellar/stellar-sdk to 17.4.0, @mysten/sui to 2.39.1.
|
|
28
|
+
|
|
29
|
+
## 4.12.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#516](https://github.com/lifinance/sdk/pull/516) [`07cc186`](https://github.com/lifinance/sdk/commit/07cc1869a6966980ce2226036f8b441ce68f0a36) Thanks [@chybisov](https://github.com/chybisov)! - `fetchTxErrorDetails` now checks its input before it calls Tenderly. If `txHash` is not a 32-byte hex hash, or `chainId` is not a positive safe integer, it returns `undefined` and sends no request.
|
|
34
|
+
|
|
35
|
+
## 4.12.0
|
|
36
|
+
|
|
37
|
+
### Minor Changes
|
|
38
|
+
|
|
39
|
+
- [#514](https://github.com/lifinance/sdk/pull/514) [`5dc9cc5`](https://github.com/lifinance/sdk/commit/5dc9cc5f52b0308962b822cfacd766dbf27bab3c) Thanks [@chybisov](https://github.com/chybisov)! - `LiFiErrorCode` has a new code, `CallBundleNotFound` (1028). A step fails with this code when the wallet has no record of an EIP-5792 bundle. The SDK uses it only when it cannot prove that the wallet did not send the bundle. The outcome stays unknown: the action keeps the bundle id, and a resume waits for the bundle again and does not sign.
|
|
40
|
+
|
|
41
|
+
`ExecutionAction` has a new optional field, `callCount`. It is the number of calls of a batched (EIP-5792) transaction. The Ethereum provider sets it together with `taskId` for a batched transaction.
|
|
42
|
+
|
|
43
|
+
## 4.11.0
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- [#492](https://github.com/lifinance/sdk/pull/492) [`48af3ae`](https://github.com/lifinance/sdk/commit/48af3aeb250299ef9d2ff9eb79a38a6b8f52d409) Thanks [@chybisov](https://github.com/chybisov)! - `SDKProvider.isAddress` accepts an optional `chainId`. Without it, a provider answers as before. With it, a provider whose chains use different address formats accepts only that chain's format and refuses a chain it does not know. A provider must never forward the chain ID to a library function whose second parameter means something else. A custom provider that assigns such a function directly as `isAddress`, for example viem's `isAddress` or bigmi's `isUTXOAddress`, no longer type-checks; wrap it in a one-argument function, as `EthereumProvider` and `BitcoinProvider` do.
|
|
8
48
|
|
|
9
49
|
A provider can declare the `chainIds` it serves, so a chain-specific provider can sit beside the generic provider of the same chain type. `client.getProvider(type, chainId?)` returns the provider that lists the chain, otherwise the provider of that type that lists no chains; `getProvider(type)` answers as before. The new `findProvider(providers, chainType, chainId?)` applies the same rule to any provider list. `setProviders` replaces only a provider with the same type and the same `chainIds`.
|
|
10
50
|
|
|
51
|
+
- [#507](https://github.com/lifinance/sdk/pull/507) [`14f4ecc`](https://github.com/lifinance/sdk/commit/14f4ecc2714799449d57b61ff06b040df505184e) Thanks [@chybisov](https://github.com/chybisov)! - Never sign a second transaction on resume while the first one may still land.
|
|
52
|
+
|
|
53
|
+
- `prepareRestart` keeps a FAILED action with an unknown outcome and re-checks it on chain. Only a final outcome is dropped, so "Try again" signs anew.
|
|
54
|
+
- After `stopRouteExecution`, `updateRouteHook` can still be called for a route whose task was running, but only for a write that changes `txHash`, `txHex`, `taskId` or `txFinal`. An integrator that deleted the route should ignore that call. An error the hook throws in such a late call does not reach the run; in development it is logged with `console.debug`. If a new execution of the same route is running, a late transaction that may still land is merged into its action instead, so it does not sign again unless its wallet call has already started. If a newer execution already ended, the late transaction is merged into the route of the last ended execution, and that execution's `updateRouteHook` is called.
|
|
55
|
+
- The new `ExecutionAction.txFinal` flags a final outcome.
|
|
56
|
+
- `TransactionError` takes a new `final` option. Every `TransactionError` now has an own `final` property (`false` unless set), which changes its JSON shape.
|
|
57
|
+
- `resumeRoute` no longer mutates the route it is given. A restart keeps `execution.signedAt` while a transaction is open.
|
|
58
|
+
- In the EVM relayed lane and in the Solana, Sui, Tron, Bitcoin and Stellar providers, the SDK sends the transaction and checks the action again after the wallet returns. A prompt that was already open can still be signed, but when the late transaction merged first, those bytes are never sent or stored. A caught merge makes the newer run fail with `TransactionConflict`, and "Try again" then resumes and waits for the transaction. A step that asks for a replay (`ExecuteStepRetryError`) after such a merge also fails with `TransactionConflict`.
|
|
59
|
+
- An older run no longer stops or ends a newer execution of the same route.
|
|
60
|
+
- After `stopRouteExecution`, a run that waits for `/status` stops polling. Before, it polled every few seconds until the API answered DONE, and forever on FAILED, INVALID, NOT_FOUND or HTTP/network errors. The wait ends at once without a write to the route, so the step stays PENDING, and the run's `executeRoute` promise resolves with the route. A resume waits for the outcome of the same transaction.
|
|
61
|
+
- A stop during the first attempt of a step that then asks for a replay (`ExecuteStepRetryError`) also ends the run. The step does not run again, so the replay's re-quote, chain reads and integrator callbacks do not run after the stop, and `executeRoute` resolves with the route.
|
|
62
|
+
- `waitForResult` and `StepExecutor.executeStep` take an optional `signal`. Provider authors get it as `StepExecutorBaseContext.signal`, which aborts on `stopRouteExecution`. Give it only to a wait that starts after the transaction is broadcast, never to a sign, send or wallet call.
|
|
63
|
+
- New `hasOpenTransaction`. `assertNoOpenTransaction`, `isKnownToStatusApi`, `isFinalTransactionError`, `isResendAllowed`, `isOldEnoughToDrop`, `CLEARED_TRANSACTION_FIELDS`, `MAX_RESEND_AGE_MS`, `DROPPED_FALLBACK_AGE_MS` and `CLOCK_SKEW_MARGIN_MS` are exported for provider packages; they are not part of the integrator API (`@internal`).
|
|
64
|
+
- Remaining limits:
|
|
65
|
+
- In the lanes where the SDK sends, if the newer prompt is approved before the older run stores its transaction (in the EVM relayed lane, before the older run's relay request returns), nothing is merged yet, and both transactions can be sent.
|
|
66
|
+
- In the EVM standard and batched lanes the wallet sends, so a wallet call that has already started can still send a second transaction.
|
|
67
|
+
- A FAILED route from before the upgrade, or one resumed after node history no longer covers its signing time, can stay unknown. The exit is to delete the route.
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- [#510](https://github.com/lifinance/sdk/pull/510) [`bb964c0`](https://github.com/lifinance/sdk/commit/bb964c03d8ea1770303ab1bba803373a80e6388f) Thanks [@chybisov](https://github.com/chybisov)! - Bump runtime dependencies: viem to 2.57.3, @stellar/stellar-sdk to 17.2.1,
|
|
72
|
+
@mysten/sui to 2.35.0, @lifi/types to 18.13.0 and @bigmi/core to 0.9.3.
|
|
73
|
+
|
|
11
74
|
## 4.10.0
|
|
12
75
|
|
|
13
76
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ xBull, or Lobstr, we recommend
|
|
|
88
88
|
pnpm add @lifi/sdk-provider-zcash
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
ZEC is a destination-only chain: `ZcashProvider` validates transparent `t1` and `t3` receivers and needs no wallet. Register it after `BitcoinProvider`; it serves ZEC only.
|
|
91
|
+
ZEC is a destination-only chain: `ZcashProvider` validates transparent `t1` and `t3` receivers, and unified `u1` receivers that carry an Orchard receiver, and needs no wallet. Register it after `BitcoinProvider`; it serves ZEC only.
|
|
92
92
|
|
|
93
93
|
## Architecture
|
|
94
94
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKBaseConfig, SDKClient } from "../types/core.js";
|
|
2
2
|
import { ChainsRequest, ExtendedChain, RequestOptions } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getChains.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get all available chains
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -10,6 +9,4 @@ import { ChainsRequest, ExtendedChain, RequestOptions } from "@lifi/types";
|
|
|
10
9
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
11
10
|
*/
|
|
12
11
|
export declare const getChains: (client: SDKClient, params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
|
|
13
|
-
export declare const _getChains: (config: SDKBaseConfig, params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getChains.d.ts.map
|
|
12
|
+
export declare const _getChains: (config: SDKBaseConfig, params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
3
|
const require_utils_request = require("../utils/request.js");
|
|
4
4
|
const require_utils_withDedupe = require("../utils/withDedupe.js");
|
|
5
|
-
|
|
5
|
+
// src/actions/getChains.ts
|
|
6
6
|
/**
|
|
7
7
|
* Get all available chains
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -27,7 +27,6 @@ const _getChains = async (config, params, options) => {
|
|
|
27
27
|
throw error instanceof require_errors_SDKError.SDKError ? error : new require_errors_SDKError.SDKError(error);
|
|
28
28
|
})).chains;
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
exports._getChains = _getChains;
|
|
32
31
|
exports.getChains = getChains;
|
|
33
32
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { ConnectionsRequest, ConnectionsResponse, RequestOptions } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getConnections.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get all the available connections for swap/bridging tokens
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -8,6 +7,4 @@ import { ConnectionsRequest, ConnectionsResponse, RequestOptions } from "@lifi/t
|
|
|
8
7
|
* @param options - Request options
|
|
9
8
|
* @returns ConnectionsResponse
|
|
10
9
|
*/
|
|
11
|
-
export declare const getConnections: (client: SDKClient, connectionRequest: ConnectionsRequest, options?: RequestOptions) => Promise<ConnectionsResponse>;
|
|
12
|
-
//#endregion
|
|
13
|
-
//# sourceMappingURL=getConnections.d.ts.map
|
|
10
|
+
export declare const getConnections: (client: SDKClient, connectionRequest: ConnectionsRequest, options?: RequestOptions) => Promise<ConnectionsResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_utils_request = require("../utils/request.js");
|
|
3
|
-
|
|
3
|
+
// src/actions/getConnections.ts
|
|
4
4
|
/**
|
|
5
5
|
* Get all the available connections for swap/bridging tokens
|
|
6
6
|
* @param client - The SDK client
|
|
@@ -28,7 +28,6 @@ const getConnections = async (client, connectionRequest, options) => {
|
|
|
28
28
|
}
|
|
29
29
|
return await require_utils_request.request(client.config, url, options);
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
exports.getConnections = getConnections;
|
|
33
32
|
|
|
34
33
|
//# sourceMappingURL=getConnections.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { ContractCallsQuoteRequest, LiFiStep, RequestOptions } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getContractCallsQuote.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get a quote for a destination contract call
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -9,6 +8,4 @@ import { ContractCallsQuoteRequest, LiFiStep, RequestOptions } from "@lifi/types
|
|
|
9
8
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
10
9
|
* @returns - Returns step.
|
|
11
10
|
*/
|
|
12
|
-
export declare const getContractCallsQuote: (client: SDKClient, params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
13
|
-
//#endregion
|
|
14
|
-
//# sourceMappingURL=getContractCallsQuote.d.ts.map
|
|
11
|
+
export declare const getContractCallsQuote: (client: SDKClient, params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
4
4
|
const require_utils_request = require("../utils/request.js");
|
|
5
5
|
let _lifi_types = require("@lifi/types");
|
|
6
|
-
|
|
6
|
+
// src/actions/getContractCallsQuote.ts
|
|
7
7
|
/**
|
|
8
8
|
* Get a quote for a destination contract call
|
|
9
9
|
* @param client - The SDK client
|
|
@@ -39,7 +39,6 @@ const getContractCallsQuote = async (client, params, options) => {
|
|
|
39
39
|
signal: options?.signal
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
exports.getContractCallsQuote = getContractCallsQuote;
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=getContractCallsQuote.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { GasRecommendationRequest, GasRecommendationResponse, RequestOptions } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getGasRecommendation.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get gas recommendation for a certain chain
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -9,6 +8,4 @@ import { GasRecommendationRequest, GasRecommendationResponse, RequestOptions } f
|
|
|
9
8
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
10
9
|
* @returns Gas recommendation response.
|
|
11
10
|
*/
|
|
12
|
-
export declare const getGasRecommendation: (client: SDKClient, params: GasRecommendationRequest, options?: RequestOptions) => Promise<GasRecommendationResponse>;
|
|
13
|
-
//#endregion
|
|
14
|
-
//# sourceMappingURL=getGasRecommendation.d.ts.map
|
|
11
|
+
export declare const getGasRecommendation: (client: SDKClient, params: GasRecommendationRequest, options?: RequestOptions) => Promise<GasRecommendationResponse>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
4
4
|
const require_utils_request = require("../utils/request.js");
|
|
5
|
-
|
|
5
|
+
// src/actions/getGasRecommendation.ts
|
|
6
6
|
/**
|
|
7
7
|
* Get gas recommendation for a certain chain
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -18,7 +18,6 @@ const getGasRecommendation = async (client, params, options) => {
|
|
|
18
18
|
if (params.fromToken) url.searchParams.append("fromToken", params.fromToken);
|
|
19
19
|
return await require_utils_request.request(client.config, url.toString(), { signal: options?.signal });
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
exports.getGasRecommendation = getGasRecommendation;
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=getGasRecommendation.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { ChainType } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getNameServiceAddress.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get the address of a name service
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -8,6 +7,4 @@ import { ChainType } from "@lifi/types";
|
|
|
8
7
|
* @param chainType - The chain type to resolve the name on
|
|
9
8
|
* @returns The address of the name service
|
|
10
9
|
*/
|
|
11
|
-
export declare const getNameServiceAddress: (client: SDKClient, name: string, chainType?: ChainType) => Promise<string | undefined>;
|
|
12
|
-
//#endregion
|
|
13
|
-
//# sourceMappingURL=getNameServiceAddress.d.ts.map
|
|
10
|
+
export declare const getNameServiceAddress: (client: SDKClient, name: string, chainType?: ChainType) => Promise<string | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/actions/getNameServiceAddress.ts
|
|
3
3
|
/**
|
|
4
4
|
* Get the address of a name service
|
|
5
5
|
* @param client - The SDK client
|
|
@@ -23,7 +23,6 @@ const getNameServiceAddress = async (client, name, chainType) => {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
exports.getNameServiceAddress = getNameServiceAddress;
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=getNameServiceAddress.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SDKClient } from "../types/core.js";
|
|
2
1
|
import { QuoteRequestFromAmount, QuoteRequestToAmount } from "../types/actions.js";
|
|
2
|
+
import { SDKClient } from "../types/core.js";
|
|
3
3
|
import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
4
|
-
//#region src/actions/getQuote.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get a quote for a token transfer
|
|
7
6
|
* @param client - The SDK client
|
|
@@ -11,6 +10,4 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
11
10
|
* @returns Quote for a token transfer
|
|
12
11
|
*/
|
|
13
12
|
export declare function getQuote(client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions): Promise<LiFiStep>;
|
|
14
|
-
export declare function getQuote(client: SDKClient, params: QuoteRequestToAmount, options?: RequestOptions): Promise<LiFiStep>;
|
|
15
|
-
//#endregion
|
|
16
|
-
//# sourceMappingURL=getQuote.d.ts.map
|
|
13
|
+
export declare function getQuote(client: SDKClient, params: QuoteRequestToAmount, options?: RequestOptions): Promise<LiFiStep>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
4
4
|
const require_utils_request = require("../utils/request.js");
|
|
5
5
|
const require_utils_toQueryString = require("../utils/toQueryString.js");
|
|
6
|
-
|
|
6
|
+
// src/actions/getQuote.ts
|
|
7
7
|
async function getQuote(client, params, options) {
|
|
8
8
|
for (const requiredParameter of [
|
|
9
9
|
"fromChain",
|
|
@@ -30,7 +30,6 @@ async function getQuote(client, params, options) {
|
|
|
30
30
|
for (const key of Object.keys(params)) if (params[key] === void 0 || params[key] === null) delete params[key];
|
|
31
31
|
return await require_utils_request.request(client.config, `${client.config.apiUrl}/${isFromAmountRequest ? "quote" : "quote/toAmount"}?${require_utils_toQueryString.toQueryString(params)}`, { signal: options?.signal });
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
exports.getQuote = getQuote;
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=getQuote.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { RelayStatusRequest, RelayStatusResponseData, RequestOptions } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getRelayedTransactionStatus.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Get the status of a relayed transaction
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -9,6 +8,4 @@ import { RelayStatusRequest, RelayStatusResponseData, RequestOptions } from "@li
|
|
|
9
8
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
10
9
|
* @returns Status of the relayed transaction
|
|
11
10
|
*/
|
|
12
|
-
export declare const getRelayedTransactionStatus: (client: SDKClient, params: RelayStatusRequest, options?: RequestOptions) => Promise<RelayStatusResponseData>;
|
|
13
|
-
//#endregion
|
|
14
|
-
//# sourceMappingURL=getRelayedTransactionStatus.d.ts.map
|
|
11
|
+
export declare const getRelayedTransactionStatus: (client: SDKClient, params: RelayStatusRequest, options?: RequestOptions) => Promise<RelayStatusResponseData>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_baseError = require("../errors/baseError.js");
|
|
4
3
|
require("../errors/constants.js");
|
|
5
4
|
const require_errors_errors = require("../errors/errors.js");
|
|
6
|
-
const
|
|
5
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
7
6
|
const require_utils_decode = require("../utils/decode.js");
|
|
7
|
+
const require_utils_request = require("../utils/request.js");
|
|
8
8
|
const require_actions_getStatus = require("./getStatus.js");
|
|
9
|
-
|
|
9
|
+
// src/actions/getRelayedTransactionStatus.ts
|
|
10
10
|
/**
|
|
11
11
|
* Get the status of a relayed transaction
|
|
12
12
|
* @param client - The SDK client
|
|
@@ -24,7 +24,6 @@ const getRelayedTransactionStatus = async (client, params, options) => {
|
|
|
24
24
|
if (result.status === "error") throw new require_errors_baseError.BaseError("ServerError", result.data.code, result.data.message);
|
|
25
25
|
return result.data;
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.getRelayedTransactionStatus = getRelayedTransactionStatus;
|
|
29
28
|
|
|
30
29
|
//# sourceMappingURL=getRelayedTransactionStatus.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SDKClient } from "../types/core.js";
|
|
2
1
|
import { QuoteRequestFromAmount } from "../types/actions.js";
|
|
2
|
+
import { SDKClient } from "../types/core.js";
|
|
3
3
|
import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
4
|
-
//#region src/actions/getRelayerQuote.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get a relayer quote for a token transfer
|
|
7
6
|
* @param client - The SDK client
|
|
@@ -9,7 +8,8 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
9
8
|
* @param options - Request options
|
|
10
9
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
10
|
* @returns Relayer quote for a token transfer
|
|
11
|
+
* @deprecated The legacy gasless relayer service is shut down. Request
|
|
12
|
+
* gasless routes with `options.gasless: true` on `getRoutes`, or
|
|
13
|
+
* `gasless: true` on `getQuote`, and detect them with `isGaslessStep`.
|
|
12
14
|
*/
|
|
13
|
-
export declare const getRelayerQuote: (client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions) => Promise<LiFiStep>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getRelayerQuote.d.ts.map
|
|
15
|
+
export declare const getRelayerQuote: (client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions) => Promise<LiFiStep>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_baseError = require("../errors/baseError.js");
|
|
4
3
|
require("../errors/constants.js");
|
|
5
4
|
const require_errors_errors = require("../errors/errors.js");
|
|
5
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
6
6
|
const require_utils_request = require("../utils/request.js");
|
|
7
|
-
|
|
7
|
+
// src/actions/getRelayerQuote.ts
|
|
8
8
|
/**
|
|
9
9
|
* Get a relayer quote for a token transfer
|
|
10
10
|
* @param client - The SDK client
|
|
@@ -12,6 +12,9 @@ const require_utils_request = require("../utils/request.js");
|
|
|
12
12
|
* @param options - Request options
|
|
13
13
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
14
14
|
* @returns Relayer quote for a token transfer
|
|
15
|
+
* @deprecated The legacy gasless relayer service is shut down. Request
|
|
16
|
+
* gasless routes with `options.gasless: true` on `getRoutes`, or
|
|
17
|
+
* `gasless: true` on `getQuote`, and detect them with `isGaslessStep`.
|
|
15
18
|
*/
|
|
16
19
|
const getRelayerQuote = async (client, params, options) => {
|
|
17
20
|
for (const requiredParameter of [
|
|
@@ -38,7 +41,6 @@ const getRelayerQuote = async (client, params, options) => {
|
|
|
38
41
|
if (result.status === "error") throw new require_errors_baseError.BaseError("ServerError", result.data.code, result.data.message);
|
|
39
42
|
return result.data;
|
|
40
43
|
};
|
|
41
|
-
//#endregion
|
|
42
44
|
exports.getRelayerQuote = getRelayerQuote;
|
|
43
45
|
|
|
44
46
|
//# sourceMappingURL=getRelayerQuote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRelayerQuote.js","names":["SDKError","ValidationError","request","BaseError"],"sources":["../../../src/actions/getRelayerQuote.ts"],"sourcesContent":["import type {\n LiFiStep,\n RelayerQuoteResponse,\n RequestOptions,\n} from '@lifi/types'\nimport { BaseError } from '../errors/baseError.js'\nimport { ErrorName } from '../errors/constants.js'\nimport { ValidationError } from '../errors/errors.js'\nimport { SDKError } from '../errors/SDKError.js'\nimport type { QuoteRequest, QuoteRequestFromAmount } from '../types/actions.js'\nimport type { SDKClient } from '../types/core.js'\nimport { request } from '../utils/request.js'\n\n/**\n * Get a relayer quote for a token transfer\n * @param client - The SDK client\n * @param params - The configuration of the requested quote\n * @param options - Request options\n * @throws {LiFiError} - Throws a LiFiError if request fails\n * @returns Relayer quote for a token transfer\n */\nexport const getRelayerQuote = async (\n client: SDKClient,\n params: QuoteRequestFromAmount,\n options?: RequestOptions\n): Promise<LiFiStep> => {\n const requiredParameters: Array<keyof QuoteRequestFromAmount> = [\n 'fromChain',\n 'fromToken',\n 'fromAddress',\n 'fromAmount',\n 'toChain',\n 'toToken',\n ]\n for (const requiredParameter of requiredParameters) {\n if (!params[requiredParameter]) {\n throw new SDKError(\n new ValidationError(\n `Required parameter \"${requiredParameter}\" is missing.`\n )\n )\n }\n }\n\n // apply defaults\n params.integrator ??= client.config.integrator\n params.order ??= client.config.routeOptions?.order\n params.slippage ??= client.config.routeOptions?.slippage\n params.referrer ??= client.config.routeOptions?.referrer\n params.fee ??= client.config.routeOptions?.fee\n params.allowBridges ??= client.config.routeOptions?.bridges?.allow\n params.denyBridges ??= client.config.routeOptions?.bridges?.deny\n params.preferBridges ??= client.config.routeOptions?.bridges?.prefer\n params.allowExchanges ??= client.config.routeOptions?.exchanges?.allow\n params.denyExchanges ??= client.config.routeOptions?.exchanges?.deny\n params.preferExchanges ??= client.config.routeOptions?.exchanges?.prefer\n\n for (const key of Object.keys(params)) {\n if (\n params[key as keyof QuoteRequest] === undefined ||\n params[key as keyof QuoteRequest] === null\n ) {\n delete params[key as keyof QuoteRequest]\n }\n }\n\n const result = await request<RelayerQuoteResponse>(\n client.config,\n `${client.config.apiUrl}/relayer/quote?${new URLSearchParams(\n params as unknown as Record<string, string>\n )}`,\n {\n signal: options?.signal,\n }\n )\n\n if (result.status === 'error') {\n throw new BaseError(\n ErrorName.ServerError,\n result.data.code,\n result.data.message\n )\n }\n\n return result.data\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRelayerQuote.js","names":["SDKError","ValidationError","request","BaseError"],"sources":["../../../src/actions/getRelayerQuote.ts"],"sourcesContent":["import type {\n LiFiStep,\n RelayerQuoteResponse,\n RequestOptions,\n} from '@lifi/types'\nimport { BaseError } from '../errors/baseError.js'\nimport { ErrorName } from '../errors/constants.js'\nimport { ValidationError } from '../errors/errors.js'\nimport { SDKError } from '../errors/SDKError.js'\nimport type { QuoteRequest, QuoteRequestFromAmount } from '../types/actions.js'\nimport type { SDKClient } from '../types/core.js'\nimport { request } from '../utils/request.js'\n\n/**\n * Get a relayer quote for a token transfer\n * @param client - The SDK client\n * @param params - The configuration of the requested quote\n * @param options - Request options\n * @throws {LiFiError} - Throws a LiFiError if request fails\n * @returns Relayer quote for a token transfer\n * @deprecated The legacy gasless relayer service is shut down. Request\n * gasless routes with `options.gasless: true` on `getRoutes`, or\n * `gasless: true` on `getQuote`, and detect them with `isGaslessStep`.\n */\nexport const getRelayerQuote = async (\n client: SDKClient,\n params: QuoteRequestFromAmount,\n options?: RequestOptions\n): Promise<LiFiStep> => {\n const requiredParameters: Array<keyof QuoteRequestFromAmount> = [\n 'fromChain',\n 'fromToken',\n 'fromAddress',\n 'fromAmount',\n 'toChain',\n 'toToken',\n ]\n for (const requiredParameter of requiredParameters) {\n if (!params[requiredParameter]) {\n throw new SDKError(\n new ValidationError(\n `Required parameter \"${requiredParameter}\" is missing.`\n )\n )\n }\n }\n\n // apply defaults\n params.integrator ??= client.config.integrator\n params.order ??= client.config.routeOptions?.order\n params.slippage ??= client.config.routeOptions?.slippage\n params.referrer ??= client.config.routeOptions?.referrer\n params.fee ??= client.config.routeOptions?.fee\n params.allowBridges ??= client.config.routeOptions?.bridges?.allow\n params.denyBridges ??= client.config.routeOptions?.bridges?.deny\n params.preferBridges ??= client.config.routeOptions?.bridges?.prefer\n params.allowExchanges ??= client.config.routeOptions?.exchanges?.allow\n params.denyExchanges ??= client.config.routeOptions?.exchanges?.deny\n params.preferExchanges ??= client.config.routeOptions?.exchanges?.prefer\n\n for (const key of Object.keys(params)) {\n if (\n params[key as keyof QuoteRequest] === undefined ||\n params[key as keyof QuoteRequest] === null\n ) {\n delete params[key as keyof QuoteRequest]\n }\n }\n\n const result = await request<RelayerQuoteResponse>(\n client.config,\n `${client.config.apiUrl}/relayer/quote?${new URLSearchParams(\n params as unknown as Record<string, string>\n )}`,\n {\n signal: options?.signal,\n }\n )\n\n if (result.status === 'error') {\n throw new BaseError(\n ErrorName.ServerError,\n result.data.code,\n result.data.message\n )\n }\n\n return result.data\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAa,kBAAkB,OAC7B,QACA,QACA,YACsB;CAStB,KAAK,MAAM,qBAAqB;EAP9B;EACA;EACA;EACA;EACA;EACA;CAE+C,GAC/C,IAAI,CAAC,OAAO,oBACV,MAAM,IAAIA,wBAAAA,SACR,IAAIC,sBAAAA,gBACF,uBAAuB,kBAAkB,cAC3C,CACF;CAKJ,OAAO,eAAe,OAAO,OAAO;CACpC,OAAO,UAAU,OAAO,OAAO,cAAc;CAC7C,OAAO,aAAa,OAAO,OAAO,cAAc;CAChD,OAAO,aAAa,OAAO,OAAO,cAAc;CAChD,OAAO,QAAQ,OAAO,OAAO,cAAc;CAC3C,OAAO,iBAAiB,OAAO,OAAO,cAAc,SAAS;CAC7D,OAAO,gBAAgB,OAAO,OAAO,cAAc,SAAS;CAC5D,OAAO,kBAAkB,OAAO,OAAO,cAAc,SAAS;CAC9D,OAAO,mBAAmB,OAAO,OAAO,cAAc,WAAW;CACjE,OAAO,kBAAkB,OAAO,OAAO,cAAc,WAAW;CAChE,OAAO,oBAAoB,OAAO,OAAO,cAAc,WAAW;CAElE,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,GAClC,IACE,OAAO,SAA+B,KAAA,KACtC,OAAO,SAA+B,MAEtC,OAAO,OAAO;CAIlB,MAAM,SAAS,MAAMC,sBAAAA,QACnB,OAAO,QACP,GAAG,OAAO,OAAO,OAAO,iBAAiB,IAAI,gBAC3C,MACF,KACA,EACE,QAAQ,SAAS,OACnB,CACF;CAEA,IAAI,OAAO,WAAW,SACpB,MAAM,IAAIC,yBAAAA,UAAAA,eAER,OAAO,KAAK,MACZ,OAAO,KAAK,OACd;CAGF,OAAO,OAAO;AAChB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SDKClient } from "../types/core.js";
|
|
2
1
|
import { RoutesRequest as RoutesRequest$1 } from "../types/actions.js";
|
|
2
|
+
import { SDKClient } from "../types/core.js";
|
|
3
3
|
import { RequestOptions, RoutesResponse } from "@lifi/types";
|
|
4
|
-
//#region src/actions/getRoutes.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get a set of routes for a request that describes a transfer of tokens.
|
|
7
6
|
* @param client - The SDK client.
|
|
@@ -10,6 +9,4 @@ import { RequestOptions, RoutesResponse } from "@lifi/types";
|
|
|
10
9
|
* @returns The resulting routes that can be used to realize the described transfer of tokens.
|
|
11
10
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
12
11
|
*/
|
|
13
|
-
export declare const getRoutes: (client: SDKClient, params: RoutesRequest$1, options?: RequestOptions) => Promise<RoutesResponse>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getRoutes.d.ts.map
|
|
12
|
+
export declare const getRoutes: (client: SDKClient, params: RoutesRequest$1, options?: RequestOptions) => Promise<RoutesResponse>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
4
|
-
const
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
5
4
|
const require_utils_isRoutesRequest = require("../utils/isRoutesRequest.js");
|
|
6
|
-
|
|
5
|
+
const require_utils_request = require("../utils/request.js");
|
|
6
|
+
// src/actions/getRoutes.ts
|
|
7
7
|
/**
|
|
8
8
|
* Get a set of routes for a request that describes a transfer of tokens.
|
|
9
9
|
* @param client - The SDK client.
|
|
@@ -26,7 +26,6 @@ const getRoutes = async (client, params, options) => {
|
|
|
26
26
|
signal: options?.signal
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
exports.getRoutes = getRoutes;
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=getRoutes.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SDKClient } from "../types/core.js";
|
|
2
1
|
import { GetStatusRequestExtended } from "../types/actions.js";
|
|
2
|
+
import { SDKClient } from "../types/core.js";
|
|
3
3
|
import { RequestOptions, StatusResponse } from "@lifi/types";
|
|
4
|
-
//#region src/actions/getStatus.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Check the status of a transfer. For cross chain transfers, the "bridge" parameter is required.
|
|
7
6
|
* @param client - The SDK client
|
|
@@ -10,6 +9,4 @@ import { RequestOptions, StatusResponse } from "@lifi/types";
|
|
|
10
9
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
10
|
* @returns Returns status response.
|
|
12
11
|
*/
|
|
13
|
-
export declare const getStatus: (client: SDKClient, params: GetStatusRequestExtended, options?: RequestOptions) => Promise<StatusResponse>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getStatus.d.ts.map
|
|
12
|
+
export declare const getStatus: (client: SDKClient, params: GetStatusRequestExtended, options?: RequestOptions) => Promise<StatusResponse>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
4
4
|
const require_utils_request = require("../utils/request.js");
|
|
5
|
-
|
|
5
|
+
// src/actions/getStatus.ts
|
|
6
6
|
/**
|
|
7
7
|
* Check the status of a transfer. For cross chain transfers, the "bridge" parameter is required.
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -16,7 +16,6 @@ const getStatus = async (client, params, options) => {
|
|
|
16
16
|
const queryParams = new URLSearchParams(params);
|
|
17
17
|
return await require_utils_request.request(client.config, `${client.config.apiUrl}/status?${queryParams}`, { signal: options?.signal });
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.getStatus = getStatus;
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=getStatus.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { SDKClient } from "../types/core.js";
|
|
2
1
|
import { LiFiStepRequest } from "../types/actions.js";
|
|
2
|
+
import { SDKClient } from "../types/core.js";
|
|
3
3
|
import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
4
|
-
//#region src/actions/getStepTransaction.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get the transaction data for a single step of a route
|
|
7
6
|
* @param client - The SDK client
|
|
@@ -10,6 +9,4 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
10
9
|
* @returns The step populated with the transaction data.
|
|
11
10
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
12
11
|
*/
|
|
13
|
-
export declare const getStepTransaction: (client: SDKClient, step: LiFiStepRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getStepTransaction.d.ts.map
|
|
12
|
+
export declare const getStepTransaction: (client: SDKClient, step: LiFiStepRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils_request = require("../utils/request.js");
|
|
3
2
|
const require_utils_isStep = require("../utils/isStep.js");
|
|
3
|
+
const require_utils_request = require("../utils/request.js");
|
|
4
4
|
let _lifi_types = require("@lifi/types");
|
|
5
|
-
|
|
5
|
+
// src/actions/getStepTransaction.ts
|
|
6
6
|
/**
|
|
7
7
|
* Get the transaction data for a single step of a route
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -32,7 +32,6 @@ const getStepTransaction = async (client, step, options) => {
|
|
|
32
32
|
signal: options?.signal
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.getStepTransaction = getStepTransaction;
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=getStepTransaction.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { ChainId, ChainKey, RequestOptions, TokenExtended } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getToken.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Fetch information about a Token
|
|
6
5
|
* @param client - The SDK client
|
|
@@ -10,6 +9,4 @@ import { ChainId, ChainKey, RequestOptions, TokenExtended } from "@lifi/types";
|
|
|
10
9
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
10
|
* @returns Token information
|
|
12
11
|
*/
|
|
13
|
-
export declare const getToken: (client: SDKClient, chain: ChainKey | ChainId, token: string, options?: RequestOptions) => Promise<TokenExtended>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getToken.d.ts.map
|
|
12
|
+
export declare const getToken: (client: SDKClient, chain: ChainKey | ChainId, token: string, options?: RequestOptions) => Promise<TokenExtended>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
3
2
|
const require_errors_errors = require("../errors/errors.js");
|
|
3
|
+
const require_errors_SDKError = require("../errors/SDKError.js");
|
|
4
4
|
const require_utils_request = require("../utils/request.js");
|
|
5
|
-
|
|
5
|
+
// src/actions/getToken.ts
|
|
6
6
|
/**
|
|
7
7
|
* Fetch information about a Token
|
|
8
8
|
* @param client - The SDK client
|
|
@@ -20,7 +20,6 @@ const getToken = async (client, chain, token, options) => {
|
|
|
20
20
|
token
|
|
21
21
|
})}`, { signal: options?.signal });
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
exports.getToken = getToken;
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=getToken.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { Token, TokenAmount } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getTokenBalance.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Returns the balances of a specific token a wallet holds across all aggregated chains.
|
|
6
5
|
* @param client - The SDK client.
|
|
@@ -10,6 +9,4 @@ import { Token, TokenAmount } from "@lifi/types";
|
|
|
10
9
|
* @throws {ValidationError} Throws a ValidationError if validation fails.
|
|
11
10
|
* @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.
|
|
12
11
|
*/
|
|
13
|
-
export declare const getTokenBalance: (client: SDKClient, walletAddress: string, token: Token) => Promise<TokenAmount | null>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getTokenBalance.d.ts.map
|
|
12
|
+
export declare const getTokenBalance: (client: SDKClient, walletAddress: string, token: Token) => Promise<TokenAmount | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_actions_getTokenBalances = require("./getTokenBalances.js");
|
|
3
|
-
|
|
3
|
+
// src/actions/getTokenBalance.ts
|
|
4
4
|
/**
|
|
5
5
|
* Returns the balances of a specific token a wallet holds across all aggregated chains.
|
|
6
6
|
* @param client - The SDK client.
|
|
@@ -14,7 +14,6 @@ const getTokenBalance = async (client, walletAddress, token) => {
|
|
|
14
14
|
const tokenAmounts = await require_actions_getTokenBalances.getTokenBalances(client, walletAddress, [token]);
|
|
15
15
|
return tokenAmounts.length ? tokenAmounts[0] : null;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
exports.getTokenBalance = getTokenBalance;
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=getTokenBalance.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
2
|
import { Token, TokenAmount } from "@lifi/types";
|
|
3
|
-
//#region src/actions/getTokenBalances.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Returns the balances for a list tokens a wallet holds across all aggregated chains.
|
|
6
5
|
* @param client - The SDK client.
|
|
@@ -10,6 +9,4 @@ import { Token, TokenAmount } from "@lifi/types";
|
|
|
10
9
|
* @throws {ValidationError} Throws a ValidationError if validation fails.
|
|
11
10
|
* @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.
|
|
12
11
|
*/
|
|
13
|
-
export declare function getTokenBalances(client: SDKClient, walletAddress: string, tokens: Token[]): Promise<TokenAmount[]>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=getTokenBalances.d.ts.map
|
|
12
|
+
export declare function getTokenBalances(client: SDKClient, walletAddress: string, tokens: Token[]): Promise<TokenAmount[]>;
|