@btc-vision/ecpair - v4.0.2
    Preparing search index...

    Interface UniversalSigner

    Full-featured signer interface exposing every operation that ECPairSigner supports.

    interface UniversalSigner {
        capabilities: number;
        compressed: boolean;
        network: Network;
        privateKey?: PrivateKey;
        publicKey: PublicKey;
        xOnlyPublicKey: XOnlyPublicKey;
        hasCapability(cap: number): boolean;
        sign(hash: MessageHash, lowR?: boolean): Signature;
        signSchnorr?(hash: MessageHash): SchnorrSignature;
        toWIF(): string;
        tweak(t: Bytes32): UniversalSigner;
        verify(hash: MessageHash, signature: Signature): boolean;
        verifySchnorr(hash: MessageHash, signature: SchnorrSignature): boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    capabilities: number

    Bitmask of SignerCapability flags.

    compressed: boolean

    Whether the public key is in compressed SEC1 form.

    network: Network

    Network this signer is bound to.

    privateKey?: PrivateKey

    Raw private key bytes, or undefined for public-key-only signers.

    publicKey: PublicKey

    SEC1-encoded public key (33 or 65 bytes).

    xOnlyPublicKey: XOnlyPublicKey

    32-byte BIP-340 x-only public key.

    Methods

    • Tests whether the signer has a specific capability.

      Parameters

      Returns boolean

    • Exports the private key as a WIF string.

      Returns string

      If this is a public-key-only signer.