2020-12-27 22:47:22 +01:00
|
|
|
import { IEsploraApi } from './api/bitcoin/esplora-api.interface';
|
|
|
|
|
2022-01-06 11:59:33 +01:00
|
|
|
export interface PoolTag {
|
|
|
|
id: number | null, // mysql row id
|
2022-01-05 07:41:14 +01:00
|
|
|
name: string,
|
|
|
|
link: string,
|
2022-01-06 11:59:33 +01:00
|
|
|
regexes: string, // JSON array
|
|
|
|
addresses: string, // JSON array
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PoolInfo {
|
|
|
|
poolId: number, // mysql row id
|
|
|
|
name: string,
|
|
|
|
link: string,
|
|
|
|
blockCount: number,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PoolStats extends PoolInfo {
|
|
|
|
rank: number,
|
|
|
|
emptyBlocks: number,
|
2022-01-05 07:41:14 +01:00
|
|
|
}
|
|
|
|
|
2020-12-27 22:47:22 +01:00
|
|
|
export interface MempoolBlock {
|
|
|
|
blockSize: number;
|
|
|
|
blockVSize: number;
|
|
|
|
nTx: number;
|
|
|
|
medianFee: number;
|
|
|
|
totalFees: number;
|
|
|
|
feeRange: number[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface MempoolBlockWithTransactions extends MempoolBlock {
|
|
|
|
transactionIds: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface VinStrippedToScriptsig {
|
|
|
|
scriptsig: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface VoutStrippedToScriptPubkey {
|
|
|
|
scriptpubkey_address: string | undefined;
|
|
|
|
value: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TransactionExtended extends IEsploraApi.Transaction {
|
|
|
|
vsize: number;
|
|
|
|
feePerVsize: number;
|
|
|
|
firstSeen?: number;
|
2021-03-18 17:47:40 +01:00
|
|
|
effectiveFeePerVsize: number;
|
|
|
|
ancestors?: Ancestor[];
|
|
|
|
bestDescendant?: BestDescendant | null;
|
|
|
|
cpfpChecked?: boolean;
|
2021-03-21 00:06:03 +01:00
|
|
|
deleteAfter?: number;
|
2021-03-18 17:47:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface Ancestor {
|
|
|
|
txid: string;
|
|
|
|
weight: number;
|
|
|
|
fee: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface BestDescendant {
|
|
|
|
txid: string;
|
|
|
|
weight: number;
|
|
|
|
fee: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface CpfpInfo {
|
|
|
|
ancestors: Ancestor[];
|
|
|
|
bestDescendant: BestDescendant | null;
|
2020-12-27 22:47:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface TransactionStripped {
|
|
|
|
txid: string;
|
|
|
|
fee: number;
|
2021-01-24 19:09:42 +01:00
|
|
|
vsize: number;
|
2020-12-27 22:47:22 +01:00
|
|
|
value: number;
|
|
|
|
}
|
|
|
|
export interface BlockExtended extends IEsploraApi.Block {
|
|
|
|
medianFee?: number;
|
|
|
|
feeRange?: number[];
|
|
|
|
reward?: number;
|
|
|
|
coinbaseTx?: TransactionMinerInfo;
|
|
|
|
matchRate?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TransactionMinerInfo {
|
|
|
|
vin: VinStrippedToScriptsig[];
|
|
|
|
vout: VoutStrippedToScriptPubkey[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface MempoolStats {
|
|
|
|
funded_txo_count: number;
|
|
|
|
funded_txo_sum: number;
|
|
|
|
spent_txo_count: number;
|
|
|
|
spent_txo_sum: number;
|
|
|
|
tx_count: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Statistic {
|
|
|
|
id?: number;
|
|
|
|
added: string;
|
|
|
|
unconfirmed_transactions: number;
|
|
|
|
tx_per_second: number;
|
|
|
|
vbytes_per_second: number;
|
|
|
|
total_fee: number;
|
|
|
|
mempool_byte_weight: number;
|
|
|
|
fee_data: string;
|
|
|
|
|
|
|
|
vsize_1: number;
|
|
|
|
vsize_2: number;
|
|
|
|
vsize_3: number;
|
|
|
|
vsize_4: number;
|
|
|
|
vsize_5: number;
|
|
|
|
vsize_6: number;
|
|
|
|
vsize_8: number;
|
|
|
|
vsize_10: number;
|
|
|
|
vsize_12: number;
|
|
|
|
vsize_15: number;
|
|
|
|
vsize_20: number;
|
|
|
|
vsize_30: number;
|
|
|
|
vsize_40: number;
|
|
|
|
vsize_50: number;
|
|
|
|
vsize_60: number;
|
|
|
|
vsize_70: number;
|
|
|
|
vsize_80: number;
|
|
|
|
vsize_90: number;
|
|
|
|
vsize_100: number;
|
|
|
|
vsize_125: number;
|
|
|
|
vsize_150: number;
|
|
|
|
vsize_175: number;
|
|
|
|
vsize_200: number;
|
|
|
|
vsize_250: number;
|
|
|
|
vsize_300: number;
|
|
|
|
vsize_350: number;
|
|
|
|
vsize_400: number;
|
|
|
|
vsize_500: number;
|
|
|
|
vsize_600: number;
|
|
|
|
vsize_700: number;
|
|
|
|
vsize_800: number;
|
|
|
|
vsize_900: number;
|
|
|
|
vsize_1000: number;
|
|
|
|
vsize_1200: number;
|
|
|
|
vsize_1400: number;
|
|
|
|
vsize_1600: number;
|
|
|
|
vsize_1800: number;
|
|
|
|
vsize_2000: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OptimizedStatistic {
|
|
|
|
added: string;
|
|
|
|
vbytes_per_second: number;
|
|
|
|
total_fee: number;
|
|
|
|
mempool_byte_weight: number;
|
|
|
|
vsizes: number[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface WebsocketResponse {
|
|
|
|
action: string;
|
|
|
|
data: string[];
|
|
|
|
'track-tx': string;
|
|
|
|
'track-address': string;
|
|
|
|
'watch-mempool': boolean;
|
2021-03-05 09:38:46 +01:00
|
|
|
'track-bisq-market': string;
|
2020-12-27 22:47:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VbytesPerSecond {
|
|
|
|
unixTime: number;
|
|
|
|
vSize: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface RequiredSpec { [name: string]: RequiredParams; }
|
|
|
|
|
|
|
|
interface RequiredParams {
|
|
|
|
required: boolean;
|
|
|
|
types: ('@string' | '@number' | '@boolean' | string)[];
|
|
|
|
}
|
|
|
|
|
2021-01-05 12:57:06 +01:00
|
|
|
export interface ILoadingIndicators { [name: string]: number; }
|
2021-01-06 17:31:33 +01:00
|
|
|
export interface IConversionRates { [currency: string]: number; }
|
2021-04-12 20:17:13 +02:00
|
|
|
|
|
|
|
export interface IBackendInfo {
|
|
|
|
hostname: string;
|
|
|
|
gitCommit: string;
|
|
|
|
version: string;
|
|
|
|
}
|