Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-present The Bitcoin Core developers
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
13
14#ifndef BITCOIN_WALLET_TYPES_H
15#define BITCOIN_WALLET_TYPES_H
16
17#include <consensus/amount.h>
18#include <policy/feerate.h>
20#include <util/fees.h>
21#include <util/translation.h>
22
23#include <optional>
24#include <utility>
25
26namespace wallet {
35
49
51{
55 std::optional<unsigned int> change_pos;
56
57 CreatedTransactionResult(CTransactionRef _tx, CAmount _fee, std::optional<unsigned int> _change_pos, FeeReason _fee_reason)
58 : tx(_tx), fee(_fee), fee_reason(_fee_reason), change_pos(_change_pos) {}
59};
60
75
87
88} // namespace wallet
89
90#endif // BITCOIN_WALLET_TYPES_H
int64_t CAmount
Amount in satoshis (Can be negative).
Definition amount.h:12
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
Definition feerate.h:32
WalletErrorCode
Definition types.h:66
AddressPurpose
Address purpose field that has been been stored with wallet sending and receiving addresses since BIP...
Definition types.h:44
@ REFUND
Never set in current code may be present in older wallet databases.
Definition types.h:47
std::shared_ptr< const CTransaction > CTransactionRef
Bilingual messages:
Definition translation.h:24
CreatedTransactionResult(CTransactionRef _tx, CAmount _fee, std::optional< unsigned int > _change_pos, FeeReason _fee_reason)
Definition types.h:57
std::optional< unsigned int > change_pos
Definition types.h:55
std::optional< int > returned_target
Definition types.h:30
MinimumFeeRateResult(CFeeRate fee_rate, FeeReason fee_reason, std::optional< int > returned_target)
Definition types.h:32
bilingual_str message
User-facing translated error message.
Definition types.h:85
WalletErrorCode code
Machine-readable error code for callers that need programmatic handling.
Definition types.h:83
FeeReason
Definition fees.h:25