@spacesprotocol/libveritas 0.2.0 → 0.3.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.
package/libveritas.d.ts CHANGED
@@ -459,10 +459,10 @@ export interface InitOutput {
459
459
  readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
460
460
  readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
461
461
  readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
462
- readonly VERIFY_DEV_MODE: () => number;
463
462
  readonly sys_read_words: (a: number, b: number, c: number) => number;
464
463
  readonly sys_panic: (a: number, b: number) => void;
465
464
  readonly sys_verify_integrity2: (a: number, b: number) => void;
465
+ readonly VERIFY_DEV_MODE: () => number;
466
466
  readonly __wbindgen_export: (a: number, b: number) => number;
467
467
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
468
468
  readonly __wbindgen_export3: (a: number) => void;
package/libveritas.js CHANGED
@@ -44,7 +44,7 @@ export class Anchors {
44
44
  if (r2) {
45
45
  throw takeObject(r1);
46
46
  }
47
- this.__wbg_ptr = r0 >>> 0;
47
+ this.__wbg_ptr = r0;
48
48
  AnchorsFinalization.register(this, this.__wbg_ptr, this);
49
49
  return this;
50
50
  } finally {
@@ -128,7 +128,7 @@ export class Lookup {
128
128
  if (r2) {
129
129
  throw takeObject(r1);
130
130
  }
131
- this.__wbg_ptr = r0 >>> 0;
131
+ this.__wbg_ptr = r0;
132
132
  LookupFinalization.register(this, this.__wbg_ptr, this);
133
133
  return this;
134
134
  } finally {
@@ -160,7 +160,6 @@ if (Symbol.dispose) Lookup.prototype[Symbol.dispose] = Lookup.prototype.free;
160
160
  */
161
161
  export class Message {
162
162
  static __wrap(ptr) {
163
- ptr = ptr >>> 0;
164
163
  const obj = Object.create(Message.prototype);
165
164
  obj.__wbg_ptr = ptr;
166
165
  MessageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -192,7 +191,7 @@ export class Message {
192
191
  if (r2) {
193
192
  throw takeObject(r1);
194
193
  }
195
- this.__wbg_ptr = r0 >>> 0;
194
+ this.__wbg_ptr = r0;
196
195
  MessageFinalization.register(this, this.__wbg_ptr, this);
197
196
  return this;
198
197
  } finally {
@@ -460,7 +459,7 @@ export class MessageBuilder {
460
459
  */
461
460
  constructor() {
462
461
  const ret = wasm.messagebuilder_new();
463
- this.__wbg_ptr = ret >>> 0;
462
+ this.__wbg_ptr = ret;
464
463
  MessageBuilderFinalization.register(this, this.__wbg_ptr, this);
465
464
  return this;
466
465
  }
@@ -519,7 +518,7 @@ export class QueryContext {
519
518
  }
520
519
  constructor() {
521
520
  const ret = wasm.querycontext_new();
522
- this.__wbg_ptr = ret >>> 0;
521
+ this.__wbg_ptr = ret;
523
522
  QueryContextFinalization.register(this, this.__wbg_ptr, this);
524
523
  return this;
525
524
  }
@@ -637,7 +636,6 @@ if (Symbol.dispose) Record.prototype[Symbol.dispose] = Record.prototype.free;
637
636
  */
638
637
  export class RecordSet {
639
638
  static __wrap(ptr) {
640
- ptr = ptr >>> 0;
641
639
  const obj = Object.create(RecordSet.prototype);
642
640
  obj.__wbg_ptr = ptr;
643
641
  RecordSetFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -668,7 +666,7 @@ export class RecordSet {
668
666
  const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
669
667
  const len0 = WASM_VECTOR_LEN;
670
668
  const ret = wasm.recordset_new(ptr0, len0);
671
- this.__wbg_ptr = ret >>> 0;
669
+ this.__wbg_ptr = ret;
672
670
  RecordSetFinalization.register(this, this.__wbg_ptr, this);
673
671
  return this;
674
672
  }
@@ -761,7 +759,6 @@ export function SIG_PRIMARY_ZONE() {
761
759
  */
762
760
  export class UnsignedRecordSet {
763
761
  static __wrap(ptr) {
764
- ptr = ptr >>> 0;
765
762
  const obj = Object.create(UnsignedRecordSet.prototype);
766
763
  obj.__wbg_ptr = ptr;
767
764
  UnsignedRecordSetFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -926,7 +923,6 @@ export function VERIFY_ENABLE_SNARK() {
926
923
  */
927
924
  export class VerifiedMessage {
928
925
  static __wrap(ptr) {
929
- ptr = ptr >>> 0;
930
926
  const obj = Object.create(VerifiedMessage.prototype);
931
927
  obj.__wbg_ptr = ptr;
932
928
  VerifiedMessageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1057,7 +1053,7 @@ export class Veritas {
1057
1053
  if (r2) {
1058
1054
  throw takeObject(r1);
1059
1055
  }
1060
- this.__wbg_ptr = r0 >>> 0;
1056
+ this.__wbg_ptr = r0;
1061
1057
  VeritasFinalization.register(this, this.__wbg_ptr, this);
1062
1058
  return this;
1063
1059
  } finally {
@@ -1347,50 +1343,50 @@ export function zoneToBytes(zone) {
1347
1343
  function __wbg_get_imports() {
1348
1344
  const import0 = {
1349
1345
  __proto__: null,
1350
- __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
1346
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
1351
1347
  const ret = Error(getStringFromWasm0(arg0, arg1));
1352
1348
  return addHeapObject(ret);
1353
1349
  },
1354
- __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
1350
+ __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
1355
1351
  const v = getObject(arg1);
1356
1352
  const ret = typeof(v) === 'bigint' ? v : undefined;
1357
1353
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1358
1354
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1359
1355
  },
1360
- __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
1356
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
1361
1357
  const ret = debugString(getObject(arg1));
1362
1358
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1363
1359
  const len1 = WASM_VECTOR_LEN;
1364
1360
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1365
1361
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1366
1362
  },
1367
- __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
1363
+ __wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
1368
1364
  const ret = typeof(getObject(arg0)) === 'bigint';
1369
1365
  return ret;
1370
1366
  },
1371
- __wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
1367
+ __wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
1372
1368
  const ret = getObject(arg0) === null;
1373
1369
  return ret;
1374
1370
  },
1375
- __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
1371
+ __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
1376
1372
  const ret = typeof(getObject(arg0)) === 'string';
1377
1373
  return ret;
1378
1374
  },
1379
- __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
1375
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
1380
1376
  const ret = getObject(arg0) === undefined;
1381
1377
  return ret;
1382
1378
  },
1383
- __wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
1379
+ __wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
1384
1380
  const ret = getObject(arg0) === getObject(arg1);
1385
1381
  return ret;
1386
1382
  },
1387
- __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
1383
+ __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
1388
1384
  const obj = getObject(arg1);
1389
1385
  const ret = typeof(obj) === 'number' ? obj : undefined;
1390
1386
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1391
1387
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1392
1388
  },
1393
- __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
1389
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
1394
1390
  const obj = getObject(arg1);
1395
1391
  const ret = typeof(obj) === 'string' ? obj : undefined;
1396
1392
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -1398,30 +1394,30 @@ function __wbg_get_imports() {
1398
1394
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1399
1395
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1400
1396
  },
1401
- __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
1397
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
1402
1398
  throw new Error(getStringFromWasm0(arg0, arg1));
1403
1399
  },
1404
- __wbg_from_0dbf29f09e7fb200: function(arg0) {
1400
+ __wbg_from_13e323c65fc8f464: function(arg0) {
1405
1401
  const ret = Array.from(getObject(arg0));
1406
1402
  return addHeapObject(ret);
1407
1403
  },
1408
- __wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
1409
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
1410
- return addHeapObject(ret);
1411
- }, arguments); },
1412
- __wbg_get_8360291721e2339f: function(arg0, arg1) {
1404
+ __wbg_get_507a50627bffa49b: function(arg0, arg1) {
1413
1405
  const ret = getObject(arg0)[arg1 >>> 0];
1414
1406
  return addHeapObject(ret);
1415
1407
  },
1416
- __wbg_isArray_c3109d14ffc06469: function(arg0) {
1408
+ __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
1409
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1410
+ return addHeapObject(ret);
1411
+ }, arguments); },
1412
+ __wbg_isArray_0677c962b281d01a: function(arg0) {
1417
1413
  const ret = Array.isArray(getObject(arg0));
1418
1414
  return ret;
1419
1415
  },
1420
- __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
1416
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
1421
1417
  const ret = getObject(arg0).length;
1422
1418
  return ret;
1423
1419
  },
1424
- __wbg_length_9f1775224cf1d815: function(arg0) {
1420
+ __wbg_length_370319915dc99107: function(arg0) {
1425
1421
  const ret = getObject(arg0).length;
1426
1422
  return ret;
1427
1423
  },
@@ -1429,41 +1425,41 @@ function __wbg_get_imports() {
1429
1425
  const ret = Message.__wrap(arg0);
1430
1426
  return addHeapObject(ret);
1431
1427
  },
1432
- __wbg_new_682678e2f47e32bc: function() {
1428
+ __wbg_new_32b398fb48b6d94a: function() {
1433
1429
  const ret = new Array();
1434
1430
  return addHeapObject(ret);
1435
1431
  },
1436
- __wbg_new_aa8d0fa9762c29bd: function() {
1432
+ __wbg_new_da52cf8fe3429cb2: function() {
1437
1433
  const ret = new Object();
1438
1434
  return addHeapObject(ret);
1439
1435
  },
1440
- __wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
1436
+ __wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
1441
1437
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1442
1438
  return addHeapObject(ret);
1443
1439
  },
1444
- __wbg_new_with_length_8c854e41ea4dae9b: function(arg0) {
1440
+ __wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
1445
1441
  const ret = new Uint8Array(arg0 >>> 0);
1446
1442
  return addHeapObject(ret);
1447
1443
  },
1448
- __wbg_parse_1bbc9c053611d0a7: function() { return handleError(function (arg0, arg1) {
1444
+ __wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
1449
1445
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1450
1446
  return addHeapObject(ret);
1451
1447
  }, arguments); },
1452
- __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
1448
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
1453
1449
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1454
1450
  },
1455
- __wbg_push_471a5b068a5295f6: function(arg0, arg1) {
1451
+ __wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
1456
1452
  const ret = getObject(arg0).push(getObject(arg1));
1457
1453
  return ret;
1458
1454
  },
1459
- __wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
1455
+ __wbg_set_4d7dd76f3dae2926: function(arg0, arg1, arg2) {
1456
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
1457
+ },
1458
+ __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
1460
1459
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1461
1460
  return ret;
1462
1461
  }, arguments); },
1463
- __wbg_set_3d484eb794afec82: function(arg0, arg1, arg2) {
1464
- getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
1465
- },
1466
- __wbg_stringify_91082ed7a5a5769e: function() { return handleError(function (arg0) {
1462
+ __wbg_stringify_b54333f60f1e4dad: function() { return handleError(function (arg0) {
1467
1463
  const ret = JSON.stringify(getObject(arg0));
1468
1464
  return addHeapObject(ret);
1469
1465
  }, arguments); },
@@ -1498,34 +1494,34 @@ function __wbg_get_imports() {
1498
1494
 
1499
1495
  const AnchorsFinalization = (typeof FinalizationRegistry === 'undefined')
1500
1496
  ? { register: () => {}, unregister: () => {} }
1501
- : new FinalizationRegistry(ptr => wasm.__wbg_anchors_free(ptr >>> 0, 1));
1497
+ : new FinalizationRegistry(ptr => wasm.__wbg_anchors_free(ptr, 1));
1502
1498
  const LookupFinalization = (typeof FinalizationRegistry === 'undefined')
1503
1499
  ? { register: () => {}, unregister: () => {} }
1504
- : new FinalizationRegistry(ptr => wasm.__wbg_lookup_free(ptr >>> 0, 1));
1500
+ : new FinalizationRegistry(ptr => wasm.__wbg_lookup_free(ptr, 1));
1505
1501
  const MessageFinalization = (typeof FinalizationRegistry === 'undefined')
1506
1502
  ? { register: () => {}, unregister: () => {} }
1507
- : new FinalizationRegistry(ptr => wasm.__wbg_message_free(ptr >>> 0, 1));
1503
+ : new FinalizationRegistry(ptr => wasm.__wbg_message_free(ptr, 1));
1508
1504
  const MessageBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
1509
1505
  ? { register: () => {}, unregister: () => {} }
1510
- : new FinalizationRegistry(ptr => wasm.__wbg_messagebuilder_free(ptr >>> 0, 1));
1506
+ : new FinalizationRegistry(ptr => wasm.__wbg_messagebuilder_free(ptr, 1));
1511
1507
  const QueryContextFinalization = (typeof FinalizationRegistry === 'undefined')
1512
1508
  ? { register: () => {}, unregister: () => {} }
1513
- : new FinalizationRegistry(ptr => wasm.__wbg_querycontext_free(ptr >>> 0, 1));
1509
+ : new FinalizationRegistry(ptr => wasm.__wbg_querycontext_free(ptr, 1));
1514
1510
  const RecordFinalization = (typeof FinalizationRegistry === 'undefined')
1515
1511
  ? { register: () => {}, unregister: () => {} }
1516
- : new FinalizationRegistry(ptr => wasm.__wbg_record_free(ptr >>> 0, 1));
1512
+ : new FinalizationRegistry(ptr => wasm.__wbg_record_free(ptr, 1));
1517
1513
  const RecordSetFinalization = (typeof FinalizationRegistry === 'undefined')
1518
1514
  ? { register: () => {}, unregister: () => {} }
1519
- : new FinalizationRegistry(ptr => wasm.__wbg_recordset_free(ptr >>> 0, 1));
1515
+ : new FinalizationRegistry(ptr => wasm.__wbg_recordset_free(ptr, 1));
1520
1516
  const UnsignedRecordSetFinalization = (typeof FinalizationRegistry === 'undefined')
1521
1517
  ? { register: () => {}, unregister: () => {} }
1522
- : new FinalizationRegistry(ptr => wasm.__wbg_unsignedrecordset_free(ptr >>> 0, 1));
1518
+ : new FinalizationRegistry(ptr => wasm.__wbg_unsignedrecordset_free(ptr, 1));
1523
1519
  const VerifiedMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1524
1520
  ? { register: () => {}, unregister: () => {} }
1525
- : new FinalizationRegistry(ptr => wasm.__wbg_verifiedmessage_free(ptr >>> 0, 1));
1521
+ : new FinalizationRegistry(ptr => wasm.__wbg_verifiedmessage_free(ptr, 1));
1526
1522
  const VeritasFinalization = (typeof FinalizationRegistry === 'undefined')
1527
1523
  ? { register: () => {}, unregister: () => {} }
1528
- : new FinalizationRegistry(ptr => wasm.__wbg_veritas_free(ptr >>> 0, 1));
1524
+ : new FinalizationRegistry(ptr => wasm.__wbg_veritas_free(ptr, 1));
1529
1525
 
1530
1526
  function addHeapObject(obj) {
1531
1527
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -1637,8 +1633,7 @@ function getDataViewMemory0() {
1637
1633
  }
1638
1634
 
1639
1635
  function getStringFromWasm0(ptr, len) {
1640
- ptr = ptr >>> 0;
1641
- return decodeText(ptr, len);
1636
+ return decodeText(ptr >>> 0, len);
1642
1637
  }
1643
1638
 
1644
1639
  let cachedUint8ArrayMemory0 = null;
@@ -1757,8 +1752,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
1757
1752
 
1758
1753
  let WASM_VECTOR_LEN = 0;
1759
1754
 
1760
- let wasmModule, wasm;
1755
+ let wasmModule, wasmInstance, wasm;
1761
1756
  function __wbg_finalize_init(instance, module) {
1757
+ wasmInstance = instance;
1762
1758
  wasm = instance.exports;
1763
1759
  wasmModule = module;
1764
1760
  cachedDataViewMemory0 = null;
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "collaborators": [
5
5
  "Buffrr <contact@buffrr.dev>"
6
6
  ],
7
- "version": "0.2.0",
7
+ "version": "0.3.0",
8
8
  "files": [
9
9
  "libveritas_bg.wasm",
10
10
  "libveritas.js",