Interface NamedSigner<Asym>

Named private key or secret key signer.

interface NamedSigner<Asym extends boolean = any> {
    "[KeyKind]": If<Asym, "private", "secret", "private" | "secret">;
    name: Name;
    sign: (pkt: Signer.Signable) => Promise<void>;
    sigType: number;
    spki?: "public" extends If<Asym, "private", "secret", "private" | "secret">
        ? Uint8Array<ArrayBufferLike>
        : never;
    withKeyLocator: (keyLocator: KeyLocator.CtorArg) => Signer;
}

Type Parameters

  • Asym extends boolean = any

Hierarchy (View Summary)

Properties

"[KeyKind]": If<Asym, "private", "secret", "private" | "secret">
name: Name
sign: (pkt: Signer.Signable) => Promise<void>

Sign a packet.

sigType: number

SigInfo.sigType number for signatures created by this signer.

spki?: "public" extends If<Asym, "private", "secret", "private" | "secret">
    ? Uint8Array<ArrayBufferLike>
    : never
withKeyLocator: (keyLocator: KeyLocator.CtorArg) => Signer

Create a Signer that signs with this private key but a different KeyLocator.