Class TezosRpc
Rpc queries builder
Inheritance
Namespace: Netezos.Rpc
Assembly: Netezos.dll
Syntax
public class TezosRpc : IDisposable
Constructors
| Improve this Doc View SourceTezosRpc(HttpClient, Chain)
Creates the instance of TezosRpc
Declaration
public TezosRpc(HttpClient client, Chain chain = Chain.Main)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | client | HttpClient instance that will be used for sending RPC requests. |
Chain | chain | Chain to work with. Note: this is not a network (mainnet or testnet), but a chain of the network. In 99.99% cases you likely want to use Chain.Main, because Chain.Test is only relevant during the testing phase of the Tezos voting process. |
TezosRpc(String, Chain)
Creates the instance of TezosRpc
Declaration
public TezosRpc(string uri, Chain chain = Chain.Main)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | Base URI of the node |
Chain | chain | Chain to work with. Note: this is not a network (mainnet or testnet), but a chain of the particular network. In 99.99% cases you likely want to use Chain.Main, because Chain.Test is only relevant during the testing phase of the Tezos voting process. |
TezosRpc(String, Int32, Chain)
Creates the instance of TezosRpc
Declaration
public TezosRpc(string uri, int timeout, Chain chain = Chain.Main)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | Base URI of the node |
System.Int32 | timeout | Timeout in seconds for the requests |
Chain | chain | Chain to work with. Note: this is not a network (mainnet or testnet), but a chain of the network. In 99.99% cases you likely want to use Chain.Main, because Chain.Test is only relevant during the testing phase of the Tezos voting process. |
Properties
| Improve this Doc View SourceBlocks
Gets the query to the blocks
Declaration
public BlocksQuery Blocks { get; }
Property Value
Type | Description |
---|---|
BlocksQuery |
Inject
Gets the query to the injection
Declaration
public InjectionQuery Inject { get; }
Property Value
Type | Description |
---|---|
InjectionQuery |
Methods
| Improve this Doc View SourceDispose()
Releases the unmanaged resources and disposes of the managed resources used by the TezosRpc
Declaration
public void Dispose()
GetAsync(String)
Sends request and returns the dynamic json object
Declaration
public Task<dynamic> GetAsync(string query)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | Relative path to the RPC method |
Returns
Type | Description |
---|---|
Task<System.Object> |
GetAsync<T>(String)
Sends request and returns the json object, deserialized to the specified type
Declaration
public Task<T> GetAsync<T>(string query)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | Relative path to the RPC method |
Returns
Type | Description |
---|---|
Task<T> |
Type Parameters
Name | Description |
---|---|
T | Type of the object to deserialize to |