import type { BlockResponse, ChainInfo, CreateRawTxInputs, CreateRawTxOutputs, DerivedAddresses, GetBlockParams, ListTransactionsParams, ListTransactionsResult, RawTransactionV2, SignedRawTx, UnspentTxInfo } from '../../types.js'; /** * General interface for a Bitcoin Core RPC client. */ export interface BitcoinRpcClient { /** Gets detailed information about a specific block. */ getBlock({ blockhash, height, verbosity }: GetBlockParams): Promise; /** Returns the number of blocks in the longest blockchain. */ getBlockCount(): Promise; /** Gets the hash of a block at a given height. */ getBlockHash(height: number): Promise; /** Retrieves general blockchain state info. */ getBlockchainInfo(): Promise; /** Signs a raw transaction with the wallet's private keys. */ signRawTransaction(hexstring: string): Promise; /** Sends a raw transaction hex to the Bitcoin network. */ sendRawTransaction(hexstring: string, maxfeerate?: number | string, maxBurnAmount?: number | string): Promise; /** Signs and sends a raw transaction in one step. */ signAndSendRawTransaction(hexstring: string): Promise /** Creates, signs, and sends a raw transaction in one step. */ createSignSendRawTransaction(inputs: CreateRawTxInputs[], outputs: CreateRawTxOutputs[]): Promise; /** Lists transactions in the wallet. */ listTransactions(params: ListTransactionsParams): Promise; /** Creates a raw transaction spending specified inputs to specified outputs. */ createRawTransaction(inputs: CreateRawTxInputs[], outputs: CreateRawTxOutputs[], locktime?: number, replacable?: boolean): Promise; /** Derives addresses from a descriptor. */ deriveAddresses(descriptor: string, range?: Array): Promise>; /** Mines a specified number of blocks to a given address. */ generateToAddress(nblocks: number, address: string): Promise; /** Gets the wallet's balance. */ getBalance(): Promise; /** Gets a new Bitcoin address for receiving payments. */ getNewAddress(addressType: string, label?: string): Promise; /** Lists unspent transaction outputs in the wallet. */ listUnspent(params: { minconf?: number; maxconf?: number; address?: string[]; include_unsafe?: boolean; }): Promise /** Creates a raw transaction spending specified inputs to specified outputs. */ createRawTransaction(inputs: CreateRawTxInputs[], outputs: CreateRawTxOutputs[], locktime?: number, replacable?: boolean): Promise; /** Returns the number of blocks in the longest blockchain. */ getBlockCount(): Promise; /** Gets the hash of a block at a given height. */ getBlockHash(height: number): Promise; /** Gets detailed information about a specific block. */ getBlock({ blockhash, height, verbosity }: GetBlockParams): Promise /** Retrieves general blockchain state info. */ getBlockchainInfo(): Promise; /** Gets a new Bitcoin address for receiving payments. */ getNewAddress(account?: string): Promise; /** Sends raw transaction hex to the Bitcoin network. */ sendRawTransaction( hexstring: string, maxfeerate?: number | string, maxBurnAmount?: number | string ): Promise; /** Sends bitcoins to a specified address. */ sendToAddress(address: string, amount: number): Promise; /** Verifies a signed message. */ verifyMessage(address: string, signature: string, message: string): Promise; /** Sign a message with the private key of an address. */ signMessage(address: string, message: string): Promise; /** Mines a specified number of blocks to a given address. */ generateToAddress(nblocks: number, address: string): Promise; }