Overview

With Crossmint’s Wallets API, you can create a smart contract wallet where the signer is custodial. 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 custodial smart wallets and send transactions from 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.

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

Then, navigate to project Settings > General, and change the wallet type to Smart Wallets.

2. Get an API Key

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

Click the “Integrate” tab, then select “API Keys” from the top menu.

Within the Server-side keys section, click the “Create new key” button in the top right. Then, select the scopes wallets.create, wallets.read, wallets.fund, wallets:nfts.read, wallets:transactions.create and wallets:transactions.read under the Wallets API category and create your key.

Save this key for the next step.

3. Create Your Smart Wallet

To create a new custodial smart wallet, make a POST request to the Create Wallet endpoint:

4. Use Your Wallet

Now that your wallet is created, it can interact with contracts such as deployed NFT collections to mint NFTs.

For the purposes of this quickstart, you will work with an NFT collection already deployed by Crossmint on polygon-amoy.

The NFT collection’s contract address is “0x5c030a01e9d2c4bb78212d06f88b7724b494b755” and you can see it here.

A. Prepare Transaction

The contract’s ABI (Application Binary Interface), which acts as a standardized interface for interacting with the NFT collection’s contract, contains a mintTo function that can be used to mint NFTs. To generate the transaction data needed to call this function, you can use the following ABI and the recently created wallet address.

B. Create Transaction

Now the encoded transaction data can be passed to the Create Transaction endpoint along with the contract’s address and the price requested for the NFT (in this case 0, as the NFT is free).

The transaction is pending, and will be confirmed onchain after a few seconds. Crossmint automatically broadcasts the transaction onchain. No manual broadcasting or additional approvals are needed.

5. 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 in the case of a custodial smart wallet:

  • pending: Broadcasting transaction onchain
  • success: Transaction successfully executed onchain
  • failed: Transaction failed during execution

6. Fetch the NFT

To ensure that the NFT has been minted to your wallet, call the Get NFTs from Wallet endpoint.