Litecoin is the fork of bitcoin. If you have installed
Bitcoindfor syncing, then there is no major difference between them. In this post, I'll explain how to setup litecoindand start syncing from testnet.
allyou need to download the stable version of litecoindfrom their official website. Or you can directly use your terminal to download and extract.
Your syncing will started. But in this case, it will start sync to mainnet, so our primary goal is to start syncing on testnet. To achieve that goal, we need to make configuration file for that.
To make a configuration file, you need to define .conf file and put it in .litecoind folder that will be generated after installation. Here is the configuration details that you need put into your file.
Now, you should restart your litecoin daemon process. you can do so by
litecoid-cli stop : to stop litecoin
litecoind -daemon : to start it again.
You can check information about syncing by typing command : litecoin-cli getinfo
So, now the main task is to connect JSON-RPC api to our program. Here is an example.
Some people will confuse that why are we using BitcoinJSONRPCClient for litecoin. The simple answer is, since litecoin is the fork of bitcoin, we can easily use BitcoinJSONRPCClient to connect with API's.
I hope, this will help. If you have any other issues, please leave a comment.