@tari-project/ootle-ts-bindings 1.28.0 → 1.29.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.
@@ -45,48 +45,6 @@ export function stringToSubstateId(substateId) {
45
45
  throw new Error(`Invalid substate id: ${substateId}`);
46
46
  }
47
47
  return substateId;
48
- // const [prefix, rest] = parts;
49
- //
50
- // switch (prefix) {
51
- // case "component":
52
- // return { Component: rest };
53
- // case "resource":
54
- // return { Resource: rest };
55
- // case "vault":
56
- // return { Vault: rest };
57
- // case "tombstone":
58
- // return { ClaimedOutputTombstone: rest };
59
- // case "txreceipt":
60
- // return { TransactionReceipt: rest };
61
- // case "vnfp":
62
- // return { ValidatorFeePool: rest };
63
- // case "nft":
64
- // const nftParts = rest.split("_", 3);
65
- // if (nftParts.length != 3) {
66
- // throw new Error(`Invalid NFT substate id: ${substateId}`);
67
- // }
68
- //
69
- // const [resourceAddress, type, id] = nftParts;
70
- //
71
- // return {
72
- // NonFungible: {
73
- // resource_address: resourceAddress,
74
- // id: { [type]: id } as NonFungibleId,
75
- // },
76
- // };
77
- // case "template":
78
- // return { Template: rest };
79
- // case "utxo":
80
- // const utxoParts = rest.split("_", 2);
81
- // if (utxoParts.length != 2) {
82
- // throw new Error(`Invalid UTXO substate id: ${substateId}`);
83
- // }
84
- //
85
- // return { Utxo: { resource_address: utxoParts[0], id: utxoParts[1] } };
86
- //
87
- // default:
88
- // throw new Error(`Unknown substate id: ${substateId}`);
89
- // }
90
48
  }
