toip.tools

function · Browser and Node

verifyTrail

@toip-tools/eventlogView source
TypeScriptImport
import { verifyTrail } from "@toip-tools/eventlog";

Declaration

TypeScriptSignature
verifyTrail(input: {
    kel: KelResult;
    stream: string | SignedMessage[];
    bodies?: Body[];
}, opts?: TrailVerifyOptions): Promise<TrailResult>;

Parameters

inputrequired
{ kel: KelResult; stream: string | SignedMessage[]; bodies?: Body[]; }
Fields of input
kelrequired
KelResult
streamrequired
string | SignedMessage[]
bodiesoptional
Body[] | undefined
optsoptional
TrailVerifyOptions

Default: {}

Fields of opts
endorserKelsoptional
KelResult[] | undefined

KELs of AIDs that may endorse entries with -F groups.

verifySigoptional
((input: { key: Qb64; message: Uint8Array; sig: IndexedSig; }) => Promise<boolean | undefined> | boolean | undefined) | undefined

A pluggable verifier, tried first. Return undefined to fall back to the built-in checks.

webauthnoptional
false | WebAuthnPolicy | undefined

How to check WebAuthn-wrapped signatures. false rejects them.

allowUnwitnessedoptional
boolean | undefined

Don't require witness receipts (a controller checking its own log).

firstSeenoptional
LogStore | undefined

Compare with this store's first-seen copies.

clockoptional
Clock | undefined

Returns

Promise<TrailResult>