@tari-project/ootle-ts-bindings 1.28.1 → 1.29.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.
@@ -1,5 +1,7 @@
1
1
  export declare const ACCOUNT_TEMPLATE_ADDRESS = "0000000000000000000000000000000000000000000000000000000000000000";
2
2
  export declare const TESTNET_NFT_FAUCET_ADDRESS = "component_0000000000000000000000000000000000000000000000000000000000000001";
3
- export declare const TESTNET_XTR_FAUCET_ADDRESS = "component_0102030000000000000000000000000000000000000000000000000000000000";
4
- export declare const XTR_RESOURCE_ADDRESS = "resource_0101010101010101010101010101010101010101010101010101010101010101";
3
+ export declare const TESTNET_TARI_FAUCET_ADDRESS = "component_0102030000000000000000000000000000000000000000000000000000000000";
4
+ export declare const TARI_TOKEN_RESOURCE_ADDRESS = "resource_0101010101010101010101010101010101010101010101010101010101010101";
5
+ /** @deprecated use `TARI_TOKEN` instead */
5
6
  export declare const XTR = "resource_0101010101010101010101010101010101010101010101010101010101010101";
7
+ export declare const TARI_TOKEN = "resource_0101010101010101010101010101010101010101010101010101010101010101";
@@ -4,6 +4,8 @@
4
4
  */
5
5
  export const ACCOUNT_TEMPLATE_ADDRESS = "0000000000000000000000000000000000000000000000000000000000000000";
6
6
  export const TESTNET_NFT_FAUCET_ADDRESS = "component_0000000000000000000000000000000000000000000000000000000000000001";
7
- export const TESTNET_XTR_FAUCET_ADDRESS = "component_0102030000000000000000000000000000000000000000000000000000000000";
8
- export const XTR_RESOURCE_ADDRESS = "resource_0101010101010101010101010101010101010101010101010101010101010101";
9
- export const XTR = XTR_RESOURCE_ADDRESS;
7
+ export const TESTNET_TARI_FAUCET_ADDRESS = "component_0102030000000000000000000000000000000000000000000000000000000000";
8
+ export const TARI_TOKEN_RESOURCE_ADDRESS = "resource_0101010101010101010101010101010101010101010101010101010101010101";
9
+ /** @deprecated use `TARI_TOKEN` instead */
10
+ export const XTR = TARI_TOKEN_RESOURCE_ADDRESS;
11
+ export const TARI_TOKEN = TARI_TOKEN_RESOURCE_ADDRESS;
@@ -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,11 +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";
6
+ export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
7
7
  export * from "./types/tari-indexer-client/TransactionEntry";
8
8
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
9
9
  export * from "./types/tari-indexer-client/ListSubstateItem";
10
- export * from "./types/tari-indexer-client/ListSubstatesRequest";
11
10
  export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
12
11
  export * from "./types/tari-indexer-client/NetworkDescription";
13
12
  export * from "./types/tari-indexer-client/GetUtxoUpdatesResponse";
@@ -42,4 +41,5 @@ export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
42
41
  export * from "./types/tari-indexer-client/ListUtxosRequest";
43
42
  export * from "./types/tari-indexer-client/SyncProgress";
44
43
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultRequest";
44
+ export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
45
45
  export * from "./types/tari-indexer-client/IndexerReadyResponse";
@@ -5,11 +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";
8
+ export * from "./types/tari-indexer-client/QueryTransactionEventsRequest";
9
9
  export * from "./types/tari-indexer-client/TransactionEntry";
10
10
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
11
11
  export * from "./types/tari-indexer-client/ListSubstateItem";
12
- export * from "./types/tari-indexer-client/ListSubstatesRequest";
13
12
  export * from "./types/tari-indexer-client/IndexerTransactionFinalizedResult";
14
13
  export * from "./types/tari-indexer-client/NetworkDescription";
15
14
  export * from "./types/tari-indexer-client/GetUtxoUpdatesResponse";
@@ -44,4 +43,5 @@ export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
44
43
  export * from "./types/tari-indexer-client/ListUtxosRequest";
45
44
  export * from "./types/tari-indexer-client/SyncProgress";
46
45
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultRequest";
46
+ export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
47
47
  export * from "./types/tari-indexer-client/IndexerReadyResponse";
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle-ts-bindings",
3
- "version": "1.28.1",
3
+ "version": "1.29.1",
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,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
- };