Comparing version 1.0.26 to 1.0.27
26
index.js
@@ -25,2 +25,15 @@ var CryptoJS = require('crypto-js') | ||
}, | ||
getBlock: (number, cb) => { | ||
fetch(avalon.randomNode()+'/block/'+number, { | ||
method: 'get', | ||
headers: { | ||
'Accept': 'application/json, text/plain, */*', | ||
'Content-Type': 'application/json' | ||
} | ||
}).then(res => res.json()).then(function(res) { | ||
cb(null, res) | ||
}).catch(function(error) { | ||
cb(error) | ||
}) | ||
}, | ||
getAccount: (name, cb) => { | ||
@@ -334,2 +347,15 @@ fetch(avalon.randomNode()+'/account/'+name, { | ||
}, | ||
getSupply: (cb) => { | ||
fetch(avalon.randomNode()+'/supply', { | ||
method: 'get', | ||
headers: { | ||
'Accept': 'application/json, text/plain, */*', | ||
'Content-Type': 'application/json' | ||
} | ||
}).then(res => res.json()).then(function(res) { | ||
cb(null, res) | ||
}).catch(function(error) { | ||
cb(error) | ||
}) | ||
}, | ||
getLeaders: (cb) => { | ||
@@ -336,0 +362,0 @@ fetch(avalon.randomNode()+'/allminers', { |
{ | ||
"name": "javalon", | ||
"version": "1.0.26", | ||
"version": "1.0.27", | ||
"description": "javascript api for the avalon blockchain", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
514202
692
29