Changeset View
Changeset View
Standalone View
Standalone View
src/pubkey.h
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | struct CExtPubKey { | ||||
friend bool operator==(const CExtPubKey &a, const CExtPubKey &b) { | friend bool operator==(const CExtPubKey &a, const CExtPubKey &b) { | ||||
return a.nDepth == b.nDepth && | return a.nDepth == b.nDepth && | ||||
memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], | memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], | ||||
sizeof(vchFingerprint)) == 0 && | sizeof(vchFingerprint)) == 0 && | ||||
a.nChild == b.nChild && a.chaincode == b.chaincode && | a.nChild == b.nChild && a.chaincode == b.chaincode && | ||||
a.pubkey == b.pubkey; | a.pubkey == b.pubkey; | ||||
} | } | ||||
friend bool operator!=(const CExtPubKey &a, const CExtPubKey &b) { | |||||
return !(a == b); | |||||
} | |||||
void Encode(uint8_t code[BIP32_EXTKEY_SIZE]) const; | void Encode(uint8_t code[BIP32_EXTKEY_SIZE]) const; | ||||
void Decode(const uint8_t code[BIP32_EXTKEY_SIZE]); | void Decode(const uint8_t code[BIP32_EXTKEY_SIZE]); | ||||
bool Derive(CExtPubKey &out, unsigned int nChild) const; | bool Derive(CExtPubKey &out, unsigned int nChild) const; | ||||
CExtPubKey() = default; | CExtPubKey() = default; | ||||
}; | }; | ||||
/** | /** | ||||
Show All 12 Lines |