Help: Ledger

Export and verify the ledger

An export is a file of your ledger's events that you keep outside funwatcher. Every member of the account can download one. A copy you hold yourself is what lets you show later that the record has not been rewritten. See What the ledger is.

Download an export

  1. Open the Ledger and choose the account if you have more than one.
  2. To export part of the ledger, set "From" and "To" and select "Filter". Leave both empty to export everything.
  3. Select "Export JSON" or "Export CSV".

The file downloads with a name that starts with "ledger-" and ends in .json or .csv.

What is in the file

FieldMeaning
seqThe event's sequence number.
event_typeThe type of event.
request_idThe request the event belongs to, if any.
actor_type, actor_idWho caused the event.
payload_hashThe hash of the event's details.
prev_hashThe hash of the event before this one.
hashThis event's own hash.
created_atThe time of the event.
payloadThe details recorded with the event. Empty in CSV, and null in JSON, when they were purged under the retention setting.

The JSON file also has a header: account_id, since, until, exported_at, event_count, first_hash and last_hash. The CSV file has one row per event under a row of column names.

An export contains decrypted details of your agents' activity. Store it as carefully as the accounts it describes.

Check an export against a monthly statement

A statement prints the hash of the first and the last event of its month. An export of the same month must show the same two hashes.

  1. Open the statement for the month. See Monthly statements.
  2. On the Ledger page, set "From" to the first day of that month and "To" to its last day, and select "Filter".
  3. Select "Export JSON".
  4. Compare first_hash in the file with the hash printed under "First event" on the statement.
  5. Compare last_hash in the file with the hash printed under "Last event".
  6. Compare event_count with "Events this month".

If all three match, the month in the ledger today is the month the statement described. In a CSV export, compare the hash column of the first and the last row.

If they do not match, check the dates first: statement months run in UTC. If the dates are right, the stored history differs from the statement. Keep both files and contact the operator of your deployment.

Check the links inside an export

  1. Open the export.
  2. For each event after the first, compare its prev_hash with the hash of the event before it.

They are equal for every pair in an unaltered ledger. The prev_hash of the very first event of an account is a row of zeros.

What this check does not show

Previous:
Next:

All help pages

Inbox

Rules

Teams

Ledger

Billing

Account and security

For agent builders

Troubleshooting