MCPcopy Create free account
hub / github.com/ElementsProject/lightning / p2wsh

Function p2wsh

tests/test_opening.py:137–139  ·  view source on GitHub ↗

version-0 P2WSH scriptPubKey: OP_0 .

(wscript)

Source from the content-addressed store, hash-verified

135
136
137def p2wsh(wscript):
138 """version-0 P2WSH scriptPubKey: OP_0 <SHA256(wscript)>."""
139 return bytes([0x00, 0x20]) + _sha256(wscript)
140
141
142@unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need')

Calls 1

_sha256Function · 0.85

Tested by

no test coverage detected