Skip to main content

The Wallet Object

A wallet is a non-custodial MPC wallet that holds stablecoins across multiple chains.

Attributes

wallet_id
string
Unique wallet identifier
agent_id
string
Associated agent ID
mpc_provider
string
MPC provider: turnkey, circle, fireblocks, local
account_type
string
Account type: mpc_v1 or erc4337_v2
addresses
object
Blockchain addresses by chain (e.g., {"base": "0x123..."})
currency
string
Primary currency (e.g., USDC)
limit_per_tx
string
Per-transaction spending limit
limit_total
string
Total spending limit

Create Wallet

cURL
curl -X POST https://api.sardis.sh/api/v2/wallets \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_abc123",
    "mpc_provider": "turnkey",
    "currency": "USDC",
    "limit_per_tx": "100.00",
    "limit_total": "1000.00"
  }'
Python
wallet = client.wallets.create(
    agent_id="agent_abc123",
    mpc_provider="turnkey",
    currency="USDC",
    limit_per_tx=100.00,
    limit_total=1000.00
)

Request Body

agent_id
string
required
Agent to create wallet for
mpc_provider
string
default:"circle"
MPC provider: circle, turnkey, fireblocks
currency
string
default:"USDC"
Primary currency
limit_per_tx
number
default:"100.00"
Per-transaction limit
limit_total
number
default:"1000.00"
Total limit

Get Wallet Balance

cURL
curl https://api.sardis.sh/api/v2/wallets/wallet_abc123/balance?chain=base&token=USDC \
  -H "Authorization: Bearer sk_live_your_api_key"
Python
balance = client.wallets.get_balance(
    wallet_id="wallet_abc123",
    chain="base",
    token="USDC"
)
print(f"Balance: {balance.balance} USDC")

Response

{
  "wallet_id": "wallet_abc123",
  "chain": "base",
  "token": "USDC",
  "balance": "1250.50",
  "address": "0x1234567890abcdef..."
}

Transfer Crypto

cURL
curl -X POST https://api.sardis.sh/api/v2/wallets/wallet_abc123/transfer \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destination": "0xRecipientAddress...",
    "amount": "50.00",
    "token": "USDC",
    "chain": "base",
    "memo": "Payment for API credits"
  }'
Python
tx = client.wallets.transfer(
    wallet_id="wallet_abc123",
    destination="0xRecipientAddress...",
    amount="50.00",
    token="USDC",
    chain="base",
    memo="Payment for API credits"
)
print(f"Transaction: {tx.tx_hash}")

Request Body

destination
string
required
Recipient wallet address (0x…)
amount
string
required
Amount to transfer (in token units)
token
string
default:"USDC"
Token to transfer
chain
string
default:"base_sepolia"
Blockchain to execute on
memo
string
Optional memo for audit trail

Response

{
  "tx_hash": "0xabc123...",
  "status": "submitted",
  "from_address": "0x1234...",
  "to_address": "0x5678...",
  "amount": "50.00",
  "token": "USDC",
  "chain": "base",
  "fee_amount": "0.50",
  "net_amount": "49.50",
  "ledger_tx_id": "tx_ledger_123"
}

List Wallets

cURL
curl https://api.sardis.sh/api/v2/wallets?agent_id=agent_abc123 \
  -H "Authorization: Bearer sk_live_your_api_key"

Freeze Wallet

Freeze a wallet to block all transactions (for compliance or security).
cURL
curl -X POST https://api.sardis.sh/api/v2/wallets/wallet_abc123/freeze \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Suspicious activity detected",
    "frozen_by": "[email protected]"
  }'

Multi-Chain Balances

Get balances across all supported chains in a single call.
cURL
curl https://api.sardis.sh/api/v2/wallets/wallet_abc123/balances \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "wallet_id": "wallet_abc123",
  "total_usd": "5250.00",
  "total_eur": "1200.00",
  "balances": [
    {
      "wallet_id": "wallet_abc123",
      "chain": "base",
      "token": "USDC",
      "balance": "2500.00",
      "address": "0x1234..."
    },
    {
      "wallet_id": "wallet_abc123",
      "chain": "ethereum",
      "token": "USDC",
      "balance": "2750.00",
      "address": "0x1234..."
    }
  ],
  "queried_at": "2025-03-03T10:00:00Z"
}

Inbound Payments

Get Receive Addresses

cURL
curl https://api.sardis.sh/api/v2/wallets/wallet_abc123/receive \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "wallet_id": "wallet_abc123",
  "addresses": [
    {
      "chain": "base",
      "address": "0x1234...",
      "eip681_uri": "ethereum:0xTokenAddress/transfer?address=0x1234...",
      "token": "USDC"
    }
  ]
}

Build docs developers (and LLMs) love