Ext Key
A BIP32 hierarchical-deterministic extended key.
Mirrors the C++ CExtKey / CExtPubKey structures in libnexa (nexa/src/key.h, nexa/src/pubkey.h): it holds a key together with the metadata (depth, parent fingerprint, child number, and chaincode) needed to derive child keys. A single class represents both the private (CExtKey) and public (CExtPubKey) variants, distinguished by the length of key: 32 bytes is a private key, 33 bytes is a compressed public key. Both variants share the identical 74 byte serialized framing.
Encode/Decode convert to and from the standard 74 byte BIP32 representation (matching CExtKey::Encode / CExtKey::Decode and CExtPubKey::Encode / CExtPubKey::Decode), and the BCHserializable implementation wraps that representation with a compact-size length prefix exactly as the C++ Serialize / Unserialize do.