Skip to content
Versionv0.1 ALPHA 2

JavaScript SDK

Coming soon

The JavaScript SDK is in development and not yet published. Today the Rust SDK and the WebAssembly verifier are available; the JS, Python, and Go bindings are on the roadmap. The examples below preview the planned API.

The JavaScript SDK wraps the Rust core compiled to WebAssembly, so browser and Node.js verification produce byte-identical results to the CLI.

Install

bash
npm install @osdf/sdk

Verify in the browser

bash
import { verify } from "@osdf/sdk"; const file = await fileInput.files[0].arrayBuffer();const report = await verify(new Uint8Array(file)); console.log(report.score);          // 100console.log(report.stages.signature.status); // "pass"

Verify in Node.js

bash
import { readFile } from "node:fs/promises";import { verify, TrustStore } from "@osdf/sdk"; const trust = await TrustStore.fromDir("./trust");const report = await verify(await readFile("contract.osdf"), { trust }); if (!report.ok) process.exit(1);

Types

The package ships first-class TypeScript types for the full verification report, including per-stage checks and trust-root provenance.

Spec status: working draft v0.4 · subject to change before v1.0.