2021-04-08 10:15:30 -03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Page Title</title>
|
2021-04-14 17:27:28 -03:00
|
|
|
<script src="https://mempool.space/mempool.js"></script>
|
2021-04-08 10:15:30 -03:00
|
|
|
<script>
|
|
|
|
const init = async () => {
|
2021-04-14 17:27:28 -03:00
|
|
|
const {
|
|
|
|
liquid: { transactions },
|
|
|
|
} = mempoolJS();
|
2021-04-08 10:15:30 -03:00
|
|
|
|
|
|
|
const txid =
|
|
|
|
'15e10745f15593a899cef391191bdd3d7c12412cc4696b7bcb669d0feadc8521';
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const tx = await transactions.getTx({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(tx);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txStatus = await transactions.getTxStatus({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txStatus);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txHex = await transactions.getTxHex({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txHex);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txRaw = await transactions.getTxRaw({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txRaw);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txMerkleBlockProof = await transactions.getTxMerkleBlockProof({
|
|
|
|
txid,
|
|
|
|
});
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txMerkleBlockProof);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txMerkleProof = await transactions.getTxMerkleProof({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txMerkleProof);
|
|
|
|
|
|
|
|
const txOutspend = await transactions.getTxOutspend({
|
|
|
|
txid,
|
|
|
|
vout: 3,
|
|
|
|
});
|
|
|
|
console.log(txOutspend);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
const txOutspends = await transactions.getTxOutspends({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
console.log(txOutspends);
|
|
|
|
|
2021-04-14 17:27:28 -03:00
|
|
|
// const postTx = await transactions.postTx({ txid });
|
2021-04-08 10:15:30 -03:00
|
|
|
// console.log(postTx);
|
|
|
|
};
|
|
|
|
init();
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body></body>
|
|
|
|
</html>
|