Class BlocksQuery
Rpc query to access blocks data
Inherited Members
Namespace: Netmavryk.Rpc.Queries
Assembly: Netmavryk.dll
Syntax
public class BlocksQuery : RpcObject
Properties
| Improve this Doc View SourceHead
Gets the query to the current head
Declaration
public BlockQuery Head { get; }
Property Value
| Type | Description |
|---|---|
| BlockQuery |
Item[Int32]
Declaration
public BlockQuery this[int level] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | level |
Property Value
| Type | Description |
|---|---|
| BlockQuery |
Item[String]
Gets the query to the block with the specified hash
Declaration
public BlockQuery this[string hash] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | hash | Hash of the block |
Property Value
| Type | Description |
|---|---|
| BlockQuery |
Methods
| Improve this Doc View SourceGetAsync()
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<dynamic> GetAsync()
Returns
| Type | Description |
|---|---|
| Task<System.Object> |
GetAsync(DateTime, Int32)
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<dynamic> GetAsync(DateTime minDate, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | minDate | Datetime before which the heads are filtered out |
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<System.Object> |
GetAsync(List<String>, Int32)
Executes the query and returns the fragments of the chain before the specified blocks
Declaration
public Task<dynamic> GetAsync(List<string> heads, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| List<System.String> | heads | Hashes of the blocks which are considered heads |
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<System.Object> |
GetAsync(Int32)
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<dynamic> GetAsync(int length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<System.Object> |
GetAsync(String, Int32)
Executes the query and returns the fragment of the chain before the specified block
Declaration
public Task<dynamic> GetAsync(string head, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | head | Hash of the block which is considered head |
| System.Int32 | length | Number of blocks (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<System.Object> |
GetAsync<T>()
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<T> GetAsync<T>()
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
GetAsync<T>(DateTime, Int32)
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<T> GetAsync<T>(DateTime minDate, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | minDate | Datetime before which the heads are filtered out |
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
GetAsync<T>(List<String>, Int32)
Executes the query and returns the fragments of the chain before the specified blocks
Declaration
public Task<T> GetAsync<T>(List<string> heads, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| List<System.String> | heads | Hashes of the blocks which are considered heads |
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
GetAsync<T>(Int32)
Executes the query and returns known heads of the blockchain, sorted with decreasing fitness
Declaration
public Task<T> GetAsync<T>(int length)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | length | Number of blocks per head (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
GetAsync<T>(String, Int32)
Executes the query and returns the fragment of the chain before the specified block
Declaration
public Task<T> GetAsync<T>(string head, int length = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | head | Hash of the block which is considered head |
| System.Int32 | length | Number of blocks (head + predecessors) to returns |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |