* FIX: getBlocks optional params * v2.3.0 - new minor version for mempool-js - Add support for Bisq API - Add support for Liquid API - Change the main object to export network objects. - Change README.md instructions. Co-authored-by: softsimon <softsimon@users.noreply.github.com>
24 lines
514 B
TypeScript
24 lines
514 B
TypeScript
import mempoolJS from '../../../src/index';
|
|
|
|
const init = async () => {
|
|
const {
|
|
bisq: { blocks },
|
|
} = mempoolJS();
|
|
|
|
const hash =
|
|
'000000000000000000079aa6bfa46eb8fc20474e8673d6e8a123b211236bf82d';
|
|
|
|
const block = await blocks.getBlock({ hash });
|
|
console.log(block);
|
|
|
|
const myBlocks = await blocks.getBlocks({ index: 0, length: 1 });
|
|
console.log(myBlocks);
|
|
|
|
const myBlocksHeight = await blocks.getBlocksTipHeight({
|
|
index: 0,
|
|
length: 1,
|
|
});
|
|
console.log(myBlocksHeight);
|
|
};
|
|
init();
|