Table of Contents

Interface IRpcClient

Namespace
chia.dotnet
Assembly
chia-dotnet.dll

Interface representing rpc communication

public interface IRpcClient : IDisposable
Inherited Members
Extension Methods

Properties

Endpoint

Details of the RPC service endpoint

EndpointInfo Endpoint { get; init; }

Property Value

EndpointInfo
Interface representing rpc communication

Methods

PostMessage(Message, CancellationToken)

Posts a Message to the Endpoint but does not wait for a response

Task PostMessage(Message message, CancellationToken cancellationToken = default)

Parameters

message Message

The message to post

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task

Awaitable Task

Remarks

Awaiting this method waits for the message to be sent only. It doesn't await a response.

SendMessage(Message, CancellationToken)

Sends a Message to the Endpoint and waits for a response

Task<dynamic> SendMessage(Message message, CancellationToken cancellationToken = default)

Parameters

message Message

The message to send

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<dynamic>

The response message

Remarks

Awaiting this method will block until a response is received from the Endpoint or the A token to allow the call to be cancelled is cancelled

Exceptions

ResponseException

Throws when IsSuccessfulResponse is False