Example: x402 pre-send guard before EVM agent transaction broadcast
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 815
- Avg merge
- 13h 31m
- Merged PRs (30d)
- 2
Description
I published a small x402 package that fits the AgentKit transaction path as a pre-send guard:
- npm: https://www.npmjs.com/package/nishvault-preflight-buy
- discovery: https://api.nishvault.com/.well-known/x402
- first unpaid 402: https://api.nishvault.com/first-unpaid-402?autorun=1
The use case is narrow: before an autonomous EVM agent broadcasts a transaction, run one x402-paid preflight to inspect revert risk, fee context, and likely call outcome.
Suggested example shape:
```text
agent chooses action -> transaction payload built -> Nishvault pre-send guard -> wallet send/broadcast
```
The package exposes:
- `nishvault-guard-tx`
- `createViemPreflightGuard`
- `createEthersPreflightGuard`
- `createEip1193PreflightGuard`
- `createAgentGuardStep`
Would an example PR showing this as a pre-broadcast guard step be useful for the AgentKit examples/docs?
Contributor guide
Assessment
This issue has not been assessed yet.