OpenClaw / AgentSkills-compatible skill that teaches AI agents the v402 HTTP payment protocol on Solana. The agent learns to detect 402 responses, enforce spending policies, submit USDC payments on-chain, and verify Ed25519-signed receipts.
clawhub install v402npx skills add https://github.com/valeo-cash/v402 --skill openclawcp -r packages/integrations/openclaw ~/.openclaw/skills/v402
bash ~/.openclaw/skills/v402/scripts/install.shAdd to ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"v402": {
"enabled": true,
"env": {
"V402_WALLET_PRIVATE_KEY": "<base58-solana-private-key>",
"V402_DAILY_CAP": "5.0",
"V402_PER_CALL_CAP": "1.0",
"V402_ALLOWED_TOOLS": "web_search,get_token_price,get_balance"
}
}
}
}
}- Detect 402 responses — automatically parse
V402-Intentheaders - Enforce spending policy — daily caps, per-call limits, tool and merchant allowlists
- Submit payments — USDC SPL transfers on Solana with on-chain confirmation
- Verify receipts — Ed25519 signature verification and on-chain transaction lookup
- Automated flow — single-command
v402-http.mjs callhandles the entire 402 cycle
| Command | Description |
|---|---|
/v402 budget |
Show remaining daily budget |
/v402 history |
View payment history |
/v402 verify <receipt> |
Verify a payment receipt |
/v402 wallet |
Show wallet address and balances |
openclaw/
├── SKILL.md # Agent instructions (injected into system prompt)
├── README.md # This file
├── scripts/
│ ├── install.sh # Dependency installer
│ ├── package.json # Script dependencies (Solana libs)
│ ├── v402-policy.mjs # Spending policy manager
│ ├── v402-pay.mjs # Solana USDC payment submission
│ ├── v402-verify.mjs # On-chain receipt verification
│ └── v402-http.mjs # Full automated 402 flow
├── references/
│ └── protocol-spec.md # v402 protocol specification
└── tests/
└── openclaw-skill.test.ts # Vitest integration tests
| Channel | Command |
|---|---|
| ClawHub | clawhub publish from the skill directory |
| Direct URL | npx skills add https://github.com/valeo-cash/v402 --skill openclaw |
| Manual copy | cp -r into ~/.openclaw/skills/v402 |