This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sig verification in using the message hash function as `sha256(sha256('Bitcoin Signed Message:\n' + message))` | |
| import hashlib | |
| import base58 | |
| from ecdsa.curves import SECP256k1 | |
| from ecdsa import VerifyingKey, util | |
| def hash160(data: bytes) -> bytes: | |
| """Perform SHA256 followed by RIPEMD160""" | |
| sha = hashlib.sha256(data).digest() | |
| ripe = hashlib.new('ripemd160', sha).digest() |

