Transfer Native Tokens
Transfer ETH/SOL from a Wallet
This guide will walk you through the process of sending ETH from your wallet using the Crossmint transactions API.
Prerequisites
Ensure you have a wallet created. You can follow the Quickstart for server wallets to prepare one. You will need:
- API Key: Ensure you have your Crossmint API key with the scope
wallets:transactions.create
. - Wallet Locator: The locator of the wallet you want to transfer the tokens from.
Sending the transaction
We provide a Create Transaction API for your wallet. To send ETH, we need to set the following parameters:
calls
: An array of objects with the following properties:to
: The recipient’s Ethereum address.value
: The amount of ETH to send, in wei.data
: Unnecessary for just sending ETH. Set it to"0x"
.
chain
: The chain where the transaction will be sent.signer
: One of the wallet’s signers. In most cases, this will be the admin signer.
We provide a Create Transaction API for your wallet. To send ETH, we need to set the following parameters:
calls
: An array of objects with the following properties:to
: The recipient’s Ethereum address.value
: The amount of ETH to send, in wei.data
: Unnecessary for just sending ETH. Set it to"0x"
.
chain
: The chain where the transaction will be sent.signer
: One of the wallet’s signers. In most cases, this will be the admin signer.
First, we need to prepare the transaction that will send 0.001 SOL.
For the transaction parameters:
- Use
"11111111111111111111111111111111"
as the blockhash (Crossmint will replace this) - Use
"11111111111111111111111111111112"
as the payerKey (Crossmint will replace this) - Do not include the sending wallet in the signers array
- Do not sign the transaction (Crossmint will handle signing)
The transaction will be properly configured on Crossmint’s servers with the correct values before execution. Crossmint will also pay for the transaction fee.
Send the transaction to the /transactions
endpoint. We only need to send the transaction
field with the base58 encoded transaction generated in the previous step.
Was this page helpful?