I can see some scenarios where the caller wants to provide an explicit JSONRPC request ID, but we currently don't expose that.
One solution would be in the GetBlockByNumber, etc. methods in the websocket.Connection interface took options as the last argument(s) (as varargs), and we provided a way to specify the request ID in those options. I can't think of any other options we'd want to implement right now, but could see us exposing options to configure the underlaying http or websocket requests (e.g. http headers or timeouts).
I can see some scenarios where the caller wants to provide an explicit JSONRPC request ID, but we currently don't expose that.
One solution would be in the
GetBlockByNumber
, etc. methods in thewebsocket.Connection
interface took options as the last argument(s) (as varargs), and we provided a way to specify the request ID in those options. I can't think of any other options we'd want to implement right now, but could see us exposing options to configure the underlaying http or websocket requests (e.g. http headers or timeouts).