v2.3.0 (#12)
* 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>
This commit is contained in:
13
examples/nodejs/bisq/addresses.ts
Normal file
13
examples/nodejs/bisq/addresses.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import mempoolJS from '../../../src/index';
|
||||
|
||||
const init = async () => {
|
||||
const {
|
||||
bisq: { addresses },
|
||||
} = mempoolJS();
|
||||
|
||||
const address = 'B1DgwRN92rdQ9xpEVCdXRfgeqGw9X4YtrZz';
|
||||
|
||||
const myAddress = await addresses.getAddress({ address });
|
||||
console.log(myAddress);
|
||||
};
|
||||
init();
|
||||
23
examples/nodejs/bisq/blocks.ts
Normal file
23
examples/nodejs/bisq/blocks.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
11
examples/nodejs/bisq/statistics.ts
Normal file
11
examples/nodejs/bisq/statistics.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import mempoolJS from '../../../src/index';
|
||||
|
||||
const init = async () => {
|
||||
const {
|
||||
bisq: { statistics },
|
||||
} = mempoolJS();
|
||||
|
||||
const stats = await statistics.getStats();
|
||||
console.log(stats);
|
||||
};
|
||||
init();
|
||||
17
examples/nodejs/bisq/transactions.ts
Normal file
17
examples/nodejs/bisq/transactions.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import mempoolJS from '../../../src/index';
|
||||
|
||||
const init = async () => {
|
||||
const {
|
||||
bisq: { transactions },
|
||||
} = mempoolJS();
|
||||
|
||||
const txid =
|
||||
'4b5417ec5ab6112bedf539c3b4f5a806ed539542d8b717e1c4470aa3180edce5';
|
||||
|
||||
const tx = await transactions.getTx({ txid });
|
||||
console.log(tx);
|
||||
|
||||
const txs = await transactions.getTxs({ index: 0, length: 1 });
|
||||
console.log(txs);
|
||||
};
|
||||
init();
|
||||
Reference in New Issue
Block a user