UNPKG

@btc-vision/transaction

Version:

OPNet transaction library allows you to create and sign transactions for the OPNet network.

32 lines (31 loc) 2.25 kB
import { BIP32API, BIP32Interface } from 'bip32'; import { Network, Signer } from '@btc-vision/bitcoin'; import { ECPairAPI, ECPairInterface } from 'ecpair'; import { IWallet } from './interfaces/IWallet.js'; export declare class EcKeyPair { static BIP32: BIP32API; static ECPair: ECPairAPI; static fromWIF(wif: string, network?: Network): ECPairInterface; static fromPrivateKey(privateKey: Buffer | Uint8Array, network?: Network): ECPairInterface; static fromPublicKey(publicKey: Buffer | Uint8Array, network?: Network): ECPairInterface; static generateMultiSigAddress(pubKeys: Buffer[], minimumSignatureRequired: number, network?: Network): string; static verifyPubKeys(pubKeys: Buffer[], network?: Network): Buffer[]; static getP2WPKHAddress(keyPair: ECPairInterface, network?: Network): string; static tweakedPubKeyToAddress(tweakedPubKeyHex: string, network: Network): string; static tweakedPubKeyBufferToAddress(tweakedPubKeyBuffer: Buffer | Uint8Array, network: Network): string; static p2op(bytes: Buffer | Uint8Array, network?: Network, deploymentVersion?: number): string; static xOnlyTweakedPubKeyToAddress(tweakedPubKeyHex: string, network: Network): string; static tweakPublicKey(pub: Uint8Array | Buffer | string): Buffer; static tweakBatchSharedT(pubkeys: readonly Uint8Array[], tweakScalar: bigint): Uint8Array[]; static generateWallet(network?: Network): IWallet; static verifyContractAddress(contractAddress: string, network?: Network): boolean; static getLegacySegwitAddress(keyPair: ECPairInterface, network?: Network): string; static getLegacyAddress(keyPair: ECPairInterface, network?: Network): string; static getP2PKH(publicKey: Buffer | Uint8Array, network?: Network): string; static getP2PKAddress(keyPair: ECPairInterface, network?: Network): string; static generateRandomKeyPair(network?: Network): ECPairInterface; static fromSeed(seed: Buffer, network?: Network): BIP32Interface; static getTaprootAddress(keyPair: ECPairInterface | Signer, network?: Network): string; static getTaprootAddressFromAddress(inAddr: string, network?: Network): string; static fromSeedKeyPair(seed: Buffer, network?: Network): ECPairInterface; }