The uPow Blockchain Wallet is a command-line interface (CLI) tool designed for interacting with the uPow blockchain. It allows users to perform various actions such as creating wallets, sending transactions, checking balances, staking, voting, and more. This document provides detailed instructions on how to set up and use the uPow Blockchain Wallet.
- Python 3.11 or higher
- An internet connection
-
Clone the repository or download the source code to your local machine.
git clone https://github.com/upowai/wallet.git cd wallet
-
Prepare Your Development Environment
Depending on your operating system, you may need to install additional tools to ensure the
fastecdsa
Python package and other dependencies compile correctly:-
Ubuntu Users:
Install the necessary libraries by running:
sudo apt-get update sudo apt-get install libgmp3-dev sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
-
Windows Users:
Install Visual Studio, which includes the necessary C++ build tools. Download it from https://visualstudio.microsoft.com/vs/preview/ and ensure to select the C++ workload during installation. wikihow Install Clang on Windows
-
macOS Users:
Install Xcode or the standalone Command Line Tools for Xcode, which include
clang
. This can be done by installing Xcode from the Mac App Store or by running the following command in the terminal:xcode-select --install
For users who prefer not to install Xcode, downloading Command Line Tools for Xcode from Apple Developer Downloads is an alternative. https://ics.uci.edu/~pattis/common/handouts/macclion/clang.html
Please ensure these tools are correctly installed and configured on your system before proceeding with the installation of the Python package dependencies.
-
-
Install the required dependencies by running the following command in your terminal:
pip install -r requirements.txt
-
Navigate to the project directory where the
wallet.py
file is located.
To use the uPow Blockchain Wallet, you will run commands in the format of python3 wallet.py [command] [options]
. Below are the available commands and their usage:
To create a new wallet, which includes generating a new private key and its associated public address:
python3 wallet.py createwallet
- Your Privatekey and Publickey will be stored locally in
key_pair_list.json
To check the balance of all addresses in your wallet:
python3 wallet.py balance
To send uPow to another address:
python3 wallet.py send -to [recipient_address] -a [amount] -m [message (optional)]
-to
: The recipient's address.-a
: The amount of uPow to send.-m
: An optional message to include with the transaction.
To stake uPow:
python3 wallet.py stake -a [amount]
-a
: The amount of uPow to stake.
To unstake all staked uPow:
python3 wallet.py unstake
To register as an inode:
python3 wallet.py register_inode
To deregister as an inode:
python3 wallet.py de_register_inode
To register as a validator:
python3 wallet.py register_validator
- To vote for a validator by a delegate:
- Delegates can vote for validators within a specified range from 1 to 10. The amount of staked coins directly influences their voting power. For example, if a delegate stakes 1000 coins and allocates a voting range of 5 to a validator, it signifies that 500 of their staked coins support that validator.
python3 wallet.py vote -r [range] -to [recipient_address]
-r
: The range of your vote.-to
: The address of the validator you are voting for.
- To vote for a Inode by a validator:
- Validators, once registered, can cast votes towards iNodes based on their total stake from delegate This process is similar to delegate voting but is specifically aimed at supporting network infrastructure and governance.
python3 wallet.py vote -r [range] -to [recipient_address]
-r
: The range of your vote.-to
: The address of the inode you are voting for.
The revoke
command allows users to withdraw their delegation or validation rights. This can be applied dynamically and is useful for managing staking preferences or validator participation.
- To revoke a delegation or validation:
python3 wallet.py revoke -from [address]
-from
: The address from which you are revoking your stake or validation rights. This could be a validator address if you are a staked delegate, or it could be an inode address if you are a validator.
For additional help or information about the uPow Blockchain Wallet, please refer to the official uPow documentation or contact the support team at discord.