Skip to main content

Prerequisites

  • Wallet: Create a wallet to transfer from.
  • Test Tokens: Fund your wallet with USDXM testnet tokens before transferring.
  • API Key: Get an API key with the wallets:transactions.create scope. In staging, all scopes are included by default.

What is a token transfer?

A token transfer moves a token from one wallet address to another on-chain. This creates an on-chain transaction that costs gas, which Crossmint handles for you. Once the blockchain confirms the transaction, the transfer is final and cannot be reversed.

Sending tokens

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

const { wallet } = useWallet();

const { hash, explorerLink } = await wallet.send("0x0D282906CDD8F6934d60E4dCAa79fa5B1c7a1925", "usdxm", "3.14");
See the React SDK reference for more details.
See the API reference for all supported locator formats.

Verify your transfer

Once the transfer completes, you can verify it in two ways:
  1. View the on-chain transaction using the explorerLink returned by the send method:
console.log("View transaction:", explorerLink);
// Example: https://sepolia.basescan.org/tx/0xe5844116732d6cd21127bfc100ba29aee02b82cc4ab51e134d44e719ca8d0b48
  1. Check the recipient’s balance programmatically using the check balances API.

Next steps