When studying this I think I recall an instance where we realized that WIF encoding is needed for segwit addresses, and, there is a BIP that suggests how to do that, and that is BIP 178, https://github.com/bitcoin/bips/blob/master/bip-0178.mediawiki . Does LibBitcoin want to support it?