UNPKG

@okxweb3/coin-bitcoin

Version:

@okxweb3/coin-bitcoin is a Bitcoin SDK for building Web3 wallets and applications. It supports BTC, BSV, DOGE, LTC, and TBTC, enabling private key management, transaction signing, address generation, and inscriptions like BRC-20, Runes, CAT, and Atomicals

28 lines (27 loc) 873 B
import { btc } from '../common'; import { CatAddressType } from '../common'; export declare class EcKeyService { private readonly privateKey; private readonly publicKey; private readonly addressType; constructor(opts: { privateKey?: string; publicKey?: string; addressType?: CatAddressType; }); hasPrivateKey(): boolean; getWif(): string; getPrivateKey(): btc.PrivateKey; getAddressType(): CatAddressType; getP2TRAddress(): btc.Address; getAddress(): btc.Address; getXOnlyPublicKey(): string; getTweakedPrivateKey(): btc.PrivateKey; getPublicKey(): btc.PublicKey; getTokenPublicKey(): btc.PublicKey; getPubKeyPrefix(): string; getTokenAddress(): string; getTaprootPrivateKey(): btc.PrivateKey; getTokenPrivateKey(): btc.PrivateKey; signTx(tx: btc.Transaction): void; }