From 7368f20605716b643a4f0420a2db28794580793a Mon Sep 17 00:00:00 2001 From: joeuhren Date: Sun, 10 Mar 2019 13:38:30 -0700 Subject: [PATCH] error validation + readme updated re: valid characters --- README.md | 3 +++ unspendable.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5efd475..93d1055 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,7 @@ Decimal Address Prefix: 0 The first argument of **1** is the address prefix for the Bitcoin network. The 2nd argument of **BurnAddress** is the vanity keyword to insert. +**NOTE:** Only certain alphanumeric characters are valid for the address prefix and vanity keyword. The list of valid characters are: **123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz** + The actual address is **1BurnAddressXXXXXXXXXXXXXXXXV7cPS6** and as an added check, the decimal address prefix of **0** is also displayed to eliminate guessing. The decimal address prefix must match the 2nd bit in the **PUBKEY_ADDRESS** of the coin's source code or else the address will not be valid. [Click here to view the PUBKEY_ADDRESS for Bitcoin's mainnet](https://github.com/bitcoin/bitcoin/blob/257f750cd986641afe04316ed0b22b646b56b60b/src/chainparams.cpp#L132). If you are not able to generate a valid address for your network it is most likely because the decimal address prefix doesn't match. You may have to change the vanity keyword to something that starts with a different number or letter to find one that matches your network's decimal address prefix. [Click here for more information about how the address prefixes work](https://en.bitcoin.it/wiki/List_of_address_prefixes). + diff --git a/unspendable.py b/unspendable.py index 00ee0eb..612633a 100755 --- a/unspendable.py +++ b/unspendable.py @@ -112,7 +112,7 @@ def generate (prefix_string, vanity_keyword, prefix_bytes): break if valid == False: # Invalid character found - print("Error: The address prefix must only contain numers or letters.") + print("Error: Invalid characters detected in the address prefix. Valid characters are: " + b58_digits) cont = False break if cont == True: @@ -126,7 +126,7 @@ def generate (prefix_string, vanity_keyword, prefix_bytes): break if valid == False: # Invalid character found - print("Error: The vanity keyword must only contain numers or letters.") + print("Error: Invalid characters detected in the vanity keyword. Valid characters are: " + b58_digits) cont = False break if cont == True: