Litecoin/litecoind

From Omnia
Jump to navigation Jump to search

Litecoind

https://litecoin.org/

Installation

Downloads:

https://litecoin.org/

Binary:

wget https://download.litecoin.org/litecoin-0.8.7.5/linux/litecoin-0.8.7.5-linux.tar.xz
tar -Jvxf litecoin-0.8.7.5-linux.tar.xz
sudo cp litecoin-0.8.7.5-linux/bin/64/litecoin* /usr/local/bin/
wget https://download.litecoin.org/litecoin-0.10.4.0/linux/litecoin-0.10.4.0-linux64.tar.gz
tar -xvf litecoin-0.10.4.0-linux64.tar.gz
#sudo rm /usr/local/bin/litecoin*
#sudo cp litecoin-0.10.4.0-linux/bin/litecoin* /usr/local/bin/
mkdir -p ~/.bin
rm ~/.bin/litecoin*
cp litecoin-0.10.4.0/bin/litecoin* ~/.bin/
# ltc shortcut
#sudo ln -s /usr/local/bin/litecoind /usr/local/bin/ltc
ln -s litecoind ~/.bin/ltc

Run once to create config folder:

litecoind

Config:

cat >> /home/kenneth/.litecoin/litecoin.conf << "_EOF_"
rpcuser=litecoinrpc
rpcpassword=6H75mFikFcHcoVN21DFcMYjw75zwrMAMga3SVzSts8tW
server=1
daemon=1
_EOF_

GUI

Create desktop icon pointing to 'litecoind'

Syntax

Same exact syntax as bitcoind

litecoind getbalance
ltc getbalance

Sync Status

ltc-sync-status

#!/bin/bash
# litecoin-sync-status
LITECOIN_SYNC_CURRENT=`litecoind getblockcount`
LITECOIN_SYNC_TOTAL=`curl http://explorer.litecoin.net/chain/Litecoin/q/getblockcount 2>/dev/null`
LITECOIN_SYNC_PERCENT=$(( LITECOIN_SYNC_CURRENT * 100 / LITECOIN_SYNC_TOTAL ))
echo "Sync status: ${LITECOIN_SYNC_PERCENT}% (${LITECOIN_SYNC_CURRENT}/${LITECOIN_SYNC_TOTAL})"