Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { Error: connect ECONNREFUSED 127.0.0.1:18332
- at Object._errnoException (util.js:992:11)
- at _exceptionWithHostPort (util.js:1014:20)
- at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
- code: 'ECONNREFUSED',
- errno: 'ECONNREFUSED',
- syscall: 'connect',
- address: '127.0.0.1',
- port: 18332 }
- testnet=1
- rpcuser=user
- rpcpassword=password
- rpcallowip=192.163.1.131
- var bitcoin = require('bitcoin');
- var client = new bitcoin.Client({
- host: 'localhost',
- port: 1426,
- user: 'akshay',
- pass: 'kappsoft'
- });
- client.getDifficulty(function(err, difficulty) {
- if (err) {
- return console.error(err);
- }
- console.log('Difficulty: ' + difficulty);
- });
Add Comment
Please, Sign In to add comment