toip.tools

function · Browser and Node

verifyApproval

Checks an approval for action under chain (§9.2). Empty means valid. Whether it was already used is the caller's to know (SpendLedger.approvalUsed, or usedApprovals in decide).

@toip-tools/mandatesView source
TypeScriptImport
import { verifyApproval } from "@toip-tools/mandates";

Declaration

TypeScriptSignature
verifyApproval(a: Approval, o: {
    chain: Mandate[];
    action: Action;
    clock: Clock;
}): Promise<Reason[]>;

Parameters

arequired
Approval
orequired
{ chain: Mandate[]; action: Action; clock: Clock; }

Returns

Promise<Reason[]>