Skip to content

Instantly share code, notes, and snippets.

@rippaio
Last active July 20, 2017 17:00
Show Gist options
  • Save rippaio/225956662cfef8cb447e1094de84dab3 to your computer and use it in GitHub Desktop.
Save rippaio/225956662cfef8cb447e1094de84dab3 to your computer and use it in GitHub Desktop.
Node CLI
var Client = require('node-rest-client').Client;
var client = new Client();
client.get("http://35.188.75.76:9980/explorer/blocks/86011", { headers: { "User-Agent": "Sia-Agent" } }, function (data, response) {
console.log("// Miner Payouts")
data.block.minerpayoutids.forEach((minerPayout) => {
console.log(minerPayout)
})
console.log("// Transactions ")
data.block.transactions.forEach((tx) => {
console.log(tx.id)
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment