Builds on top of #11117.
This adds support for:
- Creating BIP173 addresses for testing (through
addwitnessaddress
, though by default it still produces P2SH versions) - Sending to BIP173 addresses (including non-v0 ones)
- Analysing BIP173 addresses (through
validateaddress
)
It includes a reformatted version of the C++ Bech32 reference code and an independent implementation of the address encoding/decoding logic (integrated with CTxDestination). All BIP173 test vectors are included.
Not included (and intended for other PRs):
- Full wallet support for SegWit (which would include automatically adding witness scripts to the wallet during automatic keypool topup, SegWit change outputs, …) [see #11403]
- Splitting base58.cpp and tests/base58_tests.cpp up into base58-specific code, and “address encoding”-code [see #11372]
- Error locating in UI for BIP173 addresses.