@pwngh/economy-lab
    Preparing search index...

    Interface Signer

    Signs bytes and checks signatures, used to vouch for ledger checkpoints.

    Signer for the contract, the reference adapter, and key rotation.

    interface Signer {
        kid?(): Promise<string>;
        sign(bytes: Uint8Array): Promise<Uint8Array<ArrayBufferLike>>;
        verify(bytes: Uint8Array, signature: Uint8Array): Promise<boolean>;
    }
    Index
    • Identifier of the key sign currently uses; the reference signer answers the first 16 hex characters of the Ed25519 public key. Stamped onto checkpoints so an auditor can tell which key sealed a row across rotations. Optional: a signer without it seals rows with a null kid.

      Returns Promise<string>

    • Signs bytes with the current key — the one Signer.kid names; the reference adapter signs Ed25519 over the raw bytes.

      Parameters

      • bytes: Uint8Array

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Accepts still-valid older keys, so a signature made before a key rotation keeps verifying.

      Parameters

      • bytes: Uint8Array
      • signature: Uint8Array

      Returns Promise<boolean>