Guest User

Untitled

a guest
Mar 5th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. var bitcoin=require("bitcoin");
  2.  
  3. var client = new bitcoin.Client({
  4. host: 'localhost',
  5. port: 8332,
  6. user: 'username',
  7. pass: 'password',
  8. timeout: 30000
  9. });
  10.  
  11. client.getBalance('*', 6, function(err, balance, resHeaders) {
  12. if (err) return console.log(err);
  13. console.log('Balance:', balance);
  14. });
  15.  
  16. server=1
  17. rpcuser=username
  18. rpcpassword=password
  19. rpcport=8332
  20. rpcallowip=127.0.0.1
  21.  
  22. { Error: connect ECONNREFUSED 127.0.0.1:8332
  23. at Object._errnoException (util.js:1022:11)
  24. at _exceptionWithHostPort (util.js:1044:20)
  25. at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
  26. code: 'ECONNREFUSED',
  27. errno: 'ECONNREFUSED',
  28. syscall: 'connect',
  29. address: '127.0.0.1',
  30. port: 8332 }
Add Comment
Please, Sign In to add comment