Build a JSON‐RPC reply object from a result or error.
Synopsis
Declared in <rpc/request.h>
UniValue
JSONRPCReplyObj(
UniValue result,
UniValue error,
std::optional<UniValue> id,
JSONRPCVersion jsonrpc_version);
Return Value
A JSON object representing the reply.
Parameters
Name |
Description |
result |
The result value, if the call succeeded. |
error |
The error value, if the call failed. |
id |
The request id being replied to. |
jsonrpc_version |
The protocol version to format the reply for. |
Created with MrDocs