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

Function HaveKey

src/wallet/rpc/wallet.cpp:22–27  ·  view source on GitHub ↗

Checks if a CKey is in the given CWallet compressed or otherwise*/

Source from the content-addressed store, hash-verified

20namespace wallet {
21/** Checks if a CKey is in the given CWallet compressed or otherwise*/
22bool HaveKey(const SigningProvider& wallet, const CKey& key)
23{
24 CKey key2;
25 key2.Set(key.begin(), key.end(), !key.IsCompressed());
26 return wallet.HaveKey(key.GetPubKey().GetID()) || wallet.HaveKey(key2.GetPubKey().GetID());
27}
28
29static RPCHelpMan getwalletinfo()
30{

Callers 5

CanProvideMethod · 0.85
HaveKeyMethod · 0.85
DeriveNewChildKeyMethod · 0.85
ImportPrivKeysMethod · 0.85
sethdseedFunction · 0.85

Calls 7

SetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
IsCompressedMethod · 0.45
HaveKeyMethod · 0.45
GetIDMethod · 0.45
GetPubKeyMethod · 0.45

Tested by

no test coverage detected