fortesp / bitcoinaddress

Bitcoin Wallet Address Generator
https://pypi.org/project/bitcoinaddress/
MIT License
144 stars 51 forks source link

Why doesn't this work on Private Key WIF compressed ? #21

Open demining opened 2 years ago

demining commented 2 years ago

I get an error. What am I doing wrong?

from bitcoinaddress import Wallet

priv = "KwLdv6T2jmhQbswnYrcL9KZHerTpVyjozp1JNjfP5QuD3GchCwCc"

wallet = Wallet(priv)
print(wallet)
mrx23dot commented 2 years ago

same on print(Wallet('KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn'))

File "C:\Python37\lib\site-packages\bitcoinaddress\address.py", line 93, in generate self.key.generate() AttributeError: 'Key' object has no attribute 'generate

bitcoinaddress==0.1.5

damascene commented 1 year ago

Getting the same, seems it only accepts non compressed WIF. Maybe it's possible to do the conversion using the library or some of it's dependencies @fortesp ?