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

Public Member Functions

 RippleLikeAddress (const ledger::core::api::Currency &currency, const std::vector< uint8_t > &hash160, const std::vector< uint8_t > &version, const Option< std::string > &derivationPath=Option< std::string >())
 
std::vector< uint8_t > getVersion () override
 
std::vector< uint8_t > getHash160 () override
 
api::RippleLikeNetworkParameters getNetworkParameters () override
 
std::string toBase58 () override
 
optional< std::string > getDerivationPath () override
 
std::string toString () override
 
- Public Member Functions inherited from ledger::core::AbstractAddress
 AbstractAddress (const api::Currency &currency, const Option< std::string > &path)
 
api::Currency getCurrency () override
 
optional< std::string > getDerivationPath () override
 
std::shared_ptr< api::BitcoinLikeAddressasBitcoinLikeAddress () override
 
bool isInstanceOfBitcoinLikeAddress () override
 

Static Public Member Functions

static std::shared_ptr< AbstractAddressparse (const std::string &address, const api::Currency &currency, const Option< std::string > &derivationPath=Option< std::string >())
 
static std::shared_ptr< RippleLikeAddressfromBase58 (const std::string &address, const api::Currency &currency, const Option< std::string > &derivationPath=Option< std::string >())
 
- Static Public Member Functions inherited from ledger::core::api::Address
static std::shared_ptr< Addressparse (const std::string &address, const Currency &currency)
 
static bool isValid (const std::string &address, const Currency &currency)
 

Member Function Documentation

◆ getDerivationPath()

std::experimental::optional< std::string > ledger::core::RippleLikeAddress::getDerivationPath ( )
overridevirtual

Gets an optional derivation path (if the address is owned by an account).

Returns
The derivation path of the address

Implements ledger::core::api::Address.

◆ getHash160()

std::vector< uint8_t > ledger::core::RippleLikeAddress::getHash160 ( )
overridevirtual

Gets the raw hash160 of the public key

Returns
The 20 bytes of the public key hash160

Implements ledger::core::api::RippleLikeAddress.

◆ getNetworkParameters()

api::RippleLikeNetworkParameters ledger::core::RippleLikeAddress::getNetworkParameters ( )
overridevirtual

Gets the network parameters used for serializing the address

Returns
The network parameters of the address

Implements ledger::core::api::RippleLikeAddress.

◆ getVersion()

std::vector< uint8_t > ledger::core::RippleLikeAddress::getVersion ( )
overridevirtual

Gets the version of the address

Returns
The version of the address

Implements ledger::core::api::RippleLikeAddress.

◆ toBase58()

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

Serializes the hash160 into a Base58 encoded address (with checksum)

Returns
The Base58 serialization

Implements ledger::core::api::RippleLikeAddress.

◆ toString()

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

Serialize the address to a string. The serialization method depends of the underlying currency and format (Base58, Bech32, Ethereum...).

Implements ledger::core::api::Address.


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