Add bisqJS and liquidJS npm modules.
This commit is contained in:
24
examples/nodejs/liquid-js/assets.ts
Normal file
24
examples/nodejs/liquid-js/assets.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import mempoolJS from "./../../../src/index";
|
||||
|
||||
const init = async () => {
|
||||
try {
|
||||
const {
|
||||
liquid: { assets },
|
||||
} = mempoolJS();
|
||||
|
||||
const asset_id =
|
||||
'6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d';
|
||||
|
||||
const asset = await assets.getAsset({ asset_id });
|
||||
console.log(asset);
|
||||
|
||||
const assetTxs = await assets.getAssetTxs({ asset_id, is_mempool: false });
|
||||
console.log(assetTxs);
|
||||
|
||||
const assetSupply = await assets.getAssetSupply({ asset_id, decimal: false });
|
||||
console.log(assetSupply);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
init();
|
||||
Reference in New Issue
Block a user