Proposal: Extended serialization format for BIP-32 wallets



Summary:

In a discussion on the bitcoin-dev mailing list, Pavol Rusnak suggested adding another byte field called OutputType for wallets that do not follow BIP43. The proposed field would have three options: P2PKH output type, P2WPKH-in-P2SH output type, and native Segwit output type. However, Thomas Voegtlin pointed out that this value should be user visible, as it is in his initial proposal that uses version bytes. An extra byte field and base58 or bech32 encoding would make the value not user visible anymore. Voegtlin argued that the flag for segwit xpub/xprv in Electrum should be user visible to ensure all cosigners agree on the script type used to derive addresses. If users need to manipulate master keys, it is better to let them see what they are doing. However, if there are no plans to expose users to these keys, a serialization format may not be necessary.


Updated on: 2023-06-12T18:16:55.140221+00:00