Skip to main content

Module xpub_compact

Module xpub_compact 

Source
Expand description

73-byte compact xpub form per design/SPEC_mk_v0_1.md §3.6 (closure Q-7).

Drops xpub.depth and xpub.child_number from the wire (both reconstructible from origin_path); preserves xpub.version, xpub.parent_fingerprint, xpub.chain_code, xpub.public_key.

[version          : 4 B]
[parent_fingerprint: 4 B]
[chain_code       : 32 B]
[public_key       : 33 B]
                    ────
                    73 B

Structs§

XpubCompact
73-byte compact form.

Functions§

decode_xpub_compact
Decode 73 bytes into a compact form.
encode_xpub_compact
Encode a compact form to its 73-byte wire layout.
reconstruct_xpub
Reconstruct a full BIP 32 Xpub from a compact form + the origin path (which provides depth and child_number per Q-7’s reconstruction rule).