@treeship/core-wasm
v0.10.4
Published
WebAssembly bindings for Treeship cryptographic verification. Runs anywhere WASM runs: Node, browser, Vercel Edge, Cloudflare Workers, AWS Lambda.
Readme
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-wasmUsage
import init, { verify_envelope, verify_zk_proof } from "treeship-core-wasm";
await init();
const result = verify_envelope(envelopeBytes);
console.log(result.valid); // true | falseBuilding from source
Requires wasm-pack:
wasm-pack build packages/core-wasm --target webDocumentation
Full API reference: docs.treeship.dev
Repository
github.com/nicholasgriffintn/treeship
License
See LICENSE in the repository root.
