Prerequisites

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

Sending a Transaction

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

const { wallet } = useWallet();

const evmWallet = EVMWallet.from(wallet);

const { hash, explorerLink } = await evmWallet.sendTransaction({
    to: '0x...',
    value: '0x1234abcd...',
    data: '0x1234abcd...',
});

Parameters

transaction
EVMTransactionInput
required

The transaction to send.

Returns

hash
string

The hash of the transaction.

The explorer link of the transaction.