Interface NamedVerifier<Asym>

Named public key or secret key verifier.

interface NamedVerifier<Asym> {
    [KeyKind]: If<Asym, "public", "secret", "public" | "secret">;
    name: Name;
    sigType: number;
    spki?: "public" extends If<Asym, "public", "secret", "public" | "secret">
        ? Uint8Array
        : never;
    verify: ((pkt: Verifier.Verifiable) => Promise<void>);
}

Type Parameters

  • Asym extends boolean = any

Hierarchy (view full)

Properties

[KeyKind]: If<Asym, "public", "secret", "public" | "secret">
name: Name
sigType: number

SigInfo.sigType number for signatures accepted by this verifier.

spki?: "public" extends If<Asym, "public", "secret", "public" | "secret">
    ? Uint8Array
    : never
verify: ((pkt: Verifier.Verifiable) => Promise<void>)

Verify a packet.

Type declaration

    • (pkt): Promise<void>
    • Parameters

      Returns Promise<void>

      Promise resolves upon good signature/policy or rejects upon bad signature/policy.