vbuterin / pybitcointools

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

Make script_to_address method work with dogecoin p2sh #107

Closed mflaxman closed 8 years ago

mflaxman commented 8 years ago

This seems to work now:

In [1]: from bitcoin.transaction import script_to_address

In [2]: script_to_address('a91467dbc5109dec5bf662df10378e91100cf3beeacb87', vbyte=22)
Out[2]: 'A1uRY29cvTYMTMruifFQ7EwN34iGDDpe7X'

In [3]: script_to_address('a914c56c24b77644fc44198eb3e2fee9bd276a13ed6c87', vbyte=5)
Out[3]: '3KgtbGgaX2ngstNpvyv7LwpHSweVeqGbpM'

In [4]: script_to_address('a914e32b88faeb7ce3e5d56d279ca7fac2ff47181bb587', vbyte=5)
Out[4]: '3NQBTxcD8jCQn4sSrs44NqF3q3htFMCgBf'

Fixes https://github.com/vbuterin/pybitcointools/issues/106