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

@daski/x402-scheme

v0.4.4

Published

Composite Exact-EVM client plugin for the modular x402 v2 SDK: wraps the stock handler, adds Daski recipe-order binding, and refuses to sign anything its policy validator has not independently checked.

Readme

@daski/x402-scheme

A composite Exact-EVM client plugin for the modular x402 v2 SDK, and the policy validator that decides whether a challenge may be signed at all.

npm install @daski/x402-scheme @x402/core @x402/evm

It wraps, it does not replace

import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { registerDaskiExactEvmScheme } from "@daski/x402-scheme";

const client = new x402Client();
registerDaskiExactEvmScheme(client, {
  network: "eip155:84532",
  signer,                              // your SignerAdapter
  payerAddress,
  policy,                              // PolicyConfig — no config, no signing
  stock: new ExactEvmScheme(account),  // wrapped, not discarded
  resolvePurchaseContext,              // what you're buying, what you approved
});

On PaymentRequired:

  • extensions["daski-order-binding"] present → the Daski path: validate, recompute, sign.
  • absent → the wrapped stock handler, called with the same requirements and context objects, by reference, untouched.

The scheme name stays "exact", because that is the only name the facilitator knows — inventing a second one would make the payments unverifiable. findDefaultAsset and schemeHooks are forwarded, so registering the composite does not quietly disable the host's spend controls.

The policy validator

PolicyConfig is required. No config, no signing.

Every expectation is config- or catalog-sourced; nothing is read from the challenge being validated. Before any purchase authorization is signed:

  1. Chain and verifying contract equal the pinned profile values
  2. types is exactly the closed 6-field TransferWithAuthorization
  3. message.from is the configured payer
  4. message.to is corroborated by two independent catalog sources
  5. The amount matches the challenge, the approved quote, and the caps
  6. The validity window is sane, and does not outlive the binding
  7. The payment identifier is unused
  8. (Lifecycle) the action URI and request hash are recomputed, not accepted

Failures raise PolicyRefusal, carrying the failed check, a stable code, and a remediation. The validator never repairs a payload and proceeds.

Recipe recomputation

import { recipeNonceV2 } from "@daski/x402-scheme";

The authorization nonce is a commitment to the whole deal — chain, token, payer, splitter, amount, and the five deal hashes. Recomputing it locally is what lets you sign a server-proposed authorization without trusting the server. When the gateway supplies daski-sign-request, its proposal is treated as an input: recomputed, compared, and refused on mismatch.

recipeNonceV2 is the only recipe (the V1 binding is retired) and is pinned by tests against a vector produced independently by the reference client behind 43 settled sandbox orders.

Examples

examples/fetch · examples/mcp

License

MIT