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

Public Member Functions

 EthereumLikeAddress (const api::Currency &currency, const std::vector< uint8_t > &keccak256, const Option< std::string > &derivationPath=Option< std::string >())
 
std::vector< uint8_t > getVersion () override
 
std::vector< uint8_t > getKeccakHash () override
 
api::EthereumLikeNetworkParameters getNetworkParameters () override
 
std::string toEIP55 () override
 
virtual 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< EthereumLikeAddressfromEIP55 (const std::string &address, const api::Currency &currency, const Option< std::string > &derivationPath=Option< std::string >(), bool skipEIP55Check=false)
 
- 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::EthereumLikeAddress::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.

◆ getKeccakHash()

std::vector< uint8_t > ledger::core::EthereumLikeAddress::getKeccakHash ( )
overridevirtual

Gets the raw keccak hash of the public key (truncated to 20 bytes).

Returns
The 20 bytes of the public key keccak hash

Implements ledger::core::api::EthereumLikeAddress.

◆ getNetworkParameters()

api::EthereumLikeNetworkParameters ledger::core::EthereumLikeAddress::getNetworkParameters ( )
overridevirtual

Gets the network parameters used for serializing the address.

Returns
The network parameters of the address

Implements ledger::core::api::EthereumLikeAddress.

◆ getVersion()

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

Gets the version of the address.

Returns
The version of the address

Implements ledger::core::api::EthereumLikeAddress.

◆ toEIP55()

std::string ledger::core::EthereumLikeAddress::toEIP55 ( )
overridevirtual

Encodes keccak with respect to EIP55.

Returns
The EIP55 encoding

Implements ledger::core::api::EthereumLikeAddress.

◆ toString()

std::string ledger::core::EthereumLikeAddress::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: