[#CExtPubKey]
= CExtPubKey
:mrdocs:

A BIP32 extended public key&colon; a public key plus the chain code and metadata needed for derivation&period;

== Synopsis

Declared in `&lt;pubkey&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct CExtPubKey;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CExtPubKey/Decode.adoc[`Decode`] 
| Deserialize this extended public key from the BIP32 byte encoding (without version)&period;
| xref:CExtPubKey/DecodeWithVersion.adoc[`DecodeWithVersion`] 
| Deserialize this extended public key from the BIP32 byte encoding including the version prefix&period;
| xref:CExtPubKey/Derive.adoc[`Derive`] 
| Derive a BIP32 child extended public key&period;
| xref:CExtPubKey/Encode.adoc[`Encode`] 
| Serialize this extended public key into the BIP32 byte encoding (without version)&period;
| xref:CExtPubKey/EncodeWithVersion.adoc[`EncodeWithVersion`] 
| Serialize this extended public key into the BIP32 byte encoding including the version prefix&period;
| xref:CExtPubKey/id_key_fingerprint.adoc[`id&lowbar;key&lowbar;fingerprint`] 
| Compute the fingerprint of this key&apos;s own public key&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CExtPubKey/chaincode.adoc[`chaincode`] 
| Chain code accompanying the public key&period;
| xref:CExtPubKey/fingerprint.adoc[`fingerprint`] 
| Fingerprint of the parent key&period;
| xref:CExtPubKey/nChild.adoc[`nChild`] 
| Child index used to derive this key from its parent&period;
| xref:CExtPubKey/nDepth.adoc[`nDepth`] 
| Depth of this key in the BIP32 derivation tree&period;
| xref:CExtPubKey/pubkey.adoc[`pubkey`] 
| The extended public key material&period;
| xref:CExtPubKey/version.adoc[`version`] 
| Version bytes prefixed to the serialized extended key&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:operator_lt-0e.adoc[operator&lt;]`
| Order two extended public keys by public key, then by chain code&period;
| `xref:operator_eq-012.adoc[operator&equals;&equals;]`
| Compare two extended public keys for equality of all fields (excluding version)&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CreateMuSig2SyntheticXpub.adoc[`CreateMuSig2SyntheticXpub`]
| Construct the BIP 328 synthetic xpub for a pubkey
| xref:DecodeExtPubKey.adoc[`DecodeExtPubKey`]
| Decode a Base58Check&hyphen;encoded extended public key&period;
| xref:EncodeExtPubKey.adoc[`EncodeExtPubKey`]
| Encode an extended public key in Base58Check format&period;
| xref:wallet/GenerateWalletDescriptor.adoc[`wallet&colon;&colon;GenerateWalletDescriptor`]
| Builds a new wallet descriptor for the given key and output type&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
