Skip to main content

Prerequisites

  • Wallet: Create a wallet to transfer from.
  • Operational Signer: The signing wallet must be registered as an operational signer on the wallet. You can do this at wallet creation by passing delegatedSigners, or afterward by registering a signer.
  • 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 onchain. This creates an onchain 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 onchain transaction using the explorerLink returned by the send method (available in the React and React Native SDKs):
console.log("View transaction:", explorerLink);
// Example: https://sepolia.basescan.org/tx/0xe5844116732d6cd21127bfc100ba29aee02b82cc4ab51e134d44e719ca8d0b48
When using the Node.js SDK with experimental_prepareOnly mode, explorerLink is not returned. You can check the transaction status using the transactionId via the API reference.
  1. Check the recipient’s balance programmatically using the check balances API.

Next steps