ledger-core
|
Public Member Functions | |
std::shared_ptr< HttpClient > | getHttpClient (const std::string &baseUrl) |
std::shared_ptr< WebSocketClient > | getWebSocketClient () const |
std::shared_ptr< Preferences > | getExternalPreferences () const |
std::shared_ptr< Preferences > | getInternalPreferences () const |
std::shared_ptr< api::PathResolver > | getPathResolver () const |
std::shared_ptr< api::RandomNumberGenerator > | rng () const |
std::shared_ptr< api::ThreadDispatcher > | getDispatcher () const |
std::shared_ptr< spdlog::logger > | logger () const |
std::shared_ptr< DatabaseSessionPool > | getDatabaseSessionPool () const |
std::shared_ptr< DynamicObject > | getConfiguration () const |
std::shared_ptr< api::EventBus > | getEventBus () const |
const std::string & | getName () const |
const std::string | getPassword () const |
std::shared_ptr< AbstractWalletFactory > | getFactory (const std::string ¤cyName) const |
Future< int64_t > | getWalletCount () |
Future< std::vector< std::shared_ptr< AbstractWallet > > > | getWallets (int64_t from, int64_t size) |
FuturePtr< AbstractWallet > | getWallet (const std::string &name) |
Future< api::ErrorCode > | updateWalletConfig (const std::string &name, const std::shared_ptr< api::DynamicObject > &configuration) |
Future< std::vector< std::string > > | getWalletNames (int64_t from, int64_t size) const |
FuturePtr< AbstractWallet > | createWallet (const std::string &name, const std::string ¤cyName, const std::shared_ptr< api::DynamicObject > &configuration) |
Future< Unit > | deleteWallet (const std::string &name) |
Future< api::Block > | getLastBlock (const std::string ¤cyName) |
Future< api::ErrorCode > | eraseDataSince (const std::chrono::system_clock::time_point &date) |
Future< api::ErrorCode > | changePassword (const std::string &oldPassword, const std::string &newPassword) |
Option< api::Currency > | getCurrency (const std::string &name) const |
const std::vector< api::Currency > & | getCurrencies () const |
Future< Unit > | addCurrency (const api::Currency ¤cy) |
Future< Unit > | removeCurrency (const std::string ¤cyName) |
Future< api::ErrorCode > | freshResetAll () |
Option< api::Block > | getBlockFromCache (const std::string ¤cyName) |
std::shared_ptr< api::ExecutionContext > | getThreadPoolExecutionContext () const |
![]() | |
DedicatedContext (const std::shared_ptr< api::ExecutionContext > &context) | |
template<typename T > | |
Future< T > | async (std::function< T()> f) |
template<typename T > | |
Future< T > | async (std::function< T()> f) const |
Future< Unit > | run (std::function< void()> f) |
std::shared_ptr< api::ExecutionContext > | getContext () const |
Static Public Member Functions | |
static std::shared_ptr< WalletPool > | newInstance (const std::string &name, const std::string &password, const std::shared_ptr< api::HttpClient > &httpClient, const std::shared_ptr< api::WebSocketClient > &webSocketClient, const std::shared_ptr< api::PathResolver > &pathResolver, const std::shared_ptr< api::LogPrinter > &logPrinter, const std::shared_ptr< api::ThreadDispatcher > &dispatcher, const std::shared_ptr< api::RandomNumberGenerator > &rng, const std::shared_ptr< api::DatabaseBackend > &backend, const std::shared_ptr< api::DynamicObject > &configuration) |
Additional Inherited Members | |
![]() | |
std::shared_ptr< api::ExecutionContext > | _executionContext |
Future< api::ErrorCode > ledger::core::WalletPool::freshResetAll | ( | ) |
Reset wallet pool.
Resetting the wallet pool is an irreversible fresh reset of the whole wallet pool and all of its created (sub-)objects (wallets, accounts, transactions, etc.). Please consider a less destructive option before opting to use this. However, if you’re looking for a way to end up as if you were in a “fresh install” situation, this is the function to go to.
Final warning: this function effectively swipes off everything. You’ve been warned.
Note: when calling that function, you must re-create a WalletPool as all objects got destroyed. Consider restarting / exiting your application right after calling that function. You are also highly advised to run that function on a code path that doesn’t include having lots of objects in memory.