bitmask-core 0.4.0-alpha.1 → 0.4.0-alpha.2

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.
@@ -1,25 +1,5 @@
1
1
  import * as wasm from './bitmask_core_bg.wasm';
2
2
 
3
- const heap = new Array(32).fill(undefined);
4
-
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let heap_next = heap.length;
10
-
11
- function dropObject(idx) {
12
- if (idx < 36) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
3
  const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
24
4
 
25
5
  let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -39,6 +19,12 @@ function getStringFromWasm0(ptr, len) {
39
19
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
40
20
  }
41
21
 
22
+ const heap = new Array(32).fill(undefined);
23
+
24
+ heap.push(undefined, null, true, false);
25
+
26
+ let heap_next = heap.length;
27
+
42
28
  function addHeapObject(obj) {
43
29
  if (heap_next === heap.length) heap.push(heap.length + 1);
44
30
  const idx = heap_next;
@@ -48,6 +34,20 @@ function addHeapObject(obj) {
48
34
  return idx;
49
35
  }
50
36
 
37
+ function getObject(idx) { return heap[idx]; }
38
+
39
+ function dropObject(idx) {
40
+ if (idx < 36) return;
41
+ heap[idx] = heap_next;
42
+ heap_next = idx;
43
+ }
44
+
45
+ function takeObject(idx) {
46
+ const ret = getObject(idx);
47
+ dropObject(idx);
48
+ return ret;
49
+ }
50
+
51
51
  let WASM_VECTOR_LEN = 0;
52
52
 
53
53
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
@@ -438,6 +438,11 @@ function __wbg_adapter_151(arg0, arg1, arg2, arg3) {
438
438
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h5b601c5499c8b6c7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
439
439
  }
440
440
 
441
+ export function __wbindgen_string_new(arg0, arg1) {
442
+ const ret = getStringFromWasm0(arg0, arg1);
443
+ return addHeapObject(ret);
444
+ };
445
+
441
446
  export function __wbindgen_object_drop_ref(arg0) {
442
447
  takeObject(arg0);
443
448
  };
@@ -452,11 +457,6 @@ export function __wbindgen_cb_drop(arg0) {
452
457
  return ret;
453
458
  };
454
459
 
455
- export function __wbindgen_string_new(arg0, arg1) {
456
- const ret = getStringFromWasm0(arg0, arg1);
457
- return addHeapObject(ret);
458
- };
459
-
460
460
  export function __wbindgen_string_get(arg0, arg1) {
461
461
  const obj = getObject(arg1);
462
462
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -543,6 +543,49 @@ export function __wbg_msCrypto_a21fc88caf1ecdc8(arg0) {
543
543
  return addHeapObject(ret);
544
544
  };
545
545
 
546
+ export function __wbg_self_7eede1f4488bf346() { return handleError(function () {
547
+ const ret = self.self;
548
+ return addHeapObject(ret);
549
+ }, arguments) };
550
+
551
+ export function __wbg_crypto_c909fb428dcbddb6(arg0) {
552
+ const ret = getObject(arg0).crypto;
553
+ return addHeapObject(ret);
554
+ };
555
+
556
+ export function __wbg_msCrypto_511eefefbfc70ae4(arg0) {
557
+ const ret = getObject(arg0).msCrypto;
558
+ return addHeapObject(ret);
559
+ };
560
+
561
+ export function __wbindgen_is_undefined(arg0) {
562
+ const ret = getObject(arg0) === undefined;
563
+ return ret;
564
+ };
565
+
566
+ export function __wbg_static_accessor_MODULE_ef3aa2eb251158a5() {
567
+ const ret = module;
568
+ return addHeapObject(ret);
569
+ };
570
+
571
+ export function __wbg_require_900d5c3984fe7703(arg0, arg1, arg2) {
572
+ const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
573
+ return addHeapObject(ret);
574
+ };
575
+
576
+ export function __wbg_getRandomValues_307049345d0bd88c(arg0) {
577
+ const ret = getObject(arg0).getRandomValues;
578
+ return addHeapObject(ret);
579
+ };
580
+
581
+ export function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {
582
+ getObject(arg0).getRandomValues(getObject(arg1));
583
+ };
584
+
585
+ export function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {
586
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
587
+ };
588
+
546
589
  export function __wbg_fetch_386f87a3ebf5003c(arg0) {
547
590
  const ret = fetch(getObject(arg0));
548
591
  return addHeapObject(ret);
@@ -661,49 +704,6 @@ export function __wbg_set_992c1d31586b2957() { return handleError(function (arg0
661
704
  getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
662
705
  }, arguments) };
663
706
 
664
- export function __wbg_self_7eede1f4488bf346() { return handleError(function () {
665
- const ret = self.self;
666
- return addHeapObject(ret);
667
- }, arguments) };
668
-
669
- export function __wbg_crypto_c909fb428dcbddb6(arg0) {
670
- const ret = getObject(arg0).crypto;
671
- return addHeapObject(ret);
672
- };
673
-
674
- export function __wbg_msCrypto_511eefefbfc70ae4(arg0) {
675
- const ret = getObject(arg0).msCrypto;
676
- return addHeapObject(ret);
677
- };
678
-
679
- export function __wbindgen_is_undefined(arg0) {
680
- const ret = getObject(arg0) === undefined;
681
- return ret;
682
- };
683
-
684
- export function __wbg_static_accessor_MODULE_ef3aa2eb251158a5() {
685
- const ret = module;
686
- return addHeapObject(ret);
687
- };
688
-
689
- export function __wbg_require_900d5c3984fe7703(arg0, arg1, arg2) {
690
- const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
691
- return addHeapObject(ret);
692
- };
693
-
694
- export function __wbg_getRandomValues_307049345d0bd88c(arg0) {
695
- const ret = getObject(arg0).getRandomValues;
696
- return addHeapObject(ret);
697
- };
698
-
699
- export function __wbg_getRandomValues_cd175915511f705e(arg0, arg1) {
700
- getObject(arg0).getRandomValues(getObject(arg1));
701
- };
702
-
703
- export function __wbg_randomFillSync_85b3f4c52c56c313(arg0, arg1, arg2) {
704
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
705
- };
706
-
707
707
  export function __wbindgen_is_function(arg0) {
708
708
  const ret = typeof(getObject(arg0)) === 'function';
709
709
  return ret;
@@ -958,8 +958,8 @@ export function __wbindgen_memory() {
958
958
  return addHeapObject(ret);
959
959
  };
960
960
 
961
- export function __wbindgen_closure_wrapper2845(arg0, arg1, arg2) {
962
- const ret = makeMutClosure(arg0, arg1, 872, __wbg_adapter_28);
961
+ export function __wbindgen_closure_wrapper2906(arg0, arg1, arg2) {
962
+ const ret = makeMutClosure(arg0, arg1, 905, __wbg_adapter_28);
963
963
  return addHeapObject(ret);
964
964
  };
965
965
 
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Hunter Trujillo <cryptoquick@pm.me>"
6
6
  ],
7
7
  "description": "Core functionality for the BitMask wallet",
8
- "version": "0.4.0-alpha.1",
8
+ "version": "0.4.0-alpha.2",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",