npm.io
0.15.0 • Published 11h ago

@treeship/core-wasm

Licence
Apache-2.0
Version
0.15.0
Deps
0
Size
527 kB
Vulns
0
Weekly
527

treeship-core-wasm

WebAssembly build of treeship-core for browser-side attestation verification.

What it does

treeship-core-wasm compiles the core cryptographic engine to WebAssembly so browsers can verify Treeship attestations without a server round-trip:

  • Ed25519 signature verification
  • Merkle proof validation
  • Groth16 zero-knowledge proof verification

This package powers the verification widget at treeship.dev/verify.

Installation

npm install treeship-core-wasm

Usage

import init, { verify_envelope, verify_zk_proof } from "treeship-core-wasm";

await init();

const result = verify_envelope(envelopeBytes);
console.log(result.valid); // true | false

Building from source

Requires wasm-pack:

wasm-pack build packages/core-wasm --target web

Documentation

Full API reference: docs.treeship.dev

Repository

github.com/nicholasgriffintn/treeship

License

See LICENSE in the repository root.

Keywords