Setting Up A Lite Coin Server

Posted By Ranjan Mondal | 31-Jan-2018

Following are steps for configuring litecoin server on your machine.

Installing Litecoin on Notary Node

 

Step 1: downloading link for litecoin 14 version.

wget https://download.litecoin.org/litecoin-0.14.2/linux/litecoin-0.14.2-x86_64-linux-gnu.tar.gz

 

Step 2: to extract the tar file

tar -zxvf litecoin-0.14.2-x86_64-linux-gnu.tar.gz

 

Step 3: to provide location

sudo install -m 0755 -o root -g root -t /usr/local/bin ~/litecoin-0.14.2/bin/*

 

Step 4: creating a directory of name .litecoin and adding conf file in it.

mkdir .litecoin
cd .litecoin
vim litecoin.conf

 

Step 5: Fill following contents here.

rpcuser=litecoinrpc
rpcpassword=password
#server=1
testnet=1
rpcallowip=127.0.0.1
paytxfee=0.00500000
blocknotify=/home/ranjan/.litecoin/block.sh %s

 

Note:: When the block gets processed, the block.sh gets executed and transaction hash is passed to particular API whether it is node or java.

Note:: paytxfee ensures that max network fee is 0.005

 

Step 6: create a file named block.sh and fill following contents here.

curl -i -H "Accept: application/json" "http://127.0.0.1:4000/api/v1/block/notification?address=$@"

It will send block address to receiving API whether it is in node and java.

 

NOTE : 

for testnet set testnet=1
or mainnet  set server=1

 

Step 7: 

To start Litecoin server:  sudo litecoind -daemon

To stop :  litecoin-cli stop

To see blocks downloaded: litecoin-cli getinfo

 

Step 8:  Giving full permission to block.sh

sudo chmod 777 block.sh

 

Step 8: Commands on litecoin console.


# total accounts
litecoin-cli listaccounts  

 

# show balance of particular walletname
litecoin-cli getbalance oodLite2

 

# show wallet address of walletname
litecoin-cli getaddressesbyaccount oodLite1

 

# generate new address..

litecoin-cli getnewaddress "abc"  

Give new address ::: mykE6XtHAvcQGvMCXjEBXuVCpd27n7BAyt

 

# send litecoin to from one address to another

litecoin-cli sendfrom oodLite2 mykE6XtHAvcQGvMCXjEBXuVCpd27n7BAyt 0.10000000
litecoin-cli sendfrom abc mzsrTo5AC9EYRQiMSfvywrzU4Fakx37V4n 0.10000000

 

# generate new wallet address

litecoin-cli getnewaddress "BelfricsLiteCoin1"

Request for Proposal

Recaptcha is required.

Sending message..