- Cowpin DocumentationGetting StartedBrowser toolsAI Agents & MCP
Crypto Wallet Auth & Treasury
Authenticate autonomous AI bots via cryptographic signatures and manage on-chain micro-credit deposits.
On this page
Cowpin supports native cryptographic wallet authentication for autonomous AI agents (Base AgentKit, ai16z Eliza, Virtuals Protocol).
Agents authenticate without email or passwords by signing an EIP-191 challenge with their private key, receiving an instant API token and micro-credit ledger.
๐ Cryptographic Authentication Flow
[Agent Base / Solana Wallet]
โ
โผ 1. POST /api/agent/auth/challenge (Sends wallet address)
[Cowpin Server returns Nonce & Challenge Message]
โ
โผ 2. Agent signs message with private key (personal_sign)
[Cryptographic Signature]
โ
โผ 3. POST /api/agent/auth/verify (Sends signature)
[Cowpin validates signature & returns API Key + $0.10 Welcome Grant]
Step 1: Request Challenge
curl -X POST https://www.cowpin.com/api/agent/auth/challenge \
-H "Content-Type: application/json" \
-d '{
"address": "0xYourWalletAddressHere",
"chain": "BASE"
}'
Response:
{
"ok": true,
"address": "0xYourWalletAddressHere",
"chain": "BASE",
"nonce": "a1b2c3d4e5f6...",
"challenge": "Cowpin AI Agent Memory Vault Auth\nAddress: 0x...\nNonce: ...\nSign this challenge to authenticate.",
"expiresAt": "2026-09-27T12:30:00.000Z"
}
Step 2: Verify Signature & Receive API Token
Sign the challenge string using your EVM private key (personal_sign / EIP-191) or Solana key (Ed25519), then submit to verify:
curl -X POST https://www.cowpin.com/api/agent/auth/verify \
-H "Content-Type: application/json" \
-d '{
"address": "0xYourWalletAddressHere",
"chain": "BASE",
"signature": "0xYourHexSignatureHere",
"challenge": "Cowpin AI Agent Memory Vault Auth...",
"agentName": "My Research Agent"
}'
Response:
{
"ok": true,
"apiKey": "cw_agent_8f92a10b4c83d9...",
"address": "0xYourWalletAddressHere",
"chain": "BASE",
"balanceUsd": 0.10,
"balanceCredits": 100000
}
๐ฐ Unit Economics & Credit Ledger
| Operation | Micro-Credits | USD Equivalent |
|---|---|---|
| Welcome Grant (First sign-in) | 100,000 | +$0.10 Free |
| Memory Save & Embed | 1,000 | -$0.001 (0.1ยข) |
| Semantic Vector Recall | 2,000 | -$0.002 (0.2ยข) |
| 1.00 USDC Deposit | 1,000,000 | +$1.00 (1,000 saves) |
๐๏ธ Multi-Chain Deposit Addresses
To top up an agent's credit balance, send native tokens or USDC to Cowpin's on-chain treasury:
| Network | Supported Assets | Official Treasury Address |
|---|---|---|
| Base (L2) โญ | USDC, ETH | 0xE064Cf686D46F866Df69Cb308e0707b34940a7a7 |
| Solana | USDC (SPL), SOL | 4ZEN8gb6HxsJNssWjeA2edAfBdmYP4Zop7nxXzM14P8T |
| Ethereum & L2s (Arbitrum, Optimism, Polygon) | USDC, ETH, MATIC | 0xE064Cf686D46F866Df69Cb308e0707b34940a7a7 |
| TRON | USDT (TRC-20), TRX | TNMuZ8G6MPmfr1yBaXxRPX4rbgP6JeEHzu |
| Bitcoin | Native SegWit BTC | bc1qpm9gau3gggnpre85larrrwjnvq8y078xlu7gmc |
Crediting an On-Chain Deposit
Once an on-chain transaction is broadcast, record the transaction to credit the wallet immediately:
curl -X POST https://www.cowpin.com/api/agent/deposit \
-H "Authorization: Bearer cw_agent_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"amountUsdc": 5.00,
"chain": "BASE",
"txHash": "0xYourTransactionHashHere"
}'