CLI Wallet

Introduction

The Pyrin CLI Wallet provides a powerful and flexible way to interact with the Pyrin network. This guide covers all technical operations necessary to set up and use the CLI wallet on your Windows machine.

Setting Up the CLI Wallet

Download and Install

  1. Download Pyrin Core Files:

  2. Extract Files:

    • Extract the downloaded zip file to your desired location on your computer.

  3. Create a Batch File:

    • Open Notepad and create a new file.

    • Add the following lines to set up the environment and start the Pyrin node:

      @echo off
      pyipad --utxoindex
    • Save the file as start-pyrin.bat in the same directory as the extracted files.

  4. Run the Batch File:

    • Double-click start-pyrin.bat to start the Pyrin node.

Creating and Managing the Wallet

Create a New Wallet

  1. Open Command Prompt:

    • Navigate to the directory where you extracted the files.

  2. Run Wallet Creation Command:

    • For Windows:

      pyrinwallet create
    • Follow the on-screen instructions to set a password for your wallet.

Start the Wallet Daemon

  1. Run the Wallet Daemon:

    • For Windows:

      pyrinwallet start-daemon

Request a New Wallet Address

  1. Generate a New Address:

    • For Windows:

      pyrinwallet.exe new-address
    • The command will output a new wallet address.

Sending Coins

  1. Create a Batch File for Sending Coins:

    • Open Notepad and create a new file.

    • Add the following line, replacing amount and address with the desired values:

      pyrinwallet send -v amount -t address
    • Save the file as send-coins.bat.

  2. Run the Batch File:

    • Double-click send-coins.bat to send the specified amount of coins to the given address.

Checking Wallet Balance

  1. Create a Batch File for Checking Balance:

    • Open Notepad and create a new file.

    • Add the following line:

      pyrinwallet balance
    • Save the file as check-balance.bat.

  2. Run the Batch File:

    • Double-click check-balance.bat to check your wallet balance.

Backup and Restore

Introduction

Backing up your Pyrin wallet is crucial to ensure that you can recover your funds in case of any data loss or hardware failure. This guide will help you back up and restore your Pyrin wallet using the CLI.

Backup

Backup Wallet Files

  1. Locate Wallet Files:

    • Navigate to the directory where your Pyrin wallet files are stored. Typically, this is within the data directory specified during setup.

  2. Identify Key Files:

    • The essential files to back up are:

      • keys.json (contains your private keys)

      • wallet.dat (contains your wallet data)

      • pyrin.conf (contains your wallet configuration)

  3. Copy Files to a Secure Location:

    • Copy these files to a secure location such as an external hard drive, USB stick, or cloud storage.

Export Seed Phrase

  1. Export Seed Phrase Using CLI:

    • Open Command Prompt and navigate to the directory where your Pyrin wallet files are located.

    • Run the following command to export your seed phrase:

      pyrinwallet export-seed
    • Write down the 24-word seed phrase and store it in a secure location.

Restore

Restore Using Wallet Files

  1. Copy Backup Files to Data Directory:

    • Copy the backed-up keys.json, wallet.dat, and pyrin.conf files back to the data directory of your Pyrin wallet.

  2. Start Wallet Daemon:

    • Open Command Prompt and navigate to the directory where your Pyrin wallet files are located.

    • Run the following command to start the wallet daemon:

      pyrinwallet start-daemon

Restore Using Seed Phrase

  1. Open Command Prompt:

    • Navigate to the directory where your Pyrin wallet files are located.

  2. Run Restore Command:

    • Use the following command to restore your wallet using the 24-word seed phrase:

      pyrinwallet restore-seed
    • Follow the on-screen instructions to enter your seed phrase and restore your wallet.

Additional Tips

  • Regular Backups:

    • Make regular backups of your wallet files to ensure that you have the latest version available in case of data loss.

  • Secure Storage:

    • Store your backups and seed phrase in multiple secure locations to mitigate the risk of loss or theft.

  • Password Protection:

    • Use strong, unique passwords for your wallet and backup files to enhance security.

By following these steps, you can ensure that your Pyrin wallet is securely backed up and can be restored whenever necessary.

Troubleshooting

Node Not Syncing

  1. Check Internet Connection:

    • Ensure your internet connection is stable.

  2. Allow Firewall Connections:

    • Open Windows Firewall settings and allow connections on ports 16110 (for RPC) and 16111 (for node-to-node communication).

  3. Download a Bootstrap Database:

    • Consider downloading a bootstrap database for faster syncing.

Checking Node Status via CLI

  1. Run Status Command:

    • For Windows:

      pyipad --utxoindex
    • Use the --help flag to view more command options:

      pyipad --help

Last updated