dave on Nostr: function fetchMempoolTransactions() { fetch("") .then(res => res.json()) .then(data ...
function fetchMempoolTransactions() {
fetch("
https://blockstream.info/api/mempool";)
.then(res => res.json())
.then(data => {
let transactions = data.transactions;
transactions.forEach(transaction => {
console.log(transaction.txid);
})
})
.catch(error => console.error(error))
}
fetchMempoolTransactions();
Published at
2022-12-09 00:35:55Event JSON
{
"id": "1d58cf9a0097d431fa3ab055aacfc34592cabff16a15a6e6ee4eead28493fbbe",
"pubkey": "5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2",
"created_at": 1670546155,
"kind": 1,
"tags": [
[
"e",
"f04c12f13467f1af68817979f65ea91a91b5cf2131644265f7c43155d5fc7ae9",
"",
"root"
],
[
"e",
"b137ec0fed026186de65cb91080340a6ebc90ad371c59e7ad757e98e5b314200",
"",
"reply"
],
[
"p",
"2b36fb6ae1022d0d4eac2a9f13fc2638f3350acc9b07bdca1de43a7c63429644"
]
],
"content": "function fetchMempoolTransactions() {\n fetch(\"https://blockstream.info/api/mempool\")\n .then(res =\u003e res.json())\n .then(data =\u003e {\n let transactions = data.transactions;\n transactions.forEach(transaction =\u003e {\n console.log(transaction.txid);\n })\n })\n .catch(error =\u003e console.error(error))\n}\n\nfetchMempoolTransactions();",
"sig": "317dc1b84ae3614825650da6129a8e83b7c67178576ad2a23ad6f5c6714abf88a903b9fb7382cc5bd98284206a4e8f0942e5d1db2eabfea5f456a26aa910fc66"
}