You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
minepool(); function minepool() { let promised = fetch(api_url + 'minepool'). then(resp => resp.json()). then(obj => { document.getElementById('json').innerText = JSON.stringify(obj);
if (typeof(obj.txpool) != 'undefined') { let list = '<ol>'; for (let txa of obj.txpool) { console.log('getpool.bh:',txa); let tx_url = api_url + `gettx?addr=${txa}`; list += `<li><a href="${tx_url}">${txa}</a></li>\n` } list += '</ol>'; document.getElementById('list').innerHTML = list; }
return obj; }). catch(console.error); promised.then(obj => { console.log('obj:',obj); return obj; });
}
// ----------------------------------------------------
console.log('txpool.js loaded');
|