MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / encode

Function encode

test/functional/test_framework/segwit_addr.py:102–107  ·  view source on GitHub ↗

Encode a segwit address.

(hrp, witver, witprog)

Source from the content-addressed store, hash-verified

100
101
102def encode(hrp, witver, witprog):
103 """Encode a segwit address."""
104 ret = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5))
105 if decode(hrp, ret) == (None, None):
106 return None
107 return ret

Callers 2

calc_sha256Method · 0.85
calc_sha256Method · 0.85

Calls 3

bech32_encodeFunction · 0.85
convertbitsFunction · 0.85
decodeFunction · 0.85

Tested by

no test coverage detected