@noirstack/hexarchproof-sdk
v0.0.1
Published
TypeScript SDK for Hexarch Deterministic Reproduction Proofs (DRP). Same input → same hash → same proof, anchored for independent verification.
Downloads
31
Maintainers
Readme
@hexarchproof/sdk
TypeScript SDK for Hexarch Deterministic Reproduction Proofs (DRP).
Execution becomes a verifiable artifact. Same input → same hash → same proof — anchored for independent verification.
Install
npm install @hexarchproof/sdkUsage
import { buildProof, verifyProof, sha256HexString, sha256HexJson } from '@hexarchproof/sdk';
const hash = sha256HexString('my payload');
const jsonHash = sha256HexJson({ b: 2, a: 1 });
const proof = buildProof(
{ input: 'my deterministic payload' },
{ type: 'hexarch.text-proof', version: '1' },
{ output: 'my deterministic payload' }
);
const result = verifyProof(
proof,
{ input: 'my deterministic payload' },
{ type: 'hexarch.text-proof', version: '1' },
{ output: 'my deterministic payload' }
);
// result.valid === trueAPI
canonicalJsonString(value)— RFC 8785 canonical JSON stringcanonicalJsonBytes(value)— UTF-8 Buffer of the abovesha256HexBytes(raw)— SHA-256 hex of raw bytessha256HexString(input)— SHA-256 hex of a UTF-8 stringsha256HexJson(value)— SHA-256 hex of canonical JSON bytesbuildProof(input, spec, output)— builds a fullDRPv1ProofrecomputeProofHash(proof)— re-derivesproof_hashfor tamper detectionverifyProof(proof, input, spec, output)— fully verifies a proof document
Links
- Hexarch Domain: https://hexarch.systems/
- Discord: https://discord.gg/DZysBQJQ
