@clawwpay/elizaos-plugin
v0.1.0
Published
ClawPay escrow payments plugin for ElizaOS — trustless agent-to-agent payments on Solana
Maintainers
Readme
@clawpay/elizaos-plugin
Trustless escrow payments for AI agents on Solana. Built for ElizaOS.
Your agent says "pay 5 USDC to ResearchBot for market analysis" → funds lock in escrow → service delivers → funds release automatically. If the seller ghosts, the buyer gets a refund. No humans involved.
Install
bun add @clawpay/elizaos-pluginSetup
Add to your agent's character config:
import clawpayPlugin from "@clawpay/elizaos-plugin";
const runtime = new AgentRuntime({
character: {
name: "TradingAgent",
bio: "An autonomous trading agent that buys market data from other agents.",
plugins: [clawpayPlugin],
},
});Set environment variables (or add to .env):
CLAWPAY_WALLET_SECRET_KEY=<your-base58-private-key>
CLAWPAY_NETWORK=devnet # or mainnet-beta
CLAWPAY_RPC_URL=https://api.devnet.solana.com # optionalWhat Your Agent Can Do
Create Escrow
"Pay 5 USDC to 5rpn...Shb7 for market analysis, 60 minute deadline"
Locks funds in a time-locked escrow PDA. The seller has until the deadline to deliver. Miss it → automatic refund to buyer.
Confirm Delivery
"Confirm delivery for escrow 8f3a...c9d1"
Triggers settlement: 98% to seller, 1% to referrer/storefront, 1% to ClawPay protocol. Cryptographic receipt added to both agents' chains.
Claim Refund
"Claim refund for expired escrow 8f3a...c9d1"
If the deadline passed without delivery, the buyer reclaims their full amount.
Check Reputation
"Check receipts for agent 5rpn...Shb7"
Returns the agent's on-chain transaction count, role breakdown (buyer vs seller), and reputation tier.
How the Protocol Works
T0: Buyer locks USDC in escrow PDA
↓
T1: Seller delivers service before deadline
(miss deadline → auto-refund to buyer)
↓
T2: Buyer confirms delivery
(ghost the window → auto-release to seller)
↓
$$: Settlement — 98% seller / 1% referrer / 1% ClawPay
↓
🔗: Cryptographic receipt added to both agents' chainsStorefront Integration
Platforms earn 1% of every transaction their agents make:
// When creating escrow, pass the storefront's public key as referrer
// The 1% referrer fee routes to them automatically on settlementConfiguration Reference
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| CLAWPAY_WALLET_SECRET_KEY | Yes | — | Agent's Solana wallet (base58) |
| CLAWPAY_NETWORK | No | devnet | devnet or mainnet-beta |
| CLAWPAY_RPC_URL | No | Public RPC | Solana RPC endpoint |
| CLAWPAY_PROGRAM_ID | No | Per network | ClawPay program address |
| CLAWPAY_USDC_MINT | No | Per network | USDC token mint |
| CLAWPAY_FEE_WALLET | No | Per network | Protocol fee destination |
Program IDs
| Network | Program ID |
|---------|-----------|
| Devnet | FifHdFAaEhQ46tjP5MYnRBAvdNmiFPmATrbH9oZcoEVx |
| Mainnet | F2nwkN9i2kUDgjfLwHwz2zPBXDxLDFjzmmV4TXT6BWeD |
Links
- Website: claw-pay.com
- Python SDK:
pip install clawpay - Twitter: @ClawwPay
License
MIT
