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) => Promise<void>);
    spki?: "public" extends If<Asym, "private", "secret", "private" | "secret">
        ? Uint8Array
        : never;
    withKeyLocator: ((keyLocator) => Signer);
}

Type Parameters

  • Asym extends boolean = any

Hierarchy (view full)

Properties

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

SigInfo.sigType number for signatures created by this signer.

sign: ((pkt) => Promise<void>)

Sign a packet.

Type declaration

    • (pkt): Promise<void>
    • Sign a packet.

      Parameters

      Returns Promise<void>

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

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

Type declaration

    • (keyLocator): Signer
    • Create a Signer that signs with this private key but a different KeyLocator.

      Parameters

      Returns Signer

Generated using TypeDoc