31 #ifndef LEDGER_CORE_WALLETPOOL_API_HPP 32 #define LEDGER_CORE_WALLETPOOL_API_HPP 34 #include <api/WalletPool.hpp> 35 #include <wallet/pool/WalletPool.hpp> 36 #include <api/WalletPoolCallback.hpp> 37 #include <api/ErrorCodeCallback.hpp> 38 #include <debug/LoggerApi.hpp> 43 class BitcoinLikeWalletFactory;
47 WalletPoolApi(
const std::shared_ptr<ledger::core::WalletPool>& pool);
48 std::shared_ptr<api::Logger>
getLogger()
override;
51 void getWalletCount(
const std::shared_ptr<api::I32Callback> &callback)
override;
53 void getWallet(
const std::string &name,
const std::shared_ptr<api::WalletCallback> &callback)
override;
55 void updateWalletConfig(
const std::string &name,
56 const std::shared_ptr<api::DynamicObject> &configuration,
57 const std::shared_ptr<api::ErrorCodeCallback> &callback)
override;
59 void getWallets(int32_t from, int32_t size,
const std::shared_ptr<api::WalletListCallback> &callback)
override;
61 void createWallet(
const std::string &name,
const api::Currency ¤cy,
62 const std::shared_ptr<api::DynamicObject> &configuration,
63 const std::shared_ptr<api::WalletCallback> &callback)
override;
65 void getCurrencies(
const std::shared_ptr <api::CurrencyListCallback> &callback)
override;
67 void getCurrency(
const std::string &name,
const std::shared_ptr<api::CurrencyCallback> &callback)
override;
71 std::shared_ptr<api::EventBus>
getEventBus()
override;
74 getLastBlock(
const std::string ¤cyName,
const std::shared_ptr<api::BlockCallback> &callback)
override;
76 void eraseDataSince(
const std::chrono::system_clock::time_point & date,
const std::shared_ptr<api::ErrorCodeCallback> & callback)
override;
78 void freshResetAll(
const std::shared_ptr<api::ErrorCodeCallback>& callback)
override;
80 void changePassword(
const std::string &oldPassword,
81 const std::string &newPassword,
82 const std::shared_ptr<api::ErrorCodeCallback> & callback)
override;
87 std::shared_ptr<ledger::core::WalletPool> _pool;
88 std::shared_ptr<LoggerApi> _logger;
89 std::shared_ptr<api::ExecutionContext> _mainContext;
92 static void open(
const std::string &name,
93 const std::string &password,
94 const std::shared_ptr<api::HttpClient> &httpClient,
95 const std::shared_ptr<api::WebSocketClient> &webSocketClient,
96 const std::shared_ptr<api::PathResolver> &pathResolver,
97 const std::shared_ptr<api::LogPrinter> &logPrinter,
98 const std::shared_ptr<api::ThreadDispatcher> &dispatcher,
99 const std::shared_ptr<api::RandomNumberGenerator>& rng,
100 const std::shared_ptr<api::DatabaseBackend> &backend,
101 const std::shared_ptr<api::DynamicObject>& configuration,
102 const std::shared_ptr<api::WalletPoolCallback>& listener);
108 #endif //LEDGER_CORE_WALLETPOOL_API_HPP std::shared_ptr< api::EventBus > getEventBus() override
Definition: WalletPoolApi.cpp:166
Definition: WalletPoolApi.hpp:45
std::shared_ptr< api::Preferences > getPreferences() override
Definition: WalletPoolApi.cpp:100
Definition: Currency.hpp:23
Definition: Account.cpp:8
std::string getName() override
Definition: WalletPoolApi.cpp:158
std::shared_ptr< api::Logger > getLogger() override
Definition: WalletPoolApi.cpp:96
Definition: WalletPool.hpp:42