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 Smart Wallets API, which enables seamless integration of smart contract wallets into any application stack.

This quickstart demonstrates how to:

  • Create smart wallets and manage transactions from your backend, with no client-side blockchain dependencies
  • Work with any environment that can make HTTP requests (Python, Node.js, etc.)

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 and click on the “API Keys” option on top.

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

Save this key for the next step.

3. Generate a Key Pair

Smart Wallets are controlled by one or more secrets that you hold, called the wallet “signers”.

In production, you may want to use passkeys, MPC wallets or some other secret management service to guard these, but for the purpose of this tutorial, we will generate a key that you can guard in your computer.

4. Create the Smart Wallet

To create a new EVM-based smart wallet, make a POST request to the /api/v1-alpha2/wallets endpoint:

# Python
python create-wallet.py 
# JavaScript
node createWallet.js

5. Prepare Transaction

Once the smart wallet is created, you can send transactions from it, such as transferring currency, interacting with a smart contract, purchasing an item, etc.

Make a POST request to the /api/v1-alpha2/wallets/{walletAddress}/transactions/{chain} endpoint:

# Python
python prepare-transaction.py 
# JavaScript
node prepareTransaction.js

6. Sign payload with private key

Sign the transaction payload with your private key using your preferred signing method to generate a signature, i.e. “0x…“.

Generate a signature given a private key and a user’s message:

Generate a signature programmatically either using Python or JavaScript:

# Python
python generate_signature.py 
# JavaScript
node generateSignature.js

7. Submit Signature

After signing the payload, submit the signature to the transaction by making a POST request to the /api/v1-alpha2/wallets/{walletAddress}/transactions/{chain}/{transactionId}/signatures endpoint:

# Python
python submit-signature.py 
# JavaScript
node submitSignature.js

8. Check Transaction Status

Finally, you can monitor the status of the transaction by making a GET request to the /api/v1-alpha2/wallets/{walletAddress}/transactions/{chain}/{transactionId} endpoint:

# Python
python check-transaction-status.py 
# JavaScript
node checkTransactionStatus.js