@bitcoinerlab/descriptors-core - v3.1.4
    Preparing search index...

    Interface ECPairInterfaceLike

    Structural signer interface accepted by this library for single-key signing.

    In practice, pass an object from ecpair (bitcoinjs stack).

    Example (bitcoinjs stack):

    import * as ecc from '@bitcoinerlab/secp256k1';
    import { ECPairFactory } from 'ecpair';

    const ECPair = ECPairFactory(ecc);
    const signer = ECPair.fromWIF('L1...');
    interface ECPairInterfaceLike {
        publicKey: Uint8Array;
        privateKey?: Uint8Array<ArrayBufferLike>;
        sign(hash: Uint8Array, lowR?: boolean): Uint8Array;
        verify(hash: Uint8Array, signature: Uint8Array): boolean;
        tweak(t: Uint8Array): ECPairInterfaceLike;
        signSchnorr?(hash: Uint8Array): Uint8Array;
        verifySchnorr?(hash: Uint8Array, signature: Uint8Array): boolean;
    }
    Index

    Properties

    publicKey: Uint8Array
    privateKey?: Uint8Array<ArrayBufferLike>

    Methods

    • Parameters

      • hash: Uint8Array
      • OptionallowR: boolean

      Returns Uint8Array

    • Parameters

      • hash: Uint8Array
      • signature: Uint8Array

      Returns boolean

    • Parameters

      • hash: Uint8Array

      Returns Uint8Array

    • Parameters

      • hash: Uint8Array
      • signature: Uint8Array

      Returns boolean