Versions in this module Expand all Collapse all v0 v0.9.3 Apr 5, 2024 v0.9.2 Mar 27, 2024 v0.9.1 Mar 27, 2024 v0.9.0 Mar 22, 2024 v0.8.1 Dec 1, 2023 v0.8.0 Dec 1, 2023 v0.7.0 Sep 6, 2022 v0.6.0 Aug 8, 2022 v0.5.5 Aug 4, 2020 v0.5.4 Aug 4, 2020 v0.5.3 Aug 4, 2020 v0.5.2 Aug 4, 2020 v0.5.1 Aug 4, 2020 v0.5.0 Aug 3, 2020 v0.4.1 Apr 14, 2020 v0.4.0 Apr 14, 2020 Changes in this version + func Params(params ...interface{}) interface + type HTTPError struct + Code int + func (e *HTTPError) Error() string + type RPCClient interface + Call func(method string, params ...interface{}) (*RPCResponse, error) + CallBatch func(requests RPCRequests) (RPCResponses, error) + CallBatchRaw func(requests RPCRequests) (RPCResponses, error) + CallFor func(out interface{}, method string, params ...interface{}) error + CallRaw func(request *RPCRequest) (*RPCResponse, error) + func NewClient(endpoint string) RPCClient + func NewClientWithOpts(endpoint string, opts *RPCClientOpts) RPCClient + type RPCClientOpts struct + CustomHeaders map[string]string + HTTPClient *http.Client + type RPCError struct + Code int + Data interface{} + Message string + func (e *RPCError) Error() string + type RPCRequest struct + ID int + JSONRPC string + Method string + Params interface{} + func NewRequest(method string, params ...interface{}) *RPCRequest + type RPCRequests []*RPCRequest + type RPCResponse struct + Error *RPCError + ID int + JSONRPC string + Result interface{} + func (RPCResponse *RPCResponse) GetBool() (bool, error) + func (RPCResponse *RPCResponse) GetFloat() (float64, error) + func (RPCResponse *RPCResponse) GetInt() (int64, error) + func (RPCResponse *RPCResponse) GetObject(toType interface{}) error + func (RPCResponse *RPCResponse) GetString() (string, error) + type RPCResponses []*RPCResponse + func (res RPCResponses) AsMap() map[int]*RPCResponse + func (res RPCResponses) GetByID(id int) *RPCResponse + func (res RPCResponses) HasError() bool