Prerequisites

  • Ensure you have a wallet created.
  • API Key: Ensure you have an API key with the scopes: wallets:transactions.create.

Sending tokens

import { useWallet } from '@crossmint/client-sdk-react-ui';

const { wallet } = useWallet();

const { hash, explorerLink } = await wallet.send(walletLocator, tokenLocator, amount);

Parameters

walletLocator
string
required

The wallet locator to send the tokens from. A wallet locator can be of the format:

  • <walletAddress>
  • email:<email>:<walletType>
  • userId:<userId>:<walletType>
  • userId:<userId>:<walletType> (white label user example)
  • phoneNumber:<phoneNumber>:<walletType>
  • twitter:<handle>:<walletType>
  • x:<handle>:<walletType>
tokenLocator
string
required

The token locator to send the tokens to.

A token locator that supports native tokens, fungible tokens, and NFTs across different chains. It can be of the format:

  • address[:tokenId]
  • symbol
amount
string
required

The amount of tokens to send.

Returns

hash
string

The hash of the transaction.

The explorer link of the transaction.

Sending tokens across chains

Sending and receiving tokens across different chains is available under private access. Contact us if you need access