Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
interfaces::WalletClient Class Referenceabstract

Wallet chain client that in addition to having chain client methods for starting up, shutting down, and registering RPCs, also has additional methods (called by the GUI) to load and create wallets. More...

#include <wallet.h>

Inheritance diagram for interfaces::WalletClient:
[legend]
Collaboration diagram for interfaces::WalletClient:
[legend]

Public Types

using LoadWalletFn = std::function< void(std::unique_ptr< Wallet > wallet)>
 Register handler for load wallet messages.
 

Public Member Functions

virtual std::unique_ptr< WalletcreateWallet (const std::string &name, const SecureString &passphrase, uint64_t wallet_creation_flags, bilingual_str &error, std::vector< bilingual_str > &warnings)=0
 Create new wallet.
 
virtual std::unique_ptr< WalletloadWallet (const std::string &name, bilingual_str &error, std::vector< bilingual_str > &warnings)=0
 Load existing wallet.
 
virtual std::string getWalletDir ()=0
 Return default wallet directory.
 
virtual std::vector< std::string > listWalletDir ()=0
 Return available wallets in wallet directory.
 
virtual std::vector< std::unique_ptr< Wallet > > getWallets ()=0
 Return interfaces for accessing wallets (if any).
 
virtual std::unique_ptr< HandlerhandleLoadWallet (LoadWalletFn fn)=0
 
- Public Member Functions inherited from interfaces::ChainClient
virtual ~ChainClient ()
 
virtual void registerRpcs ()=0
 Register rpcs.
 
virtual bool verify ()=0
 Check for errors before loading.
 
virtual bool load ()=0
 Load saved state.
 
virtual void start (CScheduler &scheduler)=0
 Start client execution and provide a scheduler.
 
virtual void flush ()=0
 Save state to disk.
 
virtual void stop ()=0
 Shut down client.
 
virtual void setMockTime (int64_t time)=0
 Set mock time.
 

Detailed Description

Wallet chain client that in addition to having chain client methods for starting up, shutting down, and registering RPCs, also has additional methods (called by the GUI) to load and create wallets.

Definition at line 304 of file wallet.h.

Member Typedef Documentation

◆ LoadWalletFn

using interfaces::WalletClient::LoadWalletFn = std::function<void(std::unique_ptr<Wallet> wallet)>

Register handler for load wallet messages.

This callback is triggered by createWallet and loadWallet above, and also triggered when wallets are loaded at startup or by RPC.

Definition at line 329 of file wallet.h.

Member Function Documentation

◆ createWallet()

virtual std::unique_ptr< Wallet > interfaces::WalletClient::createWallet ( const std::string &  name,
const SecureString passphrase,
uint64_t  wallet_creation_flags,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)
pure virtual

Create new wallet.

Here is the caller graph for this function:

◆ getWalletDir()

virtual std::string interfaces::WalletClient::getWalletDir ( )
pure virtual

Return default wallet directory.

◆ getWallets()

virtual std::vector< std::unique_ptr< Wallet > > interfaces::WalletClient::getWallets ( )
pure virtual

Return interfaces for accessing wallets (if any).

Here is the caller graph for this function:

◆ handleLoadWallet()

virtual std::unique_ptr< Handler > interfaces::WalletClient::handleLoadWallet ( LoadWalletFn  fn)
pure virtual
Here is the caller graph for this function:

◆ listWalletDir()

virtual std::vector< std::string > interfaces::WalletClient::listWalletDir ( )
pure virtual

Return available wallets in wallet directory.

Here is the caller graph for this function:

◆ loadWallet()

virtual std::unique_ptr< Wallet > interfaces::WalletClient::loadWallet ( const std::string &  name,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)
pure virtual

Load existing wallet.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: