moneywagon
moneywagon copied to clipboard
generate_keypair doesn't work for certain cryptos
Here's the error message:
/moneywagon/__init__.py", line 333, in generate_keypair
pub_byte, priv_byte = get_magic_bytes(crypto)
/moneywagon/core.py", line 823, in get_magic_bytes
if priv_byte >= 128:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
This is happening because in core.py
in get_magic_bytes
function,
pub_byte = crypto_data[crypto]['address_version_byte']
priv_byte = crypto_data[crypto]['private_key_prefix']
if priv_byte >= 128:
priv_byte -= 128 #pybitcointools bug
Maybe we need to expand on currency support to accommodate this?
something like:
support_categories = {
'address': ['address_form', 'private_key_form'],
'transaction': [ 'transaction_form', 'transaction_hash_algo', 'script_hash_algo'],
'block': ['header_hash_algo'],
'generate_keypair': ['address_version_byte', 'private_key_prefix'],
}