[#AmountFromValue]
= AmountFromValue
:mrdocs:

Validate and return a CAmount from a UniValue number or string&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CAmount.adoc[CAmount]
AmountFromValue(
    xref:UniValue.adoc[UniValue] const& value,
    int decimals = 8);
----

== Return Value

a CAmount if the various checks pass&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value* [in]
| UniValue number or string to parse&period;
| *decimals* [in]
| Number of significant digits (default&colon; 8)&period;
|===


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