Add difficulty adjustment examples.
This commit is contained in:
11
examples/nodejs/bitcoin/difficulty.ts
Normal file
11
examples/nodejs/bitcoin/difficulty.ts
Normal 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();
|
||||
Reference in New Issue
Block a user