@tari-project/ootle-wasm 0.40.2 → 0.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ootle_wasm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* @ts-self-types="./ootle_wasm.d.ts" */
2
-
3
2
  import * as wasm from "./ootle_wasm_bg.wasm";
4
3
  import { __wbg_set_wasm } from "./ootle_wasm_bg.js";
4
+
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
package/ootle_wasm_bg.js CHANGED
@@ -3,7 +3,6 @@
3
3
  */
4
4
  export class DecryptedOutputResult {
5
5
  static __wrap(ptr) {
6
- ptr = ptr >>> 0;
7
6
  const obj = Object.create(DecryptedOutputResult.prototype);
8
7
  obj.__wbg_ptr = ptr;
9
8
  DecryptedOutputResultFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -38,7 +37,7 @@ export class DecryptedOutputResult {
38
37
  const ret = wasm.__wbg_get_decryptedoutputresult_memo_json(this.__wbg_ptr);
39
38
  let v1;
40
39
  if (ret[0] !== 0) {
41
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
40
+ v1 = getStringFromWasm0(ret[0], ret[1]);
42
41
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
43
42
  }
44
43
  return v1;
@@ -85,7 +84,6 @@ if (Symbol.dispose) DecryptedOutputResult.prototype[Symbol.dispose] = DecryptedO
85
84
  */
86
85
  export class KeypairResult {
87
86
  static __wrap(ptr) {
88
- ptr = ptr >>> 0;
89
87
  const obj = Object.create(KeypairResult.prototype);
90
88
  obj.__wbg_ptr = ptr;
91
89
  KeypairResultFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -143,7 +141,6 @@ if (Symbol.dispose) KeypairResult.prototype[Symbol.dispose] = KeypairResult.prot
143
141
  */
144
142
  export class OotlePublicKey {
145
143
  static __wrap(ptr) {
146
- ptr = ptr >>> 0;
147
144
  const obj = Object.create(OotlePublicKey.prototype);
148
145
  obj.__wbg_ptr = ptr;
149
146
  OotlePublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -186,7 +183,7 @@ export class OotlePublicKey {
186
183
  set owner_key(arg0) {
187
184
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
188
185
  const len0 = WASM_VECTOR_LEN;
189
- wasm.__wbg_set_keypairresult_secret_key(this.__wbg_ptr, ptr0, len0);
186
+ wasm.__wbg_set_ootlepublickey_owner_key(this.__wbg_ptr, ptr0, len0);
190
187
  }
191
188
  /**
192
189
  * The view-only public key bytes.
@@ -195,7 +192,7 @@ export class OotlePublicKey {
195
192
  set view_key(arg0) {
196
193
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
197
194
  const len0 = WASM_VECTOR_LEN;
198
- wasm.__wbg_set_keypairresult_public_key(this.__wbg_ptr, ptr0, len0);
195
+ wasm.__wbg_set_ootlepublickey_view_key(this.__wbg_ptr, ptr0, len0);
199
196
  }
200
197
  }
201
198
  if (Symbol.dispose) OotlePublicKey.prototype[Symbol.dispose] = OotlePublicKey.prototype.free;
@@ -205,7 +202,6 @@ if (Symbol.dispose) OotlePublicKey.prototype[Symbol.dispose] = OotlePublicKey.pr
205
202
  */
206
203
  export class OotleSecretKey {
207
204
  static __wrap(ptr) {
208
- ptr = ptr >>> 0;
209
205
  const obj = Object.create(OotleSecretKey.prototype);
210
206
  obj.__wbg_ptr = ptr;
211
207
  OotleSecretKeyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -248,7 +244,7 @@ export class OotleSecretKey {
248
244
  set owner_key(arg0) {
249
245
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
250
246
  const len0 = WASM_VECTOR_LEN;
251
- wasm.__wbg_set_keypairresult_secret_key(this.__wbg_ptr, ptr0, len0);
247
+ wasm.__wbg_set_ootlesecretkey_owner_key(this.__wbg_ptr, ptr0, len0);
252
248
  }
253
249
  /**
254
250
  * The view-only secret key bytes.
@@ -257,7 +253,7 @@ export class OotleSecretKey {
257
253
  set view_key(arg0) {
258
254
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
259
255
  const len0 = WASM_VECTOR_LEN;
260
- wasm.__wbg_set_keypairresult_public_key(this.__wbg_ptr, ptr0, len0);
256
+ wasm.__wbg_set_ootlesecretkey_view_key(this.__wbg_ptr, ptr0, len0);
261
257
  }
262
258
  }
263
259
  if (Symbol.dispose) OotleSecretKey.prototype[Symbol.dispose] = OotleSecretKey.prototype.free;
@@ -267,7 +263,6 @@ if (Symbol.dispose) OotleSecretKey.prototype[Symbol.dispose] = OotleSecretKey.pr
267
263
  */
268
264
  export class ParsedOotleAddress {
269
265
  static __wrap(ptr) {
270
- ptr = ptr >>> 0;
271
266
  const obj = Object.create(ParsedOotleAddress.prototype);
272
267
  obj.__wbg_ptr = ptr;
273
268
  ParsedOotleAddressFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -347,7 +342,7 @@ export class ParsedOotleAddress {
347
342
  set owner_key(arg0) {
348
343
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
349
344
  const len0 = WASM_VECTOR_LEN;
350
- wasm.__wbg_set_keypairresult_secret_key(this.__wbg_ptr, ptr0, len0);
345
+ wasm.__wbg_set_parsedootleaddress_owner_key(this.__wbg_ptr, ptr0, len0);
351
346
  }
352
347
  /**
353
348
  * The view-only public key bytes.
@@ -356,7 +351,7 @@ export class ParsedOotleAddress {
356
351
  set view_key(arg0) {
357
352
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
358
353
  const len0 = WASM_VECTOR_LEN;
359
- wasm.__wbg_set_keypairresult_public_key(this.__wbg_ptr, ptr0, len0);
354
+ wasm.__wbg_set_parsedootleaddress_view_key(this.__wbg_ptr, ptr0, len0);
360
355
  }
361
356
  }
362
357
  if (Symbol.dispose) ParsedOotleAddress.prototype[Symbol.dispose] = ParsedOotleAddress.prototype.free;
@@ -367,7 +362,6 @@ if (Symbol.dispose) ParsedOotleAddress.prototype[Symbol.dispose] = ParsedOotleAd
367
362
  */
368
363
  export class SchnorrSignatureResult {
369
364
  static __wrap(ptr) {
370
- ptr = ptr >>> 0;
371
365
  const obj = Object.create(SchnorrSignatureResult.prototype);
372
366
  obj.__wbg_ptr = ptr;
373
367
  SchnorrSignatureResultFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -407,7 +401,7 @@ export class SchnorrSignatureResult {
407
401
  set public_nonce(arg0) {
408
402
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
409
403
  const len0 = WASM_VECTOR_LEN;
410
- wasm.__wbg_set_keypairresult_secret_key(this.__wbg_ptr, ptr0, len0);
404
+ wasm.__wbg_set_schnorrsignatureresult_public_nonce(this.__wbg_ptr, ptr0, len0);
411
405
  }
412
406
  /**
413
407
  * @param {Uint8Array} arg0
@@ -415,7 +409,7 @@ export class SchnorrSignatureResult {
415
409
  set signature(arg0) {
416
410
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
417
411
  const len0 = WASM_VECTOR_LEN;
418
- wasm.__wbg_set_keypairresult_public_key(this.__wbg_ptr, ptr0, len0);
412
+ wasm.__wbg_set_schnorrsignatureresult_signature(this.__wbg_ptr, ptr0, len0);
419
413
  }
420
414
  }
421
415
  if (Symbol.dispose) SchnorrSignatureResult.prototype[Symbol.dispose] = SchnorrSignatureResult.prototype.free;
@@ -425,7 +419,6 @@ if (Symbol.dispose) SchnorrSignatureResult.prototype[Symbol.dispose] = SchnorrSi
425
419
  */
426
420
  export class StealthOutputsResult {
427
421
  static __wrap(ptr) {
428
- ptr = ptr >>> 0;
429
422
  const obj = Object.create(StealthOutputsResult.prototype);
430
423
  obj.__wbg_ptr = ptr;
431
424
  StealthOutputsResultFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -476,7 +469,7 @@ export class StealthOutputsResult {
476
469
  set aggregated_output_mask(arg0) {
477
470
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
478
471
  const len0 = WASM_VECTOR_LEN;
479
- wasm.__wbg_set_keypairresult_public_key(this.__wbg_ptr, ptr0, len0);
472
+ wasm.__wbg_set_stealthoutputsresult_aggregated_output_mask(this.__wbg_ptr, ptr0, len0);
480
473
  }
481
474
  /**
482
475
  * JSON-serialized `StealthOutputsStatement` (the wire-format payload).
@@ -485,7 +478,7 @@ export class StealthOutputsResult {
485
478
  set statement_json(arg0) {
486
479
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
480
  const len0 = WASM_VECTOR_LEN;
488
- wasm.__wbg_set_keypairresult_secret_key(this.__wbg_ptr, ptr0, len0);
481
+ wasm.__wbg_set_stealthoutputsresult_statement_json(this.__wbg_ptr, ptr0, len0);
489
482
  }
490
483
  }
491
484
  if (Symbol.dispose) StealthOutputsResult.prototype[Symbol.dispose] = StealthOutputsResult.prototype.free;
@@ -1282,14 +1275,14 @@ export function validateStealthTransfer(transfer_json, view_key) {
1282
1275
  throw takeFromExternrefTable0(ret[0]);
1283
1276
  }
1284
1277
  }
1285
- export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
1278
+ export function __wbg_Error_67e7344beaa85059(arg0, arg1) {
1286
1279
  const ret = Error(getStringFromWasm0(arg0, arg1));
1287
1280
  return ret;
1288
1281
  }
1289
- export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
1282
+ export function __wbg___wbindgen_throw_5d9e815e6fdf150f(arg0, arg1) {
1290
1283
  throw new Error(getStringFromWasm0(arg0, arg1));
1291
1284
  }
1292
- export function __wbg_getRandomValues_e9de607763a970bd() { return handleError(function (arg0, arg1) {
1285
+ export function __wbg_getRandomValues_47873ea553f6780e() { return handleError(function (arg0, arg1) {
1293
1286
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1294
1287
  }, arguments); }
1295
1288
  export function __wbindgen_init_externref_table() {
@@ -1303,25 +1296,25 @@ export function __wbindgen_init_externref_table() {
1303
1296
  }
1304
1297
  const DecryptedOutputResultFinalization = (typeof FinalizationRegistry === 'undefined')
1305
1298
  ? { register: () => {}, unregister: () => {} }
1306
- : new FinalizationRegistry(ptr => wasm.__wbg_decryptedoutputresult_free(ptr >>> 0, 1));
1299
+ : new FinalizationRegistry(ptr => wasm.__wbg_decryptedoutputresult_free(ptr, 1));
1307
1300
  const KeypairResultFinalization = (typeof FinalizationRegistry === 'undefined')
1308
1301
  ? { register: () => {}, unregister: () => {} }
1309
- : new FinalizationRegistry(ptr => wasm.__wbg_keypairresult_free(ptr >>> 0, 1));
1302
+ : new FinalizationRegistry(ptr => wasm.__wbg_keypairresult_free(ptr, 1));
1310
1303
  const OotlePublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
1311
1304
  ? { register: () => {}, unregister: () => {} }
1312
- : new FinalizationRegistry(ptr => wasm.__wbg_ootlepublickey_free(ptr >>> 0, 1));
1305
+ : new FinalizationRegistry(ptr => wasm.__wbg_ootlepublickey_free(ptr, 1));
1313
1306
  const OotleSecretKeyFinalization = (typeof FinalizationRegistry === 'undefined')
1314
1307
  ? { register: () => {}, unregister: () => {} }
1315
- : new FinalizationRegistry(ptr => wasm.__wbg_ootlesecretkey_free(ptr >>> 0, 1));
1308
+ : new FinalizationRegistry(ptr => wasm.__wbg_ootlesecretkey_free(ptr, 1));
1316
1309
  const ParsedOotleAddressFinalization = (typeof FinalizationRegistry === 'undefined')
1317
1310
  ? { register: () => {}, unregister: () => {} }
1318
- : new FinalizationRegistry(ptr => wasm.__wbg_parsedootleaddress_free(ptr >>> 0, 1));
1311
+ : new FinalizationRegistry(ptr => wasm.__wbg_parsedootleaddress_free(ptr, 1));
1319
1312
  const SchnorrSignatureResultFinalization = (typeof FinalizationRegistry === 'undefined')
1320
1313
  ? { register: () => {}, unregister: () => {} }
1321
- : new FinalizationRegistry(ptr => wasm.__wbg_schnorrsignatureresult_free(ptr >>> 0, 1));
1314
+ : new FinalizationRegistry(ptr => wasm.__wbg_schnorrsignatureresult_free(ptr, 1));
1322
1315
  const StealthOutputsResultFinalization = (typeof FinalizationRegistry === 'undefined')
1323
1316
  ? { register: () => {}, unregister: () => {} }
1324
- : new FinalizationRegistry(ptr => wasm.__wbg_stealthoutputsresult_free(ptr >>> 0, 1));
1317
+ : new FinalizationRegistry(ptr => wasm.__wbg_stealthoutputsresult_free(ptr, 1));
1325
1318
 
1326
1319
  function addToExternrefTable0(obj) {
1327
1320
  const idx = wasm.__externref_table_alloc();
@@ -1335,8 +1328,7 @@ function getArrayU8FromWasm0(ptr, len) {
1335
1328
  }
1336
1329
 
1337
1330
  function getStringFromWasm0(ptr, len) {
1338
- ptr = ptr >>> 0;
1339
- return decodeText(ptr, len);
1331
+ return decodeText(ptr >>> 0, len);
1340
1332
  }
1341
1333
 
1342
1334
  let cachedUint8ArrayMemory0 = null;
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "The Tari Development Community"
6
6
  ],
7
7
  "description": "WASM bindings for Tari Ootle client-side crypto — thin wasm-bindgen shell over ootle-wasm-core",
8
- "version": "0.40.2",
8
+ "version": "0.41.1",
9
9
  "license": "BSD-3-Clause",
10
10
  "repository": {
11
11
  "type": "git",