Class RpcMethod
Wrapper class for an RPC call method that can be serialized to JSON.
Assembly: Casper.Network.SDK.dll
Syntax
public abstract class RpcMethod
Constructors
|
Edit this page
View Source
RpcMethod(string)
Declaration
public RpcMethod(string method)
Parameters
| Type |
Name |
Description |
| string |
method |
|
|
Edit this page
View Source
RpcMethod(string, string)
Declaration
public RpcMethod(string method, string blockHash)
Parameters
|
Edit this page
View Source
RpcMethod(string, ulong)
Declaration
public RpcMethod(string method, ulong blockHeight)
Parameters
Properties
|
Edit this page
View Source
Id
Id of the RPC request that can be correlated with the equivalent Id in the RPC response
Declaration
[JsonPropertyName("id")]
public uint Id { get; set; }
Property Value
|
Edit this page
View Source
JsonRpc
Version of the RPC protocol in use
Declaration
[JsonPropertyName("jsonrpc")]
public string JsonRpc { get; }
Property Value
|
Edit this page
View Source
Method
Declaration
[JsonPropertyName("method")]
public string Method { get; }
Property Value
|
Edit this page
View Source
Parameters
List of parameters that are included in the RPC Request
Declaration
[JsonPropertyName("params")]
public Dictionary<string, object> Parameters { get; protected set; }
Property Value
|
Edit this page
View Source
SerializerOptions
Declaration
public static JsonSerializerOptions SerializerOptions { get; }
Property Value
Methods
|
Edit this page
View Source
Serialize()
Converts an RpcMethod derived object a JSON string that can be sent to the network
Declaration
public string Serialize()
Returns