@tari-project/ootle-ts-bindings 1.30.1 → 1.31.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.
Files changed (34) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.js +3 -1
  3. package/dist/tari-indexer-client.d.ts +4 -1
  4. package/dist/tari-indexer-client.js +4 -1
  5. package/dist/types/Instruction.d.ts +4 -0
  6. package/dist/types/PublishedTemplate.d.ts +8 -0
  7. package/dist/types/PublishedTemplateMetadata.d.ts +27 -0
  8. package/dist/types/TemplateMetadata.d.ts +23 -0
  9. package/dist/types/TemplateMetadata.js +2 -0
  10. package/dist/types/tari-indexer-client/IndexerSubmitTransactionResponse.d.ts +7 -1
  11. package/dist/types/tari-indexer-client/ListTemplateCatalogueRequest.d.ts +15 -0
  12. package/dist/types/tari-indexer-client/ListTemplateCatalogueRequest.js +2 -0
  13. package/dist/types/tari-indexer-client/ListTemplateCatalogueResponse.d.ts +4 -0
  14. package/dist/types/tari-indexer-client/ListTemplateCatalogueResponse.js +1 -0
  15. package/dist/types/tari-indexer-client/ListTemplatesResponse.d.ts +2 -2
  16. package/dist/types/tari-indexer-client/StreamTransactionEventsRequest.d.ts +5 -0
  17. package/dist/types/tari-indexer-client/TemplateCatalogueItem.d.ts +10 -0
  18. package/dist/types/tari-indexer-client/TemplateCatalogueItem.js +1 -0
  19. package/dist/types/tari-indexer-client/{TemplateMetadata.d.ts → TemplateMeta.d.ts} +5 -1
  20. package/dist/types/tari-indexer-client/TemplateMeta.js +1 -0
  21. package/dist/types/validator-node-client/VNTemplateMetadata.d.ts +0 -2
  22. package/dist/types/wallet-types/AccountsCreateFreeTestCoinsRequest.d.ts +0 -2
  23. package/dist/types/wallet-types/PublishTemplateMetadata.d.ts +15 -0
  24. package/dist/types/wallet-types/PublishTemplateMetadata.js +1 -0
  25. package/dist/types/wallet-types/PublishTemplateRequest.d.ts +6 -0
  26. package/dist/types/wallet-types/SignTemplateMetadataRequest.d.ts +10 -0
  27. package/dist/types/wallet-types/SignTemplateMetadataRequest.js +1 -0
  28. package/dist/types/wallet-types/SignTemplateMetadataResponse.d.ts +13 -0
  29. package/dist/types/wallet-types/SignTemplateMetadataResponse.js +2 -0
  30. package/dist/types/wallet-types/StealthUtxosDecryptValueRequest.d.ts +2 -1
  31. package/dist/wallet-types.d.ts +3 -0
  32. package/dist/wallet-types.js +3 -0
  33. package/package.json +4 -2
  34. /package/dist/types/{tari-indexer-client/TemplateMetadata.js → PublishedTemplateMetadata.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -93,6 +93,7 @@ export * from "./types/ProofId";
93
93
  export * from "./types/ProposalCertificate";
94
94
  export * from "./types/PublishedTemplate";
95
95
  export * from "./types/PublishedTemplateAddress";
96
+ export * from "./types/PublishedTemplateMetadata";
96
97
  export * from "./types/RangeProofBytes";
97
98
  export * from "./types/RejectReason";
98
99
  export * from "./types/RequireRule";
@@ -134,6 +135,7 @@ export * from "./types/SubstateType";
134
135
  export * from "./types/SubstateValue";
135
136
  export * from "./types/TemplateDef";
136
137
  export * from "./types/TemplateDefV1";
138
+ export * from "./types/TemplateMetadata";
137
139
  export * from "./types/TimeoutCertificate";
138
140
  export * from "./types/Transaction";
139
141
  export * from "./types/TransactionAtom";
@@ -188,9 +190,9 @@ export * from "./tari-indexer-client";
188
190
  export * from "./validator-node-client";
189
191
  export * from "./wallet-types";
190
192
  export * from "./helpers/BigAmount";
191
- export * from "./helpers/NetworkByte";
192
193
  export * from "./helpers/consts";
193
194
  export * from "./helpers/enum";
194
195
  export * from "./helpers/helpers";
196
+ export * from "./helpers/NetworkByte";
195
197
  export * from "./helpers/ootleAddress";
196
198
  export * from "./helpers/tariTypeTag";
package/dist/index.js CHANGED
@@ -95,6 +95,7 @@ export * from "./types/ProofId";
95
95
  export * from "./types/ProposalCertificate";
96
96
  export * from "./types/PublishedTemplate";
97
97
  export * from "./types/PublishedTemplateAddress";
98
+ export * from "./types/PublishedTemplateMetadata";
98
99
  export * from "./types/RangeProofBytes";
99
100
  export * from "./types/RejectReason";
100
101
  export * from "./types/RequireRule";
@@ -136,6 +137,7 @@ export * from "./types/SubstateType";
136
137
  export * from "./types/SubstateValue";
137
138
  export * from "./types/TemplateDef";
138
139
  export * from "./types/TemplateDefV1";
140
+ export * from "./types/TemplateMetadata";
139
141
  export * from "./types/TimeoutCertificate";
140
142
  export * from "./types/Transaction";
141
143
  export * from "./types/TransactionAtom";
@@ -190,9 +192,9 @@ export * from "./tari-indexer-client";
190
192
  export * from "./validator-node-client";
191
193
  export * from "./wallet-types";
192
194
  export * from "./helpers/BigAmount";
193
- export * from "./helpers/NetworkByte";
194
195
  export * from "./helpers/consts";
195
196
  export * from "./helpers/enum";
196
197
  export * from "./helpers/helpers";
198
+ export * from "./helpers/NetworkByte";
197
199
  export * from "./helpers/ootleAddress";
198
200
  export * from "./helpers/tariTypeTag";
@@ -1,9 +1,12 @@
1
1
  export * from "./types/tari-indexer-client/NetworkDescription";
2
+ export * from "./types/tari-indexer-client/TemplateCatalogueItem";
2
3
  export * from "./types/tari-indexer-client/IndexerGetEpochManagerStatsResponse";
3
4
  export * from "./types/tari-indexer-client/ListTransactionReceiptsResponse";
4
5
  export * from "./types/tari-indexer-client/NonFungibleSubstate";
5
6
  export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
6
7
  export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
8
+ export * from "./types/tari-indexer-client/TemplateMeta";
9
+ export * from "./types/tari-indexer-client/ListTemplateCatalogueResponse";
7
10
  export * from "./types/tari-indexer-client/IndexerGetSubstateRequest";
8
11
  export * from "./types/tari-indexer-client/GetNetworkInfoResponse";
9
12
  export * from "./types/tari-indexer-client/GetTemplateDefinitionResponse";
@@ -17,7 +20,6 @@ export * from "./types/tari-indexer-client/GetNetworkSyncStateResponse";
17
20
  export * from "./types/tari-indexer-client/IndexerSubmitTransactionRequest";
18
21
  export * from "./types/tari-indexer-client/IndexerConnection";
19
22
  export * from "./types/tari-indexer-client/InspectSubstateResponse";
20
- export * from "./types/tari-indexer-client/TemplateMetadata";
21
23
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
22
24
  export * from "./types/tari-indexer-client/GetUtxoUpdatesRequest";
23
25
  export * from "./types/tari-indexer-client/IndexerGetCommsStatsResponse";
@@ -31,6 +33,7 @@ export * from "./types/tari-indexer-client/GetUtxosRequest";
31
33
  export * from "./types/tari-indexer-client/GetResourceResponse";
32
34
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultResponse";
33
35
  export * from "./types/tari-indexer-client/TransactionEntry";
36
+ export * from "./types/tari-indexer-client/ListTemplateCatalogueRequest";
34
37
  export * from "./types/tari-indexer-client/GetUtxosResponse";
35
38
  export * from "./types/tari-indexer-client/ListTemplatesResponse";
36
39
  export * from "./types/tari-indexer-client/GetSubstatesResponse";
@@ -1,11 +1,14 @@
1
1
  // Copyright 2026 The Tari Project
2
2
  // SPDX-License-Identifier: BSD-3-Clause
3
3
  export * from "./types/tari-indexer-client/NetworkDescription";
4
+ export * from "./types/tari-indexer-client/TemplateCatalogueItem";
4
5
  export * from "./types/tari-indexer-client/IndexerGetEpochManagerStatsResponse";
5
6
  export * from "./types/tari-indexer-client/ListTransactionReceiptsResponse";
6
7
  export * from "./types/tari-indexer-client/NonFungibleSubstate";
7
8
  export * from "./types/tari-indexer-client/QueryTransactionEventsResponse";
8
9
  export * from "./types/tari-indexer-client/IndexerGetIdentityResponse";
10
+ export * from "./types/tari-indexer-client/TemplateMeta";
11
+ export * from "./types/tari-indexer-client/ListTemplateCatalogueResponse";
9
12
  export * from "./types/tari-indexer-client/IndexerGetSubstateRequest";
10
13
  export * from "./types/tari-indexer-client/GetNetworkInfoResponse";
11
14
  export * from "./types/tari-indexer-client/GetTemplateDefinitionResponse";
@@ -19,7 +22,6 @@ export * from "./types/tari-indexer-client/GetNetworkSyncStateResponse";
19
22
  export * from "./types/tari-indexer-client/IndexerSubmitTransactionRequest";
20
23
  export * from "./types/tari-indexer-client/IndexerConnection";
21
24
  export * from "./types/tari-indexer-client/InspectSubstateResponse";
22
- export * from "./types/tari-indexer-client/TemplateMetadata";
23
25
  export * from "./types/tari-indexer-client/InspectSubstateRequest";
24
26
  export * from "./types/tari-indexer-client/GetUtxoUpdatesRequest";
25
27
  export * from "./types/tari-indexer-client/IndexerGetCommsStatsResponse";
@@ -33,6 +35,7 @@ export * from "./types/tari-indexer-client/GetUtxosRequest";
33
35
  export * from "./types/tari-indexer-client/GetResourceResponse";
34
36
  export * from "./types/tari-indexer-client/IndexerGetTransactionResultResponse";
35
37
  export * from "./types/tari-indexer-client/TransactionEntry";
38
+ export * from "./types/tari-indexer-client/ListTemplateCatalogueRequest";
36
39
  export * from "./types/tari-indexer-client/GetUtxosResponse";
37
40
  export * from "./types/tari-indexer-client/ListTemplatesResponse";
38
41
  export * from "./types/tari-indexer-client/GetSubstatesResponse";
@@ -66,6 +66,10 @@ export type Instruction = {
66
66
  } | {
67
67
  PublishTemplate: {
68
68
  binary: string;
69
+ /**
70
+ * Optional multihash of off-chain CBOR metadata
71
+ */
72
+ metadata_hash: string | null;
69
73
  };
70
74
  } | {
71
75
  AllocateAddress: {
@@ -1,4 +1,8 @@
1
1
  export type PublishedTemplate = {
2
+ /**
3
+ * Human-readable template name extracted from the WASM ABI.
4
+ */
5
+ template_name: string;
2
6
  /**
3
7
  * Author's public key
4
8
  */
@@ -11,4 +15,8 @@ export type PublishedTemplate = {
11
15
  * Epoch at which the template was published
12
16
  */
13
17
  at_epoch: bigint;
18
+ /**
19
+ * Optional multihash of off-chain CBOR metadata
20
+ */
21
+ metadata_hash: string | null;
14
22
  };
@@ -0,0 +1,27 @@
1
+ import type { Hash32 } from "./Hash32";
2
+ import type { RistrettoPublicKeyBytes } from "./RistrettoPublicKeyBytes";
3
+ /**
4
+ * Lightweight template metadata that can be exchanged without transmitting the full WASM binary.
5
+ */
6
+ export type PublishedTemplateMetadata = {
7
+ /**
8
+ * Human-readable template name extracted from the WASM ABI.
9
+ */
10
+ template_name: string;
11
+ /**
12
+ * Author's public key.
13
+ */
14
+ author_public_key: RistrettoPublicKeyBytes;
15
+ /**
16
+ * SHA-256 hash of the WASM binary.
17
+ */
18
+ binary_hash: Hash32;
19
+ /**
20
+ * Epoch at which the template was published.
21
+ */
22
+ at_epoch: bigint;
23
+ /**
24
+ * The author-provided off-chain metadata hash
25
+ */
26
+ metadata_hash: string | null;
27
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Off-chain template metadata, serialized as CBOR for hashing and verification.
3
+ *
4
+ * Template authors populate these fields via their `Cargo.toml` `[package]` and
5
+ * `[package.metadata.tari-template]` sections. The CBOR encoding of this struct is
6
+ * hashed to produce a [`MetadataHash`] that is stored on-chain alongside the template binary.
7
+ */
8
+ export type TemplateMetadata = {
9
+ schema_version: number;
10
+ name: string;
11
+ version: string;
12
+ description?: string;
13
+ tags?: Array<string>;
14
+ category?: string | null;
15
+ repository?: string | null;
16
+ documentation?: string | null;
17
+ homepage?: string | null;
18
+ license?: string | null;
19
+ logo_url?: string | null;
20
+ extra?: {
21
+ [key in string]?: string;
22
+ };
23
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -1,7 +1,13 @@
1
+ import type { ExecuteResult } from "../ExecuteResult";
1
2
  import type { TransactionId } from "../TransactionId";
2
3
  export type IndexerSubmitTransactionResponse = {
3
4
  /**
4
- * The ID of the submitted transaction
5
+ * The ID of the transaction that was dry-run
5
6
  */
6
7
  transaction_id: TransactionId;
8
+ /**
9
+ * The result of the dry-run execution, including any emitted events and state changes, but without a final
10
+ * decision or commitment to the ledger
11
+ */
12
+ result: ExecuteResult;
7
13
  };
@@ -0,0 +1,15 @@
1
+ export type ListTemplateCatalogueRequest = {
2
+ /**
3
+ * Optional substring filter on template name.
4
+ */
5
+ name_filter: string | null;
6
+ /**
7
+ * Maximum number of entries to return (default: 20, max: 100).
8
+ */
9
+ limit: bigint | null;
10
+ /**
11
+ * Cursor: return entries inserted after the row with this template address.
12
+ * When omitted, returns from the beginning.
13
+ */
14
+ after: string | null;
15
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { TemplateCatalogueItem } from "./TemplateCatalogueItem";
2
+ export type ListTemplateCatalogueResponse = {
3
+ entries: Array<TemplateCatalogueItem>;
4
+ };
@@ -1,4 +1,4 @@
1
- import type { TemplateMetadata } from "./TemplateMetadata";
1
+ import type { TemplateMeta } from "./TemplateMeta";
2
2
  export type ListTemplatesResponse = {
3
- templates: Array<TemplateMetadata>;
3
+ templates: Array<TemplateMeta>;
4
4
  };
@@ -7,4 +7,9 @@ export type StreamTransactionEventsRequest = {
7
7
  topic: string | null;
8
8
  substate_id: SubstateId | null;
9
9
  template_address: Hash32 | null;
10
+ /**
11
+ * Resume the event stream from this event ID (exclusive). Events with id > after_id will be
12
+ * replayed from the database before switching to the live stream.
13
+ */
14
+ after_id: bigint | null;
10
15
  };
@@ -0,0 +1,10 @@
1
+ import type { Hash32 } from "../Hash32";
2
+ import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
3
+ export type TemplateCatalogueItem = {
4
+ template_address: Hash32;
5
+ template_name: string;
6
+ author_public_key: RistrettoPublicKeyBytes;
7
+ binary_hash: Hash32;
8
+ at_epoch: bigint;
9
+ metadata_hash?: string | null;
10
+ };
@@ -1,11 +1,15 @@
1
1
  import type { Epoch } from "../Epoch";
2
2
  import type { Hash32 } from "../Hash32";
3
3
  import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
4
- export type TemplateMetadata = {
4
+ export type TemplateMeta = {
5
5
  name: string;
6
6
  address: Hash32;
7
7
  binary_sha: Hash32;
8
8
  author_public_key: RistrettoPublicKeyBytes;
9
9
  code_size: number;
10
10
  epoch: Epoch;
11
+ /**
12
+ * Optional multihash of off-chain CBOR metadata
13
+ */
14
+ metadata_hash?: string | null;
11
15
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,6 @@
1
1
  import type { Hash32 } from "../Hash32";
2
- import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
3
2
  export type VNTemplateMetadata = {
4
3
  name: string;
5
4
  address: Hash32;
6
5
  code_size: number;
7
- author: RistrettoPublicKeyBytes;
8
6
  };
@@ -1,7 +1,5 @@
1
- import type { Amount } from "../Amount";
2
1
  import type { ComponentAddressOrName } from "./ComponentAddressOrName";
3
2
  export type AccountsCreateFreeTestCoinsRequest = {
4
3
  account: ComponentAddressOrName;
5
- amount: Amount;
6
4
  max_fee: number | null;
7
5
  };
@@ -0,0 +1,15 @@
1
+ import type { TemplateMetadata } from "../TemplateMetadata";
2
+ /**
3
+ * Template metadata input for publishing. Either provide the metadata for server-side hashing,
4
+ * or a pre-computed hash.
5
+ */
6
+ export type PublishTemplateMetadata = {
7
+ type: "Literal";
8
+ data: TemplateMetadata;
9
+ } | {
10
+ type: "RawCbor";
11
+ data: string;
12
+ } | {
13
+ type: "Hash";
14
+ data: string;
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { ComponentAddressOrName } from "./ComponentAddressOrName";
2
+ import type { PublishTemplateMetadata } from "./PublishTemplateMetadata";
2
3
  export type PublishTemplateRequest = {
3
4
  binary: string;
4
5
  fee_account: ComponentAddressOrName | null;
@@ -9,4 +10,9 @@ export type PublishTemplateRequest = {
9
10
  */
10
11
  detect_inputs: boolean;
11
12
  dry_run: boolean;
13
+ /**
14
+ * Optional template metadata. Can be provided as raw JSON/CBOR (base64-encoded) for server-side
15
+ * hashing, or as a pre-computed hash.
16
+ */
17
+ metadata?: PublishTemplateMetadata | null;
12
18
  };
@@ -0,0 +1,10 @@
1
+ import type { TemplateMetadata } from "../TemplateMetadata";
2
+ import type { KeyId } from "./KeyId";
3
+ export type SignTemplateMetadataRequest = {
4
+ key_id: KeyId;
5
+ template_address: string;
6
+ /**
7
+ * The template metadata to sign. Provided as an inline JSON object.
8
+ */
9
+ metadata: TemplateMetadata;
10
+ };
@@ -0,0 +1,13 @@
1
+ export type SignTemplateMetadataResponse = {
2
+ public_nonce: string;
3
+ signature: string;
4
+ public_key: string;
5
+ /**
6
+ * Hex-encoded canonical CBOR of the metadata (the signed payload).
7
+ */
8
+ metadata_cbor: string;
9
+ /**
10
+ * The metadata hash derived from the CBOR encoding.
11
+ */
12
+ metadata_hash: string;
13
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -1,9 +1,10 @@
1
1
  import type { ResourceAddress } from "../ResourceAddress";
2
2
  import type { UtxoId } from "../UtxoId";
3
+ import type { KeyId } from "./KeyId";
3
4
  export type StealthUtxosDecryptValueRequest = {
4
5
  resource_address: ResourceAddress;
5
6
  ids: Array<UtxoId>;
6
- view_key_id: bigint;
7
+ view_key_id: KeyId;
7
8
  minimum_expected_value: bigint | null;
8
9
  maximum_expected_value: bigint;
9
10
  };
@@ -1,4 +1,6 @@
1
1
  export * from "./types/wallet-types/AccountsListResponse";
2
+ export * from "./types/wallet-types/PublishTemplateMetadata";
3
+ export * from "./types/wallet-types/SignTemplateMetadataResponse";
2
4
  export * from "./types/wallet-types/WalletGetInfoRequest";
3
5
  export * from "./types/wallet-types/AuthListSessionsResponse";
4
6
  export * from "./types/wallet-types/ClaimBurnResponse";
@@ -111,6 +113,7 @@ export * from "./types/wallet-types/TemplatesGetResponse";
111
113
  export * from "./types/wallet-types/NewAccountData";
112
114
  export * from "./types/wallet-types/AccountsTransferRequest";
113
115
  export * from "./types/wallet-types/AccountsCreateOrGetResponse";
116
+ export * from "./types/wallet-types/SignTemplateMetadataRequest";
114
117
  export * from "./types/wallet-types/AuthLoginRequest";
115
118
  export * from "./types/wallet-types/UtxoInfo";
116
119
  export * from "./types/wallet-types/AccountsCreateFreeTestCoinsRequest";
@@ -1,6 +1,8 @@
1
1
  // Copyright 2026 The Tari Project
2
2
  // SPDX-License-Identifier: BSD-3-Clause
3
3
  export * from "./types/wallet-types/AccountsListResponse";
4
+ export * from "./types/wallet-types/PublishTemplateMetadata";
5
+ export * from "./types/wallet-types/SignTemplateMetadataResponse";
4
6
  export * from "./types/wallet-types/WalletGetInfoRequest";
5
7
  export * from "./types/wallet-types/AuthListSessionsResponse";
6
8
  export * from "./types/wallet-types/ClaimBurnResponse";
@@ -113,6 +115,7 @@ export * from "./types/wallet-types/TemplatesGetResponse";
113
115
  export * from "./types/wallet-types/NewAccountData";
114
116
  export * from "./types/wallet-types/AccountsTransferRequest";
115
117
  export * from "./types/wallet-types/AccountsCreateOrGetResponse";
118
+ export * from "./types/wallet-types/SignTemplateMetadataRequest";
116
119
  export * from "./types/wallet-types/AuthLoginRequest";
117
120
  export * from "./types/wallet-types/UtxoInfo";
118
121
  export * from "./types/wallet-types/AccountsCreateFreeTestCoinsRequest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle-ts-bindings",
3
- "version": "1.30.1",
3
+ "version": "1.31.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,7 +34,9 @@
34
34
  "scripts": {
35
35
  "build-dist": "tsc --project tsconfig.prod.json",
36
36
  "build-dev": "tsc",
37
- "build": "sh build.sh && pnpm run fmt && tsc --project tsconfig.prod.json && echo '✅ Build complete!'",
37
+ "build-full": "pnpm run gen && pnpm run build",
38
+ "build": "pnpm run fmt && tsc --project tsconfig.prod.json && echo '✅ Build complete!'",
39
+ "gen": "sh build.sh",
38
40
  "fmt": "pnpm npx prettier --write \"./**/*.{ts,tsx,css,json}\" --log-level=warn",
39
41
  "test": "vitest run"
40
42
  }