Link.transfer

Link.transfer

REGISTRATION IS REQUIRED FOR RECEIVER WALLET

link.transfer will only work if the receiver wallet was previously registered withXpansionChain.

To register the wallet, simply do Connect Wallet in the XpansionChainMarketplace and follow through all the steps until the wallet is fully connected to XpansionChain Marketplace

LINK REFERENCE TOOL

Check out our Link reference tool to understand how Link methods work without having to write any code.

As of 1.0.0, the @imtbl/imx-sdk supports transferring multiple tokens at once. To begin a new transfer flow, link should be called like so:

// eg: here is a sample link.transfer call:
const transferResponsePayload: TransferV2ResultsCodec = await link.transfer([
  {
    amount: '1.23',
    symbol: 'GODS',
    type: ERC20TokenType.ERC20,
    tokenAddress: '0x4c04c39fb6d2b356ae8b06c47843576e32a1963e',
    toAddress: 'replace-this-with-a-receiver-address',
  },
  {
    amount: '0.23',
    type: ETHTokenType.ETH,
    toAddress: 'replace-this-with-a-receiver-address',
  },
]);

To make this change possible, the link.transfer SDK method has had the following interface & type changes:

The promise response signature from the old link.transfer method is void

To better allow transparency and show which transfers failed and which transfers passed, the new link.transfer method resolves with a transaction status report:

Errors

See error responses here.

Last updated