types.h
1 // Copyright (c) 2009-2010 Satoshi Nakamoto 2 // Copyright (c) 2009-2021 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 6 //! @file wallet/types.h is a home for public enum and struct type definitions 7 //! that are used by internally by wallet code, but also used externally by node 8 //! or GUI code. 9 //! 10 //! This file is intended to define only simple types that do not have external 11 //! dependencies. More complicated public wallet types like CCoinControl should 12 //! be defined in dedicated header files. 13 14 #ifndef BITCOIN_WALLET_TYPES_H 15 #define BITCOIN_WALLET_TYPES_H 16 17 #include <type_traits> 18 19 namespace wallet { 20 /** 21 * Address purpose field that has been been stored with wallet sending and 22 * receiving addresses since BIP70 payment protocol support was added in 23 * https://github.com/bitcoin/bitcoin/pull/2539. This field is not currently 24 * used for any logic inside the wallet, but it is still shown in RPC and GUI 25 * interfaces and saved for new addresses. It is basically redundant with an 26 * address's IsMine() result. 27 */ 28 enum class AddressPurpose { 29 RECEIVE, 30 SEND, 31 REFUND, //!< Never set in current code may be present in older wallet databases 32 }; 33 } // namespace wallet 34 35 #endif // BITCOIN_WALLET_TYPES_H