[#wallet-CWallet-SetAddressBook]
= xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::SetAddressBook
:relfileprefix: ../../
:mrdocs:

Set the address book label and purpose for a destination&period;

== Synopsis

Declared in `&lt;wallet&sol;wallet&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SetAddressBook(
    xref:CTxDestination.adoc[CTxDestination] const& address,
    std::string const& strName,
    std::optional&lt;AddressPurpose&gt; const& purpose);
----

== Return Value

true if the entry was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *address*
| The destination to update&period;
| *strName*
| The label to assign&period;
| *purpose*
| Optional purpose to record for the address&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
