Flow.Net
Show / Hide Table of Contents

Interface IFlowClient

Namespace: Flow.Net.Sdk.Core.Client
Assembly: Flow.Net.Sdk.Core.dll
Syntax
public interface IFlowClient

Methods

| Improve this Doc View Source

ExecuteScriptAtBlockHeightAsync(FlowScript, UInt64)

Executes a ready-only Cadence script against the execution state at the given block height.

Declaration
Task<ICadence> ExecuteScriptAtBlockHeightAsync(FlowScript flowScript, ulong blockHeight)
Parameters
Type Name Description
FlowScript flowScript
UInt64 blockHeight
Returns
Type Description
Task<ICadence>

ICadence

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

ExecuteScriptAtBlockIdAsync(FlowScript, String)

Executes a ready-only Cadence script against the execution state at the block with the given Id.

Declaration
Task<ICadence> ExecuteScriptAtBlockIdAsync(FlowScript flowScript, string blockId)
Parameters
Type Name Description
FlowScript flowScript
String blockId
Returns
Type Description
Task<ICadence>

ICadence

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

ExecuteScriptAtLatestBlockAsync(FlowScript)

Executes a read-only Cadence script against the latest sealed execution state.

Declaration
Task<ICadence> ExecuteScriptAtLatestBlockAsync(FlowScript flowScript)
Parameters
Type Name Description
FlowScript flowScript
Returns
Type Description
Task<ICadence>

ICadence

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetAccountAtBlockHeightAsync(String, UInt64)

Gets an account by address at the given block height.

Declaration
Task<FlowAccount> GetAccountAtBlockHeightAsync(string address, ulong blockHeight)
Parameters
Type Name Description
String address
UInt64 blockHeight
Returns
Type Description
Task<FlowAccount>

FlowAccount

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetAccountAtLatestBlockAsync(String)

Gets an account by address at the latest sealed block.

Declaration
Task<FlowAccount> GetAccountAtLatestBlockAsync(string address)
Parameters
Type Name Description
String address
Returns
Type Description
Task<FlowAccount>

FlowAccount

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetBlockByHeightAsync(UInt64)

Gets a full block by height.

Declaration
Task<FlowBlock> GetBlockByHeightAsync(ulong height)
Parameters
Type Name Description
UInt64 height
Returns
Type Description
Task<FlowBlock>

FlowBlock

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetBlockByIdAsync(String)

Gets a full block by Id.

Declaration
Task<FlowBlock> GetBlockByIdAsync(string blockId)
Parameters
Type Name Description
String blockId
Returns
Type Description
Task<FlowBlock>

FlowBlock

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetBlockHeaderByHeightAsync(UInt64)

Gets a block header by height.

Declaration
Task<FlowBlockHeader> GetBlockHeaderByHeightAsync(ulong height)
Parameters
Type Name Description
UInt64 height
Returns
Type Description
Task<FlowBlockHeader>

FlowBlockHeader

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetBlockHeaderByIdAsync(String)

Gets a block header by Id.

Declaration
Task<FlowBlockHeader> GetBlockHeaderByIdAsync(string blockId)
Parameters
Type Name Description
String blockId
Returns
Type Description
Task<FlowBlockHeader>

FlowBlockHeader

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetCollectionAsync(String)

Gets a collection by Id.

Declaration
Task<FlowCollection> GetCollectionAsync(string collectionId)
Parameters
Type Name Description
String collectionId
Returns
Type Description
Task<FlowCollection>

FlowCollection

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetEventsForBlockIdsAsync(String, IEnumerable<String>)

Retrieves events with the given type from the specified block Ids.

Declaration
Task<IEnumerable<FlowBlockEvent>> GetEventsForBlockIdsAsync(string eventType, IEnumerable<string> blockIds)
Parameters
Type Name Description
String eventType
IEnumerable<String> blockIds
Returns
Type Description
Task<IEnumerable<FlowBlockEvent>>

IEnumerable<T> of FlowBlockEvent

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetEventsForHeightRangeAsync(String, UInt64, UInt64)

Retrieves events for all sealed blocks between the start and end block heights (inclusive) with the given type.

Declaration
Task<IEnumerable<FlowBlockEvent>> GetEventsForHeightRangeAsync(string eventType, ulong startHeight, ulong endHeight)
Parameters
Type Name Description
String eventType
UInt64 startHeight
UInt64 endHeight
Returns
Type Description
Task<IEnumerable<FlowBlockEvent>>

IEnumerable<T> of FlowBlockEvent

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetExecutionResultForBlockIdAsync(String)

Retrieves execution result for the specified block Id.

Declaration
Task<FlowExecutionResult> GetExecutionResultForBlockIdAsync(string blockId)
Parameters
Type Name Description
String blockId
Returns
Type Description
Task<FlowExecutionResult>

FlowExecutionResult

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetLatestBlockAsync(Boolean)

Gets the full payload of the latest sealed or unsealed block.

Declaration
Task<FlowBlock> GetLatestBlockAsync(bool isSealed = true)
Parameters
Type Name Description
Boolean isSealed
Returns
Type Description
Task<FlowBlock>

FlowBlock

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetLatestBlockHeaderAsync(Boolean)

Gets the latest sealed or unsealed block header.

Declaration
Task<FlowBlockHeader> GetLatestBlockHeaderAsync(bool isSealed = true)
Parameters
Type Name Description
Boolean isSealed
Returns
Type Description
Task<FlowBlockHeader>

FlowBlockHeader

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetLatestProtocolStateSnapshotAsync()

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
Task<FlowProtocolStateSnapshot> GetLatestProtocolStateSnapshotAsync()
Returns
Type Description
Task<FlowProtocolStateSnapshot>

FlowProtocolStateSnapshot

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetTransactionAsync(String)

Gets a transaction by Id.

Declaration
Task<FlowTransactionResponse> GetTransactionAsync(string transactionId)
Parameters
Type Name Description
String transactionId
Returns
Type Description
Task<FlowTransactionResponse>

FlowTransactionResponse

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

GetTransactionResultAsync(String)

Gets the result of a transaction.

Declaration
Task<FlowTransactionResult> GetTransactionResultAsync(string transactionId)
Parameters
Type Name Description
String transactionId
Returns
Type Description
Task<FlowTransactionResult>

FlowTransactionResult

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

PingAsync()

Check if the access node is alive and healthy.

Declaration
Task PingAsync()
Returns
Type Description
Task
Exceptions
Type Condition
FlowException
| Improve this Doc View Source

SendTransactionAsync(FlowTransaction)

Submits a transaction to the network.

Declaration
Task<FlowTransactionId> SendTransactionAsync(FlowTransaction flowTransaction)
Parameters
Type Name Description
FlowTransaction flowTransaction
Returns
Type Description
Task<FlowTransactionId>

FlowTransactionId

Exceptions
Type Condition
FlowException
| Improve this Doc View Source

WaitForSealAsync(String, Int32, Int32)

Waits for transaction result status to be sealed.

Declaration
Task<FlowTransactionResult> WaitForSealAsync(string transactionId, int delayMs = 1000, int timeoutMs = 30000)
Parameters
Type Name Description
String transactionId
Int32 delayMs
Int32 timeoutMs
Returns
Type Description
Task<FlowTransactionResult>

FlowTransactionResult

Exceptions
Type Condition
FlowException
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX