The tamper-evident ledger API.
LedgerHash is a hash-chained, append-only double-entry ledger behind a thin REST API. Every posted entry is sealed with SHA-256 from a per-ledger GENESIS, immutability is enforced by the database itself, and every guarantee is independently verifiable by your customers — not just promised.
- SHA-256 hash chain
- Gapless sequencing
- DB-enforced immutability
- Merkle-sealed periods
- S3 WORM anchors
- TLA+-proven posting
The problem
Accounting backends were not designed to be verifiable.
Most ledgers are a mutable table with a timestamp and good intentions. Rows get edited, balances get patched, and auditors get spreadsheets. There is no cryptographic way to prove a record has not been touched since it was posted.
Silent edits
An UPDATE statement rewrites history and nobody can tell. Your audit trail is a promise, not a proof.
Reconciliation drift
Balances patched by hand stop tying back to the entries beneath them — and the drift is only found months later.
Weak audit trail
Logs live next to the data they protect, editable by the same people, deleted by the same scripts.
What you get
Integrity guarantees you can hand to an auditor.
Hash chain from GENESIS
Every posted entry carries SHA-256 over its canonical content plus the previous entry's hash. Change one digit anywhere and the chain breaks visibly.
Gapless numbering
Posting sequences are strictly 1, 2, 3… with no holes, enforced under a per-ledger lock proven fork-free in TLA+. Nothing can be silently deleted.
Reversal-only corrections
There is no void, no cancel, no edit. Mistakes are corrected by append-only reversals — the full story stays on the books.
Customer-verifiable proofs
Verification oracles re-derive every hash on demand. Your customers can check the chain, the sequence, and the seals without trusting us — or you.
How it works
Three calls, one guarantee.
- 01
Post a journal entry
Send balanced debit/credit lines to POST /v1/entries — multi-currency with directed FX quotes, dimensions, and idempotency keys included.
- 02
Chain and persist
The engine seals the entry under a per-ledger lock: gapless sequence, SHA-256 over the canonical payload, chained to the previous hash. Database triggers freeze it forever.
- 03
Verify any time
Call the verification oracles to re-derive every hash, prove the sequence is gapless, and check sealed periods against Merkle roots anchored in S3 Object Lock.
Security model
Integrity enforced at four layers.
Postgres triggers block UPDATE and DELETE on posted entries at the database level — a forged INSERT is refused by a trigger that independently recomputes the hash. On top of that, every entry is linked into a SHA-256 chain rooted at a per-ledger GENESIS; closed periods are sealed under a Merkle root chained period-to-period; and each seal is anchored to S3 Object Lock in COMPLIANCE mode, where even the operator cannot rewrite it.
The database says no
Immutability is not an application promise — triggers refuse tampering even from direct SQL with elevated access. The posting protocol's concurrency is model-checked in TLA+.
Proof beyond our word
Merkle inclusion proofs pin any single entry inside a sealed period; sealed roots are anchored to write-once S3 storage. Verify with our oracles — or recompute everything offline yourself.
For developers
A boring API is the point.
REST only. JSON in, JSON out. Timestamps are RFC 3339 UTC. Amounts are integer minor units — as numbers or as digit strings for crypto-scale precision. Every response carries the same envelope; every failure is a registered error code, never a naked 500.
Request
curl https://api.ledgerhash.co/v1/entries \
-H "Authorization: Bearer lh_live_<key-id>.<secret>" \
-H "Idempotency-Key: 7f3a…" \
-d '{
"journalCode": "GEN",
"effectiveDate": "2026-08-15",
"currencyCode": "GBP",
"description": "Owner capital",
"lines": [
{ "accountCode": "1000", "debit": "2000000" },
{ "accountCode": "3000", "credit": "2000000" }
]
}'Response
{
"ok": true,
"data": {
"entryId": "b7e2…",
"status": "posted",
"postingSequence": 42,
"entryHash": "9c41…e2",
"previousHash": "27f2…14",
"postedAt": "2026-08-15T12:00:00Z"
},
"requestId": "req_…"
}Illustrative payload — the full field reference ships with sandbox access.
Who it's for
Backends, not end users.
Accounting software
Keep your UX and your reports — put every journal on a ledger that can prove itself to your customers' auditors.
Fintech backends
Wallets, PSPs, lenders: regulator-grade record integrity without building a cryptographic ledger in-house.
Audit & assurance
Continuous verification instead of sampling: re-derive every hash, prove every period seal, check the WORM anchor.
AI agents & automation
Agents that move money need books that cannot be quietly rewritten. Idempotent posting and verifiable history by default.
FAQ
Questions we get asked.
›Is LedgerHash an accounting app?
No. LedgerHash is ledger infrastructure — a double-entry engine with cryptographic integrity, behind a REST API. You build the product on top; we do not ship a user-facing ledger UI.
›Can my customers verify the books without trusting you?
Yes. Read-only verification oracles re-derive every entry hash, prove the posting sequence is gapless, and check sealed periods against Merkle roots anchored to S3 Object Lock (write-once storage). All of it can also be recomputed fully offline from exported records.
›What happens when someone posts a mistake?
Corrections are append-only reversals — never edits, voids, or deletes. The original entry, the reversal, and the link between them all stay on the chain forever.
›How many ledgers do I get?
One company = one account = exactly one ledger. That single sequence of record is the point: one chain, one history, no side books.
›Multi-currency?
Yes — entries carry per-line directed FX quotes with the rate date sealed into the fingerprint, dual-currency balances, realized and unrealized FX handling, and crypto-scale precision (0 to 30 decimal places).
›Is there a sandbox?
Not publicly yet. Waitlist members get sandbox access, integration support, and pricing before the public launch.
Early access
Join the waitlist.
Sandbox access, integration support, and pricing before the public launch. We only email you about LedgerHash.