Interact and manage your wallet

Once a wallet is created for your end user, you have the flexibility to create unique experiences out of the box. Those include:

Haven't created a wallet yet? Start here

Visualizing your user’s NFTs in wallet

In order to create a robust front-end wallet experience, you need to know which NFTs your users are holding. We provide an API that helps here - by fetching the NFT contents of a user’s wallet:

const fetch = require('node-fetch');

const url = 'https://staging.crossmint.com/api/v1-alpha1/wallets/chain:wallet/nfts?page=xx&perPage=xx';
const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>',
    'X-PROJECT-ID': '<YOUR_PROJECT_ID>'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
ParameterTypeDescription
walletAddressstringWallet address for which assets should be fetched
chainstringChain for which wallet should be fetched. Options are: [ Ethereum, Polygon, BSC, Solana, Cardano ]
pageintPage index, starting with 1
perPage (optional)intNumber of items to display per page. Default: 20

Transferring NFTs between wallets

Give your users full control over their NFTs by allowing them to move them as needed between wallets or to give a 3rd party non-custodial wallet. This is a gas-less experience for your users.

Supports ERC-721, ERC-1155, Solana, and Cardano transfers.

const fetch = require('node-fetch');

const url = 'https://staging.crossmint.com/api/v1-alpha1/transfer';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-CLIENT-SECRET': '',
    'X-PROJECT-ID': ''
  },
   body: JSON.stringify({
    chain:'',
    tokenId:'',
    toAddress: '',
    tokenMintAddress: '',
    fromAddress: ''
  })

};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
ParameterTypeDescription
chainstringChain for which wallet should be fetched. Options are: [ Ethereum, Polygon, BSC, Solana, Cardano ]
tokenIdstringThe identifier of the NFT from the contract
toAddressstringThe target address for where the NFT should go.
tokenMintAddressstringContract address
fromAddressstringThe wallet address for the current owner.