I was under the impression that an extended public key was comprised of the public key + chain code, and I'm unfamiliar with what comprises the extended private key.
However this does not seem to be the case. As per pywallet:
The key consists of
* 4 byte version bytes (network key)
* 1 byte depth:
- 0x00 for master nodes,
- 0x01 for level-1 descendants, ....
* 4 byte fingerprint of the parent's key (0x00000000 if master key)
* 4 byte child number. This is the number i in x_i = x_{par}/i,
with x_i the key being serialized. This is encoded in MSB order.
(0x00000000 if master key)
* 32 bytes: the chain code
* 33 bytes: the public key or private key data
(0x02 + X or 0x03 + X for public keys, 0x00 + k for private keys)
(Note that this also supports 0x04 + X + Y uncompressed points,
but this is totally non-standard and this library won't even
generate such data.)
It isn't so straight forward as publickey + chaincode. Can someone deconstruct an extended key from beginning to end? According to the amazing iancoleman website the network has an effect on this as well, which doesn't make sense to me either but clearly (as shown above) it is a part of this formula.