MCPcopy
hub / github.com/petertodd/python-bitcoinlib / to_scriptPubKey

Function to_scriptPubKey

bitcoin/tests/test_bech32.py:28–30  ·  view source on GitHub ↗

Decoded bech32 address to script

(witver, witprog)

Source from the content-addressed store, hash-verified

26 yield testcase
27
28def to_scriptPubKey(witver, witprog):
29 """Decoded bech32 address to script"""
30 return CScript([witver]) + CScript(bytes(witprog))
31
32class Test_bech32(unittest.TestCase):
33

Callers 1

test_encode_decodeMethod · 0.85

Calls 1

CScriptClass · 0.90

Tested by

no test coverage detected