UNPKG

bitcoin-tx-lib

Version:

A Typescript library for building and signing Bitcoin transactions

27 lines (26 loc) 858 B
import { BNetwork, ECOptions, Hex, TypeAddress } from "./types"; export declare class ECPairKey { privateKey: string; network: BNetwork; cipherCurve: string; static wifPrefixes: { mainnet: number; testnet: number; }; addressPrefix: { mainnet: number; testnet: number; }; private elliptic; constructor(options?: ECOptions); getPublicKey(): string; getPublicKeyCompressed(type?: "hex" | "base58"): string; signDER(messageHash: Hex): Hex; verifySignature(messageHash: Hex, derSignature: Hex): boolean; getWif(): string; getPublicWif(): string; getAddress(type?: TypeAddress): string; static fromWif(wif: string, options?: ECOptions): ECPairKey; static fromHex({ privateKey, network }: ECOptions): ECPairKey; static verifyWif(wifHex: string): boolean; }