node rpc urls for full functionality
Optional. If not defined, the default mainnet parameters are used.
Readonly
paramsPrivate
serviceCalculates the percentage of fee that is charged when swapping to the selected destination chain. The destination chain fee percent applies to the amount after the source chain fee. (Does not include fee related to the source chain. Does not include gas fee)
calculateFeePercentOnSourceChain
fee percent
initial amount of tokens to swap
selected token on the source chain
selected token on the destination chain
Calculates the percentage of fee from the initial amount that is charged when swapping from the selected source chain. (Does not include fee related to the destination chain. Does not include gas fee)
fee percent
initial amount of tokens to swap
selected token on the source chain
Returns ChainDetailsMap containing a list of supported tokens groped by chain.
A string value which specifies ChainDetailsMap to retrieve. Can be either 'swap' for send or 'pool' for liquidity pools setup. Defaults to 'swap'.
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 destToken
amount of vUsd, int format
selected token on the destination chain
Calculates the amount of tokens to be received as a result of transfer.
the amount of tokens that will be sent
selected token on the source chain
selected token on the destination chain
Optional
messenger: MessengerOptional. selected messenger
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
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
Optional
messenger: MessengerOptional. selected messenger
Optional
sourceProvider: ProviderOptional. source chain Provider
Optional
destinationProvider: 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
Optional
messenger: MessengerOptional. selected messenger
Calculates the amount of tokens to send based on requested tokens amount be received as a result of transfer.
the amount of tokens that should be received
selected token on the source chain
selected token on the destination chain
Optional
messenger: MessengerOptional. selected messenger
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
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
Optional
messenger: MessengerOptional. selected messenger
Optional
sourceProvider: ProviderOptional. source chain Provider
Optional
destinationProvider: 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
Optional
messenger: MessengerOptional. selected messenger
Gets the average time in ms to complete a transfer for given tokens and messenger.
Average transfer time in milliseconds or null if a given combination of tokens and messenger is not supported.
selected token on the source chain.
selected token on the destination chain.
selected token on the source chain
selected token on the destination chain
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.
selected token on the source chain
selected token on the destination chain
Get native (gas) token balance
Token balance
Optional
provider: ProviderReturns 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.
range of possible amount based on already pending transactions
the amount of tokens that will be sent
amount format
selected token transfer from
selected token transfer to
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
Token balance
Optional
provider: ProviderFetches 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.
virtual amount
amount
AmountFormat
selected token on the source chain
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.+
Optional
tokens: TokenWithChainDetails | TokenWithChainDetails[]if present, the corresponding liquidity pools will be updated
Use getAmountToBeReceived and then getSendAmountDetails
Returns a list of supported tokens.
A promise that resolves to an array of TokenWithChainDetails.
A string value which specifies a set of tokens to retrieve. Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations. Defaults to 'swap'.
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.
A string value which specifies a set of tokens to retrieve. Can be either 'swap' for tokens to send or 'pool' for liquidity pools operations. Defaults to 'swap'.
Generated using TypeDoc
Initializes the SDK object.