Move our custom fields to a BlockExtension sub object of the IEsploraApi.Block interface

This commit is contained in:
nymkappa
2022-02-04 12:51:45 +09:00
parent e5b5551d79
commit a49cc9a2fa
19 changed files with 124 additions and 77 deletions

View File

@@ -1,3 +1,5 @@
import { Block, Transaction } from "./electrs.interface";
export interface OptimizedMempoolStats {
added: number;
vbytes_per_second: number;
@@ -80,3 +82,17 @@ export interface MiningStats {
pools: SinglePoolStats[],
}
export interface BlockExtension {
medianFee?: number;
feeRange?: number[];
reward?: number;
coinbaseTx?: Transaction;
matchRate?: number;
stage?: number; // Frontend only
}
export interface BlockExtended extends Block {
extra?: BlockExtension;
}