Interface NamedSigner<Asym>

Named private key or secret key signer.

interface NamedSigner<Asym> {
    [KeyKind]: If<Asym, "private", "secret", "private" | "secret">;
    name: Name;
    sigType: number;
    sign: ((pkt: Signer.Signable) => Promise<void>);
    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)


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

SigInfo.sigType number for signatures created by this signer.

sign: ((pkt: Signer.Signable) => Promise<void>)

Sign a packet.

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.