v2.2.0 - new major version for mempool-js (#2)
* - Refactoring code. - Refactoring folder structure. - Adding apiEndpoint and websocketEndpoint to Mempool config. - Adding brownserify feature. - Adding MIT LICENSE * - Changing package.json information. - Reorganizing README.md information. - Default export for CommonJs and ES6 Modules. - Changing default variable to mempoolJS. - Organizing the API and WS providers. - Splitting websocket connection types: client and server. * Change version to 2.2.0. Reorder keywords in alphabetical order.
This commit is contained in:
49
examples/html/transactions.html
Normal file
49
examples/html/transactions.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
<script src="./../../dist/mempool.js"></script>
|
||||
<script>
|
||||
const init = async () => {
|
||||
const { transactions } = mempoolJS();
|
||||
|
||||
const txid =
|
||||
'15e10745f15593a899cef391191bdd3d7c12412cc4696b7bcb669d0feadc8521';
|
||||
|
||||
const tx = await transactions.getTx(txid);
|
||||
console.log(tx);
|
||||
|
||||
const txStatus = await transactions.getTxStatus(txid);
|
||||
console.log(txStatus);
|
||||
|
||||
const txHex = await transactions.getTxHex(txid);
|
||||
console.log(txHex);
|
||||
|
||||
const txRaw = await transactions.getTxRaw(txid);
|
||||
console.log(txRaw);
|
||||
|
||||
const txMerkleBlockProof = await transactions.getTxMerkleBlockProof(
|
||||
txid
|
||||
);
|
||||
console.log(txMerkleBlockProof);
|
||||
|
||||
const txMerkleProof = await transactions.getTxMerkleProof(txid);
|
||||
console.log(txMerkleProof);
|
||||
|
||||
const txOutspend = await transactions.getTxOutspend({
|
||||
txid,
|
||||
vout: 3,
|
||||
});
|
||||
console.log(txOutspend);
|
||||
|
||||
const txOutspends = await transactions.getTxOutspends(txid);
|
||||
console.log(txOutspends);
|
||||
|
||||
// const postTx = await transactions.postTx(txid);
|
||||
// console.log(postTx);
|
||||
};
|
||||
init();
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user