agent402-tollbooth 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ in USDC over the [x402 protocol](https://x402.org), over
8
8
  [MPP](https://mpp.dev) (the Machine Payments Protocol `Payment` HTTP auth
9
9
  scheme, settled through the same stack), or for free by solving a
10
10
  proof-of-work. No platform lock-in, no card processor required, no Merchant-of-Record, no signup.
11
- The first self-hostable pay-per-crawl gate that speaks both wires on one 402 -
11
+ A self-hostable pay-per-crawl gate that speaks both wires on one 402 -
12
12
  the sell side of [Agentic Finance](https://agent402.tools/agentic-finance),
13
13
  where agents pay and sites get paid, per request, with no account in between.
14
14
 
@@ -60,7 +60,9 @@ import { createTollbooth } from "agent402-tollbooth";
60
60
  const app = express();
61
61
 
62
62
  // Humans pass through; known AI crawlers get 402 and must pay or solve a PoW.
63
- app.use(createTollbooth({ price: "$0.002" }));
63
+ // payTo puts a USDC quote in the 402 (or set TOLLBOOTH_PAYTO); without it the
64
+ // 402 offers proof-of-work only.
65
+ app.use(createTollbooth({ price: "$0.002", payTo: "0xYourWallet" }));
64
66
 
65
67
  app.get("/article", (_req, res) => res.send("…your content…"));
66
68
  app.listen(3000);
@@ -77,7 +79,7 @@ The 402 body advertises both rails:
77
79
  {
78
80
  "error": "Payment Required",
79
81
  "message": "…humans browse free; bots pay in USDC via x402 or by solving a proof-of-work.",
80
- "accepts": [{ "scheme": "exact", "network": "base", "maxAmountRequired": "$0.002", "asset": "USDC", "payTo": "0x…", "resource": "/article" }],
82
+ "accepts": [{ "scheme": "exact", "network": "base", "maxAmountRequired": "$0.002", "asset": "USDC", "payTo": "0x…", "resource": "http://localhost:3000/article" }],
81
83
  "proofOfWork": { "algorithm": "sha256", "challenge": "…", "difficulty": 18, "token": "…", "rule": "Find a nonce so sha256(challenge+\":\"+nonce) has >= 18 leading zero bits; resend with header X-Pow-Solution: <token>:<nonce>" }
82
84
  }
83
85
  ```
@@ -328,7 +330,7 @@ Read by the bundled proxy / Express entry point (`index.js`):
328
330
  | `TOLLBOOTH_PAYTO` | – | Wallet address; advertises a USDC x402 quote (and, with `TOLLBOOTH_FACILITATOR_URL`, settles it) |
329
331
  | `TOLLBOOTH_FACILITATOR_URL` | – | x402 facilitator that settles your network. With `TOLLBOOTH_PAYTO` the CLI builds a real `@x402/express` middleware and takes payment over x402 **and** MPP (0.8.0). Needs `@x402/express @x402/core @x402/evm` installed; refuses to start without them |
330
332
  | `TOLLBOOTH_FACILITATOR_HEADERS` | – | Optional JSON object of auth headers sent on the facilitator's `/verify`, `/settle`, `/supported` (e.g. `{"X-API-Key":"…"}`) |
331
- | `TOLLBOOTH_CDP_API_KEY_ID` + `TOLLBOOTH_CDP_API_KEY_SECRET` | – | Settle through Coinbase's facilitator (CDP) instead of a URL (no fee is taken from the payment itself; Coinbase's facilitator is free for the first 1,000 settlements a month and $0.001 each after). Needs `npm i @coinbase/x402`. This is how a Coinbase Business account gets paid by agents: `TOLLBOOTH_PAYTO` = the account's USDC (Base) receive address. |
333
+ | `TOLLBOOTH_CDP_API_KEY_ID` + `TOLLBOOTH_CDP_API_KEY_SECRET` | – | Settle through Coinbase's facilitator (CDP) instead of a URL. Needs `npm i @coinbase/x402`. This is how a Coinbase Business account gets paid by agents: `TOLLBOOTH_PAYTO` = the account's USDC (Base) receive address. |
332
334
  | `TOLLBOOTH_PRICE` | `"$0.001"` | Advertised price per request |
333
335
  | `TOLLBOOTH_NETWORK` | `"base"` | x402 network. CLI settlement mode accepts `base`, `base-sepolia`, `polygon`, `arbitrum`, `optimism`, `avalanche`, `celo`, `sei`, `monad`, or a raw `eip155:<id>` |
334
336
  | `TOLLBOOTH_MPP` | on when `x402` set | `false` to switch MPP off |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent402-tollbooth",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Agent402 tollbooth: open-source, self-hostable pay-per-crawl for x402 AND MPP (the sell side of Agentic Finance): charge AI bots per request (USDC via x402, or MPP - the Machine Payments Protocol - through the same settlement, or USDG on Robinhood Chain, or free proof-of-work) while humans browse free. Drop-in Express middleware or reverse proxy that settles both wires from env alone - no Cloudflare, no Stripe, no signup.",
5
5
  "type": "module",
6
6
  "main": "index.js",