91
49
  export function shortenSubstateId(substateId, start = 4, end = 4) {
92
50
  if (substateId === null || substateId === undefined) {
@@ -3,12 +3,10 @@ export * from "./types/tari-indexer-client/GetTransactionReceiptResponse";
3
3
  export * from "./types/tari-indexer-client/GetNetworkInfoResponse";
4
4
  export * from "./types/tari-indexer-client/TemplateMetadata";
5
5
  export * from "./types/tari-indexer-client/GetUtxoUpdatesRequest";
6
- export * from "./types/tari-indexer-client/ListSubstatesResponse";
7
- export * from "./types/tari-indexer-client/IndexerAddPeerResponse";
6
+ export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
8
7
  export * from "./types/tari-indexer-client/TransactionEntry";
9
8
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
10
9
  export * from "./types/tari-indexer-client/ListSubstateItem";
11
- export * from "./types/tari-indexer-client/ListSubstatesRequest";
12
10
  export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
13
11
  export * from "./types/tari-indexer-client/NetworkDescription";
14
12
  export * from "./types/tari-indexer-client/GetUtxoUpdatesResponse";
@@ -20,7 +18,6 @@ export * from "./types/tari-indexer-client/GetResourceResponse";
20
18
  export * from "./types/tari-indexer-client/ListTransactionReceiptsRequest";
21
19
  export * from "./types/tari-indexer-client/GetUtxosRequest";
22
20
  export * from "./types/tari-indexer-client/ListRecentTransactionsResponse";
23
- export * from "./types/tari-indexer-client/IndexerAddPeerRequest";
24
21
  export * from "./types/tari-indexer-client/GetNetworkSyncStateResponse";
25
22
  export * from "./types/tari-indexer-client/GetUtxosResponse";
26
23
  export * from "./types/tari-indexer-client/ListUtxosResponse";
@@ -44,4 +41,5 @@ export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
44
41
  export * from "./types/tari-indexer-client/ListUtxosRequest";
45
42
  export * from "./types/tari-indexer-client/SyncProgress";
46
43
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultRequest";
44
+ export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
47
45
  export * from "./types/tari-indexer-client/IndexerReadyResponse";
@@ -5,12 +5,10 @@ export * from "./types/tari-indexer-client/GetTransactionReceiptResponse";
5
5
  export * from "./types/tari-indexer-client/GetNetworkInfoResponse";
6
6
  export * from "./types/tari-indexer-client/TemplateMetadata";
7
7
  export * from "./types/tari-indexer-client/GetUtxoUpdatesRequest";
8
- export * from "./types/tari-indexer-client/ListSubstatesResponse";
9
- export * from "./types/tari-indexer-client/IndexerAddPeerResponse";
8
+ export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
10
9
  export * from "./types/tari-indexer-client/TransactionEntry";
11
10
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
12
11
  export * from "./types/tari-indexer-client/ListSubstateItem";
13
- export * from "./types/tari-indexer-client/ListSubstatesRequest";
14
12
  export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
15
13
  export * from "./types/tari-indexer-client/NetworkDescription";
16
14
  export * from "./types/tari-indexer-client/GetUtxoUpdatesResponse";
@@ -22,7 +20,6 @@ export * from "./types/tari-indexer-client/GetResourceResponse";
22
20
  export * from "./types/tari-indexer-client/ListTransactionReceiptsRequest";
23
21
  export * from "./types/tari-indexer-client/GetUtxosRequest";
24
22
  export * from "./types/tari-indexer-client/ListRecentTransactionsResponse";
25
- export * from "./types/tari-indexer-client/IndexerAddPeerRequest";
26
23
  export * from "./types/tari-indexer-client/GetNetworkSyncStateResponse";
27
24
  export * from "./types/tari-indexer-client/GetUtxosResponse";
28
25
  export * from "./types/tari-indexer-client/ListUtxosResponse";
@@ -46,4 +43,5 @@ export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
46
43
  export * from "./types/tari-indexer-client/ListUtxosRequest";
47
44
  export * from "./types/tari-indexer-client/SyncProgress";
48
45
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultRequest";
46
+ export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
49
47
  export * from "./types/tari-indexer-client/IndexerReadyResponse";
@@ -7,4 +7,4 @@
7
7
  * This allows Tari to support a massive number tokens within resources.
8
8
  * e.g. 2 ETH = 2 x 10^18 Gwei.
9
9
  */
10
- export type Amount = string | number;
10
+ export type Amount = string | number | bigint;
@@ -0,0 +1,10 @@
1
+ import type { SubstateId } from "../SubstateId";
2
+ export type QueryTransactionEventsRequest = {
3
+ /**
4
+ * Filter events by topic
5
+ */
6
+ topic: string | null;
7
+ substate_id: SubstateId | null;
8
+ limit: number | null;
9
+ offset: number | null;
10
+ };
@@ -0,0 +1,5 @@
1
+ import type { Event } from "../Event";
2
+ import type { TransactionId } from "../TransactionId";
3
+ export type QueryTransactionEventsResponse = {
4
+ events: Array<[TransactionId, Event]>;
5
+ };
@@ -1,3 +1,3 @@
1
1
  export type ConfidentialCreateOutputProofRequest = {
2
- amount: bigint;
2
+ amount: number | bigint | string;
3
3
  };
@@ -4,7 +4,7 @@ import type { OotleAddress } from "../OotleAddress";
4
4
  import type { PayTo } from "./PayTo";
5
5
  export type StealthTransfer = {
6
6
  destination_address: OotleAddress;
7
- blinded_output_amount: bigint;
7
+ blinded_output_amount: number | bigint | string;
8
8
  revealed_output_amount: Amount;
9
9
  output_memo?: Memo | null;
10
10
  pay_to: PayTo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle-ts-bindings",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,11 +25,11 @@
25
25
  "bech32": "^2.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "shx": "^0.3.4",
29
- "typescript": "^5.8.3",
30
- "@types/node": "^22.13.1",
31
- "prettier": "^3.5.3",
32
- "vitest": "^3.2.4"
28
+ "@types/node": "^25.3.1",
29
+ "prettier": "^3.8.1",
30
+ "shx": "^0.4.0",
31
+ "typescript": "^5.9.3",
32
+ "vitest": "^4.0.18"
33
33
  },
34
34
  "scripts": {
35
35
  "build-dist": "tsc --project tsconfig.prod.json",
@@ -1,6 +0,0 @@
1
- import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
2
- export type IndexerAddPeerRequest = {
3
- public_key: RistrettoPublicKeyBytes;
4
- addresses: Array<string>;
5
- wait_for_dial: boolean;
6
- };
@@ -1 +0,0 @@
1
- export type IndexerAddPeerResponse = Record<string, never>;
@@ -1,2 +0,0 @@
1
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- export {};
@@ -1,10 +0,0 @@
1
- import type { Hash32 } from "../Hash32";
2
- import type { SubstateId } from "../SubstateId";
3
- import type { SubstateType } from "../SubstateType";
4
- export type ListSubstatesRequest = {
5
- by_id: SubstateId | null;
6
- filter_by_template: Hash32 | null;
7
- filter_by_type: SubstateType | null;
8
- limit: bigint | null;
9
- offset: bigint | null;
10
- };
@@ -1,4 +0,0 @@
1
- import type { ListSubstateItem } from "./ListSubstateItem";
2
- export type ListSubstatesResponse = {
3
- substates: Array<ListSubstateItem>;
4
- };