Skip to main content

Proposal: This page presents the draft API and profile model. Send feedback on GitHub.

Ledger inspection and evidence

The ledger is an authority and evidence service, not a promise that every external effect happened. An inspector starts with a configured ledger key and keeper key, a scoped query permission, and an independently obtained trusted checkpoint. For the fixture, the logical sequence is:

sequence 1: redeemed -> signed ledger decision reference
sequence 2: committed -> signed resource outcome reference, prev = ref(sequence 1)
checkpoint: sequence 2, head = ref(sequence 2), stateHash = H("state", projection)

The fixture projection contains epoch, fence, rootId, spent, reserved, and revoked. It is only an illustrative projection. A production checkpoint projection must also cover every piece of security state needed to reconstruct consumed challenges and record IDs, registered grants and instance generations, reservations, settlements, closures, revocations, resource outcomes and state transitions. All parties must agree on its schema, ordering and digest rules before relying on it for recovery.

function inspect(bundle, trustedCheckpoint, trust) {
verifySignedRoleAndKind(trustedCheckpoint, trust.keeperKeys, "checkpoint");
require(bundle.ledger === trustedCheckpoint.payload.ledger);
let previous = bundle.trustedStartRef; let sequence = bundle.trustedStartSequence;
for (const event of bundle.events) {
verifySignedRoleAndKind(event, trust.stateKeys, "ledger-event");
require(event.payload.sequence === sequence + 1 && event.payload.prev === previous);
verifyReferencedObjectWhenAvailable(event.payload.objectRef, bundle.objects, trust);
previous = ref(event); sequence++;
}
require(sequence === trustedCheckpoint.payload.sequence);
require(previous === trustedCheckpoint.payload.head);
require(H("state", bundle.reconstructedState) === trustedCheckpoint.payload.stateHash);
return reportSeparateFindings(bundle, {verifiedHistory: true,
independentCheckpoint: true, observedResourceEffect: bundle.resourceEvidenceStatus});
}

A valid checkpoint signature proves the keeper signed that checkpoint. It does not prove it is the keeper's latest. The inspector must obtain a freshness assertion or latest sequence from the independent keeper through an authenticated channel and compare it with its own previously retained state. A chain or inclusion proof alone cannot prove an omitted later event does not exist. An evidence bundle needs an authenticated, stable snapshot boundary and an explicit completeness mechanism. Pagination must remain anchored to the same snapshot.

Restrict ledger inspection by tenant, purpose, role, query range and disclosure policy. A public object store may expose designated nonsecret objects, but raw prompts, inputs, private enrollment evidence, secrets, full database results and low-entropy data are not automatically safe to publish. Separate historical verification at a recorded time from the question of whether a grant is valid now.