node rpc urls for full functionality
Optional. If not defined, the default mainnet parameters are used.
LI.FI Intents (Messenger.LIFI_INTENTS) quotes and orders, see LifiIntentsService.
NEAR Intents (Messenger.NEAR_INTENTS) quotes and deposits, see NearIntentsService.
Readonlyparamsinitial amount of tokens to swap
selected token on the source chain
selected token on the destination chain
fee percent
initial amount of tokens to swap
selected token on the source chain
fee percent
Returns ChainDetailsMap containing a list of tokens for liquidity pools operations grouped by chain.
'pool'
Returns ChainDetailsMap containing a list of supported tokens grouped by chain.
Optionaltype: "swap"Optional. 'swap' (tokens to send) is the only supported value and the default.
Returns ChainDetailsMap containing a list of supported tokens grouped by chain.
'swap' for tokens to send. The 'pool' value (liquidity pools setup) is deprecated. Do not use.
Check address and show gas balance
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
Optional_tokenAddress: stringamount of vUsd, int format
selected token on the destination chain
amount of destToken
Calculates the amount of tokens to be received as a result of transfer through a legacy messenger.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
Calculates the amount of tokens to be received as a result of transfer
after applying the fee of the selected messenger.
For Messenger.NEAR_INTENTS the amount is the amountOut of an EXACT_INPUT quote: live (the Core API
waits for NEAR Intents solvers, about 3 s) or estimated from recent quotes on the route;
see NearIntentsService.getQuote for minAmountOut and estimated.
For Messenger.LIFI_INTENTS the amount is the amountOut of an EXACT_INPUT quote from the Core API;
see LifiIntentsService.getQuote for the Allbridge fee.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
selected messenger, see ActiveMessenger
CCTPDoesNotSupportedError, OFTDoesNotSupportedError, NearIntentsDoesNotSupportedError, LifiIntentsDoesNotSupportedError or SdkError if the route is not supported by the messenger; NearIntentsAmountTooLowError, NearIntentsNoLiquidityError or NearIntentsQuoteError if NEAR Intents has no quote; LifiIntentsAmountTooLowError, LifiIntentsAmountTooHighError, LifiIntentsNoQuoteError or LifiIntentsQuoteError if LI.FI Intents has no quote
Calculates the amount of tokens to be received as a result of transfer and fetches GasFeeOptions which contains available ways to pay the gas fee.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
Use getGasFeeOptions and getAmountToBeReceived.
Calculates the amount of tokens to be received as a result of transfer based on actual blockchain pool state.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
selected messenger
OptionalsourceProvider: ProviderOptional. source chain Provider
OptionaldestinationProvider: ProviderOptional. destination chain Provider
Calculates the amount of tokens to be received as a result of transfer based on passed pool state.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
source token pool state
destination token pool state
selected messenger
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer through a legacy messenger.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer
after applying the fee of the selected messenger.
For Messenger.NEAR_INTENTS the amount is the amountIn of an EXACT_OUTPUT quote: live (the Core API
waits for NEAR Intents solvers, about 3 s) or estimated from recent quotes on the route;
see NearIntentsService.getQuote for estimated.
For Messenger.LIFI_INTENTS the amount is the amountIn of an EXACT_OUTPUT quote from the Core API
(the Allbridge fee included); see LifiIntentsService.getQuote.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
selected messenger, see ActiveMessenger
CCTPDoesNotSupportedError, OFTDoesNotSupportedError, NearIntentsDoesNotSupportedError, LifiIntentsDoesNotSupportedError or SdkError if the route is not supported by the messenger; NearIntentsAmountTooLowError, NearIntentsNoLiquidityError or NearIntentsQuoteError if NEAR Intents has no quote; LifiIntentsAmountTooLowError, LifiIntentsAmountTooHighError, LifiIntentsNoQuoteError or LifiIntentsQuoteError if LI.FI Intents has no quote
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer. and fetches GasFeeOptions which contains available ways to pay the gas fee.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
Use getGasFeeOptions and getAmountToSend.
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on actual blockchain pool state.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
selected messenger
OptionalsourceProvider: ProviderOptional. source chain Provider
OptionaldestinationProvider: ProviderOptional. destination chain Provider
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer based on passed pool state.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
source token pool state
destination token pool state
selected messenger
Gets the average time in ms to complete a transfer for given tokens and messenger.
selected token on the source chain.
selected token on the destination chain.
selected messenger, see ActiveMessenger
Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
Get possible limit of extra gas amount for a legacy messenger.
selected token on the source chain
selected token on the destination chain
Get possible limit of extra gas amount. For Messenger.X_RESERVE, Messenger.NEAR_INTENTS and Messenger.LIFI_INTENTS extra gas is not supported and zero limits are returned.
selected token on the source chain
selected token on the destination chain
selected messenger, see ActiveMessenger
Get gas balance
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
Fetches possible ways to pay the transfer gas fee.
selected token on the source chain
selected token on the destination chain
selected messenger, see ActiveMessenger
GasFeeOptions; for Messenger.NEAR_INTENTS and Messenger.LIFI_INTENTS only a zero native fee (the protocol fee is inside the quote)
Get native (gas) token balance
Optionalprovider: ProviderToken balance
Returns information about pending transactions for the same destination chain and the amount of tokens can be received as a result of transfer considering pending transactions.
the amount of tokens that will be sent
amount format
selected token transfer from
selected token transfer to
range of possible amount based on already pending transactions
Gets information about the poolInfo by token
poolInfo
Show amount changes (fee and amount adjustment) during send through pools on source and destination chains
Get token balance
Optionalprovider: ProviderToken balance
Fetches information about tokens transfer by chosen chainSymbol and transaction Id from the Allbridge Core API.
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
amount
AmountFormat
selected token on the source chain
virtual amount
Forces refresh of cached information about the state of liquidity pools. Outdated cache leads to calculated amounts being less accurate. The cache is invalidated at regular intervals, but it can be forced to be refreshed by calling this method.+
Optionaltokens: TokenWithChainDetails | TokenWithChainDetails[]if present, the corresponding liquidity pools will be updated
Returns a list of tokens for liquidity pools operations.
'pool'
Returns a list of supported tokens.
Optionaltype: "swap"Optional. 'swap' (tokens to send) is the only supported value and the default.
A promise that resolves to an array of TokenWithChainDetails.
Returns a list of supported tokens.
'swap' for tokens to send. The 'pool' value (liquidity pools operations) is deprecated. Do not use.
A promise that resolves to an array of TokenWithChainDetails.
Returns a list of tokens for liquidity pools operations on the selected chain.
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
'pool'
Returns a list of supported tokens on the selected chain.
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
Optionaltype: "swap"Optional. 'swap' (tokens to send) is the only supported value and the default.
Returns a list of supported tokens on the selected chain.
The symbol of the chain representing one of the supported blockchain networks (e.g., "ETH" for Ethereum). For more details, see: ChainSymbol.
'swap' for tokens to send. The 'pool' value (liquidity pools operations) is deprecated. Do not use.
Initializes the SDK object.