In this quickstart, you will create a new wallet for your users, and then showcase the NFTs inside it, all in under 5 minutes.

1. Create a Developer Account

To get started, create a developer account in the Crossmint Staging Console. Open that link, sign in, and accept the dialog to continue.

Crossmint offers two consoles: staging, for development and testing, and www, for production.

2. Get an API key

Once you log in to the console, the next step is to create an .

Click the "Developers" tab to expand a list and click the "API Keys" option.

Within the Server-side keys section, click the “Create new key” button in the top right. Then, select the scopes wallets.read, wallets.create, and wallets:nfts.read. Once you’re done, copy your API KEY. You will need it in the next step.

These keys are server-side only and extremely sensitive. If leaked, an attacker may take control and transfer the assets held in your wallets.

3. Create a wallet

Once you have your API key, you’re ready to create your first wallet via API.

The API takes the following parameters:

  • email: User’s email address. Contact us if you wish to pass an arbitrary string as a UUID instead of an email.
  • chain: The blockchain in which you want to create the wallet. This example uses “polygon” (or its testnet, “amoy” in staging).

Copy the following code and fill in the X-API-KEY header by replacing <YOUR_API_KEY> with the API key you just created.

That’s it! Once you’ve run this, your new wallet will be created. You can enter that wallet’s public address into a block explorer to see transactions as you make them. (For the example above, that will be the Amoy block explorer: https://www.oklink.com/amoy) 🎉

4. [Optional] Show the NFTs to your users

The following code retrieves the NFTs on the wallet and renders a grid with the assets so you can display them on your site.

Users will also be able to see their assets from Crossmint.com, signing in with the same email you passed to the API.

Pre-requisite: You’ll need to send an NFT to this newly created wallet in the same chain you create the wallet on - in this case, “polygon”. You can send one using Crossmint’s Minting API in under 5 minutes.

To get started:

The following guide is for React. Contact us if you need a different framework.
  1. First, add the Crossmint Client SDK to your project
  1. Render a grid with all the NFTs

Use the CrossmintNFTCollectionView component:

JavaScript
import { CrossmintNFTCollectionView } from "@crossmint/client-sdk-react-ui";

const wallets = [
    {
        chain: "solana",
        publicKey: "<SOL_ADDRESS>",
    },
    {
        chain: "ethereum",
        publicKey: "<ETH_ADDRESS>",
    },
];

export default function yourPage() {
    return (
        <div style={{ height: "100vh" }}>
            <CrossmintNFTCollectionView wallets={wallets} />
        </div>
    );
}