mempool/backend/src/api/bitcoin/bitcoin-api-abstract-factory.ts

18 lines
726 B
TypeScript
Raw Normal View History

2020-12-21 23:08:34 +07:00
import { MempoolInfo, Transaction, Block, MempoolEntries, MempoolEntry, Address } from '../../interfaces';
export interface AbstractBitcoinApi {
2020-12-21 23:08:34 +07:00
$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>;
$getAddress(address: string): Promise<Address>;
// Custom
2020-12-21 23:08:34 +07:00
$getRawMempoolVerbose(): Promise<MempoolEntries>;
$getRawTransactionBitcond(txId: string): Promise<Transaction>;
}