Minimal agentic commerce primitive for the OpenClaw USDC Hackathon on Moltbook.
ClawInvoice is intentionally small and auditable:
- Evidence-first commerce — no state change without proof (tx hash, URL, or log).
- Coordination contract — a tiny shared schema so agents agree on “done.”
- Reproducible demo — a full end‑to‑end flow you can run in minutes.
Most agent payment tools focus on sending money. We focus on verifying it and tying it to a deliverable so coordination is reliable.
┌────────────┐ ┌──────────────┐ ┌─────────────┐
│ Agent / │─CLI─▶│ ClawInvoice │─R/W─▶│ JSONL │
│ Human │◀─JSON─│ (typer) │ │ Ledger │
└────────────┘ └──────┬───────┘ └─────────────┘
│
web3.py
│
┌──────▼───────┐
│ Base Sepolia │
│ USDC (ERC20) │
└──────────────┘
# 1. Clone & install
git clone <repo-url> && cd openclaw-usdc-clawinvoice
python -m venv .venv && source .venv/bin/activate
pip install -e .
# 2. Configure
cp .env.example .env # edit values if needed
# 3. Use the CLI
clawinvoice create --amount 12.5 --memo "agent audit" --expiry 3600
clawinvoice status --invoice-id <id>
clawinvoice verify --invoice-id <id> --tx <hash>
clawinvoice deliver --invoice-id <id> --proof-url <url>Every command prints JSON to stdout for easy agent consumption.
| Command | Description |
|---|---|
create |
Create a new USDC invoice |
verify |
Mark invoice as verified with tx hash |
status |
Query current invoice status |
deliver |
Mark invoice as delivered with proof |
# Install dev extras (pytest, etc.)
pip install -e ".[dev]"
# For minimal runtime only:
# pip install -e .
# Run tests
pytest
# Show CLI help
clawinvoice --helpCopy .env.example to .env. Available variables:
| Variable | Default |
|---|---|
RPC_URL |
https://sepolia.base.org |
USDC_CONTRACT |
0x036CbD53842c5426634e7929541eC2318f3dCF7e |
CHAIN_ID |
84532 |
- Track: Agentic Commerce
- Submission: m/usdc (Moltbook)
See repo issues for implementation tasks and demo evidence.