[#UniValue]
= UniValue
:mrdocs:

A dynamically typed JSON value used across Bitcoin Core&apos;s RPC layer&period;

== Synopsis

Declared in `&lt;univalue&sol;include&sol;univalue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class UniValue;
----

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:AmountFromValue.adoc[`AmountFromValue`]
| Validate and return a CAmount from a UniValue number or string&period;
| xref:BanMapFromJson.adoc[`BanMapFromJson`]
| Convert a JSON array to a `banmap&lowbar;t` object&period;
| xref:BanMapToJson.adoc[`BanMapToJson`]
| Convert a `banmap&lowbar;t` object to a JSON array&period;
| xref:ConstructTransaction.adoc[`ConstructTransaction`]
| Create a transaction from univalue parameters
| xref:CreateUTXOSnapshot.adoc[`CreateUTXOSnapshot`]
| Helper to create UTXO snapshots given a chainstate and a file handle&period;
| xref:DescribeAddress.adoc[`DescribeAddress`]
| Describe an address as a JSON object for RPC output&period;
| xref:EvalDescriptorStringOrObject.adoc[`EvalDescriptorStringOrObject`]
| Evaluate a descriptor given as a string, or as a &lcub;&quot;desc&quot;&colon;&period;&period;&period;,&quot;range&quot;&colon;&period;&period;&period;&rcub; object, with default range of 1000&period;
| xref:ExecuteHTTPRPC.adoc[`ExecuteHTTPRPC`]
| Execute a single HTTP request containing one or more JSONRPC requests&period; Specified jreq will be modified and status will be returned&period;
| xref:JSONRPCError.adoc[`JSONRPCError`]
| Build a JSON&hyphen;RPC error object&period;
| xref:JSONRPCExec.adoc[`JSONRPCExec`]
| Execute an RPC request and return its JSON&hyphen;RPC reply&period;
| xref:JSONRPCPSBTError.adoc[`JSONRPCPSBTError`]
| Build a JSON&hyphen;RPC error object for a PSBT error&period;
| xref:JSONRPCProcessBatchReply.adoc[`JSONRPCProcessBatchReply`]
| Parse JSON&hyphen;RPC batch reply into a vector
| xref:JSONRPCReplyObj.adoc[`JSONRPCReplyObj`]
| Build a JSON&hyphen;RPC reply object from a result or error&period;
| xref:JSONRPCRequestObj.adoc[`JSONRPCRequestObj`]
| JSON&hyphen;RPC 2&period;0 request, only used in bitcoin&hyphen;cli
| xref:JSONRPCTransactionError.adoc[`JSONRPCTransactionError`]
| Build a JSON&hyphen;RPC error object for a transaction error&period;
| xref:MempoolInfoToJSON.adoc[`MempoolInfoToJSON`]
| Mempool information to JSON
| xref:MempoolToJSON.adoc[`MempoolToJSON`]
| Mempool to JSON
| xref:NormalizeOutputs.adoc[`NormalizeOutputs`]
| Normalize univalue&hyphen;represented outputs
| xref:ParseConfirmTarget.adoc[`ParseConfirmTarget`]
| Parse a confirm target option and raise an RPC error if it is invalid&period;
| xref:ParseDescriptorRange.adoc[`ParseDescriptorRange`]
| Parse a JSON range specified as an int64 or as a &lsqb;int64, int64&rsqb;pair&period;
| xref:ParseFeeRate.adoc[`ParseFeeRate`]
| Parse a json number or string, denoting BTC&sol;kvB, into a CFeeRate (sat&sol;kvB)&period; Reject negative values or rates larger than 1BTC&sol;kvB&period;
| xref:ParseHashO.adoc[`ParseHashO`]
| Parse a hex&hyphen;encoded hash from a named field of an object&period;
| xref:ParseHashV.adoc[`ParseHashV`]
| Parse a hex&hyphen;encoded hash from a UniValue, throwing an RPC error if it is not valid hex&period;
| xref:ParseHexO.adoc[`ParseHexO`]
| Parse a hex&hyphen;encoded byte vector from a named field of an object&period;
| xref:ParseHexV.adoc[`ParseHexV`]
| Parse a hex&hyphen;encoded byte vector from a UniValue, throwing an RPC error if it is not valid hex&period;
| xref:ParseOutputs.adoc[`ParseOutputs`]
| Parse normalized outputs into destination, amount tuples
| xref:ParsePrevouts.adoc[`ParsePrevouts`]
| Parse a prevtxs UniValue array and get the map of coins from it
| xref:ParseSighashString.adoc[`ParseSighashString`]
| Parse a sighash string representation and raise an RPC error if it is invalid&period;
| xref:ParseVerbosity.adoc[`ParseVerbosity`]
| Parses verbosity from provided UniValue&period;
| xref:PushWarnings-02.adoc[`PushWarnings`]
| Push warning messages to an RPC &quot;warnings&quot; field as a JSON array of strings&period;
| xref:RPCConvertNamedValues.adoc[`RPCConvertNamedValues`]
| Convert named arguments to command&hyphen;specific RPC representation
| xref:RPCConvertValues.adoc[`RPCConvertValues`]
| Convert positional arguments to command&hyphen;specific RPC representation
| xref:RPCTypeCheckObj.adoc[`RPCTypeCheckObj`]
| Check that an object contains the expected keys with the expected value types&period;
| xref:RunCommandParseJSON.adoc[`RunCommandParseJSON`]
| Execute a command which returns JSON, and parse the result&period;
| xref:ValueFromAmount.adoc[`ValueFromAmount`]
| Convert an amount in satoshis into a JSON value denominated in whole coins&period;
| xref:blockToJSON.adoc[`blockToJSON`]
| Block description to JSON
| xref:blockheaderToJSON.adoc[`blockheaderToJSON`]
| Block header to JSON
| xref:node/GetWarningsForRpc.adoc[`node&colon;&colon;GetWarningsForRpc`]
| RPC helper function that wraps warnings&period;GetMessages()&period;
| xref:wallet/AppendLastProcessedBlock.adoc[`wallet&colon;&colon;AppendLastProcessedBlock`]
| Appends the wallet&apos;s last processed block to an RPC result object&period;
| xref:wallet/LabelFromValue.adoc[`wallet&colon;&colon;LabelFromValue`]
| Validates and extracts an address label from an RPC value&period;
|===


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