Skip to content

Create Account

Generate Keypair

To create an account, type the following command below:

./pchain crypto generate-key-pair
pchain.exe crypto generate-key-pair

This command generates a set of ed25519_dalek compatible keys. A keypair file in json format is generated in currect directory. These are the keys required for making transactions in the network. Keep these details in a safe place. You cannot retrieve the account details again. An example is shown below:

IMPORTANT: Keep the keys in a safe place.

Terminal Output
keypair.json saved in current directory.

You will need the keypair and public key to submit transactions within the testnet.

You can check the account balance using the account address (public key).

./pchain query account balance --address /5orENuI/htbwtAyu+3t6rYn90q3vly1yVdosBHuNSs=
pchain.exe query account balance --address /5orENuI/htbwtAyu+3t6rYn90q3vly1yVdosBHuNSs=
Terminal Output

The balance of a new account is 0. Therefore, you need to request for tokens from faucet.

Request for tokens from Faucet

It is recommended to access the ParallelChain Testnet Explorer for requesting token from Faucet. You can only make a token request once every 30 minutes.

You can also use curl command to make a token request in command prompt.

curl -X POST -F 'address=<YOUR_PUBLIC_KEY>'

You can check for the new balance of your account using pchain or curl

curl --get<YOUR_PUBLIC_KEY>/balance?proof=?

or using pchain

./pchain query account balance --address <YOUR_PUBLIC_KEY>
pchain.exe query account balance --address <YOUR_PUBLIC_KEY>
Back to top