Solana MPC Wallets
Set up a Custodial Wallet in a server environment in 5 minutes
Overview
With Crossmint’s Wallets API, you can create an MPC-secured custodial wallet on Solana. This means that:
- Wallets are managed by a secure, institutional-grade system for key management
- Transactions are approved automatically, eliminating the need for users to handle gas fees or complex approvals
This quickstart demonstrates how to create such wallets and send transactions from them on any environment.
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.
2. Get an API Key
Once you log in to the console, the next step is to create an API key.
- Navigate to project Integrate > API Keys, and click the “Create new key” button in the “Server-side keys” section
- Under the Wallets API category, select the scopes
wallets.create
,wallets.read
,wallets.fund
,wallets:nfts.read
,wallets:transactions.create
andwallets:transactions.read
- Click “Create server key” to save the key for the next step
3. Create Your Wallet
To create a new custodial wallet, make a POST request to the Create Wallet endpoint:
4. Fund Your Wallet
Now that your wallet is created, let’s give it some funds so that you can complete your first transaction.
To do so we will call the Fund Wallet endpoint, using the wallet address returned from the previous step as the wallet locator.
This endpoint is only available in staging and only supports USDC and USDXM.
5. Get Your Wallet’s Balance
To ensure that the right amount has made it to your wallet, you call the Get Wallet Balance endpoint, passing the same address used in step 4 as wallet locator.
6. Create a Transaction
Now that the wallet is funded, you can send transactions from it, such as transferring currency, interacting with smart contracts, or purchasing items.
As an example, let’s send 1 USDC from your wallet to a new recipient address.
The first step is to create a Base58 encoded serialized Solana transaction. To create a transaction, you will need to:
- Create a Versioned Transaction using the Solana web3.js / python SDK
- Input the following 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. Crossmint will also pay for the transaction fee.
Now the serialized transaction data can be passed to the Create Transaction endpoint.
Crossmint automatically broadcasts the transaction onchain. No manual broadcasting or additional approvals are needed.
7. Monitor Transaction Status
To monitor the transaction status, you can call the Get Transaction endpoint.
The API will return the full transaction, including it’s status, which can be one of the following:
pending
: Broadcasting transaction onchainsuccess
: Transaction successfully executed onchainfailed
: Transaction failed during execution