Skip to main content

Overview

Agentic Wallet provides multiple interfaces for creating and managing Solana wallets. All wallets are created with secure key custody, automatic signing capabilities, and support for both SOL and SPL tokens.

Creating Wallets

The CLI provides the simplest way to create wallets for testing and development.

Basic Wallet Creation

npm run cli -- wallet create my-wallet

Auto-funded Wallet (Devnet Only)

Create a wallet and automatically fund it with SOL:
npm run cli -- wallet create trader-1 --auto-fund --fund-lamports 2000000
Auto-funding requires WALLET_AUTOFUND_PAYER_PRIVATE_KEY or PRIVATE_KEY in your environment.

Legacy Compatibility CLI

For orchestrator compatibility:
npm run wallets -- create --label bot-trader
npm run wallets -- create --label bot-trader --auto-fund --fund-lamports 2000000
npm run wallets -- list

Querying Wallet Information

1

Get Wallet Details

Retrieve wallet information by ID:
npm run cli -- wallet get <walletId>
2

Check SOL Balance

Query the wallet’s SOL balance:
npm run cli -- wallet balance <walletId>
Response:
{
  "status": "success",
  "data": {
    "publicKey": "8xKz...",
    "lamports": 2000000,
    "sol": 0.002
  }
}
3

List SPL Tokens

Get all SPL token balances:
npm run cli -- wallet tokens <walletId>
Response:
{
  "status": "success",
  "data": {
    "tokens": [
      {
        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "balance": "1000000",
        "decimals": 6,
        "uiAmount": 1.0
      }
    ]
  }
}
4

List All Wallets

Retrieve all wallets or find by public key:
npm run wallets -- list

Key Management

Signer Backends

Wallets use pluggable signer backends for key custody:
WALLET_SIGNER_BACKEND=encrypted-file
WALLET_KEY_ENCRYPTION_SECRET=your-secret
Production Security: Use kms, hsm, or mpc backends in production. The encrypted-file backend is suitable for development only. Never use memory backend in production.

Backend Selection Guide

  • encrypted-file: Best for local development and prototyping
  • memory: Testing only (ephemeral, keys lost on restart)
  • kms: Managed key governance with audit trails
  • hsm: Hardware-rooted custody for compliance
  • mpc: Distributed custody to reduce single-key-holder risk

Security Considerations

Important Security Features:
  • Private keys never exposed via API
  • All signing happens within wallet-engine boundary
  • Agent code never has direct key access
  • Multiple signer backend options for different security postures

Trust Boundaries

  1. Agent Boundary: Agents emit intents only, never handle keys
  2. Signing Boundary: Only wallet-engine signs transactions
  3. Policy Boundary: All spend-capable intents pass policy evaluation before signing

Next Steps

Executing Transactions

Learn how to create and execute transactions with your wallet

Setting Policies

Protect your wallet with spending limits and security policies

Build docs developers (and LLMs) love