Allbridge Core
LAUNCH APP
  • What is Allbridge Core?
  • ⚪Product
    • How does Allbridge Core work?
      • Fees
      • Messaging protocols
      • Allbridge Core contracts
      • Token value
      • Liquidity provision
    • FAQ
      • How to bridge with Allbridge Core via mobile TronLink
      • Allbridge Core guide
      • How to provide liquidity?
      • What is an Approve Transaction?
    • Security audits
    • Ecosystem reports
    • Leaderboard
  • ⚪Allbridge Core SDK
    • Get started
    • Guides
      • General
        • Token info
        • Send
        • Swap
        • Paying fees with stables
      • EVM
        • Transfer
        • Allowance and approve
      • Solana
        • Transfer
        • Swap
      • Tron
      • Stellar
        • Transfer
      • Utilities
        • Amount and fee calculations
        • Transfer time
        • Extra gas limits
    • Technical reference
    • Referral program
    • Allbridge Core REST API
  • ⚪official support
    • Telegram
    • Discord
  • ⚪Social links
    • Twitter
    • Discord
    • Telegram announcements
    • Telegram group
    • Medium
    • Reddit
  • ⚪Allbridge ecosystem
    • Allbridge Classic
    • Allbridge BaaS
Powered by GitBook
On this page

Was this helpful?

  1. Allbridge Core SDK
  2. Guides
  3. General

Send

PreviousToken infoNextSwap

Last updated 1 year ago

Was this helpful?

The most common and important action in SDK is sending a transfer. To make it first of all you have to build a transaction. For that, you need to call the method. It has the following fields:

amount: (string) - total amount to send in float format. If you pay a fee with stables also includes fee and extra gas amount.

destinationToken: token you want to send has got from

sourceToken: token you want to receive have got from

extraGas: (string, optional) If you want to receive extra gas tokens on a destination chain, you have to add this field. Limits for extra gas you can get

extraGasFormat: ( enum INT or FLOAT. Default: INT) Define the format of the extraGas field

fee: (string, optional) to set manually amount of the fee to pay for the transfer. If it is not specified, the fee is set according to method. Value currency depends on gasFeePaymentMethod field - NATIVE_CURRENCY or STABLECOIN respectively

feeFormat: ( enum INT or FLOAT. Default: INT) Define the format of the fee field

fromAccountAddress: (string) sender address

toAccountAddress: (string) recipient address

gasFeePaymentMethod: (, optional, default: WITH_NATIVE_CURRENCY) WITH_NATIVE_CURRENCY - gas fee and extra gas will be added to the transaction as native token value WITH_STABLECOIN - gas fee and extra gas will be deducted from the amount field

messenger: () Could be ALLBRIDGE, WORMHOLE, CCTP. Not all chains and tokens support all messengers. To check it you can call method, and if the messenger is not supported it returns null

txFeeParams: (, optional) additional fee for sending transaction blockchain. Now used only for Solana to add extra fee instructions in the transaction. For more details see

const rawTx = await sdk.bridge.rawTxBuilder.send(sendParams);

The method will return a accounting to the source chain. You need only to sign and send it.

If you want to build a swap transaction you have to use this method also, but with the tokens on the same chain and more simpler

⚪
send
token info
token info
here
AmountFormat
getGasFeeOptions
AmountFormat
enum
enum
getAverageTransferTime
object
docs
raw transaction
args