forked from mempool/mempool.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassets.html
37 lines (33 loc) · 970 Bytes
/
assets.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="./../../../../dist/mempool.js"></script>
<script>
const init = async () => {
try {
const {
liquid: { assets },
} = mempoolJS( { hostname: 'liquid.network' } );
const asset_id = 'a0c358a0f6947864af3a06f3f6a2aeb304df7fd95c922f2f22d7412399ce7691';
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();
</script>
</head>
<body></body>
</html>