UNPKG

@iota-big3/sdk-blockchain

Version:

Comprehensive blockchain integration platform with multi-chain support, smart contracts, DeFi protocols, NFT infrastructure, Bitcoin support, and seamless SDK ecosystem integration for IOTA Big3

153 lines 4.26 kB
/** * Bitcoin RPC Client * Handles communication with Bitcoin Core nodes */ export interface BitcoinRPCConfig { url: string; username: string; password: string; timeout?: number; } export interface BitcoinBlock { hash: string; confirmations: number; size: number; weight: number; height: number; version: number; merkleroot: string; tx: string[]; time: number; nonce: number; bits: string; difficulty: number; chainwork: string; previousblockhash?: string; nextblockhash?: string; } export declare class BitcoinRPCClient { private client; private id; constructor(config: BitcoinRPCConfig); private call; getBlockchainInfo(): Promise<{ chain: string; blocks: number; headers: number; bestblockhash: string; difficulty: number; mediantime: number; }>; getBlockCount(): Promise<number>; getBlock(blockhash: string, verbosity?: number): Promise<BitcoinBlock>; getBlockHash(height: number): Promise<string>; validateAddress(address: string): Promise<{ isvalid: boolean; address?: string; scriptPubKey?: string; isscript?: boolean; iswitness?: boolean; }>; getNewAddress(label?: string, addressType?: string): Promise<string>; listUnspent(minconf?: number, maxconf?: number, addresses?: string[]): Promise<Array<{ txid: string; vout: number; address: string; label?: string; scriptPubKey: string; amount: number; confirmations: number; spendable: boolean; solvable: boolean; safe: boolean; }>>; createRawTransaction(inputs: Array<{ txid: string; vout: number; }>, outputs: Record<string, number>): Promise<string>; signRawTransactionWithWallet(hexstring: string): Promise<{ hex: string; complete: boolean; errors?: Array<{ txid: string; vout: number; scriptSig: string; sequence: number; error: string; }>; }>; sendRawTransaction(hexstring: string): Promise<string>; getTransaction(txid: string, includeWatchonly?: boolean): Promise<{ amount: number; confirmations: number; blockhash?: string; blockheight?: number; blockindex?: number; blocktime?: number; txid: string; time: number; timereceived: number; hex: string; }>; estimateSmartFee(confTarget: number, estimateMode?: string): Promise<{ feerate?: number; errors?: string[]; blocks: number; }>; getBalance(minconf?: number): Promise<number>; listTransactions(label?: string, count?: number, skip?: number): Promise<Array<{ address: string; category: string; amount: number; label?: string; vout: number; confirmations: number; blockhash?: string; blockheight?: number; blockindex?: number; blocktime?: number; txid: string; time: number; timereceived: number; }>>; getNetworkInfo(): Promise<{ version: number; subversion: string; protocolversion: number; localservices: string; localrelay: boolean; timeoffset: number; networkactive: boolean; connections: number; networks: Array<{ name: string; limited: boolean; reachable: boolean; proxy: string; }>; }>; getPeerInfo(): Promise<Array<{ id: number; addr: string; addrbind: string; addrlocal: string; services: string; relaytxes: boolean; lastsend: number; lastrecv: number; bytessent: number; bytesrecv: number; conntime: number; timeoffset: number; pingtime: number; minping: number; version: number; subver: string; inbound: boolean; addnode: boolean; startingheight: number; }>>; ping(): Promise<void>; uptime(): Promise<number>; } //# sourceMappingURL=bitcoin-rpc-client.d.ts.map