Prerequisites
API Key : Ensure you have an API key with the scopes: wallets.create.
Try it Live
Experience wallet creation in action with this interactive demo. Create a Solana testnet wallet using just your email address:
Creating a Wallet
Wallet creation requires a recovery signer — used for account recovery and adding new signers. On client-side SDKs, a device signer is automatically added as the default operational signer.
React
Node.js
React Native
REST
import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { createWallet } = useWallet ();
const wallet = await createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "email" ,
email: "user@example.com" ,
},
});
See the React SDK reference for all parameters. import { CrossmintWallets , createCrossmint } from "@crossmint/wallets-sdk" ;
const crossmint = createCrossmint ({
apiKey: "<your-server-api-key>" ,
});
const crossmintWallets = CrossmintWallets . from ( crossmint );
const wallet = await crossmintWallets . createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "server" ,
secret: process . env . RECOVERY_SIGNER_SECRET ,
},
signers: [
{ type: "server" , secret: process . env . WALLET_SIGNER_SECRET },
],
});
See the SDK reference for all parameters and return types. import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { createWallet } = useWallet ();
const wallet = await createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "email" ,
email: "user@example.com" ,
},
});
See the React Native SDK reference for all parameters. curl --request POST \
--url https://staging.crossmint.com/api/2025-06-09/wallets \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '{
"chainType": "evm",
"config": {
"adminSigner": {
"type": "email",
"email": "user@example.com"
}
},
"owner": "email:user@example.com"
}'
See the API reference for more details.
The REST API uses adminSigner (recovery role) and delegatedSigners (operational signers). These map to recovery and signers in the SDK.
Retrieving an Existing Wallet
Use getWallet() to retrieve a wallet that was previously created. If the wallet does not exist, it throws a WalletNotAvailableError.
React
Node.js
React Native
REST
import { useWallet } from '@crossmint/client-sdk-react-ui' ;
const { getWallet } = useWallet ();
const wallet = await getWallet ({ chain: "base-sepolia" });
import { CrossmintWallets , createCrossmint } from "@crossmint/wallets-sdk" ;
const crossmint = createCrossmint ({
apiKey: "<your-server-api-key>" ,
});
const crossmintWallets = CrossmintWallets . from ( crossmint );
const wallet = await crossmintWallets . getWallet (
"<wallet-address>" ,
{ chain: "base-sepolia" }
);
await wallet . useSigner ({
type: "server" ,
secret: process . env . WALLET_SIGNER_SECRET ! ,
});
import { useWallet } from '@crossmint/client-sdk-react-native-ui' ;
const { getWallet } = useWallet ();
const wallet = await getWallet ({ chain: "base-sepolia" });
curl --request GET \
--url https://staging.crossmint.com/api/2025-06-09/wallets/ < wallet-locato r > \
--header 'X-API-KEY: <x-api-key>'
See the API reference for more details.
Get-or-Create Pattern
If you want to retrieve an existing wallet or create one if it does not exist, use WalletNotAvailableError to implement the pattern:
React
Node.js
React Native
import { useWallet , WalletNotAvailableError } from '@crossmint/client-sdk-react-ui' ;
const { getWallet , createWallet } = useWallet ();
let wallet ;
try {
wallet = await getWallet ({ chain: "base-sepolia" });
} catch ( error ) {
if ( error instanceof WalletNotAvailableError ) {
wallet = await createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "email" ,
email: "user@example.com" ,
},
});
} else {
throw error ;
}
}
import {
CrossmintWallets ,
WalletNotAvailableError ,
createCrossmint ,
} from "@crossmint/wallets-sdk" ;
const crossmint = createCrossmint ({
apiKey: "<your-server-api-key>" ,
});
const crossmintWallets = CrossmintWallets . from ( crossmint );
let wallet ;
try {
wallet = await crossmintWallets . getWallet (
"<wallet-address>" ,
{ chain: "base-sepolia" }
);
await wallet . useSigner ({
type: "server" ,
secret: process . env . WALLET_SIGNER_SECRET ! ,
});
} catch ( error ) {
if ( error instanceof WalletNotAvailableError ) {
wallet = await crossmintWallets . createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "server" ,
secret: process . env . RECOVERY_SIGNER_SECRET ,
},
signers: [
{
type: "server" ,
secret: process . env . WALLET_SIGNER_SECRET ,
},
],
});
} else {
throw error ;
}
}
import { useWallet , WalletNotAvailableError } from '@crossmint/client-sdk-react-native-ui' ;
const { getWallet , createWallet } = useWallet ();
let wallet ;
try {
wallet = await getWallet ({ chain: "base-sepolia" });
} catch ( error ) {
if ( error instanceof WalletNotAvailableError ) {
wallet = await createWallet ({
chain: "base-sepolia" ,
recovery: {
type: "email" ,
email: "user@example.com" ,
},
});
} else {
throw error ;
}
}
On client-side SDKs (React, React Native), if you use CrossmintWalletProvider with the createOnLogin prop, the wallet is created automatically when the user logs in — no manual createWallet call is needed.
Next Steps
Transfer tokens Send tokens between wallets
Add signers Register operational signers on your wallet
Fund your wallet Get testnet tokens to start testing