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

@veridex/fetch-adapter

v0.1.0

Published

Bounded payments for Fetch.ai agents — wrap a uAgent's wallet in a Veridex vault with daily budgets, recipient allowlists, and contract allowlists on BNB Chain

Readme

@veridex/fetch-adapter

Bounded payments for Fetch.ai agents on BNB Chain.

An agent gets a session key that can spend up to a daily budget, only to allowlisted recipients, only through allowlisted contracts. Every attempt is checked on-chain before value moves.

The design assumption is that the agent gets compromised. When it does, the attacker inherits exactly those bounds and cannot widen them — a session key is forbidden from calling the policy module or the session registry, so it cannot allowlist itself or lift its own budget. Owning the agent gets you its daily allowance at approved merchants, not the treasury.

npm install @veridex/fetch-adapter

Use it from TypeScript

import { VeridexFetchVault } from '@veridex/fetch-adapter';
import { parseUnits } from 'ethers';

const vault = new VeridexFetchVault({
  rpcUrl: 'https://bsc-testnet-rpc.publicnode.com',
  addresses: { vault: VAULT, sessionRegistry: REGISTRY, spendingLimitModule: MODULE },
  sessionKey: process.env.VERIDEX_SESSION_KEY!,   // the hot key — assume it leaks
});

// Ask first: a refusal caught here costs no gas and gives the agent a readable reason.
const decision = await vault.checkPolicy({ token: FET, recipient, amount: parseUnits('10', 18) });

if (decision.allowed) {
  const { txHash } = await vault.pay({ token: FET, recipient, amount: parseUnits('10', 18) });
}

pay() re-checks policy and throws PolicyViolationError before broadcasting, so an agent never burns gas discovering it is not allowed to do something.

Use it from a Python uAgent

Agentverse agents are Python; this SDK is TypeScript. MCP is the seam. Run the server —

npx veridex-fetch-mcp

— and the uAgent calls it over JSON-RPC. That boundary is a security property, not just plumbing: the session key lives in the server, the agent's LLM never sees it and cannot reach the chain directly. A prompt-injected agent can request a drain and simply be told no.

Three tools: veridex_pay, veridex_check_policy, veridex_get_budget.

See demo/fetch-bounded-payments for a working uAgent that makes one permitted payment and one refused one.

Provisioning

Setup is an owner action, so it crosses Wormhole from the hub. It happens once. Paying is an agent action, read from a chain-local SessionRegistry — one storage read, no bridge, no Guardian round-trip. That split is the point of the spoke design: the thing that happens constantly is local; the thing that crosses a bridge happens once.

const provisioner = new VeridexProvisioner({ provider, relayer, addresses, ownerVaa });

await provisioner.attachModules(ownerKeyHash);
await provisioner.setPolicy({
  token: FET,
  dailyLimit: parseUnits('100', 18),
  allowedRecipients: [merchant],       // an empty allowlist is refused, not silently permissive
});
await provisioner.grantSession(
  { sessionKeyAddress, ttlSeconds: 3600, maxValue: parseUnits('25', 18) },
  [{ target: FET, selectors: ['0xa9059cbb'] }],   // transfer only — NOT approve
);

Scoping the session to transfer matters beyond the transfer path: an unscoped session could approve the token and let an attacker pull the balance out later, sidestepping every spending limit.

Two things that will bite you

FET is 18 decimals. Most x402 settlement today is 6-decimal USDC. Read decimals from the token (provisioner.tokenDecimals()); do not assume. A 6-vs-18 mistake misprices by 10¹².

An unprovisioned vault fails open. A vault with no policy attached will send funds anywhere. assertProvisioned() refuses to operate against one, and the MCP server calls it on startup — because an agent wired to a policy-less vault looks bounded and isn't, which is strictly worse than a bare wallet.

License

MIT