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

Method GetPrivKey

src/script/descriptor.cpp:481–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479 return true;
480 }
481 bool GetPrivKey(int pos, const SigningProvider& arg, CKey& key) const override
482 {
483 CExtKey extkey;
484 CExtKey dummy;
485 if (!GetDerivedExtKey(arg, extkey, dummy)) return false;
486 if (m_derive == DeriveType::UNHARDENED) extkey.Derive(extkey, pos);
487 if (m_derive == DeriveType::HARDENED) extkey.Derive(extkey, pos | 0x80000000UL);
488 key = extkey.key;
489 return true;
490 }
491};
492
493/** Base class for all Descriptor implementations. */

Callers

nothing calls this directly

Calls 1

DeriveMethod · 0.45

Tested by

no test coverage detected