bech32
bech32 copied to clipboard
Code snippets and analysis of the Bech32 format
Hello, I am using the Harmony ONE address to bech32 format, can you provide the Java or kotlin version of the code?
This also includes a slightly refactored version of PR https://github.com/sipa/bech32/pull/41.
Test cases were copied from Python's.
The main reason to refactor was the `Maybe` in a signature. It is not clear why the given bech32 string is invalid.
Also add support for "bcrt" HRP
kept same API, but added a less-opinionated interface, that will allow caller to detect bech32m/not, incorrect HRP and report details to users
@@ -24,7 +24,7 @@ namespace { ("1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s") typedef std::vector data; /** Convert from one power-of-2 number base to another. */ @@ -55,7 +55,7 @@ bool convertbits(data& out, const data& in)...
Dear all, I'm working on a C implementation of [age](https://github.com/FiloSottile/age) and I need access to the internal `convert_bits` function which is declared static. This pr enables that. Happy new year,...
A drop-in java implementation of Bech32 decoding algorithm for Segwit addresses, based entirely on the Java Standard library.