ParseHashV

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

Synopsis

Declared in <rpc/util.h>

uint256
ParseHashV(
    UniValue const& v,
    std::string_view name);

Return Value

The parsed 256-bit hash.

Parameters

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