JSONRPCRequest

constructor(id: RequestId = RequestId(Uuid.random().toHexString()), method: String, params: JsonElement? = null)(source)


constructor(id: String, method: String, params: JsonElement? = null)(source)

Secondary constructor for creating a JSONRPCRequest using a string-based ID.

Parameters

id

The string ID for the request.

method

The method name for the request.

params

The parameters for the request as a JSON element. Defaults to null.


constructor(id: Long, method: String, params: JsonElement? = null)(source)

Constructs a JSON-RPC request using a numerical ID, method name, and optional parameters.

Parameters

id

The numerical ID for the request.

method

The method name for the request.

params

The parameters for the request as a JSON element. Defaults to null.