Interface Signer

An object capable of producing Ed25519 signatures.

The normative v1.0 issuance contract (specs/v1.0.md §8): raw private keys never cross a trust boundary as function arguments — Attestation.issue accepts a Signer, not key bytes. Identity and Handle implement this interface; custom implementations (e.g. remote- or HSM-backed signing) are accepted structurally — no inheritance from a base class is required.

interface Signer {
    sign(data: Uint8Array): Promise<Uint8Array>;
}

Implemented by

Methods

Methods

  • Signs data with the signer's own private key.

    Parameters

    • data: Uint8Array

      The bytes to sign.

    Returns Promise<Uint8Array>

    A promise resolving to the 64-byte Ed25519 signature.