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

@yashjain99/mandate-sdk

v0.1.1

Published

Bounded delegation for AI agents: a smart account with on-chain caps, an allow-list policy and a hardware guardian; planner, simulator, executor, approvals and market data.

Readme

@yashjain99/mandate-sdk

Bounded delegation for AI agents. A user owns a MandateAccount smart account; the agent may act through it inside an on-chain allow-list and USDC caps; anything irreversible or over-cap needs a guardian signature, clear-signed on a Ledger. This SDK plans, simulates and executes steps against that account, handles approvals, and reads live market data from The Graph.

npm i @yashjain99/mandate-sdk viem
import { createMandate, fileStore, LocalAgentWallet, chains, recipes, ledgerNodeGuardian } from "@yashjain99/mandate-sdk";

const client = createMandate({
  account: "0x58612CE0945666cf58CA7e24808625a3cF10C5c3",
  wallet: new LocalAgentWallet(process.env.AGENT_PRIVATE_KEY, { 84532: chains.baseSepolia, 5042002: chains.arcTestnet }),
  store: fileStore(".mandate"),
  graphApiKey: process.env.GRAPH_API_KEY,
  guardian: ledgerNodeGuardian(),   // optional: co-sign on a Ledger over USB; omit to collect signatures yourself
});

const plan = await recipes.liquidity(client, { kind: "liquidity", amountUsdc: 100, destinationChainId: 5042002, recipient: "0x…", constraints: { doNotSell: ["ETH"] }, repayInDays: 7 });
await client.simulate(plan);
await client.executeAll(plan, (r) => console.log(r));

What you get

  • MandateClientpositions(), markets(amount), plan(actions), simulate(plan), execute(plan, step), executeAll, approvals.request/submit/signWith, repayments().
  • Actions — pluggable ActionAdapters; built-ins for Compound v3 (supply/borrow, repay), Circle CCTP v2 (burn, relay), USDC payments, repayment intents. registerAction() to add your protocol.
  • Recipesrecipes.liquidity, recipes.repayment: the two end-to-end flows, as ordinary action lists.
  • StoresmemoryStore(), fileStore(dir), or implement Store for your database.
  • GuardianslocalGuardian (tests), ledgerNodeGuardian (USB), ledgerWebGuardian from @yashjain99/mandate-sdk/ledger-web (browser WebHID).
  • WalletsLocalAgentWallet (viem), CircleAgentWallet (Circle developer-controlled wallets).
  • Account helperspolicyPresets, ownerEncoders (setMandate, setPolicies, setGuardian…), computeAccountAddress, ABIs.
  • Approval message specapprovalText, callsHash, verifyGuardianSignature (SPEC-approval-message-v1).

Safety properties (enforced by the contract, not the SDK): gross USDC outflow is measured per call; each (plan, step) executes at most once; guardian approvals are nonce- and deadline-bound and cap the approved amount; the allow-list cannot be lifted by a guardian signature.

Chains today: Base Sepolia (Compound v3, real Circle USDC) and Circle Arc testnet (USDC gas). Contracts and docs: https://github.com/yashj09/mandate. MIT.