verifySignatureChecks
function verifySignatureChecks(checks, subtle?): Promise<SignatureAnswer[]>;Defined in: packages/sdk/src/signature-checks.ts:133
Verifies the signature values Document.signatureChecks lists with WebCrypto, in order:
each answer holds the check’s fingerprint and verified: true for a value that verified,
false for one that did not, null for one this runtime cannot check (a curve or algorithm
WebCrypto lacks, a key it refuses; Ed25519 is always left unchecked here). Hand the answers to
Document.validateSignatures, which refuses any list that is not exactly the one for its
checks; a null makes that signature unsupported, never valid. Nothing leaves the device. The
answers are your own word: a page that lies about them can make any signature valid.
Parameters
Section titled “Parameters”checks
Section titled “checks”readonly SignatureCheck[]
from Document.signatureChecks.
subtle?
Section titled “subtle?”SubtleCrypto = globalThis.crypto.subtle
the WebCrypto to use; omitted, globalThis.crypto.subtle.
Returns
Section titled “Returns”Promise<SignatureAnswer[]>
Example
Section titled “Example”const options = { now: Math.floor(Date.now() / 1000), anchors };const answers = await verifySignatureChecks(doc.signatureChecks(options));const reports = doc.validateSignatures(options, answers);0.7.0