@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.
- package/dist/helpers/consts.d.ts +4 -2
- package/dist/helpers/consts.js +5 -3
- package/dist/helpers/helpers.js +0 -42
- package/dist/tari-indexer-client.d.ts +2 -2
- package/dist/tari-indexer-client.js +2 -2
- package/dist/types/tari-indexer-client/QueryTransactionEventsRequest.d.ts +10 -0
- package/dist/types/tari-indexer-client/QueryTransactionEventsResponse.d.ts +5 -0
- package/dist/types/wallet-types/ConfidentialCreateOutputProofRequest.d.ts +1 -1
- package/package.json +6 -6
- package/dist/types/tari-indexer-client/ListSubstatesRequest.d.ts +0 -10
- package/dist/types/tari-indexer-client/ListSubstatesResponse.d.ts +0 -4
- /package/dist/types/tari-indexer-client/{ListSubstatesRequest.js → QueryTransactionEventsRequest.js} +0 -0
- /package/dist/types/tari-indexer-client/{ListSubstatesResponse.js → QueryTransactionEventsResponse.js} +0 -0
package/dist/helpers/consts.d.ts
CHANGED
|
@@ -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
|
|
4
|
-
export declare const
|
|
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";
|
package/dist/helpers/consts.js
CHANGED
|
@@ -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
|
|
8
|
-
export const
|
|
9
|
-
|
|
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;
|
package/dist/helpers/helpers.js
CHANGED
|
@@ -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/
|
|
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/
|
|
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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tari-project/ootle-ts-bindings",
|
|
3
|
-
"version": "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
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"vitest": "^
|
|
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
|
-
};
|
/package/dist/types/tari-indexer-client/{ListSubstatesRequest.js → QueryTransactionEventsRequest.js}
RENAMED
|
File without changes
|
|
File without changes
|