user127454: {
  "xpub": "tpub-big-long-key-that-starts-with-tpub",
  "index": 1,
  "freshAddressPath": "84'/1'/1'/0/0",
  "id": "libcore:1:bitcoin_testnet:tpub-big-long-key-that-starts-with-tpub:native_segwit",
  "blockHeight": 2097540
}

When I copy the "xPub" from a Ledger Nano S Bitcoin Testnet wallet I find exactly this (key obviously obfuscated). I'm confused because in my novice research my understanding is that the derivation path 84'/1'/1'/0/0 is for zpub keys and segwit wallets. Indeed, my wallets in my ledger are labeled "segwit". But here the extended key is labeled "xpub" and the key starts with "xpub", or in the case of the Bitcoin Testnet, it starts with a "tpub". Why?
Can somebody explain to me why this seems mixed up? Is this key an xpub or a zpub? Is a tpub and an xpub the same thing? Should I use Bip32, Bip44 or Bip84 to derive child keys (and thus addresses) that will match my ledger nano?
I have found a clever python class that will convert xpub to zpub. Is this the correct thing to do in this case?
https://gist.github.com/jleo84/97fc58c6174f146642b2c215c20f88f5
Thanks in advance! This is my very first question (don't worry, I have more) on this Stack Exchange and I really appreciate any support or advice I can get.

user48884: BIP 32 specifies a serialization format for extended public keys. This format has the prefix xpub and is generic for all public keys that can be used with BIP 32, regardless of the address type or the derivation path.
BIP 84 added an additional serialization which results in the prefix zpub to indicate that keys derived from that extended public key should only be used in native segwit addresses.
It is correct for a wallet to output xpubs for keys used in segwit addresses. It is also correct for a wallet to output zpubs for the same keys. It just depends on the implementation. The serialization is only used for some metadata to the wallet, the derived keys will all be the same. In order to get the same addresses, you need a wallet which will derive the keys and use them in the address type that you are expecting.

tpub is a prefix used for extended public keys that were created in a testnet wallet.

127454: <pre><code>{
  &quot;xpub&quot;: &quot;tpub-big-long-key-that-starts-with-tpub&quot;,
  &quot;index&quot;: 1,
  &quot;freshAddressPath&quot;: &quot;84'/1'/1'/0/0&quot;,
  &quot;id&quot;: &quot;libcore:1:bitcoin_testnet:tpub-big-long-key-that-starts-with-tpub:native_segwit&quot;,
  &quot;blockHeight&quot;: 2097540
}
</code></pre>
<p>When I copy the &quot;xPub&quot; from a Ledger Nano S Bitcoin Testnet wallet I find exactly this (key obviously obfuscated). I'm confused because in my novice research my understanding is that the derivation path 84'/1'/1'/0/0 is for zpub keys and segwit wallets. Indeed, my wallets in my ledger are labeled &quot;segwit&quot;. But here the extended key is labeled &quot;xpub&quot; and the key starts with &quot;xpub&quot;, or in the case of the Bitcoin Testnet, it starts with a &quot;tpub&quot;. Why?</p>
<p>Can somebody explain to me why this seems mixed up? Is this key an xpub or a zpub? Is a tpub and an xpub the same thing? Should I use Bip32, Bip44 or Bip84 to derive child keys (and thus addresses) that will match my ledger nano?</p>
<p>I have found a clever python class that will convert xpub to zpub. Is this the correct thing to do in this case?</p>
<p><a href="https://gist.github.com/jleo84/97fc58c6174f146642b2c215c20f88f5" rel="nofollow noreferrer">https://gist.github.com/jleo84/97fc58c6174f146642b2c215c20f88f5</a></p>
<p>Thanks in advance! This is my very first question (don't worry, I have more) on this Stack Exchange and I really appreciate any support or advice I can get.</p>
 48884: <p>BIP 32 specifies a serialization format for extended public keys. This format has the prefix <code>xpub</code> and is generic for all public keys that can be used with BIP 32, regardless of the address type or the derivation path.</p>
<p>BIP 84 added an additional serialization which results in the prefix <code>zpub</code> to indicate that keys derived from that extended public key should only be used in native segwit addresses.</p>
<p>It is correct for a wallet to output xpubs for keys used in segwit addresses. It is also correct for a wallet to output zpubs for the same keys. It just depends on the implementation. The serialization is only used for some metadata to the wallet, the derived keys will all be the same. In order to get the same addresses, you need a wallet which will derive the keys and use them in the address type that you are expecting.</p>
<hr />
<p><code>tpub</code> is a prefix used for extended public keys that were created in a testnet wallet.</p>
