@keyhive/keyhive 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
@@ -45,55 +45,6 @@ export class Access {
45
45
  }
46
46
  if (Symbol.dispose) Access.prototype[Symbol.dispose] = Access.prototype.free;
47
47
 
48
- /**
49
- * The result of adding a member: the membership delegation, plus any new leaf
50
- * secrets produced by auto-rekeying a non-forward-secret document on add.
51
- */
52
- export class AddMemberUpdate {
53
- static __wrap(ptr) {
54
- const obj = Object.create(AddMemberUpdate.prototype);
55
- obj.__wbg_ptr = ptr;
56
- AddMemberUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
57
- return obj;
58
- }
59
- __destroy_into_raw() {
60
- const ptr = this.__wbg_ptr;
61
- this.__wbg_ptr = 0;
62
- AddMemberUpdateFinalization.unregister(this);
63
- return ptr;
64
- }
65
- free() {
66
- const ptr = this.__destroy_into_raw();
67
- wasm.__wbg_addmemberupdate_free(ptr, 0);
68
- }
69
- /**
70
- * @returns {SignedDelegation}
71
- */
72
- get delegation() {
73
- const ret = wasm.addmemberupdate_delegation(this.__wbg_ptr);
74
- return SignedDelegation.__wrap(ret);
75
- }
76
- /**
77
- * New leaf secret keypairs from auto-rekeying a non-forward-secret document
78
- * when this reader was added, serialized as a
79
- * `BTreeMap<ShareKey, ShareSecretKey>` (the format `importPrekeySecrets`
80
- * accepts). A sibling instance of this identity (e.g. a tab and its
81
- * SharedWorker) installs them to derive the rotated key. `undefined` when
82
- * no rotation occurred (a forward-secret document).
83
- * @returns {Uint8Array | undefined}
84
- */
85
- get leafSecrets() {
86
- const ret = wasm.addmemberupdate_leafSecrets(this.__wbg_ptr);
87
- let v1;
88
- if (ret[0] !== 0) {
89
- v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
90
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
91
- }
92
- return v1;
93
- }
94
- }
95
- if (Symbol.dispose) AddMemberUpdate.prototype[Symbol.dispose] = AddMemberUpdate.prototype.free;
96
-
97
48
  export class Agent {
98
49
  static __wrap(ptr) {
99
50
  const obj = Object.create(Agent.prototype);
@@ -603,6 +554,49 @@ export class ContactCard {
603
554
  }
604
555
  if (Symbol.dispose) ContactCard.prototype[Symbol.dispose] = ContactCard.prototype.free;
605
556
 
557
+ /**
558
+ * Plaintext plus the application secret key that decrypted it.
559
+ */
560
+ export class DecryptedKeyed {
561
+ static __wrap(ptr) {
562
+ const obj = Object.create(DecryptedKeyed.prototype);
563
+ obj.__wbg_ptr = ptr;
564
+ DecryptedKeyedFinalization.register(obj, obj.__wbg_ptr, obj);
565
+ return obj;
566
+ }
567
+ __destroy_into_raw() {
568
+ const ptr = this.__wbg_ptr;
569
+ this.__wbg_ptr = 0;
570
+ DecryptedKeyedFinalization.unregister(this);
571
+ return ptr;
572
+ }
573
+ free() {
574
+ const ptr = this.__destroy_into_raw();
575
+ wasm.__wbg_decryptedkeyed_free(ptr, 0);
576
+ }
577
+ /**
578
+ * The 32-byte application secret key used to decrypt this content.
579
+ * Treat as secret: do not log or persist unencrypted.
580
+ * @returns {Uint8Array}
581
+ */
582
+ get applicationSecret() {
583
+ const ret = wasm.decryptedkeyed_applicationSecret(this.__wbg_ptr);
584
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
585
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
586
+ return v1;
587
+ }
588
+ /**
589
+ * @returns {Uint8Array}
590
+ */
591
+ get plaintext() {
592
+ const ret = wasm.decryptedkeyed_plaintext(this.__wbg_ptr);
593
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
594
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
595
+ return v1;
596
+ }
597
+ }
598
+ if (Symbol.dispose) DecryptedKeyed.prototype[Symbol.dispose] = DecryptedKeyed.prototype.free;
599
+
606
600
  export class Delegation {
607
601
  static __wrap(ptr) {
608
602
  const obj = Object.create(Delegation.prototype);
@@ -882,6 +876,23 @@ export class Encrypted {
882
876
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
883
877
  return v1;
884
878
  }
879
+ /**
880
+ * Decrypt this content with an explicit 32-byte application secret key,
881
+ * bypassing CGKA.
882
+ * @param {Uint8Array} key
883
+ * @returns {Uint8Array}
884
+ */
885
+ decryptWithKey(key) {
886
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
887
+ const len0 = WASM_VECTOR_LEN;
888
+ const ret = wasm.encrypted_decryptWithKey(this.__wbg_ptr, ptr0, len0);
889
+ if (ret[3]) {
890
+ throw takeFromExternrefTable0(ret[2]);
891
+ }
892
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
893
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
894
+ return v2;
895
+ }
885
896
  /**
886
897
  * @param {Uint8Array} bytes
887
898
  * @returns {Encrypted}
@@ -980,6 +991,53 @@ export class EncryptedContentWithUpdate {
980
991
  }
981
992
  if (Symbol.dispose) EncryptedContentWithUpdate.prototype[Symbol.dispose] = EncryptedContentWithUpdate.prototype.free;
982
993
 
994
+ /**
995
+ * Encrypted content plus the application secret key it was encrypted under.
996
+ */
997
+ export class EncryptedKeyed {
998
+ static __wrap(ptr) {
999
+ const obj = Object.create(EncryptedKeyed.prototype);
1000
+ obj.__wbg_ptr = ptr;
1001
+ EncryptedKeyedFinalization.register(obj, obj.__wbg_ptr, obj);
1002
+ return obj;
1003
+ }
1004
+ __destroy_into_raw() {
1005
+ const ptr = this.__wbg_ptr;
1006
+ this.__wbg_ptr = 0;
1007
+ EncryptedKeyedFinalization.unregister(this);
1008
+ return ptr;
1009
+ }
1010
+ free() {
1011
+ const ptr = this.__destroy_into_raw();
1012
+ wasm.__wbg_encryptedkeyed_free(ptr, 0);
1013
+ }
1014
+ /**
1015
+ * The 32-byte application secret key used to encrypt this content.
1016
+ * @returns {Uint8Array}
1017
+ */
1018
+ get applicationSecret() {
1019
+ const ret = wasm.encryptedkeyed_applicationSecret(this.__wbg_ptr);
1020
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1021
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1022
+ return v1;
1023
+ }
1024
+ /**
1025
+ * @returns {Encrypted}
1026
+ */
1027
+ encrypted_content() {
1028
+ const ret = wasm.encryptedkeyed_encrypted_content(this.__wbg_ptr);
1029
+ return Encrypted.__wrap(ret);
1030
+ }
1031
+ /**
1032
+ * @returns {SignedCgkaOperation | undefined}
1033
+ */
1034
+ update_op() {
1035
+ const ret = wasm.encryptedkeyed_update_op(this.__wbg_ptr);
1036
+ return ret === 0 ? undefined : SignedCgkaOperation.__wrap(ret);
1037
+ }
1038
+ }
1039
+ if (Symbol.dispose) EncryptedKeyed.prototype[Symbol.dispose] = EncryptedKeyed.prototype.free;
1040
+
983
1041
  export class Event {
984
1042
  static __wrap(ptr) {
985
1043
  const obj = Object.create(Event.prototype);
@@ -1428,7 +1486,7 @@ export class Keyhive {
1428
1486
  * @param {Membered} membered
1429
1487
  * @param {Access} access
1430
1488
  * @param {Document[]} other_relevant_docs
1431
- * @returns {Promise<AddMemberUpdate>}
1489
+ * @returns {Promise<SignedDelegation>}
1432
1490
  */
1433
1491
  addMember(to_add, membered, access, other_relevant_docs) {
1434
1492
  _assertClass(to_add, Agent);
@@ -1501,8 +1559,7 @@ export class Keyhive {
1501
1559
  /**
1502
1560
  * Force a PCS key rotation and return the new leaf secret, serialized as a
1503
1561
  * one-entry `BTreeMap<ShareKey, ShareSecretKey>` (the exact format
1504
- * `importPrekeySecrets` accepts). A sibling instance of this identity can
1505
- * install it to derive the rotated key without re-importing the whole bundle.
1562
+ * `importPrekeySecrets` accepts).
1506
1563
  * @param {Document} doc
1507
1564
  * @returns {Promise<Uint8Array>}
1508
1565
  */
@@ -1512,8 +1569,6 @@ export class Keyhive {
1512
1569
  return ret;
1513
1570
  }
1514
1571
  /**
1515
- * Generate a document. Whether it provides forward secrecy is determined by
1516
- * this peer's forward-secrecy policy (chosen at `Keyhive.init`).
1517
1572
  * @param {Peer[]} coparents
1518
1573
  * @param {ChangeId} initial_content_ref_head
1519
1574
  * @param {ChangeId[]} more_initial_content_refs
@@ -1638,23 +1693,15 @@ export class Keyhive {
1638
1693
  return ret;
1639
1694
  }
1640
1695
  /**
1641
- * Initialize a peer.
1642
- *
1643
- * `forward_secrecy` is this peer's policy for all documents it creates or
1644
- * receives. When `false`, documents carry the CGKA predecessor key chain
1645
- * (a member added later reads the whole prior history) and adding a reader
1646
- * auto-rekeys (see `addMember`'s `leafSecrets`). When `true`, a member
1647
- * added later cannot read content from before they joined.
1648
1696
  * @param {Signer} signer
1649
1697
  * @param {CiphertextStore} ciphertext_store
1650
1698
  * @param {Function} event_handler
1651
- * @param {boolean} forward_secrecy
1652
1699
  * @returns {Promise<Keyhive>}
1653
1700
  */
1654
- static init(signer, ciphertext_store, event_handler, forward_secrecy) {
1701
+ static init(signer, ciphertext_store, event_handler) {
1655
1702
  _assertClass(signer, Signer);
1656
1703
  _assertClass(ciphertext_store, CiphertextStore);
1657
- const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler, forward_secrecy);
1704
+ const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler);
1658
1705
  return ret;
1659
1706
  }
1660
1707
  /**
@@ -1752,6 +1799,18 @@ export class Keyhive {
1752
1799
  const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
1753
1800
  return ret;
1754
1801
  }
1802
+ /**
1803
+ * Decrypt content and also return the 32-byte application secret key used.
1804
+ * @param {Document} doc
1805
+ * @param {Encrypted} encrypted
1806
+ * @returns {Promise<DecryptedKeyed>}
1807
+ */
1808
+ tryDecryptKeyed(doc, encrypted) {
1809
+ _assertClass(doc, Document);
1810
+ _assertClass(encrypted, Encrypted);
1811
+ const ret = wasm.keyhive_tryDecryptKeyed(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
1812
+ return ret;
1813
+ }
1755
1814
  /**
1756
1815
  * @param {Document} doc
1757
1816
  * @param {ChangeId} content_ref
@@ -1786,6 +1845,25 @@ export class Keyhive {
1786
1845
  const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
1787
1846
  return ret;
1788
1847
  }
1848
+ /**
1849
+ * Encrypt content and also return the application secret key it was
1850
+ * encrypted under.
1851
+ * @param {Document} doc
1852
+ * @param {ChangeId} content_ref
1853
+ * @param {ChangeId[]} js_pred_refs
1854
+ * @param {Uint8Array} content
1855
+ * @returns {Promise<EncryptedKeyed>}
1856
+ */
1857
+ tryEncryptKeyed(doc, content_ref, js_pred_refs, content) {
1858
+ _assertClass(doc, Document);
1859
+ _assertClass(content_ref, ChangeId);
1860
+ const ptr0 = passArrayJsValueToWasm0(js_pred_refs, wasm.__wbindgen_malloc);
1861
+ const len0 = WASM_VECTOR_LEN;
1862
+ const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
1863
+ const len1 = WASM_VECTOR_LEN;
1864
+ const ret = wasm.keyhive_tryEncryptKeyed(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
1865
+ return ret;
1866
+ }
1789
1867
  /**
1790
1868
  * @param {Document} doc
1791
1869
  * @returns {Promise<Uint8Array | undefined>}
@@ -2577,10 +2655,53 @@ if (Symbol.dispose) Summary.prototype[Symbol.dispose] = Summary.prototype.free;
2577
2655
  export function setPanicHook() {
2578
2656
  wasm.setPanicHook();
2579
2657
  }
2658
+
2659
+ /**
2660
+ * Inverse of [`symmetric_encrypt`]. Reads `nonce(24) || ciphertext`.
2661
+ * @param {Uint8Array} key
2662
+ * @param {Uint8Array} blob
2663
+ * @returns {Uint8Array}
2664
+ */
2665
+ export function symmetricDecrypt(key, blob) {
2666
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
2667
+ const len0 = WASM_VECTOR_LEN;
2668
+ const ptr1 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
2669
+ const len1 = WASM_VECTOR_LEN;
2670
+ const ret = wasm.symmetricDecrypt(ptr0, len0, ptr1, len1);
2671
+ if (ret[3]) {
2672
+ throw takeFromExternrefTable0(ret[2]);
2673
+ }
2674
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2675
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2676
+ return v3;
2677
+ }
2678
+
2679
+ /**
2680
+ * Encrypt `plaintext` under a 32-byte `key`, returning `nonce(24) || ciphertext`.
2681
+ * @param {Uint8Array} key
2682
+ * @param {Uint8Array} plaintext
2683
+ * @param {Uint8Array} associated_data
2684
+ * @returns {Uint8Array}
2685
+ */
2686
+ export function symmetricEncrypt(key, plaintext, associated_data) {
2687
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
2688
+ const len0 = WASM_VECTOR_LEN;
2689
+ const ptr1 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);
2690
+ const len1 = WASM_VECTOR_LEN;
2691
+ const ptr2 = passArray8ToWasm0(associated_data, wasm.__wbindgen_malloc);
2692
+ const len2 = WASM_VECTOR_LEN;
2693
+ const ret = wasm.symmetricEncrypt(ptr0, len0, ptr1, len1, ptr2, len2);
2694
+ if (ret[3]) {
2695
+ throw takeFromExternrefTable0(ret[2]);
2696
+ }
2697
+ var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
2698
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
2699
+ return v4;
2700
+ }
2580
2701
  function __wbg_get_imports() {
2581
2702
  const import0 = {
2582
2703
  __proto__: null,
2583
- __wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
2704
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
2584
2705
  const ret = Error(getStringFromWasm0(arg0, arg1));
2585
2706
  return ret;
2586
2707
  },
@@ -2602,48 +2723,44 @@ function __wbg_get_imports() {
2602
2723
  var ptr1 = ret.__destroy_into_raw();
2603
2724
  return ptr1;
2604
2725
  },
2605
- __wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
2726
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
2606
2727
  const ret = debugString(arg1);
2607
2728
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2608
2729
  const len1 = WASM_VECTOR_LEN;
2609
2730
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2610
2731
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2611
2732
  },
2612
- __wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) {
2733
+ __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
2613
2734
  const ret = typeof(arg0) === 'function';
2614
2735
  return ret;
2615
2736
  },
2616
- __wbg___wbindgen_is_object_0beba4a1980d3eea: function(arg0) {
2737
+ __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
2617
2738
  const val = arg0;
2618
2739
  const ret = typeof(val) === 'object' && val !== null;
2619
2740
  return ret;
2620
2741
  },
2621
- __wbg___wbindgen_is_string_1fca8072260dd261: function(arg0) {
2742
+ __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
2622
2743
  const ret = typeof(arg0) === 'string';
2623
2744
  return ret;
2624
2745
  },
2625
- __wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) {
2746
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
2626
2747
  const ret = arg0 === undefined;
2627
2748
  return ret;
2628
2749
  },
2629
- __wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
2750
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
2630
2751
  throw new Error(getStringFromWasm0(arg0, arg1));
2631
2752
  },
2632
- __wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) {
2753
+ __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
2633
2754
  arg0._wbg_cb_unref();
2634
2755
  },
2635
2756
  __wbg_access_new: function(arg0) {
2636
2757
  const ret = Access.__wrap(arg0);
2637
2758
  return ret;
2638
2759
  },
2639
- __wbg_add_8db1450e4b353bba: function(arg0, arg1) {
2760
+ __wbg_add_6c7b67a080be853e: function(arg0, arg1) {
2640
2761
  const ret = arg0.add(arg1);
2641
2762
  return ret;
2642
2763
  },
2643
- __wbg_addmemberupdate_new: function(arg0) {
2644
- const ret = AddMemberUpdate.__wrap(arg0);
2645
- return ret;
2646
- },
2647
2764
  __wbg_agent_new: function(arg0) {
2648
2765
  const ret = Agent.__wrap(arg0);
2649
2766
  return ret;
@@ -2656,7 +2773,7 @@ function __wbg_get_imports() {
2656
2773
  const ret = Archive.__wrap(arg0);
2657
2774
  return ret;
2658
2775
  },
2659
- __wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
2776
+ __wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
2660
2777
  const ret = arg0.call(arg1, arg2);
2661
2778
  return ret;
2662
2779
  }, arguments); },
@@ -2710,6 +2827,10 @@ function __wbg_get_imports() {
2710
2827
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2711
2828
  }
2712
2829
  },
2830
+ __wbg_decryptedkeyed_new: function(arg0) {
2831
+ const ret = DecryptedKeyed.__wrap(arg0);
2832
+ return ret;
2833
+ },
2713
2834
  __wbg_doccontentrefs_new: function(arg0) {
2714
2835
  const ret = DocContentRefs.__wrap(arg0);
2715
2836
  return ret;
@@ -2722,6 +2843,10 @@ function __wbg_get_imports() {
2722
2843
  const ret = EncryptedContentWithUpdate.__wrap(arg0);
2723
2844
  return ret;
2724
2845
  },
2846
+ __wbg_encryptedkeyed_new: function(arg0) {
2847
+ const ret = EncryptedKeyed.__wrap(arg0);
2848
+ return ret;
2849
+ },
2725
2850
  __wbg_error_8b62d3db440cf4a8: function(arg0, arg1) {
2726
2851
  let deferred0_0;
2727
2852
  let deferred0_1;
@@ -2759,11 +2884,11 @@ function __wbg_get_imports() {
2759
2884
  const ret = Event.__wrap(arg0);
2760
2885
  return ret;
2761
2886
  },
2762
- __wbg_exportKey_1ce2ce04d90beed3: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2887
+ __wbg_exportKey_31e8893b69d9dc95: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2763
2888
  const ret = arg0.exportKey(getStringFromWasm0(arg1, arg2), arg3);
2764
2889
  return ret;
2765
2890
  }, arguments); },
2766
- __wbg_generateKey_d7565f8a873b2758: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2891
+ __wbg_generateKey_3ed60dd4e2cb2a81: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2767
2892
  const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
2768
2893
  return ret;
2769
2894
  }, arguments); },
