-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
204 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"node": "https://rpc.tzkt.io/parisnet/", | ||
"testContract": "KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5", | ||
"testEntrypoint": "default", | ||
"testDelegate": "tz1gBnaS1n7LKqpaRnyBX5MSmamadXXfzNpt", | ||
"testInactive": "tz2Vs8rfURNu4fQpQwhWc1sWgTqzZ9TW8mc8", | ||
"testSmartRollup": "sr1QurxjyVCePny7i5kHWq1w8W95LsFLxUUk", | ||
"keyHash": "exprvBfbrdZVCjkmcsJRpioTnZdos3RLMZUDTK2AyFURY423xuWX4N", | ||
"bigMapId": "2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Netezos.Rpc.Queries.Dal | ||
{ | ||
public class DalQuery : RpcQuery | ||
{ | ||
/// <summary> | ||
/// Gets the query to the (currently last) DAL skip list cell if DAL is enabled, or [None] otherwise. | ||
/// </summary> | ||
public RpcObject CommitmentsHistory => new(this, "commitments_history/"); | ||
|
||
/// <summary> | ||
/// Gets the query to the published slots headers for the given level. | ||
/// </summary> | ||
public PublishedSlotHeadersQuery PublishedSlotHeaders => new(this, "published_slot_headers/"); | ||
|
||
/// <summary> | ||
/// Gets the query to the shards assignment for a given level (the default is the current level) and given | ||
/// delegates (the default is all delegates) | ||
/// </summary> | ||
public ShardsQuery Shards => new(this, "shards/"); | ||
|
||
internal DalQuery(RpcQuery baseQuery, string append) : base(baseQuery, append) { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Netezos.Rpc.Queries.Dal; | ||
|
||
public class PublishedSlotHeadersQuery : RpcObject | ||
{ | ||
/// <summary> | ||
/// Get the published slots headers for the current level. | ||
/// </summary> | ||
/// <returns></returns> | ||
public new Task<dynamic> GetAsync() => Client.GetJson(Query); | ||
|
||
/// <summary> | ||
/// Get the published slots headers for the given level | ||
/// </summary> | ||
/// <param name="level">Level of the block</param> | ||
/// <returns></returns> | ||
public Task<dynamic> GetAsync(int level) => Client.GetJson($"{Query}?level={level}"); | ||
|
||
internal PublishedSlotHeadersQuery(RpcQuery baseQuery, string append) : base(baseQuery, append) { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Netezos.Rpc.Queries.Dal; | ||
|
||
public class ShardsQuery : RpcObject | ||
{ | ||
/// <summary> | ||
/// Get the shards assignment for a current level and all delegates. | ||
/// </summary> | ||
public new Task<dynamic> GetAsync() => Client.GetJson(Query); | ||
|
||
/// <summary> | ||
/// Get the shards assignment for a given level and given delegates. | ||
/// </summary> | ||
/// <param name="level">Level of the block</param> | ||
/// <param name="delegates">A Secp256k1 or an Ed25519 public key hash (Base58Check-encoded)</param> | ||
public new Task<dynamic> GetAsync(int level, string delegates) | ||
=> Client.GetJson($"{Query}?level={level}&delegates={delegates}"); | ||
|
||
internal ShardsQuery(RpcQuery baseQuery, string append) : base(baseQuery, append) { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.