Build a JSON-RPC reply object from a result or error.
Declared in <rpc/request.h>
UniValue
JSONRPCReplyObj(
UniValue result,
UniValue error,
std::optional<UniValue> id,
JSONRPCVersion jsonrpc_version);
A JSON object representing the reply.
| 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. |