@0byte-lab/sdk
v0.1.0
Published
TypeScript SDK for 0byte — the origin protocol for AI content
Maintainers
Readme
0byte TypeScript SDK
The official TypeScript SDK for 0byte — the origin protocol for AI content.
Installation
npm install @0byte-lab/sdkQuickstart
import { Zerobyte } from "@0byte-lab/sdk";
const client = new Zerobyte({ apiKey: "0b_key_..." });
// Stamp AI-generated content
const proof = await client.stamp({
content: imageBuffer,
contentType: "image/png",
provider: "openai",
model: "dall-e-3",
});
console.log(proof.id); // "0b_proof_abc123"
console.log(proof.fingerprint); // perceptual content hash
console.log(proof.verifyUrl); // "https://verify.0byte.tech/0b_proof_abc123"
// Verify any content
const result = await client.verify(someImageBuffer);
console.log(result.matched); // true / false
console.log(result.confidence); // fingerprint similarity scoreTransparency Log
// Get latest Merkle tree root
const head = await client.getTreeHead();
console.log(head.rootHash, head.treeSize);
// Get inclusion proof for a stamped proof
const inclusion = await client.getInclusionProof(proof.id);
console.log(inclusion.inclusionPath);