@tari-project/tarijs 0.5.5 → 0.8.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 (37) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE.md +2 -12
  2. package/.github/workflows/check-package-versions.yml +22 -0
  3. package/Dockerfile +2 -2
  4. package/README.md +1 -1
  5. package/docusaurus/tari-docs/docs/provider-vs-signer.md +27 -0
  6. package/docusaurus/tari-docs/docs/wallet/submit-transaction/transaction-builder/inputs.md +0 -1
  7. package/docusaurus/tari-docs/package-lock.json +17964 -0
  8. package/docusaurus/tari-docs/package.json +2 -2
  9. package/package.json +1 -1
  10. package/packages/builders/package.json +3 -2
  11. package/packages/builders/src/helpers/index.ts +1 -1
  12. package/packages/builders/src/helpers/workspace.ts +32 -22
  13. package/packages/builders/src/index.ts +1 -2
  14. package/packages/builders/src/transaction/TransactionBuilder.ts +105 -38
  15. package/packages/builders/src/transaction/TransactionRequest.ts +36 -33
  16. package/packages/indexer_provider/package.json +1 -1
  17. package/packages/metamask_signer/package.json +1 -1
  18. package/packages/metamask_signer/src/index.ts +1 -1
  19. package/packages/tari_permissions/package.json +1 -1
  20. package/packages/tari_permissions/src/tari_permissions.ts +1 -17
  21. package/packages/tari_provider/package.json +1 -1
  22. package/packages/tari_signer/package.json +1 -1
  23. package/packages/tari_universe/package.json +1 -1
  24. package/packages/tarijs/package.json +1 -1
  25. package/packages/tarijs/src/index.ts +0 -4
  26. package/packages/tarijs/test/integration-tests/wallet_daemon/json_rpc_provider.spec.ts +80 -1
  27. package/packages/tarijs_types/package.json +1 -1
  28. package/packages/tarijs_types/src/Instruction.ts +7 -3
  29. package/packages/tarijs_types/src/SubstateType.ts +1 -1
  30. package/packages/tarijs_types/src/Workspace.ts +1 -1
  31. package/packages/wallet_daemon/package.json +1 -1
  32. package/packages/wallet_daemon/src/signer.ts +1 -0
  33. package/packages/walletconnect/package.json +1 -1
  34. package/packages/walletconnect/src/index.ts +1 -0
  35. package/pnpm-workspace.yaml +2 -2
  36. package/scripts/check_versions.sh +42 -0
  37. package/scripts/set_package_versions.sh +39 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tari-docs",
3
- "version": "0.5.0",
3
+ "version": "0.8.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "docusaurus": "docusaurus",
@@ -15,7 +15,7 @@
15
15
  "typecheck": "tsc"
16
16
  },
