Concepts
Transparency log
The transparency log is a public, signed, append-only series of checkpoints that commit to every account's decision ledger head, so anyone can check that Provenance never rewrote history. It publishes hashes only: no decisions, and no account identities.
When to use it
- Show an auditor or counterparty that your decision records weren't altered after the fact.
- Prove your account's ledger head existed by a given checkpoint.
- Monitor the log independently, without an API key.
How it works
- Every hour, Provenance takes a checkpoint. It builds a Merkle tree over each account's current ledger head, with account IDs hashed, and signs the root with the same published keys as intent tokens.
- Checkpoints chain. Each one names the previous root in
prev_root, and the series forms its own Merkle log, with consistency proofs between sizes. - Anyone verifies. Changing any past checkpoint breaks its signature, the
prev_rootchain, or a consistency proof.
- Ledger headsone per account, hashed
- CheckpointMerkle root, signed, chained
- Public logconsistency proofs
When the server has a timestamp authority set up, each root is also stamped by it; otherwise the checkpoint says witness_status: "not_configured".
Key fields
seqinteger- The checkpoint's position in the log, from 1.
rootstring- The Merkle root over the account ledger heads at that hour.
tree_sizeinteger- How many accounts the root covers.
prev_rootstring- The previous checkpoint's root; all zeros for the first.
witness_statusstring- Whether an external timestamp authority stamped the root, or
not_configured. signed_tokenstring- An ES256 JWS over the checkpoint, verifiable with the published keys.
Read and check the log
GET / is public and needs no key:
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
curl $PROVENANCE_API/.well-known/provenance-log
import { fetchJwks, verifyIntentTokenOffline } from "@provenanceauth/sdk";
const api = process.env.PROVENANCE_API!;
const jwks = await fetchJwks(api);
const log = await (await fetch(`${api}/.well-known/provenance-log`)).json();
for (const checkpoint of log.checkpoints) {
const result = await verifyIntentTokenOffline(checkpoint.signed_token, jwks);
console.log(checkpoint.seq, result.valid && result.payload?.root === checkpoint.root);
}
import os
import httpx
from provenanceauth import fetch_jwks, verify_intent_token_offline
api = os.environ["PROVENANCE_API"]
jwks = fetch_jwks(api)
log = httpx.get(f"{api}/.well-known/provenance-log").json()
for checkpoint in log["checkpoints"]:
result = verify_intent_token_offline(checkpoint["signed_token"], jwks)
print(checkpoint["seq"], result.valid and result.payload["root"] == checkpoint["root"])
The response, trimmed to the first checkpoint:
{
"environment": "sandbox",
"checkpoints": [
{
"seq": 1,
"prev_root": "0000000000000000000000000000000000000000000000000000000000000000",
"witness_status": "not_configured"
}
],
"consistency": []
}
To check the whole history, verify each signed_token, check that each prev_root equals the root before it, and check each proof in consistency against log_root. The proofs follow RFC 6962.
Prove your account's inclusion
GET / returns a Merkle proof for your account's ledger head in the latest checkpoint. It answers 404 until a checkpoint has been taken since your account's first decision.
curl $PROVENANCE_API/v1/log/inclusion \
-H "Authorization: Bearer $PROVENANCE_KEY"
const inclusion = await (await fetch(`${api}/v1/log/inclusion`, { headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` } })).json();
inclusion = httpx.get(f"{api}/v1/log/inclusion", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
The response has the checkpoint's root and signed_token, your account_hash and chain_head, and the leaf_index and audit proof. Hash the leaf as SHA-256 of a 0x00 byte followed by account_hash:chain_head, combine it with each proof hash as SHA-256 of 0x01, left and right, and you should arrive at root.