Loading…
Loading…
Integrate
The recording step is one call. Your system hashes what it already produces, sends the 32-byte digest, and stores the proof that comes back beside its own record. Your content never leaves your systems, and the proofs check without BitGraph.
HTTP API
Bind one digest, or many in one request (base64 SHA-256):
curl -X POST https://bitgraph.ing/api/commit \
-H 'content-type: application/json' \
-d '{"digests":[{"digestB64":"<sha-256, base64>","hashAlg":"sha256"}]}'The reply holds one proof per digest sent. Each bind through this endpoint also gets its Base floor, and its proof hash is queued for a Base ceiling. Every proof is kept and can be fetched by the digest it bound, earliest first:
curl https://bitgraph.ing/api/proofs/<sha-256, base64url>
# {"proofs":[{"proof":{…},"writeTime":…}, …]}
curl -X POST https://bitgraph.ing/api/proofs/batch \
-H 'content-type: application/json' -d '{"digests":["<b64url>", …]}' # up to 2,000 per callA 503 with "code":"tee-restarting" means the enclave is starting a new epoch; retry after a few seconds. A 429 carries Retry-After.
Collections
Build an RFC 6962 tree over your items’ SHA-256s on your side (leaf = SHA-256(0x00 ‖ digest), node = SHA-256(0x01 ‖ left ‖ right), an odd last node rises), and bind the SHA-256 of this exact text:
Merkle root (RFC 6962, SHA-256; each leaf is a file's SHA-256) of <N> files: <root, hex>
Keep each item’s path of sibling hashes. With it, any single item verifies against the one proof on its own, and the verifier reports which item of how many it is. Up to 1,000,000 items per tree.
SDK and CLI
npm install @mikeargento/bitgraph-sdk
import { BitGraph } from "@mikeargento/bitgraph-sdk";
const bg = new BitGraph();
const [b] = await bg.bind("run-042.log"); // hashed locally; the proof is saved as run-042.log.bitgraph.json
console.log(b.number, b.proofUrl);npx -p @mikeargento/bitgraph-sdk bitgraph make run-042.log --json npx -p @mikeargento/bitgraph-sdk bitgraph check run-042.log --json
MIT licensed. --api-key or BITGRAPH_API_KEY for keyed access. Full reference: Docs.
MCP for agents
The local server hashes files where they are and saves each proof beside its file:
{
"mcpServers": {
"bitgraph": { "command": "npx", "args": ["-y", "@mikeargento/bitgraph-mcp"] }
}
}Tools: bitgraph_record, bitgraph_check, bitgraph_get_proof. Clients that connect by URL use https://bitgraph.ing/mcp, which binds digests (bitgraph_bind) and looks them up.
Verify in your product
The verifier is its own MIT package. In your code:
npm install @mikeargento/bitgraph-verify
import { verifyAttested } from "@mikeargento/bitgraph-verify";
const r = await verifyAttested({ proof, bytes });
r.valid // true: attestation, published image, digest, signature, slot all check
r.attestedAtMs // the hardware's signed time of the bind
r.image // { version: "v13", since: "2026-10-19" }
r.treeMember // { index, files } for an item of a collectionOr from a shell, pinning the measurement so nothing else is accepted:
npx @mikeargento/bitgraph-sdk verify <file> --proof <file>.bitgraph.json --pcr0 adaad0bef62292d35197ae8db19e40685229f1a1e6070a7c77a148c4ada88ee66a1ca50819eebc2017c6716a49f2692f
Production volume
The public endpoint is rate-limited per address and in total, which is plenty for evaluation. Production integrations use an API key, which lifts those limits, under managed-recording terms. For a deployment you operate yourself, see Licensing.