@@ -2774,19 +2899,19 @@ function __wbg_get_imports() {
2774
2899
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
2775
2900
  arg0.getRandomValues(arg1);
2776
2901
  }, arguments); },
2777
- __wbg_get_197a3fe98f169e38: function(arg0, arg1) {
2902
+ __wbg_get_507a50627bffa49b: function(arg0, arg1) {
2778
2903
  const ret = arg0[arg1 >>> 0];
2779
2904
  return ret;
2780
2905
  },
2781
- __wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
2906
+ __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
2782
2907
  const ret = Reflect.get(arg0, arg1);
2783
2908
  return ret;
2784
2909
  }, arguments); },
2785
- __wbg_get_private_key_5512a2630ab9366a: function(arg0) {
2910
+ __wbg_get_private_key_a1d2a3ef4e88bcd6: function(arg0) {
2786
2911
  const ret = arg0.privateKey;
2787
2912
  return ret;
2788
2913
  },
2789
- __wbg_get_public_key_bd0de162bf5c6832: function(arg0) {
2914
+ __wbg_get_public_key_eae90acbeb39e965: function(arg0) {
2790
2915
  const ret = arg0.publicKey;
2791
2916
  return ret;
2792
2917
  },
@@ -2798,7 +2923,7 @@ function __wbg_get_imports() {
2798
2923
  const ret = Individual.__wrap(arg0);
2799
2924
  return ret;
2800
2925
  },
2801
- __wbg_instanceof_Crypto_cecf3f85e92e02f6: function(arg0) {
2926
+ __wbg_instanceof_Crypto_5e73263038417c75: function(arg0) {
2802
2927
  let result;
2803
2928
  try {
2804
2929
  result = arg0 instanceof Crypto;
@@ -2812,11 +2937,11 @@ function __wbg_get_imports() {
2812
2937
  const ret = Keyhive.__wrap(arg0);
2813
2938
  return ret;
2814
2939
  },
2815
- __wbg_length_589238bdcf171f0e: function(arg0) {
2940
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
2816
2941
  const ret = arg0.length;
2817
2942
  return ret;
2818
2943
  },
2819
- __wbg_length_c6054974c0a6cdb9: function(arg0) {
2944
+ __wbg_length_370319915dc99107: function(arg0) {
2820
2945
  const ret = arg0.length;
2821
2946
  return ret;
2822
2947
  },
@@ -2873,38 +2998,38 @@ function __wbg_get_imports() {
2873
2998
  const ret = new Error();
2874
2999
  return ret;
2875
3000
  },
2876
- __wbg_new_3444eb7412549f0b: function() {
2877
- const ret = new Map();
3001
+ __wbg_new_32b398fb48b6d94a: function() {
3002
+ const ret = new Array();
2878
3003
  return ret;
2879
3004
  },
2880
- __wbg_new_36e147a8ced3c6e0: function() {
2881
- const ret = new Array();
3005
+ __wbg_new_7796ffc7ed656783: function() {
3006
+ const ret = new Map();
2882
3007
  return ret;
2883
3008
  },
2884
- __wbg_new_4a05b166716eeed6: function(arg0) {
2885
- const ret = new Set(arg0);
3009
+ __wbg_new_b667d279fd5aa943: function(arg0, arg1) {
3010
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2886
3011
  return ret;
2887
3012
  },
2888
- __wbg_new_81880fb5002cb255: function(arg0) {
3013
+ __wbg_new_cd45aabdf6073e84: function(arg0) {
2889
3014
  const ret = new Uint8Array(arg0);
2890
3015
  return ret;
2891
3016
  },
2892
- __wbg_new_e66a4b7758dd2e5c: function(arg0, arg1) {
2893
- const ret = new Error(getStringFromWasm0(arg0, arg1));
3017
+ __wbg_new_e64f7b1e88921146: function(arg0) {
3018
+ const ret = new Set(arg0);
2894
3019
  return ret;
2895
3020
  },
2896
- __wbg_new_from_slice_543b875b27789a8f: function(arg0, arg1) {
3021
+ __wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
2897
3022
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
2898
3023
  return ret;
2899
3024
  },
2900
- __wbg_new_typed_00a409eb4ec4f2d9: function(arg0, arg1) {
3025
+ __wbg_new_typed_1824d93f294193e5: function(arg0, arg1) {
2901
3026
  try {
2902
3027
  var state0 = {a: arg0, b: arg1};
2903
3028
  var cb0 = (arg0, arg1) => {
2904
3029
  const a = state0.a;
2905
3030
  state0.a = 0;
2906
3031
  try {
2907
- return wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(a, state0.b, arg0, arg1);
3032
+ return wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(a, state0.b, arg0, arg1);
2908
3033
  } finally {
2909
3034
  state0.a = a;
2910
3035
  }
@@ -2915,7 +3040,7 @@ function __wbg_get_imports() {
2915
3040
  state0.a = 0;
2916
3041
  }
2917
3042
  },
2918
- __wbg_new_with_length_9b650f44b5c44a4e: function(arg0) {
3043
+ __wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
2919
3044
  const ret = new Uint8Array(arg0 >>> 0);
2920
3045
  return ret;
2921
3046
  },
@@ -2927,18 +3052,18 @@ function __wbg_get_imports() {
2927
3052
  const ret = arg0.process;
2928
3053
  return ret;
2929
3054
  },
2930
- __wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
3055
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
2931
3056
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2932
3057
  },
2933
- __wbg_push_f724b5db8acf89d2: function(arg0, arg1) {
3058
+ __wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
2934
3059
  const ret = arg0.push(arg1);
2935
3060
  return ret;
2936
3061
  },
2937
- __wbg_queueMicrotask_1c9b3800e321a967: function(arg0) {
3062
+ __wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
2938
3063
  const ret = arg0.queueMicrotask;
2939
3064
  return ret;
2940
3065
  },
2941
- __wbg_queueMicrotask_311744e534a929a3: function(arg0) {
3066
+ __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
2942
3067
  queueMicrotask(arg0);
2943
3068
  },
2944
3069
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
@@ -2948,22 +3073,22 @@ function __wbg_get_imports() {
2948
3073
  const ret = module.require;
2949
3074
  return ret;
2950
3075
  }, arguments); },
2951
- __wbg_resolve_d82363d90af6928a: function(arg0) {
3076
+ __wbg_resolve_2191a4dfe481c25b: function(arg0) {
2952
3077
  const ret = Promise.resolve(arg0);
2953
3078
  return ret;
2954
3079
  },
2955
- __wbg_set_9a1d61e17de7054c: function(arg0, arg1, arg2) {
3080
+ __wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
2956
3081
  const ret = arg0.set(arg1, arg2);
2957
3082
  return ret;
2958
3083
  },
2959
- __wbg_set_name_15bb90053efbc017: function(arg0, arg1, arg2) {
3084
+ __wbg_set_name_3bbc583faefa4193: function(arg0, arg1, arg2) {
2960
3085
  arg0.name = getStringFromWasm0(arg1, arg2);
2961
3086
  },
2962
3087
  __wbg_sharekey_new: function(arg0) {
2963
3088
  const ret = ShareKey.__wrap(arg0);
2964
3089
  return ret;
2965
3090
  },
2966
- __wbg_sign_12a498c8600b5618: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
3091
+ __wbg_sign_1b8fb33c8d16115e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2967
3092
  const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
2968
3093
  return ret;
2969
3094
  }, arguments); },
@@ -2990,19 +3115,19 @@ function __wbg_get_imports() {
2990
3115
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2991
3116
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2992
3117
  },
2993
- __wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() {
2994
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
3118
+ __wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
3119
+ const ret = typeof global === 'undefined' ? null : global;
2995
3120
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2996
3121
  },
2997
- __wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() {
2998
- const ret = typeof global === 'undefined' ? null : global;
3122
+ __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
3123
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2999
3124
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3000
3125
  },
3001
- __wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() {
3126
+ __wbg_static_accessor_SELF_146583524fe1469b: function() {
3002
3127
  const ret = typeof self === 'undefined' ? null : self;
3003
3128
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3004
3129
  },
3005
- __wbg_static_accessor_WINDOW_168f178805d978fe: function() {
3130
+ __wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
3006
3131
  const ret = typeof window === 'undefined' ? null : window;
3007
3132
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
3008
3133
  },
@@ -3010,11 +3135,11 @@ function __wbg_get_imports() {
3010
3135
  const ret = Stats.__wrap(arg0);
3011
3136
  return ret;
3012
3137
  },
3013
- __wbg_subarray_b0e8ac4ed313fea8: function(arg0, arg1, arg2) {
3138
+ __wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
3014
3139
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
3015
3140
  return ret;
3016
3141
  },
3017
- __wbg_subtle_1287656b3b345d44: function(arg0) {
3142
+ __wbg_subtle_ed1dfcaede24af07: function(arg0) {
3018
3143
  const ret = arg0.subtle;
3019
3144
  return ret;
3020
3145
  },
@@ -3022,11 +3147,11 @@ function __wbg_get_imports() {
3022
3147
  const ret = Summary.__wrap(arg0);
3023
3148
  return ret;
3024
3149
  },
3025
- __wbg_then_05edfc8a4fea5106: function(arg0, arg1, arg2) {
3150
+ __wbg_then_16d107c451e9905d: function(arg0, arg1, arg2) {
3026
3151
  const ret = arg0.then(arg1, arg2);
3027
3152
  return ret;
3028
3153
  },
3029
- __wbg_then_591b6b3a75ee817a: function(arg0, arg1) {
3154
+ __wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
3030
3155
  const ret = arg0.then(arg1);
3031
3156
  return ret;
3032
3157
  },
@@ -3057,8 +3182,8 @@ function __wbg_get_imports() {
3057
3182
  }
3058
3183
  },
3059
3184
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
3060
- // 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`.
3061
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd575a1431d676418);
3185
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 716, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3186
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a);
3062
3187
  return ret;
3063
3188
  },
3064
3189
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
@@ -3143,23 +3268,20 @@ function __wbg_get_imports() {
3143
3268
  };
3144
3269
  }
3145
3270
 
3146
- function wasm_bindgen__convert__closures_____invoke__hd575a1431d676418(arg0, arg1, arg2) {
3147
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__hd575a1431d676418(arg0, arg1, arg2);
3271
+ function wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2) {
3272
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2);
3148
3273
  if (ret[1]) {
3149
3274
  throw takeFromExternrefTable0(ret[0]);
3150
3275
  }
3151
3276
  }
3152
3277
 
3153
- function wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(arg0, arg1, arg2, arg3) {
3154
- wasm.wasm_bindgen__convert__closures_____invoke__h1ce7fe53f08aa9a8(arg0, arg1, arg2, arg3);
3278
+ function wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3) {
3279
+ wasm.wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3);
3155
3280
  }
3156
3281
 
3157
3282
  const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
3158
3283
  ? { register: () => {}, unregister: () => {} }
3159
3284
  : new FinalizationRegistry(ptr => wasm.__wbg_access_free(ptr, 1));
3160
- const AddMemberUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
3161
- ? { register: () => {}, unregister: () => {} }
3162
- : new FinalizationRegistry(ptr => wasm.__wbg_addmemberupdate_free(ptr, 1));
3163
3285
  const AgentFinalization = (typeof FinalizationRegistry === 'undefined')
3164
3286
  ? { register: () => {}, unregister: () => {} }
3165
3287
  : new FinalizationRegistry(ptr => wasm.__wbg_agent_free(ptr, 1));
@@ -3190,6 +3312,9 @@ const CiphertextStoreFinalization = (typeof FinalizationRegistry === 'undefined'
3190
3312
  const ContactCardFinalization = (typeof FinalizationRegistry === 'undefined')
3191
3313
  ? { register: () => {}, unregister: () => {} }
3192
3314
  : new FinalizationRegistry(ptr => wasm.__wbg_contactcard_free(ptr, 1));
3315
+ const DecryptedKeyedFinalization = (typeof FinalizationRegistry === 'undefined')
3316
+ ? { register: () => {}, unregister: () => {} }
3317
+ : new FinalizationRegistry(ptr => wasm.__wbg_decryptedkeyed_free(ptr, 1));
3193
3318
  const DelegationFinalization = (typeof FinalizationRegistry === 'undefined')
3194
3319
  ? { register: () => {}, unregister: () => {} }
3195
3320
  : new FinalizationRegistry(ptr => wasm.__wbg_delegation_free(ptr, 1));
@@ -3208,6 +3333,9 @@ const EncryptedFinalization = (typeof FinalizationRegistry === 'undefined')
3208
3333
  const EncryptedContentWithUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
3209
3334
  ? { register: () => {}, unregister: () => {} }
3210
3335
  : new FinalizationRegistry(ptr => wasm.__wbg_encryptedcontentwithupdate_free(ptr, 1));
3336
+ const EncryptedKeyedFinalization = (typeof FinalizationRegistry === 'undefined')
3337
+ ? { register: () => {}, unregister: () => {} }
3338
+ : new FinalizationRegistry(ptr => wasm.__wbg_encryptedkeyed_free(ptr, 1));
3211
3339
  const EventFinalization = (typeof FinalizationRegistry === 'undefined')
3212
3340
  ? { register: () => {}, unregister: () => {} }
3213
3341
  : new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr, 1));