aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/wallet.h')
-rw-r--r--src/interfaces/wallet.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index 9d4830d189..ae54d42442 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -22,8 +22,10 @@
#include <vector>
class CCoinControl;
+class CFeeRate;
class CKey;
class CWallet;
+enum class FeeReason;
enum class OutputType;
struct CRecipient;
@@ -97,8 +99,9 @@ public:
//! Look up address in wallet, return whether exists.
virtual bool getAddress(const CTxDestination& dest,
- std::string* name = nullptr,
- isminetype* is_mine = nullptr) = 0;
+ std::string* name,
+ isminetype* is_mine,
+ std::string* purpose) = 0;
//! Get wallet address list.
virtual std::vector<WalletAddress> getAddresses() = 0;
@@ -218,15 +221,34 @@ public:
//! Return wallet transaction output information.
virtual std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) = 0;
+ //! Get required fee.
+ virtual CAmount getRequiredFee(unsigned int tx_bytes) = 0;
+
+ //! Get minimum fee.
+ virtual CAmount getMinimumFee(unsigned int tx_bytes,
+ const CCoinControl& coin_control,
+ int* returned_target,
+ FeeReason* reason) = 0;
+
+ //! Get tx confirm target.
+ virtual unsigned int getConfirmTarget() = 0;
+
// Return whether HD enabled.
virtual bool hdEnabled() = 0;
+ // check if a certain wallet flag is set.
+ virtual bool IsWalletFlagSet(uint64_t flag) = 0;
+
// Get default address type.
virtual OutputType getDefaultAddressType() = 0;
// Get default change type.
virtual OutputType getDefaultChangeType() = 0;
+ //! Register handler for unload message.
+ using UnloadFn = std::function<void()>;
+ virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;
+
//! Register handler for show progress messages.
using ShowProgressFn = std::function<void(const std::string& title, int progress)>;
virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
@@ -327,7 +349,6 @@ struct WalletTxStatus
int block_height;
int blocks_to_maturity;
int depth_in_main_chain;
- int request_count;
unsigned int time_received;
uint32_t lock_time;
bool is_final;
@@ -348,7 +369,7 @@ struct WalletTxOut
//! Return implementation of Wallet interface. This function will be undefined
//! in builds where ENABLE_WALLET is false.
-std::unique_ptr<Wallet> MakeWallet(CWallet& wallet);
+std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet);
} // namespace interfaces