Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePaymentAddress ¶
CreatePaymentAddress is a temp function that creates a payment address of a specific shard.
func ParseResponse ¶
ParseResponse parses a JSON-RPC response to val.
Types ¶
type JsonRequest ¶
type JsonRequest struct { JsonRPC string `json:"Jsonrpc"` Method string `json:"Method"` Params interface{} `json:"Params"` Id interface{} `json:"Id"` }
JsonRequest represents a JSON-RPC request.
func CreateJsonRequest ¶
func CreateJsonRequest(jsonRPC, method string, params []interface{}, id interface{}) *JsonRequest
CreateJsonRequest creates a new JsonRequest given the method and parameters.
type JsonResponse ¶
type JsonResponse struct { Id *interface{} `json:"Id"` Result json.RawMessage `json:"Result"` Error *RPCError `json:"Error"` Params interface{} `json:"Params"` Method string `json:"Method"` JsonRPC string `json:"Jsonrpc"` }
JsonResponse represents a JSON-RPC response.
func OldParseResponse
deprecated
func OldParseResponse(respondInBytes []byte) (*JsonResponse, error)
OldParseResponse parses a raw JSON-RPC response into a JsonResponse.
Deprecated: use ParseResponse instead.
Click to show internal directories.
Click to hide internal directories.