MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetKeyIDs

Method GetKeyIDs

src/pubkey.cpp:183–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183std::vector<CKeyID> XOnlyPubKey::GetKeyIDs() const
184{
185 std::vector<CKeyID> out;
186 // For now, use the old full pubkey-based key derivation logic. As it is indexed by
187 // Hash160(full pubkey), we need to return both a version prefixed with 0x02, and one
188 // with 0x03.
189 unsigned char b[33] = {0x02};
190 std::copy(m_keydata.begin(), m_keydata.end(), b + 1);
191 CPubKey fullpubkey;
192 fullpubkey.Set(b, b + 33);
193 out.push_back(fullpubkey.GetID());
194 b[0] = 0x03;
195 fullpubkey.Set(b, b + 33);
196 out.push_back(fullpubkey.GetID());
197 return out;
198}
199
200bool XOnlyPubKey::IsFullyValid() const
201{

Callers 4

ToPrivateStringMethod · 0.80
GetKeyByXOnlyMethod · 0.80
GetPubKeyByXOnlyMethod · 0.80
GetKeyOriginByXOnlyMethod · 0.80

Calls 5

beginMethod · 0.45
endMethod · 0.45
SetMethod · 0.45
push_backMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected