Skip to content

Installation

Introduction


Parallelchain light client (pchain) is a command-line tool for you to connect and interact with the ParallelChain Mainnet. pchain supports Windows and Linux/MacOs.

Throughout the section Getting Started, we will describe how to transfer tokens, deploy smart contract and call contract with real world examples by using pchain. You can find all pchain commands with sample outputs in the References section.

For Windows


Download the compressed zip file from https://cms.parallelchain.io/parallelchain-very-light_win_v0.2.0.zip

Unzip the file to extract the executable pchain.exe.

Screenshot

To open Command Prompt, type WIN+R and input cmd:

Screenshot

Head to the directory where pchain.exe is located via cd. For example, the executable is located at C:\Development:

Screenshot

Run the command pchain.exe and see usage page.

Congratulations. You have successfully installed pchain and are ready to proceed to "Prepare Environment"

For Powershell User

This section describes using PowerShell as the command line utility to install ParallelChain Light Client.

Open up PowerShell using the run keyboard shortcut. That is WIN+R and type in powershell to proceed.

Unzip the compressed zip file by Expand-Archive. Please specify the source path and destination path for your command parameters:

  • <SOURCE_PATH>: the directory where parallelchain-very-light_win_v0.2.0.zip is located.
  • <DESTINATION_PATH>: the directory you intend to install pchain.
Expand-Archive -LiteralPath 'C:\<SOURCE_PATH>\parallelchain-very-light_win_v0.2.0.zip' -DestinationPath 'C:\<DESTINATION_PATH>\parallelchain-very-light_win_v0.2.0.exe'

To switch the operating mode of PowerShell from a normal mode to administrator mode:

Start-Process powershell -Verb runAs

Head to the destination directory where parallelchain-very-light_win_v0.2.0.exe is extracted:

Set-Location C:\<DESTINATION_PATH>\

In the destination directory (<DESTINATION_PATH>), it is suggested to rename the binary to pchain so that it becomes easier to follow this guide:

Rename-Item -Path 'parallelchain-very-light_win_v0.2.0.exe' -NewName 'pchain.exe'

Run the command pchain to see if it launches.

pchain.exe

To verify that the Light Client works pchain is now an executable from anywhere on your system
verylight 0.2.0
<Parallel Chain Lab>
Parallel Chain Mainnet verylight

Congratulations. You have successfully installed pchain and are ready to proceed to "Prepare Environment"

For Linux / macOS


In this section, most of the commands between the two operating systems are the same. If there are any differences, a tab that states a command for a particular operating system will be shown as below:

echo "This is a linux command"
echo "This is a macOS command"

To download the precompiled compressed binaries, use:

wget https://cms.parallelchain.io/parallelchain-very-light_linux_v0.2.0.tar.xz
curl -O https://cms.parallelchain.io/parallelchain-very-light_mac_x86_v0.2.0.tar.xz

To extract the client program, head to the directory where the downloaded file parallelchain-very-light_linux_v0.2.0.tar.xz or parallelchain-very-light_mac_x86_v0.2.0.tar.xz is located and extract via tar:

tar -xvf parallelchain-very-light_linux_v0.2.0.tar.xz 
tar -xvf parallelchain-very-light_mac_x86_v0.2.0.tar.xz

Rename the client program to pchain so that it becomes easier to follow this guide:

mv parallelchain-very-light_linux_v0.2.0 pchain

Run the command pchain to see if it launches.

./pchain
./pchain

Tip

For macOS users: Newer versions of macOS contain extra security verification steps configured by default. This is called GateKeeper. This usually happens when you download the binaries from a browser instead of using the curl tool as mentioned in the previous step. In case you found a message like this when calling pchain:

./pchain
Screenshot

then you can remove macOS' "GateKeeper" attributes from pchain by this command and run pchain as normal

sudo xattr -rd com.apple.quarantine ./pchain

This is an elevated action, so you will need to enter your password to continue. pchain can now be used as normal.

To verify that the Light Client works
verylight 0.2.0
<Parallel Chain Lab>
Parallel Chain Mainnet verylight

Congratulations. You have successfully installed pchain.

Tip

You might want to store pchain in a directory of your choice so that it is easier to follow the commands in the tutorial. For example, we created a folder in our home directory called parallelchain_client:

$ mkdir -p /home/my_user/parallelchain_client
$ cp pchain /home/my_user/parallelchain_client/
$ cd /home/my_user/parallelchain_client
$ ./pchain

So from now on, when you see a command like this in linux/macOS:

./pchain

It means that pchain shall be executed from the directory you stored pchain in.

Back to top