import { Address, bitcoin as bT, Input, Output, Transaction } from '@atomicfinance/types'; import { BIP32Interface } from 'bip32'; import { BitcoinNetwork } from 'bitcoin-network'; import { ECPairInterface } from 'ecpair'; interface BitcoinSingleKeyWalletProviderOptions { network: BitcoinNetwork; privateKey: string; addressType?: bT.AddressType; } declare const BaseProvider: any; /** * A wallet provider for a single private key (no HD derivation). * Useful for simple use cases where you have one private key and don't need * hierarchical deterministic wallet features. */ export default class BitcoinSingleKeyWalletProvider extends BaseProvider { _keyPair: ECPairInterface; _address: Address; constructor(options: BitcoinSingleKeyWalletProviderOptions); private _parsePrivateKey; /** * Returns the ECPair for signing. Derivation path is ignored since we have a single key. */ keyPair(_derivationPath?: string): Promise; /** * Required by parent class but not really used for single-key wallet. * Returns a BIP32 node created from the private key. */ baseDerivationNode(): Promise; /** * Returns the single address. Parameters are ignored. */ getAddresses(_startingIndex?: number, // eslint-disable-line @typescript-eslint/no-unused-vars _numAddresses?: number, // eslint-disable-line @typescript-eslint/no-unused-vars _change?: boolean): Promise; /** * Returns the single address. */ getUnusedAddress(_change?: boolean): Promise
; /** * Checks if the requested address matches our single address. */ findAddress(addresses: string[], _change?: boolean | null): Promise
; /** * Returns the single address if it's used, empty array otherwise. */ getUsedAddresses(): Promise; /** * Returns the wallet address if it matches. */ getWalletAddress(address: string): Promise
; exportPrivateKey(): Promise; signMessage(message: string, from: string): Promise; _buildTransaction(targets: bT.OutputTarget[], feePerByte?: number, fixedInputs?: bT.Input[]): Promise<{ hex: string; fee: number; }>; _buildSweepTransaction(externalChangeAddress: string, feePerByte: number): Promise<{ hex: string; fee: number; }>; signPSBT(data: string, inputs: bT.PsbtInputTarget[]): Promise; signBatchP2SHTransaction(inputs: [ { inputTxHex: string; index: number; vout: any; outputScript: Buffer; txInputIndex?: number; } ], _addresses: string, tx: any, _lockTime?: number, segwit?: boolean): Promise; sendSweepTransactionWithSetOutputs(externalChangeAddress: string, feePerByte: number, _outputs: Output[], fixedInputs: Input[]): Promise>; buildSweepTransactionWithSetOutputs(externalChangeAddress: string, feePerByte: number, _outputs: Output[], fixedInputs: Input[]): Promise<{ hex: string; fee: number; }>; _buildSweepTransactionWithSetOutputs(externalChangeAddress: string, feePerByte: number, _outputs: Output[], fixedInputs: Input[]): Promise<{ hex: string; fee: number; }>; _getInputForAmountWithoutUtxoCheck(_outputs: Output[], _feePerByte: number, fixedInputs: Input[]): { inputs: bT.UTXO[]; outputs: { value: number; id?: string; }[]; fee: number; change: { value: number; id?: string; }; }; _buildTransactionWithoutUtxoCheck(outputs: Output[], feePerByte: number, fixedInputs: Input[]): Promise<{ hex: string; fee: number; }>; getScriptType(): string; getConnectedNetwork(): Promise; isWalletAvailable(): Promise; } export {};