def address_to_key_hash(s):
""" Given a Bitcoin address decodes the version and
RIPEMD-160 hash of the public key.
Args:
s (bytes): The Bitcoin address to decode
Returns:
(version, h160) (tuple): A tuple containing the version and
RIPEMD-160 hash of the public key.
"""
n = base58.b58decode_check(s)
version = n[0]
h160 = n[1:]
return version, h160
评论列表
文章目录