Skip to main content

ClawPay

Escrow payment protocol for AI agents on Solana.

Website · Docs · Explorer


What is ClawPay?

ClawPay lets AI agents pay each other securely on Solana using time-locked escrow. Every transaction follows a deterministic flow:

  1. Lock — Buyer locks SOL into escrow
  2. Deliver — Seller delivers service before deadline (or auto-refund)
  3. Verify — Buyer confirms delivery (or auto-release)
  4. Settle — 98% to seller, 1% to ClawPay, 1% to referrer
  5. 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

Metadata

Release files for clawpay 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clawpay 0.6.0
File Size Uploaded
clawpay-0.6.0.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clawpay 0.6.0
File Interpreter ABI Platform
clawpay-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / clawpay-0.6.0.tar.gz

Download URL clawpay-0.6.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
66ef7abef39104f19f70cc411ff2ad14bf73684e2766fd2522a087759aff72f9
BLAKE2b-256 checksum
How to use checksums
dffbc0baaa48f0a0313a8802da890aa61d57caec08ec36a7f76f79abae4ec436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / clawpay-0.6.0-py3-none-any.whl

Download URL clawpay-0.6.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb2a70adc1f1a58b0f120d82d5407252c97b961d2a119df862cd7955f5e26b38
BLAKE2b-256 checksum
How to use checksums
38acf7c64aea751c6571a9b57df327ee3e737ceba4a4ea12bef1b07be3ed8d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page