node rpc urls for full functionality
Optional. If not defined, the default mainnet parameters are used.
initial 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
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 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 separately call one of: getAmountToBeReceived, getAmountToBeReceivedFromChain, or getAmountToBeReceivedFromPools.
OptionalsourceProvider: ProviderOptionaldestinationProvider: ProviderCalculates 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 separately call one of: getAmountToSend, getAmountToSendFromChain, or getAmountToSendFromPools.
OptionalsourceProvider: ProviderOptionaldestinationProvider: ProviderGets 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.
Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
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
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
Use getAmountToBeReceived and then getSendAmountDetails
Optionaltype: "swap"
Initializes the SDK object.