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, SolanaWallet } from '@crossmint/client-sdk-react-ui';

const { wallet } = useWallet();

const solanaWallet = SolanaWallet.from(wallet);

const { hash, explorerLink } = await solanaWallet.sendTransaction({
    transaction: versionedTransaction,
    additionalSigners: additionalSigners,
});

Parameters

transaction
VersionedTransaction
required
The transaction to send.
additionalSigners
Signer[]
The additional signers to sign the transaction with.

Returns

hash
string
The hash of the transaction.
The explorer link of the transaction.