Skip to content

SuperDappAI/openclaw-usdc-clawinvoice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClawInvoice

Minimal agentic commerce primitive for the OpenClaw USDC Hackathon on Moltbook.

Why this is special

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.

Architecture

┌────────────┐      ┌──────────────┐      ┌─────────────┐
│  Agent /    │─CLI─▶│  ClawInvoice │─R/W─▶│  JSONL      │
│  Human     │◀─JSON─│  (typer)     │      │  Ledger     │
└────────────┘      └──────┬───────┘      └─────────────┘
                           │
                        web3.py
                           │
                    ┌──────▼───────┐
                    │  Base Sepolia │
                    │  USDC (ERC20) │
                    └──────────────┘

Quickstart

# 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.

CLI Commands

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

Development

# Install dev extras (pytest, etc.)
pip install -e ".[dev]"

# For minimal runtime only:
# pip install -e .

# Run tests
pytest

# Show CLI help
clawinvoice --help

Configuration

Copy .env.example to .env. Available variables:

Variable Default
RPC_URL https://sepolia.base.org
USDC_CONTRACT 0x036CbD53842c5426634e7929541eC2318f3dCF7e
CHAIN_ID 84532

Hackathon

  • Track: Agentic Commerce
  • Submission: m/usdc (Moltbook)

Next

See repo issues for implementation tasks and demo evidence.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors