Add difficulty adjustment endpoints methods.

This commit is contained in:
Miguel Medeiros
2021-07-23 17:37:28 -03:00
parent 1c32b05abe
commit caf8d956b5
5 changed files with 37 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
export interface Adjustment {
progressPercent: number,
difficultyChange: number,
estimatedRetargetDate: number,
remainingBlocks: number,
remainingTime: number,
previousRetarget: number,
}
export interface DifficultyInstance {
getDifficultyAdjustment: () => Promise<Adjustment>;
}

View File

@@ -1,5 +1,6 @@
import { AddressInstance } from './bitcoin/addresses';
import { BlockInstance } from './bitcoin/blocks';
import { DifficultyInstance } from './bitcoin/difficulty';
import { FeeInstance } from './bitcoin/fees';
import { MempoolInstance } from './bitcoin/mempool';
import { TxInstance } from './bitcoin/transactions';
@@ -21,6 +22,7 @@ export interface MempoolReturn {
bitcoin: {
addresses: AddressInstance;
blocks: BlockInstance;
difficulty: DifficultyInstance;
fees: FeeInstance;
mempool: MempoolInstance;
transactions: TxInstance;