A dynamically typed JSON value used across Bitcoin Core's RPC layer.

Synopsis

Declared in <univalue/include/univalue.h>

class UniValue;

Non-Member Functions

Name

Description

AmountFromValue

Validate and return a CAmount from a UniValue number or string.

BanMapFromJson

Convert a JSON array to a banmap_t object.

BanMapToJson

Convert a banmap_t object to a JSON array.

ConstructTransaction

Create a transaction from univalue parameters

CreateUTXOSnapshot

Helper to create UTXO snapshots given a chainstate and a file handle.

DescribeAddress

Describe an address as a JSON object for RPC output.

EvalDescriptorStringOrObject

Evaluate a descriptor given as a string, or as a {"desc":...,"range":...} object, with default range of 1000.

ExecuteHTTPRPC

Execute a single HTTP request containing one or more JSONRPC requests. Specified jreq will be modified and status will be returned.

JSONRPCError

Build a JSON‐RPC error object.

JSONRPCExec

Execute an RPC request and return its JSON‐RPC reply.

JSONRPCPSBTError

Build a JSON‐RPC error object for a PSBT error.

JSONRPCProcessBatchReply

Parse JSON‐RPC batch reply into a vector

JSONRPCReplyObj

Build a JSON‐RPC reply object from a result or error.

JSONRPCRequestObj

JSON‐RPC 2.0 request, only used in bitcoin‐cli

JSONRPCTransactionError

Build a JSON‐RPC error object for a transaction error.

MempoolInfoToJSON

Mempool information to JSON

MempoolToJSON

Mempool to JSON

NormalizeOutputs

Normalize univalue‐represented outputs

ParseConfirmTarget

Parse a confirm target option and raise an RPC error if it is invalid.

ParseDescriptorRange

Parse a JSON range specified as an int64 or as a [int64, int64]pair.

ParseFeeRate

Parse a json number or string, denoting BTC/kvB, into a CFeeRate (sat/kvB). Reject negative values or rates larger than 1BTC/kvB.

ParseHashO

Parse a hex‐encoded hash from a named field of an object.

ParseHashV

Parse a hex‐encoded hash from a UniValue, throwing an RPC error if it is not valid hex.

ParseHexO

Parse a hex‐encoded byte vector from a named field of an object.

ParseHexV

Parse a hex‐encoded byte vector from a UniValue, throwing an RPC error if it is not valid hex.

ParseOutputs

Parse normalized outputs into destination, amount tuples

ParsePrevouts

Parse a prevtxs UniValue array and get the map of coins from it

ParseSighashString

Parse a sighash string representation and raise an RPC error if it is invalid.

ParseVerbosity

Parses verbosity from provided UniValue.

PushWarnings

Push warning messages to an RPC "warnings" field as a JSON array of strings.

RPCConvertNamedValues

Convert named arguments to command‐specific RPC representation

RPCConvertValues

Convert positional arguments to command‐specific RPC representation

RPCTypeCheckObj

Check that an object contains the expected keys with the expected value types.

RunCommandParseJSON

Execute a command which returns JSON, and parse the result.

ValueFromAmount

Convert an amount in satoshis into a JSON value denominated in whole coins.

blockToJSON

Block description to JSON

blockheaderToJSON

Block header to JSON

node::GetWarningsForRpc

RPC helper function that wraps warnings.GetMessages().

wallet::AppendLastProcessedBlock

Appends the wallet's last processed block to an RPC result object.

wallet::LabelFromValue

Validates and extracts an address label from an RPC value.

Created with MrDocs