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

Ensures that a wallet name is specified across the endpoint and wallet&lowbar;name&period; Throws `RPC&lowbar;INVALID&lowbar;PARAMETER` if none or different wallet names are specified&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::string
EnsureUniqueWalletName(
    xref:JSONRPCRequest.adoc[JSONRPCRequest] const& request,
    std::optional&lt;std::string&lowbar;view&gt; wallet&lowbar;name);
----

== Return Value

The single wallet name agreed upon by the endpoint and wallet&lowbar;name&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *request*
| The JSON&hyphen;RPC request that may encode a wallet name in its endpoint&period;
| *wallet&lowbar;name*
| An explicitly supplied wallet name, if any&period;
|===


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