forked from doomhz/node-darkcoin
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.js
More file actions
35 lines (28 loc) · 842 Bytes
/
example.js
File metadata and controls
35 lines (28 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var chaincoin = require('./lib');
var client = new chaincoin.Client({
host: 'localhost',
port: '11995',
user: 'rpcuser',
pass: 'rpcpassword'
});
client.getBalance('*', 6, function(err, balance) {
if (err) return console.log(err);
console.log('Balance:', balance);
});
client.cmd('getbalance', '*', 6, function(err, balance){
if (err) return console.log(err);
console.log('Balance:', balance);
});
console.log('Master node info:');
client.masternode('list', 'activeseconds', '45.63.18.110', function(err, activeseconds){
if (err) return console.log(err);
console.log(activeseconds);
});
client.masternode('count', function(err, count){
if (err) return console.log(err);
console.log(count);
});
/*client.masternode('list', function(err, list){
if (err) return console.log(err);
console.log(list);
});*/