NewResponse returns a new JSON-RPC response object given the provided id, marshalled result, and RPC error. This function is only provided in case the caller wants to construct raw responses for some reason.

Typically callers will instead want to create the fully marshalled JSON-RPC response to send over the wire with the MarshalResponse function.

NewResponse is referenced in 1 repository