ParseHexV

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

Synopsis

Declared in <rpc/util.h>

std::vector<unsigned char>
ParseHexV(
    UniValue const& v,
    std::string_view name);

Return Value

The decoded bytes.

Parameters

NameDescription
vThe value expected to hold a hex string.
nameThe parameter name used in error messages.