Skip to content

Remove problematic base58 module

A french user reported this:

Avec la dernière version de duniterpy (0.62.0), same avec python 3.8 et 3.9:

AttributeError: module 'duniterpy.key.base58' has no attribute 'b58decode'

Résolu par:

pubkey_byte = base58.Base58Encoder.decode(str.encode(pubkey))
hash = hashlib.sha256(hashlib.sha256(pubkey_byte).digest()).digest()
return base58.Base58Encoder.encode(hash)[:3]

DuniterPy’s base58 module only checks data types. So, not really useful and overrides base58 module. Should be removed to use base58 module instead.

Edited by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information