Creating Your First Wallet
Initialize the Client
Create a Sardis client with your API key:
Get your API key from the Sardis Dashboard. For local testing, you can omit the API key to use simulation mode.
Create a Wallet
Create a wallet for your agent with a natural language spending policy:The wallet is created with:
- A unique wallet ID
- An on-chain address on the specified chain
- MPC key management via Turnkey
- Your spending policy automatically enforced
Funding Options
Option 1: Crypto Transfer
Transfer USDC or other supported tokens directly to the wallet address:| Chain | Tokens |
|---|---|
| Base | USDC, EURC |
| Polygon | USDC, USDT, EURC |
| Ethereum | USDC, USDT, PYUSD, EURC |
| Arbitrum | USDC, USDT |
| Optimism | USDC, USDT |
Option 2: Card Funding
Fund wallets with a credit or debit card via Circle:Option 3: Bank Transfer (ACH)
For larger amounts, use bank transfers:Multi-Chain Wallet Setup
Create wallets across multiple chains for an agent:Advanced: Simulation Mode
For testing without real funds:- Unit testing payment logic
- Prototyping agent flows
- Development without real funds
Wallet Management
Check Wallet Status
List All Wallets
Freeze/Unfreeze Wallet
Troubleshooting
Wallet creation fails with 'Invalid chain'
Wallet creation fails with 'Invalid chain'
Make sure you’re using a supported chain name:
base, polygon, ethereum, arbitrum, or optimism.Chain names are case-insensitive but must match exactly.Balance shows 0 after funding
Balance shows 0 after funding
Blockchain confirmations can take 30-60 seconds. Try:Also verify you sent funds to the correct address and chain.
'MPC provider error' when creating wallet
'MPC provider error' when creating wallet
This usually indicates a Turnkey API configuration issue. Check:
- Your
TURNKEY_API_KEYenvironment variable is set - Your
TURNKEY_ORGANIZATION_IDis correct - The Turnkey organization has wallet creation enabled
Can I recover a wallet if I lose access?
Can I recover a wallet if I lose access?
Sardis wallets support social recovery. Enable it when creating the wallet:If you lose access, 2 of your guardians can approve recovery.
What happens if an agent is compromised?
What happens if an agent is compromised?
Immediately freeze the wallet:Then create a new wallet with updated policies. The old wallet can remain frozen indefinitely.
Next Steps
Spending Policies
Set up natural language spending policies
Making Payments
Execute payments from your wallet
Virtual Cards
Issue virtual cards for agents
Testing
Test your integration