Add difficulty adjustment examples.

This commit is contained in:
Miguel Medeiros
2021-07-23 17:58:54 -03:00
parent caf8d956b5
commit aed4bc5fc9
3 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import mempoolJS from "@mempool/mempool.js";
const init = async () => {
const {
bitcoin: { difficulty },
} = mempoolJS();
const difficultyAdjustment = await difficulty.getDifficultyAdjustment();
console.log(difficultyAdjustment);
};
init();