v3.18.1 — Tabs: give your agent a spending limit it can't exceed
Tabs. Since v3.0.0, @dexterai/x402 grew from a one-shot x402 client into the full Tabs rail: open a capped spending tab for an AI agent, it pays per request with no signature on each charge, and one on-chain settle closes it. Live on Solana mainnet.
Tabs — buyer
payUrlWithTab— open (or reuse) a lock-protected tab from a URL's own 402 challenge and pay against it.resolveTabTerms— read a URL's tab price + settlement terms without paying (consent screens, planners).createSolanaVaultAdapter— drive tabs over a passkey-rooted vault.
Tabs — seller
tabOrExactMiddleware— advertise a tab and a one-shot price in one 402; tab and one-shot callers pay at the same price.requireTab+openSse— meter per request (charge/send/await end); you get paid for what you serve and the buyer can't drain mid-stream. You hold no key.
Step-4: lock is the default protection
- Accrued charges crystallize on-chain into a reservation sized to exactly what's accrued — not a whole-wallet freeze. The buyer keeps spending/withdrawing the rest of their balance; the seller is guaranteed the accrued amount. Proven on Solana mainnet (reservation guard, error
0x1781). resolveTabTermsreportssettlement.protection: 'lock'.
Hardening
- Seller metering uses a durable per-channel ledger (off-chain delivered-cumulative + single-stream lease), closing a reused-tab over-delivery vector.
Install
npm install @dexterai/x402
The on-chain program (Hg3wRaydFtJhYrdvYrKECacpJYDsC9Px7yKmpncj2fhc) is live on Solana mainnet. Pre-audit; audit funding in flight.