@keyhive/keyhive 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
@@ -44,8 +44,7 @@ export class Access {
44
44
  if (Symbol.dispose) Access.prototype[Symbol.dispose] = Access.prototype.free;
45
45
 
46
46
  /**
47
- * The result of adding a member: the membership delegation, plus any new leaf
48
- * secrets produced by auto-rekeying a non-forward-secret document on add.
47
+ * The result of adding a member: the membership delegation.
49
48
  */
50
49
  export class AddMemberUpdate {
51
50
  static __wrap(ptr) {
@@ -71,24 +70,6 @@ export class AddMemberUpdate {
71
70
  const ret = wasm.addmemberupdate_delegation(this.__wbg_ptr);
72
71
  return SignedDelegation.__wrap(ret);
73
72
  }
74
- /**
75
- * New leaf secret keypairs from auto-rekeying a non-forward-secret document
76
- * when this reader was added, serialized as a
77
- * `BTreeMap<ShareKey, ShareSecretKey>` (the format `importPrekeySecrets`
78
- * accepts). A sibling instance of this identity (e.g. a tab and its
79
- * SharedWorker) installs them to derive the rotated key. `undefined` when
80
- * no rotation occurred (a forward-secret document).
81
- * @returns {Uint8Array | undefined}
82
- */
83
- get leafSecrets() {
84
- const ret = wasm.addmemberupdate_leafSecrets(this.__wbg_ptr);
85
- let v1;
86
- if (ret[0] !== 0) {
87
- v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
88
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
89
- }
90
- return v1;
91
- }
92
73
  }
93
74
  if (Symbol.dispose) AddMemberUpdate.prototype[Symbol.dispose] = AddMemberUpdate.prototype.free;
94
75
 
@@ -601,6 +582,51 @@ export class ContactCard {
601
582
  }
602
583
  if (Symbol.dispose) ContactCard.prototype[Symbol.dispose] = ContactCard.prototype.free;
603
584
 
585
+ /**
586
+ * Plaintext plus the application secret key that decrypted it.
587
+ *
588
+ * The key lets the consumer recover the blob's external predecessor-secret
589
+ * chain and chain further encryptions onto it, without re-entering CGKA.
590
+ */
591
+ export class DecryptedWithKey {
592
+ static __wrap(ptr) {
593
+ const obj = Object.create(DecryptedWithKey.prototype);
594
+ obj.__wbg_ptr = ptr;
595
+ DecryptedWithKeyFinalization.register(obj, obj.__wbg_ptr, obj);
596
+ return obj;
597
+ }
598
+ __destroy_into_raw() {
599
+ const ptr = this.__wbg_ptr;
600
+ this.__wbg_ptr = 0;
601
+ DecryptedWithKeyFinalization.unregister(this);
602
+ return ptr;
603
+ }
604
+ free() {
605
+ const ptr = this.__destroy_into_raw();
606
+ wasm.__wbg_decryptedwithkey_free(ptr, 0);
607
+ }
608
+ /**
609
+ * The 32-byte application secret key used to decrypt this content.
610
+ * @returns {Uint8Array}
611
+ */
612
+ get applicationSecret() {
613
+ const ret = wasm.decryptedwithkey_applicationSecret(this.__wbg_ptr);
614
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
615
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
616
+ return v1;
617
+ }
618
+ /**
619
+ * @returns {Uint8Array}
620
+ */
621
+ get plaintext() {
622
+ const ret = wasm.decryptedwithkey_plaintext(this.__wbg_ptr);
623
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
624
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
625
+ return v1;
626
+ }
627
+ }
628
+ if (Symbol.dispose) DecryptedWithKey.prototype[Symbol.dispose] = DecryptedWithKey.prototype.free;
629
+
604
630
  export class Delegation {
605
631
  static __wrap(ptr) {
606
632
  const obj = Object.create(Delegation.prototype);
@@ -880,6 +906,24 @@ export class Encrypted {
880
906
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
881
907
  return v1;
882
908
  }
909
+ /**
910
+ * Decrypt this content with an explicit 32-byte application secret key,
911
+ * bypassing CGKA. The consumer uses this to follow the external
912
+ * predecessor-secret chain once it has recovered a blob's key.
913
+ * @param {Uint8Array} key
914
+ * @returns {Uint8Array}
915
+ */
916
+ decryptWithKey(key) {
917
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
918
+ const len0 = WASM_VECTOR_LEN;
919
+ const ret = wasm.encrypted_decryptWithKey(this.__wbg_ptr, ptr0, len0);
920
+ if (ret[3]) {
921
+ throw takeFromExternrefTable0(ret[2]);
922
+ }
923
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
924
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
925
+ return v2;
926
+ }
883
927
  /**
884
928
  * @param {Uint8Array} bytes
885
929
  * @returns {Encrypted}
@@ -961,6 +1005,19 @@ export class EncryptedContentWithUpdate {
961
1005
  const ptr = this.__destroy_into_raw();
962
1006
  wasm.__wbg_encryptedcontentwithupdate_free(ptr, 0);
963
1007
  }
1008
+ /**
1009
+ * The 32-byte application secret key used to encrypt this content.
1010
+ *
1011
+ * Lets the consumer build the external predecessor-secret chain and chain
1012
+ * further encryptions onto this blob.
1013
+ * @returns {Uint8Array}
1014
+ */
1015
+ get applicationSecret() {
1016
+ const ret = wasm.encryptedcontentwithupdate_applicationSecret(this.__wbg_ptr);
1017
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1018
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1019
+ return v1;
1020
+ }
964
1021
  /**
965
1022
  * @returns {Encrypted}
966
1023
  */
@@ -1637,22 +1694,15 @@ export class Keyhive {
1637
1694
  }
1638
1695
  /**
1639
1696
  * Initialize a peer.
1640
- *
1641
- * `forward_secrecy` is this peer's policy for all documents it creates or
1642
- * receives. When `false`, documents carry the CGKA predecessor key chain
1643
- * (a member added later reads the whole prior history) and adding a reader
1644
- * auto-rekeys (see `addMember`'s `leafSecrets`). When `true`, a member
1645
- * added later cannot read content from before they joined.
1646
1697
  * @param {Signer} signer
1647
1698
  * @param {CiphertextStore} ciphertext_store
1648
1699
  * @param {Function} event_handler
1649
- * @param {boolean} forward_secrecy
1650
1700
  * @returns {Promise<Keyhive>}
1651
1701
  */
1652
- static init(signer, ciphertext_store, event_handler, forward_secrecy) {
1702
+ static init(signer, ciphertext_store, event_handler) {
1653
1703
  _assertClass(signer, Signer);
1654
1704
  _assertClass(ciphertext_store, CiphertextStore);
1655
- const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler, forward_secrecy);
1705
+ const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler);
1656
1706
  return ret;
1657
1707
  }
1658
1708
  /**
@@ -1750,6 +1800,21 @@ export class Keyhive {
1750
1800
  const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
1751
1801
  return ret;
1752
1802
  }
1803
+ /**
1804
+ * Decrypt content and also return the 32-byte application secret key used.
1805
+ *
1806
+ * The consumer follows the external predecessor-secret chain from this key
1807
+ * with `Encrypted.decryptWithKey`, avoiding further CGKA dives.
1808
+ * @param {Document} doc
1809
+ * @param {Encrypted} encrypted
1810
+ * @returns {Promise<DecryptedWithKey>}
1811
+ */
1812
+ tryDecryptWithKey(doc, encrypted) {
1813
+ _assertClass(doc, Document);
1814
+ _assertClass(encrypted, Encrypted);
1815
+ const ret = wasm.keyhive_tryDecryptWithKey(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
1816
+ return ret;
1817
+ }
1753
1818
  /**
1754
1819
  * @param {Document} doc
1755
1820
  * @param {ChangeId} content_ref
@@ -2575,7 +2640,56 @@ if (Symbol.dispose) Summary.prototype[Symbol.dispose] = Summary.prototype.free;
2575
2640
  export function setPanicHook() {
2576
2641
  wasm.setPanicHook();
2577
2642
  }
2578
- export function __wbg_Error_fdd633d4bb5dd76a(arg0, arg1) {
2643
+
2644
+ /**
2645
+ * Inverse of [`symmetric_encrypt`]. Reads `nonce(24) || ciphertext`.
2646
+ * @param {Uint8Array} key
2647
+ * @param {Uint8Array} blob
2648
+ * @returns {Uint8Array}
2649
+ */
2650
+ export function symmetricDecrypt(key, blob) {
2651
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
2652
+ const len0 = WASM_VECTOR_LEN;
2653
+ const ptr1 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
2654
+ const len1 = WASM_VECTOR_LEN;
2655
+ const ret = wasm.symmetricDecrypt(ptr0, len0, ptr1, len1);
2656
+ if (ret[3]) {
2657
+ throw takeFromExternrefTable0(ret[2]);
2658
+ }
2659
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2660
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2661
+ return v3;
2662
+ }
2663
+
2664
+ /**
2665
+ * AEAD-encrypt `plaintext` under a 32-byte `key`.
2666
+ *
2667
+ * `associated_data` flavors the synthetic nonce (e.g. the document or content
2668
+ * id) so identical plaintext under the same key in different contexts produces
2669
+ * distinct ciphertext. Returns `nonce(24) || ciphertext` (the ciphertext
2670
+ * includes the Poly1305 tag). The nonce is carried in the output, so
2671
+ * [`symmetric_decrypt`] does not need the associated data.
2672
+ * @param {Uint8Array} key
2673
+ * @param {Uint8Array} plaintext
2674
+ * @param {Uint8Array} associated_data
2675
+ * @returns {Uint8Array}
2676
+ */
2677
+ export function symmetricEncrypt(key, plaintext, associated_data) {
2678
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
2679
+ const len0 = WASM_VECTOR_LEN;
2680
+ const ptr1 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);
2681
+ const len1 = WASM_VECTOR_LEN;
2682
+ const ptr2 = passArray8ToWasm0(associated_data, wasm.__wbindgen_malloc);
2683
+ const len2 = WASM_VECTOR_LEN;
2684
+ const ret = wasm.symmetricEncrypt(ptr0, len0, ptr1, len1, ptr2, len2);
2685
+ if (ret[3]) {
2686
+ throw takeFromExternrefTable0(ret[2]);
2687
+ }
2688
+ var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2689
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2690
+ return v4;
2691
+ }
2692
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
2579
2693
  const ret = Error(getStringFromWasm0(arg0, arg1));
2580
2694
  return ret;
2581
2695
  }
@@ -2597,41 +2711,41 @@ export function __wbg___wasm_refgen_toJsPeer_17636bceb3369eeb(arg0) {
2597
2711
  var ptr1 = ret.__destroy_into_raw();
2598
2712
  return ptr1;
2599
2713
  }
2600
- export function __wbg___wbindgen_debug_string_8a447059637473e2(arg0, arg1) {
2714
+ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
2601
2715
  const ret = debugString(arg1);
2602
2716
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2603
2717
  const len1 = WASM_VECTOR_LEN;
2604
2718
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2605
2719
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2606
2720
  }
2607
- export function __wbg___wbindgen_is_function_acc5528be2b923f2(arg0) {
2721
+ export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
2608
2722
  const ret = typeof(arg0) === 'function';
2609
2723
  return ret;
2610
2724
  }
2611
- export function __wbg___wbindgen_is_object_0beba4a1980d3eea(arg0) {
2725
+ export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
2612
2726
  const val = arg0;
2613
2727
  const ret = typeof(val) === 'object' && val !== null;
2614
2728
  return ret;
2615
2729
  }
2616
- export function __wbg___wbindgen_is_string_1fca8072260dd261(arg0) {
2730
+ export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
2617
2731
  const ret = typeof(arg0) === 'string';
2618
2732
  return ret;
2619
2733
  }
2620
- export function __wbg___wbindgen_is_undefined_721f8decd50c87a3(arg0) {
2734
+ export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
2621
2735
  const ret = arg0 === undefined;
2622
2736
  return ret;
2623
2737
  }
2624
- export function __wbg___wbindgen_throw_ea4887a5f8f9a9db(arg0, arg1) {
2738
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
2625
2739
  throw new Error(getStringFromWasm0(arg0, arg1));
2626
2740
  }
2627
- export function __wbg__wbg_cb_unref_33c39e13d73b25f6(arg0) {
2741
+ export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
2628
2742
  arg0._wbg_cb_unref();
2629
2743
  }
2630
2744
  export function __wbg_access_new(arg0) {
2631
2745
  const ret = Access.__wrap(arg0);
2632
2746
  return ret;
2633
2747
  }
2634
- export function __wbg_add_8db1450e4b353bba(arg0, arg1) {
2748
+ export function __wbg_add_6c7b67a080be853e(arg0, arg1) {
2635
2749
  const ret = arg0.add(arg1);
2636
2750
  return ret;
2637
2751
  }
@@ -2651,7 +2765,7 @@ export function __wbg_archive_new(arg0) {
2651
2765
  const ret = Archive.__wrap(arg0);
2652
2766
  return ret;
2653
2767
  }
2654
- export function __wbg_call_5575218572ead796() { return handleError(function (arg0, arg1, arg2) {
2768
+ export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
2655
2769
  const ret = arg0.call(arg1, arg2);
2656
2770
  return ret;
2657
2771
  }, arguments); }
@@ -2705,6 +2819,10 @@ export function __wbg_debug_3003e89da631cad7(arg0, arg1) {
2705
2819
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2706
2820
  }
2707
2821
  }
2822
+ export function __wbg_decryptedwithkey_new(arg0) {
2823
+ const ret = DecryptedWithKey.__wrap(arg0);
2824
+ return ret;
2825
+ }
2708
2826
  export function __wbg_doccontentrefs_new(arg0) {
2709
2827
  const ret = DocContentRefs.__wrap(arg0);
2710
2828
  return ret;
@@ -2754,11 +2872,11 @@ export function __wbg_event_new(arg0) {
2754
2872
  const ret = Event.__wrap(arg0);
2755
2873
  return ret;
2756
2874
  }
2757
- export function __wbg_exportKey_1ce2ce04d90beed3() { return handleError(function (arg0, arg1, arg2, arg3) {
2875
+ export function __wbg_exportKey_31e8893b69d9dc95() { return handleError(function (arg0, arg1, arg2, arg3) {
2758
2876
  const ret = arg0.exportKey(getStringFromWasm0(arg1, arg2), arg3);
2759
2877
  return ret;
2760
2878
  }, arguments); }
2761
- export function __wbg_generateKey_d7565f8a873b2758() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2879
+ export function __wbg_generateKey_3ed60dd4e2cb2a81() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2762
2880
  const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
2763
2881
  return ret;
2764
2882
  }, arguments); }
@@ -2769,19 +2887,19 @@ export function __wbg_generatewebcryptoerror_new(arg0) {
2769
2887
  export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
2770
2888
  arg0.getRandomValues(arg1);
2771
2889
  }, arguments); }
2772
- export function __wbg_get_197a3fe98f169e38(arg0, arg1) {
2890
+ export function __wbg_get_507a50627bffa49b(arg0, arg1) {
2773
2891
  const ret = arg0[arg1 >>> 0];
2774
2892
  return ret;
2775
2893
  }
2776
- export function __wbg_get_dddb90ff5d27a080() { return handleError(function (arg0, arg1) {
2894
+ export function __wbg_get_78f252d074a84d0b() { return handleError(function (arg0, arg1) {
2777
2895
  const ret = Reflect.get(arg0, arg1);
2778
2896
  return ret;
2779
2897
  }, arguments); }
2780
- export function __wbg_get_private_key_5512a2630ab9366a(arg0) {
2898
+ export function __wbg_get_private_key_a1d2a3ef4e88bcd6(arg0) {
2781
2899
  const ret = arg0.privateKey;
2782
2900
  return ret;
2783
2901
  }
2784
- export function __wbg_get_public_key_bd0de162bf5c6832(arg0) {
2902
+ export function __wbg_get_public_key_eae90acbeb39e965(arg0) {
2785
2903
  const ret = arg0.publicKey;
2786
2904
  return ret;
2787
2905
  }
@@ -2793,7 +2911,7 @@ export function __wbg_individual_new(arg0) {
2793
2911
  const ret = Individual.__wrap(arg0);
2794
2912
  return ret;
2795
2913
  }
2796
- export function __wbg_instanceof_Crypto_cecf3f85e92e02f6(arg0) {
2914
+ export function __wbg_instanceof_Crypto_5e73263038417c75(arg0) {
2797
2915
  let result;
2798
2916
  try {
2799
2917
  result = arg0 instanceof Crypto;
@@ -2807,11 +2925,11 @@ export function __wbg_keyhive_new(arg0) {
2807
2925
  const ret = Keyhive.__wrap(arg0);
2808
2926
  return ret;
2809
2927
  }
2810
- export function __wbg_length_589238bdcf171f0e(arg0) {
2928
+ export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
2811
2929
  const ret = arg0.length;
2812
2930
  return ret;
2813
2931
  }
2814
- export function __wbg_length_c6054974c0a6cdb9(arg0) {
2932
+ export function __wbg_length_370319915dc99107(arg0) {
2815
2933
  const ret = arg0.length;
2816
2934
  return ret;
2817
2935
  }
@@ -2868,38 +2986,38 @@ export function __wbg_new_227d7c05414eb861() {
2868
2986
  const ret = new Error();
2869
2987
  return ret;
2870
2988
  }
2871
- export function __wbg_new_3444eb7412549f0b() {
2872
- const ret = new Map();
2989
+ export function __wbg_new_32b398fb48b6d94a() {
2990
+ const ret = new Array();
2873
2991
  return ret;
2874
2992
  }
2875
- export function __wbg_new_36e147a8ced3c6e0() {
2876
- const ret = new Array();
2993
+ export function __wbg_new_7796ffc7ed656783() {
2994
+ const ret = new Map();
2877
2995
  return ret;
2878
2996
  }
2879
- export function __wbg_new_4a05b166716eeed6(arg0) {
2880
- const ret = new Set(arg0);
2997
+ export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
2998
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2881
2999
  return ret;
2882
3000
  }
2883
- export function __wbg_new_81880fb5002cb255(arg0) {
3001
+ export function __wbg_new_cd45aabdf6073e84(arg0) {
2884
3002
  const ret = new Uint8Array(arg0);
2885
3003
  return ret;
2886
3004
  }
2887
- export function __wbg_new_e66a4b7758dd2e5c(arg0, arg1) {
2888
- const ret = new Error(getStringFromWasm0(arg0, arg1));
3005
+ export function __wbg_new_e64f7b1e88921146(arg0) {
3006
+ const ret = new Set(arg0);
2889
3007
  return ret;
2890
3008
  }
2891
- export function __wbg_new_from_slice_543b875b27789a8f(arg0, arg1) {
3009
+ export function __wbg_new_from_slice_77cdfb7977362f3c(arg0, arg1) {
2892
3010
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
2893
3011
  return ret;
2894
3012
  }
2895
- export function __wbg_new_typed_00a409eb4ec4f2d9(arg0, arg1) {
3013
+ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
2896
3014
  try {
2897
3015
  var state0 = {a: arg0, b: arg1};
2898
3016
  var cb0 = (arg0, arg1) => {
2899
3017
  const a = state0.a;
2900
3018
  state0.a = 0;
2901
3019
  try {
2902
- return wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(a, state0.b, arg0, arg1);
3020
+ return wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(a, state0.b, arg0, arg1);
2903
3021
  } finally {
2904
3022
  state0.a = a;
2905
3023
  }
@@ -2910,7 +3028,7 @@ export function __wbg_new_typed_00a409eb4ec4f2d9(arg0, arg1) {
2910
3028
  state0.a = 0;
2911
3029
  }
2912
3030
  }
2913
- export function __wbg_new_with_length_9b650f44b5c44a4e(arg0) {
3031
+ export function __wbg_new_with_length_e6785c33c8e4cce8(arg0) {
2914
3032
  const ret = new Uint8Array(arg0 >>> 0);
2915
3033
  return ret;
2916
3034
  }
@@ -2922,18 +3040,18 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
2922
3040
  const ret = arg0.process;
2923
3041
  return ret;
2924
3042
  }
2925
- export function __wbg_prototypesetcall_d721637c7ca66eb8(arg0, arg1, arg2) {
3043
+ export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
2926
3044
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2927
3045
  }
2928
- export function __wbg_push_f724b5db8acf89d2(arg0, arg1) {
3046
+ export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
2929
3047
  const ret = arg0.push(arg1);
2930
3048
  return ret;
2931
3049
  }
2932
- export function __wbg_queueMicrotask_1c9b3800e321a967(arg0) {
3050
+ export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
2933
3051
  const ret = arg0.queueMicrotask;
2934
3052
  return ret;
2935
3053
  }
2936
- export function __wbg_queueMicrotask_311744e534a929a3(arg0) {
3054
+ export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
2937
3055
  queueMicrotask(arg0);
2938
3056
  }
2939
3057
  export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
@@ -2943,22 +3061,22 @@ export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function (
2943
3061
  const ret = module.require;
2944
3062
  return ret;
2945
3063
  }, arguments); }
2946
- export function __wbg_resolve_d82363d90af6928a(arg0) {
3064
+ export function __wbg_resolve_2191a4dfe481c25b(arg0) {
2947
3065
  const ret = Promise.resolve(arg0);
2948
3066
  return ret;
2949
3067
  }
2950
- export function __wbg_set_9a1d61e17de7054c(arg0, arg1, arg2) {
3068
+ export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
2951
3069
  const ret = arg0.set(arg1, arg2);
2952
3070
  return ret;
2953
3071
  }
2954
- export function __wbg_set_name_15bb90053efbc017(arg0, arg1, arg2) {
3072
+ export function __wbg_set_name_3bbc583faefa4193(arg0, arg1, arg2) {
2955
3073
  arg0.name = getStringFromWasm0(arg1, arg2);
2956
3074
  }
2957
3075
  export function __wbg_sharekey_new(arg0) {
2958
3076
  const ret = ShareKey.__wrap(arg0);
2959
3077
  return ret;
2960
3078
  }
2961
- export function __wbg_sign_12a498c8600b5618() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3079
+ export function __wbg_sign_1b8fb33c8d16115e() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2962
3080
  const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
2963
3081
  return ret;
2964
3082
  }, arguments); }
@@ -2985,19 +3103,19 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
2985
3103
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2986
3104
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2987
3105
  }
2988
- export function __wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938() {
2989
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
3106
+ export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
3107
+ const ret = typeof global === 'undefined' ? null : global;
2990
3108
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2991
3109
  }
2992
- export function __wbg_static_accessor_GLOBAL_ce44e66a4935da8c() {
2993
- const ret = typeof global === 'undefined' ? null : global;
3110
+ export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
3111
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2994
3112
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2995
3113
  }
2996
- export function __wbg_static_accessor_SELF_44f6e0cb5e67cdad() {
3114
+ export function __wbg_static_accessor_SELF_146583524fe1469b() {
2997
3115
  const ret = typeof self === 'undefined' ? null : self;
2998
3116
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2999
3117
  }
3000
- export function __wbg_static_accessor_WINDOW_168f178805d978fe() {
3118
+ export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
3001
3119
  const ret = typeof window === 'undefined' ? null : window;
3002
3120
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3003
3121
  }
@@ -3005,11 +3123,11 @@ export function __wbg_stats_new(arg0) {
3005
3123
  const ret = Stats.__wrap(arg0);
3006
3124
  return ret;
3007
3125
  }
3008
- export function __wbg_subarray_b0e8ac4ed313fea8(arg0, arg1, arg2) {
3126
+ export function __wbg_subarray_3ed232c8a6baee09(arg0, arg1, arg2) {
3009
3127
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
3010
3128
  return ret;
3011
3129
  }
3012
- export function __wbg_subtle_1287656b3b345d44(arg0) {
3130
+ export function __wbg_subtle_ed1dfcaede24af07(arg0) {
3013
3131
  const ret = arg0.subtle;
3014
3132
  return ret;
3015
3133
  }
@@ -3017,11 +3135,11 @@ export function __wbg_summary_new(arg0) {
3017
3135
  const ret = Summary.__wrap(arg0);
3018
3136
  return ret;
3019
3137
  }
3020
- export function __wbg_then_05edfc8a4fea5106(arg0, arg1, arg2) {
3138
+ export function __wbg_then_16d107c451e9905d(arg0, arg1, arg2) {
3021
3139
  const ret = arg0.then(arg1, arg2);
3022
3140
  return ret;
3023
3141
  }
3024
- export function __wbg_then_591b6b3a75ee817a(arg0, arg1) {
3142
+ export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
3025
3143
  const ret = arg0.then(arg1);
3026
3144
  return ret;
3027
3145
  }
@@ -3052,8 +3170,8 @@ export function __wbg_warn_9d7408e9659996aa(arg0, arg1, arg2, arg3, arg4, arg5,
3052
3170
  }
3053
3171
  }
3054
3172
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
3055
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 711, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3056
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd575a1431d676418);
3173
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 712, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3174
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a);
3057
3175
  return ret;
3058
3176
  }
3059
3177
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
@@ -3131,15 +3249,15 @@ export function __wbindgen_init_externref_table() {
3131
3249
  table.set(offset + 2, true);
3132
3250
  table.set(offset + 3, false);
3133
3251
  }
3134
- function wasm_bindgen__convert__closures_____invoke__hd575a1431d676418(arg0, arg1, arg2) {
3135
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__hd575a1431d676418(arg0, arg1, arg2);
3252
+ function wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2) {
3253
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2);
3136
3254
  if (ret[1]) {
3137
3255
  throw takeFromExternrefTable0(ret[0]);
3138
3256
  }
3139
3257
  }
3140
3258
 
3141
- function wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(arg0, arg1, arg2, arg3) {
3142
- wasm.wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(arg0, arg1, arg2, arg3);
3259
+ function wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3) {
3260
+ wasm.wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3);
3143
3261
  }
3144
3262
 
3145
3263
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -3178,6 +3296,9 @@ const CiphertextStoreFinalization = (typeof FinalizationRegistry === 'undefined'
3178
3296
  const ContactCardFinalization = (typeof FinalizationRegistry === 'undefined')
3179
3297
  ? { register: () => {}, unregister: () => {} }
3180
3298
  : new FinalizationRegistry(ptr => wasm.__wbg_contactcard_free(ptr, 1));
3299
+ const DecryptedWithKeyFinalization = (typeof FinalizationRegistry === 'undefined')
3300
+ ? { register: () => {}, unregister: () => {} }
3301
+ : new FinalizationRegistry(ptr => wasm.__wbg_decryptedwithkey_free(ptr, 1));
3181
3302
  const DelegationFinalization = (typeof FinalizationRegistry === 'undefined')
3182
3303
  ? { register: () => {}, unregister: () => {} }
3183
3304
  : new FinalizationRegistry(ptr => wasm.__wbg_delegation_free(ptr, 1));
Binary file