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 <psbt.h> | |||||
#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/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 <cstdint> | #include <cstdint> | ||||
#include <functional> | #include <functional> | ||||
#include <map> | #include <map> | ||||
▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | virtual bool tryGetTxStatus(const TxId &txid, WalletTxStatus &tx_status, | ||||
int &num_blocks, int64_t &block_time) = 0; | int &num_blocks, int64_t &block_time) = 0; | ||||
//! Get transaction details. | //! Get transaction details. | ||||
virtual WalletTx getWalletTxDetails(const TxId &txid, | virtual WalletTx getWalletTxDetails(const TxId &txid, | ||||
WalletTxStatus &tx_status, | WalletTxStatus &tx_status, | ||||
WalletOrderForm &order_form, | WalletOrderForm &order_form, | ||||
bool &in_mempool, int &num_blocks) = 0; | bool &in_mempool, int &num_blocks) = 0; | ||||
//! Fill PSBT. | |||||
virtual TransactionError | |||||
fillPSBT(PartiallySignedTransaction &psbtx, bool &complete, | |||||
SigHashType sighash_type = | |||||
SigHashType().withForkId() /* SIGHASH_ALL|FORKID */, | |||||
bool sign = true, bool bip32derivs = false) = 0; | |||||
//! Get balances. | //! Get balances. | ||||
virtual WalletBalances getBalances() = 0; | virtual WalletBalances getBalances() = 0; | ||||
//! Get balances if possible without blocking. | //! Get balances if possible without blocking. | ||||
virtual bool tryGetBalances(WalletBalances &balances, int &num_blocks) = 0; | virtual bool tryGetBalances(WalletBalances &balances, int &num_blocks) = 0; | ||||
//! Get balance. | //! Get balance. | ||||
virtual Amount getBalance() = 0; | virtual Amount getBalance() = 0; | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |