Overview

Automated, programmable control over assets and funds allows developers to set permissions, customize transactions, and support real-time interactions with ease. This is all possible through Crossmint’s server-side Wallets API, which enables seamless integration of smart contract wallets into any application stack.

This quickstart demonstrates how to:

  • Create wallets and manage transactions from your backend, with no client-side blockchain dependencies
  • Work with any environment that can make HTTP requests

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.

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:balance.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 Wallet

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

4. Fund Your Wallet

Now that your wallet is created, let’s give it some funds so that you can complete your first transaction.

To do so we will call the Fund Wallet endpoint, using the wallet address returned from the previous step as the wallet locator.

This endpoint is only available in staging and only supports USDC and USDXM.

5. Get Your Wallet’s Balance

To ensure that the right amount has made it to your wallet, you call the Get Wallet Balance endpoint, passing the same address used in step 4 as wallet locator.

6. Create a Transaction

Now that the wallet is funded, you can send transactions from it, such as transferring currency, interacting with smart contracts, or purchasing items.

As an example, let’s send 1 USDC from your wallet to a new recipient address.

The first step is to create a Base58 encoded serialized Solana transaction. To create a transaction, you will need to:

  1. Create a Versioned Transaction using the Solana web3.js / python SDK
  2. Input the following transaction parameters:
    • Use "11111111111111111111111111111111" as the blockhash (Crossmint will replace this)
    • Use "11111111111111111111111111111111" as the payerKey (Crossmint will replace this)
    • Do not include the sending wallet in the signers array
    • Do not sign the transaction (Crossmint will handle signing)

The transaction will be properly configured on Crossmint’s servers with the correct values before execution. Crossmint will also pay for the transaction fee.

Now the serialized transaction data can be passed to the Create Transaction endpoint.

Crossmint automatically broadcasts the transaction onchain. No manual broadcasting or additional approvals are needed.

7. 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 wallet:

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