@tollxyz/guard 0.6.0 → 0.6.1
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.
- package/README.md +16 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,6 +104,18 @@ Robinhood Chain (4663) only for now. A transaction on another chain, or a contra
|
|
|
104
104
|
and goes through (`onUnsupported: "block"` to stop it instead). A signature for another chain is blocked
|
|
105
105
|
(`onUnsupported: "allow"` lets it through).
|
|
106
106
|
|
|
107
|
+
## Building on Hookr
|
|
108
|
+
|
|
109
|
+
A wallet behind the guard that signs a call built by [Hookr](https://hookr.fun)'s MCP server
|
|
110
|
+
(`https://hookr.fun/api/mcp`: `hookr_build_swap`, `hookr_build_launch`, `hookr_build_claim`, `hookr_build_agent_link`,
|
|
111
|
+
`hookr_build_fill`, the liquidity builders) has that call checked like any other: the guard sends it to Toll with the
|
|
112
|
+
wallet as `from` before anything is signed. Toll reads HookrRouter swaps, HookrLauncher launches (the token, the
|
|
113
|
+
pools, who holds the liquidity, a dev buy), a launch's own withdrawal and fee collection, a pool core's claim, the
|
|
114
|
+
Agent gate link and the order book fill. Each is named as Hookr's contract, not audited (`hookr-contract`, low); an
|
|
115
|
+
unknown hook, rules contract or add-on is a warning, and a payout to anyone but `from` is `hookr-pays-other` (high).
|
|
116
|
+
Any other function of those contracts is `calldata-undecoded`: WARN, never ALLOW. Nothing to configure: the checks are
|
|
117
|
+
on Toll's server. Steps: <https://t0ll.xyz/hooks/hookr#agents>
|
|
118
|
+
|
|
107
119
|
## API
|
|
108
120
|
|
|
109
121
|
### `guard(wallet, opts?)`, `guardViem(client, opts?)`, `guardSmartAccount(bundler, opts?)`, `guardEthers(signer, opts?)`
|
|
@@ -354,12 +366,12 @@ export const redisStore: SpendStore = {
|
|
|
354
366
|
const wallet = guard(walletClient, { spend: { /* ... */ }, store: redisStore });
|
|
355
367
|
```
|
|
356
368
|
|
|
357
|
-
## 0.5.0: mirror the caps into the facilitator budget
|
|
369
|
+
## 0.5.0: mirror the caps into the facilitator budget
|
|
358
370
|
|
|
359
|
-
guard's caps live in the agent's process. Toll's x402 facilitator (https://x402.t0ll.xyz)
|
|
371
|
+
guard's caps live in the agent's process. Toll's x402 facilitator (https://x402.t0ll.xyz) has per-payer budgets (live since 2026-11-11): the
|
|
360
372
|
payer wallet signs its limits once and the facilitator refuses any payment past them where it settles, so a second
|
|
361
|
-
process, a key used elsewhere or a bug in the agent cannot spend past them through it.
|
|
362
|
-
facilitator answers `404 budgets_off
|
|
373
|
+
process, a key used elsewhere or a bug in the agent cannot spend past them through it. If budgets are ever switched
|
|
374
|
+
off the facilitator answers `404 budgets_off`. `guardBudget` builds that budget from your `spend`
|
|
363
375
|
policy; guard itself behaves exactly as before.
|
|
364
376
|
|
|
365
377
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tollxyz/guard",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Toll's live pre-sign check in front of an AI agent's wallet: viem, viem smart-account, ethers and x402 fetch wrappers that ask Toll (ALLOW / WARN / BLOCK, ERC-8265) before anything is signed on Robinhood Chain: transactions, messages, typed data, batches, user operations, EIP-7702 authorizations. Spend caps, allowlists and human approval around the verdict; single-use ALLOW tickets for contracts that require one. Zero runtime dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Toll",
|