Add difficulty adjustment examples.
This commit is contained in:
20
examples/html/bitcoin/difficulty.html
Normal file
20
examples/html/bitcoin/difficulty.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
<script src="https://mempool.space/mempool.js"></script>
|
||||
<script>
|
||||
const init = async () => {
|
||||
const {
|
||||
bitcoin: { difficulty },
|
||||
} = mempoolJS();
|
||||
|
||||
const difficultyAdjustment = await difficulty.getDifficultyAdjustment();
|
||||
console.log(difficultyAdjustment);
|
||||
|
||||
};
|
||||
init();
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user