31 #ifndef LEDGER_CORE_BITCOINLIKEEXTENDEDPUBLICKEY_HPP 32 #define LEDGER_CORE_BITCOINLIKEEXTENDEDPUBLICKEY_HPP 35 #include <common/AbstractExtendedPublicKey.h> 36 #include <api/BitcoinLikeExtendedPublicKey.hpp> 37 #include <crypto/DeterministicPublicKey.hpp> 38 #include <api/BitcoinLikeNetworkParameters.hpp> 39 #include <utils/Option.hpp> 40 #include <utils/DerivationPath.hpp> 41 #include <api/Currency.hpp> 45 using BitcoinExtendedPublicKey = AbstractExtendedPublicKey<api::BitcoinLikeNetworkParameters>;
50 const std::shared_ptr<DynamicObject> &configuration,
52 std::shared_ptr<api::BitcoinLikeAddress>
derive(
const std::string &path)
override;
57 std::vector<uint8_t>
deriveHash160(
const std::string &path)
override;
64 static std::shared_ptr<BitcoinLikeExtendedPublicKey> fromRaw(
66 const optional<std::vector<uint8_t>>& parentPublicKey,
67 const std::vector<uint8_t>& publicKey,
68 const std::vector<uint8_t> &chainCode,
69 const std::string& path,
70 const std::shared_ptr<DynamicObject> &configuration
73 static std::shared_ptr<BitcoinLikeExtendedPublicKey> fromBase58(
75 const std::string& xpubBase58,
77 const std::shared_ptr<DynamicObject> &configuration
98 const std::shared_ptr<DynamicObject> _configuration;
104 #endif //LEDGER_CORE_BITCOINLIKEEXTENDEDPUBLICKEY_HPP Definition: DeterministicPublicKey.hpp:38
Definition: BitcoinLikeExtendedPublicKey.hpp:46
std::string getRootPath() override
Definition: BitcoinLikeExtendedPublicKey.cpp:86
std::vector< uint8_t > derivePublicKey(const std::string &path) override
Definition: BitcoinLikeExtendedPublicKey.cpp:100
Definition: AbstractExtendedPublicKey.h:54
Definition: BitcoinLikeExtendedPublicKey.hpp:24
Definition: DerivationPath.hpp:40
std::vector< uint8_t > deriveHash160(const std::string &path) override
Definition: BitcoinLikeExtendedPublicKey.cpp:104
Definition: Currency.hpp:23
Definition: Account.cpp:8
std::string toBase58() override
Definition: BitcoinLikeExtendedPublicKey.cpp:69
std::shared_ptr< api::BitcoinLikeAddress > derive(const std::string &path) override
Definition: BitcoinLikeExtendedPublicKey.cpp:54
std::experimental::optional< BitcoinLikeNetworkParameters > bitcoinLikeNetworkParameters
Definition: Currency.hpp:41
Definition: optional.hpp:177
Definition: BitcoinLikeNetworkParameters.hpp:17