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

@surrealdb/seal-core

v0.2.0

Published

Browser-safe verifier and domain library for Surreal Seal — SurrealDB's software-signing and trust infrastructure.

Readme

@surrealdb/seal-core

Browser-safe verifier and domain library for Surreal Seal — SurrealDB's software-signing and trust infrastructure.

Surreal Seal publishes a tamper-evident, append-only cryptographic chain of release and licence attestations. This library is the client-side verifier: it reconstructs trust state from raw chain entries and verifies everything locally, so you never have to trust a server's answer — you check the chain yourself. It powers the public trust portal at seal.surrealdb.com and is safe to run in the browser.

Install

npm install @surrealdb/seal-core
# or: bun add @surrealdb/seal-core

Browser-safe by design

The package depends only on Web-standard crypto (crypto.subtle) and portable primitives. It never imports Node-only, AWS, or KMS APIs, so it runs unchanged in browsers, workers, Bun, Deno, and Node. It ships as ESM only.

Usage

Fetch the chain and rebuild verified trust state with TrustEngine:

import { ChainApiClient, TrustEngine } from "@surrealdb/seal-core";

// 1. Pull the public chain from a Seal API.
const client = new ChainApiClient("https://api.seal.surrealdb.com", fetch.bind(globalThis));
const { entries } = await client.fetchFullChain();

// 2. Replay it through the engine. `pushEntries` throws on a structurally
//    broken chain (bad hash link, non-contiguous index); content-level
//    problems are recorded as issues instead.
const engine = new TrustEngine();
await engine.pushEntries(entries);

// 3. Inspect the resulting trust state.
if (engine.openIssues().size > 0) {
  console.warn("chain has unacknowledged issues");
}

for (const subject of engine.subjects()) {
  const verdict = engine.verdict(subject);
  console.log(subject.id.toString(), verdict.tag); // e.g. "valid" | "revoked"
}

For entity-level checks (a specific licence, release, or module) the library also provides stepped verification flows that expose each cryptographic step as an inspectable result:

import { SteppedLicenseVerification } from "@surrealdb/seal-core";

API surface

Everything is exported from the package root as named exports. Notable groups:

  • Trust engineTrustEngine, trust queries, entry-signature verification.
  • Stepped verificationSteppedLicenseVerification, SteppedReleaseVerification, SteppedModuleVerification, and the entry-proof stepper, each surfacing per-step results for UIs.
  • ChainChainApiClient, chain-entry envelopes, hashing, dispatch.
  • Identifiers & catalogLicenseId, CustomerId, product/OID catalog.
  • Schemas — Effect-Schema definitions for the Seal HTTP API responses.
  • Utilities — Crockford base32, ULID, JCS canonicalisation, PEM, digests, ECDSA helpers.

Versioning

This package is at 0.1.0 and the API may change before 1.0.0. The authoritative cross-language implementation of the verification rules is the Rust crate surreal-seal-core (embedded in SurrealDB Enterprise); this library tracks the same conformance vectors.

License

Licensed under the Apache License, Version 2.0.