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

@probarion/core

v0.1.2

Published

Probarion core: contract types, canonical hashing, signed ledger, policy engine, attestation and verifier checks. Pure TypeScript, no network.

Readme

@probarion/core

The pure TypeScript core of Probarion, a mandate layer for AI agents on NEAR: spend by mandate, prove every payment.

Unaudited beta. Versions 0.x may change the API in a minor release. MIT licensed.

Decisions, hashes and checks are deterministic functions of their inputs. There is no network, no filesystem and no Node built-in, so the same code decides, hashes and verifies in the SDK, the CLI, a server and a browser. The network and files live in @probarion/sdk.

What is in it

  • Types. TypeScript mirrors of the Probarion vault and factory contract views, with the contracts' snake_case JSON keys, and the network constants (NETWORKS).
  • Hashing and keys. canonicalJson (RFC 8785), sha256Hex, and ed25519 helpers in the NEAR key format (generateKeyPair, createEd25519Signer, verifyEd25519).
  • Ledger. The ledger is a signed, hash-chained list of entries. buildEntry signs the body hash, computeLink chains it, verifyEntrySignature checks it, and computeNonce derives the attestation nonce from the ledger position and the vault account, so a model's attestation report is bound to one place in one vault's history.
  • Policy. decide(input) is the code's decision for one invoice: the built-in rules plus any CustomRule you add. The destination of a payment always comes from the mandate; a payee_hint that contradicts it is refused. A model proposal is advice, used only when its attestation passes; the code rules (and the contract) still apply to the mandate it names.
  • Attestation. checkAttestation runs the offline checks A1 to A7 on NEAR AI Cloud evidence (the signature, the signing address, the nonce binding, and that the signed response is the proposal that was recorded). checkRequestBinding is the auditor check A8, which recomputes the request from the invoice text. These checks do not show that a TDX quote came from genuine TEE hardware; that needs the online check in the SDK.
  • Verifier. runChecks(snapshot) runs checks a to i (ledger signatures, hash links, on-chain anchors, a decision for every spend, attestations, vault locked, intents keys, burn memos, factory version) and returns a VerifyReport; firstBrokenSeq(report) names the first entry that fails.
  • Payee check. assessPayee(signals, { knownPayees }) turns what was read about a payee into allow, warn or block with one reason per check: exists, seed blocklist, lookalike of a vault's payee, contract, new or code changed in about 7 days, past payments. An unread signal is a warning, and so is a check with no vault's payees to compare with. parsePayeeRef reads near:, base: and solana: payees. It is in this package from release 0.1.2 on, and in this repository; release 0.1.1 on npm does not have it.

Install

npm install @probarion/core

ESM only, Node 24 or newer. Import it with import; there is no CommonJS build.

To build it from source instead, from a clone of the repository:

git clone https://github.com/probarion/probarion.git
cd probarion
pnpm install --frozen-lockfile
pnpm build

A script in the repository folder then imports the build as ./packages/core/dist/index.js, and a package of the clone's pnpm workspace that depends on @probarion/core imports it by name, as the examples below do.

Example

import { canonicalJson, firstBrokenSeq, runChecks, sha256Hex, type Snapshot } from "@probarion/core";

// RFC 8785: key order and number formatting are fixed, so the hash is stable everywhere.
sha256Hex(canonicalJson({ b: 1, a: 2 })); // the sha256 of {"a":2,"b":1}

// A snapshot comes from `@probarion/sdk` (`probarion.snapshot()`), or from a file someone gave you.
async function audit(snapshot: Snapshot) {
  const report = await runChecks(snapshot); // pure and offline; a malformed snapshot gives a failing report
  for (const check of report.checks) console.log(check.id, check.status, check.detail);
  return report.ok ? null : firstBrokenSeq(report);
}

A passing report says the ledger, the chain and the recorded decisions agree with each other. It does not say the vault's code is audited, and the offline run does not verify TEE quotes.