Escrow payment protocol for AI agents on Solana
Project description
ClawPay
Escrow payment protocol for AI agents on Solana.
What is ClawPay?
ClawPay lets AI agents pay each other securely on Solana using time-locked escrow. Every transaction follows a deterministic flow:
- Lock — Buyer locks SOL into escrow
- Deliver — Seller delivers service before deadline (or auto-refund)
- Verify — Buyer confirms delivery (or auto-release)
- Settle — 98% to seller, 1% to ClawPay, 1% to referrer
- Receipt — Cryptographic receipt minted for both parties
No trust required. No human intervention. Everything enforced on-chain.
Quick Start
pip install clawpay
from clawpay import Client
from solders.keypair import Keypair
from solders.pubkey import Pubkey
# Load your wallet
keypair = Keypair.from_json(open("wallet.json").read())
client = Client(keypair)
# Create escrow — locks SOL until delivery
escrow = client.create_escrow(
seller=Pubkey.from_string("5rpnr5JN..."),
amount_sol=0.5,
delivery_secs=600, # 10 min to deliver
verification_secs=30, # 30s dispute window
)
print(f"Escrow: {escrow.address}")
# Seller confirms delivery (seller signs this)
client.confirm_delivery(escrow.address, seller_keypair)
# After verification window, release funds
client.auto_release(escrow.address)
Features
- Time-locked escrow — Funds lock until delivery. Miss the deadline → auto-refund.
- Cryptographic receipts — On-chain PDA receipts for every transaction. Portable reputation.
- Arbitration pools — Disputes resolved by stake-weighted agent voting.
- 2% fee — 1% to ClawPay, 1% to storefront referrer. Only on settlements.
- 10-second settlement — Verification window as low as 10 seconds for agent-speed transactions.
API Reference
Client(keypair, network="mainnet")
Initialize the ClawPay client.
keypair— Your Solana wallet keypair (solders.keypair.Keypair)network—"mainnet"(default) or"devnet"
client.create_escrow(seller, amount_sol, delivery_secs, verification_secs, referrer=None)
Lock SOL in escrow.
| Parameter | Type | Description |
|---|---|---|
seller |
Pubkey |
Seller's wallet address |
amount_sol |
float |
Amount in SOL (min 0.05) |
delivery_secs |
int |
Time to deliver (10–2,592,000) |
verification_secs |
int |
Dispute window (10–604,800) |
referrer |
Pubkey? |
Optional storefront — earns 1% |
client.confirm_delivery(escrow_address, seller_keypair)
Seller confirms delivery. Must be called before T1 deadline.
client.auto_release(escrow_address)
Release funds after verification window. Permissionless — anyone can call.
client.auto_refund(escrow_address)
Refund buyer if seller missed delivery deadline. Permissionless.
client.get_escrow(escrow_address)
Returns EscrowInfo with full escrow state.
client.get_receipts(agent_pubkey)
Returns list of ReceiptInfo for an agent's transaction history.
Protocol Details
- Program ID:
F2nwkN9i2kUDgjfLwHwz2zPBXDxLDFjzmmV4TXT6BWeD - Network: Solana Mainnet
- Min escrow: 0.05 SOL
- Fee: 2% on settlements (1% ClawPay + 1% referrer)
- Verification window: 10 seconds minimum
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clawpay-0.6.0.tar.gz.
File metadata
- Download URL: clawpay-0.6.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66ef7abef39104f19f70cc411ff2ad14bf73684e2766fd2522a087759aff72f9
|
|
| MD5 |
b0b3bca78e7ce83bca1dded3162e2188
|
|
| BLAKE2b-256 |
dffbc0baaa48f0a0313a8802da890aa61d57caec08ec36a7f76f79abae4ec436
|
File details
Details for the file clawpay-0.6.0-py3-none-any.whl.
File metadata
- Download URL: clawpay-0.6.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb2a70adc1f1a58b0f120d82d5407252c97b961d2a119df862cd7955f5e26b38
|
|
| MD5 |
5e9d6cfc6c33c9a956aaf1aa92c54b43
|
|
| BLAKE2b-256 |
38acf7c64aea751c6571a9b57df327ee3e737ceba4a4ea12bef1b07be3ed8d60
|