Versions in this module Expand all Collapse all v0 v0.1.0 Apr 15, 2023 Changes in this version + const CommitmentConfirmed + const CommitmentFinalized + const CommitmentProcessed + const EncodingBase58 + const EncodingBase64 + const EncodingBase64Zstd + const EncodingJSONParsed + const EventAccountNotification + const SubscribeAccountRequest + const UnsubscribeAccountRequest + var ErrConnectionClosed = errors.New("connection closed") + var ErrInvalidResponse = errors.New("invalid response") + func AccountSubscribeRequestPayload(base58Addr string) []interface + func AccountUnsubscribeRequestPayload(subscriptionID interface{}) []interface + type Client struct + func NewClient(conn *websocket.Conn, opts ...ClientOption) *Client + func (c *Client) ListenNewTransactions(event events.EventName, payload interface{}) error + func (c *Client) ListenTransactionUpdates(event events.EventName, payload interface{}) error + func (c *Client) Run(ctx context.Context) error + func (c *Client) Subscribe(base58Addr string) error + func (c *Client) Unsubscribe(subID float64) error + func (c *Client) UnsubscribeByAddress(base58Addr string) error + type ClientOption func(*Client) + func WithEventsEmitter(e eventsEmitter) ClientOption + func WithLogger(l logger) ClientOption + type Error struct + Code int + Message string + func (e *Error) Error() string + type Event struct + Method string + Params *EventParams + Version string + type EventHandler func(base58Addr string, event json.RawMessage) error + type EventParams struct + Result json.RawMessage + Subscription json.Number + type NotificationPayload struct + Result struct{ ... } + Subscription int + type Request struct + ID uint64 + Method string + Params interface{} + Version string + type Response struct + Error *Error + ID uint64 + Result json.RawMessage + Version string + type ResponseCallback func(json.RawMessage, error) error