Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIncorrectId = errors.New("incorrect id")
Functions ¶
func NewClient ¶
func NewClient(cfg *WebsocketConfig) *client.XRPLClient
Types ¶
type ErrorWebsocketClientXrplResponse ¶
func (*ErrorWebsocketClientXrplResponse) Error ¶
func (e *ErrorWebsocketClientXrplResponse) Error() string
type WebSocketClientXrplResponse ¶
type WebSocketClientXrplResponse struct {
ID int `json:"id"`
Status string `json:"status"`
Type string `json:"type"`
Error string `json:"error,omitempty"`
Result map[string]any `json:"result,omitempty"`
Value map[string]any `json:"value,omitempty"`
Warning string `json:"warning,omitempty"`
Warnings []client.XRPLResponseWarning `json:"warnings,omitempty"`
Forwarded bool `json:"forwarded,omitempty"`
}
func (*WebSocketClientXrplResponse) CheckError ¶
func (r *WebSocketClientXrplResponse) CheckError() error
func (*WebSocketClientXrplResponse) GetResult ¶
func (r *WebSocketClientXrplResponse) GetResult(v any) error
type WebsocketClient ¶
type WebsocketClient struct {
// contains filtered or unexported fields
}
func NewWebsocketClient ¶
func NewWebsocketClient(cfg *WebsocketConfig) *WebsocketClient
Creates a new websocket client with cfg.
This client will open and close a websocket connection for each request.
func (*WebsocketClient) SendRequest ¶
func (c *WebsocketClient) SendRequest(req client.XRPLRequest) (client.XRPLResponse, error)
type WebsocketConfig ¶
type WebsocketConfig struct {
URL string
}
Click to show internal directories.
Click to hide internal directories.