Give your agent an expense account.
An allowlist plus per-call and per-day budgets, enforced before any x402 payment is signed. A receipt for every decision — settlements and refusals alike. Your agent pays for what it uses and can't spend what you didn't approve.
Budgets your agent can't exceed
Allowlist + per-call and per-day caps, checked before any payment is signed. Runaway loops and injected tool calls hit the wall, not your wallet.
Every decision, ledgered
Settlements and refusals land in your dashboard — charts, budgets, and Basescan links per call. Headless agents sync via API key.
Terms your wallet attested
EIP-712-sign your grant so the authorization is portable — the precursor to on-chain spend permissions. Change the terms, re-sign, done.
Quickstart
- 01 Install the SDK:
npm install yeetful - 02 Mint a key on your keys page and approve the agents you trust under approvals. The secret shows once — that's the point.
- 03Wrap your agent's fetch:
import { yeetful } from 'yeetful/agent'
const pay = yeetful({
wallet, // a viem WalletClient (small funded burner)
grant: {
id: 'your-grant-id', // from yeetful.com/dashboard
allow: ['tripadvisor.x402.paysponge.com'],
perCallUsd: 0.05,
perDayUsd: 5,
},
apiKey: process.env.YEETFUL_API_KEY, // yf_… — receipts sync to your dashboard
})
// 402 challenge → grant check → USDC payment signed → 200 + receipt
const res = await pay(
'https://tripadvisor.x402.paysponge.com/api/v1/location/search?searchQuery=tokyo',
)throws GrantError('NOT_ALLOWED' | 'OVER_PER_CALL' | 'BUDGET_EXCEEDED' | 'EXPIRED' | 'REVOKED') — denied before any network I/O.
Grants API
Bearer or session authEvery route accepts your browser session (SIWE) or Authorization: Bearer yf_… — the key you minted. Keys authenticate as your wallet; grants stay owner-scoped either way.
- GET/api/grants
List your grants with spend totals
- POST/api/grants
Create a grant (allowlist + caps + expiry)
- GET/api/grants/:id
One grant + recent ledger + budget status
- PATCH/api/grants/:id
Adjust caps/label, revoke or reactivate
- DELETE/api/grants/:id
Delete a grant (ledger cascades)
- GET/api/grants/:id/signature
EIP-712 payload to wallet-sign the terms
- PUT/api/grants/:id/signature
Attach the signature (server-verified)
- POST/api/grants/:id/ledger
Sync a receipt into the hosted ledger
Receipt sync
POST /api/grants/:id/ledgerThe SDK's onReceipt seam posts here automatically when you pass apiKey. Body fields, if you'd rather wire it yourself:
- hoststring
Hostname or full URL of the paid endpoint (required)
- amountUsdnumber
USD settled — 0 for denials (required)
- okboolean
true = settled, false = denied/failed (default true)
- txHashstring
Base settlement transaction, when settled
- serviceNamestring
Display name for the dashboard charts
- notestring
"settled", a violation code, or your own marker