Class FlowGrpcClient
Inheritance
FlowGrpcClient
Assembly: Flow.Net.Sdk.Client.Grpc.dll
Syntax
public class FlowGrpcClient : IFlowClient
Constructors
|
Improve this Doc
View Source
FlowGrpcClient(FlowGrpcClientOptions)
A gRPC client for the Flow Access API.
Declaration
public FlowGrpcClient(FlowGrpcClientOptions clientOptions)
Parameters
Exceptions
Methods
|
Improve this Doc
View Source
ExecuteScriptAtBlockHeightAsync(FlowScript, UInt64)
Declaration
public Task<ICadence> ExecuteScriptAtBlockHeightAsync(FlowScript flowScript, ulong blockHeight)
Parameters
Returns
|
Improve this Doc
View Source
ExecuteScriptAtBlockHeightAsync(FlowScript, UInt64, CallOptions)
Executes a ready-only Cadence script against the execution state at the given block height.
Declaration
public async Task<ICadence> ExecuteScriptAtBlockHeightAsync(FlowScript flowScript, ulong blockHeight, CallOptions options)
Parameters
Type |
Name |
Description |
FlowScript |
flowScript |
|
UInt64 |
blockHeight |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
ExecuteScriptAtBlockIdAsync(FlowScript, String)
Declaration
public Task<ICadence> ExecuteScriptAtBlockIdAsync(FlowScript flowScript, string blockId)
Parameters
Returns
|
Improve this Doc
View Source
ExecuteScriptAtBlockIdAsync(FlowScript, String, CallOptions)
Executes a ready-only Cadence script against the execution state at the block with the given Id.
Declaration
public async Task<ICadence> ExecuteScriptAtBlockIdAsync(FlowScript flowScript, string blockId, CallOptions options)
Parameters
Type |
Name |
Description |
FlowScript |
flowScript |
|
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
ExecuteScriptAtLatestBlockAsync(FlowScript)
Declaration
public Task<ICadence> ExecuteScriptAtLatestBlockAsync(FlowScript flowScript)
Parameters
Returns
|
Improve this Doc
View Source
ExecuteScriptAtLatestBlockAsync(FlowScript, CallOptions)
Executes a read-only Cadence script against the latest sealed execution state.
Declaration
public async Task<ICadence> ExecuteScriptAtLatestBlockAsync(FlowScript flowScript, CallOptions options)
Parameters
Type |
Name |
Description |
FlowScript |
flowScript |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetAccountAtBlockHeightAsync(String, UInt64)
Declaration
public Task<FlowAccount> GetAccountAtBlockHeightAsync(string address, ulong blockHeight)
Parameters
Returns
|
Improve this Doc
View Source
GetAccountAtBlockHeightAsync(String, UInt64, CallOptions)
Gets an account by address at the given block height.
Declaration
public async Task<FlowAccount> GetAccountAtBlockHeightAsync(string address, ulong blockHeight, CallOptions options)
Parameters
Type |
Name |
Description |
String |
address |
|
UInt64 |
blockHeight |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetAccountAtLatestBlockAsync(String)
Declaration
public Task<FlowAccount> GetAccountAtLatestBlockAsync(string address)
Parameters
Type |
Name |
Description |
String |
address |
|
Returns
|
Improve this Doc
View Source
GetAccountAtLatestBlockAsync(String, CallOptions)
Gets an account by address at the latest sealed block.
Declaration
public async Task<FlowAccount> GetAccountAtLatestBlockAsync(string address, CallOptions options)
Parameters
Type |
Name |
Description |
String |
address |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetBlockByHeightAsync(UInt64)
Declaration
public Task<FlowBlock> GetBlockByHeightAsync(ulong height)
Parameters
Type |
Name |
Description |
UInt64 |
height |
|
Returns
|
Improve this Doc
View Source
GetBlockByHeightAsync(UInt64, CallOptions)
Gets a full block by height.
Declaration
public async Task<FlowBlock> GetBlockByHeightAsync(ulong height, CallOptions options)
Parameters
Type |
Name |
Description |
UInt64 |
height |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetBlockByIdAsync(String)
Declaration
public Task<FlowBlock> GetBlockByIdAsync(string blockId)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Returns
|
Improve this Doc
View Source
GetBlockByIdAsync(String, CallOptions)
Declaration
public async Task<FlowBlock> GetBlockByIdAsync(string blockId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
Declaration
public Task<FlowBlockHeader> GetBlockHeaderByHeightAsync(ulong height)
Parameters
Type |
Name |
Description |
UInt64 |
height |
|
Returns
|
Improve this Doc
View Source
Gets a block header by height.
Declaration
public async Task<FlowBlockHeader> GetBlockHeaderByHeightAsync(ulong height, CallOptions options)
Parameters
Type |
Name |
Description |
UInt64 |
height |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
Declaration
public Task<FlowBlockHeader> GetBlockHeaderByIdAsync(string blockId)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Returns
|
Improve this Doc
View Source
Gets a block header by Id.
Declaration
public async Task<FlowBlockHeader> GetBlockHeaderByIdAsync(string blockId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetCollectionAsync(String)
Declaration
public Task<FlowCollection> GetCollectionAsync(string collectionId)
Parameters
Type |
Name |
Description |
String |
collectionId |
|
Returns
|
Improve this Doc
View Source
GetCollectionAsync(String, CallOptions)
Declaration
public async Task<FlowCollection> GetCollectionAsync(string collectionId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
collectionId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetEventsForBlockIdsAsync(String, IEnumerable<String>)
Declaration
public Task<IEnumerable<FlowBlockEvent>> GetEventsForBlockIdsAsync(string eventType, IEnumerable<string> blockIds)
Parameters
Returns
|
Improve this Doc
View Source
GetEventsForBlockIdsAsync(String, IEnumerable<String>, CallOptions)
Retrieves events with the given type from the specified block Ids.
Declaration
public async Task<IEnumerable<FlowBlockEvent>> GetEventsForBlockIdsAsync(string eventType, IEnumerable<string> blockIds, CallOptions options)
Parameters
Returns
Exceptions
|
Improve this Doc
View Source
GetEventsForHeightRangeAsync(String, UInt64, UInt64)
Declaration
public Task<IEnumerable<FlowBlockEvent>> GetEventsForHeightRangeAsync(string eventType, ulong startHeight, ulong endHeight)
Parameters
Returns
|
Improve this Doc
View Source
GetEventsForHeightRangeAsync(String, UInt64, UInt64, CallOptions)
Retrieves events for all sealed blocks between the start and end block heights (inclusive) with the given type.
Declaration
public async Task<IEnumerable<FlowBlockEvent>> GetEventsForHeightRangeAsync(string eventType, ulong startHeight, ulong endHeight, CallOptions options)
Parameters
Type |
Name |
Description |
String |
eventType |
|
UInt64 |
startHeight |
|
UInt64 |
endHeight |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetExecutionResultForBlockIdAsync(String)
Declaration
public Task<FlowExecutionResult> GetExecutionResultForBlockIdAsync(string blockId)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Returns
|
Improve this Doc
View Source
GetExecutionResultForBlockIdAsync(String, CallOptions)
Declaration
public async Task<FlowExecutionResult> GetExecutionResultForBlockIdAsync(string blockId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetLatestBlockAsync(Boolean)
Declaration
public Task<FlowBlock> GetLatestBlockAsync(bool isSealed = true)
Parameters
Type |
Name |
Description |
Boolean |
isSealed |
|
Returns
|
Improve this Doc
View Source
GetLatestBlockAsync(Boolean, CallOptions)
Gets the full payload of the latest sealed or unsealed block.
Declaration
public async Task<FlowBlock> GetLatestBlockAsync(bool isSealed, CallOptions options)
Parameters
Type |
Name |
Description |
Boolean |
isSealed |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
Declaration
public Task<FlowBlockHeader> GetLatestBlockHeaderAsync(bool isSealed = true)
Parameters
Type |
Name |
Description |
Boolean |
isSealed |
|
Returns
|
Improve this Doc
View Source
Gets the latest sealed or unsealed block header.
Declaration
public async Task<FlowBlockHeader> GetLatestBlockHeaderAsync(bool isSealed, CallOptions options)
Parameters
Type |
Name |
Description |
Boolean |
isSealed |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetLatestProtocolStateSnapshotAsync()
Declaration
public Task<FlowProtocolStateSnapshot> GetLatestProtocolStateSnapshotAsync()
Returns
|
Improve this Doc
View Source
GetLatestProtocolStateSnapshotAsync(CallOptions)
Retrieves the latest snapshot of the protocol state in serialized form.
This is used to generate a root snapshot file used by Flow nodes to bootstrap their local protocol state database.
Declaration
public async Task<FlowProtocolStateSnapshot> GetLatestProtocolStateSnapshotAsync(CallOptions options)
Parameters
Type |
Name |
Description |
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetNetworkParametersAsync(CallOptions)
Retrieves network parameters
Declaration
public async Task<FlowNetworkParameters> GetNetworkParametersAsync(CallOptions options = default(CallOptions))
Parameters
Type |
Name |
Description |
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetTransactionAsync(String)
Declaration
public Task<FlowTransactionResponse> GetTransactionAsync(string transactionId)
Parameters
Type |
Name |
Description |
String |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetTransactionAsync(String, CallOptions)
Gets a transaction by Id.
Declaration
public async Task<FlowTransactionResponse> GetTransactionAsync(string transactionId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
transactionId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetTransactionResultAsync(String)
Declaration
public Task<FlowTransactionResult> GetTransactionResultAsync(string transactionId)
Parameters
Type |
Name |
Description |
String |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetTransactionResultAsync(String, CallOptions)
Gets the result of a transaction.
Declaration
public async Task<FlowTransactionResult> GetTransactionResultAsync(string transactionId, CallOptions options)
Parameters
Type |
Name |
Description |
String |
transactionId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetTransactionResultByIndexAsync(String, UInt32, CallOptions)
Gets the result of a transaction at a specified block and index
Declaration
public async Task<FlowTransactionResult> GetTransactionResultByIndexAsync(string blockId, uint index, CallOptions options = default(CallOptions))
Parameters
Type |
Name |
Description |
String |
blockId |
|
UInt32 |
index |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetTransactionResultsByBlockIdAsync(String, CallOptions)
Gets all the transaction results for a specified block
Declaration
public async Task<IEnumerable<FlowTransactionResult>> GetTransactionResultsByBlockIdAsync(string blockId, CallOptions options = default(CallOptions))
Parameters
Type |
Name |
Description |
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
GetTransactionsByBlockIdAsync(String, CallOptions)
Gets all the transactions for a specified block
Declaration
public async Task<IEnumerable<FlowTransaction>> GetTransactionsByBlockIdAsync(string blockId, CallOptions options = default(CallOptions))
Parameters
Type |
Name |
Description |
String |
blockId |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
PingAsync()
Declaration
Returns
|
Improve this Doc
View Source
PingAsync(CallOptions)
Check if the access node is alive and healthy.
Declaration
public async Task PingAsync(CallOptions options)
Parameters
Type |
Name |
Description |
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
|
Improve this Doc
View Source
SendTransactionAsync(FlowTransaction)
Declaration
public Task<FlowTransactionId> SendTransactionAsync(FlowTransaction flowTransaction)
Parameters
Returns
|
Improve this Doc
View Source
SendTransactionAsync(FlowTransaction, CallOptions)
Declaration
public async Task<FlowTransactionId> SendTransactionAsync(FlowTransaction flowTransaction, CallOptions options)
Parameters
Type |
Name |
Description |
FlowTransaction |
flowTransaction |
|
Grpc.Core.CallOptions |
options |
|
Returns
|
Improve this Doc
View Source
WaitForSealAsync(String, Int32, Int32)
Declaration
public Task<FlowTransactionResult> WaitForSealAsync(string transactionId, int delayMs = 1000, int timeoutMs = 30000)
Parameters
Returns
|
Improve this Doc
View Source
WaitForSealAsync(String, Int32, Int32, CallOptions)
Waits for transaction result status to be sealed.
Declaration
public async Task<FlowTransactionResult> WaitForSealAsync(string transactionId, int delayMs, int timeoutMs, CallOptions options)
Parameters
Type |
Name |
Description |
String |
transactionId |
|
Int32 |
delayMs |
|
Int32 |
timeoutMs |
|
Grpc.Core.CallOptions |
options |
|
Returns
Exceptions
Implements