ledger-core
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ledger::core::BitcoinLikeExtendedPublicKey Class Reference
+ Inheritance diagram for ledger::core::BitcoinLikeExtendedPublicKey:
+ Collaboration diagram for ledger::core::BitcoinLikeExtendedPublicKey:

Public Member Functions

 BitcoinLikeExtendedPublicKey (const api::Currency &params, const DeterministicPublicKey &key, const std::shared_ptr< DynamicObject > &configuration, const DerivationPath &path=DerivationPath("m/"))
 
std::shared_ptr< api::BitcoinLikeAddressderive (const std::string &path) override
 
std::shared_ptr< BitcoinLikeExtendedPublicKeyderive (const DerivationPath &path)
 
std::vector< uint8_t > derivePublicKey (const std::string &path) override
 
std::vector< uint8_t > deriveHash160 (const std::string &path) override
 
std::string toBase58 () override
 
std::string getRootPath () override
 
- Public Member Functions inherited from ledger::core::AbstractExtendedPublicKey< NetworkParameters >
std::string toBase58 ()
 
std::vector< uint8_t > derivePublicKey (const std::string &path)
 
std::vector< uint8_t > deriveHash160 (const std::string &path)
 

Static Public Member Functions

static std::shared_ptr< BitcoinLikeExtendedPublicKeyfromRaw (const api::Currency &params, const optional< std::vector< uint8_t >> &parentPublicKey, const std::vector< uint8_t > &publicKey, const std::vector< uint8_t > &chainCode, const std::string &path, const std::shared_ptr< DynamicObject > &configuration)
 
static std::shared_ptr< BitcoinLikeExtendedPublicKeyfromBase58 (const api::Currency &currency, const std::string &xpubBase58, const Option< std::string > &path, const std::shared_ptr< DynamicObject > &configuration)
 
- Static Public Member Functions inherited from ledger::core::AbstractExtendedPublicKey< NetworkParameters >
static DeterministicPublicKey _derive (int index, const std::vector< uint32_t > &childNums, const DeterministicPublicKey &key)
 
static DeterministicPublicKey fromRaw (const api::Currency &currency, const NetworkParameters &params, const optional< std::vector< uint8_t >> &parentPublicKey, const std::vector< uint8_t > &publicKey, const std::vector< uint8_t > &chainCode, const std::string &path)
 
static DeterministicPublicKey fromBase58 (const api::Currency &currency, const NetworkParameters &params, const std::string &xpubBase58, const Option< std::string > &path, const std::string &networkBase58Dictionary="")
 

Protected Member Functions

const api::BitcoinLikeNetworkParametersparams () const override
 
const DeterministicPublicKeygetKey () const override
 
const DerivationPathgetPath () const override
 
const api::CurrencygetCurrency () const override
 

Member Function Documentation

◆ derive()

std::shared_ptr< api::BitcoinLikeAddress > ledger::core::BitcoinLikeExtendedPublicKey::derive ( const std::string &  path)
overridevirtual

Derive an address from an xPUB and a path.

Implements ledger::core::api::BitcoinLikeExtendedPublicKey.

◆ deriveHash160()

std::vector< uint8_t > ledger::core::BitcoinLikeExtendedPublicKey::deriveHash160 ( const std::string &  path)
overridevirtual

Derive a shorten version of a public key (SHA256 + RIPEMD160) from an xPUB and a path.

Implements ledger::core::api::BitcoinLikeExtendedPublicKey.

◆ derivePublicKey()

std::vector< uint8_t > ledger::core::BitcoinLikeExtendedPublicKey::derivePublicKey ( const std::string &  path)
overridevirtual

Derive a public key from an xPUB and a path.

Implements ledger::core::api::BitcoinLikeExtendedPublicKey.

◆ getRootPath()

std::string ledger::core::BitcoinLikeExtendedPublicKey::getRootPath ( )
overridevirtual

Get the root path of the xPUB.

Implements ledger::core::api::BitcoinLikeExtendedPublicKey.

◆ toBase58()

std::string ledger::core::BitcoinLikeExtendedPublicKey::toBase58 ( )
overridevirtual

Get the xPUB in base 58.

Implements ledger::core::api::BitcoinLikeExtendedPublicKey.


The documentation for this class was generated from the following files: