31 #ifndef LEDGER_CORE_COMMONBITCOINLIKEKEYCHAINS_H 32 #define LEDGER_CORE_COMMONBITCOINLIKEKEYCHAINS_H 34 #include "BitcoinLikeKeychain.hpp" 36 #include "../../../collections/DynamicObject.hpp" 37 #include <bitcoin/BitcoinLikeAddress.hpp> 43 uint32_t maxConsecutiveChangeIndex;
44 uint32_t maxConsecutiveReceiveIndex;
45 std::set<uint32_t> nonConsecutiveChangeIndexes;
46 std::set<uint32_t> nonConsecutiveReceiveIndexes;
49 template <
class Archive>
50 void serialize(Archive& archive, std::uint32_t
const version) {
53 maxConsecutiveChangeIndex,
54 maxConsecutiveReceiveIndex,
55 nonConsecutiveChangeIndexes,
56 nonConsecutiveReceiveIndexes,
67 const std::shared_ptr<api::BitcoinLikeExtendedPublicKey> &xpub,
68 const std::shared_ptr<Preferences> &preferences);
72 BitcoinLikeKeychain::Address getFreshAddress(KeyPurpose purpose)
override;
73 std::vector<BitcoinLikeKeychain::Address> getAllObservableAddresses(uint32_t from, uint32_t to)
override;
74 std::vector<BitcoinLikeKeychain::Address> getFreshAddresses(KeyPurpose purpose,
size_t n)
override;
77 std::vector<BitcoinLikeKeychain::Address> getAllObservableAddresses(KeyPurpose purpose, uint32_t from, uint32_t to)
override;
78 bool isEmpty()
const override;
79 std::shared_ptr<api::BitcoinLikeExtendedPublicKey> getExtendedPublicKey()
const;
80 std::string getRestoreKey()
const override;
82 bool contains(
const std::string &address)
const override;
84 int32_t getObservableRangeSize()
const override;
89 std::shared_ptr<api::BitcoinLikeExtendedPublicKey> _internalNodeXpub;
90 std::shared_ptr<api::BitcoinLikeExtendedPublicKey> _publicNodeXpub;
91 uint32_t _observableRange;
92 std::string _keychainEngine;
95 BitcoinLikeKeychain::Address derive(KeyPurpose purpose, off_t index);
98 std::shared_ptr<api::BitcoinLikeExtendedPublicKey> _xpub;
103 #endif //LEDGER_CORE_COMMONBITCOINLIKEKEYCHAINS_H Definition: BitcoinLikeKeychain.hpp:51
Definition: Option.hpp:49
Definition: CommonBitcoinLikeKeychains.hpp:42
Definition: CommonBitcoinLikeKeychains.hpp:63
Definition: DerivationPath.hpp:40
Definition: Currency.hpp:23
Definition: Account.cpp:8