DocsAudit payments

DocsGuides20 of 33 · 3 min read

Audit payments

Load the audit key, read who each payment went to, filter by recipient and export the result.

This guide is for the auditor, the holder of the audit key. The key opens the identity of each payment's recipient. Amounts stay encrypted, and the key authorizes no transfer.

You need the audit secret that matches the auditor's public key in the program's configuration. A payment opens with the audit key that was in the configuration when it was made.

App

Open /audit. The page says Locked.

  1. Load the key

    Paste the audit key as hex and press Open the console. The app checks it against the configuration on your device. A wrong key is refused, and the key is never sent anywhere.

  2. Read the list

    Under Who was paid, each payment has its time, its transaction, the recipient's handle and wallet, the stealth address, and Encrypted in the amount column.

  3. Filter

    Type a handle in Filter to keep one recipient's payments.

  4. Export

    Export CSV saves the rows on screen.

Lock drops the key. So does closing the tab.

SDK

ts
await liora.unlockAudit(auditSecret);        // a bigint
const rows = await liora.audit();            // every payment with a registered recipient
const mira = await liora.audit("mira");      // one recipient's
const csv = await liora.auditCsv("mira");
liora.lockAudit();
json
[
  { "signature": "YQ6s1fVTEXF9uivz2j5NPQbFrMaoA97fkBM6kH5vR2WJUBSiwDVXHQYY3vy7rffeswUyjWTrdcaSm9dMvD198FC", "handle": "mira", "amount": "encrypted" },
  { "signature": "3Bk4LAuEJc9LfagU6SXnYyU7wmi1HHgY79v5GojytBY8Jf1ENyaAMTGWUiChaRU7EPAYp6JHqyHT86qBtYTJYkeT", "handle": "mira", "amount": "encrypted" }
]

Each row holds the full announcement under payment and the full directory entry under recipient. The example shows three fields.

The first two lines of the CSV:

"signature","eventIndex","blockTime","handle","wallet","metaAddress","amount"
"YQ6s1fVTEXF9uivz2j5NPQbFrMaoA97fkBM6kH5vR2WJUBSiwDVXHQYY3vy7rffeswUyjWTrdcaSm9dMvD198FC","0","2026-11-25T14:32:54.812Z","mira","42iGKxoSijMn7Gk6SXgNYZnofBoCWpyzhF6fvzfhnzz9","liora:1:6f931f960613cf58ed58fc0629d2822c689d6d98c33888f3d7bbf0a5520d449ac361b82cc1de8722106fe9e20514ef19267472deb71f110e75e491123ec24c03","encrypted"

CLI

bash
liora audit --auditor-key auditor.json
liora audit mira --auditor-key auditor.json --csv > mira.csv

auditor.json holds the audit secret as a decimal number in JSON quotes. The CLI prints every payment with the decrypted spend key and the registration that goes with it.

#What decryption gives you

For each payment the key turns the audit ciphertext into the recipient's public spend key. The directory maps that key to one registration: a handle, the wallet that asked, the meta-address and the status. The audit has the arithmetic.

A recipient who was removed from the whitelist afterwards is still named, with the status removed.

auditIdentities() in the SDK, and the CLI's audit, return every payment including any whose spend key has no registration on file. Those rows carry the spend key and no handle.

#One payment

On a payment's ledger page the auditor sees the recipient beside the public fields once the key is loaded. With the SDK:

ts
const opened = await liora.openPayment(signature, "auditor", eventIndex);

#What you can rely on

Every payment on the ledger passed a proof that its ciphertext encrypts the recipient it went to. A sender cannot pay one recipient and name another, and cannot leave the ciphertext empty.

#If it fails

What you seeWhyNext
INVALID_AUDIT_KEYThe secret does not match the auditor's public key in the configurationLoad the key of this deployment
DEVICE_LOCKED at stage auditAn audit call was made before the key was loadedLoad the key first
NOTE_INVALIDA decrypted spend key has no registration in the directoryUse auditIdentities(), which returns the key itself