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

@sequesign/sdk

v0.4.2

Published

TypeScript SDK and reference verifier for Sequesign, a protocol for cryptographically verifiable receipts of delegated AI work. Record actions in direct or managed mode, attach verified approver/counterparty identity via registered-key vouching, and verif

Readme

@sequesign/sdk

TypeScript SDK and reference verifier for Sequesign, a protocol for cryptographically verifiable receipts of delegated AI work. The agent signs, the witness signs, the human signs; the result is a receipt any party can verify offline with no call to any Sequesign service.

Sequesign is patent pending.

Install

npm install @sequesign/sdk

Requires Node 22.11 or later.

Record actions (managed mode, hosted broker)

import { createSequesign } from "@sequesign/sdk";

const sdk = createSequesign({
  mode: "managed",
  tier: "hosted",
  broker: {
    baseUrl: "https://broker.sequesign.com",
    apiKey: process.env.SEQUESIGN_API_KEY
  }
});

const session = await sdk.startSession({
  agent: { agentId: "agent_acme_001", keypair },
  task: { taskId: "task_invoice_001", delegatorId: "finance_team" }
});

await session.recordAction({
  actionType: "policy_checked",
  evidence: { decision: "approved", reason: "within limit" }
});

const { receipt } = await session.finalize();

API keys are issued at dashboard.sequesign.com. A key may be registered to an agent Ed25519 public key at creation; receipts produced under a registered key carry an agent_identity_attestation binding the work to that keypair.

Schema- and profile-constrained recording

Receipts default to freeform. Set mode on startSession to have the SDK validate what you record against the bundled registry:

  • schema_validated — each action's evidence must match the registered JSON Schema for its actionType;
  • profile_constrained — additionally, the chain must follow a workflow profile (allowed / required actions and transitions).

Resolve the registered profile and per-action schemas with the registry helpers (loadProfileById, loadSchemaByActionType, loadSchemaById, loadManifest) and pass their hashes; the SDK validates evidence as you record, and a verified receipt then reports schema_valid and (for a profile) workflow_profile_valid:

import { loadProfileById, loadSchemaByActionType } from "@sequesign/sdk";

const profile = await loadProfileById("sequesign.invoice_payment.v0.1");

const session = await sdk.startSession({
  agent: { agentId: "agent_acme_001", keypair },
  task: { taskId: "task_invoice_001", delegatorId: "finance_team" },
  mode: "profile_constrained",
  profile: { profile_id: profile.profileId, profile_hash: profile.profileHash }
  // …plus the transport-specific fields from the modes above
});

const schema = await loadSchemaByActionType("policy_checked");
await session.recordAction({
  actionType: "policy_checked",
  evidence: {
    policy_version: "2026-01",
    auto_pay_limit_usd: 5000,
    invoice_amount_usd: 4200,
    decision: "approved",
    reason: "within auto-pay limit"
  },
  schemaId: schema.schemaId,
  schemaHash: schema.schemaHash
});

Evidence that does not match the schema is rejected at recordAction time, before it is signed. examples/05-record-profile-constrained.ts runs the full invoice-payment chain end to end.

Verify a receipt offline

import {
  verifyReceiptPackage,
  selfTrustedWitnessKeysFromPackage
} from "@sequesign/sdk/verify";

// Integrity self-check: anchor to the witness key embedded in the
// package. For third-party verification, pass the witness's published
// keys (https://witness.sequesign.com/.well-known/sequesign/keys.json)
// instead, with trustAnchorMode "external".
const trustedWitnessKeys = await selfTrustedWitnessKeysFromPackage(packageDir);
const report = await verifyReceiptPackage(packageDir, {
  trustedWitnessKeys,
  trustAnchorMode: "self"
});

console.log(report.valid, report.verification_level);

The verifier checks evidence hashes, the action hash chain, agent and witness signatures, attestation bindings, and (when the receipt declares them) schema and workflow-profile conformance. Verification levels L0 through L3 — plus the independent witnessed flag and approver/counterparty identity badges — are documented in the protocol spec.

Registered-key vouching (verified approver/counterparty identity)

A bare approval signature proves only that some key signed; it does not prove whose key. Vouching closes that gap without giving up offline verification. An approver (or counterparty) enrols its attestation key with the platform, the platform issues a signed registration record, and that record travels inside the attestation as a self-contained identity_proof — so the receipt still verifies with no callback.

Enrolment proves possession of the key, then exchanges it for a proof:

import { registrationChallengeSignature } from "@sequesign/sdk";

// 1. Sign the enrolment challenge with the key you are registering.
const subjectSignature = registrationChallengeSignature({
  role: "approver",
  partyType: "human",
  identity: "[email protected]",
  subjectPublicKeyPem: approverKeypair.publicKeyPem,
  subjectPrivateKeyPem: approverKeypair.privateKeyPem
});

// 2. POST it to dashboard-api with a write-class key or dashboard session.
//    The response carries the proof you keep and attach:
//      { "identity_proof": { "issuer": "sequesign", "ref": "<base64url>" } }

Attach the returned identity_proof when you record the attestation (recordCounterpartyAttestation takes it the same way):

await session.recordApproval({
  approverId: "[email protected]",
  partyType: "human",
  approverKeypair,
  // …approval fields…
  identityProof // from the enrolment response
});

The proof is metadata, not part of the signed message, so attaching it never changes the attestation signature. To resolve it at verification time, pass the platform's published registration keys; a resolved proof flips that leg's vouched flag and raises it from present_verified:

import {
  verifyReceiptPackage,
  parseTrustedRegistrationKeys
} from "@sequesign/sdk/verify";

// https://dashboard-api.sequesign.com/.well-known/sequesign/registration-keys.json
const trustedRegistrationKeys = parseTrustedRegistrationKeys(registrationKeysJson);
const report = await verifyReceiptPackage(packageDir, {
  trustedWitnessKeys,
  trustAnchorMode: "external",
  trustedRegistrationKeys
});

Vouching is an independent badge: it raises the approver/counterparty identity legs but never changes the base L0–L3 level. Omit trustedRegistrationKeys and the receipt still verifies — the leg simply stays present_unverified.

Direct mode (no broker)

The SDK can also run direct mode: canonicalize and sign locally, with only the witness service in the loop. Any language can implement the same wire contract; see the protocol primitives reference with worked test vectors in the repository's docs/ directory.

Documentation

License

Apache License 2.0 — see LICENSE and NOTICE. The hosted platform (witnessing, receipt storage, dashboard) is a separate commercial service and is not covered by this license.