This replaces the address encoding/decoding of Bitcoin Cash. The new format is intentionally incompatible with Bitcoin. The motivation for being incompatible is to prevent loss of funds.
Changing address format is disruptive, thus when we first do change, we should use the opportunity to improve on the format. Amongst other benefits, bech32 is a more human friendly format in regards of characters used and error detection.
Example address for mainnet:
This is a work in progress. Notably missing are tests.
Based of work by sipa in https://github.com/bitcoin/bitcoin/pull/11167
Depends on D540