LedgerStore API

SQLite-backed append-only hash-chained ledger.

store = LedgerStore("ledger.db")

# Append
entry = store.append(entry_type, issuer_did, subject_did, payload)

# Query
entries = store.query(
    subject_did="did:...",
    entry_type=LedgerEntryType.CREDENTIAL,
    limit=50,
)

# Get by ID
entry = store.get(entry_id)