MCPcopy Create free account
hub / github.com/ElementsProject/elements / check_key

Function check_key

test/functional/test_framework/address.py:146–151  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

144 return script_to_p2sh(p2shscript, main)
145
146def check_key(key):
147 if (type(key) is str):
148 key = bytes.fromhex(key) # Assuming this is hex string
149 if (type(key) is bytes and (len(key) == 33 or len(key) == 65)):
150 return key
151 assert False
152
153def check_script(script):
154 if (type(script) is str):

Callers 3

key_to_p2pkhFunction · 0.70
key_to_p2sh_p2wpkhFunction · 0.70
key_to_p2wpkhFunction · 0.70

Calls 1

typeClass · 0.50

Tested by

no test coverage detected