import BigInteger from 'bigi'; import { Curve, Point } from 'ecurve'; import { ECSignatureType } from '../../types'; export declare const ecdsaSign: ({ curve, hash, d, nonce, }: { curve: Curve; hash: Buffer; d: BigInteger; nonce: number; }) => ECSignatureType; /** * Calculate pubkey extraction parameter. * * When extracting a pubkey from a signature, we have to * distinguish four different cases. Rather than putting this * burden on the verifier, Bitcoin includes a 2-bit value with the * signature. * * This function simply tries all four cases and returns the value * that resulted in a successful pubkey recovery. */ export declare const calcPubKeyRecoveryParam: ({ curve, e, signature, Q, }: { curve: Curve; e: BigInteger; signature: ECSignatureType; Q: Point; }) => number;