Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/jimmysong/programmingbitcoin
/ p2sh_script
Function
p2sh_script
code-ch13/script.py:29–31 ·
view source on GitHub ↗
Takes a hash160 and returns the p2sh ScriptPubKey
(h160)
Source
from the content-addressed store, hash-verified
27
28
29
def
p2sh_script(h160):
30
''
'Takes a hash160 and returns the p2sh ScriptPubKey'
''
31
return
Script([0xa9, h160, 0x87])
32
33
34
# tag::source1[]
Callers
1
test_address
Method · 0.70
Calls
1
Script
Class · 0.70
Tested by
1
test_address
Method · 0.56