1. Home
  2. Docs
  3. Guidelines for Paralism Node CLI Operation
  4. Wallet account

Wallet account

Account Address Query

When the node starts mining, the system will automatically generate a wallet account address for storing Paracoin for the node user. Enter coin addr at the hc $prompt in the program terminal to query the account address that the node has created. The node provides command Syntactic sugar. The Coin command can be abbreviated to the c command for easy operation. The command execution result is shown in the following figure.

Tip: If the terminal displays “… internal busy…” when entering a command without executing the command, it indicates that the host system resources are being occupied, which affects the execution of the node mining process. This problem is generally temporary.

Account address mnemonic

Users can name their account addresses to help them remember, and the command for naming addresses is “coin sacc”. For example, coin sacc 1NDHv8DJDHuK9ScicBEGNurzVUa6GLzJdD Lucky names the address Luky.

After the coin sacc command is successfully executed, you can use the command “coin addr” to query the account address corresponding to the account name.

Account Balance Query

Enter the command “c acc” after the hc $prompt on the program terminal to obtain all account balances of the mining node, as shown in the following figure.

“”: represents the total balance of all unnamed accounts.

‘acc *’: is the balance of the named account.

The account balance is divided into two parts, as shown in the figure

31869.99950000 represents the total amount of PARA coins received in the account

30261.99950000 represents the total amount of PARA coins in the account that have been solidified by the blockchain network. Commonly known as “mature currency”

The immature portion of the account balance is determined by the operational characteristics of blockchain. After the transaction is packaged into blocks, the blocks generated by mining need to be broadcasted to all nodes, and after receiving verification and acceptance from more than 51% of nodes, the blocks may be retained by the entire network as the basic data for the next block generation. After a period of time, as the computational difficulty and number of blocks accumulated after this block increase, if the block is still retained by more than 51% of nodes and used for subsequent mining, the probability of it being abandoned by the network will become extremely low. When this probability reaches a certain level, the node will independently determine that the transactions contained in the block have been permanently fixed by the blockchain, and can be used with confidence. The balance obtained from the node’s statistics of solidified transaction data is the mature currency balance.

Backup account

The account key is the only way for users to operate the account address, and once the key is lost, there is no feasible way to retrieve it. Therefore, exporting and storing account key data in a secure location is an operation that node users must carefully consider and execute. It is recommended to store key data in multiple reliable storage devices without internet connection, regularly check data files, and ensure that backup data is complete and usable.

Enter the command “coin ekpf” at the hc $prompt of the program terminal, for example: coin ekpf wn.txt. The exported key data will be stored as a plain text file. As shown in the following figure, after successful command execution, 107 account addresses and corresponding key data are stored in wn.txt.

If no storage directory path is specified, the default data storage path is “Paralism program installation directory bin “. Enter this directory to obtain the exported Keyfile wn.txt file.

The Keyfile contains the address, private key and public key of each exported account. Enter the type command under Windows to view the results as shown in the following figure

Import Account

When you need to import the account key to the node wallet, you can use the “coin ikpfcommand”, for example: coin ikpf wn.txt. If no storage path for the Keyfile is specified, the default path is “Paralism program installation directory bin “. You need to store wn.txt in this directory for the node import command to read. As shown in the following figure, the import command successfully imported 204 accounts and keys.

Continue to enter c addr or coin addr to check the account address in the wallet.

Account transfer

To complete an account transfer, there are generally four steps to ensure smooth execution.

Confirm that the balance is sufficient

Use the “c acc” command to obtain the balance of the node wallet, and the mature balance in currency is the amount that can be transferred.

Set transfer fees

Transfer transactions require payment of transaction fees to the miners. Miner nodes will prioritize selecting transactions with high transaction fees and packaging them into blocks for mining and extraction, in order to maximize their own profits. The transaction fee will fluctuate with the competition between mining nodes. When the transaction capacity of the blockchain network is relatively idle, transactions with a transaction fee of 0 also have the opportunity to be packaged and executed. It is generally recommended to set the transaction fee to 0.0001. When network transactions are busy, it is recommended to refer to the recent transaction fee situation in the block to set the transaction fee to ensure that the sent transaction is confirmed by the network in a timely manner.

The transaction fee setting uses the “c sfee” setting, such as c sfee 0.0001.

Send transaction transfer

After setting the transaction fee, enter c sendloadr, as shown in the following figure. The red box selects the recipient address and the pink box selects the transfer quantity.

When the transfer transaction command is sent, the transaction’s txid will be returned to the terminal program for display, as shown in the yellow box.

Confirm successful transaction sending

Enter the command “c acc” at the hc $prompt on the program terminal to query the account balance. Once the balance decreases as expected, confirm.

Enter the command “c tx” to query transfer transaction data, such as transaction quantity, handling fee and receiving address, number of confirmed blocks, transaction timestamp, etc.

Receive transfer

Query the balance before transfer

Use the command ‘c acc’ to obtain the account address balance, which can be recorded for comparison before and after the transfer. For example: account name Lucky, mature balance 921.

Query the balance after transfer

After the counterparty sends the transaction completion, will our party use the command “c acc” to determine if there is a corresponding change in the balance. Similarly, entering the command “c tx” can query transfer transaction data. The node will determine whether the received Para currency is mature based on the number of confirmed blocks in the transaction. Generally, if there are more than 1500 blocks, it will take approximately 1 hour to confirm the account’s mature balance. For example, the mature balance of account Lucky has changed from 921 to 966, and the increase in balance is consistent with expectations, indicating a successful transfer.

When multiple transactions occur, use the command “c txs” to query the latest 10 transaction information of the node account. More transaction information queries need to be obtained by calling the Restful API of the node through the program.

Wallet access control

Blockchain nodes are devices that are online 24 hours a day. In addition to setting various necessary security measures on the node host to prevent network attacks and data theft, it is also necessary to control access to the node’s wallet account and provide data protection to prevent theft. The Paralism node provides commands to set access passwords for wallets, which are used to control wallet access permissions and encrypt wallet data.

Note: After setting the password, please make sure to save the password you have set or export the node wallet account key to a secure and reliable offline storage device. Once lost, no one can help you retrieve it.

Wallet password settings

At the hc $prompt on the program terminal, enter “c encw” to set the password, such as c enew Lucky. The password input supports numbers, English, and Chinese characters. Returning “ok!” after the command carriage return indicates successful setup.

After setting the password, the wallet will enter a locked state, and any operation to access the wallet will be required to enter the password first before execution. Users can use “c wpass” to set a period of time for password free operation, in seconds. For example, c wpass Lucky 10 sets the password free operation time to 10 seconds. After successful setup, operating the wallet again within 10 seconds after each operation will not require entering a password.

Change the password and use “c chwpass”, such as c chwpass Lucky Lucky.

Was this article helpful to you? Yes No