The Wallet Object
A wallet is a non-custodial MPC wallet that holds stablecoins across multiple chains.
Attributes
MPC provider: turnkey, circle, fireblocks, local
Account type: mpc_v1 or erc4337_v2
Blockchain addresses by chain (e.g., {"base": "0x123..."})
Primary currency (e.g., USDC)
Per-transaction spending limit
Create Wallet
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"
}'
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 to create wallet for
MPC provider: circle, turnkey, fireblocks
Get Wallet Balance
curl https://api.sardis.sh/api/v2/wallets/wallet_abc123/balance?chain=base&token=USDC \
-H "Authorization: Bearer sk_live_your_api_key"
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 -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"
}'
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
Recipient wallet address (0x…)
Amount to transfer (in token units)
chain
string
default:"base_sepolia"
Blockchain to execute on
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 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 -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 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 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"
}
]
}