<p>The zpub you get from electrum will be at that path itself (m/84'/0'/0'). It's not at m. You can't derive hardened paths from a zpub anyway. If you create a watch only wallet using the zpub electrum will treat it as m and derive public keys and addresses at m/j/i where j is 0 for external (receive) and 1 for change addresses and i is the index. In actuality the addresses will be at m/84'/0'/0'/j/i.</p>

CC BY-SA 4.0
2020-09-07T14:49:30.330Z
2020-09-07T14:49:30.330Z
Abdussamad
<p>It all depends on the wallet. There is no rule saying they should even accept these strings or know what they correspond to and there is no consensus among wallets.<br />
Wallet A could accept zpub and know the desired path and script type while wallet B may accept the same zpub, ignore its version byte and use the default derivation path and a completely different script type while wallet C could simply reject the string because of &quot;unexpected&quot; starting character (z).</p>
<p>With that said most of the times wallets perform similarly as long as there is a BIP somewhere defining the algorithms.</p>

CC BY-SA 4.0
2020-09-07T07:13:06.980Z
2020-09-07T07:13:06.980Z
Coding Enthusiast
<p>When importing an zpub, for example, to a wallet, does the wallet understand it should recreate a set of addresses using the derivation path &quot;m/84'/0'/0'&quot; and the script type &quot;p2wpkh&quot; ?</p>
<p>So if I generate an zpub with correct script type but choose an arbitrary path like  &quot;m/77'/0'/0'&quot;, would it be conceptually wrong and can cause problems when exporting to other wallets ?</p>
<p>I am just trying to understanding if the concept of version bytes / prefixes in extended public keys are also path-dependent or can change just according script type.</p>
<p>The <a href="https://github.com/satoshilabs/slips/blob/master/slip-0132.md" rel="nofollow noreferrer">SLIP 0132</a> mentions the path for some prefixes.
But the <a href="https://electrum.readthedocs.io/en/latest/xpub_version_bytes.html" rel="nofollow noreferrer">Electrum Docs</a> don't.</p>

<bip32-hd-wallets><address-generation><xpub>
Public Keys Prefixes and Derivation Paths
le0
# Public Keys Prefixes and Derivation Paths

(Asked by: username_0 on 2020-09-04)

When importing an zpub, for example, to a wallet, does the wallet understand it should recreate a set of addresses using the derivation path "m/84'/0'/0'" and the script type "p2wpkh" ?

So if I generate an zpub with correct script type but choose an arbitrary path like "m/77'/0'/0'", would it be conceptually wrong and can cause problems when exporting to other wallets ?

I am just trying to understanding if the concept of version bytes / prefixes in extended public keys are also path-dependent or can change just according script type.

The [SLIP 0132](https://github.com/satoshilabs/slips/blob/master/slip-0132.md) mentions the path for some prefixes.
But the [Electrum Docs](https://electrum.readthedocs.io/en/latest/xpub_version_bytes.html) don't.

**Tags:** bip32-hd-wallets, address-generation, xpub


---

## 2 answers

### Answer by username_1 on 2020-09-07. Score: 1 | Accepted answer

The zpub you get from electrum will be at that path itself (m/84'/0'/0'). It's not at m. You can't derive hardened paths from a zpub anyway. If you create a watch only wallet using the zpub electrum will treat it as m and derive public keys and addresses at m/j/i where j is 0 for external (receive) and 1 for change addresses and i is the index. In actuality the addresses will be at m/84'/0'/0'/j/i.


---

### Answer by username_2 on 2020-09-07. Score: 2

It all depends on the wallet. There is no rule saying they should even accept these strings or know what they correspond to and there is no consensus among wallets.  
Wallet A could accept zpub and know the desired path and script type while wallet B may accept the same zpub, ignore its version byte and use the default derivation path and a completely different script type while wallet C could simply reject the string because of "unexpected" starting character (z).

With that said most of the times wallets perform similarly as long as there is a BIP somewhere defining the algorithms.


---

