npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@celorodrigues/agentkit-firewall

v1.0.2

Published

Coinbase AgentKit ActionProvider for Automaton Pre-Flight AI Firewall: simulation, anti-honeypot and MEV safe slippage guard on Base.

Readme

@celorodrigues/agentkit-firewall

Coinbase AgentKit ActionProvider for Automaton Pre-Flight AI Firewall on Base.

Provides autonomous on-chain transaction guards for AI agents. Simulates execution against Base chain tip, checks for reverts, scans bytecode for honeypot traps and transfer taxes, and calculates anti-MEV safe slippage bounds before sending any trade.

Install

npm install @celorodrigues/agentkit-firewall @coinbase/agentkit viem zod@^3

Quickstart

import { AgentKit, ViemWalletProvider } from '@coinbase/agentkit';
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
import { automatonFirewallActionProvider } from '@celorodrigues/agentkit-firewall';

// An EOA wallet on Base that holds a little USDC (0.02 USDC per paid call). No ETH is needed.
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const walletProvider = new ViemWalletProvider(
  createWalletClient({ account, chain: base, transport: http() })
);

const agentkit = await AgentKit.from({
  walletProvider,
  actionProviders: [automatonFirewallActionProvider()]
});

// The action the LLM sees:
const action = agentkit.getActions().find(a => a.name.endsWith('simulate_and_guard_transaction'));
const verdict = await action!.invoke({
  targetContract: '0x...', // contract the agent is about to call
  calldata: '0x...'        // the exact calldata it is about to send
});

Use an EOA wallet provider such as ViemWalletProvider or CdpEvmWalletProvider. Smart-contract wallets (CdpSmartWalletProvider) are not tested: the endpoint's EIP-3009 verifier on X-PAYMENT-AUTH accepts only a 65-byte ECDSA signature, which a smart-wallet signature is not.

Action exposed to the LLM

  • simulate_and_guard_transaction (registered by AgentKit as CustomActionProvider_simulate_and_guard_transaction): simulates a transaction before execution and returns a verdict (SAFE, WARNING, REJECT), gas estimation, honeypot analysis and anti-MEV slippage limits.

Input: targetContract (required), calldata, fromAddress, valueWei, tokenAddress.

Payment flow (x402)

  1. The provider POSTs the arguments to /v2/firewall/simulate-tx.
  2. If the endpoint answers HTTP 402, the provider reads the challenge (payment-required header, or the body) and picks the accepts[] entry with scheme: exact, network: eip155:8453, USDC on Base and the Automaton treasury as payTo.
  3. Before anything is signed, it refuses the payment when the amount exceeds maxAmountUnits (default 20000 = 0.02 USDC), when no entry matches that network and asset, or when payTo is not the treasury 0x71DEAc098914A009E3720524642A6bE6F65EE528.
  4. It asks the wallet for an EIP-712 TransferWithAuthorization (EIP-3009) signature and retries the same POST with the FLAT envelope { x402Version: 2, scheme: "exact", network, payload: { from, to, value, validAfter, validBefore, nonce }, signature }, base64-encoded, in X-PAYMENT-AUTH (and the same value in X-PAYMENT).

The agent needs USDC, not ETH: settlement is broadcast by the facilitator.

The endpoint also serves a limited free-trial allowance before billing: a call taken from the trial answers HTTP 200 with the verdict and carries x-free-trial: true plus x-free-trial-remaining: <n>. Once the allowance is exhausted, the endpoint answers HTTP 402 and the provider pays and retries as above.

Options

automatonFirewallActionProvider({
  maxAmountUnits: 20000, // per-call signing cap in USDC base units (6 decimals)
  baseUrl: 'https://api.automaton-sovereign.workers.dev',
  dryRun: false          // true: return the 402 without paying
});

Results that are not a verdict

  • {"status":"payment_refused","verdict":null,"riskScore":null,"error":"amount_above_cap" | "no_supported_requirement" | "payto_not_allowed" | "bad_amount" | "bad_cap"}: the challenge failed a guard; nothing was signed.
  • {"status":"unavailable","verdict":null,"riskScore":null,"error":"firewall_unavailable"}: the firewall could not be reached. This is not a REJECT: no risk was measured, so none is reported.