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

Function blech32_encode

test/functional/test_framework/liquid_addr.py:39–42  ·  view source on GitHub ↗

Compute a blech32 string given HRP and data values.

(hrp, data)

Source from the content-addressed store, hash-verified

37# ^ 5 ^ 6
38
39def blech32_encode(hrp, data):
40 """Compute a blech32 string given HRP and data values."""
41 combined = data + blech32_create_checksum(hrp, data)
42 return hrp + '1' + ''.join([CHARSET[d] for d in combined])
43
44
45def blech32_decode(bech):

Callers 1

encodeFunction · 0.85

Calls 2

blech32_create_checksumFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected