class HyperionApiClient::Clients::ChainClient
: public ClientExtensions
Members | Descriptions |
---|---|
public string BaseUrl |
|
public ChainClient (HttpClient httpClient) |
|
public async Task AbiBinToJsonAsync (string code, string action, string binargs, CancellationToken cancellationToken) = default |
Returns an object containing rows from the specified table. |
public async Task AbiJsonToBinAsync (string binargs, CancellationToken cancellationToken) = default |
Convert JSON object to binary. |
public async Task< GetAbiResponse > GetAbiAsync (string accountName, CancellationToken cancellationToken) = default |
Retrieves the ABI for a contract based on its account name. |
public async Task< GetAccountResponse2 > GetAccountAsync (string accountName, CancellationToken cancellationToken) = default |
Returns an object containing various details about a specific account on the blockchain. |
public async Task< GetActivatedProtocolFeaturesResponse > GetActivatedProtocolFeaturesAsync (int? lowerBound, int? upperBound, int? limit, bool? searchByBlockNum, bool? reverse, CancellationToken cancellationToken) = default |
Retreives the activated protocol features for producer node. |
public async Task< GetBlockResponse2 > GetBlockAsync (string blockNumOrId, CancellationToken cancellationToken) = default |
Returns an object containing various details about a specific block on the blockchain. |
public async Task< GetBlockHeaderStateResponse > GetBlockHeaderStateAsync (string blockNumOrId, CancellationToken cancellationToken) = default |
Retrieves the block header state. |
public async Task< GetCodeResponse > GetCodeAsync (string accountName, bool codeAsWasm, CancellationToken cancellationToken) = default |
Retrieves contract code. |
public async Task< List< string > > GetCurrencyBalanceAsync (string code, string account, string symbol, CancellationToken cancellationToken) = default |
Retrieves the current balance. |
public async Task< string > GetCurrencyStatsAsync (string code, string symbol, CancellationToken cancellationToken) = default |
Retrieves currency stats. |
public async Task< GetInfoResponse > GetInfoAsync (CancellationToken cancellationToken) = default |
Returns an object containing various details about the blockchain. |
public async Task< GetProducersResponse > GetProducersAsync (string limit, string lowerBound, bool? json, CancellationToken cancellationToken) = default |
Retrieves producers list. |
public async Task GetRawAbiAsync (string accountName, CancellationToken cancellationToken) = default |
Retrieves raw ABI for a contract based on account name. |
public async Task GetRawCodeAndAbiAsync (string accountName, CancellationToken cancellationToken) = default |
Retrieves raw code and ABI for a contract based on account name. |
public async Task GetScheduledTransactionAsync (string lowerBound, int? limit, bool? json, CancellationToken cancellationToken) = default |
Retrieves the scheduled transaction. |
public async Task< GetTableByScopeResponse > GetTableByScopeAsync (string code, string table, string lowerBound, string upperBound, int? limit, bool? reverse, CancellationToken cancellationToken) = default |
Retrieves table scope. |
public async Task GetTableRowsAsync (string code, string table, string scope, string indexPosition, string keyType, string encodeType, string upperBound, string lowerBound, CancellationToken cancellationToken) = default |
Returns an object containing rows from the specified table. |
public async Task PushTransactionAsync (object body, CancellationToken cancellationToken) = default |
This method expects a transaction in JSON format and will attempt to apply it to the blockchain. |
public async Task PushTransactionsAsync (IEnumerable< object > body, CancellationToken cancellationToken) = default |
This method expects a transaction in JSON format and will attempt to apply it to the blockchain. |
public async Task SendTransactionAsync (object body, CancellationToken cancellationToken) = default |
This method expects a transaction in JSON format and will attempt to apply it to the blockchain. |
private readonly HttpClient _httpClient |
public string
BaseUrl
public
ChainClient
(HttpClient httpClient)
public async Task
AbiBinToJsonAsync
(string code, string action, string binargs, CancellationToken cancellationToken) = default
Returns an object containing rows from the specified table.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task
AbiJsonToBinAsync
(string binargs, CancellationToken cancellationToken) = default
Convert JSON object to binary.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task< GetAbiResponse >
GetAbiAsync
(string accountName, CancellationToken cancellationToken) = default
Retrieves the ABI for a contract based on its account name.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task< GetAccountResponse2 >
GetAccountAsync
(string accountName, CancellationToken cancellationToken) = default
Returns an object containing various details about a specific account on the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task< GetActivatedProtocolFeaturesResponse >
GetActivatedProtocolFeaturesAsync
(int? lowerBound, int? upperBound, int? limit, bool? searchByBlockNum, bool? reverse, CancellationToken cancellationToken) = default
Retreives the activated protocol features for producer node.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
lower_bound
Lower bound -
upper_bound
Upper bound -
limit
The limit, default is 10 -
search_by_block_num
Flag to indicate it is has to search by block number -
reverse
Flag to indicate it has to search in reverse
Default Response
ApiException
A server side error occurred.
public async Task< GetBlockResponse2 >
GetBlockAsync
(string blockNumOrId, CancellationToken cancellationToken) = default
Returns an object containing various details about a specific block on the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
block_num_or_id
Provide ablock number
or ablock id
Default Response
ApiException
A server side error occurred.
public async Task< GetBlockHeaderStateResponse >
GetBlockHeaderStateAsync
(string blockNumOrId, CancellationToken cancellationToken) = default
Retrieves the block header state.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
blockNumOrId
Provide a block_number or a block_id
Default Response
ApiException
A server side error occurred.
public async Task< GetCodeResponse >
GetCodeAsync
(string accountName, bool codeAsWasm, CancellationToken cancellationToken) = default
Retrieves contract code.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
code_as_wasm
This must be 1 (true)
Default Response
ApiException
A server side error occurred.
public async Task< List< string > >
GetCurrencyBalanceAsync
(string code, string account, string symbol, CancellationToken cancellationToken) = default
Retrieves the current balance.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
symbol
A symbol composed of capital letters between 1-7.
Default Response
ApiException
A server side error occurred.
public async Task< string >
GetCurrencyStatsAsync
(string code, string symbol, CancellationToken cancellationToken) = default
Retrieves currency stats.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
code
contract name -
symbol
token symbol
Default Response
ApiException
A server side error occurred.
public async Task< GetInfoResponse >
GetInfoAsync
(CancellationToken cancellationToken) = default
Returns an object containing various details about the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task< GetProducersResponse >
GetProducersAsync
(string limit, string lowerBound, bool? json, CancellationToken cancellationToken) = default
Retrieves producers list.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
limit
total number of producers to retrieve -
lower_bound
In conjunction with limit can be used to paginate through the results. For example, limit=10 and lower_bound=10 would be page 2 -
json
return result in JSON format
Default Response
ApiException
A server side error occurred.
public async Task
GetRawAbiAsync
(string accountName, CancellationToken cancellationToken) = default
Retrieves raw ABI for a contract based on account name.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task
GetRawCodeAndAbiAsync
(string accountName, CancellationToken cancellationToken) = default
Retrieves raw code and ABI for a contract based on account name.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task
GetScheduledTransactionAsync
(string lowerBound, int? limit, bool? json, CancellationToken cancellationToken) = default
Retrieves the scheduled transaction.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
lower_bound
Date/time string in the format YYYY-MM-DDTHH:MM:SS.sss -
limit
The maximum number of transactions to return -
json
true/false whether the packed transaction is converted to json
Default Response
ApiException
A server side error occurred.
public async Task< GetTableByScopeResponse >
GetTableByScopeAsync
(string code, string table, string lowerBound, string upperBound, int? limit, bool? reverse, CancellationToken cancellationToken) = default
Retrieves table scope.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
code
name
of the contract to return table data for -
table
Filter results by table -
lower_bound
Filters results to return the first element that is not less than provided value in set -
upper_bound
Filters results to return the first element that is greater than provided value in set -
limit
Limit number of results returned. -
reverse
Reverse the order of returned results
Default Response
ApiException
A server side error occurred.
public async Task
GetTableRowsAsync
(string code, string table, string scope, string indexPosition, string keyType, string encodeType, string upperBound, string lowerBound, CancellationToken cancellationToken) = default
Returns an object containing rows from the specified table.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
-
code
The name of the smart contract that controls the provided table -
table
The name of the table to query -
scope
The account to which this data belongs -
index_position
Position of the index used, accepted parametersprimary
,secondary
,tertiary
,fourth
,fifth
,sixth
,seventh
,eighth
,ninth
,tenth
-
key_type
Type of key specified by index_position (for example -uint64_t
orname
)
Default Response
ApiException
A server side error occurred.
public async Task
PushTransactionAsync
(object body, CancellationToken cancellationToken) = default
This method expects a transaction in JSON format and will attempt to apply it to the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task
PushTransactionsAsync
(IEnumerable< object > body, CancellationToken cancellationToken) = default
This method expects a transaction in JSON format and will attempt to apply it to the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.
public async Task
SendTransactionAsync
(object body, CancellationToken cancellationToken) = default
This method expects a transaction in JSON format and will attempt to apply it to the blockchain.
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Default Response
ApiException
A server side error occurred.