Overview:
This is the 6th beta release of the Denaro Wallet Client, developed by The Sycorax. This version introduces several new features and improvements, focusing on enhancing the functionality, efficiency, and user experience of the wallet client.
A significant enhancement in this version is the ability for users to view the real-world monetary value of their Denaro balances. Additionally, users also have the option to convert the value of their balances in various international fiat currencies and major cryptocurrencies, with USD as the default. This functionality adds a layer of convenience, allowing users to understand the value of their holdings in a currency that is more familiar and relevant to them.
The introduction of Denaro paper wallets is another major addition in this version, offering users with a secure and physical alternative for wallet storage. Additionally, the wallet client has been updated to support backup capabilities for wallet files via the CLI. Wallet generation has also been refined, and now incorporates the option to use a 12-word mnemonic phrase, facilitating the recoverability of deterministic wallets.
Improvements have been made to the wallet decryption process, focusing on making it more efficient in decrypting, accessing, and viewing the contents of wallet files. Modifications have also been made to the command-line interface, including the introduction of new sub-commands and options to facilitate these new features.
Due to the amount of new features and changes that have been made in this version and the previous, there is an increased likelihood of encountering bugs in this version. As such, this beta release is considered experimental. It is recommended that users thoroughly read the disclaimer and changelog before using this version.
DISCLAIMER:
Neither The-Sycorax nor contributors of this project assume liability for any loss of funds incurred through the use of this software! Be advised that this is an experimental beta release, and is not recommended for production use.
User are solely responsible for the security and management of their assets! Therefore, it is strongly recommended that users back up their cryptographic keys and wallets before using this software.
The use of this software acknowledges acceptance of ALL associated risks, including financial losses, with no liability on The-Sycorax or contributors of this project. This software is provided 'as is' under the MIT License without guarantees or warranties of any kind, expressed or implied.
Full Changelog:
-
New Features:
- The ability to view the real-world value of Denaro balances.
- Generating Denaro paper wallets.
- Support for backing up wallet files.
- Generating wallets based on a mnemonic phrase.
- Improved wallet decryption.
-
Command-line Interface:
-
Changes:
-
Reorganized the command structure for wallet and address generation with a new
generate
sub-command.-
The
generatewallet
sub-command has been updated togenerate wallet
. -
The
generateaddress
sub-command has been updated togenerate address
. -
This change simplifies the command structure and improves usability by grouping related functionalities under a single sub-command.
-
-
The
-pretty
option for thedecryptwallet
sub-command has been replaced with-json
. -
The
-filter
option has been removed from thedecryptwallet
sub-command. It has been removed in support of thedecryptwallet filter
sub-command which has the same exact functionality, dose not require a specific syntax, and is easier to use. -
Updated help messages for better documentation and consistency.
-
-
New Sub-commands and Options:
-
A
generate paperwallet
sub-command has been added to facilitate the creation of Denaro paper wallets either by using an address that is associated with a wallet file, or directly via a private key that corresponds to a particular address (See Paper Wallet Support for more details). -
A
backupwallet
sub-command has been added which allow users to create backups of their wallet files. Users can specify the filepath of a directory to save a wallet backup file. If no specific filepath is provided then wallet backup files will be saved to the./wallets/wallet_backups/
directory by default. -
A
-phrase
option has been added to thegenerate wallet
sub-command to allow the creation of wallets based on a 12 word mnemonic phrase. This option will enable deterministic address generation by default, therefore it can be used to recover determinisitic addresses as long as the mnemonic phrase and password are correct. -
A
-convert-to
option has been added to thebalance
sub-command which allows users to convert the monetary value of their balances to a specified currency, factoring in current exchange rates against the USD price of DNR. This option supports 161 international currencies and major cryptocurrencies, and requires three letter currency code (See New Balance Checking Features for more details).
-
-
-
wallet_client.py
Changelog:-
The
generateAddressHelper
andmain
functions have been slightly modified to support the creation of wallets based on a 12 word mnemonic phrase. -
Added a
custom
parameter to theensure_wallet_directories_exist
function. This is used to create a custom directory at a specific filepath. -
Various operations that are responsible for retrieving address and private key data in the
prepareTransaction
function have been moved to singleget_address_and_private_key
function. -
Added console message when filtering wallet entries by origin.
-
Fixed various typos throughout the codebase.
-
Introduced a
generatePaperWallet
function to facilitate paper wallet generation.- See Paper Wallet Support for more details.
-
Significant improvements have been introduced to the balance checking system.
- The
checkBalance
function has been updated. - Added new functions:
is_valid_currency_code
andget_price_info
. - See New Balance Checking Features for more details.
- The
-
Updated various CLI sub-commands to accommodate the newly added features.
- See Command-line Interface more details.
-
Modified the
check_args
function to accommodate changes made to the CLI. -
Refactored
decryptWalletEntries
Function:-
This sub-section documents the modifications and enhancements made to the
decryptWalletEntries
function, highlighting significant improvements in it's performance, efficiency, and code structure.Details
- Addressed issues related to code verbosity and structural organization.
- Resolved inefficiencies in processing large wallet files.
- Implemented more concise and Pythonic determination of wallet type.
- Enhanced the function's capability to handle deterministic wallets.
- Refined logic for handling both encrypted and non-encrypted wallets.
- Replaced the
pretty
parameter withto_json
. - Introduced a nested function
handle_entry_decryption
for entry processing. - Introduced a nested function
filter_entries
for more efficient filtering of wallet entries. - Improved handling for specific scenarios involving sub-commands (
balance
,send
,generate paperwallet
). - Improved conditional output formatting based on user input.
- Enhanced the mechanism for sorting and filtering fields in the output.
- Removed disorganized address filtering logic from the main code block.
- Applied address filtering separately to generated and imported entries.
- Implemented support for non-JSON output, providing a more readable format with clear differentiation between internally generated and imported entry types.
- Expanded the use of
DataManipulation.secure_delete
, ensuring enhanced data security.
-
-
-
wallet_generation_util.py
Changelog:- An
is_valid_mnemonic
function has been added to validate mnemonic phrases.
- An
-
data_manipulation_util.py
Changelog:- A
backup_wallet
method has been added to facilitate backing up wallet files.
- A
-
cryptographic_util.py
Changelog:- Fixed a none type error in
get_failed_attempts
method.
- Fixed a none type error in
-
New Balance Checking Features:
-
This release of the wallet client introduces significant improvements to the balance checking system. It now allows users to view the real-world value of their Denaro (DNR) balances. Additionally, it introduces the
-convert-to
option in thebalance
sub-command, enabling users to view their balances in over 161 international currencies or the top 100 cryptocurrencies. Detailed technical information about these features are outlined below.Technical Details:
-
Modified
checkBalance
Function:-
New function parameters have been introduced:
currency_code
: This parameter is used to specify the currency in which the user wants to view the real-world value of their DNR balance. Standard currency abbreviations are used (e.g., 'USD', 'EUR', 'BTC').- If a currency code is not provided or is invalid, USD is used by default.
currency_symbol
: This parameter represents the symbol of the currency (e.g., '$', '€', ect...)
-
This function now integrates with the new
get_price_info
function to retrieve the current price of DNR in the specified currency. This price is then used to calculate the real-world value of user balances. -
Improved Balance Information:
- Now shows the price of the DNR and the equivalent value of user balances in the specified currency.
- For JSON outputs, changes have been made to accommodate the aforementioned features.
- Balance data now includes additional fields like:
{currency}_value
,exchange_rate
,total_balance
, andtotal_{currency}_value
.
- Balance data now includes additional fields like:
-
-
is_valid_currency_code
Function (New):-
This function checks if the user provided currency code exists in a pre-defined list of 161 international fiat and top 100 cryptocurrencies.
-
If the currency code is valid, it returns
True
along with the currency's symbol. This symbol is used to represent the currency in the price and balance information, ensuring readability and user familiarity. -
When an unrecognized currency code is provided, the function outputs a message indicating the invalidity and defaults to USD. It then returns
False
and the symbol for USD ($
). This behavior allows the application to continue operations with a standard currency (USD) in case of invalid user input.
-
-
get_price_info
Function (New):-
This function is responsible for fetching the current price of DNR in USD and converting it to a specified fiat or cryptocurrency.
-
Initially, it requests the price of DNR in USD from the CoinMarketCap API and implements a fallback mechanism using a secondary URL in case of primary API failure.
-
If the requested
currency_code
is 'USD' (the default option), the function immediately returns the USD price. -
When the requested
currency_code
is not 'USD':- For fiat currencies, it queries the Open Exchange Rate API to obtain exchange rates for fiat currencies against USD. It then calculates and returns the price of DNR in the specified fiat currency.
- For cryptocurrencies, it queries the Coincap API to obtain cryptocurrency exchange rates in USD. It then calculates and returns the price of DNR in the specified cryptocurrency.
-
If all API requests fail then the price of DNR will return 0.
-
-
-
-
Paper Wallet Support:
-
The wallet client now includes support for paper wallet generation, providing a secure and physical way to store Denaro. This release introduces two key components: a new module
paper_wallet_util.py
and a new functiongeneratePaperWallet
inwallet_client.py
. The technical details and file storage mechanism of these new additions are outlined below.Technical Details:
-
Introduced a new
paper_wallet_util.py
module has been added to facilitate the creation of Denaro paper wallets. The module includes aPaperWalletGenerator
class with two methods:generate_qr_code
: Generates a QR code for a given data string. Utilizes the qrcode library to create QR codes with specific properties such as error correction level and box size.overlay_qr_code
: Overlays the generated QR codes for the private key and public address onto a predefined paper wallet template. It includes image manipulation such as resizing QR codes, converting images to RGBA format, drawing scaled and rotated text for private key and address, and pasting QR codes at specified positions on the paper wallet template.
-
The front and back images used for the paper wallet template are located in the
./denaro/wallet/
directory. -
Introduced a new
generatePaperWallet
function towallet_client.py
. This function orchestrates the paper wallet generation process. It's primary operations are listed below:-
Retrieves address and private key data using the new
get_address_and_private_key
function. -
Uses the
paper_wallet_util.py
module which processes address and private key data to generate the corresponding QR codes, and final paper wallet image. -
Includes directory and file existence checks, and creates the necessary file paths for paper wallets.
- See Paper Wallet Storage more details.
-
Depending on the
file_type
parameter, the function will create either a single PNG image for the front side of a paper wallet, or a PDF file which includes the front of the paper wallet on the first page and the back design on the second page. -
For PDF files, it processes images for transparency, scales them to fit the letter page size, and organizes the layout for front and back pages.
-
Implements secure deletion of local variables and error handling to maintain data security and integrity throughout the process.
-
Ensures temporary file clean-up and proper saving of the final output, with console notifications about the wallet generation status.
-
-
-
-
Paper Wallet Storage:
-
The
generatePaperWallet
function features an organized mechanism for managing the storage and naming of generated paper wallets. This mechanism ensures that paper wallets are not only stored in an orderly manner but also named in a way that makes them easily identifiable and accessible. Detailed below is how the storage mechanism operates:-
When Specifying an Address from a Wallet File:
- Directory Creation:
- A dedicated directory is created in
./wallets/paper_wallets
. This directory is named after the wallet file (./wallets/paper_wallets/[WALLET NAME]
). This dedicated directory segregates paper wallets based on their corresponding wallet files.
- A dedicated directory is created in
- File Naming Convention:
- Generated paper wallet files are distinctly named according to the specified address.
- PNG files are name as:
[ADDRESS]_paper_wallet_front.png
- PDF files as
[ADDRESS]_paper_wallet.pdf.
- PNG files are name as:
- Generated paper wallet files are distinctly named according to the specified address.
- Directory Creation:
-
When Only a Private Key is Specified:
- Centralized Storage:
- In this scenario, the paper wallet is directly stored in the
./wallets/paper_wallets
directory, simplifying the storage process when no wallet file is involved.
- In this scenario, the paper wallet is directly stored in the
- Consistent Naming Scheme:
- The naming convention for paper wallets generated from a private key mirrors the approach used for wallet file addresses. However, the [ADDRESS] in the file names is is derived directly from the provided private key, maintaining consistency across both scenarios.
- Centralized Storage:
-
-
Installation:
For detailed installation procedures, CLI usage, and example commands, refer to the README.md file in the main repository.
Feedback:
Testing and feedback are invaluable for the ongoing development of this project. Users are encouraged to report any issues, bugs, or provide feedback for improvement.