Interface NamedSigner<Asym>

Named private key or secret key signer.

interface NamedSigner<Asym> {
    [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
        : never;
    withKeyLocator: ((keyLocator: KeyLocator.CtorArg) => Signer);
}

Type Parameters

  • Asym extends boolean = any

Hierarchy (view full)

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
    : never
withKeyLocator: ((keyLocator: KeyLocator.CtorArg) => Signer)

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