Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/security / / signAuditCheckpoint

Function: signAuditCheckpoint()

ts
function signAuditCheckpoint(db, opts): Promise<SignedAuditCheckpoint>;

Defined in: packages/security/src/audit/merkle.ts:377

Compute and sign the current tree head.

Parameters

ParameterTypeDescription
dbAuditDb-
opts{ now?: () => number; privateKeyPem: string; writerId: string; }-
opts.now?() => numberOverride the wall clock - used by tests.
opts.privateKeyPemstring-
opts.writerIdstring-

Returns

Promise&lt;SignedAuditCheckpoint&gt;

Stable