Skip to main content
This page has been updated for Wallets SDK V1. If you are using the previous version, see the previous version of this page or the V1 migration guide.

Prerequisites

  • Ensure you have a wallet created.
  • Signer: The signing wallet must be registered as a signer on the wallet. You can do this at wallet creation by passing signers, or afterward by adding a signer.
  • API Key: Ensure you have an API key with the scopes: wallets:transactions.create.

What is sending a custom transaction?

Sending a custom transaction lets you interact with any smart contract on the blockchain beyond simple transfers. Common use cases include minting free tokens, claiming rewards, or registering for allowlists—all without needing to manage private keys yourself.

Sending a Transaction

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

const { wallet } = useWallet();

const evmWallet = EVMWallet.from(wallet);

// Replace with the target contract address
const TARGET_CONTRACT = "0x...";
// Replace with the calldata for your contract interaction
const CALL_DATA = "0x...";

const { hash, explorerLink } = await evmWallet.sendTransaction({
    to: TARGET_CONTRACT,
    value: BigInt(0),
    data: CALL_DATA,
});
See the React SDK reference for more details.