mempool/frontend/src/app/interfaces/node-api.interface.ts

115 lines
2.7 KiB
TypeScript
Raw Normal View History

import { Block, Transaction } from "./electrs.interface";
2020-02-17 00:26:57 +07:00
export interface OptimizedMempoolStats {
added: number;
vbytes_per_second: number;
2020-02-17 00:26:57 +07:00
total_fee: number;
mempool_byte_weight: number;
vsizes: number[];
}
interface Ancestor {
txid: string;
weight: number;
fee: number;
}
interface BestDescendant {
txid: string;
weight: number;
fee: number;
}
export interface CpfpInfo {
ancestors: Ancestor[];
bestDescendant: BestDescendant | null;
}
export interface DifficultyAdjustment {
difficultyChange: number;
estimatedRetargetDate: number;
previousRetarget: number;
progressPercent: number;
remainingBlocks: number;
remainingTime: number;
}
export interface AddressInformation {
isvalid: boolean; // (boolean) If the address is valid or not. If not, this is the only property returned.
isvalid_parent?: boolean; // (boolean) Elements only
address: string; // (string) The bitcoin address validated
scriptPubKey: string; // (string) The hex-encoded scriptPubKey generated by the address
isscript: boolean; // (boolean) If the key is a script
iswitness: boolean; // (boolean) If the address is a witness
witness_version?: number; // (numeric, optional) The version number of the witness program
witness_program: string; // (string, optional) The hex value of the witness program
confidential_key?: string; // (string) Elements only
unconfidential?: string; // (string) Elements only
}
export interface LiquidPegs {
amount: string;
date: string;
}
2022-01-13 03:58:12 +04:00
export interface ITranslators { [language: string]: string; }
2022-02-09 19:41:05 +09:00
/**
* PoolRanking component
*/
export interface SinglePoolStats {
poolId: number;
2022-01-21 11:17:36 +09:00
name: string;
link: string;
blockCount: number;
emptyBlocks: number;
rank: number;
share: number;
2022-01-21 11:17:36 +09:00
lastEstimatedHashrate: string;
emptyBlockRatio: string;
logo: string;
}
export interface PoolsStats {
2022-01-21 11:17:36 +09:00
blockCount: number;
lastEstimatedHashrate: number;
oldestIndexedBlockTimestamp: number;
2022-01-21 11:17:36 +09:00
pools: SinglePoolStats[];
}
2022-02-09 19:41:05 +09:00
/**
* Pool component
*/
export interface PoolInfo {
id: number | null; // mysql row id
name: string;
link: string;
regexes: string; // JSON array
addresses: string; // JSON array
emptyBlocks: number;
}
export interface PoolStat {
pool: PoolInfo;
blockCount: number;
2022-03-09 16:30:45 +01:00
emptyBlocks: number;
}
export interface BlockExtension {
totalFees?: number;
medianFee?: number;
feeRange?: number[];
reward?: number;
coinbaseTx?: Transaction;
matchRate?: number;
pool?: {
id: number;
name: string;
}
stage?: number; // Frontend only
}
export interface BlockExtended extends Block {
2022-02-04 19:28:00 +09:00
extras?: BlockExtension;
}