jsonrpcclient

package
v0.0.0-...-9abe75c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectId = errors.New("incorrect id")

Functions

func CheckForError

func CheckForError(res *http.Response) (jsonrpcmodels.JsonRpcResponse, error)

CheckForError reads the http response and formats the error if it exists

func CreateRequest

func CreateRequest(reqParams client.XRPLRequest) ([]byte, error)

CreateRequest formats the parameters and method name ready for sending request Params will have been serialised if required and added to request struct before being passed to this method

func NewClient

func NewClient(cfg *client.JsonRpcConfig) *client.XRPLClient

Types

type JsonRpcClient

type JsonRpcClient struct {
	Config *client.JsonRpcConfig
}

func NewJsonRpcClient

func NewJsonRpcClient(cfg *client.JsonRpcConfig) *JsonRpcClient

func (*JsonRpcClient) SendRequest

func (c *JsonRpcClient) SendRequest(reqParams client.XRPLRequest) (client.XRPLResponse, error)

satisfy the Client interface

type JsonRpcClientError

type JsonRpcClientError struct {
	ErrorString string
}

func (*JsonRpcClientError) Error

func (e *JsonRpcClientError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL