Search Results for

    Show / Hide Table of Contents

    Class TezosRpc

    Rpc queries builder

    Inheritance
    System.Object
    TezosRpc
    Namespace: Netezos.Rpc
    Assembly: Netezos.dll
    Syntax
    public class TezosRpc : IDisposable

    Constructors

    | Improve this Doc View Source

    TezosRpc(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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 Source

    Blocks

    Gets the query to the blocks

    Declaration
    public BlocksQuery Blocks { get; }
    Property Value
    Type Description
    BlocksQuery
    | Improve this Doc View Source

    Inject

    Gets the query to the injection

    Declaration
    public InjectionQuery Inject { get; }
    Property Value
    Type Description
    InjectionQuery

    Methods

    | Improve this Doc View Source

    Dispose()

    Releases the unmanaged resources and disposes of the managed resources used by the TezosRpc

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    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

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © Baking Bad