toip.tools

function · Browser and Node

verifyCredential

Checks a credential's proof and validity window. Revocation and application authorization are separate. validFrom may be up to one minute ahead of the clock; validUntil is exclusive.

@toip-tools/trust-coreView source
TypeScriptImport
import { verifyCredential } from "@toip-tools/trust-core";

Declaration

TypeScriptSignature
verifyCredential(vc: Credential, clock: Clock): Promise<CredentialCheck>;

Parameters

vcrequired
Credential

Credential to verify.

clockrequired
Clock

Supplies the current time for proof and credential checks.

Returns

Promise<CredentialCheck>

{ ok: true } on success, or a proof/validity failure code in failure.