Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Documentation Deployment
run-name: Deploying to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install --upgrade pip
- run: pip install mkdocs pymdown-extensions mkdocs-material
name: Documentation Deployment
run-name: Deploying to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install --upgrade pip
- run: pip install mkdocs pymdown-extensions mkdocs-material
- run: mkdocs gh-deploy --force
18 changes: 9 additions & 9 deletions docs/getting_started/create_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To create an account, type the following command below:
```bash
./pchain_client keys create --name <NAME>
```
=== "Windows"
=== "Windows PowerShell"
```PowerShell
./pchain_client.exe keys create --name <NAME>
```
Expand All @@ -30,7 +30,7 @@ This command generates a set of ed25519_dalek-compatible keys. A keypair file in
```bash
./pchain_client keys list
```
=== "Windows"
=== "Windows PowerShell"
```PowerShell
./pchain_client.exe keys list
```
Expand All @@ -48,11 +48,11 @@ You will need the keypair and public key to submit transactions.
You can check the account balance using the account address (public key).
=== "Linux / macOS"
```bash
./pchain_client query balance --address <PUBLIC_KEY>
./pchain_client query balance --address <ADDRESS>
```
=== "Windows"
=== "Windows PowerShell"
```PowerShell
./pchain_client.exe query balance --address <PUBLIC_KEY>
./pchain_client.exe query balance --address <ADDRESS>
```
<details><summary>Terminal Output</summary>
```bash
Expand All @@ -72,7 +72,7 @@ To secure your keypair and money, you must export it and save it somewhere secur
```bash
./pchain_client keys export --name <NAME>
```
=== "Windows"
=== "Windows PowerShell"
```PowerShell
./pchain_client.exe keys export --name <NAME>
```
Expand All @@ -84,11 +84,11 @@ You will be asked to input your password to export the keypair. The keypair will
To add your keypair, type the following command below:
=== "Linux / macOS"
```bash
./pchain_client keys import --public <PUBLIC_KEY> --private <PRIVATE_KEY> --name <NAME>
./pchain_client keys import --public <PUBLIC_KEY/ADDRESS> --private <PRIVATE_KEY> --name <NAME>
```
=== "Windows"
=== "Windows PowerShell"
```PowerShell
./pchain_client.exe keys import --public <PUBLIC_KEY> --private <PRIVATE_KEY> --name <NAME>
./pchain_client.exe keys import --public <PUBLIC_KEY/ADDRESS> --private <PRIVATE_KEY> --name <NAME>
```

You will be asked to input your password to import the new keypair.
Expand Down
108 changes: 54 additions & 54 deletions docs/getting_started/installation.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
---
tags:
- pchain-client
---

# Installation

ParallelChain client (`pchain_client`) is a command-line tool that allows you to connect and interact with the ParallelChain Mainnet / Testnet. `pchain_client` supports both Windows and Linux/macOS. In this tutorial, we will provide you with step-by-step instructions on how to install and use `pchain_client` to transfer tokens, deploy smart contracts, and call contracts.

## Installation Instructions
---

### Windows

1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
2. Unzip the file to extract the executable `pchain_client.exe`.
3. Open Powershell by pressing *WIN+R* and typing `powershell`.
4. Navigate to the directory where `pchain_client.exe` is located using the `cd` command. For example, if the executable is located at `C:\Development`, type `cd C:\Development`.
5. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.

### Linux / macOS

The installation process for Linux and macOS is similar. To install pchain_client:

1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).

2. Head to the directory where the downloaded file is located and extract it using `tar`. For example:

=== "Linux"
```bash
tar -xvf pchain_client_linux_v0.4.3.tar.gz
```
=== "macOS"
```bash
tar -xvf pchain_client_mac_v0.4.3.tar.gz
```

3. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.


!!! Tips
- If you're using macOS and encounter a [GateKeeper](https://support.apple.com/en-gb/guide/security/sec5599b66df/web) message when trying to run pchain_client, you can remove macOS' "GateKeeper" attributes from pchain_client using the following command:
```bash
sudo xattr -rd com.apple.quarantine ./pchain_client
```
This is an elevated action, so you will need to enter your password to continue. `pchain_client` can now be used as normal.

- You might want to store `pchain_client` 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:
```bash
$ mkdir -p /home/my_user/parallelchain_client
$ cp pchain_client /home/my_user/parallelchain_client/
$ cd /home/my_user/parallelchain_client
$ ./pchain_client
```
---
tags:
- pchain-client
---
# Installation
ParallelChain client (`pchain_client`) is a command-line tool that allows you to connect and interact with the ParallelChain Mainnet / Testnet. `pchain_client` supports both Windows and Linux/macOS. In this tutorial, we will provide you with step-by-step instructions on how to install and use `pchain_client` to transfer tokens, deploy smart contracts, and call contracts.
## Installation Instructions
---
### Windows
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
2. Unzip the file to extract the executable `pchain_client.exe`.
3. Open Powershell by pressing *WIN+R* and typing `powershell`.
4. Navigate to the directory where `pchain_client.exe` is located using the `cd` command. For example, if the executable is located at `C:\Development`, type `cd C:\Development`.
5. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
### Linux / macOS
The installation process for Linux and macOS is similar. To install pchain_client:
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
2. Head to the directory where the downloaded file is located and extract it using `tar`. For example:
=== "Linux"
```bash
tar -xvf pchain_client_linux_v0.4.3.tar.gz
```
=== "macOS"
```bash
tar -xvf pchain_client_mac_v0.4.3.tar.gz
```
3. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
!!! Tips
- If you're using macOS and encounter a [GateKeeper](https://support.apple.com/en-gb/guide/security/sec5599b66df/web) message when trying to run pchain_client, you can remove macOS' "GateKeeper" attributes from pchain_client using the following command:
```bash
sudo xattr -rd com.apple.quarantine ./pchain_client
```
This is an elevated action, so you will need to enter your password to continue. `pchain_client` can now be used as normal.
- You might want to store `pchain_client` 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:
```bash
$ mkdir -p /home/my_user/parallelchain_client
$ cp pchain_client /home/my_user/parallelchain_client/
$ cd /home/my_user/parallelchain_client
$ ./pchain_client
```
164 changes: 82 additions & 82 deletions docs/getting_started/prepare_env.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
---
tags:
- pchain-client
- mainnet
- testnet
- explorer
---

## Setting Environmental Variables
---

Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`.

Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed.

