ledger-core
Wallet.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from wallet.djinni
3 
4 #ifndef DJINNI_GENERATED_WALLET_HPP
5 #define DJINNI_GENERATED_WALLET_HPP
6 
7 #include <chrono>
8 #include <cstdint>
9 #include <memory>
10 #include <string>
11 #ifndef LIBCORE_EXPORT
12  #if defined(_MSC_VER)
13  #include <libcore_export.h>
14  #else
15  #define LIBCORE_EXPORT
16  #endif
17 #endif
18 
19 namespace ledger { namespace core { namespace api {
20 
21 class AccountCallback;
22 class AccountCreationInfoCallback;
23 class AccountListCallback;
24 class BitcoinLikeWallet;
25 class BlockCallback;
26 class DynamicObject;
27 class ErrorCodeCallback;
28 class EventBus;
29 class ExtendedKeyAccountCreationInfoCallback;
30 class I32Callback;
31 class Logger;
32 class Preferences;
33 enum class WalletType;
34 struct AccountCreationInfo;
35 struct Currency;
36 struct ExtendedKeyAccountCreationInfo;
37 
39 class LIBCORE_EXPORT Wallet {
40 public:
41  virtual ~Wallet() {}
42 
47  virtual std::string getName() = 0;
48 
54  virtual void getAccount(int32_t index, const std::shared_ptr<AccountCallback> & callback) = 0;
55 
60  virtual void getAccountCount(const std::shared_ptr<I32Callback> & callback) = 0;
61 
68  virtual void getAccounts(int32_t offset, int32_t count, const std::shared_ptr<AccountListCallback> & callback) = 0;
69 
74  virtual void getNextAccountIndex(const std::shared_ptr<I32Callback> & callback) = 0;
75 
80  virtual std::shared_ptr<EventBus> getEventBus() = 0;
81 
86  virtual bool isSynchronizing() = 0;
87 
92  virtual std::shared_ptr<EventBus> synchronize() = 0;
93 
98  virtual std::shared_ptr<Preferences> getPreferences() = 0;
99 
104  virtual std::shared_ptr<Logger> getLogger() = 0;
105 
111  virtual std::shared_ptr<Preferences> getAccountPreferences(int32_t index) = 0;
112 
117  virtual std::shared_ptr<BitcoinLikeWallet> asBitcoinLikeWallet() = 0;
118 
123  virtual Currency getCurrency() = 0;
124 
129  virtual bool isInstanceOfBitcoinLikeWallet() = 0;
130 
135  virtual bool isInstanceOfEthereumLikeWallet() = 0;
136 
141  virtual bool isInstanceOfRippleLikeWallet() = 0;
142 
147  virtual WalletType getWalletType() = 0;
148 
153  virtual void getLastBlock(const std::shared_ptr<BlockCallback> & callback) = 0;
154 
160  virtual void getAccountCreationInfo(int32_t accountIndex, const std::shared_ptr<AccountCreationInfoCallback> & callback) = 0;
161 
163  virtual void getExtendedKeyAccountCreationInfo(int32_t accountIndex, const std::shared_ptr<ExtendedKeyAccountCreationInfoCallback> & callback) = 0;
164 
169  virtual void getNextAccountCreationInfo(const std::shared_ptr<AccountCreationInfoCallback> & callback) = 0;
170 
172  virtual void getNextExtendedKeyAccountCreationInfo(const std::shared_ptr<ExtendedKeyAccountCreationInfoCallback> & callback) = 0;
173 
179  virtual void newAccountWithInfo(const AccountCreationInfo & accountCreationInfo, const std::shared_ptr<AccountCallback> & callback) = 0;
180 
182  virtual void newAccountWithExtendedKeyInfo(const ExtendedKeyAccountCreationInfo & extendedKeyAccountCreationInfo, const std::shared_ptr<AccountCallback> & callback) = 0;
183 
188  virtual void eraseDataSince(const std::chrono::system_clock::time_point & date, const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
189 
191  virtual std::shared_ptr<DynamicObject> getConfiguration() = 0;
192 };
193 
194 } } } // namespace ledger::core::api
195 #endif //DJINNI_GENERATED_WALLET_HPP
Definition: ExtendedKeyAccountCreationInfo.hpp:16
Definition: Wallet.hpp:39
Definition: Currency.hpp:23
Definition: Account.cpp:8
WalletType
Definition: WalletType.hpp:20
Definition: AccountCreationInfo.hpp:16