Represents a client for making JSON-RPC requests to a specified endpoint. This class handles sending JSON-RPC requests over HTTP and receiving responses.

Hierarchy

  • JSONRPCLib

Constructors

Properties

Methods

Constructors

  • Constructs a new instance of the JSONRPCLib class.

    Parameters

    • _endpoint: string

      The endpoint URL to send JSON-RPC requests to.

    • _options: JSONRPCOption

      Options for configuring the JSON-RPC client's behavior.

    Returns JSONRPCLib

Properties

client: JSONRPCClient<void>

The underlying JSON-RPC client used to manage requests and responses.

endpoint: string = ""

The endpoint URL to which JSON-RPC requests will be sent.

options: JSONRPCOption

Options for configuring the JSON-RPC client's behavior.

Methods

  • Sends a JSON-RPC request to the specified method with the provided parameters.

    Parameters

    • _method: string

      The JSON-RPC method to call.

    • _params: any

      The parameters to include in the JSON-RPC request.

    Returns Promise<any>

    • A Promise that resolves to the JSON-RPC response.

Generated using TypeDoc