2022-02-04 12:51:45 +09:00
|
|
|
import { Block, Transaction } from "./electrs.interface";
|
|
|
|
|
2020-02-17 00:26:57 +07:00
|
|
|
export interface OptimizedMempoolStats {
|
2021-12-11 00:04:20 +09:00
|
|
|
added: number;
|
2020-02-16 22:15:07 +07:00
|
|
|
vbytes_per_second: number;
|
2020-02-17 00:26:57 +07:00
|
|
|
total_fee: number;
|
2020-02-16 22:15:07 +07:00
|
|
|
mempool_byte_weight: number;
|
2021-09-07 17:48:43 -03:00
|
|
|
vsizes: number[];
|
2020-02-16 22:15:07 +07:00
|
|
|
}
|
2021-03-18 23:47:40 +07: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;
|
|
|
|
}
|
2021-07-24 19:26:48 -03:00
|
|
|
|
|
|
|
export interface DifficultyAdjustment {
|
|
|
|
difficultyChange: number;
|
|
|
|
estimatedRetargetDate: number;
|
|
|
|
previousRetarget: number;
|
|
|
|
progressPercent: number;
|
|
|
|
remainingBlocks: number;
|
|
|
|
remainingTime: number;
|
|
|
|
}
|
2021-09-06 10:20:31 +04:00
|
|
|
|
|
|
|
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
|
2021-12-16 04:53:27 +04:00
|
|
|
witness_version?: number; // (numeric, optional) The version number of the witness program
|
2021-09-06 10:20:31 +04:00
|
|
|
witness_program: string; // (string, optional) The hex value of the witness program
|
|
|
|
confidential_key?: string; // (string) Elements only
|
|
|
|
unconfidential?: string; // (string) Elements only
|
|
|
|
}
|
2021-09-25 03:13:07 +04:00
|
|
|
|
|
|
|
export interface LiquidPegs {
|
|
|
|
amount: string;
|
|
|
|
date: string;
|
|
|
|
}
|
2022-01-13 03:58:12 +04:00
|
|
|
|
|
|
|
export interface ITranslators { [language: string]: string; }
|
2022-01-06 19:59:33 +09:00
|
|
|
|
2022-01-14 18:09:40 +09:00
|
|
|
export interface SinglePoolStats {
|
2022-01-21 11:17:36 +09:00
|
|
|
pooldId: number;
|
|
|
|
name: string;
|
|
|
|
link: string;
|
|
|
|
blockCount: number;
|
|
|
|
emptyBlocks: number;
|
|
|
|
rank: number;
|
|
|
|
share: string;
|
|
|
|
lastEstimatedHashrate: string;
|
|
|
|
emptyBlockRatio: string;
|
|
|
|
logo: string;
|
2022-01-14 18:09:40 +09:00
|
|
|
}
|
|
|
|
|
2022-01-06 19:59:33 +09:00
|
|
|
export interface PoolsStats {
|
2022-01-21 11:17:36 +09:00
|
|
|
blockCount: number;
|
|
|
|
lastEstimatedHashrate: number;
|
2022-01-25 18:33:46 +09:00
|
|
|
oldestIndexedBlockTimestamp: number;
|
2022-01-21 11:17:36 +09:00
|
|
|
pools: SinglePoolStats[];
|
2022-01-06 19:59:33 +09:00
|
|
|
}
|
2022-01-14 18:09:40 +09:00
|
|
|
|
|
|
|
export interface MiningStats {
|
|
|
|
lastEstimatedHashrate: string,
|
|
|
|
blockCount: number,
|
|
|
|
totalEmptyBlock: number,
|
|
|
|
totalEmptyBlockRatio: string,
|
|
|
|
pools: SinglePoolStats[],
|
|
|
|
}
|
|
|
|
|
2022-02-04 12:51:45 +09:00
|
|
|
export interface BlockExtension {
|
|
|
|
medianFee?: number;
|
|
|
|
feeRange?: number[];
|
|
|
|
reward?: number;
|
|
|
|
coinbaseTx?: Transaction;
|
|
|
|
matchRate?: number;
|
|
|
|
|
|
|
|
stage?: number; // Frontend only
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface BlockExtended extends Block {
|
2022-02-04 19:28:00 +09:00
|
|
|
extras?: BlockExtension;
|
2022-02-04 12:51:45 +09:00
|
|
|
}
|
|
|
|
|