0

I have a few questions regarding wallets and BIP44/49/89 standards.

In many places I found that BIP44 is used for traditional addresses (P2PKH) and that the path is m/44'/.... Also, if we want another type of address, say P2WPH, then we use different standard, it this case BIP84 and the path m/84'/..., and so on...

One of the places I found it would be the following answer: link.

Second place: link. Andrew Chow wrote the following:

By this logic, the xprv and xpub prefixes used previously then indicate that legacy addresses should be made. Hence BIP 44 shows xprv.

So I started to think that way too. That is, the type of the address is determined by the standard used. So:

  1. BIP44 - traditional addresses (P2PKH), XPUB (it's defined in BIP32 but used here), m/44'/... derivation path
  2. BIP49 - P2WPKH-nested-in-P2SH, YPUB, m/49'/... derivation path
  3. BIP84 - P2WPH, ZPUB, m/84'/... derivation path

That's what I thought until I looked at golang's implementation of bitcoin wallet. Namely, it says there that it uses only BIP44 standard. Since the given wallet is used (I assume) for all addresses (not just P2PKH, P2WPKH-nested-in-P2SH and P2WPH, but for all as many as there are), I got a bit confused and started to think differently about these standards and how they are used. So I have a two questions.

1. BIP44 is just a derivation path standard, it doesn't decide what type of address you have to generate from it? You can generate any "type" of address you want and that's just how the golang bitcoin wallet works? It uses the BIP44 derivation path, but leaf-level tree keys are used for all address types.

2. Although BIP44 can be used for all addresses (if the answer to the previous question is yes), there are also standards that define other derivation paths such as BIP49 and BIP84 whose purpose is only to separate keys intended for a certain type of address to other derivation paths, nothing but that? But even if, for example, BIP84 says it's for P2WPKH, it's just a derivation path, nothing else. I mean, you can also use P2PKH here (it's weird, but you can) since it's a derivation path? Actually, they just wanted to kind of point out that if you use P2WPKH then a different derivation path is used, but you can still use the BIP44 derivation path?

2
  • Have you tried reading those BIPs? Jul 22, 2023 at 2:18
  • @PieterWuille Hello Pieter. Yes, I have read it, and from what I understand I would say the answers to my questions are YES. In BIP84 it says the following: "This BIP defines the derivation scheme for HD wallets using the P2WPKH (BIP 173) serialization format for segregated witness transactions." and "With the usage of P2WPKH transactions it is necessary to have a common derivation scheme." From that I'd say it's just a derivation path with purpose to separate a certain type of address-P2WPKH, although BIP44 can still be used. However, I'm not sure because of the answers I found on this site.
    – dassd
    Jul 22, 2023 at 8:24

1 Answer 1

0

To answer both of your questions, each BIP is intended for generating a specific address type like 1, 3, and bc1q.

BIPs 44, 49 and 84 define standard derivation paths that all wallets should use for defining P2PKH (and P2SH), P2WPKH-P2SH, and segwit version 0 addresses P2WPKH and P2WSH respectively, and you also might be surprised to know that BIP 86 uses the m/86' prefix for creating Taproot addresses. So the standards weren't exactly designed with extended public keys in mind - in fact, Taproot uses xpub (and presumably Xpub for testnet, although this was not shown in test vectors), and not zpub, or ypub.

Testnet addresses and keys for all these are derived in the manner specified in BIP44.

11
  • First of all, thanks for your reply. But nowhere in BIP44 does it say that this standard is intended for P2PKH, but that it is a standard that only defines the derivation path. Also, since it was wanted to somehow separate the derivation path for P2WPKH addresses, then BIP84 was created that suggests using that path for a given type of address (it doesn't say anything specific about addresses, just "hey if you want P2VPKH use this path"). We can still use BIP44 and that derivation path for all addresses. This is how the golang bitcoin wallet works. So the answer to my questions is YES?
    – dassd
    Jul 22, 2023 at 16:03
  • BIP44 was written at a time when P2PKH was the only reasonable type of address to use for singlesig constructions (P2SH-P2WPKH, P2WPKH and P2TR did not yet exist) so it was probably just not considered at the time it was written. I think these days, BIP44 is typically considered to be P2PKH implicitly. Jul 22, 2023 at 16:09
  • @PieterWuille Yes, I agree, but in the end it's just a standard for the derivation path, even though that path is implicitly considered to be used only for P2PKH. I mean it can be used for any type of address, the golang bitcoin wallet implementation only uses that path. As far as I understand. However I guess in the end it is best to use output descriptors.
    – dassd
    Jul 22, 2023 at 16:47
  • @Filip That's possible. Ultimately, every piece of software chooses what they implement, and if things are unclear, they are up to interpretation. In this case I think the letter of the BIP44 document and what it's commonly interpreted to mean are different, which can be confusing. That's not unique to BIP44 by the way - for example, BIP32 also specified a derivation path for keys which almost nobody uses (BIP44 etc use a different one), and when one says "BIP32", it's not commonly understood to refer to that derivation path. Jul 22, 2023 at 16:49
  • 1
    @Filip By the letter of the BIPs, BIP44 is not specific to any address type, BIP49 is P2SH-P2WPKH, BIP84 is P2WPKH, and BIP86 is single-key P2TR. BIP44 is however commonly understood to be implicitly P2PKH. There is no one answer to what things mean, as technology and context evolves, and so does the understanding. You could be explicit and say "BIP44 derivation paths" if you mean just the derivation path proposed in it and not the rest of the document or what it entails. Jul 22, 2023 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.