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

    Interface TinySecp256k1Interface

    Subset of the tiny-secp256k1 API consumed by LegacyBackend.

    Pass an object satisfying this interface to createLegacyBackend to bridge an existing tiny-secp256k1 installation into the CryptoBackend contract.

    interface TinySecp256k1Interface {
        isPoint(p: Uint8Array): boolean;
        isPrivate(d: Uint8Array): boolean;
        isXOnlyPoint(p: Uint8Array): boolean;
        pointAddScalar(
            p: Uint8Array,
            tweak: Uint8Array,
            compressed?: boolean,
        ): Uint8Array<ArrayBufferLike> | null;
        pointCompress(p: Uint8Array, compressed?: boolean): Uint8Array;
        pointFromScalar(
            d: Uint8Array,
            compressed?: boolean,
        ): Uint8Array<ArrayBufferLike> | null;
        privateAdd(
            d: Uint8Array,
            tweak: Uint8Array,
        ): Uint8Array<ArrayBufferLike> | null;
        privateNegate(d: Uint8Array): Uint8Array;
        sign(
            h: Uint8Array,
            d: Uint8Array,
            e?: Uint8Array<ArrayBufferLike>,
        ): Uint8Array;
        signSchnorr?(
            h: Uint8Array,
            d: Uint8Array,
            e?: Uint8Array<ArrayBufferLike>,
        ): Uint8Array;
        verify(
            h: Uint8Array,
            Q: Uint8Array,
            signature: Uint8Array,
            strict?: boolean,
        ): boolean;
        verifySchnorr?(
            h: Uint8Array,
            Q: Uint8Array,
            signature: Uint8Array,
        ): boolean;
        xOnlyPointAddTweak(
            p: Uint8Array,
            tweak: Uint8Array,
        ): { parity: 0 | 1; xOnlyPubkey: Uint8Array } | null;
    }
    Index

    Methods

    • Parameters

      • p: Uint8Array
      • tweak: Uint8Array
      • Optionalcompressed: boolean

      Returns Uint8Array<ArrayBufferLike> | null

    • Parameters

      • d: Uint8Array
      • Optionalcompressed: boolean

      Returns Uint8Array<ArrayBufferLike> | null

    • Parameters

      • d: Uint8Array
      • tweak: Uint8Array

      Returns Uint8Array<ArrayBufferLike> | null

    • Parameters

      • h: Uint8Array
      • d: Uint8Array
      • Optionale: Uint8Array<ArrayBufferLike>

      Returns Uint8Array

    • Parameters

      • h: Uint8Array
      • d: Uint8Array
      • Optionale: Uint8Array<ArrayBufferLike>

      Returns Uint8Array

    • Parameters

      • h: Uint8Array
      • Q: Uint8Array
      • signature: Uint8Array
      • Optionalstrict: boolean

      Returns boolean

    • Parameters

      • h: Uint8Array
      • Q: Uint8Array
      • signature: Uint8Array

      Returns boolean

    • Parameters

      • p: Uint8Array
      • tweak: Uint8Array

      Returns { parity: 0 | 1; xOnlyPubkey: Uint8Array } | null