0

I am getting started with Litecoin so please bear with my question. So I have a local litecoin node running in my local system. So I am planning to use NodeJS to communicate with the Litecoin server.

I tried to use following two wrappers :

https://litecoin.info/index.php/Node-litecoin

https://www.npmjs.com/package/litecoin

However, I am getting the following error when trying to call any rpc method :

/usr/bin/node --inspect-brk=35916 server.js 

Debugger listening on ws://127.0.0.1:35916/71ccef6f-eac8-4bf5-9d07-b0a8b4e93528
For help, see: https://nodejs.org/en/docs/inspector

Debugger attached.

null: Object {host: "localhost", port: 19335, user: "paras", pass: "paras", network: "testnet", …}
null: Client {rpc: Client}
RESTful API server started on: 3005

null: Error: socket hang up
[[StableObjectId]]: 52
code: "ECONNRESET"
message: "socket hang up"
stack: "Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketOnEnd (_http_client.js:426:23)
    at Socket.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)"
__proto__: Object {constructor: , name: "Error", message: "", …}
[[StableObjectId]]: 53
constructor: function Error() { … }
message: ""
name: "Error"
toString: function toString() { … }
__proto__: Object {constructor: , __defineGetter__: , __defineSetter__: , …}

Both the wrappers are giving me the same error.

litecoin.conf
server=1
testnet=1
rpcuser=paras
rpcpassword=paras

Can someone help me with this please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.