@tari-project/ootle 0.5.0 → 0.6.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 (3) hide show
  1. package/dist/index.d.ts +54 -16
  2. package/dist/index.js +237 -221
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ import { IndexerGetTransactionResultResponse } from '@tari-project/ootle-ts-bind
17
17
  import { IndexerSubmitTransactionRequest } from '@tari-project/ootle-ts-bindings';
18
18
  import { IndexerSubmitTransactionResponse } from '@tari-project/ootle-ts-bindings';
19
19
  import { IndexerTransactionFinalizedResult } from '@tari-project/ootle-ts-bindings';
20
+ import { InputDeclaration } from '@tari-project/ootle-ts-bindings';
20
21
  import { Instruction } from '@tari-project/ootle-ts-bindings';
21
22
  import { InstructionArg } from '@tari-project/ootle-ts-bindings';
22
23
  import { ListRecentTransactionsRequest } from '@tari-project/ootle-ts-bindings';
@@ -61,7 +62,7 @@ export declare class AccountInvokeBuilder {
61
62
  * Declares the transaction's substate inputs (e.g. the source account and its
62
63
  * vaults) so the indexer resolves their versions before submission.
63
64
  */
64
- withInputs(inputs: SubstateRequirement[]): this;
65
+ withInputs(inputs: Array<SubstateRequirement | InputDeclaration>): this;
65
66
  /**
66
67
  * Adds a fee instruction paying from the account's default vault.
67
68
  */
@@ -513,11 +514,11 @@ export declare function fromHexStr(hex: string): Uint8Array;
513
514
  *
514
515
  * @param crypto - The crypto seam (real WASM or a fake).
515
516
  * @param specs - The stealth outputs to create (must be non-empty).
516
- * @param revealed - The revealed (un-confidential) output amount (0 for fully-stealth).
517
+ * @param revealed - The revealed (un-confidential) output and its receiver (`null` for fully-stealth).
517
518
  * @returns A complete transfer statement.
518
519
  * @throws {InvalidArgumentError} if `specs` is empty.
519
520
  */
520
- export declare function generateOutputsStatement(crypto: StealthCryptoProvider, specs: Output[], revealed: bigint): Promise<StealthTransferStatement>;
521
+ export declare function generateOutputsStatement(crypto: StealthCryptoProvider, specs: Output[], revealed: RevealedOutput | null): Promise<StealthTransferStatement>;
521
522
 
522
523
  /**
523
524
  * Generate a fresh seal keypair (a thin wrapper over the WASM `generateKeypair`).
@@ -573,6 +574,8 @@ export { IndexerSubmitTransactionResponse }
573
574
 
574
575
  export { IndexerTransactionFinalizedResult }
575
576
 
577
+ export { InputDeclaration }
578
+
576
579
  export { Instruction }
577
580
 
578
581
  export { InstructionArg }
@@ -933,9 +936,10 @@ export declare interface Provider {
933
936
  getTransactionResult(transactionId: string): Promise<IndexerGetTransactionResultResponse>;
934
937
  /**
935
938
  * Resolves unversioned inputs by fetching their current version from the indexer.
936
- * Returns the same list with `version` filled in for any entry that had `version: null`.
939
+ * Returns the same list with `version` filled in for any entry that had `version: null`,
940
+ * and `is_write` preserved.
937
941
  */
938
- resolveInputs(inputs: SubstateRequirement[]): Promise<SubstateRequirement[]>;
942
+ resolveInputs(inputs: InputDeclaration[]): Promise<InputDeclaration[]>;
939
943
  /** Lists recent transactions. */
940
944
  listRecentTransactions(params: ListRecentTransactionsRequest): Promise<ListRecentTransactionsResponse>;
941
945
  }
