Skip to content

All docs

Consent records and the ledger

How each agreement becomes a signed receipt, how people withdraw, and how to check the ledger.

Not legal advice. ActionPotential keeps signed records of what each person agreed to and lets them withdraw at any time. These are the business's own records; ActionPotential is not a registered consent manager under DPDP.

What it does

Every lawful basis to contact a person becomes a signed consent receipt, and every "agreed" or "withdrew" becomes an event in a hash chain. The method of a receipt fixes its purpose and basis:

MethodWhere it comes fromPurpose and basis
Sign-up form (self_qr)The visitor ticks boxes on the booth formOne receipt per ticked purpose and channel; basis consent
Card given (card_given)Expo Mode, "They gave me their card for a follow-up"Follow-up only; basis voluntary provision
Told staff (staff_verbal)Expo Mode, "They agreed verbally to updates"Event updates only; basis consent; names the staff member and the time
Earlier conversation (import_existing_conversation)A WhatsApp chat or mailbox importFollow-up only, on that conversation's channel; basis voluntary provision

"Not asked" in Expo Mode records nothing. The purposes are follow-up, event updates, marketing by email, marketing on WhatsApp and admissions updates (offered on school or college events only). The channels are email and WhatsApp.

The consent check (Consent_Gate) decides, for every draft, whether that person may get that kind of message on that channel. It runs when a draft is made, approved, edited and handed over, and no setting turns it off. A withdrawal covers every channel and every earlier receipt for that purpose. If the check itself fails, the answer is a refusal ("consent could not be checked").

The person's receipt page (/c/r/<token>, the link on their receipt and at the foot of every draft) shows what they agreed to, when, where and how, how long their details are kept, and their rights. It has a "Withdraw" button per purpose and "Withdraw everything". A withdrawal blocks their drafts that are waiting or approved, with the date as the reason.

What is stored

  • Consent receipt. One per basis: purpose, channel, method (sign-up form, card given, told staff, earlier conversation), notice version and time. Personal values (name, phone, email, and organisation or subject where given) are stored only as salted hashes on the receipt, each with its own random salt. The receipt's payload digest is signed with the workspace's Ed25519 key.
  • Consent event. One per "agreed" or "withdrew". Events form a hash chain per workspace: each event's hash covers the previous event's hash, so changing or removing one event breaks every link after it. Events are appended one at a time per workspace, with no gaps in their numbers, and a sign-up with several ticks is written all at once or not at all. The receipt and event tables refuse updates and deletes.
  • Checks the stored ledger on every visit, against keys derived on the server, and names the first break if there is one.
  • Lists the newest 200 events with purpose, channel, time, the start of the receipt id and the start of the hash.
  • Download the ledger export: a JSON file (ledger-export-<date>.json, version: 1) with the workspace id, every event, every receipt's digest, key id and signature, and the public keys. It holds no names, phone numbers or email addresses.
  • Check the file: upload an export (up to 10 MB). The file is checked and not kept, and nothing is written.
    • A file for this workspace is checked against this workspace's own keys, so a file re-signed with another key fails.
    • A file for another workspace can only be checked against the keys inside it. A pass then shows the file is consistent, not who signed it.
  • Shows the workspace public signing key (SPKI PEM), its key id and a SHA-256 fingerprint.

The public signing key

Each workspace has its own key, derived with HKDF-SHA-256 from the server's consent master key and the workspace's signing_key_id (k1 for a signed-up workspace, demo-… for each demo copy). The key is therefore different for every workspace and is not printed here. Open /consent as the owner to read it, or take publicKeys from a ledger export. Compare the fingerprint on /consent (shown in groups of four characters) with the one you get from the export. This command takes the first key in the file, so it works for k1 and for a demo copy's demo-… key:

node -e 'const k=require("crypto").createPublicKey(JSON.parse(require("fs").readFileSync(process.argv[1],"utf8")).publicKeys[Object.keys(JSON.parse(require("fs").readFileSync(process.argv[1],"utf8")).publicKeys)[0]]);console.log(require("crypto").createHash("sha256").update(k.export({type:"spki",format:"der"})).digest("hex"))' ledger-export.json

What a check can find

A check recomputes every link in the chain and every signature. It finds an event that was changed, reordered or removed from the middle, a receipt that was changed, and a signature that does not match.

Limits

  • A check cannot yet tell whether the newest events were removed (open item OI-2). Signed ledger checkpoints of the chain head (AC-R12.8, Post-GP) will close that gap. Checkpoints are not in the export yet.
  • Receipt links do not expire yet.
  • Anyone who knows a person's phone or email and the booth address can sign them up again after a withdrawal; the new receipt is a new agreement. Verifying the contact first is an open owner decision.
  • Losing the server's consent master key makes the stored signatures impossible to check against this workspace's keys, and rotating it changes every booth address.
  • The demo's "Tamper with the ledger" button changes an exported copy only. The stored ledger cannot be changed from the App.

Troubleshooting

What you seeWhat it means
"This page is for the owner of the workspace. Ask the owner to open it."/consent is owner only.
"Break found at event N" with a reasonThe first event or receipt that does not check out. Every event after it is suspect.
"The file is consistent"The upload is from another workspace. It was checked only against the keys inside it.
"That file is larger than 10 MB, so it was not read."The check reads files up to 10 MB only.
"That file is not a ledger export…"Upload the JSON file from "Download the ledger export", unchanged.
A visitor's receipt says "You withdrew"Their drafts are blocked. A new sign-up at the booth records a new agreement.
The fingerprint does not matchThe export was signed with another key, or it is from another workspace.

Since CR-02

  • Passport wallet on /consent: counts by purpose and state and the 5 newest receipts. Withdraw and erase stay on each person's own receipt link.
  • Trust panel and "Verify an export". /consent shows the chain head and the latest checkpoints. /verify, for signed-in members, checks an export of this workspace against its own key and names the first line that was changed. Nothing is published: the key and the result are only shown inside your workspace.
  • Visitor and guardian loops end in a draft. A visitor's booth form puts one waiting draft per purpose they ticked on the desk. When a guardian agrees for a student under 18, an admissions update to the guardian waits on the desk; it is handed over to the guardian's own WhatsApp or mail, and the student's own contact is never kept. The guardian link page has a WhatsApp share button and a QR.
  • "Print this receipt" opens a receipt page for the browser's Save as PDF.