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

Writes a watch&hyphen;only script and its metadata&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
WriteWatchOnly(
    xref:CScript.adoc[CScript] const& script,
    xref:wallet/CKeyMetadata.adoc[CKeyMetadata] const& keymeta);
----

== Return Value

true if the record was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *script*
| The script to watch&period;
| *keymeta*
| The metadata to store&period;
|===


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