Basic bitcoind/romanz-electrum support to sync the mempool and blocks.

This commit is contained in:
softsimon
2020-12-20 22:36:36 +07:00
parent 5a4a976d55
commit 5dbf6789a7
12 changed files with 393 additions and 38 deletions

View File

@@ -0,0 +1,16 @@
import { MempoolInfo, Transaction, Block, MempoolEntries, MempoolEntry } from '../../interfaces';
export interface AbstractBitcoinApi {
getMempoolInfo(): Promise<MempoolInfo>;
getRawMempool(): Promise<Transaction['txid'][]>;
getRawTransaction(txId: string): Promise<Transaction>;
getBlockHeightTip(): Promise<number>;
getTxIdsForBlock(hash: string): Promise<string[]>;
getBlockHash(height: number): Promise<string>;
getBlock(hash: string): Promise<Block>;
getMempoolEntry(txid: string): Promise<MempoolEntry>;
// Custom
getRawMempoolVerbose(): Promise<MempoolEntries>;
getRawTransactionBitcond(txId: string): Promise<Transaction>;
}