Bitcoin Core  26.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
wallet::CAddressBookData Struct Reference

Address book data. More...

#include <wallet.h>

Public Member Functions

bool IsChange () const
 Accessor methods. More...
 
std::string GetLabel () const
 
void SetLabel (std::string name)
 

Public Attributes

std::optional< std::string > label
 Address label which is always nullopt for change addresses. More...
 
std::optional< AddressPurposepurpose
 Address purpose which was originally recorded for payment protocol support but now serves as a cached IsMine value. More...
 
bool previously_spent {false}
 Whether coins with this address have previously been spent. More...
 
std::map< std::string, std::string > receive_requests {}
 Map containing data about previously generated receive requests requesting funds to be sent to this address. More...
 

Detailed Description

Address book data.

Definition at line 229 of file wallet.h.

Member Function Documentation

◆ GetLabel()

std::string wallet::CAddressBookData::GetLabel ( ) const
inline

Definition at line 267 of file wallet.h.

◆ IsChange()

bool wallet::CAddressBookData::IsChange ( ) const
inline

Accessor methods.

Definition at line 266 of file wallet.h.

◆ SetLabel()

void wallet::CAddressBookData::SetLabel ( std::string  name)
inline

Definition at line 268 of file wallet.h.

Here is the caller graph for this function:

Member Data Documentation

◆ label

std::optional<std::string> wallet::CAddressBookData::label

Address label which is always nullopt for change addresses.

For sending and receiving addresses, it will be set to an arbitrary label string provided by the user, or to "", which is the default label. The presence or absence of a label is used to distinguish change addresses from non-change addresses by wallet transaction listing and fee bumping code.

Definition at line 238 of file wallet.h.

◆ previously_spent

bool wallet::CAddressBookData::previously_spent {false}

Whether coins with this address have previously been spent.

Set when the the wallet avoid_reuse option is enabled and this is an IsMine address that has already received funds and spent them. This is used during coin selection to increase privacy by not creating different transactions that spend from the same addresses.

Definition at line 254 of file wallet.h.

◆ purpose

std::optional<AddressPurpose> wallet::CAddressBookData::purpose

Address purpose which was originally recorded for payment protocol support but now serves as a cached IsMine value.

Wallet code should not rely on this field being set.

Definition at line 245 of file wallet.h.

◆ receive_requests

std::map<std::string, std::string> wallet::CAddressBookData::receive_requests {}

Map containing data about previously generated receive requests requesting funds to be sent to this address.

Only present for IsMine addresses. Map keys are decimal numbers uniquely identifying each request, and map values are serialized RecentRequestEntry objects containing BIP21 URI information including message and amount.

Definition at line 263 of file wallet.h.


The documentation for this struct was generated from the following file: