@lifi/sdk 0.0.0-preview-306a9fec → 0.0.0-preview-99c40e1b
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 +59 -5
- package/README.md +24 -8
- package/dist/cjs/actions/getChains.d.ts +2 -3
- package/dist/cjs/actions/getConnections.d.ts +1 -2
- package/dist/cjs/actions/getContractCallsQuote.d.ts +1 -2
- package/dist/cjs/actions/getContractCallsQuote.js.map +1 -1
- package/dist/cjs/actions/getGasRecommendation.d.ts +1 -2
- package/dist/cjs/actions/getNameServiceAddress.d.ts +1 -2
- package/dist/cjs/actions/getQuote.d.ts +2 -3
- package/dist/cjs/actions/getRelayedTransactionStatus.d.ts +1 -2
- package/dist/cjs/actions/getRelayerQuote.d.ts +1 -2
- package/dist/cjs/actions/getRoutes.d.ts +1 -2
- package/dist/cjs/actions/getStatus.d.ts +1 -2
- package/dist/cjs/actions/getStepTransaction.d.ts +1 -2
- package/dist/cjs/actions/getToken.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalance.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalances.d.ts +1 -2
- package/dist/cjs/actions/getTokenBalances.js +3 -2
- package/dist/cjs/actions/getTokenBalances.js.map +1 -1
- package/dist/cjs/actions/getTokenBalancesByChain.d.ts +1 -2
- package/dist/cjs/actions/getTokens.d.ts +2 -3
- package/dist/cjs/actions/getTools.d.ts +1 -2
- package/dist/cjs/actions/getTransactionHistory.d.ts +1 -2
- package/dist/cjs/actions/index.d.ts +2 -54
- package/dist/cjs/actions/index.js +1 -15
- package/dist/cjs/actions/index.js.map +1 -1
- package/dist/cjs/actions/patchContractCalls.d.ts +2 -3
- package/dist/cjs/actions/relayTransaction.d.ts +1 -2
- package/dist/cjs/client/createClient.d.ts +1 -2
- package/dist/cjs/client/getClientStorage.d.ts +2 -3
- package/dist/cjs/client/getClientStorage.js +1 -1
- package/dist/cjs/client/getClientStorage.js.map +1 -1
- package/dist/cjs/core/BaseStepExecutionTask.d.ts +1 -2
- package/dist/cjs/core/BaseStepExecutor.d.ts +1 -2
- package/dist/cjs/core/BaseStepExecutor.js +11 -9
- package/dist/cjs/core/BaseStepExecutor.js.map +1 -1
- package/dist/cjs/core/StatusManager.d.ts +1 -2
- package/dist/cjs/core/StatusManager.js +1 -4
- package/dist/cjs/core/StatusManager.js.map +1 -1
- package/dist/cjs/core/TaskPipeline.d.ts +1 -2
- package/dist/cjs/core/actionMessages.d.ts +2 -3
- package/dist/cjs/core/execution.d.ts +6 -7
- package/dist/cjs/core/executionState.d.ts +1 -2
- package/dist/cjs/core/prepareRestart.d.ts +1 -2
- package/dist/cjs/core/storage.d.ts +4 -5
- package/dist/cjs/core/tasks/CheckBalanceTask.d.ts +1 -2
- package/dist/cjs/core/tasks/CheckBalanceTask.js +2 -1
- package/dist/cjs/core/tasks/CheckBalanceTask.js.map +1 -1
- package/dist/cjs/core/tasks/PrepareTransactionTask.d.ts +1 -2
- package/dist/cjs/core/tasks/PrepareTransactionTask.js +3 -6
- package/dist/cjs/core/tasks/PrepareTransactionTask.js.map +1 -1
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.d.ts +1 -2
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.js +0 -3
- package/dist/cjs/core/tasks/WaitForTransactionStatusTask.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/checkBalance.d.ts +2 -3
- package/dist/cjs/core/tasks/helpers/checkBalance.js +1 -1
- package/dist/cjs/core/tasks/helpers/checkBalance.js.map +1 -1
- package/dist/cjs/core/tasks/helpers/getTransactionRequestData.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/stepComparison.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.d.ts +1 -2
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.js +4 -2
- package/dist/cjs/core/tasks/helpers/waitForTransactionStatus.js.map +1 -1
- package/dist/cjs/core/utils.d.ts +2 -3
- package/dist/cjs/errors/SDKError.d.ts +1 -2
- package/dist/cjs/errors/baseError.d.ts +1 -2
- package/dist/cjs/errors/constants.d.ts +6 -6
- package/dist/cjs/errors/constants.js +1 -0
- package/dist/cjs/errors/constants.js.map +1 -1
- package/dist/cjs/errors/errors.d.ts +8 -9
- package/dist/cjs/errors/httpError.d.ts +1 -2
- package/dist/cjs/errors/httpError.js +0 -8
- package/dist/cjs/errors/httpError.js.map +1 -1
- package/dist/cjs/errors/utils/baseErrorRootCause.d.ts +2 -3
- package/dist/cjs/errors/utils/rootCause.d.ts +1 -2
- package/dist/cjs/index.d.ts +1 -13
- package/dist/cjs/index.js +2 -26
- package/dist/cjs/types/actions.d.ts +6 -7
- package/dist/cjs/types/core.d.ts +41 -38
- package/dist/cjs/types/execution.d.ts +4 -5
- package/dist/cjs/types/request.d.ts +1 -2
- package/dist/cjs/utils/checkPackageUpdates.d.ts +1 -2
- package/dist/cjs/utils/checkPackageUpdates.js +1 -1
- package/dist/cjs/utils/convertQuoteToRoute.d.ts +2 -3
- package/dist/cjs/utils/decode.d.ts +1 -2
- package/dist/cjs/utils/fetchTxErrorDetails.d.ts +1 -2
- package/dist/cjs/utils/formatUnits.d.ts +1 -2
- package/dist/cjs/utils/getTransactionMessage.d.ts +1 -2
- package/dist/cjs/utils/isHex.d.ts +2 -3
- package/dist/cjs/utils/isRoutesRequest.d.ts +1 -2
- package/dist/cjs/utils/isStep.d.ts +1 -2
- package/dist/cjs/utils/isToken.d.ts +1 -2
- package/dist/cjs/utils/parseUnits.d.ts +1 -2
- package/dist/cjs/utils/request.d.ts +2 -3
- package/dist/cjs/utils/sleep.d.ts +1 -2
- package/dist/cjs/utils/sleep.js +3 -12
- package/dist/cjs/utils/sleep.js.map +1 -1
- package/dist/cjs/utils/toQueryString.d.ts +1 -2
- package/dist/cjs/utils/waitForResult.d.ts +1 -2
- package/dist/cjs/utils/withDedupe.d.ts +2 -3
- package/dist/cjs/utils/withTimeout.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/actions/getChains.d.ts +2 -3
- package/dist/esm/actions/getChains.d.ts.map +1 -1
- package/dist/esm/actions/getConnections.d.ts +1 -2
- package/dist/esm/actions/getConnections.d.ts.map +1 -1
- package/dist/esm/actions/getContractCallsQuote.d.ts +1 -2
- package/dist/esm/actions/getContractCallsQuote.d.ts.map +1 -1
- package/dist/esm/actions/getGasRecommendation.d.ts +1 -2
- package/dist/esm/actions/getGasRecommendation.d.ts.map +1 -1
- package/dist/esm/actions/getNameServiceAddress.d.ts +1 -2
- package/dist/esm/actions/getNameServiceAddress.d.ts.map +1 -1
- package/dist/esm/actions/getQuote.d.ts +2 -3
- package/dist/esm/actions/getQuote.d.ts.map +1 -1
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts +1 -2
- package/dist/esm/actions/getRelayedTransactionStatus.d.ts.map +1 -1
- package/dist/esm/actions/getRelayerQuote.d.ts +1 -2
- package/dist/esm/actions/getRelayerQuote.d.ts.map +1 -1
- package/dist/esm/actions/getRoutes.d.ts +1 -2
- package/dist/esm/actions/getRoutes.d.ts.map +1 -1
- package/dist/esm/actions/getStatus.d.ts +1 -2
- package/dist/esm/actions/getStatus.d.ts.map +1 -1
- package/dist/esm/actions/getStepTransaction.d.ts +1 -2
- package/dist/esm/actions/getStepTransaction.d.ts.map +1 -1
- package/dist/esm/actions/getToken.d.ts +1 -2
- package/dist/esm/actions/getToken.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalance.d.ts +1 -2
- package/dist/esm/actions/getTokenBalance.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalances.d.ts +1 -2
- package/dist/esm/actions/getTokenBalances.d.ts.map +1 -1
- package/dist/esm/actions/getTokenBalances.js +3 -2
- package/dist/esm/actions/getTokenBalances.js.map +1 -1
- package/dist/esm/actions/getTokenBalancesByChain.d.ts +1 -2
- package/dist/esm/actions/getTokenBalancesByChain.d.ts.map +1 -1
- package/dist/esm/actions/getTokens.d.ts +2 -3
- package/dist/esm/actions/getTokens.d.ts.map +1 -1
- package/dist/esm/actions/getTools.d.ts +1 -2
- package/dist/esm/actions/getTools.d.ts.map +1 -1
- package/dist/esm/actions/getTransactionHistory.d.ts +1 -2
- package/dist/esm/actions/getTransactionHistory.d.ts.map +1 -1
- package/dist/esm/actions/index.d.ts +2 -54
- package/dist/esm/actions/index.d.ts.map +1 -1
- package/dist/esm/actions/index.js +1 -15
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/actions/patchContractCalls.d.ts +2 -3
- package/dist/esm/actions/patchContractCalls.d.ts.map +1 -1
- package/dist/esm/actions/relayTransaction.d.ts +1 -2
- package/dist/esm/actions/relayTransaction.d.ts.map +1 -1
- package/dist/esm/client/createClient.d.ts +1 -2
- package/dist/esm/client/createClient.d.ts.map +1 -1
- package/dist/esm/client/getClientStorage.d.ts +2 -3
- package/dist/esm/client/getClientStorage.d.ts.map +1 -1
- package/dist/esm/client/getClientStorage.js +1 -1
- package/dist/esm/client/getClientStorage.js.map +1 -1
- package/dist/esm/core/BaseStepExecutionTask.d.ts +1 -2
- package/dist/esm/core/BaseStepExecutionTask.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutor.d.ts +1 -2
- package/dist/esm/core/BaseStepExecutor.d.ts.map +1 -1
- package/dist/esm/core/BaseStepExecutor.js +11 -9
- package/dist/esm/core/BaseStepExecutor.js.map +1 -1
- package/dist/esm/core/StatusManager.d.ts +1 -2
- package/dist/esm/core/StatusManager.d.ts.map +1 -1
- package/dist/esm/core/StatusManager.js +1 -4
- package/dist/esm/core/StatusManager.js.map +1 -1
- package/dist/esm/core/TaskPipeline.d.ts +1 -2
- package/dist/esm/core/TaskPipeline.d.ts.map +1 -1
- package/dist/esm/core/actionMessages.d.ts +2 -3
- package/dist/esm/core/actionMessages.d.ts.map +1 -1
- package/dist/esm/core/execution.d.ts +6 -7
- package/dist/esm/core/execution.d.ts.map +1 -1
- package/dist/esm/core/executionState.d.ts +1 -2
- package/dist/esm/core/executionState.d.ts.map +1 -1
- package/dist/esm/core/prepareRestart.d.ts +1 -2
- package/dist/esm/core/prepareRestart.d.ts.map +1 -1
- package/dist/esm/core/storage.d.ts +4 -5
- package/dist/esm/core/storage.d.ts.map +1 -1
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts +1 -2
- package/dist/esm/core/tasks/CheckBalanceTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/CheckBalanceTask.js +2 -1
- package/dist/esm/core/tasks/CheckBalanceTask.js.map +1 -1
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts +1 -2
- package/dist/esm/core/tasks/PrepareTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/PrepareTransactionTask.js +3 -6
- package/dist/esm/core/tasks/PrepareTransactionTask.js.map +1 -1
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts +1 -2
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.js +2 -4
- package/dist/esm/core/tasks/WaitForTransactionStatusTask.js.map +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts +2 -3
- package/dist/esm/core/tasks/helpers/checkBalance.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.js +1 -1
- package/dist/esm/core/tasks/helpers/checkBalance.js.map +1 -1
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/getTransactionRequestData.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/stepComparison.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts +1 -2
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.d.ts.map +1 -1
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.js +4 -2
- package/dist/esm/core/tasks/helpers/waitForTransactionStatus.js.map +1 -1
- package/dist/esm/core/utils.d.ts +2 -3
- package/dist/esm/core/utils.d.ts.map +1 -1
- package/dist/esm/errors/SDKError.d.ts +1 -2
- package/dist/esm/errors/SDKError.d.ts.map +1 -1
- package/dist/esm/errors/baseError.d.ts +1 -2
- package/dist/esm/errors/baseError.d.ts.map +1 -1
- package/dist/esm/errors/constants.d.ts +6 -6
- package/dist/esm/errors/constants.d.ts.map +1 -1
- package/dist/esm/errors/constants.js +1 -0
- package/dist/esm/errors/constants.js.map +1 -1
- package/dist/esm/errors/errors.d.ts +8 -9
- package/dist/esm/errors/errors.d.ts.map +1 -1
- package/dist/esm/errors/httpError.d.ts +1 -2
- package/dist/esm/errors/httpError.d.ts.map +1 -1
- package/dist/esm/errors/httpError.js +0 -8
- package/dist/esm/errors/httpError.js.map +1 -1
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts +2 -3
- package/dist/esm/errors/utils/baseErrorRootCause.d.ts.map +1 -1
- package/dist/esm/errors/utils/rootCause.d.ts +1 -2
- package/dist/esm/errors/utils/rootCause.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -13
- package/dist/esm/index.js +3 -14
- package/dist/esm/types/actions.d.ts +6 -7
- package/dist/esm/types/actions.d.ts.map +1 -1
- package/dist/esm/types/core.d.ts +41 -38
- package/dist/esm/types/core.d.ts.map +1 -1
- package/dist/esm/types/execution.d.ts +4 -5
- package/dist/esm/types/execution.d.ts.map +1 -1
- package/dist/esm/types/request.d.ts +1 -2
- package/dist/esm/types/request.d.ts.map +1 -1
- package/dist/esm/utils/checkPackageUpdates.d.ts +1 -2
- package/dist/esm/utils/checkPackageUpdates.d.ts.map +1 -1
- package/dist/esm/utils/checkPackageUpdates.js +1 -1
- package/dist/esm/utils/convertQuoteToRoute.d.ts +2 -3
- package/dist/esm/utils/convertQuoteToRoute.d.ts.map +1 -1
- package/dist/esm/utils/decode.d.ts +1 -2
- package/dist/esm/utils/decode.d.ts.map +1 -1
- package/dist/esm/utils/fetchTxErrorDetails.d.ts +1 -2
- package/dist/esm/utils/fetchTxErrorDetails.d.ts.map +1 -1
- package/dist/esm/utils/formatUnits.d.ts +1 -2
- package/dist/esm/utils/formatUnits.d.ts.map +1 -1
- package/dist/esm/utils/getTransactionMessage.d.ts +1 -2
- package/dist/esm/utils/getTransactionMessage.d.ts.map +1 -1
- package/dist/esm/utils/isHex.d.ts +2 -3
- package/dist/esm/utils/isHex.d.ts.map +1 -1
- package/dist/esm/utils/isRoutesRequest.d.ts +1 -2
- package/dist/esm/utils/isRoutesRequest.d.ts.map +1 -1
- package/dist/esm/utils/isStep.d.ts +1 -2
- package/dist/esm/utils/isStep.d.ts.map +1 -1
- package/dist/esm/utils/isToken.d.ts +1 -2
- package/dist/esm/utils/isToken.d.ts.map +1 -1
- package/dist/esm/utils/parseUnits.d.ts +1 -2
- package/dist/esm/utils/parseUnits.d.ts.map +1 -1
- package/dist/esm/utils/request.d.ts +2 -3
- package/dist/esm/utils/request.d.ts.map +1 -1
- package/dist/esm/utils/sleep.d.ts +1 -2
- package/dist/esm/utils/sleep.d.ts.map +1 -1
- package/dist/esm/utils/sleep.js +3 -12
- package/dist/esm/utils/sleep.js.map +1 -1
- package/dist/esm/utils/toQueryString.d.ts +1 -2
- package/dist/esm/utils/toQueryString.d.ts.map +1 -1
- package/dist/esm/utils/waitForResult.d.ts +1 -2
- package/dist/esm/utils/waitForResult.d.ts.map +1 -1
- package/dist/esm/utils/withDedupe.d.ts +2 -3
- package/dist/esm/utils/withDedupe.d.ts.map +1 -1
- package/dist/esm/utils/withTimeout.d.ts +1 -2
- package/dist/esm/utils/withTimeout.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 +2 -2
- package/src/actions/index.ts +0 -114
- package/src/core/tasks/PrepareTransactionTask.ts +13 -24
- package/src/core/tasks/WaitForTransactionStatusTask.ts +0 -6
- package/src/core/tasks/helpers/waitForTransactionStatus.ts +8 -2
- package/src/errors/constants.ts +1 -0
- package/src/errors/httpError.ts +0 -11
- package/src/index.ts +0 -41
- package/src/types/core.ts +6 -2
- package/src/utils/sleep.ts +3 -14
- package/src/version.ts +1 -1
- package/dist/cjs/actions/createCexSession.d.ts +0 -16
- package/dist/cjs/actions/createCexSession.js +0 -23
- package/dist/cjs/actions/createCexSession.js.map +0 -1
- package/dist/cjs/actions/createFundingOrder.d.ts +0 -17
- package/dist/cjs/actions/createFundingOrder.js +0 -37
- package/dist/cjs/actions/createFundingOrder.js.map +0 -1
- package/dist/cjs/actions/createOnrampSession.d.ts +0 -16
- package/dist/cjs/actions/createOnrampSession.js +0 -23
- package/dist/cjs/actions/createOnrampSession.js.map +0 -1
- package/dist/cjs/actions/getFundingOrder.d.ts +0 -18
- package/dist/cjs/actions/getFundingOrder.js +0 -27
- package/dist/cjs/actions/getFundingOrder.js.map +0 -1
- package/dist/cjs/actions/getOnrampFiatCurrencies.d.ts +0 -16
- package/dist/cjs/actions/getOnrampFiatCurrencies.js +0 -23
- package/dist/cjs/actions/getOnrampFiatCurrencies.js.map +0 -1
- package/dist/cjs/actions/getOnrampQuote.d.ts +0 -16
- package/dist/cjs/actions/getOnrampQuote.js +0 -23
- package/dist/cjs/actions/getOnrampQuote.js.map +0 -1
- package/dist/cjs/actions/waitForFundingOrder.d.ts +0 -17
- package/dist/cjs/actions/waitForFundingOrder.js +0 -50
- package/dist/cjs/actions/waitForFundingOrder.js.map +0 -1
- package/dist/cjs/core/fundingExecution.d.ts +0 -73
- package/dist/cjs/core/fundingExecution.js +0 -125
- package/dist/cjs/core/fundingExecution.js.map +0 -1
- package/dist/cjs/core/tasks/WaitForFundingOrderTask.d.ts +0 -20
- package/dist/cjs/core/tasks/WaitForFundingOrderTask.js +0 -77
- package/dist/cjs/core/tasks/WaitForFundingOrderTask.js.map +0 -1
- package/dist/cjs/types/funding.d.ts +0 -213
- package/dist/cjs/types/funding.js +0 -0
- package/dist/cjs/utils/convertOrderToRoute.d.ts +0 -14
- package/dist/cjs/utils/convertOrderToRoute.js +0 -27
- package/dist/cjs/utils/convertOrderToRoute.js.map +0 -1
- package/dist/cjs/utils/fundingOrderStep.d.ts +0 -21
- package/dist/cjs/utils/fundingOrderStep.js +0 -41
- package/dist/cjs/utils/fundingOrderStep.js.map +0 -1
- package/dist/esm/actions/createCexSession.d.ts +0 -16
- package/dist/esm/actions/createCexSession.d.ts.map +0 -1
- package/dist/esm/actions/createCexSession.js +0 -22
- package/dist/esm/actions/createCexSession.js.map +0 -1
- package/dist/esm/actions/createFundingOrder.d.ts +0 -17
- package/dist/esm/actions/createFundingOrder.d.ts.map +0 -1
- package/dist/esm/actions/createFundingOrder.js +0 -36
- package/dist/esm/actions/createFundingOrder.js.map +0 -1
- package/dist/esm/actions/createOnrampSession.d.ts +0 -16
- package/dist/esm/actions/createOnrampSession.d.ts.map +0 -1
- package/dist/esm/actions/createOnrampSession.js +0 -22
- package/dist/esm/actions/createOnrampSession.js.map +0 -1
- package/dist/esm/actions/getFundingOrder.d.ts +0 -18
- package/dist/esm/actions/getFundingOrder.d.ts.map +0 -1
- package/dist/esm/actions/getFundingOrder.js +0 -26
- package/dist/esm/actions/getFundingOrder.js.map +0 -1
- package/dist/esm/actions/getOnrampFiatCurrencies.d.ts +0 -16
- package/dist/esm/actions/getOnrampFiatCurrencies.d.ts.map +0 -1
- package/dist/esm/actions/getOnrampFiatCurrencies.js +0 -22
- package/dist/esm/actions/getOnrampFiatCurrencies.js.map +0 -1
- package/dist/esm/actions/getOnrampQuote.d.ts +0 -16
- package/dist/esm/actions/getOnrampQuote.d.ts.map +0 -1
- package/dist/esm/actions/getOnrampQuote.js +0 -22
- package/dist/esm/actions/getOnrampQuote.js.map +0 -1
- package/dist/esm/actions/waitForFundingOrder.d.ts +0 -17
- package/dist/esm/actions/waitForFundingOrder.d.ts.map +0 -1
- package/dist/esm/actions/waitForFundingOrder.js +0 -49
- package/dist/esm/actions/waitForFundingOrder.js.map +0 -1
- package/dist/esm/core/fundingExecution.d.ts +0 -73
- package/dist/esm/core/fundingExecution.d.ts.map +0 -1
- package/dist/esm/core/fundingExecution.js +0 -123
- package/dist/esm/core/fundingExecution.js.map +0 -1
- package/dist/esm/core/tasks/WaitForFundingOrderTask.d.ts +0 -20
- package/dist/esm/core/tasks/WaitForFundingOrderTask.d.ts.map +0 -1
- package/dist/esm/core/tasks/WaitForFundingOrderTask.js +0 -76
- package/dist/esm/core/tasks/WaitForFundingOrderTask.js.map +0 -1
- package/dist/esm/types/funding.d.ts +0 -213
- package/dist/esm/types/funding.d.ts.map +0 -1
- package/dist/esm/types/funding.js +0 -1
- package/dist/esm/utils/convertOrderToRoute.d.ts +0 -14
- package/dist/esm/utils/convertOrderToRoute.d.ts.map +0 -1
- package/dist/esm/utils/convertOrderToRoute.js +0 -26
- package/dist/esm/utils/convertOrderToRoute.js.map +0 -1
- package/dist/esm/utils/fundingOrderStep.d.ts +0 -21
- package/dist/esm/utils/fundingOrderStep.d.ts.map +0 -1
- package/dist/esm/utils/fundingOrderStep.js +0 -39
- package/dist/esm/utils/fundingOrderStep.js.map +0 -1
- package/src/actions/createCexSession.ts +0 -29
- package/src/actions/createFundingOrder.ts +0 -61
- package/src/actions/createOnrampSession.ts +0 -32
- package/src/actions/getFundingOrder.ts +0 -44
- package/src/actions/getOnrampFiatCurrencies.ts +0 -32
- package/src/actions/getOnrampQuote.ts +0 -29
- package/src/actions/waitForFundingOrder.ts +0 -99
- package/src/core/fundingExecution.ts +0 -209
- package/src/core/tasks/WaitForFundingOrderTask.ts +0 -146
- package/src/types/funding.ts +0 -223
- package/src/utils/convertOrderToRoute.ts +0 -56
- package/src/utils/fundingOrderStep.ts +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,71 @@
|
|
|
1
1
|
# @lifi/sdk
|
|
2
2
|
|
|
3
|
-
## 0.0.0-preview-
|
|
3
|
+
## 0.0.0-preview-99c40e1b
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [`
|
|
7
|
+
- [#475](https://github.com/lifinance/sdk/pull/475) [`e371b7f`](https://github.com/lifinance/sdk/commit/e371b7f8c8375dc32fe5b2122dbab2f634efd625) Thanks [@chybisov](https://github.com/chybisov)! - Bump the `@lifi/types` pin to `^18.6.0`.
|
|
8
|
+
|
|
9
|
+
`18.6.0` adds `PermitSingle` to `TypedDataPrimaryTypes`, so the Ethereum
|
|
10
|
+
provider's typed-data lane classifier can compare `primaryType` against the
|
|
11
|
+
declared union instead of a module-private string allowlist.
|
|
12
|
+
|
|
13
|
+
`@lifi/sdk` re-exports `@lifi/types` wholesale, so the addition widens its own
|
|
14
|
+
public type surface — additive only, nothing is removed or narrowed.
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
### Patch Changes
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
- [#475](https://github.com/lifinance/sdk/pull/475) [`99c40e1`](https://github.com/lifinance/sdk/commit/99c40e1b82515bf40b1a66ab8046a261bdd49d42) Thanks [@chybisov](https://github.com/chybisov)! - Give a pending bridge a link to follow. While waiting for the destination, the status poll only forwarded `bridgeExplorerLink`, which most bridges do not provide, so the receiving action had nothing to open for the whole wait. It now falls back to `lifiExplorerLink`, which every recorded transfer carries and which shows both legs.
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
## 4.7.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- [#471](https://github.com/lifinance/sdk/pull/471) [`a57b439`](https://github.com/lifinance/sdk/commit/a57b4391b52d9bc535577dcbfad1523ab4d2e32f) Thanks [@chybisov](https://github.com/chybisov)! - Add optional `SDKProvider.isTokenAddress`, so callers can validate a token identifier without knowing how each ecosystem shapes one: `C…` contract ids on Stellar, `0x…::module::TYPE` coin types on Sui, an address in any letter case on Ethereum, and the wallet format on Solana and Tron. `BitcoinProvider` omits the method, because the token list names its native coin `bitcoin` rather than giving it an address. A missing method means the ecosystem has no token address format, so a caller must not fall back to `isAddress`.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#473](https://github.com/lifinance/sdk/pull/473) [`d7d8abb`](https://github.com/lifinance/sdk/commit/d7d8abb776aa943aafda62d17926b8575f770478) Thanks [@chybisov](https://github.com/chybisov)! - Bump runtime dependencies. `@lifi/sdk` moves `@lifi/types` to `^18.5.0`;
|
|
29
|
+
`@lifi/sdk-provider-bitcoin` moves `@bigmi/core` to `^0.9.1` and `bitcoinjs-lib` to
|
|
30
|
+
`^7.0.2`; `@lifi/sdk-provider-sui` moves `@mysten/sui` to `^2.29.0`; and
|
|
31
|
+
`@lifi/sdk-provider-tron` moves `@tronweb3/tronwallet-abstract-adapter` to `^1.3.0`.
|
|
32
|
+
|
|
33
|
+
## 4.6.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- [#459](https://github.com/lifinance/sdk/pull/459) [`954bc4b`](https://github.com/lifinance/sdk/commit/954bc4bda013b470102041810daf95cb4f9181a1) Thanks [@chybisov](https://github.com/chybisov)! - Bump runtime dependencies: `@lifi/types` to 18.4.0, `viem` to 2.56.0, `@mysten/sui` to 2.27.0.
|
|
14
38
|
|
|
39
|
+
## 4.6.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- [#455](https://github.com/lifinance/sdk/pull/455) [`b5ace9d`](https://github.com/lifinance/sdk/commit/b5ace9d9a2a0267ae4231b42035b55a0e1def72e) Thanks [@chybisov](https://github.com/chybisov)! - Widen the `@lifi/types` dependency from the exact pin `18.2.0` to `^18.3.0`.
|
|
44
|
+
|
|
45
|
+
The exact pin forced a second copy of `@lifi/types` into any tree that also used
|
|
46
|
+
`@lifi/perps-sdk`, which pins exactly too. Two exact pins on different versions can
|
|
47
|
+
never share a resolution. Carets on both sides let the package manager settle on one
|
|
48
|
+
version, and remove the need for the two packages to bump in lockstep.
|
|
49
|
+
|
|
50
|
+
`@lifi/sdk` re-exports `@lifi/types` in full, so the change is a minor rather than a
|
|
51
|
+
patch.
|
|
52
|
+
|
|
53
|
+
## 4.5.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- [#448](https://github.com/lifinance/sdk/pull/448) [`1ab67e5`](https://github.com/lifinance/sdk/commit/1ab67e5b5d89446a9c08530c6d9c296179e1a359) Thanks [@chybisov](https://github.com/chybisov)! - Add `LiFiErrorCode.RpcUnavailable` (1027) for RPC endpoints that never return a usable response. Previously such failures were indistinguishable from a genuinely expired transaction.
|
|
58
|
+
|
|
59
|
+
## 4.4.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- [`fd1e9b5`](https://github.com/lifinance/sdk/commit/fd1e9b5ff481b35683d7b8557011c9c726446cdd) Thanks [@chybisov](https://github.com/chybisov)! - Add Stellar (STL) ecosystem support. Introduces the `@lifi/sdk-provider-stellar` package — address validation, Federation resolution, SAC-based balance reads, and route execution via `StellarStepExecutor` — and registers `ChainType.STL` in the SDK client's chain fetching so Stellar chains and RPC URLs load.
|
|
64
|
+
|
|
65
|
+
Execution signs the backend-generated Soroban envelope with the connected wallet, submits it over Stellar RPC, waits for on-chain confirmation, then tracks the transfer through the LI.FI status API. Because a Stellar envelope embeds the sender's account sequence number and a short-lived set of timebounds, the provider always requests a freshly built transaction immediately before signing rather than reusing the one attached to the quote. SAC allowances are granted first when a step requires one, and the approval is confirmed on-chain before the route transaction is requested.
|
|
66
|
+
|
|
67
|
+
`PrepareTransactionTask` gains a `shouldRefetchTransaction` hook. It defaults to the previous behaviour — fetch only when the step carries no transaction request — and the Stellar task overrides it, because a Stellar envelope embeds the sender's sequence number and cannot be reused.
|
|
68
|
+
|
|
15
69
|
`StellarProviderOptions.horizonUrl` is gone — nothing read it — and `StellarWallet.signAuthEntry` is now optional, because the router routes use source-account auth and the SDK never calls it. The provider also exports `DEFAULT_NETWORK_PASSPHRASE`, and refuses to sign when the connected wallet's network disagrees with the configured one.
|
|
16
70
|
|
|
17
71
|
## 4.3.0
|
package/README.md
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
[**LI.FI SDK**](https://docs.li.fi/sdk/overview) features include:
|
|
15
15
|
|
|
16
|
-
- **Modular architecture** - Install only the provider packages you need for your supported blockchain ecosystems (EVM, Solana, Bitcoin, Sui, Tron)
|
|
16
|
+
- **Modular architecture** - Install only the provider packages you need for your supported blockchain ecosystems (EVM, Solana, Bitcoin, Sui, Tron, Stellar)
|
|
17
17
|
- All ecosystems, chains, bridges, exchanges, and solvers that [LI.FI](https://docs.li.fi/introduction/chains) supports
|
|
18
18
|
- Complete functionality covering full-cycle from obtaining routes/quotes to executing transactions
|
|
19
19
|
- Easy tracking of the route and quote execution through the robust event and hooks handling
|
|
20
20
|
- Highly customizable settings to tailor the SDK to your specific needs including configuration of RPCs and options to allow or deny certain chains, tokens, bridges, exchanges, solvers
|
|
21
21
|
- Supports widely adopted industry standards, including [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792), [ERC-2612](https://eips.ethereum.org/EIPS/eip-2612), [EIP-712](https://eips.ethereum.org/EIPS/eip-712), and [Permit2](https://github.com/Uniswap/permit2)
|
|
22
|
-
- SDK ecosystem providers are based on industry-standard libraries ([Viem](https://viem.sh/) for EVM, [Solana Kit](https://github.com/
|
|
22
|
+
- SDK ecosystem providers are based on industry-standard libraries ([Viem](https://viem.sh/) for EVM, [Solana Kit](https://github.com/anza-xyz/kit) for Solana, [Bigmi](https://github.com/lifinance/bigmi) for Bitcoin, [Mysten Sui SDK](https://github.com/MystenLabs/sui/tree/main/sdk) for Sui, [TronWeb](https://tronweb.network/) for Tron, [Stellar SDK](https://github.com/stellar/js-stellar-sdk) for Stellar)
|
|
23
23
|
- Support for arbitrary contract calls on the destination chain
|
|
24
24
|
- Designed for optimal performance with tree-shaking and dead-code elimination, ensuring minimal bundle sizes and faster page load times in front-end environments
|
|
25
25
|
- Compatibility tested with Node.js and popular front-end tools like Vite
|
|
@@ -42,33 +42,47 @@ npm install --save @lifi/sdk
|
|
|
42
42
|
|
|
43
43
|
### Provider Packages
|
|
44
44
|
|
|
45
|
-
Install provider packages based on the blockchain ecosystems you want to support
|
|
45
|
+
Install provider packages based on the blockchain ecosystems you want to support.
|
|
46
|
+
|
|
47
|
+
Each provider bundles its ecosystem library, but you configure a provider by handing it a
|
|
48
|
+
wallet or client object that **you** construct — so install the ecosystem library alongside
|
|
49
|
+
the provider whenever you import from it in your own code:
|
|
46
50
|
|
|
47
51
|
**EVM Chains (Ethereum, Polygon, Arbitrum, Optimism, etc.)**
|
|
48
52
|
```bash
|
|
49
|
-
pnpm add @lifi/sdk-provider-ethereum
|
|
53
|
+
pnpm add @lifi/sdk-provider-ethereum viem
|
|
50
54
|
```
|
|
51
55
|
|
|
52
56
|
**Solana**
|
|
53
57
|
```bash
|
|
54
|
-
pnpm add @lifi/sdk-provider-solana
|
|
58
|
+
pnpm add @lifi/sdk-provider-solana @wallet-standard/base
|
|
55
59
|
```
|
|
56
60
|
|
|
57
61
|
**Bitcoin**
|
|
58
62
|
```bash
|
|
59
|
-
pnpm add @lifi/sdk-provider-bitcoin
|
|
63
|
+
pnpm add @lifi/sdk-provider-bitcoin @bigmi/core
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
**Sui**
|
|
63
67
|
```bash
|
|
64
|
-
pnpm add @lifi/sdk-provider-sui
|
|
68
|
+
pnpm add @lifi/sdk-provider-sui @mysten/sui
|
|
65
69
|
```
|
|
66
70
|
|
|
67
71
|
**Tron**
|
|
68
72
|
```bash
|
|
69
|
-
pnpm add @lifi/sdk-provider-tron
|
|
73
|
+
pnpm add @lifi/sdk-provider-tron @tronweb3/tronwallet-abstract-adapter
|
|
70
74
|
```
|
|
71
75
|
|
|
76
|
+
**Stellar**
|
|
77
|
+
```bash
|
|
78
|
+
pnpm add @lifi/sdk-provider-stellar
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`StellarProvider` takes a small `StellarWallet` interface the package defines itself, so it
|
|
82
|
+
needs no ecosystem library. To discover and connect browser wallets such as Freighter,
|
|
83
|
+
xBull, or Lobstr, we recommend
|
|
84
|
+
[Stellar Wallets Kit](https://github.com/Creit-Tech/Stellar-Wallets-Kit).
|
|
85
|
+
|
|
72
86
|
## Architecture
|
|
73
87
|
|
|
74
88
|
The LI.FI SDK uses a modular provider architecture:
|
|
@@ -119,6 +133,7 @@ import { SolanaProvider } from '@lifi/sdk-provider-solana'
|
|
|
119
133
|
import { BitcoinProvider } from '@lifi/sdk-provider-bitcoin'
|
|
120
134
|
import { SuiProvider } from '@lifi/sdk-provider-sui'
|
|
121
135
|
import { TronProvider } from '@lifi/sdk-provider-tron'
|
|
136
|
+
import { StellarProvider } from '@lifi/sdk-provider-stellar'
|
|
122
137
|
|
|
123
138
|
const client = createClient({
|
|
124
139
|
integrator: 'Your dApp/company name',
|
|
@@ -128,6 +143,7 @@ const client = createClient({
|
|
|
128
143
|
BitcoinProvider({ /* options */ }),
|
|
129
144
|
SuiProvider({ /* options */ }),
|
|
130
145
|
TronProvider({ /* options */ }),
|
|
146
|
+
StellarProvider({ /* options */ }),
|
|
131
147
|
],
|
|
132
148
|
})
|
|
133
149
|
```
|
|
@@ -9,8 +9,7 @@ import { ChainsRequest, ExtendedChain, RequestOptions } from "@lifi/types";
|
|
|
9
9
|
* @returns A list of all available chains
|
|
10
10
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
11
11
|
*/
|
|
12
|
-
declare const getChains: (client: SDKClient, params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
|
|
13
|
-
declare const _getChains: (config: SDKBaseConfig, params?: ChainsRequest, options?: RequestOptions) => Promise<ExtendedChain[]>;
|
|
12
|
+
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
14
|
//#endregion
|
|
15
|
-
export { _getChains, getChains };
|
|
16
15
|
//# sourceMappingURL=getChains.d.ts.map
|
|
@@ -8,7 +8,6 @@ import { ConnectionsRequest, ConnectionsResponse, RequestOptions } from "@lifi/t
|
|
|
8
8
|
* @param options - Request options
|
|
9
9
|
* @returns ConnectionsResponse
|
|
10
10
|
*/
|
|
11
|
-
declare const getConnections: (client: SDKClient, connectionRequest: ConnectionsRequest, options?: RequestOptions) => Promise<ConnectionsResponse>;
|
|
11
|
+
export declare const getConnections: (client: SDKClient, connectionRequest: ConnectionsRequest, options?: RequestOptions) => Promise<ConnectionsResponse>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { getConnections };
|
|
14
13
|
//# sourceMappingURL=getConnections.d.ts.map
|
|
@@ -9,7 +9,6 @@ import { ContractCallsQuoteRequest, LiFiStep, RequestOptions } from "@lifi/types
|
|
|
9
9
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
10
10
|
* @returns - Returns step.
|
|
11
11
|
*/
|
|
12
|
-
declare const getContractCallsQuote: (client: SDKClient, params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
12
|
+
export declare const getContractCallsQuote: (client: SDKClient, params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { getContractCallsQuote };
|
|
15
14
|
//# sourceMappingURL=getContractCallsQuote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContractCallsQuote.js","names":["SDKError","ValidationError","request"],"sources":["../../../src/actions/getContractCallsQuote.ts"],"sourcesContent":["import type {\n ContractCallsQuoteRequest,\n LiFiStep,\n RequestOptions,\n} from '@lifi/types'\nimport {\n isContractCallsRequestWithFromAmount,\n isContractCallsRequestWithToAmount,\n} from '@lifi/types'\nimport { ValidationError } from '../errors/errors.js'\nimport { SDKError } from '../errors/SDKError.js'\nimport type { SDKClient } from '../types/core.js'\nimport { request } from '../utils/request.js'\n\n/**\n * Get a quote for a destination contract call\n * @param client - The SDK client\n * @param params - The configuration of the requested destination call\n * @param options - Request options\n * @throws {LiFiError} - Throws a LiFiError if request fails\n * @returns - Returns step.\n */\nexport const getContractCallsQuote = async (\n client: SDKClient,\n params: ContractCallsQuoteRequest,\n options?: RequestOptions\n): Promise<LiFiStep> => {\n // validation\n const requiredParameters: Array<keyof ContractCallsQuoteRequest> = [\n 'fromChain',\n 'fromToken',\n 'fromAddress',\n 'toChain',\n 'toToken',\n 'contractCalls',\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 if (\n !isContractCallsRequestWithFromAmount(params) &&\n !isContractCallsRequestWithToAmount(params)\n ) {\n throw new SDKError(\n new ValidationError(\n `Required parameter \"fromAmount\" or \"toAmount\" is missing.`\n )\n )\n }\n // apply defaults\n // option.order is not used in this endpoint\n params.integrator ??= client.config.integrator\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 // send request\n return await request<LiFiStep>(\n client.config,\n `${client.config.apiUrl}/quote/contractCalls`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(params),\n signal: options?.signal,\n }\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,wBAAwB,OACnC,QACA,QACA,YACsB;CAUtB,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;CAGJ,IACE,EAAA,
|
|
1
|
+
{"version":3,"file":"getContractCallsQuote.js","names":["SDKError","ValidationError","isContractCallsRequestWithFromAmount","isContractCallsRequestWithToAmount","request"],"sources":["../../../src/actions/getContractCallsQuote.ts"],"sourcesContent":["import type {\n ContractCallsQuoteRequest,\n LiFiStep,\n RequestOptions,\n} from '@lifi/types'\nimport {\n isContractCallsRequestWithFromAmount,\n isContractCallsRequestWithToAmount,\n} from '@lifi/types'\nimport { ValidationError } from '../errors/errors.js'\nimport { SDKError } from '../errors/SDKError.js'\nimport type { SDKClient } from '../types/core.js'\nimport { request } from '../utils/request.js'\n\n/**\n * Get a quote for a destination contract call\n * @param client - The SDK client\n * @param params - The configuration of the requested destination call\n * @param options - Request options\n * @throws {LiFiError} - Throws a LiFiError if request fails\n * @returns - Returns step.\n */\nexport const getContractCallsQuote = async (\n client: SDKClient,\n params: ContractCallsQuoteRequest,\n options?: RequestOptions\n): Promise<LiFiStep> => {\n // validation\n const requiredParameters: Array<keyof ContractCallsQuoteRequest> = [\n 'fromChain',\n 'fromToken',\n 'fromAddress',\n 'toChain',\n 'toToken',\n 'contractCalls',\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 if (\n !isContractCallsRequestWithFromAmount(params) &&\n !isContractCallsRequestWithToAmount(params)\n ) {\n throw new SDKError(\n new ValidationError(\n `Required parameter \"fromAmount\" or \"toAmount\" is missing.`\n )\n )\n }\n // apply defaults\n // option.order is not used in this endpoint\n params.integrator ??= client.config.integrator\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 // send request\n return await request<LiFiStep>(\n client.config,\n `${client.config.apiUrl}/quote/contractCalls`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(params),\n signal: options?.signal,\n }\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,wBAAwB,OACnC,QACA,QACA,YACsB;CAUtB,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;CAGJ,IACE,EAAA,GAACC,YAAAA,qCAAAA,CAAqC,MAAM,KAC5C,EAAA,GAACC,YAAAA,mCAAAA,CAAmC,MAAM,GAE1C,MAAM,IAAIH,wBAAAA,SACR,IAAIC,sBAAAA,gBACF,2DACF,CACF;CAIF,OAAO,eAAe,OAAO,OAAO;CACpC,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,OAAO,MAAMG,sBAAAA,QACX,OAAO,QACP,GAAG,OAAO,OAAO,OAAO,uBACxB;EACE,QAAQ;EACR,SAAS,EACP,gBAAgB,mBAClB;EACA,MAAM,KAAK,UAAU,MAAM;EAC3B,QAAQ,SAAS;CACnB,CACF;AACF"}
|
|
@@ -9,7 +9,6 @@ import { GasRecommendationRequest, GasRecommendationResponse, RequestOptions } f
|
|
|
9
9
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
10
10
|
* @returns Gas recommendation response.
|
|
11
11
|
*/
|
|
12
|
-
declare const getGasRecommendation: (client: SDKClient, params: GasRecommendationRequest, options?: RequestOptions) => Promise<GasRecommendationResponse>;
|
|
12
|
+
export declare const getGasRecommendation: (client: SDKClient, params: GasRecommendationRequest, options?: RequestOptions) => Promise<GasRecommendationResponse>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { getGasRecommendation };
|
|
15
14
|
//# sourceMappingURL=getGasRecommendation.d.ts.map
|
|
@@ -8,7 +8,6 @@ import { ChainType } from "@lifi/types";
|
|
|
8
8
|
* @param chainType - The chain type to resolve the name on
|
|
9
9
|
* @returns The address of the name service
|
|
10
10
|
*/
|
|
11
|
-
declare const getNameServiceAddress: (client: SDKClient, name: string, chainType?: ChainType) => Promise<string | undefined>;
|
|
11
|
+
export declare const getNameServiceAddress: (client: SDKClient, name: string, chainType?: ChainType) => Promise<string | undefined>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { getNameServiceAddress };
|
|
14
13
|
//# sourceMappingURL=getNameServiceAddress.d.ts.map
|
|
@@ -10,8 +10,7 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
10
10
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
11
|
* @returns Quote for a token transfer
|
|
12
12
|
*/
|
|
13
|
-
declare function getQuote(client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions): Promise<LiFiStep>;
|
|
14
|
-
declare function getQuote(client: SDKClient, params: QuoteRequestToAmount, options?: RequestOptions): Promise<LiFiStep>;
|
|
13
|
+
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
15
|
//#endregion
|
|
16
|
-
export { getQuote };
|
|
17
16
|
//# sourceMappingURL=getQuote.d.ts.map
|
|
@@ -9,7 +9,6 @@ import { RelayStatusRequest, RelayStatusResponseData, RequestOptions } from "@li
|
|
|
9
9
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
10
10
|
* @returns Status of the relayed transaction
|
|
11
11
|
*/
|
|
12
|
-
declare const getRelayedTransactionStatus: (client: SDKClient, params: RelayStatusRequest, options?: RequestOptions) => Promise<RelayStatusResponseData>;
|
|
12
|
+
export declare const getRelayedTransactionStatus: (client: SDKClient, params: RelayStatusRequest, options?: RequestOptions) => Promise<RelayStatusResponseData>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { getRelayedTransactionStatus };
|
|
15
14
|
//# sourceMappingURL=getRelayedTransactionStatus.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
10
10
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
11
|
* @returns Relayer quote for a token transfer
|
|
12
12
|
*/
|
|
13
|
-
declare const getRelayerQuote: (client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions) => Promise<LiFiStep>;
|
|
13
|
+
export declare const getRelayerQuote: (client: SDKClient, params: QuoteRequestFromAmount, options?: RequestOptions) => Promise<LiFiStep>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getRelayerQuote };
|
|
16
15
|
//# sourceMappingURL=getRelayerQuote.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { RequestOptions, RoutesResponse } from "@lifi/types";
|
|
|
10
10
|
* @returns The resulting routes that can be used to realize the described transfer of tokens.
|
|
11
11
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
12
12
|
*/
|
|
13
|
-
declare const getRoutes: (client: SDKClient, params: RoutesRequest$1, options?: RequestOptions) => Promise<RoutesResponse>;
|
|
13
|
+
export declare const getRoutes: (client: SDKClient, params: RoutesRequest$1, options?: RequestOptions) => Promise<RoutesResponse>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getRoutes };
|
|
16
15
|
//# sourceMappingURL=getRoutes.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { RequestOptions, StatusResponse } from "@lifi/types";
|
|
|
10
10
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
11
|
* @returns Returns status response.
|
|
12
12
|
*/
|
|
13
|
-
declare const getStatus: (client: SDKClient, params: GetStatusRequestExtended, options?: RequestOptions) => Promise<StatusResponse>;
|
|
13
|
+
export declare const getStatus: (client: SDKClient, params: GetStatusRequestExtended, options?: RequestOptions) => Promise<StatusResponse>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getStatus };
|
|
16
15
|
//# sourceMappingURL=getStatus.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { LiFiStep, RequestOptions } from "@lifi/types";
|
|
|
10
10
|
* @returns The step populated with the transaction data.
|
|
11
11
|
* @throws {LiFiError} Throws a LiFiError if request fails.
|
|
12
12
|
*/
|
|
13
|
-
declare const getStepTransaction: (client: SDKClient, step: LiFiStepRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
13
|
+
export declare const getStepTransaction: (client: SDKClient, step: LiFiStepRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getStepTransaction };
|
|
16
15
|
//# sourceMappingURL=getStepTransaction.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { ChainId, ChainKey, RequestOptions, TokenExtended } from "@lifi/types";
|
|
|
10
10
|
* @throws {LiFiError} - Throws a LiFiError if request fails
|
|
11
11
|
* @returns Token information
|
|
12
12
|
*/
|
|
13
|
-
declare const getToken: (client: SDKClient, chain: ChainKey | ChainId, token: string, options?: RequestOptions) => Promise<TokenExtended>;
|
|
13
|
+
export declare const getToken: (client: SDKClient, chain: ChainKey | ChainId, token: string, options?: RequestOptions) => Promise<TokenExtended>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getToken };
|
|
16
15
|
//# sourceMappingURL=getToken.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { Token, TokenAmount } from "@lifi/types";
|
|
|
10
10
|
* @throws {ValidationError} Throws a ValidationError if validation fails.
|
|
11
11
|
* @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.
|
|
12
12
|
*/
|
|
13
|
-
declare const getTokenBalance: (client: SDKClient, walletAddress: string, token: Token) => Promise<TokenAmount | null>;
|
|
13
|
+
export declare const getTokenBalance: (client: SDKClient, walletAddress: string, token: Token) => Promise<TokenAmount | null>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getTokenBalance };
|
|
16
15
|
//# sourceMappingURL=getTokenBalance.d.ts.map
|
|
@@ -10,7 +10,6 @@ import { Token, TokenAmount } from "@lifi/types";
|
|
|
10
10
|
* @throws {ValidationError} Throws a ValidationError if validation fails.
|
|
11
11
|
* @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.
|
|
12
12
|
*/
|
|
13
|
-
declare function getTokenBalances(client: SDKClient, walletAddress: string, tokens: Token[]): Promise<TokenAmount[]>;
|
|
13
|
+
export declare function getTokenBalances(client: SDKClient, walletAddress: string, tokens: Token[]): Promise<TokenAmount[]>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { getTokenBalances };
|
|
16
15
|
//# sourceMappingURL=getTokenBalances.d.ts.map
|
|
@@ -2,11 +2,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_actions_getTokenBalancesByChain = require("./getTokenBalancesByChain.js");
|
|
3
3
|
//#region src/actions/getTokenBalances.ts
|
|
4
4
|
async function getTokenBalances(client, walletAddress, tokens) {
|
|
5
|
-
const
|
|
5
|
+
const tokensByChain = tokens.reduce((tokens, token) => {
|
|
6
6
|
if (!tokens[token.chainId]) tokens[token.chainId] = [];
|
|
7
7
|
tokens[token.chainId].push(token);
|
|
8
8
|
return tokens;
|
|
9
|
-
}, {})
|
|
9
|
+
}, {});
|
|
10
|
+
const tokenAmountsByChain = await require_actions_getTokenBalancesByChain.getTokenBalancesByChain(client, walletAddress, tokensByChain);
|
|
10
11
|
return Object.values(tokenAmountsByChain).flat();
|
|
11
12
|
}
|
|
12
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTokenBalances.js","names":["getTokenBalancesByChain"],"sources":["../../../src/actions/getTokenBalances.ts"],"sourcesContent":["import type {\n Token,\n TokenAmount,\n TokenAmountExtended,\n TokenExtended,\n} from '@lifi/types'\nimport type { SDKClient } from '../types/core.js'\nimport { getTokenBalancesByChain } from './getTokenBalancesByChain.js'\n\n/**\n * Returns the balances for a list tokens a wallet holds across all aggregated chains.\n * @param client - The SDK client.\n * @param walletAddress - A wallet address.\n * @param tokens - A list of Token (or TokenExtended) objects.\n * @returns A list of objects containing the tokens and the amounts on different chains.\n * @throws {ValidationError} Throws a ValidationError if validation fails.\n * @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.\n */\nexport async function getTokenBalances(\n client: SDKClient,\n walletAddress: string,\n tokens: Token[]\n): Promise<TokenAmount[]>\nexport async function getTokenBalances(\n client: SDKClient,\n walletAddress: string,\n tokens: TokenExtended[]\n): Promise<TokenAmountExtended[]> {\n // split by chain\n const tokensByChain = tokens.reduce(\n (tokens, token) => {\n if (!tokens[token.chainId]) {\n tokens[token.chainId] = []\n }\n tokens[token.chainId].push(token)\n return tokens\n },\n {} as { [chainId: number]: Token[] | TokenExtended[] }\n )\n\n const tokenAmountsByChain = await getTokenBalancesByChain(\n client,\n walletAddress,\n tokensByChain\n )\n return Object.values(tokenAmountsByChain).flat()\n}\n"],"mappings":";;;AAuBA,eAAsB,iBACpB,QACA,eACA,QACgC;
|
|
1
|
+
{"version":3,"file":"getTokenBalances.js","names":["getTokenBalancesByChain"],"sources":["../../../src/actions/getTokenBalances.ts"],"sourcesContent":["import type {\n Token,\n TokenAmount,\n TokenAmountExtended,\n TokenExtended,\n} from '@lifi/types'\nimport type { SDKClient } from '../types/core.js'\nimport { getTokenBalancesByChain } from './getTokenBalancesByChain.js'\n\n/**\n * Returns the balances for a list tokens a wallet holds across all aggregated chains.\n * @param client - The SDK client.\n * @param walletAddress - A wallet address.\n * @param tokens - A list of Token (or TokenExtended) objects.\n * @returns A list of objects containing the tokens and the amounts on different chains.\n * @throws {ValidationError} Throws a ValidationError if validation fails.\n * @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.\n */\nexport async function getTokenBalances(\n client: SDKClient,\n walletAddress: string,\n tokens: Token[]\n): Promise<TokenAmount[]>\nexport async function getTokenBalances(\n client: SDKClient,\n walletAddress: string,\n tokens: TokenExtended[]\n): Promise<TokenAmountExtended[]> {\n // split by chain\n const tokensByChain = tokens.reduce(\n (tokens, token) => {\n if (!tokens[token.chainId]) {\n tokens[token.chainId] = []\n }\n tokens[token.chainId].push(token)\n return tokens\n },\n {} as { [chainId: number]: Token[] | TokenExtended[] }\n )\n\n const tokenAmountsByChain = await getTokenBalancesByChain(\n client,\n walletAddress,\n tokensByChain\n )\n return Object.values(tokenAmountsByChain).flat()\n}\n"],"mappings":";;;AAuBA,eAAsB,iBACpB,QACA,eACA,QACgC;CAEhC,MAAM,gBAAgB,OAAO,QAC1B,QAAQ,UAAU;EACjB,IAAI,CAAC,OAAO,MAAM,UAChB,OAAO,MAAM,WAAW,CAAC;EAE3B,OAAO,MAAM,QAAQ,CAAC,KAAK,KAAK;EAChC,OAAO;CACT,GACA,CAAC,CACH;CAEA,MAAM,sBAAsB,MAAMA,wCAAAA,wBAChC,QACA,eACA,aACF;CACA,OAAO,OAAO,OAAO,mBAAmB,CAAC,CAAC,KAAK;AACjD"}
|
|
@@ -10,11 +10,10 @@ import { Token, TokenAmount } from "@lifi/types";
|
|
|
10
10
|
* @throws {ValidationError} Throws a ValidationError if validation fails.
|
|
11
11
|
* @throws {Error} Throws an Error if the SDK Provider for the wallet address is not found.
|
|
12
12
|
*/
|
|
13
|
-
declare function getTokenBalancesByChain(client: SDKClient, walletAddress: string, tokensByChain: {
|
|
13
|
+
export declare function getTokenBalancesByChain(client: SDKClient, walletAddress: string, tokensByChain: {
|
|
14
14
|
[chainId: number]: Token[];
|
|
15
15
|
}): Promise<{
|
|
16
16
|
[chainId: number]: TokenAmount[];
|
|
17
17
|
}>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { getTokenBalancesByChain };
|
|
20
19
|
//# sourceMappingURL=getTokenBalancesByChain.d.ts.map
|
|
@@ -8,12 +8,11 @@ import { RequestOptions, TokensExtendedResponse, TokensRequest, TokensResponse }
|
|
|
8
8
|
* @param options - Request options
|
|
9
9
|
* @returns The tokens that are available on the requested chains
|
|
10
10
|
*/
|
|
11
|
-
declare function getTokens(client: SDKClient, params?: TokensRequest & {
|
|
11
|
+
export declare function getTokens(client: SDKClient, params?: TokensRequest & {
|
|
12
12
|
extended?: false | undefined;
|
|
13
13
|
}, options?: RequestOptions): Promise<TokensResponse>;
|
|
14
|
-
declare function getTokens(client: SDKClient, params: TokensRequest & {
|
|
14
|
+
export declare function getTokens(client: SDKClient, params: TokensRequest & {
|
|
15
15
|
extended: true;
|
|
16
16
|
}, options?: RequestOptions): Promise<TokensExtendedResponse>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { getTokens };
|
|
19
18
|
//# sourceMappingURL=getTokens.d.ts.map
|
|
@@ -8,7 +8,6 @@ import { RequestOptions, ToolsRequest, ToolsResponse } from "@lifi/types";
|
|
|
8
8
|
* @param options - Request options
|
|
9
9
|
* @returns The tools that are available on the requested chains
|
|
10
10
|
*/
|
|
11
|
-
declare const getTools: (client: SDKClient, params?: ToolsRequest, options?: RequestOptions) => Promise<ToolsResponse>;
|
|
11
|
+
export declare const getTools: (client: SDKClient, params?: ToolsRequest, options?: RequestOptions) => Promise<ToolsResponse>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { getTools };
|
|
14
13
|
//# sourceMappingURL=getTools.d.ts.map
|
|
@@ -14,7 +14,6 @@ import { RequestOptions, TransactionAnalyticsRequest, TransactionAnalyticsRespon
|
|
|
14
14
|
* @throws {LiFiError} - Throws a LiFiError if request fails.
|
|
15
15
|
* @returns The transaction history response
|
|
16
16
|
*/
|
|
17
|
-
declare const getTransactionHistory: (client: SDKClient, { wallet, status, fromTimestamp, toTimestamp }: TransactionAnalyticsRequest, options?: RequestOptions) => Promise<TransactionAnalyticsResponse>;
|
|
17
|
+
export declare const getTransactionHistory: (client: SDKClient, { wallet, status, fromTimestamp, toTimestamp }: TransactionAnalyticsRequest, options?: RequestOptions) => Promise<TransactionAnalyticsResponse>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { getTransactionHistory };
|
|
20
19
|
//# sourceMappingURL=getTransactionHistory.d.ts.map
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { SDKClient } from "../types/core.js";
|
|
2
|
-
import { CexSessionRequest, CexSessionResult, CreateFundingOrderRequest, FundingOrder, GetFundingOrderParams, OnrampFiatCurrenciesRequest, OnrampFiatCurrenciesResult, OnrampQuoteRequest, OnrampQuoteResult, OnrampSessionRequest, OnrampSessionResult, WaitForFundingOrderOptions } from "../types/funding.js";
|
|
3
2
|
import { GetStatusRequestExtended, LiFiStepRequest, QuoteRequestFromAmount, RoutesRequest as RoutesRequest$1 } from "../types/actions.js";
|
|
4
3
|
import { getQuote } from "./getQuote.js";
|
|
5
4
|
import { PatchContractCallsResponse } from "./patchContractCalls.js";
|
|
6
5
|
import { ChainId, ChainKey, ChainType, ChainsRequest, ConnectionsRequest, ConnectionsResponse, ContractCallsQuoteRequest, ExtendedChain, GasRecommendationRequest, GasRecommendationResponse, LiFiStep, PatchCallDataRequest, RelayRequest, RelayResponseData, RelayStatusRequest, RelayStatusResponseData, RequestOptions, RoutesResponse, StatusResponse, Token, TokenAmount, TokenExtended, TokensExtendedResponse, TokensRequest, TokensResponse, ToolsRequest, ToolsResponse, TransactionAnalyticsRequest, TransactionAnalyticsResponse } from "@lifi/types";
|
|
7
6
|
//#region src/actions/index.d.ts
|
|
8
|
-
type Actions = {
|
|
9
|
-
/**
|
|
10
|
-
* Create a CEX session for a token
|
|
11
|
-
* @param params - The CEX session request
|
|
12
|
-
* @param options - Request options
|
|
13
|
-
* @returns The CEX session
|
|
14
|
-
*/
|
|
15
|
-
createCexSession: (params: CexSessionRequest, options?: RequestOptions) => Promise<CexSessionResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Create a funding order
|
|
18
|
-
* @param params - The funding order creation request
|
|
19
|
-
* @param options - Request options
|
|
20
|
-
* @returns The created funding order
|
|
21
|
-
*/
|
|
22
|
-
createFundingOrder: (params: CreateFundingOrderRequest, options?: RequestOptions) => Promise<FundingOrder>;
|
|
23
|
-
/**
|
|
24
|
-
* Create an on-ramp session for a token
|
|
25
|
-
* @param params - The on-ramp session request
|
|
26
|
-
* @param options - Request options
|
|
27
|
-
* @returns The on-ramp session
|
|
28
|
-
*/
|
|
29
|
-
createOnrampSession: (params: OnrampSessionRequest, options?: RequestOptions) => Promise<OnrampSessionResult>;
|
|
7
|
+
export type Actions = {
|
|
30
8
|
/**
|
|
31
9
|
* Get all available chains
|
|
32
10
|
* @param params - The configuration of the requested chains
|
|
@@ -48,14 +26,6 @@ type Actions = {
|
|
|
48
26
|
* @returns Quote for contract calls
|
|
49
27
|
*/
|
|
50
28
|
getContractCallsQuote: (params: ContractCallsQuoteRequest, options?: RequestOptions) => Promise<LiFiStep>;
|
|
51
|
-
/**
|
|
52
|
-
* Get a funding order by id
|
|
53
|
-
* @param orderId - The orderId or partnerOrderId
|
|
54
|
-
* @param params - Optional txHash / integrator query parameters
|
|
55
|
-
* @param options - Request options
|
|
56
|
-
* @returns The funding order
|
|
57
|
-
*/
|
|
58
|
-
getFundingOrder: (orderId: string, params?: GetFundingOrderParams, options?: RequestOptions) => Promise<FundingOrder>;
|
|
59
29
|
/**
|
|
60
30
|
* Get gas recommendation for a chain
|
|
61
31
|
* @param params - The configuration of the requested gas recommendation
|
|
@@ -70,20 +40,6 @@ type Actions = {
|
|
|
70
40
|
* @returns The address of the name service
|
|
71
41
|
*/
|
|
72
42
|
getNameServiceAddress: (name: string, chainType?: ChainType) => Promise<string | undefined>;
|
|
73
|
-
/**
|
|
74
|
-
* Get available fiat currencies for an on-ramp token
|
|
75
|
-
* @param params - The on-ramp fiat currencies request
|
|
76
|
-
* @param options - Request options
|
|
77
|
-
* @returns The available fiat currencies
|
|
78
|
-
*/
|
|
79
|
-
getOnrampFiatCurrencies: (params: OnrampFiatCurrenciesRequest, options?: RequestOptions) => Promise<OnrampFiatCurrenciesResult>;
|
|
80
|
-
/**
|
|
81
|
-
* Get an on-ramp fiat quote for a token
|
|
82
|
-
* @param params - The on-ramp quote request
|
|
83
|
-
* @param options - Request options
|
|
84
|
-
* @returns The on-ramp quote
|
|
85
|
-
*/
|
|
86
|
-
getOnrampQuote: (params: OnrampQuoteRequest, options?: RequestOptions) => Promise<OnrampQuoteResult>;
|
|
87
43
|
/**
|
|
88
44
|
* Get a quote for a token transfer
|
|
89
45
|
* @param params - The configuration of the requested quote
|
|
@@ -204,15 +160,7 @@ type Actions = {
|
|
|
204
160
|
* @returns Patched contract calls
|
|
205
161
|
*/
|
|
206
162
|
patchContractCalls: (params: PatchCallDataRequest, options?: RequestOptions) => Promise<PatchContractCallsResponse[]>;
|
|
207
|
-
/**
|
|
208
|
-
* Poll a funding order until it reaches a terminal state
|
|
209
|
-
* @param orderId - The orderId to poll
|
|
210
|
-
* @param options - Polling options
|
|
211
|
-
* @returns The terminal funding order
|
|
212
|
-
*/
|
|
213
|
-
waitForFundingOrder: (orderId: string, options?: WaitForFundingOrderOptions) => Promise<FundingOrder>;
|
|
214
163
|
};
|
|
215
|
-
declare function actions(client: SDKClient): Actions;
|
|
164
|
+
export declare function actions(client: SDKClient): Actions;
|
|
216
165
|
//#endregion
|
|
217
|
-
export { Actions, actions };
|
|
218
166
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_actions_createCexSession = require("./createCexSession.js");
|
|
3
|
-
const require_actions_createFundingOrder = require("./createFundingOrder.js");
|
|
4
|
-
const require_actions_createOnrampSession = require("./createOnrampSession.js");
|
|
5
2
|
const require_actions_getChains = require("./getChains.js");
|
|
6
3
|
const require_actions_getConnections = require("./getConnections.js");
|
|
7
4
|
const require_actions_getContractCallsQuote = require("./getContractCallsQuote.js");
|
|
8
|
-
const require_actions_getFundingOrder = require("./getFundingOrder.js");
|
|
9
5
|
const require_actions_getGasRecommendation = require("./getGasRecommendation.js");
|
|
10
6
|
const require_actions_getNameServiceAddress = require("./getNameServiceAddress.js");
|
|
11
|
-
const require_actions_getOnrampFiatCurrencies = require("./getOnrampFiatCurrencies.js");
|
|
12
|
-
const require_actions_getOnrampQuote = require("./getOnrampQuote.js");
|
|
13
7
|
const require_actions_getQuote = require("./getQuote.js");
|
|
14
8
|
const require_actions_getStatus = require("./getStatus.js");
|
|
15
9
|
const require_actions_getRelayedTransactionStatus = require("./getRelayedTransactionStatus.js");
|
|
@@ -25,21 +19,14 @@ const require_actions_getTools = require("./getTools.js");
|
|
|
25
19
|
const require_actions_getTransactionHistory = require("./getTransactionHistory.js");
|
|
26
20
|
const require_actions_patchContractCalls = require("./patchContractCalls.js");
|
|
27
21
|
const require_actions_relayTransaction = require("./relayTransaction.js");
|
|
28
|
-
const require_actions_waitForFundingOrder = require("./waitForFundingOrder.js");
|
|
29
22
|
//#region src/actions/index.ts
|
|
30
23
|
function actions(client) {
|
|
31
24
|
return {
|
|
32
|
-
createCexSession: (params, options) => require_actions_createCexSession.createCexSession(client, params, options),
|
|
33
|
-
createFundingOrder: (params, options) => require_actions_createFundingOrder.createFundingOrder(client, params, options),
|
|
34
|
-
createOnrampSession: (params, options) => require_actions_createOnrampSession.createOnrampSession(client, params, options),
|
|
35
25
|
getChains: (params, options) => require_actions_getChains.getChains(client, params, options),
|
|
36
26
|
getConnections: (params, options) => require_actions_getConnections.getConnections(client, params, options),
|
|
37
27
|
getContractCallsQuote: (params, options) => require_actions_getContractCallsQuote.getContractCallsQuote(client, params, options),
|
|
38
|
-
getFundingOrder: (orderId, params, options) => require_actions_getFundingOrder.getFundingOrder(client, orderId, params, options),
|
|
39
28
|
getGasRecommendation: (params, options) => require_actions_getGasRecommendation.getGasRecommendation(client, params, options),
|
|
40
29
|
getNameServiceAddress: (name, chainType) => require_actions_getNameServiceAddress.getNameServiceAddress(client, name, chainType),
|
|
41
|
-
getOnrampFiatCurrencies: (params, options) => require_actions_getOnrampFiatCurrencies.getOnrampFiatCurrencies(client, params, options),
|
|
42
|
-
getOnrampQuote: (params, options) => require_actions_getOnrampQuote.getOnrampQuote(client, params, options),
|
|
43
30
|
getTokens: (params, options) => require_actions_getTokens.getTokens(client, params, options),
|
|
44
31
|
getTools: (params, options) => require_actions_getTools.getTools(client, params, options),
|
|
45
32
|
getQuote: (params, options) => require_actions_getQuote.getQuote(client, params, options),
|
|
@@ -54,8 +41,7 @@ function actions(client) {
|
|
|
54
41
|
getTokenBalancesByChain: (walletAddress, tokensByChain) => require_actions_getTokenBalancesByChain.getTokenBalancesByChain(client, walletAddress, tokensByChain),
|
|
55
42
|
getTransactionHistory: (params, options) => require_actions_getTransactionHistory.getTransactionHistory(client, params, options),
|
|
56
43
|
relayTransaction: (params, options) => require_actions_relayTransaction.relayTransaction(client, params, options),
|
|
57
|
-
patchContractCalls: (params, options) => require_actions_patchContractCalls.patchContractCalls(client, params, options)
|
|
58
|
-
waitForFundingOrder: (orderId, options) => require_actions_waitForFundingOrder.waitForFundingOrder(client, orderId, options)
|
|
44
|
+
patchContractCalls: (params, options) => require_actions_patchContractCalls.patchContractCalls(client, params, options)
|
|
59
45
|
};
|
|
60
46
|
}
|
|
61
47
|
//#endregion
|