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

@quaestor/core

v0.1.0

Published

Local daemon issuing Ed25519 HD-key signed payment mandates with a BLAKE3-chained ledger.

Downloads

136

Readme

quaestor-core

CI Status Node License

Demo

Phase 2.0 — Local policy LLM (latest). Intent enforcement, locally. Watch · Phase 1.5a

Local-first agent payments. Quaestor lets an autonomous agent pay merchants from your machine without ever uploading the keys — the daemon issues short-lived, amount-capped, recipient-bound mandate JWTs from a vault stored on the device, and every issuance and redemption lands on a tamper-evident ledger you can audit. This repo is the daemon: the vault, the signer, the ledger.

How it fits together

flowchart LR
  Agent["Agent / App"] -->|"mandate JWT"| Bridge["quaestor-bridge<br/>(protocol translator)"]
  Bridge -->|"POST /mandate/redeem<br/>X-Local-Auth"| Core["quaestor-core<br/>127.0.0.1:3402"]
  Core -->|"x402-shape Credential"| Bridge
  Bridge -->|"X-PAYMENT / Authorization: Payment /<br/>X-A2A-Payment"| Merchant["Merchant /<br/>Facilitator"]
  Bridge -->|"POST /ledger/receipt"| Core
  Core --> Vault[("Encrypted vault<br/>HD Ed25519, AES-256-GCM<br/>KEK in OS keychain")]
  Core --> Ledger[("BLAKE3-chained<br/>SQLite WAL ledger")]

What's working today

  • ✅ HTTP daemon at 127.0.0.1:3402 — every endpoint gated by X-Local-Auth, non-loopback peers refused with 403
  • ✅ HD Ed25519 vault: BIP-39 → SLIP-0010, AES-256-GCM at rest, KEK in OS keychain (keytar, service quaestor-core)
  • ✅ EdDSA mandate JWTs with full claim set (amount_max, use_counter_max, exp, nbf, purpose_tag, jti, …)
  • ✅ Redemption returns x402-shape Credential (cred_<jti>_<use_index>) with use-counter ratcheting
  • ✅ BLAKE3-chained SQLite WAL ledger — tamper-evident via quaestor ledger verify
  • POST /ledger/receipt closes the mandate → pay → receipt loop, idempotent on credential_id
  • ✅ Resumable replay via GET /ledger/since/:hash
  • ✅ 24/24 tests pass, tsc --noEmit clean

Quickstart

Install from npm:

pnpm add -g @quaestor/core
pnpm install && pnpm build
node ./bin/run.js init           # captures mnemonic + writes ~/.config/quaestor/auth.token
node ./bin/run.js start          # listens on 127.0.0.1:3402

Use Node 22 LTS — nvm use picks it up from .nvmrc. Native bindings (better-sqlite3, keytar) break on Node 23+.

Trust boundaries

These are load-bearing. Violating any one of them is a regression, not a feature.

  1. Private keys never leave the host. The HTTP API returns only signed JWTs and derived credentials. Raw key material is never serialized.
  2. Loopback-only. Bound to 127.0.0.1; non-loopback peers get 403. Every endpoint additionally requires X-Local-Auth, compared with crypto.timingSafeEqual.
  3. Tamper-evident ledger. Every state change is a row with prev_hash + entry_hash = BLAKE3(ts | type | jti | payload | prev_hash). quaestor ledger verify walks from genesis and reports the first break.
  4. Mandate validity is decided in core. Signature, expiry, nbf, amount_max, and use_counter_max are checked on every redeem. The bridge never sees a private key and never makes the call.
  5. No retroactive mutation. No endpoint deletes or rewrites a row. Disputes are resolved by appending a new entry kind.
  6. Idempotency on credential_id. A second receipt for the same credential returns 409 duplicate_receipt.
  7. Trust nothing at startup. A vault that won't decrypt with the keychain KEK or a ledger whose chain fails verify() causes the daemon to refuse to serve.

Demo

90-second screen recording — one mandate, three protocols, one ledger:

demo.mp4 (in quaestor-bridge)

HTTP API (cheat sheet)

All endpoints require X-Local-Auth: <token> and a loopback peer.

  • POST /mandate/request — issue a signed JWT or a 402 challenge
  • POST /mandate/redeem — verify + decrement use-counter, return Credential
  • POST /ledger/receipt — record an upstream confirmation; idempotent on credential_id
  • GET /ledger/since/:hash — resumable ledger replay

Storage paths: $XDG_DATA_HOME/quaestor/{vault,ledger}.db, auth token at $XDG_CONFIG_HOME/quaestor/auth.token, master KEK in OS keychain (service quaestor-core).

More

  • Status, verified capabilities, known gaps: STATUS.md
  • Companion repo: quaestor-bridge — protocol translator (MPP, x402, AP2)