Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.h
// Copyright (c) 2018 The Bitcoin Core developers | // Copyright (c) 2018 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_INTERFACES_WALLET_H | #ifndef BITCOIN_INTERFACES_WALLET_H | ||||
#define BITCOIN_INTERFACES_WALLET_H | #define BITCOIN_INTERFACES_WALLET_H | ||||
#include <amount.h> // For Amount | #include <amount.h> // For Amount | ||||
#include <primitives/transaction.h> // For CTxOut | #include <primitives/transaction.h> // For CTxOut | ||||
#include <pubkey.h> // For CKeyID and CScriptID (definitions needed in CTxDestination instantiation) | #include <pubkey.h> // For CKeyID and CScriptID (definitions needed in CTxDestination instantiation) | ||||
#include <script/sighashtype.h> | #include <script/sighashtype.h> | ||||
#include <script/standard.h> // For CTxDestination | #include <script/standard.h> // For CTxDestination | ||||
#include <support/allocators/secure.h> // For SecureString | #include <support/allocators/secure.h> // For SecureString | ||||
#include <ui_interface.h> // For ChangeType | #include <ui_interface.h> // For ChangeType | ||||
#include <util/message.h> | |||||
#include <cstdint> | #include <cstdint> | ||||
#include <functional> | #include <functional> | ||||
#include <map> | #include <map> | ||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
#include <tuple> | #include <tuple> | ||||
#include <utility> | #include <utility> | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | public: | ||||
//! Get public key. | //! Get public key. | ||||
virtual bool getPubKey(const CScript &script, const CKeyID &address, | virtual bool getPubKey(const CScript &script, const CKeyID &address, | ||||
CPubKey &pub_key) = 0; | CPubKey &pub_key) = 0; | ||||
//! Get private key. | //! Get private key. | ||||
virtual bool getPrivKey(const CScript &script, const CKeyID &address, | virtual bool getPrivKey(const CScript &script, const CKeyID &address, | ||||
CKey &key) = 0; | CKey &key) = 0; | ||||
//! Sign message | |||||
virtual SigningResult signMessage(const std::string &message, | |||||
const PKHash &pkhash, | |||||
std::string &str_sig) = 0; | |||||
//! Return whether wallet has private key. | //! Return whether wallet has private key. | ||||
virtual bool isSpendable(const CTxDestination &dest) = 0; | virtual bool isSpendable(const CTxDestination &dest) = 0; | ||||
//! Return whether wallet has watch only keys. | //! Return whether wallet has watch only keys. | ||||
virtual bool haveWatchOnly() = 0; | virtual bool haveWatchOnly() = 0; | ||||
//! Add or update address. | //! Add or update address. | ||||
virtual bool setAddressBook(const CTxDestination &dest, | virtual bool setAddressBook(const CTxDestination &dest, | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |