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

@aioschema/js

v0.5.5

Published

AIOSchema v0.5.5 — Node.js reference implementation library.

Downloads

25

Readme

@aioschema/js

AIOSchema v0.5.5 — Node.js reference implementation and CLI.

Pure CommonJS. Zero external dependencies. Requires Node.js ≥ 18.


Install

npm install @aioschema/js

For the CLI globally:

npm install -g @aioschema/js

CLI

# Generate a manifest for a file
aioschema generate myfile.pdf

# Generate with a specific algorithm
aioschema generate myfile.pdf --algorithm sha384

# Generate with your creator_id
aioschema generate myfile.pdf --creator-id ed25519-fp-ebc64203390ddefc442ade9038e1ae18

# Verify a file against its manifest
aioschema verify myfile.pdf myfile.pdf.aios.json

# Show help
aioschema --help

The CLI writes myfile.pdf.aios.json alongside your file. The original file is never modified.


API

const { generateManifest, verifyManifest, generateKeypair } = require('@aioschema/js');

// Generate a manifest
const manifest = generateManifest('myfile.pdf');
// → writes myfile.pdf.aios.json, returns the manifest object

// Generate with signing
const { privateKey, publicKey } = generateKeypair();
const signed = generateManifest('myfile.pdf', { privateKey });

// Verify
const result = await verifyManifest('myfile.pdf', manifest);
console.log(result.success);     // true
console.log(result.match_type);  // "hard"

// Verify with signature check
const result2 = await verifyManifest('myfile.pdf', signed, { publicKey });
console.log(result2.signature_verified); // true

Full API reference

const aios = require('@aioschema/js');

// Core
aios.generateManifest(filePath, opts?)   // generate + save sidecar
aios.verifyManifest(filePath, manifest, opts?)  // verify asset against manifest

// Keys
aios.generateKeypair()                   // → { privateKey, publicKey }
aios.creatorIdFromPublicKey(pubKeyBytes) // → "ed25519-fp-<hex>"
aios.creatorIdAnonymous()                // → "anon"
aios.validateCreatorId(id)               // → boolean

// Hashing
aios.computeHash(data, algorithm?)       // → "sha256-<hex>"
aios.parseHashPrefix(hash)               // → { algorithm, hex }

// Canonical JSON
aios.canonicalJson(obj)                  // → sorted-key JSON string
aios.canonicalBytes(obj)                 // → Buffer of canonicalJson
aios.canonicalManifestBytes(manifest)    // → Buffer for manifest_signature

// Sidecar I/O
aios.sidecarPath(filePath)              // → "myfile.pdf.aios.json"
aios.saveSidecar(filePath, manifest)    // write manifest to disk
aios.loadSidecar(filePath)              // read manifest from disk

// Utilities
aios.uuidV7()                           // → UUID v7 string
aios.safeEqual(a, b)                    // timing-safe Buffer comparison

// Constants
aios.SPEC_VERSION                       // "0.5.5"
aios.SUPPORTED_VERSIONS                 // Set of accepted schema_version values
aios.CORE_HASH_FIELDS                   // ["asset_id", "schema_version", ...]
aios.DEFAULT_HASH_ALG                   // "sha256"
aios.SOFT_BINDING_THRESHOLD_DEFAULT     // 5
aios.SOFT_BINDING_THRESHOLD_MAX         // 10
aios.SIDECAR_SUFFIX                     // ".aios.json"
aios.HASH_REGEX                         // RegExp for hash format validation

Running tests

# Unit tests (80 tests, Node built-in test runner)
node test_aioschema_v055.js

# Cross-implementation verification (14 deterministic vectors)
node cross_verify_node.js

License

Apache 2.0. See LICENSE.md.

Specification: CC-BY 4.0 — aioschema.org