|
1 | | ---- |
2 | | -tags: |
3 | | - - pchain-client |
4 | | - - mainnet |
5 | | - - testnet |
6 | | - - explorer |
7 | | ---- |
8 | | - |
9 | | -## Setting Environmental Variables |
10 | | ---- |
11 | | - |
12 | | -Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`. |
13 | | - |
14 | | -Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed. |
15 | | - |
16 | | -!!! Tips |
17 | | - For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location. |
18 | | - |
19 | | -The following command will set the environmental variable **temporarily**: |
20 | | - |
21 | | -=== "Linux / macOS" |
22 | | - ```bash |
23 | | - # For example, "/home/user/pchain_cli_home" |
24 | | - export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
25 | | - ``` |
26 | | -=== "Windows PowerShell" |
27 | | - ```PowerShell |
28 | | - # For example, "C:\Users\user\pchain_cli_home" |
29 | | - $Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
30 | | - ``` |
31 | | - |
32 | | -For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location. |
33 | | - |
34 | | -The following command will set the environmental variable **permanently**: |
35 | | - |
36 | | -=== "Linux / macOS" |
37 | | - ```bash |
38 | | - ########################################################## |
39 | | - ## Append this line to $Home/.bashrc and $Home/.profile ## |
40 | | - ########################################################## |
41 | | - export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
42 | | - ``` |
43 | | -=== "Windows (restart shell to pick up change)" |
44 | | - ```PowerShell |
45 | | - setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>" |
46 | | - ``` |
47 | | - |
48 | | -## Creating Password |
49 | | ---- |
50 | | - |
51 | | -For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows: |
52 | | - |
53 | | -```text |
54 | | -First time using ParallelChain Client CLI. Please set up a password to protect your keypairs. |
55 | | -Your password: |
56 | | -``` |
57 | | - |
58 | | -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. |
59 | | - |
60 | | -## Setting Endpoint Interacting with Parallelchain |
61 | | ---- |
62 | | - |
63 | | -After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet. |
64 | | - |
65 | | -=== "Linux / macOS" |
66 | | - ```bash |
67 | | - # Mainnet |
68 | | - ./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io |
69 | | - # Testnet |
70 | | - ./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io |
71 | | - ``` |
72 | | -=== "Windows" |
73 | | - ```PowerShell |
74 | | - # Mainnet |
75 | | - ./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io |
76 | | - # Testnet |
77 | | - ./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io |
78 | | - ``` |
79 | | - |
80 | | -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. |
81 | | - |
82 | | -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. |
| 1 | +--- |
| 2 | +tags: |
| 3 | + - pchain-client |
| 4 | + - mainnet |
| 5 | + - testnet |
| 6 | + - explorer |
| 7 | +--- |
| 8 | + |
| 9 | +## Setting Environmental Variables |
| 10 | +--- |
| 11 | + |
| 12 | +Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`. |
| 13 | + |
| 14 | +Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed. |
| 15 | + |
| 16 | +!!! Tips |
| 17 | + For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location. |
| 18 | + |
| 19 | +The following command will set the environmental variable **temporarily**: |
| 20 | + |
| 21 | +=== "Linux / macOS" |
| 22 | + ```bash |
| 23 | + # For example, "/home/user/pchain_cli_home" |
| 24 | + export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
| 25 | + ``` |
| 26 | +=== "Windows PowerShell" |
| 27 | + ```PowerShell |
| 28 | + # For example, "C:\Users\user\pchain_cli_home" |
| 29 | + $Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
| 30 | + ``` |
| 31 | + |
| 32 | +For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location. |
| 33 | + |
| 34 | +The following command will set the environmental variable **permanently**: |
| 35 | + |
| 36 | +=== "Linux / macOS" |
| 37 | + ```bash |
| 38 | + ########################################################## |
| 39 | + ## Append this line to $Home/.bashrc and $Home/.profile ## |
| 40 | + ########################################################## |
| 41 | + export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>" |
| 42 | + ``` |
| 43 | +=== "Windows PowerShell (restart shell to pick up change)" |
| 44 | + ```PowerShell |
| 45 | + setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>" |
| 46 | + ``` |
| 47 | + |
| 48 | +## Creating Password |
| 49 | +--- |
| 50 | + |
| 51 | +For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows: |
| 52 | + |
| 53 | +```text |
| 54 | +First time using ParallelChain Client CLI. Please set up a password to protect your keypairs. |
| 55 | +Your password: |
| 56 | +``` |
| 57 | + |
| 58 | +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. |
| 59 | + |
| 60 | +## Setting Endpoint Interacting with Parallelchain |
| 61 | +--- |
| 62 | + |
| 63 | +After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet. |
| 64 | + |
| 65 | +=== "Linux / macOS" |
| 66 | + ```bash |
| 67 | + # Mainnet |
| 68 | + ./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io |
| 69 | + # Testnet |
| 70 | + ./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io |
| 71 | + ``` |
| 72 | +=== "Windows PowerShell" |
| 73 | + ```PowerShell |
| 74 | + # Mainnet |
| 75 | + ./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io |
| 76 | + # Testnet |
| 77 | + ./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io |
| 78 | + ``` |
| 79 | + |
| 80 | +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. |
| 81 | + |
| 82 | +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. |
0 commit comments