Skip to content

basalt / audit/src / createAuditVerifyCommand

Function: createAuditVerifyCommand() ​

> createAuditVerifyCommand(getAudit): object

Defined in: audit/src/index.ts:1358

The audit:verify command, as a plain @basaltkit/cli command definition. auditPlugin({ integrity: 'hash-chain' }) registers it automatically; call this yourself to register it elsewhere (e.g. cliPlugin([createAuditVerifyCommand(...)])).

basalt audit:verify [--tenant=<id>] [--from=<seq>] [--to=<seq>] verifies one chain (the system chain without --tenant); --all verifies every chain. --expected-head=<seq>:<hash> checks one chain against an anchor recorded elsewhere (detects truncation); --legacy-until=<ms> sets the legacy cut-off for rows outside the chain (0 = none are legacy). Exits 1 when any chain is broken.

Parameters ​

getAudit ​

() => Audit

Returns ​

object

description ​

> description: string = 'Verify the audit trail hash chain (--tenant=&lt;id&gt; | --all, --from/--to=&lt;seq&gt;, --expected-head=&lt;seq&gt;:&lt;hash&gt;, --legacy-until=&lt;ms&gt;)'

name ​

> name: string = 'audit:verify'

handle() ​

> handle(__namedParameters): Promise&lt;number&gt;

Parameters ​

__namedParameters ​

AuditVerifyCommandContext

Returns ​

Promise&lt;number&gt;

Released under the MIT License.