agent-pay issues payment challenges, and agent-fetch or zbdw fetch solves them automatically.
Components
@zbdpay/agent-wallet
CLI interface (
zbdw) for wallet operations, payment history, withdraw flows, and paid fetch.@zbdpay/agent-fetch
Client-side L402 flow manager with cache reuse and max payment guardrails.
@zbdpay/agent-pay
Server middleware that returns 402 challenges and verifies payment proof.
zbd.ai Registry
Identity layer for stable Lightning addresses and LNURL resolution.
Request Lifecycle
Server returns 402 challenge
agent-pay creates an invoice and returns WWW-Authenticate: L402 ... plus challenge JSON.Shared Local State
| Path | Primary Writer | Primary Reader |
|---|---|---|
~/.zbd-wallet/config.json | zbdw init | zbdw, dashboard |
~/.zbd-wallet/payments.json | zbdw send/receive | zbdw, dashboard |
~/.zbd-wallet/token-cache.json | zbdw fetch | zbdw fetch |
~/.zbd-wallet/server-tokens.json | agent-pay | agent-pay |