Custodial Wallets (solana)
Create a wallet and send a transaction, in under 5 minutes
Overview
This quickstart demonstrates how to:
- Create a Solana custodial wallet and manage transactions from your backend, with no client-side blockchain dependencies
- Work with any environment that can make HTTP requests (Python, Node.js, etc.)
1. Create and Configure a Crossmint Project
To get started, create a developer account in the Crossmint Staging Console. Open that link, sign in, and accept the dialog to continue.
Then, navigate to project Settings > General, and change the wallet type to Smart Wallets
.
2. Get an API Key
Once you log in to the console, the next step is to create an API key.
Click the “Integrate” tab and click on the “API Keys” option on top.
Within the Server-side keys section, click the “Create new key” button in the top right.
Then, select the scopes wallets.create
and wallets.read
under the Wallets API category and create your key.
Save this key for the next step.
3. Create a Wallet
To create a new Solana custodial wallet, make a POST request to the /api/v1-alpha2/wallets
endpoint:
4. Create Transaction
Once the wallet is created, you can send transactions from it, such as transferring currency, interacting with a smart contract, purchasing an item, etc. To create a transaction, follow these guidelines:
- Create a Versioned Transaction using the Solana web3.js / python SDK
- For the transaction parameters:
- Use
"11111111111111111111111111111111"
as the blockhash (Crossmint will replace this) - Use
"11111111111111111111111111111111"
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)
- Use
The transaction will be properly configured on Crossmint’s servers with the correct values before execution.
- This transaction must be serialized into a base58 string.
To generate a transaction faster, try this AI based helper that can write them for you: Solana Transaction Creator
Now, send the serialized transaction as a POST request to the
/api/v1-alpha2/wallets/{walletAddress}/transactions/{chain}
endpoint:
5. Check Transaction Status
Finally, you can monitor the status of the transaction by making a GET request to the /api/v1-alpha2/wallets/{walletAddress}/transactions/{chain}/{transactionId}
endpoint: