Closed Ollemesh closed 6 years ago
Hello there,
You can point the bitcoin-core
client to your litecoind
(litecoin ip / port).
const Client = require('bitcoin-core');
const client = new Client({
host: '<your litecoind ip>',
password: '<your rpc username password>',
port: <your litecoind port>,
username: '<your rpc username>'
});
Care to check if the RPC methods that you need in litecoind
are available in here.
Cheers.
Hello, Thanks for your answer, but I still have a trouble:
My litecoin.conf:
server=1
daemon=1
gen=0
testnet=1
rpcallowip=127.0.0.1
rpcallowip=192.168.42.82
rpcuser=user
rpcpassword=password
(Bitcoin core works fine having the same settings in the same mashine)
My JS file:
const client = new Client({
host: '192.168.128.20',
port: '19335',
username: 'user',
password: 'password'
})
client.getInfo()
.then(info => console.log(info))
.catch(error => console.log(error))
19335 is being listened:
litecoind is alive:
RPS method, which i used is getInfo()
.
I must apologize for troubling you, thank You for the module, and if You need I can try to help You with it (if my skills is enough)
stable litecoind version did not help
Done! I start to read all listening ports list and find some another port 19332/litecoin I tried to set it in options and everything have started to work.
Hello, Thank You for this useful module!
A simple question: Can I use it for working with litecoin wallet, which have a similar rpc api? And if I can, how I should configure this?