17
17
  "dependencies": {
18
- "@docusaurus/core": "3.7.0",
18
+ "@docusaurus/core": "^3.7.0",
19
19
  "@docusaurus/preset-classic": "3.7.0",
20
20
  "@docusaurus/remark-plugin-npm2yarn": "^3.7.0",
21
21
  "@mdx-js/react": "^3.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs",
3
- "version": "0.5.5",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-builders",
3
- "version": "0.5.5",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -15,7 +15,8 @@
15
15
  "dependencies": {
16
16
  "@tari-project/tari-signer": "workspace:^",
17
17
  "@tari-project/tari-universe-signer": "workspace:^",
18
- "@tari-project/tarijs-types": "workspace:^"
18
+ "@tari-project/tarijs-types": "workspace:^",
19
+ "@tari-project/typescript-bindings": "catalog:"
19
20
  },
20
21
  "devDependencies": {
21
22
  "@types/node": "catalog:",
@@ -1,2 +1,2 @@
1
1
  export { buildTransactionRequest, submitAndWaitForTransaction, waitForTransactionResult } from "./submitTransaction";
2
- export { fromWorkspace, toWorkspace } from "./workspace";
2
+ export { parseWorkspaceStringKey, NamedArg } from "./workspace";
@@ -1,32 +1,42 @@
1
- import { WorkspaceArg } from "@tari-project/tarijs-types";
1
+ import { TransactionArg, WorkspaceArg } from "@tari-project/tarijs-types";
2
2
 
3
3
  /**
4
- *
5
- * @param key workspace name
6
- * @returns encoded Uint8Array value
7
- * @example
8
- * key: "0" -> [ 48 ]
9
- * key: "0.0" -> [ 48, 46, 48 ]
10
- * key: "0.1" -> [ 48, 46, 49 ]
11
- *
12
- * key: "bucket" -> [ 98, 117, 99, 107, 101, 116 ]
13
- * key: "bucket.0" -> [ 98, 117, 99, 107, 101, 116, 46, 48 ]
14
- * key: "bucket.1" -> [ 98, 117, 99, 107, 101, 116, 46, 49 ]
4
+ * A parsed workspace key string into an object with name and optional offset.
5
+ * Examples:
6
+ * "bucket" -> { name: "bucket", offset: undefined }
7
+ * "bucket.0" -> { name: "bucket", offset: 0 }
15
8
  */
16
- export function toWorkspace(key: string): number[] {
17
- const encoder = new TextEncoder();
18
- return Array.from(encoder.encode(key));
9
+ export interface ParsedBuildersWorkspaceKey {
10
+ name: string;
11
+ offset: number | null;
19
12
  }
20
13
 
21
14
  /**
22
15
  *
23
- * @param key workspace name
24
- * @returns formatted Workspace data
16
+ * @param key workspace name. Offsets can be specified with a dot notation, e.g. "bucket.0"
17
+ * @returns Parsed workspace key object
25
18
  * @example
26
- * key: "bucket" -> { Workspace: [ 98, 117, 99, 107, 101, 116 ] }
19
+ * key: "bucket" -> { name: "bucket", offset: undefined }
20
+ * key: "bucket.0" -> { name: "bucket", offset: 0 }
21
+ * key: "bucket.1" -> { name: "bucket", offset: 1 }
27
22
  */
28
- export function fromWorkspace(key: string): WorkspaceArg {
29
- const encoder = new TextEncoder();
30
- const encodedKey = encoder.encode(key);
31
- return { Workspace: Array.from(encodedKey) };
23
+ export function parseWorkspaceStringKey(key: string): ParsedBuildersWorkspaceKey {
24
+ const parts = key.split(".");
25
+ if (parts.length > 2) {
26
+ throw new Error("Invalid workspace key format. Only one dot is allowed.");
27
+ }
28
+ const name = parts[0];
29
+ const offset = parts[1] ? parseInt(parts[1], 10) : null;
30
+
31
+ return {
32
+ name,
33
+ offset,
34
+ };
32
35
  }
36
+
37
+ /**
38
+ * Either a literal Transaction Arg or a named workspace argument.
39
+ * Named workspace arguments are used to refer to a workspace by name,
40
+ * and are converted to numeric IDs by the TransactionBuilder.
41
+ */
42
+ export type NamedArg = { Workspace: string } | TransactionArg;
@@ -4,6 +4,5 @@ export {
4
4
  buildTransactionRequest,
5
5
  submitAndWaitForTransaction,
6
6
  waitForTransactionResult,
7
- fromWorkspace,
8
- toWorkspace,
7
+ parseWorkspaceStringKey,
9
8
  } from "./helpers";
@@ -1,9 +1,10 @@
1
1
  // Copyright 2024 The Tari Project
2
2
  // SPDX-License-Identifier: BSD-3-Clause
3
- import { toWorkspace } from "../helpers";
4
3
 
5
4
  import { TransactionRequest } from "./TransactionRequest";
5
+ import { TransactionArg } from "@tari-project/tarijs-types";
6
6
  import {
7
+ Amount,
7
8
  ComponentAddress,
8
9
  ConfidentialClaim,
9
10
  ConfidentialWithdrawProof,
@@ -14,24 +15,28 @@ import {
14
15
  TransactionSignature,
15
16
  UnsignedTransaction,
16
17
  PublishedTemplateAddress,
17
- SubstateType,
18
- TransactionArg,
19
- } from "@tari-project/tarijs-types";
18
+ WorkspaceOffsetId,
19
+ UnsignedTransactionV1, AllocatableAddressType,
20
+ } from "@tari-project/typescript-bindings";
21
+ import { parseWorkspaceStringKey } from "../helpers";
22
+ import { NamedArg } from "../helpers/workspace";
20
23
 
21
24
  export interface TransactionConstructor {
22
- new (unsignedTransaction: UnsignedTransaction, signatures: TransactionSignature[]): Transaction;
25
+ new(unsignedTransaction: UnsignedTransaction, signatures: TransactionSignature[]): Transaction;
23
26
  }
24
27
 
25
28
  export interface TariFunctionDefinition {
26
29
  functionName: string;
27
- args?: TransactionArg[];
30
+ args?: NamedArg[];
28
31
  templateAddress: PublishedTemplateAddress;
29
32
  }
30
33
 
31
34
  export interface TariMethodDefinition {
32
35
  methodName: string;
33
36
  args?: TransactionArg[];
34
- componentAddress: ComponentAddress;
37
+ // These are mutually exclusive i.e. either componentAddress or fromWorkspace (TODO: define this properly in typescript)
38
+ componentAddress?: ComponentAddress;
39
+ fromWorkspace?: string,
35
40
  }
36
41
 
37
42
  export interface TariCreateAccountDefinition {
@@ -75,7 +80,7 @@ export interface Builder {
75
80
 
76
81
  withFeeInstructionsBuilder(builder: (builder: TransactionBuilder) => this): this;
77
82
 
78
- withUnsignedTransaction(unsignedTransaction: UnsignedTransaction): this;
83
+ withUnsignedTransaction(unsignedTransaction: UnsignedTransactionV1): this;
79
84
 
80
85
  feeTransactionPayFromComponent(componentAddress: ComponentAddress, maxFee: string): this;
81
86
 
@@ -84,52 +89,70 @@ export interface Builder {
84
89
  proof: ConfidentialWithdrawProof,
85
90
  ): this;
86
91
 
87
- buildUnsignedTransaction(): UnsignedTransaction;
92
+ buildUnsignedTransaction(): UnsignedTransactionV1;
88
93
 
89
94
  build(): Transaction;
90
95
  }
91
96
 
92
97
  export class TransactionBuilder implements Builder {
93
- private unsignedTransaction: UnsignedTransaction;
98
+ private unsignedTransaction: UnsignedTransactionV1;
94
99
  private signatures: TransactionSignature[];
100
+ private allocatedIds: Map<string, number>;
101
+ private current_id: number;
95
102
 
96
- constructor() {
103
+ constructor(network: number) {
97
104
  this.unsignedTransaction = {
98
- feeInstructions: [],
105
+ network,
106
+ fee_instructions: [],
99
107
  instructions: [],
100
108
  inputs: [],
101
- filledInputs: [],
102
- minEpoch: undefined,
103
- maxEpoch: undefined,
109
+ min_epoch: null,
110
+ max_epoch: null,
111
+ dry_run: false,
112
+ is_seal_signer_authorized: false
104
113
  };
105
114
  this.signatures = [];
115
+ this.allocatedIds = new Map();
116
+ this.current_id = 0;
106
117
  }
107
118
 
108
119
  public callFunction<T extends TariFunctionDefinition>(func: T, args: Exclude<T["args"], undefined>): this {
120
+ const resolvedArgs = this.resolveArgs(args);
109
121
  return this.addInstruction({
110
122
  CallFunction: {
111
- template_address: func.templateAddress,
123
+ address: func.templateAddress,
112
124
  function: func.functionName,
113
- args,
125
+ args: resolvedArgs,
114
126
  },
115
127
  });
116
128
  }
117
129
 
118
130
  public callMethod<T extends TariMethodDefinition>(method: T, args: Exclude<T["args"], undefined>): this {
131
+ const call = method.componentAddress ?
132
+ { Address: method.componentAddress } :
133
+ // NOTE: offset IDs are not supported for method calls
134
+ { Workspace: this.getNamedId(method.fromWorkspace!)! };
135
+ const resolvedArgs = this.resolveArgs(args);
119
136
  return this.addInstruction({
120
137
  CallMethod: {
121
- component_address: method.componentAddress,
138
+ call,
122
139
  method: method.methodName,
123
- args,
140
+ args: resolvedArgs,
124
141
  },
125
142
  });
126
143
  }
127
144
 
128
145
  public createAccount(ownerPublicKey: string, workspaceBucket?: string): this {
146
+ const workspace_id = workspaceBucket ?
147
+ this.getOffsetIdFromWorkspaceName(workspaceBucket) :
148
+ null;
149
+
129
150
  return this.addInstruction({
130
151
  CreateAccount: {
131
- owner_public_key: ownerPublicKey,
132
- workspace_bucket: workspaceBucket ?? null,
152
+ public_key_address: ownerPublicKey,
153
+ owner_rule: null, // Custom owner rule is not set by default
154
+ access_rules: null, // Custom access rules are not set by default
155
+ workspace_id,
133
156
  },
134
157
  });
135
158
  }
@@ -137,7 +160,7 @@ export class TransactionBuilder implements Builder {
137
160
  public createProof(account: ComponentAddress, resourceAddress: ResourceAddress): this {
138
161
  return this.addInstruction({
139
162
  CallMethod: {
140
- component_address: account,
163
+ call: {Address: account},
141
164
  method: "create_proof_for_resource",
142
165
  args: [resourceAddress],
143
166
  },
@@ -152,11 +175,23 @@ export class TransactionBuilder implements Builder {
152
175
  });
153
176
  }
154
177
 
155
- public allocateAddress(substateType: SubstateType, workspaceId: string): this {
178
+ public allocateAddress(allocatableType: AllocatableAddressType, workspaceId: string): this {
179
+ const workspace_id = this.addNamedId(workspaceId);
156
180
  return this.addInstruction({
157
181
  AllocateAddress: {
158
- substate_type: substateType,
159
- workspace_id: workspaceId,
182
+ allocatable_type: allocatableType,
183
+ workspace_id,
184
+ },
185
+ });
186
+ }
187
+
188
+ public assertBucketContains(workspaceName: string, resource_address: ResourceAddress, min_amount: Amount): this {
189
+ const key = this.getOffsetIdFromWorkspaceName(workspaceName);
190
+ return this.addInstruction({
191
+ AssertBucketContains: {
192
+ key,
193
+ resource_address,
194
+ min_amount,
160
195
  },
161
196
  });
162
197
  }
@@ -166,10 +201,11 @@ export class TransactionBuilder implements Builder {
166
201
  * `PutLastInstructionOutputOnWorkspace: { key: Array<number> }`
167
202
  * to make saving variables easier.
168
203
  */
169
- public saveVar(key: string): this {
204
+ public saveVar(name: string): this {
205
+ let key = this.addNamedId(name);
170
206
  return this.addInstruction({
171
207
  PutLastInstructionOutputOnWorkspace: {
172
- key: toWorkspace(key),
208
+ key,
173
209
  },
174
210
  });
175
211
  }
@@ -183,7 +219,7 @@ export class TransactionBuilder implements Builder {
183
219
  public feeTransactionPayFromComponent(componentAddress: ComponentAddress, maxFee: string): this {
184
220
  return this.addFeeInstruction({
185
221
  CallMethod: {
186
- component_address: componentAddress,
222
+ call: {Address: componentAddress},
187
223
  method: "pay_fee",
188
224
  args: [maxFee],
189
225
  },
@@ -201,7 +237,7 @@ export class TransactionBuilder implements Builder {
201
237
  ): this {
202
238
  return this.addFeeInstruction({
203
239
  CallMethod: {
204
- component_address: componentAddress,
240
+ call: { Address: componentAddress },
205
241
  method: "pay_fee_confidential",
206
242
  args: [proof],
207
243
  },
@@ -212,21 +248,21 @@ export class TransactionBuilder implements Builder {
212
248
  return this.addInstruction("DropAllProofsInWorkspace");
213
249
  }
214
250
 
215
- public withUnsignedTransaction(unsignedTransaction: UnsignedTransaction): this {
251
+ public withUnsignedTransaction(unsignedTransaction: UnsignedTransactionV1): this {
216
252
  this.unsignedTransaction = unsignedTransaction;
217
253
  this.signatures = [];
218
254
  return this;
219
255
  }
220
256
 
221
257
  public withFeeInstructions(instructions: Instruction[]): this {
222
- this.unsignedTransaction.feeInstructions = instructions;
258
+ this.unsignedTransaction.fee_instructions = instructions;
223
259
  this.signatures = [];
224
260
  return this;
225
261
  }
226
262
 
227
263
  public withFeeInstructionsBuilder(builder: (builder: TransactionBuilder) => TransactionBuilder): this {
228
- const newBuilder = builder(new TransactionBuilder());
229
- this.unsignedTransaction.feeInstructions = newBuilder.unsignedTransaction.instructions;
264
+ const newBuilder = builder(new TransactionBuilder(this.unsignedTransaction.network));
265
+ this.unsignedTransaction.fee_instructions = newBuilder.unsignedTransaction.instructions;
230
266
  this.signatures = [];
231
267
  return this;
232
268
  }
@@ -238,7 +274,7 @@ export class TransactionBuilder implements Builder {
238
274
  }
239
275
 
240
276
  public addFeeInstruction(instruction: Instruction): this {
241
- this.unsignedTransaction.feeInstructions.push(instruction);
277
+ this.unsignedTransaction.fee_instructions.push(instruction);
242
278
  this.signatures = [];
243
279
  return this;
244
280
  }
@@ -262,24 +298,55 @@ export class TransactionBuilder implements Builder {
262
298
  }
263
299
 
264
300
  public withMinEpoch(minEpoch: number): this {
265
- this.unsignedTransaction.minEpoch = minEpoch;
301
+ this.unsignedTransaction.min_epoch = minEpoch;
266
302
  // Reset the signatures as they are no longer valid
267
303
  this.signatures = [];
268
304
  return this;
269
305
  }
270
306
 
271
307
  public withMaxEpoch(maxEpoch: number): this {
272
- this.unsignedTransaction.maxEpoch = maxEpoch;
308
+ this.unsignedTransaction.max_epoch = maxEpoch;
273
309
  // Reset the signatures as they are no longer valid
274
310
  this.signatures = [];
275
311
  return this;
276
312
  }
277
313
 
278
- public buildUnsignedTransaction(): UnsignedTransaction {
314
+ public buildUnsignedTransaction(): UnsignedTransactionV1 {
279
315
  return this.unsignedTransaction;
280
316
  }
281
317
 
282
318
  public build(): Transaction {
283
- return new TransactionRequest(this.unsignedTransaction, this.signatures);
319
+ return new TransactionRequest(this.buildUnsignedTransaction(), this.signatures);
320
+ }
321
+
322
+ private addNamedId(name: string): number {
323
+ const id = this.current_id;
324
+ this.allocatedIds.set(name, id);
325
+ this.current_id += 1;
326
+ return id;
284
327
  }
328
+
329
+ private getNamedId(name: string): number | undefined {
330
+ return this.allocatedIds.get(name);
331
+ }
332
+
333
+ private getOffsetIdFromWorkspaceName(name: string): WorkspaceOffsetId {
334
+ const parsed = parseWorkspaceStringKey(name);
335
+ const id = this.getNamedId(parsed.name);
336
+ if (id === undefined) {
337
+ throw new Error(`No workspace with name ${parsed.name} found`);
338
+ }
339
+ return { id, offset: parsed.offset };
340
+ }
341
+
342
+ private resolveArgs(args: NamedArg[]): TransactionArg[] {
343
+ return args.map((arg) => {
344
+ if (typeof arg === "object" && "Workspace" in arg) {
345
+ const workspaceId = this.getOffsetIdFromWorkspaceName(arg.Workspace);
346
+ return { Workspace: workspaceId };
347
+ }
348
+ return arg;
349
+ });
350
+ }
351
+
285
352
  }
@@ -3,74 +3,77 @@ import {
3
3
  Instruction,
4
4
  SubstateRequirement,
5
5
  Transaction,
6
+ UnsignedTransactionV1,
6
7
  TransactionSignature,
7
- UnsignedTransaction,
8
8
  VersionedSubstateId,
9
- } from "@tari-project/tarijs-types";
9
+ TransactionV1,
10
+ } from "@tari-project/typescript-bindings";
11
+
12
+
10
13
 
11
14
  ///TODO this implementation is not fully done, see:
12
- /// https://github.com/tari-project/tari-dan/blob/development/dan_layer/transaction/src/transaction.rs
15
+ /// https://github.com/tari-project/tari-ootle/blob/development/dan_layer/transaction/src/transaction.rs
13
16
  export class TransactionRequest implements Transaction {
14
17
  id: string;
15
- feeInstructions: Array<Instruction>;
16
- instructions: Array<Instruction>;
17
- inputs: Array<SubstateRequirement>;
18
- signatures: Array<TransactionSignature>;
19
- unsignedTransaction: UnsignedTransaction;
20
- minEpoch?: Epoch;
21
- maxEpoch?: Epoch;
22
- filledInputs: VersionedSubstateId[];
23
-
24
- constructor(unsignedTransaction: UnsignedTransaction, signatures: TransactionSignature[]) {
18
+ V1: TransactionV1;
19
+
20
+ constructor(unsignedTransaction: UnsignedTransactionV1, signatures: TransactionSignature[]) {
25
21
  this.id = "";
26
- this.feeInstructions = unsignedTransaction.feeInstructions;
27
- this.instructions = unsignedTransaction.instructions;
28
- this.inputs = unsignedTransaction.inputs;
29
- this.signatures = signatures;
30
- this.minEpoch = unsignedTransaction.minEpoch;
31
- this.maxEpoch = unsignedTransaction.maxEpoch;
32
- // Inputs filled by some authority. These are not part of the transaction hash nor the signature
33
- this.filledInputs = [];
22
+ this.V1 = {
23
+ body: {
24
+ transaction: unsignedTransaction,
25
+ signatures,
26
+ },
27
+ seal_signature: {
28
+ public_key: "",
29
+ signature: {
30
+ public_nonce: "",
31
+ signature: "",
32
+ }
33
+ },
34
+ // Inputs filled by some authority. These are not part of the transaction hash nor the signature
35
+ filled_inputs: []
36
+ };
34
37
  }
35
38
 
36
39
  withFilledInputs(filled_inputs: Array<VersionedSubstateId>): this {
37
40
  return { ...this, filled_inputs };
38
41
  }
39
42
 
40
- getUnsignedTransaction(): UnsignedTransaction {
41
- return this.unsignedTransaction;
43
+ getUnsignedTransaction(): UnsignedTransactionV1 {
44
+ return this.V1.body.transaction;
42
45
  }
43
46
 
44
47
  getFeeInstructions(): Instruction[] {
45
- return this.feeInstructions;
48
+ return this.V1.body.transaction.fee_instructions;
46
49
  }
47
50
 
48
51
  getInstructions(): Instruction[] {
49
- return this.instructions;
52
+ return this.V1.body.transaction.instructions;
50
53
  }
51
54
 
52
55
  getSignatures(): TransactionSignature[] {
53
- return this.signatures;
56
+ return this.V1.body.signatures;
54
57
  }
55
58
 
56
59
  getInputs(): SubstateRequirement[] {
57
- return this.inputs;
60
+ return this.V1.body.transaction.inputs;
58
61
  }
59
62
 
60
63
  getFilledInputs(): VersionedSubstateId[] {
61
- return this.filledInputs;
64
+ return this.V1.filled_inputs;
62
65
  }
63
66
 
64
67
  getFilledInputsMut(): VersionedSubstateId[] {
65
- return this.filledInputs;
68
+ return this.V1.filled_inputs;
66
69
  }
67
70
 
68
- getMinEpoch(): Epoch | undefined {
69
- return this.minEpoch;
71
+ getMinEpoch(): Epoch | null {
72
+ return this.V1.body.transaction.min_epoch;
70
73
  }
71
74
 
72
- getMaxEpoch(): Epoch | undefined {
73
- return this.maxEpoch;
75
+ getMaxEpoch(): Epoch | null {
76
+ return this.V1.body.transaction.max_epoch;
74
77
  }
75
78
 
76
79
  setId(id: string): void {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/indexer-provider",
3
- "version": "0.5.3",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/metamask-signer",
3
- "version": "0.5.3",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -227,7 +227,7 @@ export class MetamaskTariSigner implements TariSigner {
227
227
  }
228
228
 
229
229
  function convertToStatus(result: any): TransactionStatus {
230
- // Ref: https://github.com/tari-project/tari-dan/blob/bb0b31139b770aacd7bb49af865543aa4a9e2de4/dan_layer/wallet/sdk/src/apis/transaction.rs
230
+ // Ref: https://github.com/tari-project/tari-ootle/blob/bb0b31139b770aacd7bb49af865543aa4a9e2de4/dan_layer/wallet/sdk/src/apis/transaction.rs
231
231
  if (result.final_decision !== "Commit") {
232
232
  return TransactionStatus.Rejected;
233
233
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-permissions",
3
- "version": "0.5.3",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -102,17 +102,6 @@ export class NonFungibleAddress {
102
102
  }
103
103
  }
104
104
 
105
- export class NonFungibleIndexAddress {
106
- private resource_address: ResourceAddress;
107
- private index: number;
108
- constructor(resource_address: ResourceAddress, index: number) {
109
- this.resource_address = resource_address;
110
- this.index = index;
111
- }
112
- toJSON() {
113
- return { resource_address: this.resource_address, index: this.index };
114
- }
115
- }
116
105
 
117
106
  export class ComponentAddress {
118
107
  private tagged: Tagged;
@@ -139,8 +128,7 @@ export type SubstateAddressType =
139
128
  | ComponentAddress
140
129
  | VaultId
141
130
  | UnclaimedConfidentialOutputAddress
142
- | NonFungibleAddress
143
- | NonFungibleIndexAddress;
131
+ | NonFungibleAddress;
144
132
 
145
133
  export class SubstateAddress {
146
134
  private value: SubstateAddressType;
@@ -156,10 +144,6 @@ export class SubstateAddress {
156
144
  return { Vault: this.value };
157
145
  } else if (this.value instanceof UnclaimedConfidentialOutputAddress) {
158
146
  return { UnclaimedConfidentialOutput: this.value };
159
- } else if (this.value instanceof NonFungibleAddress) {
160
- return { NonFungible: this.value };
161
- } else if (this.value instanceof NonFungibleIndexAddress) {
162
- return { NonFungibleIndex: this.value };
163
147
  }
164
148
  throw "Unknown type";
165
149
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-provider",
3
- "version": "0.5.3",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-signer",
3
- "version": "0.5.3",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tari-universe-signer",
3
- "version": "0.5.5",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-all",
3
- "version": "0.5.5",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -11,8 +11,6 @@ import {
11
11
  buildTransactionRequest,
12
12
  submitAndWaitForTransaction,
13
13
  waitForTransactionResult,
14
- fromWorkspace,
15
- toWorkspace,
16
14
  } from "@tari-project/tarijs-builders";
17
15
  import {
18
16
  convertStringToTransactionStatus,
@@ -73,8 +71,6 @@ export {
73
71
  buildTransactionRequest,
74
72
  submitAndWaitForTransaction,
75
73
  waitForTransactionResult,
76
- fromWorkspace,
77
- toWorkspace,
78
74
  convertHexStringToU256Array,
79
75
  convertU256ToHexString,
80
76
  createNftAddressFromResource,