Setup and Installation


Install Go and set environment variables GOPATH , GOBIN, and PATH. The current code base should compile with Go 1.14.1 on a Linux like system (i.e. Ubuntu, Mac OS X). Below are the steps to install Go 1.14.1 and setup the environments on Ubuntu.

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install git
sudo apt-get install -y bzr
sudo apt-get install jq
sudo wget
sudo tar -C /usr/local -xzf go1.14.1.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc
echo 'export THETA_HOME=$GOPATH/src/' >> ~/.bashrc
source ~/.bashrc

Next, clone the release branch of the Theta Ledger repo into your $GOPATH with the following command. The path should look like this: $GOPATH/src/

git clone --branch release $GOPATH/src/

Special Note

the above command clones the release branch of the code base. The release branch has special settings for you to connect to the Theta Mainnet. If you instead want to connect to the Testnet, please clone the testnet branch. If you want to launch a local private net, please clone the privatenet branch.

Build and Install

Please execute the commands below. This should build the binaries and copy them into your $GOPATH/bin. Two binaries theta and thetacli are generated. theta can be regarded as the launcher of the Theta Ledger node, and thetacli is a wallet with command line tools to interact with the ledger.

export GO111MODULE=on
make install