Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RPCClient

JSON RPC 2.0 client interface.

Hierarchy

  • RPCClient

Implemented by

Index

Methods

Methods

request

  • request(method: string, params: any[]): Promise<any>
  • Sends a request to the server.

    Parameters

    • method: string

      The method to call.

    • params: any[]

      The parameters to pass to the method.

    Returns Promise<any>

    A promise that resolves to the result of the method call.

subscribe

  • Subscribe to an event using WebSockets.

    Parameters

    • method: string

      The method to call.

    • params: any[]

      The parameters to pass to the method.

    • subscriber: Subscriber<any>

      The subscriber to subscribe to the event.

    Returns Promise<Subscription>

    A subscription object that can be used to unsubscribe from the event.

Generated using TypeDoc