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

Public Member Functions

 TezosLikeAddress (const api::Currency &currency, const std::vector< uint8_t > &hash160, const std::vector< uint8_t > &version, const Option< std::string > &derivationPath=Option< std::string >())
 
 TezosLikeAddress (const api::Currency &currency, const std::vector< uint8_t > &pubKey, const std::vector< uint8_t > &version, api::TezosCurve curve, const Option< std::string > &derivationPath=Option< std::string >())
 
std::vector< uint8_t > getVersion () override
 
std::vector< uint8_t > getHash160 () override
 
api::TezosLikeNetworkParameters getNetworkParameters () override
 
std::string toBase58 () 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< TezosLikeAddressfromBase58 (const std::string &address, const api::Currency &currency, const Option< std::string > &derivationPath=Option< std::string >())
 
static std::vector< uint8_t > getPrefixFromImplicitVersion (const std::vector< uint8_t > &implicitVersion, api::TezosCurve curve)
 
- 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::TezosLikeAddress::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::TezosLikeAddress::getHash160 ( )
overridevirtual

Gets the raw hash160 of the public key

Returns
The 20 bytes of the public key hash160

Implements ledger::core::api::TezosLikeAddress.

◆ getNetworkParameters()

api::TezosLikeNetworkParameters ledger::core::TezosLikeAddress::getNetworkParameters ( )
overridevirtual

Gets the network parameters used for serializing the address.

Returns
The network parameters of the address

Implements ledger::core::api::TezosLikeAddress.

◆ getVersion()

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

Gets the version of the address.

Returns
The version of the address

Implements ledger::core::api::TezosLikeAddress.

◆ toBase58()

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

Encodes to Base58.

Returns
The Base58 encoding

Implements ledger::core::api::TezosLikeAddress.

◆ toString()

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