@@ -993,6 +997,21 @@ export declare function resolveTransaction(provider: Provider, unsignedTx: Unsig
993
997
  */
994
998
  export declare function resourceAddressLiteral(address: ResourceAddress): InstructionArg;
995
999
 
1000
+ /**
1001
+ * Revealed (un-confidential) funds a stealth transfer outputs as a bucket, and the key
1002
+ * authorised to take them.
1003
+ *
1004
+ * The engine requires `receiver`'s badge in the transaction's auth scope before it creates
1005
+ * the bucket, so a statement lifted into another transaction yields its revealed funds to
1006
+ * nobody. `null` (not a zero amount) is the only encoding of "no revealed output".
1007
+ */
1008
+ export declare interface RevealedOutput {
1009
+ /** µTari amount to reveal (must be `> 0n`). */
1010
+ amount: bigint;
1011
+ /** 32-byte public key whose badge must be in the transaction's auth scope. */
1012
+ receiver: Uint8Array;
1013
+ }
1014
+
996
1015
  /**
997
1016
  * A seal keypair: the throwaway key the seal signature is produced with.
998
1017
  *
@@ -1194,11 +1213,12 @@ export declare interface StealthCryptoProvider {
1194
1213
  * into a canonical WASM outputs-statement plus the summed output mask.
1195
1214
  *
1196
1215
  * @param specs - The outputs to create (incl. change).
1197
- * @param revealedOutputAmount - The un-confidential (revealed) µTari output amount.
1216
+ * @param revealedOutput - The un-confidential (revealed) output and its receiver, or
1217
+ * `null` for none.
1198
1218
  * @returns The WASM-produced {@link StealthOutputsStatement} and the aggregated
1199
1219
  * `outputMask` for the balance proof.
1200
1220
  */
1201
- generateOutputsStatement(specs: Output[], revealedOutputAmount: bigint): Promise<{
1221
+ generateOutputsStatement(specs: Output[], revealedOutput: RevealedOutput | null): Promise<{
1202
1222
  statement: StealthOutputsStatement;
1203
1223
  outputMask: Mask;
1204
1224
  }>;
@@ -1213,7 +1233,8 @@ export declare interface StealthCryptoProvider {
1213
1233
  /**
1214
1234
  * Sign the balance proof over the two statements' canonical wire JSONs.
1215
1235
  *
1216
- * A transfer with **no stealth inputs** passes `inputMask = Mask.zero()`.
1236
+ * A transfer with **no stealth inputs** passes `inputMask = Mask.zero()`. The signature
1237
+ * also binds the envelope's covenant claims, which this SDK always emits empty.
1217
1238
  *
1218
1239
  * @returns The `(public_nonce, signature)` balance-proof signature.
1219
1240
  */
@@ -1348,7 +1369,7 @@ export declare class StealthOutputsStatement {
1348
1369
  * const spec = await new StealthTransfer(provider, resourceAddress)
1349
1370
  * .spendRevealedInput(account, 5n * TARI)
1350
1371
  * .toStealthOutput(createOutput({ destination, amount: 3n * TARI, resourceAddress }))
1351
- * .toRevealedOutput(1n * TARI) // revealed change back to `account`
1372
+ * .toRevealedOutput(1n * TARI, accountPublicKey) // revealed change back to `account`
1352
1373
  * .payFeeFromRevealed(1n * TARI)
1353
1374
  * .prepare();
1354
1375
  * ```
@@ -1384,9 +1405,15 @@ export declare class StealthTransfer {
1384
1405
  /**
1385
1406
  * Add revealed (un-confidential) change, returned to the revealed source account.
1386
1407
  *
1387
- * @throws {InvalidArgumentError} if `amount` is not `> 0`.
1408
+ * `receiver` is the public key authorised to take the revealed bucket: the engine requires
1409
+ * its badge in the transaction's auth scope, so it must be the key of a signer of this
1410
+ * transaction — normally the source account's owner key. Calling this more than once
1411
+ * accumulates the amount but the receiver must be the same.
1412
+ *
1413
+ * @throws {InvalidArgumentError} if `amount` is not `> 0`, `receiver` is not 32 bytes,
1414
+ * or a different receiver is supplied on a second call.
1388
1415
  */
1389
- toRevealedOutput(amount: bigint): this;
1416
+ toRevealedOutput(amount: bigint, receiver: Uint8Array): this;
1390
1417
  /**
1391
1418
  * Pay the transaction fee from the revealed source account (max `amount`).
1392
1419
  *
@@ -1571,7 +1598,11 @@ export declare interface StealthTransferState {
1571
1598
  owner: string;
1572
1599
  }>;
1573
1600
  outputs: Output[];
1574
- revealedOutputAmount: bigint;
1601
+ /**
1602
+ * The accumulated revealed change and the key authorised to take it, or `null` when the
1603
+ * transfer reveals nothing.
1604
+ */
1605
+ revealedOutput: RevealedOutput | null;
1575
1606
  }
1576
1607
 
1577
1608
  /**
@@ -1805,8 +1836,15 @@ export declare class TransactionBuilder {
1805
1836
  * Note this REPLACES any fee instructions already set, as it always has.
1806
1837
  */
1807
1838
  withFeeInstructionsBuilder(builder: (b: TransactionBuilder) => TransactionBuilder): this;
1808
- addInput(input: SubstateRequirement): this;
1809
- withInputs(inputs: SubstateRequirement[]): this;
1839
+ /**
1840
+ * Declare a transaction input. A {@link SubstateRequirement} (no `is_write`) is declared as a
1841
+ * write — the conservative default: over-declaring locks more than needed, whereas writing to
1842
+ * an input declared read aborts the transaction. Pass `is_write: false` for inputs the
1843
+ * transaction only reads, so they take a read lock that admits concurrent readers.
1844
+ */
1845
+ addInput(input: SubstateRequirement | InputDeclaration): this;
1846
+ /** Declare several transaction inputs; see {@link addInput} for the `is_write` default. */
1847
+ withInputs(inputs: Array<SubstateRequirement | InputDeclaration>): this;
1810
1848
  /** @throws {InvalidArgumentError} if `minEpoch` is not a non-negative integer. */
1811
1849
  withMinEpoch(minEpoch: number): this;
1812
1850
  /**
@@ -2028,7 +2066,7 @@ export declare interface WalletStealthAuthorizerOptions {
2028
2066
  }
2029
2067
 
2030
2068
  /**
2031
- * The real `StealthCryptoProvider`, backed by `@tari-project/ootle-wasm@0.38.0`.
2069
+ * The real `StealthCryptoProvider`, backed by `@tari-project/ootle-wasm@0.42.0`.
2032
2070
  *
2033
2071
  * Marshals between the step-02 domain types (`Mask`, `Output`, statements) and the raw
2034
2072
  * WASM ABI (snake_case result fields, positional args, raw `Uint8Array`s/`bigint`s).
@@ -2041,7 +2079,7 @@ export declare class WasmStealthCrypto implements StealthCryptoProvider {
2041
2079
  */
2042
2080
  private readonly network;
2043
2081
  constructor(network?: Network);
2044
- generateOutputsStatement(specs: Output[], revealedOutputAmount: bigint): Promise<{
2082
+ generateOutputsStatement(specs: Output[], revealedOutput: RevealedOutput | null): Promise<{
2045
2083
  statement: StealthOutputsStatement;
2046
2084
  outputMask: Mask;
2047
2085
  }>;
package/dist/index.js CHANGED
@@ -74,9 +74,9 @@ function Ce(e11) {
74
74
  case "string":
75
75
  return Ee(e11);
76
76
  case "boolean":
77
- return Oe(e11);
77
+ return De(e11);
78
78
  default:
79
- if (e11 instanceof Uint8Array) return De(e11);
79
+ if (e11 instanceof Uint8Array) return A(e11);
80
80
  throw new v(`literalArg: cannot CBOR-encode value of type ${typeof e11}`);
81
81
  }
82
82
  }
@@ -84,128 +84,128 @@ function k(e11) {
84
84
  if (e11 < 0n) throw new v(`amountLiteral: amount must be non-negative, got ${e11}`);
85
85
  if (e11 >> 128n != 0n) throw new v(`amountLiteral: amount overflows u128: ${e11}`);
86
86
  let t2 = [];
87
- return e11 <= S ? F(t2, T, e11) : we(t2, e11), I(t2);
87
+ return e11 <= S ? I(t2, T, e11) : we(t2, e11), L(t2);
88
88
  }
89
89
  function we(e11, t2) {
90
90
  let n2 = [], r2 = t2;
91
91
  for (; r2 > 0n; ) n2.unshift(Number(r2 & 255n)), r2 >>= 8n;
92
- F(e11, O, le), F(e11, E, BigInt(n2.length)), P(e11, n2);
92
+ I(e11, O, le), I(e11, E, BigInt(n2.length)), F(e11, n2);
93
93
  }
94
94
  function Te(e11) {
95
95
  let t2 = [];
96
96
  if (e11 >= 0n) {
97
97
  if (e11 > S) throw new v(`intLiteral: value exceeds the 64-bit CBOR integer range: ${e11}`);
98
- F(t2, T, e11);
98
+ I(t2, T, e11);
99
99
  } else {
100
100
  let n2 = -1n - e11;
101
101
  if (n2 > S) throw new v(`intLiteral: value exceeds the 64-bit CBOR integer range: ${e11}`);
102
- F(t2, be, n2);
102
+ I(t2, be, n2);
103
103
  }
104
- return I(t2);
104
+ return L(t2);
105
105
  }
106
106
  function Ee(e11) {
107
107
  let t2 = [];
108
- return N(t2, e11), I(t2);
108
+ return P(t2, e11), L(t2);
109
109
  }
110
- function De(e11) {
110
+ function A(e11) {
111
111
  let t2 = [];
112
- return F(t2, E, BigInt(e11.length)), P(t2, e11), I(t2);
112
+ return I(t2, E, BigInt(e11.length)), F(t2, e11), L(t2);
113
113
  }
114
- function Oe(e11) {
114
+ function De(e11) {
115
115
  return { Literal: e11 ? "f5" : "f4" };
116
116
  }
117
- function A(e11) {
118
- return j(w, e11, "resource_");
117
+ function j(e11) {
118
+ return M(w, e11, "resource_");
119
+ }
120
+ function Oe(e11) {
121
+ return M(fe, e11, "component_");
119
122
  }
120
123
  function ke(e11) {
121
- return j(fe, e11, "component_");
124
+ let t2 = e11 instanceof Map ? e11 : new Map(Object.entries(e11)), n2 = new TextEncoder(), r2 = [...t2.entries()].sort(([e12], [t3]) => ze(n2.encode(e12), n2.encode(t3))), i2 = [];
125
+ I(i2, O, BigInt(pe)), I(i2, Se, BigInt(r2.length));
126
+ for (let [e12, t3] of r2) P(i2, e12), P(i2, t3);
127
+ return L(i2);
122
128
  }
123
129
  function Ae(e11) {
124
- let t2 = e11 instanceof Map ? e11 : new Map(Object.entries(e11)), n2 = new TextEncoder(), r2 = [...t2.entries()].sort(([e12], [t3]) => Be(n2.encode(e12), n2.encode(t3))), i2 = [];
125
- F(i2, O, BigInt(pe)), F(i2, Se, BigInt(r2.length));
126
- for (let [e12, t3] of r2) N(i2, e12), N(i2, t3);
127
- return I(i2);
130
+ return M(he, e11, "vault_");
128
131
  }
129
132
  function je(e11) {
130
- return j(he, e11, "vault_");
133
+ return M(_e, e11, "template_");
131
134
  }
132
135
  function Me(e11) {
133
- return j(_e, e11, "template_");
136
+ return M(ge, e11, "tombstone_");
134
137
  }
135
138
  function Ne(e11) {
136
- return j(ge, e11, "tombstone_");
139
+ return M(ve, e11, "vnfp_");
137
140
  }
138
141
  function Pe(e11) {
139
- return j(ve, e11, "vnfp_");
140
- }
141
- function Fe(e11) {
142
142
  let t2 = typeof e11 == "string" ? x(e11) : e11;
143
- return y(t2, de, "publicKeyLiteral"), De(t2);
143
+ return y(t2, de, "publicKeyLiteral"), A(t2);
144
144
  }
145
- function Ie(e11) {
145
+ function Fe(e11) {
146
146
  let t2 = [];
147
- return F(t2, O, BigInt(me)), F(t2, D, 2n), M(t2, w, e11.resource_address, "resource_"), Re(t2, e11.id), I(t2);
147
+ return I(t2, O, BigInt(me)), I(t2, D, 2n), N(t2, w, e11.resource_address, "resource_"), Le(t2, e11.id), L(t2);
148
148
  }
149
- function Le(e11) {
149
+ function Ie(e11) {
150
150
  let t2 = [];
151
- F(t2, O, BigInt(ye)), F(t2, D, 2n), M(t2, w, e11.resource_address, "resource_");
151
+ I(t2, O, BigInt(ye)), I(t2, D, 2n), N(t2, w, e11.resource_address, "resource_");
152
152
  let n2 = x(e11.id);
153
- return y(n2, C, "utxoAddressLiteral: id"), F(t2, E, BigInt(C)), P(t2, n2), I(t2);
153
+ return y(n2, C, "utxoAddressLiteral: id"), I(t2, E, BigInt(C)), F(t2, n2), L(t2);
154
154
  }
155
- function j(e11, t2, n2) {
155
+ function M(e11, t2, n2) {
156
156
  let r2 = [];
157
- return M(r2, e11, t2, n2), I(r2);
157
+ return N(r2, e11, t2, n2), L(r2);
158
158
  }
159
- function M(e11, t2, n2, r2) {
159
+ function N(e11, t2, n2, r2) {
160
160
  let i2 = n2.startsWith(r2) ? n2.slice(r2.length) : n2;
161
161
  if (i2.length !== ue) throw new v(`${r2}address must be 32 bytes (${ue} hex chars), got ${i2.length}`);
162
- F(e11, O, BigInt(t2)), F(e11, E, BigInt(C)), P(e11, x(i2));
162
+ I(e11, O, BigInt(t2)), I(e11, E, BigInt(C)), F(e11, x(i2));
163
163
  }
164
- function Re(e11, t2) {
165
- if (F(e11, D, 2n), "U256" in t2) {
166
- F(e11, T, 0n), F(e11, D, 1n);
164
+ function Le(e11, t2) {
165
+ if (I(e11, D, 2n), "U256" in t2) {
166
+ I(e11, T, 0n), I(e11, D, 1n);
167
167
  let n2 = x(t2.U256);
168
- y(n2, C, "NonFungibleId.U256"), F(e11, E, BigInt(C)), P(e11, n2);
169
- } else if ("String" in t2) F(e11, T, 1n), F(e11, D, 1n), N(e11, t2.String);
170
- else if ("Uint32" in t2) F(e11, T, 2n), F(e11, D, 1n), ze(e11, t2.Uint32, "NonFungibleId.Uint32", (1n << 32n) - 1n);
171
- else if ("Uint64" in t2) F(e11, T, 3n), F(e11, D, 1n), ze(e11, t2.Uint64, "NonFungibleId.Uint64", S);
168
+ y(n2, C, "NonFungibleId.U256"), I(e11, E, BigInt(C)), F(e11, n2);
169
+ } else if ("String" in t2) I(e11, T, 1n), I(e11, D, 1n), P(e11, t2.String);
170
+ else if ("Uint32" in t2) I(e11, T, 2n), I(e11, D, 1n), Re(e11, t2.Uint32, "NonFungibleId.Uint32", (1n << 32n) - 1n);
171
+ else if ("Uint64" in t2) I(e11, T, 3n), I(e11, D, 1n), Re(e11, t2.Uint64, "NonFungibleId.Uint64", S);
172
172
  else throw new v(`nonFungibleAddressLiteral: unrecognised NonFungibleId variant: ${JSON.stringify(t2)}`);
173
173
  }
174
- function ze(e11, t2, n2, r2) {
174
+ function Re(e11, t2, n2, r2) {
175
175
  if (!Number.isInteger(t2) || t2 < 0) throw new v(`${n2} must be a non-negative integer, got ${t2}`);
176
176
  if (r2 > BigInt(2 ** 53 - 1) && t2 > 2 ** 53 - 1) throw new v(`${n2} value ${t2} exceeds Number.MAX_SAFE_INTEGER (2^53-1) and cannot be encoded without precision loss \u2014 the binding types this id as a JS number. Use a U256/String id for large values.`);
177
177
  let i2 = BigInt(t2);
178
178
  if (i2 > r2) throw new v(`${n2} value ${t2} exceeds its maximum of ${r2}`);
179
- F(e11, T, i2);
179
+ I(e11, T, i2);
180
180
  }
181
- function N(e11, t2) {
181
+ function P(e11, t2) {
182
182
  let n2 = new TextEncoder().encode(t2);
183
- F(e11, xe, BigInt(n2.length)), P(e11, n2);
183
+ I(e11, xe, BigInt(n2.length)), F(e11, n2);
184
184
  }
185
- function P(e11, t2) {
185
+ function F(e11, t2) {
186
186
  let n2 = e11.length;
187
187
  e11.length = n2 + t2.length;
188
188
  for (let r2 = 0; r2 < t2.length; r2++) e11[n2 + r2] = t2[r2];
189
189
  }
190
- function Be(e11, t2) {
190
+ function ze(e11, t2) {
191
191
  let n2 = Math.min(e11.length, t2.length);
192
192
  for (let r2 = 0; r2 < n2; r2++) if (e11[r2] !== t2[r2]) return e11[r2] < t2[r2] ? -1 : 1;
193
193
  return e11.length - t2.length;
194
194
  }
195
- function F(e11, t2, n2) {
195
+ function I(e11, t2, n2) {
196
196
  n2 < 24n ? e11.push(t2 | Number(n2)) : n2 < 1n << 8n ? e11.push(t2 | 24, Number(n2)) : n2 < 1n << 16n ? e11.push(t2 | 25, Number(n2 >> 8n & 255n), Number(n2 & 255n)) : n2 < 1n << 32n ? e11.push(t2 | 26, Number(n2 >> 24n & 255n), Number(n2 >> 16n & 255n), Number(n2 >> 8n & 255n), Number(n2 & 255n)) : e11.push(t2 | 27, Number(n2 >> 56n & 255n), Number(n2 >> 48n & 255n), Number(n2 >> 40n & 255n), Number(n2 >> 32n & 255n), Number(n2 >> 24n & 255n), Number(n2 >> 16n & 255n), Number(n2 >> 8n & 255n), Number(n2 & 255n));
197
197
  }
198
- function I(e11) {
198
+ function L(e11) {
199
199
  return { Literal: b(Uint8Array.from(e11)) };
200
200
  }
201
- function L(e11) {
201
+ function R(e11) {
202
202
  return k(e11);
203
203
  }
204
- function Ve(e11) {
204
+ function Be(e11) {
205
205
  if (e11 < 0n) throw new v(`microTariString: amount must be non-negative, got ${e11}`);
206
206
  return e11.toString();
207
207
  }
208
- function He(e11) {
208
+ function Ve(e11) {
209
209
  let t2 = e11.split(".");
210
210
  if (t2.length > 2) throw new v("Invalid workspace key format. Only one dot is allowed.");
211
211
  let n2 = t2[0];
@@ -220,24 +220,24 @@ function He(e11) {
220
220
  offset: r2
221
221
  };
222
222
  }
223
- var Ue = 2160, We = 10;
224
- async function Ge(e11, t2 = 10) {
223
+ var He = 2160, Ue = 10;
224
+ async function We(e11, t2 = 10) {
225
225
  if (!Number.isInteger(t2) || t2 < 1) throw new v(`resolveMaxEpoch: leadEpochs must be a positive integer, got ${t2}`);
226
- if (t2 > 2160) throw new v(`resolveMaxEpoch: leadEpochs ${t2} exceeds the network's maximum validity window of ${Ue} epochs`);
226
+ if (t2 > 2160) throw new v(`resolveMaxEpoch: leadEpochs ${t2} exceeds the network's maximum validity window of ${He} epochs`);
227
227
  return await e11.getCurrentEpoch() + t2;
228
228
  }
229
- var Ke = (1n << 64n) - 1n;
230
- function R(e11, t2) {
229
+ var Ge = (1n << 64n) - 1n;
230
+ function z(e11, t2) {
231
231
  if (!Number.isInteger(e11) || e11 < 0) throw new v(`${t2} must be a non-negative integer epoch, got ${e11}`);
232
232
  return e11;
233
233
  }
234
- function qe(e11) {
234
+ function Ke(e11) {
235
235
  return e11.startsWith("template_") ? e11.slice(9) : e11;
236
236
  }
237
- function Je(e11) {
237
+ function qe(e11) {
238
238
  return typeof e11 != "object" || !e11 ? null : "PutLastInstructionOutputOnWorkspace" in e11 ? e11.PutLastInstructionOutputOnWorkspace.key : "TakeFromBucket" in e11 ? e11.TakeFromBucket.output_bucket : "AllocateAddress" in e11 ? e11.AllocateAddress.workspace_id : null;
239
239
  }
240
- var Ye = class {
240
+ var Je = class {
241
241
  constructor() {
242
242
  __publicField(this, "nextId", 0);
243
243
  __publicField(this, "ids", /* @__PURE__ */ new Map());
@@ -261,15 +261,15 @@ var Ye = class {
261
261
  resetFrom(e11) {
262
262
  this.reset();
263
263
  for (let t2 of e11) {
264
- let e12 = Je(t2);
264
+ let e12 = qe(t2);
265
265
  e12 !== null && this.observeAllocated(e12);
266
266
  }
267
267
  }
268
268
  };
269
- function Xe(e11) {
269
+ function Ye(e11) {
270
270
  return new v(`No workspace variable named "${e11}" has been defined. Call builder.saveVar(${JSON.stringify(e11)}) on a preceding instruction whose output you want to reference.`);
271
271
  }
272
- var z = class e2 {
272
+ var B = class e2 {
273
273
  constructor(e11, t2) {
274
274
  __publicField(this, "unsignedTransaction");
275
275
  __publicField(this, "workspaceIds");
@@ -280,12 +280,12 @@ var z = class e2 {
280
280
  instructions: [],
281
281
  inputs: [],
282
282
  min_epoch: null,
283
- max_epoch: R(t2, "maxEpoch"),
283
+ max_epoch: z(t2, "maxEpoch"),
284
284
  dry_run: false,
285
285
  is_seal_signer_authorized: false,
286
286
  blobs: [],
287
287
  nonce: 0
288
- }, this.workspaceIds = new Ye(), this.feeWorkspaceIds = new Ye();
288
+ }, this.workspaceIds = new Je(), this.feeWorkspaceIds = new Je();
289
289
  }
290
290
  static new(t2, n2) {
291
291
  return new e2(t2, n2);
@@ -293,7 +293,7 @@ var z = class e2 {
293
293
  callFunction(e11, t2) {
294
294
  let n2 = this.resolveArgs(t2);
295
295
  return this.addInstruction({ CallFunction: {
296
- address: qe(e11.templateAddress),
296
+ address: Ke(e11.templateAddress),
297
297
  function: e11.functionName,
298
298
  args: n2
299
299
  } });
@@ -323,7 +323,7 @@ var z = class e2 {
323
323
  return this.addInstruction({ CallMethod: {
324
324
  call: { Address: e11 },
325
325
  method: "create_proof_for_resource",
326
- args: [A(t2)]
326
+ args: [j(t2)]
327
327
  } });
328
328
  }
329
329
  claimBurn(e11, t2) {
@@ -347,7 +347,7 @@ var z = class e2 {
347
347
  return this.addFeeInstruction({ CallMethod: {
348
348
  call: { Address: e11 },
349
349
  method: "pay_fee",
350
- args: [L(t2)]
350
+ args: [R(t2)]
351
351
  } });
352
352
  }
353
353
  feeTransactionPayFromComponentConfidential(e11, t2) {
@@ -377,7 +377,7 @@ var z = class e2 {
377
377
  }
378
378
  observeAllocations(e11, t2) {
379
379
  for (let n2 of t2) {
380
- let t3 = Je(n2);
380
+ let t3 = qe(n2);
381
381
  t3 !== null && e11.observeAllocated(t3);
382
382
  }
383
383
  }
@@ -386,21 +386,21 @@ var z = class e2 {
386
386
  return this.unsignedTransaction.fee_instructions = n2.unsignedTransaction.instructions, this.feeWorkspaceIds.resetFrom(this.unsignedTransaction.fee_instructions), this;
387
387
  }
388
388
  addInput(e11) {
389
- return this.unsignedTransaction.inputs.push(e11), this;
389
+ return this.unsignedTransaction.inputs.push(Xe(e11)), this;
390
390
  }
391
391
  withInputs(e11) {
392
- return this.unsignedTransaction.inputs.push(...e11), this;
392
+ return this.unsignedTransaction.inputs.push(...e11.map(Xe)), this;
393
393
  }
394
394
  withMinEpoch(e11) {
395
- return this.unsignedTransaction.min_epoch = R(e11, "minEpoch"), this;
395
+ return this.unsignedTransaction.min_epoch = z(e11, "minEpoch"), this;
396
396
  }
397
397
  withMaxEpoch(e11) {
398
- return this.unsignedTransaction.max_epoch = R(e11, "maxEpoch"), this;
398
+ return this.unsignedTransaction.max_epoch = z(e11, "maxEpoch"), this;
399
399
  }
400
400
  withNonce(e11) {
401
401
  if (typeof e11 == "number" && !Number.isInteger(e11)) throw new v(`withNonce: nonce must be an integer, got ${e11}`);
402
402
  let t2 = typeof e11 == "bigint" ? e11 : BigInt(e11);
403
- if (t2 < 0n || t2 > Ke) throw new v(`withNonce: nonce must fit an unsigned 64-bit integer, got ${e11}`);
403
+ if (t2 < 0n || t2 > Ge) throw new v(`withNonce: nonce must fit an unsigned 64-bit integer, got ${e11}`);
404
404
  return this.unsignedTransaction.nonce = t2 > BigInt(2 ** 53 - 1) ? t2 : Number(t2), this;
405
405
  }
406
406
  withUnsignedTransaction(e11) {
@@ -411,7 +411,7 @@ var z = class e2 {
411
411
  inputs: [...e11.inputs],
412
412
  blobs: [...e11.blobs ?? []],
413
413
  nonce: e11.nonce ?? 0,
414
- max_epoch: R(e11.max_epoch, "withUnsignedTransaction: max_epoch")
414
+ max_epoch: z(e11.max_epoch, "withUnsignedTransaction: max_epoch")
415
415
  }, this.workspaceIds.resetFrom(this.unsignedTransaction.instructions), this.feeWorkspaceIds.resetFrom(this.unsignedTransaction.fee_instructions), this;
416
416
  }
417
417
  resolveWorkspaceOffsetId(e11) {
@@ -431,11 +431,11 @@ var z = class e2 {
431
431
  }
432
432
  requireNamedId(e11) {
433
433
  let t2 = this.workspaceIds.get(e11);
434
- if (t2 === void 0) throw Xe(e11);
434
+ if (t2 === void 0) throw Ye(e11);
435
435
  return t2;
436
436
  }
437
437
  getOffsetIdFromWorkspaceName(e11) {
438
- let t2 = He(e11);
438
+ let t2 = Ve(e11);
439
439
  return {
440
440
  id: this.requireNamedId(t2.name),
441
441
  offset: t2.offset
@@ -444,7 +444,15 @@ var z = class e2 {
444
444
  resolveArgs(e11) {
445
445
  return e11.map((e12) => typeof e12 == "object" && e12 && "Workspace" in e12 && typeof e12.Workspace == "string" ? { Workspace: this.getOffsetIdFromWorkspaceName(e12.Workspace) } : e12);
446
446
  }
447
- }, Ze = {
447
+ };
448
+ function Xe(e11) {
449
+ return {
450
+ substate_id: e11.substate_id,
451
+ version: e11.version,
452
+ is_write: "is_write" in e11 ? e11.is_write : true
453
+ };
454
+ }
455
+ var Ze = {
448
456
  [u.LocalNet]: "http://localhost:12500",
449
457
  [u.Esmeralda]: "https://ootle-indexer-a.tari.com"
450
458
  };
@@ -456,15 +464,15 @@ function Qe(e11) {
456
464
  var $e = 132, et = 32;
457
465
  function* tt(e11) {
458
466
  let t2 = /* @__PURE__ */ new Set();
459
- for (let n2 of B(e11, $e)) n2.length === et * 2 && !t2.has(n2) && (t2.add(n2), yield `vault_${n2}`);
467
+ for (let n2 of V(e11, $e)) n2.length === et * 2 && !t2.has(n2) && (t2.add(n2), yield `vault_${n2}`);
460
468
  }
461
469
  async function nt(e11, t2) {
462
470
  let n2 = (await e11.getSubstate(t2)).substate;
463
471
  return it(n2) ? Array.from(tt(n2.Component.body.state)) : [];
464
472
  }
465
- function* B(e11, t2) {
473
+ function* V(e11, t2) {
466
474
  if (Array.isArray(e11)) {
467
- for (let n3 of e11) yield* B(n3, t2);
475
+ for (let n3 of e11) yield* V(n3, t2);
468
476
  return;
469
477
  }
470
478
  if (typeof e11 != "object" || !e11) return;
@@ -476,14 +484,14 @@ function* B(e11, t2) {
476
484
  let t3 = rt(e12);
477
485
  t3 !== null && (yield t3);
478
486
  }
479
- yield* B(e12, t2);
487
+ yield* V(e12, t2);
480
488
  } else if (r2 === "map") {
481
489
  let e12 = n2.entries;
482
- if (Array.isArray(e12)) for (let n3 of e12) Array.isArray(n3) && n3.length === 2 && (yield* B(n3[0], t2), yield* B(n3[1], t2));
490
+ if (Array.isArray(e12)) for (let n3 of e12) Array.isArray(n3) && n3.length === 2 && (yield* V(n3[0], t2), yield* V(n3[1], t2));
483
491
  }
484
492
  return;
485
493
  }
486
- for (let e12 of Object.values(n2)) yield* B(e12, t2);
494
+ for (let e12 of Object.values(n2)) yield* V(e12, t2);
487
495
  }
488
496
  function rt(e11) {
489
497
  if (typeof e11 != "object" || !e11) return null;
@@ -500,17 +508,17 @@ function ft(e11, t2) {
500
508
  let n2 = e11.revealedInputBucket === null ? null : t2(e11.revealedInputBucket);
501
509
  return { StealthTransfer: {
502
510
  resource_address_ref: { Address: e11.resourceAddress },
503
- statement: V(e11.statement),
511
+ statement: H(e11.statement),
504
512
  revealed_input_bucket: n2
505
513
  } };
506
514
  }
507
- function V(e11) {
515
+ function H(e11) {
508
516
  return { [lt]: e11.toCompactJson() };
509
517
  }
510
- function H(e11) {
518
+ function U(e11) {
511
519
  return typeof e11 == "object" && !!e11 && "StealthTransfer" in e11;
512
520
  }
513
- function U(e11) {
521
+ function W(e11) {
514
522
  let t2 = [], n2 = (e12) => `__ootleRawJson:${e12}__`, r2 = JSON.stringify(e11, (e12, r3) => {
515
523
  if (typeof r3 == "bigint") return r3.toString();
516
524
  if (typeof r3 == "object" && r3 && "__ootleRawJson" in r3) {
@@ -527,7 +535,7 @@ function U(e11) {
527
535
  }
528
536
  return r2;
529
537
  }
530
- async function W(e11, t2) {
538
+ async function G(e11, t2) {
531
539
  let n2 = await e11.resolveInputs(t2.inputs);
532
540
  return {
533
541
  ...t2,
@@ -550,19 +558,19 @@ function mt(e11, t2) {
550
558
  }
551
559
  };
552
560
  }
553
- async function G(e11, t2, n2) {
561
+ async function K(e11, t2, n2) {
554
562
  let r2 = n2 ?? a(), i2 = y(r2.secret_key, 32, "sealKeypair.secret_key"), o2 = y(r2.public_key, 32, "sealKeypair.public_key"), s2 = [];
555
563
  for (let n3 of e11) {
556
564
  let e12 = await n3.signTransaction(t2, o2);
557
565
  s2.push(...e12);
558
566
  }
559
- let c2 = l(`{"transaction":${U(t2)},"signatures":${JSON.stringify(s2)}}`, i2);
567
+ let c2 = l(`{"transaction":${W(t2)},"signatures":${JSON.stringify(s2)}}`, i2);
560
568
  return {
561
569
  sealedJson: c2,
562
570
  transaction: JSON.parse(c2)
563
571
  };
564
572
  }
565
- function K(e11) {
573
+ function q(e11) {
566
574
  return t(e11.sealedJson);
567
575
  }
568
576
  async function ht(e11, t2) {
@@ -607,8 +615,8 @@ async function _t(e11, t2, n2) {
607
615
  }
608
616
  }
609
617
  async function vt(e11, t2, n2, r2) {
610
- let i2 = await W(e11, n2);
611
- return _t(e11, await ht(e11, K(await G(Array.isArray(t2) ? t2 : [t2], i2))), r2);
618
+ let i2 = await G(e11, n2);
619
+ return _t(e11, await ht(e11, q(await K(Array.isArray(t2) ? t2 : [t2], i2))), r2);
612
620
  }
613
621
  async function yt(e11, t2, n2, r2) {
614
622
  return vt(e11, t2, {
@@ -619,7 +627,7 @@ async function yt(e11, t2, n2, r2) {
619
627
  var bt = class {
620
628
  constructor(e11, t2) {
621
629
  __publicField(this, "builder");
622
- this.builder = z.new(e11, t2);
630
+ this.builder = B.new(e11, t2);
623
631
  }
624
632
  withInputs(e11) {
625
633
  return this.builder.withInputs(e11), this;
@@ -631,7 +639,7 @@ var bt = class {
631
639
  return this.builder.callMethod({
632
640
  componentAddress: e11,
633
641
  methodName: "withdraw"
634
- }, [A(t2), L(n2)]).saveVar("bucket").callMethod({
642
+ }, [j(t2), R(n2)]).saveVar("bucket").callMethod({
635
643
  componentAddress: r2,
636
644
  methodName: "deposit"
637
645
  }, [{ Workspace: "bucket" }]), this;
@@ -646,7 +654,7 @@ var bt = class {
646
654
  constructor(e11, t2, n2) {
647
655
  __publicField(this, "builder");
648
656
  __publicField(this, "faucetAddress");
649
- this.builder = z.new(e11, t2), this.faucetAddress = n2;
657
+ this.builder = B.new(e11, t2), this.faucetAddress = n2;
650
658
  }
651
659
  feeTransactionPayFromComponent(e11, t2) {
652
660
  return this.builder.feeTransactionPayFromComponent(e11, t2), this;
@@ -655,7 +663,7 @@ var bt = class {
655
663
  return this.builder.callMethod({
656
664
  componentAddress: this.faucetAddress,
657
665
  methodName: "take_free_coins"
658
- }, [L(t2)]).saveVar("faucet_bucket").callMethod({
666
+ }, [R(t2)]).saveVar("faucet_bucket").callMethod({
659
667
  componentAddress: e11,
660
668
  methodName: "deposit"
661
669
  }, [{ Workspace: "faucet_bucket" }]), this;
@@ -736,7 +744,7 @@ var bt = class {
736
744
  toHex() {
737
745
  return b(this.bytes);
738
746
  }
739
- }, q = class e3 extends Ct {
747
+ }, J = class e3 extends Ct {
740
748
  constructor(e11) {
741
749
  super(e11, "Mask");
742
750
  }
@@ -784,7 +792,7 @@ function Ot(e11, t2) {
784
792
  let n2 = e11.trim();
785
793
  if (!n2.startsWith("{") || !n2.endsWith("}")) throw new v(`StealthTransferStatement.toCompactJson: ${t2} fragment is not a JSON object (got: ${e11.slice(0, 60)}...)`);
786
794
  }
787
- var J = class e5 extends Ct {
795
+ var Y = class e5 extends Ct {
788
796
  constructor(e11) {
789
797
  super(e11, "StealthInput.commitment");
790
798
  }
@@ -797,7 +805,7 @@ var J = class e5 extends Ct {
797
805
  static fromJSON(t2) {
798
806
  return new e5(x(t2.commitment));
799
807
  }
800
- }, Y = class e6 {
808
+ }, X = class e6 {
801
809
  constructor(e11, t2) {
802
810
  __publicField(this, "_publicNonce");
803
811
  __publicField(this, "_signature");
@@ -818,7 +826,7 @@ var J = class e5 extends Ct {
818
826
  static fromJSON(t2) {
819
827
  return new e6(x(t2.public_nonce), x(t2.signature));
820
828
  }
821
- }, X = class e7 {
829
+ }, Z = class e7 {
822
830
  constructor(e11, t2, n2) {
823
831
  __publicField(this, "inputs");
824
832
  __publicField(this, "revealedAmount");
@@ -831,13 +839,13 @@ var J = class e5 extends Ct {
831
839
  toJSON() {
832
840
  return {
833
841
  inputs: this.inputs.map((e11) => e11.toJSON()),
834
- revealed_amount: Ve(this.revealedAmount)
842
+ revealed_amount: Be(this.revealedAmount)
835
843
  };
836
844
  }
837
845
  static fromJSON(t2) {
838
- return new e7(t2.inputs.map(J.fromJSON), Dt(t2.revealed_amount, "revealed_amount"));
846
+ return new e7(t2.inputs.map(Y.fromJSON), Dt(t2.revealed_amount, "revealed_amount"));
839
847
  }
840
- }, Z = class e8 {
848
+ }, Q = class e8 {
841
849
  constructor(e11) {
842
850
  __publicField(this, "statementJson");
843
851
  this.statementJson = e11;
@@ -851,7 +859,7 @@ var J = class e5 extends Ct {
851
859
  static fromJSON(t2) {
852
860
  return new e8(t2);
853
861
  }
854
- }, Q = class e9 {
862
+ }, $ = class e9 {
855
863
  constructor(e11, t2, n2) {
856
864
  __publicField(this, "inputsStatement");
857
865
  __publicField(this, "outputsStatement");
@@ -872,7 +880,7 @@ var J = class e5 extends Ct {
872
880
  return this.balanceProof !== void 0 && (n2 += `,"balance_proof":${JSON.stringify(this.balanceProof.toJSON())}`), n2 + "}";
873
881
  }
874
882
  static fromJSON(t2) {
875
- return new e9(X.fromJSON(t2.inputs), Z.fromJSON(t2.outputs), t2.balance_proof === void 0 ? void 0 : Y.fromJSON(t2.balance_proof));
883
+ return new e9(Z.fromJSON(t2.inputs), Q.fromJSON(t2.outputs), t2.balance_proof === void 0 ? void 0 : X.fromJSON(t2.balance_proof));
876
884
  }
877
885
  };
878
886
  function kt(e11, t2) {
@@ -883,31 +891,33 @@ function kt(e11, t2) {
883
891
  }
884
892
  return n2;
885
893
  }
886
- var At = class {
894
+ var At = "[]", jt = class {
887
895
  constructor(e11 = u.LocalNet) {
888
896
  __publicField(this, "network");
889
897
  this.network = e11;
890
898
  }
891
899
  async generateOutputsStatement(e11, t2) {
892
- let n2 = s(`[${e11.map((e12) => this.outputWitness(e12)).join(",")}]`, t2);
893
- return y(n2.aggregated_output_mask, 32, "StealthOutputsResult.aggregated_output_mask"), {
894
- statement: Z.fromJSON(n2.statement_json),
895
- outputMask: q.fromBytes(n2.aggregated_output_mask)
900
+ let n2 = `[${e11.map((e12) => this.outputWitness(e12)).join(",")}]`, r2 = 0n, i2 = new Uint8Array(32);
901
+ t2 !== null && (y(t2.receiver, 32, "revealed output receiver"), r2 = t2.amount, i2 = t2.receiver);
902
+ let a2 = s(n2, r2, i2);
903
+ return y(a2.aggregated_output_mask, 32, "StealthOutputsResult.aggregated_output_mask"), {
904
+ statement: Q.fromJSON(a2.statement_json),
905
+ outputMask: J.fromBytes(a2.aggregated_output_mask)
896
906
  };
897
907
  }
898
908
  outputWitness(e11) {
899
- let t2 = c(e11.destination), n2 = jt(e11.payTo) ? null : JSON.stringify(e11.payTo), i2 = e11.memo === void 0 ? null : JSON.stringify(e11.memo), a2 = e11.resourceViewKey ?? null;
909
+ let t2 = c(e11.destination), n2 = Mt(e11.payTo) ? null : JSON.stringify(e11.payTo), i2 = e11.memo === void 0 ? null : JSON.stringify(e11.memo), a2 = e11.resourceViewKey ?? null;
900
910
  return r(this.network, t2.owner_key, t2.view_key, e11.amount, e11.resourceAddress, a2, i2, n2, e11.minimumValuePromise);
901
911
  }
902
912
  async buildInputsStatement(e11, t2) {
903
- return new X(e11, t2, n(kt(e11.map((e12) => e12.commitment), "input commitment"), t2));
913
+ return new Z(e11, t2, n(kt(e11.map((e12) => e12.commitment), "input commitment"), t2));
904
914
  }
905
915
  async generateBalanceProofSignature(e11, t2, n2, r2) {
906
- let i2 = o(e11.toBytes(), t2.toBytes(), n2, r2);
907
- return y(i2.public_nonce, 32, "balance proof public_nonce"), y(i2.signature, 32, "balance proof signature"), new Y(i2.public_nonce, i2.signature);
916
+ let i2 = o(e11.toBytes(), t2.toBytes(), n2, r2, At);
917
+ return y(i2.public_nonce, 32, "balance proof public_nonce"), y(i2.signature, 32, "balance proof signature"), new X(i2.public_nonce, i2.signature);
908
918
  }
909
919
  async validateBalanceProofSignature(e11, t2, n2) {
910
- return ne(e11.publicNonce, e11.signature, t2, n2);
920
+ return ne(e11.publicNonce, e11.signature, t2, n2, At);
911
921
  }
912
922
  async deriveAeadKey(e11, t2) {
913
923
  y(e11, 32, "deriveAeadKey privateKey"), y(t2, 32, "deriveAeadKey publicKey");
@@ -918,14 +928,14 @@ var At = class {
918
928
  y(e11, 32, "unblindOutput commitment"), y(n2, 32, "unblindOutput aeadKey");
919
929
  let i2 = te(e11, t2, n2, r2);
920
930
  return {
921
- mask: q.fromBytes(i2.mask),
931
+ mask: J.fromBytes(i2.mask),
922
932
  value: i2.value,
923
933
  memo: i2.memo_json ?? void 0
924
934
  };
925
935
  }
926
936
  async aggregateInputMasks(t2) {
927
937
  let n2 = e(kt(t2.map((e11) => e11.toBytes()), "input mask"));
928
- return q.fromBytes(n2);
938
+ return J.fromBytes(n2);
929
939
  }
930
940
  async stealthDhSecret(e11, t2, n2) {
931
941
  y(t2, 32, "stealthDhSecret ownerSecret"), y(n2, 32, "stealthDhSecret publicNonce");
@@ -936,54 +946,54 @@ var At = class {
936
946
  re(e11.toCompactJson(), null);
937
947
  }
938
948
  };
939
- function jt(e11) {
949
+ function Mt(e11) {
940
950
  let t2 = Object.keys(e11);
941
951
  if (t2.length !== 1 || t2[0] !== "StealthPublicKey") return false;
942
952
  let n2 = e11.StealthPublicKey;
943
953
  return typeof n2 == "object" && !!n2 && Object.keys(n2).length === 0;
944
954
  }
945
- var Mt = "utxo";
946
- function Nt(e11, t2) {
947
- return `${Mt}_${e11.startsWith("resource_") ? e11.slice(9) : e11}_${b(t2)}`;
955
+ var Nt = "utxo";
956
+ function Pt(e11, t2) {
957
+ return `${Nt}_${e11.startsWith("resource_") ? e11.slice(9) : e11}_${b(t2)}`;
948
958
  }
949
- var Pt = 64;
950
- function Ft(e11) {
959
+ var Ft = 64;
960
+ function It(e11) {
951
961
  return typeof e11 == "object" && !!e11 && "Utxo" in e11;
952
962
  }
953
- function It(e11) {
963
+ function Lt(e11) {
954
964
  return e11.length > 0 && /^[0-9a-fA-F]+$/.test(e11);
955
965
  }
956
- function Lt(e11) {
966
+ function Rt(e11) {
957
967
  let t2 = e11.split("_");
958
- if (t2.length < 3 || t2[0] !== Mt) return null;
968
+ if (t2.length < 3 || t2[0] !== Nt) return null;
959
969
  let n2 = t2[t2.length - 1];
960
- return n2.length !== Pt || !It(n2) ? null : x(n2);
970
+ return n2.length !== Ft || !Lt(n2) ? null : x(n2);
961
971
  }
962
- function Rt(e11, t2) {
972
+ function zt(e11, t2) {
963
973
  let n2 = e11.substate;
964
- if (!Ft(n2)) return null;
974
+ if (!It(n2)) return null;
965
975
  let r2 = n2.Utxo;
966
976
  if (r2.output === null || r2.is_frozen) return null;
967
- let i2 = Lt(t2);
977
+ let i2 = Rt(t2);
968
978
  return i2 === null ? null : {
969
979
  commitment: i2,
970
980
  body: r2.output.output
971
981
  };
972
982
  }
973
- var zt = 0, Bt = class {
974
- constructor(e11, t2, n2 = new At(e11.network())) {
983
+ var Bt = 0, Vt = class {
984
+ constructor(e11, t2, n2 = new jt(e11.network())) {
975
985
  __publicField(this, "provider");
976
986
  __publicField(this, "crypto");
977
987
  __publicField(this, "builder");
978
988
  __publicField(this, "state");
979
989
  __publicField(this, "maxEpoch", null);
980
990
  __publicField(this, "prepared", false);
981
- this.provider = e11, this.crypto = n2, this.builder = z.new(e11.network(), zt), this.state = {
991
+ this.provider = e11, this.crypto = n2, this.builder = B.new(e11.network(), Bt), this.state = {
982
992
  resource: t2,
983
993
  revealedInput: null,
984
994
  inputsToSpend: /* @__PURE__ */ new Map(),
985
995
  outputs: [],
986
- revealedOutputAmount: 0n
996
+ revealedOutput: null
987
997
  };
988
998
  }
989
999
  spendRevealedInput(e11, t2) {
@@ -998,9 +1008,15 @@ var zt = 0, Bt = class {
998
1008
  toStealthOutput(e11) {
999
1009
  return this.state.outputs.push(e11), this;
1000
1010
  }
1001
- toRevealedOutput(e11) {
1011
+ toRevealedOutput(e11, t2) {
1002
1012
  if (e11 <= 0n) throw new v(`toRevealedOutput amount must be > 0, got ${e11}`);
1003
- return this.state.revealedOutputAmount += e11, this;
1013
+ y(t2, 32, "toRevealedOutput receiver");
1014
+ let n2 = this.state.revealedOutput;
1015
+ if (n2 !== null && b(n2.receiver) !== b(t2)) throw new v(`toRevealedOutput: all revealed output must go to one receiver (${b(n2.receiver)} != ${b(t2)})`);
1016
+ return this.state.revealedOutput = {
1017
+ amount: ((n2 == null ? void 0 : n2.amount) ?? 0n) + e11,
1018
+ receiver: (n2 == null ? void 0 : n2.receiver) ?? new Uint8Array(t2)
1019
+ }, this;
1004
1020
  }
1005
1021
  payFeeFromRevealed(e11) {
1006
1022
  if (this.state.revealedInput === null) throw new v("payFeeFromRevealed: call spendRevealedInput first to set the source account");
@@ -1014,7 +1030,7 @@ var zt = 0, Bt = class {
1014
1030
  return this.builder = e11(this.builder), this;
1015
1031
  }
1016
1032
  spendStealthInput(e11, t2) {
1017
- let n2 = new J(t2), r2 = b(n2.commitment), i2 = this.state.inputsToSpend.get(r2);
1033
+ let n2 = new Y(t2), r2 = b(n2.commitment), i2 = this.state.inputsToSpend.get(r2);
1018
1034
  if (i2 !== void 0) throw new v(`spendStealthInput: duplicate commitment ${r2} \u2014 each commitment is one UTXO and may be spent once (already added for owner ${i2.owner}). A commitment uniquely identifies a UTXO; adding it again (even under a different owner) would self-double-spend.`);
1019
1035
  return this.state.inputsToSpend.set(r2, {
1020
1036
  input: n2,
@@ -1025,8 +1041,8 @@ var zt = 0, Bt = class {
1025
1041
  var _a;
1026
1042
  if (this.prepared) throw new v("StealthTransfer.prepare: already prepared \u2014 create a new StealthTransfer to build again");
1027
1043
  this.validate(), this.prepared = true;
1028
- let { statement: e11, outputMask: t2 } = await this.crypto.generateOutputsStatement(this.state.outputs, this.state.revealedOutputAmount), n2 = new Q(await this.crypto.buildInputsStatement([...this.state.inputsToSpend.values()].map((e12) => e12.input), ((_a = this.state.revealedInput) == null ? void 0 : _a.amount) ?? 0n), e11, void 0);
1029
- this.emitInstructions(n2), this.maxEpoch === null && this.builder.buildUnsignedTransaction().max_epoch === zt && this.builder.withMaxEpoch(await Ge(this.provider));
1044
+ let { statement: e11, outputMask: t2 } = await this.crypto.generateOutputsStatement(this.state.outputs, this.state.revealedOutput), n2 = new $(await this.crypto.buildInputsStatement([...this.state.inputsToSpend.values()].map((e12) => e12.input), ((_a = this.state.revealedInput) == null ? void 0 : _a.amount) ?? 0n), e11, void 0);
1045
+ this.emitInstructions(n2), this.maxEpoch === null && this.builder.buildUnsignedTransaction().max_epoch === Bt && this.builder.withMaxEpoch(await We(this.provider));
1030
1046
  let r2 = /* @__PURE__ */ new Set();
1031
1047
  if (this.state.revealedInput !== null) {
1032
1048
  let e12 = this.state.revealedInput.source;
@@ -1041,13 +1057,13 @@ var zt = 0, Bt = class {
1041
1057
  }), r2.add(e13));
1042
1058
  }
1043
1059
  for (let { input: e12 } of this.state.inputsToSpend.values()) {
1044
- let t3 = Nt(this.state.resource, e12.commitment);
1060
+ let t3 = Pt(this.state.resource, e12.commitment);
1045
1061
  r2.has(t3) || (this.builder.addInput({
1046
1062
  substate_id: t3,
1047
1063
  version: null
1048
1064
  }), r2.add(t3));
1049
1065
  }
1050
- let i2 = await W(this.provider, this.builder.buildUnsignedTransaction()), a2 = [...this.state.inputsToSpend.values()], o2 = this.collectRequiredSigners(a2);
1066
+ let i2 = await G(this.provider, this.builder.buildUnsignedTransaction()), a2 = [...this.state.inputsToSpend.values()], o2 = this.collectRequiredSigners(a2);
1051
1067
  return {
1052
1068
  unsignedTx: i2,
1053
1069
  statement: n2,
@@ -1064,15 +1080,15 @@ var zt = 0, Bt = class {
1064
1080
  return t2;
1065
1081
  }
1066
1082
  validate() {
1067
- var _a;
1068
- let e11 = this.state.inputsToSpend.size > 0, t2 = ((_a = this.state.revealedInput) == null ? void 0 : _a.amount) ?? 0n;
1069
- if (!(t2 > 0n || e11)) throw new v("StealthTransfer.prepare: no inputs \u2014 call spendRevealedInput or spendStealthInput first");
1070
- if (this.state.outputs.length === 0 && this.state.revealedOutputAmount === 0n) throw new v("StealthTransfer.prepare: no outputs \u2014 call toStealthOutput or toRevealedOutput first");
1083
+ var _a, _b;
1084
+ let e11 = this.state.inputsToSpend.size > 0, t2 = ((_a = this.state.revealedInput) == null ? void 0 : _a.amount) ?? 0n, n2 = t2 > 0n || e11, r2 = ((_b = this.state.revealedOutput) == null ? void 0 : _b.amount) ?? 0n;
1085
+ if (!n2) throw new v("StealthTransfer.prepare: no inputs \u2014 call spendRevealedInput or spendStealthInput first");
1086
+ if (this.state.outputs.length === 0 && this.state.revealedOutput === null) throw new v("StealthTransfer.prepare: no outputs \u2014 call toStealthOutput or toRevealedOutput first");
1071
1087
  if (this.state.outputs.length === 0) throw new v("StealthTransfer.prepare: at least one stealth output is required");
1072
- if (this.state.revealedOutputAmount > 0n && this.state.revealedInput === null) throw new v("StealthTransfer.prepare: revealed change requires a revealed source account to deposit into");
1088
+ if (this.state.revealedOutput !== null && this.state.revealedInput === null) throw new v("StealthTransfer.prepare: revealed change requires a revealed source account to deposit into");
1073
1089
  if (!e11) {
1074
- let e12 = this.state.outputs.reduce((e13, t3) => e13 + t3.amount, 0n), n2 = e12 + this.state.revealedOutputAmount, r2 = t2;
1075
- if (r2 !== n2) throw new v(`StealthTransfer.prepare: unbalanced transfer \u2014 revealed input ${r2} != stealth out ${e12} + revealed out ${this.state.revealedOutputAmount} (= ${n2})`);
1090
+ let e12 = this.state.outputs.reduce((e13, t3) => e13 + t3.amount, 0n), n3 = e12 + r2, i2 = t2;
1091
+ if (i2 !== n3) throw new v(`StealthTransfer.prepare: unbalanced transfer \u2014 revealed input ${i2} != stealth out ${e12} + revealed out ${r2} (= ${n3})`);
1076
1092
  }
1077
1093
  }
1078
1094
  emitInstructions(e11) {
@@ -1080,38 +1096,38 @@ var zt = 0, Bt = class {
1080
1096
  t2 !== null && (this.builder.callMethod({
1081
1097
  componentAddress: t2.source,
1082
1098
  methodName: "withdraw"
1083
- }, [A(this.state.resource), k(t2.amount)]).saveVar(ut), n2 = ut), this.builder.addInstruction(ft({
1099
+ }, [j(this.state.resource), k(t2.amount)]).saveVar(ut), n2 = ut), this.builder.addInstruction(ft({
1084
1100
  resourceAddress: this.state.resource,
1085
1101
  revealedInputBucket: n2,
1086
1102
  statement: e11
1087
- }, (e12) => this.builder.resolveWorkspaceOffsetId(e12))), this.state.revealedOutputAmount > 0n && t2 !== null && this.builder.saveVar(dt).callMethod({
1103
+ }, (e12) => this.builder.resolveWorkspaceOffsetId(e12))), this.state.revealedOutput !== null && t2 !== null && this.builder.saveVar(dt).callMethod({
1088
1104
  componentAddress: t2.source,
1089
1105
  methodName: "deposit"
1090
1106
  }, [{ Workspace: dt }]);
1091
1107
  }
1092
1108
  };
1093
- function Vt(e11) {
1094
- if (Ht(e11) || e11.statementJson !== void 0) return e11.statementJson;
1109
+ function Ht(e11) {
1110
+ if (Ut(e11) || e11.statementJson !== void 0) return e11.statementJson;
1095
1111
  if (e11.inputs.length > 0) throw new _("inputs statement has confidential inputs but no WASM statementJson \u2014 call buildInputsStatement first", { context: "statementJsonFor" });
1096
1112
  return JSON.stringify(e11.toJSON());
1097
1113
  }
1098
- function Ht(e11) {
1114
+ function Ut(e11) {
1099
1115
  return !("inputs" in e11);
1100
1116
  }
1101
- async function Ut(e11, t2, n2, r2, i2) {
1102
- let a2 = Vt(r2), o2 = Vt(i2);
1117
+ async function Wt(e11, t2, n2, r2, i2) {
1118
+ let a2 = Ht(r2), o2 = Ht(i2);
1103
1119
  return e11.generateBalanceProofSignature(t2, n2, a2, o2);
1104
1120
  }
1105
- async function $(e11, t2, n2, r2) {
1121
+ async function Gt(e11, t2, n2, r2) {
1106
1122
  let i2 = await e11.deriveAeadKey(r2.viewSecret, r2.senderPublicNonce);
1107
1123
  return e11.unblindOutput(t2, n2, i2, r2.skipMemo);
1108
1124
  }
1109
- async function Wt(e11, t2, n2, r2) {
1110
- let i2 = Rt(n2, r2);
1125
+ async function Kt(e11, t2, n2, r2) {
1126
+ let i2 = zt(n2, r2);
1111
1127
  if (i2 === null) return null;
1112
1128
  let a2 = x(i2.body.encrypted_data), o2 = x(i2.body.public_nonce);
1113
1129
  try {
1114
- return await $(e11, i2.commitment, a2, {
1130
+ return await Gt(e11, i2.commitment, a2, {
1115
1131
  senderPublicNonce: o2,
1116
1132
  viewSecret: t2,
1117
1133
  skipMemo: false
@@ -1120,27 +1136,27 @@ async function Wt(e11, t2, n2, r2) {
1120
1136
  return null;
1121
1137
  }
1122
1138
  }
1123
- async function Gt(e11, t2, n2) {
1139
+ async function qt(e11, t2, n2) {
1124
1140
  if (t2.length === 0) throw new v("generateOutputsStatement: at least one stealth output is required");
1125
1141
  let { statement: r2, outputMask: i2 } = await e11.generateOutputsStatement(t2, n2), a2 = await e11.buildInputsStatement([], 0n);
1126
- return new Q(a2, r2, await Ut(e11, q.zero(), i2, a2, r2));
1142
+ return new $(a2, r2, await Wt(e11, J.zero(), i2, a2, r2));
1127
1143
  }
1128
- var Kt = class e10 {
1144
+ var Jt = class e10 {
1129
1145
  constructor(e11, t2, n2, r2, i2) {
1130
1146
  this.wallet = e11, this.spec = t2, this.crypto = n2, this.mustSignWithAccountKey = r2, this.viewSecret = i2;
1131
1147
  }
1132
1148
  static fromSpec(t2, n2, r2 = {}) {
1133
- return new e10(t2, n2, r2.crypto ?? new At(), r2.mustSignWithAccountKey ?? true, r2.viewSecret);
1149
+ return new e10(t2, n2, r2.crypto ?? new jt(), r2.mustSignWithAccountKey ?? true, r2.viewSecret);
1134
1150
  }
1135
1151
  async prepare(e11) {
1136
- let t2 = await this.resolveStealthInputs(e11), n2 = t2.length === 0 ? q.zero() : await this.crypto.aggregateInputMasks(t2.map((e12) => e12.mask)), r2 = await Ut(this.crypto, n2, this.spec.outputMask, this.spec.statement.inputsStatement, this.spec.statement.outputsStatement), i2 = new Q(this.spec.statement.inputsStatement, this.spec.statement.outputsStatement, r2);
1152
+ let t2 = await this.resolveStealthInputs(e11), n2 = t2.length === 0 ? J.zero() : await this.crypto.aggregateInputMasks(t2.map((e12) => e12.mask)), r2 = await Wt(this.crypto, n2, this.spec.outputMask, this.spec.statement.inputsStatement, this.spec.statement.outputsStatement), i2 = new $(this.spec.statement.inputsStatement, this.spec.statement.outputsStatement, r2);
1137
1153
  await this.crypto.validateTransfer(i2);
1138
- let a2 = Jt(this.spec.unsignedTx, i2), o2 = {
1154
+ let a2 = Xt(this.spec.unsignedTx, i2), o2 = {
1139
1155
  ...this.spec,
1140
1156
  unsignedTx: a2,
1141
1157
  statement: i2
1142
1158
  };
1143
- return new qt({
1159
+ return new Yt({
1144
1160
  wallet: this.wallet,
1145
1161
  crypto: this.crypto,
1146
1162
  spec: o2,
@@ -1171,11 +1187,11 @@ var Kt = class e10 {
1171
1187
  let t2 = await this.resolveViewSecret(), n2 = this.spec.state.resource, r2 = await Promise.allSettled(this.spec.inputs.map(async ({ input: r3, owner: i3 }) => {
1172
1188
  let a2 = b(r3.commitment), o2 = await e11.getStealthUtxo(n2, r3.commitment);
1173
1189
  if (o2 === null) throw new p(`WalletStealthAuthorizer.prepare: stealth input UTXO not found (spent or never created) for ${a2}`);
1174
- let s2 = Rt(o2, Nt(n2, r3.commitment));
1190
+ let s2 = zt(o2, Pt(n2, r3.commitment));
1175
1191
  if (s2 === null) throw new p(`WalletStealthAuthorizer.prepare: stealth input ${a2} is not a live, spendable UTXO`);
1176
1192
  let c2 = x(s2.body.public_nonce), l2;
1177
1193
  try {
1178
- l2 = await $(this.crypto, s2.commitment, x(s2.body.encrypted_data), {
1194
+ l2 = await Gt(this.crypto, s2.commitment, x(s2.body.encrypted_data), {
1179
1195
  senderPublicNonce: c2,
1180
1196
  viewSecret: t2,
1181
1197
  skipMemo: true
@@ -1196,7 +1212,7 @@ var Kt = class e10 {
1196
1212
  if (i2 !== void 0) throw i2.reason;
1197
1213
  return r2.map((e12) => e12.value);
1198
1214
  }
1199
- }, qt = class {
1215
+ }, Yt = class {
1200
1216
  constructor(e11) {
1201
1217
  __publicField(this, "wallet");
1202
1218
  __publicField(this, "crypto");
@@ -1219,7 +1235,7 @@ var Kt = class e10 {
1219
1235
  }
1220
1236
  async computeAuthorizations() {
1221
1237
  if (this.resolvedInputs.length === 0) return [];
1222
- let e11 = U(this.spec.unsignedTx), t2 = this.sealKeypair.public_key, n2 = [];
1238
+ let e11 = W(this.spec.unsignedTx), t2 = this.sealKeypair.public_key, n2 = [];
1223
1239
  for (let r2 of this.resolvedInputs) {
1224
1240
  let i2 = this.wallet.getKeyProvider(r2.ownerAddr);
1225
1241
  if (i2 === void 0) throw new m(`AuthorizedTransfer.createAuthorizations: no signer registered for stealth-input owner ${r2.ownerAddr}. Register it via wallet.registerKeyProvider(owner, signer).`, { address: r2.ownerAddr });
@@ -1239,23 +1255,23 @@ var Kt = class e10 {
1239
1255
  let e11 = (await this.createAuthorizations()).flatMap((e12) => e12.signatures), t2 = [];
1240
1256
  this.mustSignWithAccountKey && t2.push(this.wallet);
1241
1257
  let n2 = [...e11, ...this.extraSignatures];
1242
- return n2.length > 0 && t2.push(new Yt(n2)), K(await G(t2, this.spec.unsignedTx, this.sealKeypair));
1258
+ return n2.length > 0 && t2.push(new Zt(n2)), q(await K(t2, this.spec.unsignedTx, this.sealKeypair));
1243
1259
  }
1244
1260
  };
1245
- function Jt(e11, t2) {
1246
- let n2 = e11.instructions.findIndex(H);
1261
+ function Xt(e11, t2) {
1262
+ let n2 = e11.instructions.findIndex(U);
1247
1263
  if (n2 < 0) throw new v("patchStealthStatement: expected exactly one StealthTransfer instruction, found 0 (not a stealth tx)");
1248
- if (e11.instructions.slice(n2 + 1).findIndex(H) >= 0) throw new v("patchStealthStatement: expected exactly one StealthTransfer instruction, found more than one (malformed)");
1264
+ if (e11.instructions.slice(n2 + 1).findIndex(U) >= 0) throw new v("patchStealthStatement: expected exactly one StealthTransfer instruction, found more than one (malformed)");
1249
1265
  let r2 = { StealthTransfer: {
1250
1266
  ...e11.instructions[n2].StealthTransfer,
1251
- statement: V(t2)
1267
+ statement: H(t2)
1252
1268
  } }, i2 = [...e11.instructions];
1253
1269
  return i2[n2] = r2, {
1254
1270
  ...e11,
1255
1271
  instructions: i2
1256
1272
  };
1257
1273
  }
1258
- var Yt = class {
1274
+ var Zt = class {
1259
1275
  constructor(e11) {
1260
1276
  this.signatures = e11;
1261
1277
  }
@@ -1271,86 +1287,86 @@ var Yt = class {
1271
1287
  };
1272
1288
  export {
1273
1289
  bt as AccountInvokeBuilder,
1274
- qt as AuthorizedTransfer,
1275
- Y as BalanceProofSignature,
1290
+ Yt as AuthorizedTransfer,
1291
+ X as BalanceProofSignature,
1276
1292
  _ as CryptoBridgeError,
1277
- We as DEFAULT_TRANSACTION_VALIDITY_EPOCHS,
1293
+ Ue as DEFAULT_TRANSACTION_VALIDITY_EPOCHS,
1278
1294
  h as DefaultSignerNotSetError,
1279
1295
  wt as EncryptedData,
1280
1296
  xt as FaucetInvokeBuilder,
1281
1297
  ie as IndexerClientError,
1282
1298
  v as InvalidArgumentError,
1283
1299
  m as KeyProviderNotFoundError,
1284
- Ue as MAX_TRANSACTION_VALIDITY_EPOCHS,
1285
- q as Mask,
1300
+ He as MAX_TRANSACTION_VALIDITY_EPOCHS,
1301
+ J as Mask,
1286
1302
  u as Network,
1287
1303
  d as OotleError,
1288
1304
  St as OotleWallet,
1289
1305
  oe as OperationCancelledError,
1290
1306
  g as SignerError,
1291
- J as StealthInput,
1292
- X as StealthInputsStatement,
1293
- Z as StealthOutputsStatement,
1294
- Bt as StealthTransfer,
1295
- Q as StealthTransferStatement,
1307
+ Y as StealthInput,
1308
+ Z as StealthInputsStatement,
1309
+ Q as StealthOutputsStatement,
1310
+ Vt as StealthTransfer,
1311
+ $ as StealthTransferStatement,
1296
1312
  at as TARI_RESOURCE_ADDRESS,
1297
- z as TransactionBuilder,
1313
+ B as TransactionBuilder,
1298
1314
  f as TransactionRejectedError,
1299
1315
  ae as TransactionTimeoutError,
1300
1316
  p as WalletError,
1301
- Kt as WalletStealthAuthorizer,
1302
- At as WasmStealthCrypto,
1317
+ Jt as WalletStealthAuthorizer,
1318
+ jt as WasmStealthCrypto,
1303
1319
  ct as XTR_FAUCET_CLAIM_RESOURCE_ADDRESS,
1304
1320
  ot as XTR_FAUCET_COMPONENT_ADDRESS,
1305
1321
  st as XTR_FAUCET_VAULT_ADDRESS,
1306
1322
  k as amountLiteral,
1307
1323
  y as assertByteLength,
1308
1324
  se as assertUnreachable,
1309
- Oe as boolLiteral,
1325
+ De as boolLiteral,
1310
1326
  mt as buildTransactionSignature,
1311
- De as bytesLiteral,
1312
- Ne as claimedOutputTombstoneAddressLiteral,
1327
+ A as bytesLiteral,
1328
+ Me as claimedOutputTombstoneAddressLiteral,
1313
1329
  gt as classifyOutcome,
1314
- Lt as commitmentOf,
1315
- ke as componentAddressLiteral,
1330
+ Rt as commitmentOf,
1331
+ Oe as componentAddressLiteral,
1316
1332
  Et as createOutput,
1317
- $ as decryptInputData,
1318
- Wt as decryptOwnedUtxo,
1333
+ Gt as decryptInputData,
1334
+ Kt as decryptOwnedUtxo,
1319
1335
  Qe as defaultIndexerUrl,
1320
1336
  x as fromHexStr,
1321
- Gt as generateOutputsStatement,
1337
+ qt as generateOutputsStatement,
1322
1338
  pt as generateSealKeypair,
1323
1339
  nt as getVaultIdsForAccount,
1324
1340
  Te as intLiteral,
1325
- H as isStealthTransferInstruction,
1341
+ U as isStealthTransferInstruction,
1326
1342
  tt as iterVaultIdsInState,
1327
1343
  Ce as literalArg,
1328
- Ae as metadataLiteral,
1329
- L as microTariLiteral,
1330
- Ve as microTariString,
1331
- Ie as nonFungibleAddressLiteral,
1332
- Rt as parseSubstateUtxo,
1333
- He as parseWorkspaceStringKey,
1334
- Jt as patchStealthStatement,
1335
- Fe as publicKeyLiteral,
1336
- Ge as resolveMaxEpoch,
1337
- W as resolveTransaction,
1338
- A as resourceAddressLiteral,
1339
- K as sealTransaction,
1344
+ ke as metadataLiteral,
1345
+ R as microTariLiteral,
1346
+ Be as microTariString,
1347
+ Fe as nonFungibleAddressLiteral,
1348
+ zt as parseSubstateUtxo,
1349
+ Ve as parseWorkspaceStringKey,
1350
+ Xt as patchStealthStatement,
1351
+ Pe as publicKeyLiteral,
1352
+ We as resolveMaxEpoch,
1353
+ G as resolveTransaction,
1354
+ j as resourceAddressLiteral,
1355
+ q as sealTransaction,
1340
1356
  yt as sendDryRun,
1341
1357
  vt as sendTransaction,
1342
- U as serializeUnsignedTx,
1343
- Ut as signBalanceProof,
1344
- G as signTransaction,
1345
- V as statementAsWire,
1358
+ W as serializeUnsignedTx,
1359
+ Wt as signBalanceProof,
1360
+ K as signTransaction,
1361
+ H as statementAsWire,
1346
1362
  ft as stealthTransferInstruction,
1347
- Nt as stealthUtxoSubstateId,
1363
+ Pt as stealthUtxoSubstateId,
1348
1364
  Ee as stringLiteral,
1349
1365
  ht as submitTransaction,
1350
- Me as templateAddressLiteral,
1366
+ je as templateAddressLiteral,
1351
1367
  b as toHexStr,
1352
- Le as utxoAddressLiteral,
1353
- Pe as validatorFeePoolAddressLiteral,
1354
- je as vaultIdLiteral,
1368
+ Ie as utxoAddressLiteral,
1369
+ Ne as validatorFeePoolAddressLiteral,
1370
+ Ae as vaultIdLiteral,
1355
1371
  _t as watchTransaction
1356
1372
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/tari-project/ootle.ts.git",
@@ -25,8 +25,8 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@tari-project/ootle-ts-bindings": "^1.52.0",
29
- "@tari-project/ootle-wasm": "^0.41.0"
28
+ "@tari-project/ootle-ts-bindings": "^1.55.0",
29
+ "@tari-project/ootle-wasm": "^0.42.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.5.0",