Bitcoin Core 32.99.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
44enum class AddressPurpose {
45 RECEIVE,
46 SEND,
47 REFUND,
48};
49
60
84
96
97} // namespace wallet
98
99#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
Machine-readable wallet error codes.
Definition types.h:66
@ PassphraseIncorrect
The passphrase does not decrypt the wallet. Callers may ask the user to enter it again.
@ UnlockNeeded
The wallet is locked and the operation requires access to private keys.
@ InvalidDescriptor
TODO Add correct descriptions to each error.
@ GenericError
Generic wallet error.
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.
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
Wallet-layer error with both programmatic and user-facing information.
Definition types.h:90
bilingual_str message
User-facing translated error message.
Definition types.h:94
WalletErrorCode code
Machine-readable error code for callers that need programmatic handling.
Definition types.h:92
FeeReason
Definition fees.h:25
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:82