Methods
-
<inner> decode(bechString)
-
Decode bech32 formatted data
Parameters:
Name Type Description bechStringstring bech32 encoded string -
<inner> encode(hrp, data)
-
Encode data in bech32 format
Parameters:
Name Type Description hrpBech32hrp Human Readable Part of bech32 string dataArray.<binary> Data part of the bech32 string -
<inner> setConstant(value)
-
Modify the constant used in the checksum. This was initially set to '1' but was changed to the current default of 0x3FFFFFFF as a result of the study by Pieter Wuille https://gist.github.com/sipa/a9845b37c1b298a7301c33a04090b2eb Here we provide a method to modify the value back to '1'.
Parameters:
Name Type Description value1 | 0x3FFFFFFF the constant to be used in generating checksum