user98139: 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 mentions the path for some prefixes.
But the Electrum Docs don't.

user5273: 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.

user87716: 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.

98139: <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>
 5273: <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>
 87716: <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>
