Quickstart
Stamp any data and get back a portable, independently verifiable proof.
Requirements
- TypeScript: Node.js 18 or later
- Python: Python 3.10 or later
Installation
TypeScript
npm install @sarek/coreYour first stamp
Hashing happens locally with SHA3-256. Only the hash leaves your process; the data itself never does.
TypeScript
import { initSarekCore } from '@sarek/core'
const sarek = await initSarekCore()
const data = 'Patient 4821: high risk for diabetes'
const proof = await sarek.stamp(data)
const result = await sarek.verify(proof.ldgp, data)
// → { valid: true, treeIntegrity: true, onChain: true }The SDK writes a local record and the proof file to a sarek-core/ directory
in your working directory, so every stamp is reproducible later.
Stamp files and batches
TypeScript
import { initSarekCore } from '@sarek/core'
import fs from 'node:fs'
const sarek = await initSarekCore()
const pdf = fs.readFileSync('invoice-2026-118.pdf')
const proofPdf = await sarek.stamp(pdf)
const results = await sarek.stamp([
'loan #4821 approved',
'loan #4822 declined',
'loan #4823 approved'
])
// results.length → 3A single input returns a single result. A list returns a list, stamped in one transaction.
Next steps
Last updated on