@tari-project/ootle-ts-bindings 1.55.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tari-indexer-client.d.ts +3 -0
- package/dist/tari-indexer-client.js +3 -0
- package/dist/types/tari-indexer-client/GetIndexerInfoResponse.d.ts +16 -5
- package/dist/types/tari-indexer-client/GetNetworkEconomicsResponse.d.ts +5 -0
- package/dist/types/tari-indexer-client/GetSubstatesRequest.d.ts +5 -0
- package/dist/types/tari-indexer-client/GetSubstatesResponse.d.ts +8 -0
- package/dist/types/tari-indexer-client/IndexerGetEpochManagerStatsResponse.d.ts +7 -0
- package/dist/types/tari-indexer-client/IndexerGetSubstateRequest.d.ts +5 -0
- package/dist/types/tari-indexer-client/IndexerGetSubstateResponse.d.ts +6 -0
- package/dist/types/tari-indexer-client/IndexerGetTransactionResultRequest.d.ts +5 -0
- package/dist/types/tari-indexer-client/IndexerGetTransactionResultResponse.d.ts +6 -0
- package/dist/types/tari-indexer-client/ProvenTransactionReceipt.d.ts +15 -0
- package/dist/types/tari-indexer-client/ProvenTransactionReceipt.js +1 -0
- package/dist/types/tari-indexer-client/QueryTransactionEventsRequest.d.ts +7 -0
- package/dist/types/tari-indexer-client/QueryTransactionEventsResponse.d.ts +6 -0
- package/dist/types/tari-indexer-client/SubstateProof.d.ts +33 -0
- package/dist/types/tari-indexer-client/SubstateProof.js +1 -0
- package/dist/types/tari-indexer-client/SubstateProofAnchor.d.ts +16 -0
- package/dist/types/tari-indexer-client/SubstateProofAnchor.js +1 -0
- package/dist/types/wallet-types/SettingsGetResponse.d.ts +7 -0
- package/dist/types/wallet-types/SettingsSetRequest.d.ts +9 -0
- package/package.json +1 -1
|
@@ -49,10 +49,13 @@ export * from "./types/tari-indexer-client/ListWatchedSubstatesResponse";
|
|
|
49
49
|
export * from "./types/tari-indexer-client/ListWatchedTemplatesResponse";
|
|
50
50
|
export * from "./types/tari-indexer-client/NetworkDescription";
|
|
51
51
|
export * from "./types/tari-indexer-client/NonFungibleSubstate";
|
|
52
|
+
export * from "./types/tari-indexer-client/ProvenTransactionReceipt";
|
|
52
53
|
export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
|
|
53
54
|
export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
|
|
54
55
|
export * from "./types/tari-indexer-client/ScheduledBurnRate";
|
|
55
56
|
export * from "./types/tari-indexer-client/StreamTransactionEventsRequest";
|
|
57
|
+
export * from "./types/tari-indexer-client/SubstateProof";
|
|
58
|
+
export * from "./types/tari-indexer-client/SubstateProofAnchor";
|
|
56
59
|
export * from "./types/tari-indexer-client/SyncProgress";
|
|
57
60
|
export * from "./types/tari-indexer-client/TemplateCatalogueItem";
|
|
58
61
|
export * from "./types/tari-indexer-client/TransactionEntry";
|
|
@@ -51,10 +51,13 @@ export * from "./types/tari-indexer-client/ListWatchedSubstatesResponse";
|
|
|
51
51
|
export * from "./types/tari-indexer-client/ListWatchedTemplatesResponse";
|
|
52
52
|
export * from "./types/tari-indexer-client/NetworkDescription";
|
|
53
53
|
export * from "./types/tari-indexer-client/NonFungibleSubstate";
|
|
54
|
+
export * from "./types/tari-indexer-client/ProvenTransactionReceipt";
|
|
54
55
|
export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
|
|
55
56
|
export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
|
|
56
57
|
export * from "./types/tari-indexer-client/ScheduledBurnRate";
|
|
57
58
|
export * from "./types/tari-indexer-client/StreamTransactionEventsRequest";
|
|
59
|
+
export * from "./types/tari-indexer-client/SubstateProof";
|
|
60
|
+
export * from "./types/tari-indexer-client/SubstateProofAnchor";
|
|
58
61
|
export * from "./types/tari-indexer-client/SyncProgress";
|
|
59
62
|
export * from "./types/tari-indexer-client/TemplateCatalogueItem";
|
|
60
63
|
export * from "./types/tari-indexer-client/TransactionEntry";
|
|
@@ -24,11 +24,22 @@ export type GetIndexerInfoResponse = {
|
|
|
24
24
|
current_epoch: Epoch;
|
|
25
25
|
/**
|
|
26
26
|
* How many epochs past its terminal epoch this indexer retains a transaction before pruning the
|
|
27
|
-
* record. `None` means transactions are retained indefinitely.
|
|
28
|
-
*
|
|
29
|
-
* than the start of the chain.
|
|
27
|
+
* record. `None` means transactions are retained indefinitely. A client paginating transaction
|
|
28
|
+
* history hits this floor rather than the start of the chain.
|
|
30
29
|
*/
|
|
31
30
|
transaction_retention_epochs: bigint | null;
|
|
31
|
+
/**
|
|
32
|
+
* How many epochs past the epoch its transaction committed in this indexer retains a transaction
|
|
33
|
+
* receipt before pruning it. `None` means receipts are retained indefinitely. Longer than
|
|
34
|
+
* `transaction_retention_epochs`, so a retained transaction always has its receipt.
|
|
35
|
+
*/
|
|
36
|
+
transaction_receipt_retention_epochs: bigint | null;
|
|
37
|
+
/**
|
|
38
|
+
* How many epochs past the epoch its transaction committed in this indexer retains an event
|
|
39
|
+
* before pruning it. `None` means events are retained indefinitely. Event queries and the event
|
|
40
|
+
* stream's catch-up answer no further back than this.
|
|
41
|
+
*/
|
|
42
|
+
event_retention_epochs: bigint | null;
|
|
32
43
|
/**
|
|
33
44
|
* Whether this indexer stores transactions observed on the network gossip topic in addition to
|
|
34
45
|
* those submitted directly to it. When false, a transaction submitted elsewhere is unknown to
|
|
@@ -37,8 +48,8 @@ export type GetIndexerInfoResponse = {
|
|
|
37
48
|
* Even when true the stored set of transactions is best effort: an indexer misses whatever was
|
|
38
49
|
* gossiped while it was offline or while its inbound queue was full, and there is no backfill.
|
|
39
50
|
* Transaction receipts carry no such caveat — they are synced from network state and are
|
|
40
|
-
* complete
|
|
41
|
-
* missing here. Transactions that never committed get no receipt, so gossip is the only source
|
|
51
|
+
* complete back to `transaction_receipt_retention_epochs` — so a committed transaction always
|
|
52
|
+
* has a receipt even when its body is missing here. Transactions that never committed get no receipt, so gossip is the only source
|
|
42
53
|
* for them.
|
|
43
54
|
*/
|
|
44
55
|
index_gossiped_transactions: boolean;
|
|
@@ -27,6 +27,11 @@ export type GetNetworkEconomicsResponse = {
|
|
|
27
27
|
* Circulating L2 supply: `total_claimed - receipt_exhaust_burned`.
|
|
28
28
|
*/
|
|
29
29
|
total_supply: Amount;
|
|
30
|
+
/**
|
|
31
|
+
* Leader fees sitting in validator fee pools that validators have not yet claimed: the sum of every pool's
|
|
32
|
+
* current balance.
|
|
33
|
+
*/
|
|
34
|
+
validator_claimable_fees: Amount;
|
|
30
35
|
/**
|
|
31
36
|
* Number of transaction receipts the indexer has stored.
|
|
32
37
|
*/
|
|
@@ -10,4 +10,9 @@ export type GetSubstatesRequest = {
|
|
|
10
10
|
* which may result in more failures.
|
|
11
11
|
*/
|
|
12
12
|
cached_only: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the response carries the proof each substate was verified with. Not combinable with
|
|
15
|
+
* `cached_only`.
|
|
16
|
+
*/
|
|
17
|
+
include_proofs: boolean;
|
|
13
18
|
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { Substate } from "../Substate";
|
|
2
2
|
import type { SubstateId } from "../SubstateId";
|
|
3
|
+
import type { SubstateProof } from "./SubstateProof";
|
|
3
4
|
export type GetSubstatesResponse = {
|
|
4
5
|
substates: {
|
|
5
6
|
[key in SubstateId]?: Substate;
|
|
6
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* The proof each substate was verified with, when `include_proofs` was set. A substate no
|
|
10
|
+
* committee member could prove has no entry.
|
|
11
|
+
*/
|
|
12
|
+
proofs: {
|
|
13
|
+
[key in SubstateId]?: SubstateProof;
|
|
14
|
+
};
|
|
7
15
|
};
|
|
@@ -5,6 +5,13 @@ export type IndexerGetEpochManagerStatsResponse = {
|
|
|
5
5
|
* The current epoch according to the indexer's epoch oracle view
|
|
6
6
|
*/
|
|
7
7
|
current_epoch: Epoch;
|
|
8
|
+
/**
|
|
9
|
+
* The epoch the validators execute transactions in, as the indexer has observed from their
|
|
10
|
+
* committed blocks, held within one epoch below `current_epoch`. It trails `current_epoch` after
|
|
11
|
+
* each epoch boundary until every committee has committed its end-of-epoch block. `None` until
|
|
12
|
+
* the indexer has observed every committee.
|
|
13
|
+
*/
|
|
14
|
+
consensus_epoch: Epoch | null;
|
|
8
15
|
current_block_height: bigint;
|
|
9
16
|
current_block_hash: Hash32;
|
|
10
17
|
};
|
|
@@ -2,4 +2,9 @@ import type { SubstateVersion } from "../SubstateVersion";
|
|
|
2
2
|
export type IndexerGetSubstateRequest = {
|
|
3
3
|
version: SubstateVersion | null;
|
|
4
4
|
local_search_only: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* If true, the response carries the proof the substate was verified with. Not combinable with
|
|
7
|
+
* `local_search_only`.
|
|
8
|
+
*/
|
|
9
|
+
include_proof: boolean;
|
|
5
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SubstateValue } from "../SubstateValue";
|
|
2
2
|
import type { SubstateVersion } from "../SubstateVersion";
|
|
3
|
+
import type { SubstateProof } from "./SubstateProof";
|
|
3
4
|
export type IndexerGetSubstateResponse = {
|
|
4
5
|
version: SubstateVersion;
|
|
5
6
|
substate: SubstateValue;
|
|
@@ -9,4 +10,9 @@ export type IndexerGetSubstateResponse = {
|
|
|
9
10
|
* proof yet (e.g. nothing committed since an epoch change) and the value was served unverified.
|
|
10
11
|
*/
|
|
11
12
|
verified: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The proof the indexer verified this substate with. Present only when `include_proof` was set
|
|
15
|
+
* and a committee member could prove the substate.
|
|
16
|
+
*/
|
|
17
|
+
proof?: SubstateProof;
|
|
12
18
|
};
|
|
@@ -4,4 +4,9 @@ export type IndexerGetTransactionResultRequest = {
|
|
|
4
4
|
* The ID of the transaction to query the result for
|
|
5
5
|
*/
|
|
6
6
|
transaction_id: TransactionId;
|
|
7
|
+
/**
|
|
8
|
+
* If true, a committed transaction's result carries its receipt and the proof that the receipt
|
|
9
|
+
* was committed.
|
|
10
|
+
*/
|
|
11
|
+
include_proof: boolean;
|
|
7
12
|
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { IndexerTransactionFinalizedResult } from "./IndexerTransactionFinalizedResult";
|
|
2
|
+
import type { ProvenTransactionReceipt } from "./ProvenTransactionReceipt";
|
|
2
3
|
export type IndexerGetTransactionResultResponse = {
|
|
3
4
|
/**
|
|
4
5
|
* The result of the transaction, which may be pending (not yet finalized) or finalized with details such as the
|
|
5
6
|
* final decision, execution result, and timestamps
|
|
6
7
|
*/
|
|
7
8
|
result: IndexerTransactionFinalizedResult;
|
|
9
|
+
/**
|
|
10
|
+
* The committed transaction receipt and its proof, when `include_proof` was set and the
|
|
11
|
+
* transaction committed. An aborted transaction commits no receipt.
|
|
12
|
+
*/
|
|
13
|
+
receipt?: ProvenTransactionReceipt;
|
|
8
14
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SubstateVersion } from "../SubstateVersion";
|
|
2
|
+
import type { TransactionReceipt } from "../TransactionReceipt";
|
|
3
|
+
import type { SubstateProof } from "./SubstateProof";
|
|
4
|
+
/**
|
|
5
|
+
* A committed transaction's receipt substate, with the proof it was verified with.
|
|
6
|
+
*/
|
|
7
|
+
export type ProvenTransactionReceipt = {
|
|
8
|
+
version: SubstateVersion;
|
|
9
|
+
receipt: TransactionReceipt;
|
|
10
|
+
/**
|
|
11
|
+
* `None` when no committee member could prove the receipt, e.g. when nothing has been committed
|
|
12
|
+
* since an epoch change.
|
|
13
|
+
*/
|
|
14
|
+
proof: SubstateProof | null;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,5 +13,12 @@ export type QueryTransactionEventsRequest = {
|
|
|
13
13
|
*/
|
|
14
14
|
resource_address?: ResourceAddress | null;
|
|
15
15
|
limit: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Matches to skip, at most 10,000. Page deeper with `before_id`.
|
|
18
|
+
*/
|
|
16
19
|
offset: number | null;
|
|
20
|
+
/**
|
|
21
|
+
* Return only events older than this cursor. Pass the previous page's `next_before_id`.
|
|
22
|
+
*/
|
|
23
|
+
before_id?: number | bigint | string | null;
|
|
17
24
|
};
|
|
@@ -2,4 +2,10 @@ import type { Event } from "../Event";
|
|
|
2
2
|
import type { TransactionId } from "../TransactionId";
|
|
3
3
|
export type QueryTransactionEventsResponse = {
|
|
4
4
|
events: Array<[TransactionId, Event]>;
|
|
5
|
+
/**
|
|
6
|
+
* The `before_id` for the next page, or `None` once no older event can match. A wildcard
|
|
7
|
+
* topic query examines a bounded number of events per request, so a page can be short, or
|
|
8
|
+
* empty, and still carry a cursor.
|
|
9
|
+
*/
|
|
10
|
+
next_before_id?: bigint | null;
|
|
5
11
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Epoch } from "../Epoch";
|
|
2
|
+
import type { SubstateProofAnchor } from "./SubstateProofAnchor";
|
|
3
|
+
/**
|
|
4
|
+
* Proof that a substate value was committed by its shard group.
|
|
5
|
+
*
|
|
6
|
+
* Two parts: a commit proof that the shard group committee committed a block whose header carries
|
|
7
|
+
* `anchor.state_merkle_root`, and a value proof that the substate's leaf is in the state tree under
|
|
8
|
+
* that root. Verifying it requires the committee for `anchor.epoch` and `anchor.shard_group`.
|
|
9
|
+
*
|
|
10
|
+
* A proof shows the value was committed at the anchor block. It says nothing about later blocks, so
|
|
11
|
+
* a caller judges freshness by the anchor's epoch and height.
|
|
12
|
+
*/
|
|
13
|
+
export type SubstateProof = {
|
|
14
|
+
/**
|
|
15
|
+
* The committed block the proof is anchored at, as read from `commit_proof`.
|
|
16
|
+
*/
|
|
17
|
+
anchor: SubstateProofAnchor;
|
|
18
|
+
/**
|
|
19
|
+
* CBOR-encoded `SidechainBlockCommitProof`: the anchor block's header and the chain of quorum
|
|
20
|
+
* certificates that committed it.
|
|
21
|
+
*/
|
|
22
|
+
commit_proof: string;
|
|
23
|
+
/**
|
|
24
|
+
* CBOR-encoded `SubstateValueProof`: the inclusion proof of the substate's leaf under
|
|
25
|
+
* `anchor.state_merkle_root`.
|
|
26
|
+
*/
|
|
27
|
+
value_proof: string;
|
|
28
|
+
/**
|
|
29
|
+
* The epoch the substate's leaf value hash was computed in. It is an input to that hash, so a
|
|
30
|
+
* verifier needs it to recompute the leaf.
|
|
31
|
+
*/
|
|
32
|
+
value_hash_epoch: Epoch;
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Epoch } from "../Epoch";
|
|
2
|
+
import type { Hash32 } from "../Hash32";
|
|
3
|
+
import type { ShardGroup } from "../ShardGroup";
|
|
4
|
+
/**
|
|
5
|
+
* The committed block a [`SubstateProof`] is anchored at.
|
|
6
|
+
*/
|
|
7
|
+
export type SubstateProofAnchor = {
|
|
8
|
+
epoch: Epoch;
|
|
9
|
+
shard_group: ShardGroup;
|
|
10
|
+
height: number;
|
|
11
|
+
block_id: Hash32;
|
|
12
|
+
/**
|
|
13
|
+
* The shard group state root the block header commits.
|
|
14
|
+
*/
|
|
15
|
+
state_merkle_root: Hash32;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { AdvancedUiFeatures } from "./AdvancedUiFeatures";
|
|
2
2
|
import type { NetworkInfo } from "./NetworkInfo";
|
|
3
3
|
export type SettingsGetResponse = {
|
|
4
|
+
/**
|
|
5
|
+
* The indexer the wallet is currently using, one of `indexer_urls`.
|
|
6
|
+
*/
|
|
4
7
|
indexer_url: string;
|
|
8
|
+
/**
|
|
9
|
+
* The configured indexers.
|
|
10
|
+
*/
|
|
11
|
+
indexer_urls: Array<string>;
|
|
5
12
|
network: NetworkInfo;
|
|
6
13
|
advanced_ui_features: AdvancedUiFeatures;
|
|
7
14
|
claimed_accounts: Array<string>;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { AdvancedUiFeatures } from "./AdvancedUiFeatures";
|
|
2
2
|
export type SettingsSetRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* Replaces the configured indexers with this single indexer. Shorthand for a one-element `indexer_urls`; at
|
|
5
|
+
* most one of the two may be given.
|
|
6
|
+
*/
|
|
3
7
|
indexer_url: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Replaces the configured indexers. The wallet activates one of them at random and moves to the next when the
|
|
10
|
+
* active one stops responding.
|
|
11
|
+
*/
|
|
12
|
+
indexer_urls: Array<string> | null;
|
|
4
13
|
advanced_ui_features: AdvancedUiFeatures | null;
|
|
5
14
|
claimed_accounts: Array<string> | null;
|
|
6
15
|
};
|