I'm playing around with Testnet4 on Sparrow, trying to understand things.
I created a hot wallet in Sparrow, and I get the public key (usually xpub, but tpub when using Testnet4). I load that into a new wallet in Sparrow, as a watch-only wallet.
That's all fine.
However, if I load that same seed phrase again in a new wallet (another hot software wallet), and change the Script Type from the default of Native Segwit to Legacy, then the public key changes.
That implies to me that when the public key is generated from the private key, the script type is INCORPORATED into it. So the public key contains:
- the public version of private key
- the script type (which changes the way the addresses are generated)
And the private key, in contrast, does NOT contain the script type - it needs to be specified, in addition to the seed phrase, in order to generate the addresses.
And one more thing - it looks like the derivation (which you have to turn on in the Preferences menu in order to change, in Sparrow), is similar to script type. If you change it, the public key changes.
Is this correct?
OP_CHECKSIG
means that to spend this output, you need to provide a signature from the corresponding private key.scriptPubkey
.