Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
RPCClient is a client for the JSON RPC
func NewRPCClient ¶
NewRPCClient creates an instance of client
type Request ¶
type Request struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json:"id"` Method string `json:"method"` Params json.RawMessage `json:"params,omitempty"` }
Request is a jsonrpc request
type Response ¶
type Response struct { JSONRPC string ID interface{} Result json.RawMessage }
Response is a jsonrpc success response
func JSONRPCCall ¶
func JSONRPCCall(url, method string, httpHeaders map[string]string, id interface{}, parameters ...interface{}) (Response, error)
JSONRPCCall executes a 2.0 JSON RPC HTTP Post Request to the provided URL with the provided method and parameters, which is compatible with the Ethereum JSON RPC Server.
Click to show internal directories.
Click to hide internal directories.