Crossmint
Search…
Wallet
Crossmint's custodial wallet solution. Create wallets for your users and get the NFTs contents of those wallets

API Details

Fetch user wallet addresses

get
https://www.crossmint.io/api/v1-alpha1
/wallets
Fetch the addresses of your Crossmint custodial wallets
Javascript
cURL
import fetch from 'node-fetch';
const params = new URLSearchParams({ userId: "some-user-identifer" });
const response = await fetch(
`https://www.crossmint.io/api/v1-alpha1/wallets?${params.toString()}`,
{
method: 'GET',
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>'
}
}
);
const wallets = await response.json();
curl \
'https://www.crossmint.io/api/v1-alpha1/wallets?userId=some-user-identifer'
-H 'X-PROJECT-ID: <YOUR_PROJECT_ID>' \
-H 'X-CLIENT-SECRET: <YOUR_CLIENT_SECRET>'

Create user wallets

post
https://www.crossmint.io/api/v1-alpha1
/wallets
Create Crossmint custodial wallets
Javascript
import fetch from 'node-fetch';
const body = {
userId: "some-user-identifier",
chain: "solana",
}
const response = await fetch(
`https://www.crossmint.io/api/v1-alpha1/wallets`,
{
method: 'POST',
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>'
},
body: JSON.stringify(body),
}
);
const wallets = await response.json();

Fetch the contents of a wallet

Once you have the user's wallet address, use /wallets/{locator}/nft endpoint to fetch the NFTs in the wallet
get
https://www.crossmint.io/api/v1-alpha1
/wallets/{locator}/nft
Fetch the NFTs in a given wallet
Javascript
cURL
import fetch from 'node-fetch';
const locator = `sol:A9vzqFSxKVasf55GdZCAFKhKW9zckzx6ekhhsQTretTa`;
const locator = `eth:0xA5058fbcD09425e922E3E9e78D569aB84EdB88Eb`;
const locator = `poly:0xA5058fbcD09425e922E3E9e78D569aB84EdB88Eb`;
const response = await fetch(
`https://www.crossmint.io/api/v1-alpha1/wallets/${locator}/nfts`,
{
method: 'GET',
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>'
}
}
);
const data = await response.json();
const contractAddress = data.address;
curl \
'https://www.crossmint.io/api/v1-alpha1/wallets/solana:A9vzqFSxKVasf55GdZCAFKhKW9zckzx6ekhhsQTretTa/nfts' \
-H 'X-PROJECT-ID: <YOUR_PROJECT_ID>' \
-H 'X-CLIENT-SECRET: <YOUR_CLIENT_SECRET>'
Last modified 4d ago
Copy link
Outline
API Details
Fetch user wallet addresses
get
/wallets
Create user wallets
post
/wallets
Fetch the contents of a wallet
get
/wallets/{locator}/nft