arkova-action-log-verifier
v0.1.0
Published
Open, offline verifier for Arkova daily activity receipts. Reads one receipt bundle and reports what was measured, what was asserted and what is not asserted. No network access, no Arkova server dependency.
Maintainers
Readme
arkova-action-log-verifier
Check an Arkova daily activity receipt on your own computer, without asking Arkova anything.
Arkova keeps a tamper-evident log of what software agents and integrations did through it. Once a day it seals the log for the previous day and records the seal as a daily receipt. This command takes one receipt bundle (a JSON file your counterparty or your own account exported) and recomputes every fingerprint in it. It makes no network calls and talks to no Arkova service, so the answer does not depend on trusting Arkova's servers.
npx --package arkova-action-log-verifier arkova-action-log-verify bundle.jsonThe package is arkova-action-log-verifier and the command it installs is arkova-action-log-verify. Name the package with
--package: npx arkova-action-log-verify alone would look for a package of that other name.
Node 20 or later. No runtime dependencies.
What a passing result proves
If the command prints VERIFIED and exits 0 (no check failed, and the bundle
shows the daily receipt as recorded with a Network Observed Time):
- Every listed action of every subject in the bundle (an agent, an API key, an integration or a user) links to the one before it, in order, with no action missing, added or changed since its fingerprint was computed.
- Each subject's day is part of one summary fingerprint for the whole organization-day, and that summary fingerprint is the one the daily receipt carries.
- If the bundle includes the proof packet for the receipt, the summary fingerprint is inside the batch that packet commits to.
Put plainly: the record you were given is exactly the record that was sealed. Change one character of one action, drop one, add one, or reorder two, and the check fails.
What it does not prove
This command does not prove the content of the actions. Arkova never holds the content: a submitter sends only a fingerprint of its own payload, and keeps the payload itself. Passing means the record has not changed since it was sealed, not that what it describes is true.
It also does not prove, and the output says so every time:
- that an action happened, was authorized or had legal effect;
- completeness: a submitter can leave actions out, and only actions Arkova observed itself can be treated as complete;
- when a single action was recorded: only the UTC day is sealed, and the time an action occurred is whatever the submitter stated;
- anything about days or subjects the bundle does not cover;
- any endorsement by a third party.
What it checks offline, and what it leaves to a second step
The command checks the bundle against itself. The Network Observed Time in the
bundle is read from the bundle; this command cannot confirm it. The step that
ties a seal to the production network, and fixes when it was observed, is the
network record behind the receipt. To check that independently, take the proof
packet from the bundle (anchor.proof_packet) and run arkova-verify on it
against a node you choose. That is a separate tool because it needs a network;
this one never will.
The Network Observed Time is shown as STATED, never PASS: it is read from the
bundle, and even when the proof packet carries the same time the two are both
values the bundle states. Only the network record confirms it. The daily
receipt's status counts as the finality signal: if the bundle does not show the
receipt as SECURED with a time, the checks that can run still run, the time
check is reported as not run, and the command exits 3 (verified, but not yet
final). The day's seal status in the bundle is informational and takes no part
in that decision. When the proof packet carries its own time, the two times are
compared to the second, and a difference fails.
A day that is sealed but not yet submitted to the production network has no
daily receipt, and the bundle states anchor: null (or leaves it out). Every
other check still runs; the receipt comparison, the time and the link to the
network record are reported as not run (not_submitted), the daily receipt
line of the report says "not yet submitted", and the command exits 3. A bundle
the exporter marked as too large to export in full (it has no subjects and
carries bundle_omitted) is refused with a specific message and exits 1.
Without a proof packet the command still runs and reports the link to the
network record under "Not checked by this command". Add
--require-proof-packet to fail instead.
Options
| Option | Meaning |
| --- | --- |
| --json | Print the result as one JSON document (checks, measured, asserted, not asserted, not checked). |
| --previous <file> | An optional deeper check: also give the previous day's own bundle. Each subject whose immediately preceding active day it is must continue exactly from where that day ended. For a subject that was also active on a day in between, the bundle is not its preceding day, and continuity is reported as not checked. The previous bundle must be the same organization's and must verify on its own; if its daily receipt is not final, continuity may still pass but is reported as not final. Give the option once. |
| --require-proof-packet | Fail if the bundle has no proof packet. |
| --require-full-day | Fail if the bundle does not list every subject of the day, so the day's summary fingerprint cannot be rebuilt from scratch. |
| -- | End of options: what follows is a file name, even if it starts with a dash. |
| --help, --version | |
Exit status: 0 verified and final; 1 the bundle did not verify; 2 the
command could not run (file missing, not JSON, bad options); 3 verified but not
yet final (no check failed, but the bundle does not show the daily receipt as
recorded yet). A script should treat anything other than 0 as "do not rely on
this bundle as sealed".
Coverage, and the previous day
The result says how much of the day it covered (coverage in the JSON). It is
day_complete only when the bundle lists every subject of the day and the day's
summary fingerprint rebuilt from that list. Otherwise it is subject_branch_only:
each listed subject was checked by its branch to the day's summary fingerprint, and
the rest of the day was not rebuilt. When the bundle states neither the list nor how
many subjects the day has, that is reported as a check that did not run.
A subject that continues an earlier day may carry a previous_day entry: that
day's entry for the subject, with its branch to that day's summary fingerprint.
From the bundle alone, the command then checks that the entry recomputes, sits in the
stated summary fingerprint of that day, is from an earlier day, and ends where this
day starts. It does not check that the earlier day's receipt is recorded on the
production network (the entry names the receipt for that separate step); --previous
with that day's own bundle is the deeper check.
The bundle
A bundle covers one organization and one UTC day. It holds public identifiers only: the organization's public id, the daily receipt's public id, fingerprints and the actions' fingerprinted fields. It never holds an internal account number, a user id, a key id or any document content.
The format is defined by
schema/receipt-bundle.v1.json (JSON Schema,
draft 2020-12). Unknown extra fields are ignored and are never covered by a
fingerprint. A bundle with a different schema marker is refused rather than
guessed at.
Using it as a library
import { verifyReceiptBundle } from 'arkova-action-log-verifier';
const verdict = verifyReceiptBundle(JSON.parse(text));
if (!verdict.ok) throw new Error('do not rely on this bundle');
// verdict.measured, verdict.asserted, verdict.not_asserted, verdict.not_checkedverdict.ok means no check failed; verdict.final says whether the bundle shows the
daily receipt as recorded with a Network Observed Time, and a caller that needs a
sealed day checks both. verdict.not_checked and verdict.not_checked_codes list what
was not checked, one fixed text per reason.
The smaller pieces are exported too: verifyChain, verifyDayLeaf,
verifyDayRoot, checkBundleShape. None of them throws on bad input; each
returns a failed verdict instead.
Reporting a problem
If a bundle that should verify does not, or one that should fail passes, that is
a defect in this tool or in the export. Send the bundle (it holds no document
content) to Arkova support with the command's --json output.
