[#ChainCode] = ChainCode :mrdocs: A BIP32 chain code. Cleansed on destruction. == Synopsis Declared in `<hash.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ChainCode : public xref:base_blob-09.adoc[base_blob<256>] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:base_blob-09.adoc[base_blob<256>]` | Template base class for fixed‐sized opaque blobs. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:ChainCode/2constructor-03.adoc[`ChainCode`] [.small]#[constructor]# | Constructors | xref:ChainCode/2destructor.adoc[`~ChainCode`] [.small]#[destructor]# | Destroys the chain code, securely wiping its bytes from memory. | xref:ChainCode/GetHex.adoc[`GetHex`] | The hex representation used by GetHex(), ToString(), and FromHex() is unusual, since it shows bytes of the base_blob in reverse order. For example, a 4‐byte blob {0x12, 0x34, 0x56, 0x78} is represented as "78563412" instead of the more typical "12345678" representation that would be shown in a hex editor or used by typical byte‐array / hex conversion functions like python's bytes.hex() and bytes.fromhex(). | xref:ChainCode/GetUint64.adoc[`GetUint64`] | Reads a 64‐bit little‐endian word from the blob at a byte offset. | xref:ChainCode/IsNull.adoc[`IsNull`] | Returns true if every byte of the blob is zero. | xref:ChainCode/Serialize.adoc[`Serialize`] | Serializes the blob's raw bytes to a stream. | xref:ChainCode/SetNull.adoc[`SetNull`] | Sets every byte of the blob to zero. | xref:ChainCode/ToString.adoc[`ToString`] | Returns the blob as a hex string in reverse byte order. | xref:ChainCode/Unserialize.adoc[`Unserialize`] | Deserializes the blob's raw bytes from a stream. | xref:ChainCode/begin-05.adoc[`begin`] | Returns a pointer to the first byte of the blob. | xref:ChainCode/data-04.adoc[`data`] | Returns a pointer to the blob's raw bytes. | xref:ChainCode/end-08.adoc[`end`] | Returns a pointer just past the last byte of the blob. | xref:ChainCode/operator_eq.adoc[`operator==`] | Compares two blobs for byte‐wise equality. | xref:ChainCode/operator_3way.adoc[`operator<=>`] | Lexicographic ordering |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:ChainCode/size.adoc[`size`] | Returns the size of the blob in bytes. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:ChainCode/m_data.adoc[`m_data`] | Fixed‐size byte storage holding the blob's raw bytes. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BIP32Hash.adoc[`BIP32Hash`] | Computes the BIP32 child key derivation hash. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#