mempool/examples/html/liquid/assets.html

34 lines
758 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="https://mempool.space/mempool.js"></script>
<script>
const init = async () => {
const {
liquid: { assets },
} = mempoolJS();
const asset_id = '1wizSAYSbuyXbt9d8JV8ytm5acqq2TorC';
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();
</script>
</head>
<body></body>
</html>