Class BIP137

Class that implement BIP137-related utility functions.

Constructors

Methods

  • Decode a BIP-137 signature. Function copied from bitcoinjs-message library.

    Parameters

    • signature: Buffer

      BIP-137 signature to be decoded

    Returns {
        compressed: boolean;
        recovery: number;
        signature: Buffer;
    }

    Decoded BIP-137 signature

    • compressed: boolean
    • recovery: number
    • signature: Buffer
  • Derive the public key that signed a valid BIP-137 signature.

    Parameters

    • message: string

      Message signed by the signature

    • signature: string

      Base-64 encoded signature to be decoded

    Returns Buffer

    Public key that signs the provided signature

  • Check if a given signature satisified the format of a BIP-137 signature.

    Parameters

    • signature: string

      Base64-encoded signature to be checked

    Returns boolean

    True if the provided signature correspond to a valid BIP-137 signature, false if otherwise