Gordian Envelope TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Interface Signer

    A trait for types capable of creating digital signatures.

    The Signer interface provides methods for signing messages with various cryptographic signature schemes. Implementations of this interface can sign messages using different algorithms according to the specific signer type.

    interface Signer {
        signWithOptions(
            message: Uint8Array,
            options?: SigningOptions,
        ): Signature;
        sign(message: Uint8Array): Signature;
    }

    Implemented by

    Index

    Methods

    • Signs a message with optional signing options.

      Different signature schemes may use the options differently:

      • Schnorr: Can accept a custom random number generator
      • SSH: Requires namespace and hash algorithm (not yet implemented)
      • Other schemes: Options are ignored

      Parameters

      • message: Uint8Array

        The message to sign

      • Optionaloptions: SigningOptions

        Optional signing options

      Returns Signature

      The digital signature

      If signing fails

    • Signs a message using default options.

      This is a convenience method that calls signWithOptions with no options.

      Parameters

      • message: Uint8Array

        The message to sign

      Returns Signature

      The digital signature

      If signing fails