vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 857 forks source link

How to validate bip32 xpub keys and bitcoin addresses? #92

Closed derrend closed 9 years ago

derrend commented 9 years ago

I hope I'm in the right place, as the title suggests I'm looking for a way to check if a string is either a valid bip32 pub key or a valid btc address.

Having a hard time finding a python function that achieves this, is this possible with this library and if so please could you give me a hint ;)

Thank you

derrend commented 9 years ago

Not to worry, I got it working using pycoin from Richard Kiss.

wizardofozzie commented 9 years ago

Did you ask the same question on Bitcoin SE?

derrend commented 9 years ago

Yes and I did get an answer but I ended up using pycoin https://bitcoin.stackexchange.com/questions/37310/how-can-i-check-if-a-bip32-xpub-key-is-valid-using-python/37313#37313