2020-12-22 06:04:31 +07:00
|
|
|
import { MempoolInfo, Transaction, Block, MempoolEntries, MempoolEntry, Address, AddressInformation,
|
|
|
|
ScriptHashBalance, ScriptHashHistory } from '../../interfaces';
|
2020-12-20 22:36:36 +07:00
|
|
|
|
|
|
|
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>;
|
2020-12-22 06:04:31 +07:00
|
|
|
$validateAddress(address: string): Promise<AddressInformation>;
|
|
|
|
$getScriptHashBalance(scriptHash: string): Promise<ScriptHashBalance>;
|
|
|
|
$getScriptHashHistory(scriptHash: string): Promise<ScriptHashHistory[]>;
|
2020-12-20 22:36:36 +07:00
|
|
|
|
|
|
|
// Custom
|
2020-12-21 23:08:34 +07:00
|
|
|
$getRawMempoolVerbose(): Promise<MempoolEntries>;
|
|
|
|
$getRawTransactionBitcond(txId: string): Promise<Transaction>;
|
2020-12-20 22:36:36 +07:00
|
|
|
}
|