Required params to handle bridge transfer (transfer between chains)

interface SendParams {
    amount: string;
    destinationToken: TokenWithChainDetails;
    extraGas?: string;
    extraGasFormat?: AmountFormat;
    fee?: string;
    feeFormat?: AmountFormat;
    fromAccountAddress: string;
    gasFeePaymentMethod?: FeePaymentMethod;
    messenger: Messenger;
    sourceToken: TokenWithChainDetails;
    toAccountAddress: string;
    txFeeParams?: TxFeeParams;
}

Hierarchy (View Summary)

Properties

amount: string

The float amount of Total tokens to transfer.

In Send case If SendParams#gasFeePaymentMethod is FeePaymentMethod#WITH_STABLECOIN:
Includes gas fee
Includes extra gas

destinationToken: TokenWithChainDetails

The token info object on the destination chain.

extraGas?: string

The amount of extra gas to transfer to gas on destination chain with the transfer.
To get maximum supported value, look AllbridgeCoreSdk#getExtraGasMaxLimits

If gasFeePaymentMethod is FeePaymentMethod#WITH_NATIVE_CURRENCY then it is amount of the source chain currency.

if gasFeePaymentMethod is FeePaymentMethod#WITH_STABLECOIN then it is amount of the source token.

Optional.

extraGasFormat?: AmountFormat

Format of extra gas value.

Optional. AmountFormat.INT by default.

fee?: string

The amount of gas fee to pay for the transfer.

If gasFeePaymentMethod is FeePaymentMethod#WITH_NATIVE_CURRENCY then it is amount of the source chain currency.

If gasFeePaymentMethod is FeePaymentMethod#WITH_STABLECOIN then it is amount of the source token.

Optional. If not defined, the default fee amount will be applied according to gasFeePaymentMethod. See method AllbridgeCoreSdk#getGasFeeOptions to get required gas fee amount.

feeFormat?: AmountFormat

Format of fee value.

Optional. AmountFormat.INT by default.

fromAccountAddress: string

The account address to transfer tokens from.

gasFeePaymentMethod?: FeePaymentMethod

Payment method for the gas fee and extra gas payment.

WITH_NATIVE_CURRENCY - gas fee and extra gas will be added to transaction as native tokens value WITH_STABLECOIN - gas fee and extra gas will be deducted from the transaction amount

Optional. WITH_NATIVE_CURRENCY by default.

messenger: Messenger

The Messenger to use.

The token info object on the source chain.

toAccountAddress: string

The account address to transfer tokens to.

txFeeParams?: TxFeeParams