satoshilabs / slips

SatoshiLabs Improvement Proposals
Creative Commons Attribution Share Alike 4.0 International
1.5k stars 1.71k forks source link

SLIP Request: Registered version bytes for BIP-32 HD seed serialization #195

Closed clarkmoody closed 6 years ago

clarkmoody commented 6 years ago

As with SLIP-44 (registered coin types) and SLIP-173 (registered human-readable bech32 prefixes), we need some place to catalog BIP-32 version bytes. For Bitcoin mainnet, this is 0x0488B21E which produces the xpub prefix on HD public seeds when Base58 encoded.

Even @prusnak's BIP-84 fails to document the version bytes needed to reach zpub in the HD serialization. I did find a post on the mailing list proposing the xpub, ypub, zpub version bytes, but I don't think this is recorded anywhere else except the source code of wallets. (Please correct me if I'm wrong on this count)

The issue I've found is that multiple values of the version bytes will produce the same ASCII prefix when Base58 encoded. It would be nice to maintain a registry of those version bytes here.

As a side note: I'm hopeful that the adoption of SLIP-32 encoding of HD seeds will make this request redundant, but I don't see wallet adoption happening soon.

prusnak commented 6 years ago

It is documented in the Electrum documentation, which is also linked from the post on the mailing list you mention.

http://docs.electrum.org/en/latest/seedphrase.html

As this documentation is Bitcoin-centric, I agree we might start a SLIP for non-Bitcoin coins, but currently, I don't have a capacity to do that.

Clark: would you like to start a document like this and submit it to this repository?

clarkmoody commented 6 years ago

Of course I knew you'd say that :-)

Since we already have SLIP-32, what number should this SLIP be?

prusnak commented 6 years ago

No strong opinion. 33, 132 or any other fitting number you'll come up with.

clarkmoody commented 6 years ago

Closing due to merge of #197