* Add yarn-error.log to gitignore. * Add ts-node to devDependencies. Add script to only build tsc. Add websocket to keywords. * Update yarn.lock libs. * FIX websocket endpoint hostname. FIX corrent import for all examples. FIX websocket instrucions on readme.
21 lines
519 B
TypeScript
21 lines
519 B
TypeScript
import mempoolJS from "@mempool/mempool.js";
|
|
|
|
const init = async () => {
|
|
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);
|
|
};
|
|
init();
|