31 #ifndef LEDGER_CORE_ETHEREUMLIKEEXTENDEDPUBLICKEY_H 32 #define LEDGER_CORE_ETHEREUMLIKEEXTENDEDPUBLICKEY_H 34 #include <common/AbstractExtendedPublicKey.h> 35 #include <api/EthereumLikeExtendedPublicKey.hpp> 36 #include <crypto/DeterministicPublicKey.hpp> 37 #include <api/EthereumLikeNetworkParameters.hpp> 39 #include <utils/Option.hpp> 40 #include <utils/DerivationPath.hpp> 41 #include <api/Currency.hpp> 45 using EthereumExtendedPublicKey = AbstractExtendedPublicKey<api::EthereumLikeNetworkParameters>;
53 std::shared_ptr<api::EthereumLikeAddress>
derive(
const std::string & path)
override ;
55 std::vector<uint8_t>
derivePublicKey(
const std::string & path)
override ;
57 std::vector<uint8_t>
deriveHash160(
const std::string & path)
override ;
63 static std::shared_ptr<EthereumLikeExtendedPublicKey> fromRaw(
const api::Currency& params,
64 const optional<std::vector<uint8_t>>& parentPublicKey,
65 const std::vector<uint8_t>& publicKey,
66 const std::vector<uint8_t> &chainCode,
67 const std::string& path);
69 static std::shared_ptr<EthereumLikeExtendedPublicKey> fromBase58(
const api::Currency& currency,
70 const std::string& xpubBase58,
95 #endif //LEDGER_CORE_ETHEREUMLIKEEXTENDEDPUBLICKEY_H std::string toBase58() override
Definition: EthereumLikeExtendedPublicKey.cpp:81
Definition: DeterministicPublicKey.hpp:38
std::string getRootPath() override
Definition: EthereumLikeExtendedPublicKey.cpp:85
Definition: AbstractExtendedPublicKey.h:54
std::vector< uint8_t > derivePublicKey(const std::string &path) override
Definition: EthereumLikeExtendedPublicKey.cpp:72
Definition: DerivationPath.hpp:40
Definition: EthereumLikeExtendedPublicKey.h:46
Definition: EthereumLikeExtendedPublicKey.hpp:24
Definition: Currency.hpp:23
std::vector< uint8_t > deriveHash160(const std::string &path) override
Definition: EthereumLikeExtendedPublicKey.cpp:77
Definition: Account.cpp:8
std::shared_ptr< api::EthereumLikeAddress > derive(const std::string &path) override
Definition: EthereumLikeExtendedPublicKey.cpp:59
Definition: EthereumLikeNetworkParameters.hpp:15
Definition: optional.hpp:177
std::experimental::optional< EthereumLikeNetworkParameters > ethereumLikeNetworkParameters
Definition: Currency.hpp:43