!!! Tips
For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location.

The following command will set the environmental variable **temporarily**:

=== "Linux / macOS"
```bash
# For example, "/home/user/pchain_cli_home"
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```
=== "Windows PowerShell"
```PowerShell
# For example, "C:\Users\user\pchain_cli_home"
$Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```

For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location.

The following command will set the environmental variable **permanently**:

=== "Linux / macOS"
```bash
##########################################################
## Append this line to $Home/.bashrc and $Home/.profile ##
##########################################################
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```
=== "Windows (restart shell to pick up change)"
```PowerShell
setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>"
```

## Creating Password
---

For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:

```text
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
Your password:
```

This password is only used by the CLI, and **NOT** associated with the blockchain. It is used for encryption and decryption of your keypairs so that the keypairs are stored in your computer more securely.

## Setting Endpoint Interacting with Parallelchain
---

After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet.

=== "Linux / macOS"
```bash
# Mainnet
./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io
# Testnet
./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io
```
=== "Windows"
```PowerShell
# Mainnet
./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io
# Testnet
./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io
```

This command will write a `config.toml` file in the folder specified by the environment variable `PCHAIN_CLI_HOME`. It only needs to be executed once.

Now you can start the journey to play around with `pchain_client`, but there is still one thing you had to put in mind first.
---
tags:
- pchain-client
- mainnet
- testnet
- explorer
---
## Setting Environmental Variables
---
Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`.
Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed.
!!! Tips
For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location.
The following command will set the environmental variable **temporarily**:
=== "Linux / macOS"
```bash
# For example, "/home/user/pchain_cli_home"
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```
=== "Windows PowerShell"
```PowerShell
# For example, "C:\Users\user\pchain_cli_home"
$Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```
For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location.
The following command will set the environmental variable **permanently**:
=== "Linux / macOS"
```bash
##########################################################
## Append this line to $Home/.bashrc and $Home/.profile ##
##########################################################
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
```
=== "Windows PowerShell (restart shell to pick up change)"
```PowerShell
setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>"
```
## Creating Password
---
For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:
```text
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
Your password:
```
This password is only used by the CLI, and **NOT** associated with the blockchain. It is used for encryption and decryption of your keypairs so that the keypairs are stored in your computer more securely.
## Setting Endpoint Interacting with Parallelchain
---
After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet.
=== "Linux / macOS"
```bash
# Mainnet
./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io
# Testnet
./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io
```
=== "Windows PowerShell"
```PowerShell
# Mainnet
./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io
# Testnet
./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io
```
This command will write a `config.toml` file in the folder specified by the environment variable `PCHAIN_CLI_HOME`. It only needs to be executed once.
Now you can start the journey to play around with `pchain_client`, but there is still one thing you had to put in mind first.
Loading