Sending and Receiving Coins via CLI

Sending and Receiving Coins via CLI

The command-line interface (CLI) offers advanced capabilities for interacting with the P-20 blockchain and conducting transactions. In this guide, we will provide detailed instructions on how to send and receive coins using the CLI, while leveraging the privacy features of the P-20 blockchain.

Prerequisites

Before you proceed, ensure that you have met the following prerequisites:

  1. Installed P-20 CLI: Download and install the latest version of the P-20 CLI tool. You can obtain it from the official P-20 website or the GitHub repository. Make sure you have the CLI properly configured and accessible from your command line.

  2. Wallet Creation: If you haven't already created a P-20 wallet, you need to generate a new wallet address. The CLI provides functionality for wallet management, including address generation. Follow the "Creating a P-20 Wallet" guide for detailed instructions on creating a wallet.

Sending Coins

To send coins using the CLI, follow these steps:

  1. Open your command-line interface or terminal and ensure that you are in the appropriate directory where the P-20 CLI is installed.

  2. Authenticate and access your P-20 wallet using the CLI command p20-wallet open <wallet_name>. Replace <wallet_name> with the name of your wallet.

  3. Enter your wallet password when prompted to unlock your wallet and gain access.

  4. Generate a one-time address for the recipient using the CLI command p20-wallet generate-address. This will create a unique address that can only be used once for receiving funds.

  5. Share the one-time address with the recipient. This address ensures that each transaction is associated with a different address, enhancing privacy and preventing address reuse.

  6. Use the p20-wallet send command followed by the recipient's one-time address and the amount of coins you want to send. For example: p20-wallet send <recipient_one-time_address> <amount>. Replace <recipient_one-time_address> with the one-time address of the recipient and <amount> with the number of coins you wish to send.

  7. Verify the transaction details displayed by the CLI, including the recipient's one-time address and the amount of coins being sent. Confirm that the information is accurate.

  8. If the details are correct, enter your wallet password to authorize the transaction. The CLI will sign the transaction using your private key and broadcast it to the P-20 network.

  9. Wait for the transaction to be confirmed by the network. You can monitor the transaction status using the p20-wallet status command.

  10. Once the transaction is confirmed, the coins will be successfully sent to the recipient's one-time address.

Receiving Coins

To receive coins using the CLI, follow these steps:

  1. Ensure that your P-20 wallet is accessible and running through the CLI.

  2. Use the p20-wallet address command to display your P-20 wallet's stealth address. This is the address associated with your wallet that remains private and is not publicly visible on the blockchain.

  3. Share your stealth address with the sender. They can use this address to generate a one-time address for the transaction.

  4. Monitor your wallet using the p20-wallet status command to check if any incoming transactions have been confirmed and added to your balance.

  5. Once a transaction is confirmed, the coins will be added to your wallet's balance and can be used for future transactions.

The use of one-time addresses and stealth addresses enhances the privacy and anonymity of transactions on the P-20 blockchain. One-time addresses ensure that each transaction has a unique receiving address, making it difficult to trace the flow of funds. Stealth addresses protect the privacy of the recipient by generating a different address for each transaction.

By following these instructions, you can securely send and receive coins using the P-20 CLI while leveraging the privacy features of the P-20 blockchain.

Remember to always exercise caution when conducting transactions and ensure that you verify the accuracy of the transaction details before authorizing any transfers.

Last updated