Crossmint Smart Wallets

⏱️ 3 min read

Overview

This guide points to a reference repository that shows you how to integrate DeFindex vaults using Crossmint smart wallets — enabling fully automated, server-side deposits, withdrawals, and cross-chain bridging with zero user interaction.

The pattern uses an EVM private key registered as adminSigner to control both an ERC-4337 smart wallet on Base and a Stellar smart wallet. All Defindex vault interactions go through Crossmint's REST API as Soroban contract-call transactions — no manual XDR construction required.

Repository

defindex-io/crossmint-defindex-guide

What the Repository Covers

Topic
Description

Crossmint setup

Server API key (sk_), wallet email, staging vs production

EVM wallet

ERC-4337 smart wallet on Base with external-wallet adminSigner

Stellar wallet

Stellar smart wallet with auto-XLM funding, Soroban contract-call signing

Deposit

contract-call via Crossmint REST → base64 XDR approval → poll

Withdraw

Withdraw by amount or by shares (% redemption)

Bridge

Base USDC → Stellar → Defindex vault via Sodax

Gotchas

9 documented edge cases with root causes and fixes

Architecture at a Glance

All vault operations follow the same pattern:

  1. POST to Crossmint REST → create contract-call transaction

  2. Response is awaiting-approval with a base64-encoded XDR message

  3. Sign with keypair.sign(Buffer.from(message, "base64")) using STELLAR_SERVER_KEY

  4. POST signature to /approvals

  5. Poll until onChain.txId is returned

Quick Start

Prerequisites

  • Crossmint account with a server API key (must start with sk_, not ck_)

  • EVM_PRIVATE_KEY — becomes the adminSigner of the EVM smart wallet on Base

  • STELLAR_SERVER_KEY — Stellar ed25519 secret key, becomes the adminSigner of the Stellar wallet

  • Defindex API key — request access on Discord

Additional Resources

Last updated