Prerequisites
- Ensure you have a wallet created.
- API Key: Ensure you have an API key with the scopes:
wallets:transactions.create.
Sending a Transaction
- React
- Node.js
- React Native
- Swift
- REST
Copy
Ask AI
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
The transaction to send.
The additional signers to sign the transaction with.
Returns
The hash of the transaction.
The explorer link of the transaction.
Copy
Ask AI
import { CrossmintWallets, createCrossmint, SolanaWallet } from "@crossmint/wallets-sdk";
const crossmint = createCrossmint({
apiKey: "<your-server-api-key>",
});
const crossmintWallets = CrossmintWallets.from(crossmint);
const wallet = await crossmintWallets.getWallet(
"email:[email protected]:solana",
{ chain: "solana", signer: { type: "email" } }
);
const solanaWallet = SolanaWallet.from(wallet);
const { hash, explorerLink } = await solanaWallet.sendTransaction({
transaction: versionedTransaction,
additionalSigners: additionalSigners,
});
Parameters
The transaction to send.
The additional signers to sign the transaction with.
Returns
The hash of the transaction.
The explorer link of the transaction.
Copy
Ask AI
import { useWallet, SolanaWallet } from '@crossmint/client-sdk-react-native-ui';
const { wallet } = useWallet();
const solanaWallet = SolanaWallet.from(wallet);
const { hash, explorerLink } = await solanaWallet.sendTransaction({
transaction: versionedTransaction,
additionalSigners: additionalSigners,
});
Parameters
The transaction to send.
The additional signers to sign the transaction with.
Returns
The hash of the transaction.
The explorer link of the transaction.
Copy
Ask AI
import CrossmintClient
import Wallet
let sdk = CrossmintSDK.shared
let wallet = try await sdk.crossmintWallets.getOrCreateWallet(
chain: .solana,
signer: .email("[email protected]")
)
let solanaWallet = try SolanaWallet.from(wallet: wallet)
let result = try await solanaWallet.sendTransaction(transaction)
Parameters
The transaction to send.
Returns
The hash of the transaction.
The explorer link of the transaction.
Transactions must be approved by one of the wallet’s signers.
The SDK handles this automatically, but with the REST API you must approve the transaction to complete it.Sign the approval message field returned in the response inside
1
Create the transaction
Call the create transaction endpoint.See the API reference for more details.
Copy
Ask AI
curl --request POST \
--url https://staging.crossmint.com/api/2025-06-09/wallets/email:[email protected]:solana/transactions \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"params": {
"transaction": "AQAAAAAAAAAAAAA...",
"signer": "email:[email protected]"
}
}'
2
Sign the approval returned in the response
If you are using an
api-key as the admin signer you can skip the following steps.transaction.approvals using the signer.3
Approve the transaction
Call the approve transaction endpoint using the signature from the previous step and the transaction id returned in the call from Step 1.See the API reference for more details.
Copy
Ask AI
curl --request POST \
--url https://staging.crossmint.com/api/2025-06-09/wallets/email:[email protected]:solana/transactions/91e90094-9fe0-43a7-bab6-e5725767a3ad/approvals \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"approvals": [{
"signer": "email:[email protected]",
"signature": "5qY6wXw6zTn7..."
}]
}'

