wallet::AddressPurpose

Address purpose field that has been been stored with wallet sending and receiving addresses since BIP70 payment protocol support was added in https://github.com/bitcoin/bitcoin/pull/2539. This field is not currently used for any logic inside the wallet, but it is still shown in RPC and GUI interfaces and saved for new addresses. It is basically redundant with an address's IsMine() result.

Synopsis

Declared in <wallet/types.h>

enum class AddressPurpose : int;

Members

NameDescription
RECEIVE Address is used to receive funds.
SEND Address is used to send funds to another party.
REFUND Never set in current code may be present in older wallet databases

Non-Member Functions

NameDescription
PurposeFromStringParse an address purpose from its serialized string form.
PurposeToStringConvert an address purpose to its serialized string form.