@tari-project/ootle-ts-bindings 1.50.0 → 1.50.1
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/helpers/helpers.js +4 -0
- package/dist/tari-indexer-client.d.ts +1 -0
- package/dist/tari-indexer-client.js +1 -0
- package/dist/types/tari-indexer-client/GetIndexerInfoResponse.d.ts +17 -4
- package/dist/types/tari-indexer-client/ListRecentTransactionsRequest.d.ts +6 -0
- package/dist/types/tari-indexer-client/TransactionEntry.d.ts +5 -0
- package/dist/types/tari-indexer-client/TransactionSource.d.ts +4 -0
- package/dist/types/tari-indexer-client/TransactionSource.js +2 -0
- package/package.json +1 -1
package/dist/helpers/helpers.js
CHANGED
|
@@ -58,6 +58,10 @@ export function shortenSubstateId(substateId, start = 4, end = 4) {
|
|
|
58
58
|
return parts[0] + "_" + shortenString(parts[1], start, end);
|
|
59
59
|
}
|
|
60
60
|
export function shortenString(string, start = 8, end = 8) {
|
|
61
|
+
// The number 3 is from the characters for ellipsis
|
|
62
|
+
if (string.length < start + end + 3) {
|
|
63
|
+
return string;
|
|
64
|
+
}
|
|
61
65
|
return string.substring(0, start) + "..." + string.slice(-end);
|
|
62
66
|
}
|
|
63
67
|
export function rejectReasonToString(reason) {
|
|
@@ -9,6 +9,7 @@ export * from "./types/tari-indexer-client/ValidatorConsensusState";
|
|
|
9
9
|
export * from "./types/tari-indexer-client/StreamTransactionEventsRequest";
|
|
10
10
|
export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
|
|
11
11
|
export * from "./types/tari-indexer-client/TransactionEntry";
|
|
12
|
+
export * from "./types/tari-indexer-client/TransactionSource";
|
|
12
13
|
export * from "./types/tari-indexer-client/InspectSubstateRequest";
|
|
13
14
|
export * from "./types/tari-indexer-client/ListSubstateItem";
|
|
14
15
|
export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
|
|
@@ -11,6 +11,7 @@ export * from "./types/tari-indexer-client/ValidatorConsensusState";
|
|
|
11
11
|
export * from "./types/tari-indexer-client/StreamTransactionEventsRequest";
|
|
12
12
|
export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
|
|
13
13
|
export * from "./types/tari-indexer-client/TransactionEntry";
|
|
14
|
+
export * from "./types/tari-indexer-client/TransactionSource";
|
|
14
15
|
export * from "./types/tari-indexer-client/InspectSubstateRequest";
|
|
15
16
|
export * from "./types/tari-indexer-client/ListSubstateItem";
|
|
16
17
|
export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
|
|
@@ -23,12 +23,25 @@ export type GetIndexerInfoResponse = {
|
|
|
23
23
|
*/
|
|
24
24
|
current_epoch: Epoch;
|
|
25
25
|
/**
|
|
26
|
-
* How many epochs past its terminal epoch this indexer retains a transaction
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* How many epochs past its terminal epoch this indexer retains a transaction before pruning the
|
|
27
|
+
* record. `None` means transactions are retained indefinitely. Transaction receipts are retained
|
|
28
|
+
* regardless of this setting. A client paginating transaction history hits this floor rather
|
|
29
|
+
* than the start of the chain.
|
|
30
30
|
*/
|
|
31
31
|
transaction_retention_epochs: bigint | null;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this indexer stores transactions observed on the network gossip topic in addition to
|
|
34
|
+
* those submitted directly to it. When false, a transaction submitted elsewhere is unknown to
|
|
35
|
+
* this indexer until its receipt is synced.
|
|
36
|
+
*
|
|
37
|
+
* Even when true the stored set of transactions is best effort: an indexer misses whatever was
|
|
38
|
+
* gossiped while it was offline or while its inbound queue was full, and there is no backfill.
|
|
39
|
+
* Transaction receipts carry no such caveat — they are synced from network state and are
|
|
40
|
+
* complete from genesis — so a committed transaction always has a receipt even when its body is
|
|
41
|
+
* missing here. Transactions that never committed get no receipt, so gossip is the only source
|
|
42
|
+
* for them.
|
|
43
|
+
*/
|
|
44
|
+
index_gossiped_transactions: boolean;
|
|
32
45
|
/**
|
|
33
46
|
* Whether substates served by this indexer are verified against a shard group committee proof
|
|
34
47
|
* before being returned. When false, values are served as fetched from a single validator and
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { TransactionId } from "../TransactionId";
|
|
2
|
+
import type { TransactionSource } from "./TransactionSource";
|
|
2
3
|
export type ListRecentTransactionsRequest = {
|
|
3
4
|
limit: number | null;
|
|
4
5
|
last_id: TransactionId | null;
|
|
6
|
+
/**
|
|
7
|
+
* Restrict the listing to transactions from this source. Omitted, transactions from every
|
|
8
|
+
* source are listed.
|
|
9
|
+
*/
|
|
10
|
+
source: TransactionSource | null;
|
|
5
11
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PrunedTransaction } from "../PrunedTransaction";
|
|
2
2
|
import type { TransactionId } from "../TransactionId";
|
|
3
3
|
import type { TransactionResultSummary } from "./TransactionResultSummary";
|
|
4
|
+
import type { TransactionSource } from "./TransactionSource";
|
|
4
5
|
export type TransactionEntry = {
|
|
5
6
|
transaction_id: TransactionId;
|
|
6
7
|
/**
|
|
@@ -19,4 +20,8 @@ export type TransactionEntry = {
|
|
|
19
20
|
* this indexer. None if the transaction was not rejected at submission.
|
|
20
21
|
*/
|
|
21
22
|
rejected_reason: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Where this indexer learned of the transaction.
|
|
25
|
+
*/
|
|
26
|
+
source: TransactionSource;
|
|
22
27
|
};
|