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

Public Member Functions

 DerivationPathApi (const ledger::core::DerivationPath &path)
 
int32_t getDepth () override
 
int32_t getChildNum (int32_t index) override
 
int32_t getUnhardenedChildNum (int32_t index) override
 
bool isHardened (int32_t index) override
 
std::string toString () override
 
std::shared_ptr< api::DerivationPathgetParent () override
 
std::vector< int32_t > toArray () override
 

Additional Inherited Members

- Static Public Member Functions inherited from ledger::core::api::DerivationPath
static std::shared_ptr< DerivationPathparse (const std::string &path)
 

Member Function Documentation

◆ getChildNum()

int32_t ledger::core::DerivationPathApi::getChildNum ( int32_t  index)
overridevirtual

Get the child num at the given index in the path.

Implements ledger::core::api::DerivationPath.

◆ getDepth()

int32_t ledger::core::DerivationPathApi::getDepth ( )
overridevirtual

Get the number of element in this path.

Implements ledger::core::api::DerivationPath.

◆ getParent()

std::shared_ptr< ledger::core::api::DerivationPath > ledger::core::DerivationPathApi::getParent ( )
overridevirtual

Return a derivation path without the last element, e.g. the parent of "44'/0'/0'/0/0" is "44'/0'/0'/0".

Implements ledger::core::api::DerivationPath.

◆ getUnhardenedChildNum()

int32_t ledger::core::DerivationPathApi::getUnhardenedChildNum ( int32_t  index)
overridevirtual

Get the child num at the given index in the path. If the child num is hardened, returns it without the hardened marker bit.

Implements ledger::core::api::DerivationPath.

◆ isHardened()

bool ledger::core::DerivationPathApi::isHardened ( int32_t  index)
overridevirtual

Return true if the given index in the path is an hardened child num.

Implements ledger::core::api::DerivationPath.

◆ toArray()

std::vector< int32_t > ledger::core::DerivationPathApi::toArray ( )
overridevirtual

Return an array where which item is a child num of the path.

Implements ledger::core::api::DerivationPath.

◆ toString()

std::string ledger::core::DerivationPathApi::toString ( )
overridevirtual

Serialize the given path to a human readable string like "44'/0'/0'/0/0".

Implements ledger::core::api::DerivationPath.


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