Skip to content

Explainer 02

8 scenes, about 6 minutes

Receipts you can check

Every action in INDRA writes a receipt: who did what, when. Each receipt carries the fingerprint of the one before it and a signature only your business can make. Change one and the chain breaks at exactly that spot.

Hands on. Edit a real signed receipt, play the forger, delete one, and run the same check INDRA runs.

Read it in a look
Example

The last five receipts of a made-up studio

  • #1041Agent: Invoice drafter
    Invoice Sharma Traders for ₹70,800.00approval.propose 26 Oct, 10:28 am
  • #1042Person: Priya
    Issued INV/2026-27/0117 to Sharma Traderskubera.invoice.create 26 Oct, 10:42 am
  • #1043Person: Priya
    approval.approveapproval.approve 26 Oct, 10:42 am
  • #1044Person: Priya
    Recorded ₹70,800.00 on INV/2026-27/0117, fully paidkubera.payment.record 3 Nov, 3:10 pm
  • #1045INDRA: INDRA
    Posted the day’s note to #generalsandesh.message.post 4 Nov, 12:00 am

  1. 01 / 08

    Every action leaves a receipt

    In INDRA every change is an action: a draft proposed, an invoice issued, a payment recorded, a room marked clean. Each one writes a receipt that says who did it (a person, an agent or INDRA itself), what, and when.

    The receipt is written inside the same database transaction as the change. So there is a receipt if and only if the change really happened.

  2. 02 / 08

    Written as one exact line

    To fingerprint a receipt, INDRA first writes it as one line of JSON with every key in alphabetical order and nothing left undefined.

    It sounds fussy. It is the point: the same receipt must always produce exactly the same characters, or its fingerprint would change on its own.

  3. 03 / 08

    A fingerprint of that line

    That line goes through SHA-256, which turns any text into 64 hexadecimal digits. The same text always gives the same fingerprint. Change one character and the fingerprint changes completely.

    Type in the box, or change one digit, and watch.

  4. 04 / 08

    Each receipt holds the one before

    Every receipt carries one more field: prevHash, the fingerprint of the receipt before it. And that field is inside the line that gets fingerprinted.

    So each receipt is tied to everything that came before it. The order is not a matter of trust; it is written into the fingerprints.

  5. 05 / 08

    A seal only your business can make

    Then INDRA signs each fingerprint with your business’s Ed25519 private key. Anyone holding the public key can check the signature. Nobody can make one without the private key.

    The stage is checking all five signatures in your browser right now. Gold means exactly one thing in INDRA: the signature verified.

  6. 06 / 08

    Change one receipt

    Say someone edits receipt #1044 in the database after the fact: ₹70,800 becomes ₹7,080. Its contents no longer give the fingerprint that was signed.

    Run the check. It stops at exactly that receipt and says why.

  7. 07 / 08

    The forger rebuilds the chain

    A careful forger recomputes the fingerprint of #1044, then of every receipt after it, fixing each link. Now every fingerprint and every link checks out.

    But the signatures were made over the old fingerprints, and the forger can’t sign the new ones without your private key. The check fails at #1044 again, this time on the signature.

  8. 08 / 08

    Check it yourself

    Deleting a receipt fails too: the numbers run in sequence, so a gap shows. In the app, Receipts → Verify the chain runs this same check over every receipt your business has.

    You can also export a bundle for your CA or an auditor: the receipts, the public key and the rules for checking, so they can verify it offline without trusting INDRA. One honest limit: a receipt proves a record wasn’t changed after it was written, and who wrote it. Whether it was true is what the person’s approval is for.

In plain words

The short version.

  1. Every change in INDRA writes a receipt in the same transaction: who, what and when.

  2. Each receipt is written as one exact line and fingerprinted with SHA-256. Change a character and the fingerprint changes.

  3. Each receipt holds the fingerprint of the one before, so edits and gaps show at exactly the receipt where they happen.

  4. Each fingerprint is signed with your business’s private key. A forger can recompute fingerprints but can’t re-sign them.

  5. Anyone with the export and the public key can check it offline. It proves nothing was changed afterwards, not that it was true.

Checked against the code

Where this lives in INDRA.

Every rule on this page is taken from these files. When the code changes, this page is meant to change with it.

  • lib/audit/index.tsrecord() writes each receipt inside the same transaction as the change
  • lib/audit/chain.tscanonical JSON, SHA-256, Ed25519 signatures and checkChain()
  • lib/audit/verify-web.tsthe same check for a browser, used on this page

About the examples. The studio, Priya and the amounts are made up. The five receipts were really written and signed by INDRA’s receipt code with a throwaway key made for this page, and your browser checks them with the public key. Nothing you type is sent anywhere.