-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestexplorer.js
16 lines (16 loc) · 943 Bytes
/
testexplorer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const axios = require('axios');
axios.get('https://explorer.hostmasternode.com/insight-api/addr/' + 'hLWtSQPD9h3pwP9EDkmMaQNhrRxQFLVAzy' + '/?noTxList=1')
.then(async (response) => {
console.log(response.data.balance);
}) .catch(error => {
console.log('https://explorer.hostmasternode.com/insight-api/addr/' + 'hLWtSQPD9h3pwP9EDkmMaQNhrRxQFLVAzy' + '/?noTxList=1')
if (error.response) {
if (error.response.data == "Invalid address: Checksum mismatch. Code:1") {
console.log({ success: false, cause: error.response.data });
} else {
console.log({ success: false, cause: error });
}
} else {
console.log({ success: false, cause: error });
}
});