Quick Start
Get Sardis running in under 5 minutes. Install the SDK, create an MPC wallet, set a spending policy, and execute your first AI agent payment.
Smart contracts deployed and verified on Base Sepolia. Ready for testnet integration.
USD-First Treasury Flow (Design Partner Lane)
Launch default is fiat-first treasury. Card spend is backed by prefunded USD accounts. Stablecoin conversion is optional and quote-based.
# 1) Sync financial accounts
POST /api/v2/treasury/account-holders/sync
# 2) Link bank account (MICRO_DEPOSIT flow)
POST /api/v2/treasury/external-bank-accounts
POST /api/v2/treasury/external-bank-accounts/{token}/verify-micro-deposits
# 3) Fund treasury (ACH collection)
POST /api/v2/treasury/fund
# 4) Observe payment + balances
GET /api/v2/treasury/payments/{payment_token}
GET /api/v2/treasury/balancesZero Integration (MCP)
The fastest way to start using Sardis with Claude Desktop or Cursor.
npx @sardis/mcp-server init --mode simulated
npx @sardis/mcp-server startinit creates a local .env.sardis template. Then add to your claude_desktop_config.json:
{
"mcpServers": {
"sardis": {
"command": "npx",
"args": ["@sardis/mcp-server", "start"]
}
}
}Python SDK
Installation
pip install sardis
# or install individual packages: sardis-core, sardis-protocol, sardis-chainBasic Usage
from sardis import SardisClient
client = SardisClient(api_key="your_api_key")
wallet = client.wallets.create(
name="research-agent",
chain="base",
token="USDC",
policy="Max $100/day, Max $25 per tx"
)
result = wallet.pay(
to="openai.com",
amount="20.00",
purpose="GPT-4 API credits"
)
print(result.success)
print(result.tx_id)TypeScript SDK
Installation
npm install @sardis/sdkBasic Usage
import { SardisClient } from '@sardis/sdk';
const client = new SardisClient({ apiKey: 'your_api_key' });
const result = await client.payments.executeMandate({
psp_domain: 'api.openai.com',
amount: '20.00',
token: 'USDC',
chain: 'base',
purpose: 'GPT-4 API credits'
});
console.log('Payment ID:', result.payment_id);
console.log('Status:', result.status);Run the Demo
python examples/simple_payment.pyExpected output:
1. Creating wallet with $50 USDC...
2. Executing payment of $2 to OpenAI API...
3. Checking wallet balance...
✓ Demo completed successfully!Testnet Configuration
Configure your environment to use deployed contracts on Base Sepolia:
# Deployed Contract Addresses (Base Sepolia)
SARDIS_WALLET_FACTORY=0x0922f46cbDA32D93691FE8a8bD7271D24E53B3D7
SARDIS_ESCROW=0x5cf752B512FE6066a8fc2E6ce555c0C755aB5932
# API Configuration
SARDIS_API_URL=https://api.sardis.sh
SARDIS_API_KEY=sk_test_...
# Network Configuration
SARDIS_CHAIN=base_sepolia
SARDIS_RPC_URL=https://sepolia.base.orgNext Steps
- Learn about the Architecture
- Explore the SDK Reference
- Set up Spending Mandates
- Read about the Policy Engine