ledger-core
Public Member Functions | Static Public Member Functions | List of all members
ledger::core::api::DerivationPath Class Referenceabstract
+ Inheritance diagram for ledger::core::api::DerivationPath:

Public Member Functions

virtual int32_t getDepth ()=0
 
virtual int32_t getChildNum (int32_t index)=0
 
virtual int32_t getUnhardenedChildNum (int32_t index)=0
 
virtual bool isHardened (int32_t index)=0
 
virtual std::string toString ()=0
 
virtual std::shared_ptr< DerivationPathgetParent ()=0
 
virtual std::vector< int32_t > toArray ()=0
 

Static Public Member Functions

static std::shared_ptr< DerivationPathparse (const std::string &path)
 

Member Function Documentation

◆ getChildNum()

virtual int32_t ledger::core::api::DerivationPath::getChildNum ( int32_t  index)
pure virtual

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

Implemented in ledger::core::DerivationPathApi.

◆ getDepth()

virtual int32_t ledger::core::api::DerivationPath::getDepth ( )
pure virtual

Get the number of element in this path.

Implemented in ledger::core::DerivationPathApi.

◆ getParent()

virtual std::shared_ptr<DerivationPath> ledger::core::api::DerivationPath::getParent ( )
pure virtual

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

Implemented in ledger::core::DerivationPathApi.

◆ getUnhardenedChildNum()

virtual int32_t ledger::core::api::DerivationPath::getUnhardenedChildNum ( int32_t  index)
pure virtual

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

Implemented in ledger::core::DerivationPathApi.

◆ isHardened()

virtual bool ledger::core::api::DerivationPath::isHardened ( int32_t  index)
pure virtual

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

Implemented in ledger::core::DerivationPathApi.

◆ toArray()

virtual std::vector<int32_t> ledger::core::api::DerivationPath::toArray ( )
pure virtual

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

Implemented in ledger::core::DerivationPathApi.

◆ toString()

virtual std::string ledger::core::api::DerivationPath::toString ( )
pure virtual

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

Implemented in ledger::core::DerivationPathApi.


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