fix issue #2064
This commit is contained in:
@@ -384,6 +384,15 @@ def is_address(addr):
|
||||
return False
|
||||
return addr == hash_160_to_bc_address(h, addrtype)
|
||||
|
||||
def is_p2pkh(addr):
|
||||
if is_address(addr):
|
||||
addrtype, h = bc_address_to_hash_160(addr)
|
||||
return addrtype in [0]
|
||||
|
||||
def is_p2sh(addr):
|
||||
if is_address(addr):
|
||||
addrtype, h = bc_address_to_hash_160(addr)
|
||||
return addrtype in [5]
|
||||
|
||||
def is_private_key(key):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user