@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.
- package/package.json +1 -1
- package/pkg/keyhive_wasm.d.ts +57 -37
- package/pkg/keyhive_wasm.js +1 -1
- package/pkg/keyhive_wasm_bg.js +255 -127
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +144 -135
- package/pkg-node/keyhive_wasm.d.ts +57 -37
- package/pkg-node/keyhive_wasm.js +259 -128
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +144 -135
- package/pkg-slim/keyhive_wasm.d.ts +201 -172
- package/pkg-slim/keyhive_wasm.js +255 -127
- package/pkg-slim/keyhive_wasm_bg.wasm +0 -0
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.js +1 -1
- package/pkg-slim/keyhive_wasm_bg.wasm.d.ts +144 -135
package/pkg/keyhive_wasm_bg.js
CHANGED
|
@@ -43,55 +43,6 @@ export class Access {
|
|
|
43
43
|
}
|
|
44
44
|
if (Symbol.dispose) Access.prototype[Symbol.dispose] = Access.prototype.free;
|
|
45
45
|
|
|
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.
|
|
49
|
-
*/
|
|
50
|
-
export class AddMemberUpdate {
|
|
51
|
-
static __wrap(ptr) {
|
|
52
|
-
const obj = Object.create(AddMemberUpdate.prototype);
|
|
53
|
-
obj.__wbg_ptr = ptr;
|
|
54
|
-
AddMemberUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
__destroy_into_raw() {
|
|
58
|
-
const ptr = this.__wbg_ptr;
|
|
59
|
-
this.__wbg_ptr = 0;
|
|
60
|
-
AddMemberUpdateFinalization.unregister(this);
|
|
61
|
-
return ptr;
|
|
62
|
-
}
|
|
63
|
-
free() {
|
|
64
|
-
const ptr = this.__destroy_into_raw();
|
|
65
|
-
wasm.__wbg_addmemberupdate_free(ptr, 0);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @returns {SignedDelegation}
|
|
69
|
-
*/
|
|
70
|
-
get delegation() {
|
|
71
|
-
const ret = wasm.addmemberupdate_delegation(this.__wbg_ptr);
|
|
72
|
-
return SignedDelegation.__wrap(ret);
|
|
73
|
-
}
|
|
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
|
-
}
|
|
93
|
-
if (Symbol.dispose) AddMemberUpdate.prototype[Symbol.dispose] = AddMemberUpdate.prototype.free;
|
|
94
|
-
|
|
95
46
|
export class Agent {
|
|
96
47
|
static __wrap(ptr) {
|
|
97
48
|
const obj = Object.create(Agent.prototype);
|
|
@@ -601,6 +552,49 @@ export class ContactCard {
|
|
|
601
552
|
}
|
|
602
553
|
if (Symbol.dispose) ContactCard.prototype[Symbol.dispose] = ContactCard.prototype.free;
|
|
603
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Plaintext plus the application secret key that decrypted it.
|
|
557
|
+
*/
|
|
558
|
+
export class DecryptedKeyed {
|
|
559
|
+
static __wrap(ptr) {
|
|
560
|
+
const obj = Object.create(DecryptedKeyed.prototype);
|
|
561
|
+
obj.__wbg_ptr = ptr;
|
|
562
|
+
DecryptedKeyedFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
563
|
+
return obj;
|
|
564
|
+
}
|
|
565
|
+
__destroy_into_raw() {
|
|
566
|
+
const ptr = this.__wbg_ptr;
|
|
567
|
+
this.__wbg_ptr = 0;
|
|
568
|
+
DecryptedKeyedFinalization.unregister(this);
|
|
569
|
+
return ptr;
|
|
570
|
+
}
|
|
571
|
+
free() {
|
|
572
|
+
const ptr = this.__destroy_into_raw();
|
|
573
|
+
wasm.__wbg_decryptedkeyed_free(ptr, 0);
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* The 32-byte application secret key used to decrypt this content.
|
|
577
|
+
* Treat as secret: do not log or persist unencrypted.
|
|
578
|
+
* @returns {Uint8Array}
|
|
579
|
+
*/
|
|
580
|
+
get applicationSecret() {
|
|
581
|
+
const ret = wasm.decryptedkeyed_applicationSecret(this.__wbg_ptr);
|
|
582
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
583
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
584
|
+
return v1;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* @returns {Uint8Array}
|
|
588
|
+
*/
|
|
589
|
+
get plaintext() {
|
|
590
|
+
const ret = wasm.decryptedkeyed_plaintext(this.__wbg_ptr);
|
|
591
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
592
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
593
|
+
return v1;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (Symbol.dispose) DecryptedKeyed.prototype[Symbol.dispose] = DecryptedKeyed.prototype.free;
|
|
597
|
+
|
|
604
598
|
export class Delegation {
|
|
605
599
|
static __wrap(ptr) {
|
|
606
600
|
const obj = Object.create(Delegation.prototype);
|
|
@@ -880,6 +874,23 @@ export class Encrypted {
|
|
|
880
874
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
881
875
|
return v1;
|
|
882
876
|
}
|
|
877
|
+
/**
|
|
878
|
+
* Decrypt this content with an explicit 32-byte application secret key,
|
|
879
|
+
* bypassing CGKA.
|
|
880
|
+
* @param {Uint8Array} key
|
|
881
|
+
* @returns {Uint8Array}
|
|
882
|
+
*/
|
|
883
|
+
decryptWithKey(key) {
|
|
884
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
885
|
+
const len0 = WASM_VECTOR_LEN;
|
|
886
|
+
const ret = wasm.encrypted_decryptWithKey(this.__wbg_ptr, ptr0, len0);
|
|
887
|
+
if (ret[3]) {
|
|
888
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
889
|
+
}
|
|
890
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
891
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
892
|
+
return v2;
|
|
893
|
+
}
|
|
883
894
|
/**
|
|
884
895
|
* @param {Uint8Array} bytes
|
|
885
896
|
* @returns {Encrypted}
|
|
@@ -978,6 +989,53 @@ export class EncryptedContentWithUpdate {
|
|
|
978
989
|
}
|
|
979
990
|
if (Symbol.dispose) EncryptedContentWithUpdate.prototype[Symbol.dispose] = EncryptedContentWithUpdate.prototype.free;
|
|
980
991
|
|
|
992
|
+
/**
|
|
993
|
+
* Encrypted content plus the application secret key it was encrypted under.
|
|
994
|
+
*/
|
|
995
|
+
export class EncryptedKeyed {
|
|
996
|
+
static __wrap(ptr) {
|
|
997
|
+
const obj = Object.create(EncryptedKeyed.prototype);
|
|
998
|
+
obj.__wbg_ptr = ptr;
|
|
999
|
+
EncryptedKeyedFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1000
|
+
return obj;
|
|
1001
|
+
}
|
|
1002
|
+
__destroy_into_raw() {
|
|
1003
|
+
const ptr = this.__wbg_ptr;
|
|
1004
|
+
this.__wbg_ptr = 0;
|
|
1005
|
+
EncryptedKeyedFinalization.unregister(this);
|
|
1006
|
+
return ptr;
|
|
1007
|
+
}
|
|
1008
|
+
free() {
|
|
1009
|
+
const ptr = this.__destroy_into_raw();
|
|
1010
|
+
wasm.__wbg_encryptedkeyed_free(ptr, 0);
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* The 32-byte application secret key used to encrypt this content.
|
|
1014
|
+
* @returns {Uint8Array}
|
|
1015
|
+
*/
|
|
1016
|
+
get applicationSecret() {
|
|
1017
|
+
const ret = wasm.encryptedkeyed_applicationSecret(this.__wbg_ptr);
|
|
1018
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1019
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1020
|
+
return v1;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* @returns {Encrypted}
|
|
1024
|
+
*/
|
|
1025
|
+
encrypted_content() {
|
|
1026
|
+
const ret = wasm.encryptedkeyed_encrypted_content(this.__wbg_ptr);
|
|
1027
|
+
return Encrypted.__wrap(ret);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* @returns {SignedCgkaOperation | undefined}
|
|
1031
|
+
*/
|
|
1032
|
+
update_op() {
|
|
1033
|
+
const ret = wasm.encryptedkeyed_update_op(this.__wbg_ptr);
|
|
1034
|
+
return ret === 0 ? undefined : SignedCgkaOperation.__wrap(ret);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
if (Symbol.dispose) EncryptedKeyed.prototype[Symbol.dispose] = EncryptedKeyed.prototype.free;
|
|
1038
|
+
|
|
981
1039
|
export class Event {
|
|
982
1040
|
static __wrap(ptr) {
|
|
983
1041
|
const obj = Object.create(Event.prototype);
|
|
@@ -1426,7 +1484,7 @@ export class Keyhive {
|
|
|
1426
1484
|
* @param {Membered} membered
|
|
1427
1485
|
* @param {Access} access
|
|
1428
1486
|
* @param {Document[]} other_relevant_docs
|
|
1429
|
-
* @returns {Promise<
|
|
1487
|
+
* @returns {Promise<SignedDelegation>}
|
|
1430
1488
|
*/
|
|
1431
1489
|
addMember(to_add, membered, access, other_relevant_docs) {
|
|
1432
1490
|
_assertClass(to_add, Agent);
|
|
@@ -1499,8 +1557,7 @@ export class Keyhive {
|
|
|
1499
1557
|
/**
|
|
1500
1558
|
* Force a PCS key rotation and return the new leaf secret, serialized as a
|
|
1501
1559
|
* one-entry `BTreeMap<ShareKey, ShareSecretKey>` (the exact format
|
|
1502
|
-
* `importPrekeySecrets` accepts).
|
|
1503
|
-
* install it to derive the rotated key without re-importing the whole bundle.
|
|
1560
|
+
* `importPrekeySecrets` accepts).
|
|
1504
1561
|
* @param {Document} doc
|
|
1505
1562
|
* @returns {Promise<Uint8Array>}
|
|
1506
1563
|
*/
|
|
@@ -1510,8 +1567,6 @@ export class Keyhive {
|
|
|
1510
1567
|
return ret;
|
|
1511
1568
|
}
|
|
1512
1569
|
/**
|
|
1513
|
-
* Generate a document. Whether it provides forward secrecy is determined by
|
|
1514
|
-
* this peer's forward-secrecy policy (chosen at `Keyhive.init`).
|
|
1515
1570
|
* @param {Peer[]} coparents
|
|
1516
1571
|
* @param {ChangeId} initial_content_ref_head
|
|
1517
1572
|
* @param {ChangeId[]} more_initial_content_refs
|
|
@@ -1636,23 +1691,15 @@ export class Keyhive {
|
|
|
1636
1691
|
return ret;
|
|
1637
1692
|
}
|
|
1638
1693
|
/**
|
|
1639
|
-
* 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
1694
|
* @param {Signer} signer
|
|
1647
1695
|
* @param {CiphertextStore} ciphertext_store
|
|
1648
1696
|
* @param {Function} event_handler
|
|
1649
|
-
* @param {boolean} forward_secrecy
|
|
1650
1697
|
* @returns {Promise<Keyhive>}
|
|
1651
1698
|
*/
|
|
1652
|
-
static init(signer, ciphertext_store, event_handler
|
|
1699
|
+
static init(signer, ciphertext_store, event_handler) {
|
|
1653
1700
|
_assertClass(signer, Signer);
|
|
1654
1701
|
_assertClass(ciphertext_store, CiphertextStore);
|
|
1655
|
-
const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler
|
|
1702
|
+
const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler);
|
|
1656
1703
|
return ret;
|
|
1657
1704
|
}
|
|
1658
1705
|
/**
|
|
@@ -1750,6 +1797,18 @@ export class Keyhive {
|
|
|
1750
1797
|
const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
|
|
1751
1798
|
return ret;
|
|
1752
1799
|
}
|
|
1800
|
+
/**
|
|
1801
|
+
* Decrypt content and also return the 32-byte application secret key used.
|
|
1802
|
+
* @param {Document} doc
|
|
1803
|
+
* @param {Encrypted} encrypted
|
|
1804
|
+
* @returns {Promise<DecryptedKeyed>}
|
|
1805
|
+
*/
|
|
1806
|
+
tryDecryptKeyed(doc, encrypted) {
|
|
1807
|
+
_assertClass(doc, Document);
|
|
1808
|
+
_assertClass(encrypted, Encrypted);
|
|
1809
|
+
const ret = wasm.keyhive_tryDecryptKeyed(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
|
|
1810
|
+
return ret;
|
|
1811
|
+
}
|
|
1753
1812
|
/**
|
|
1754
1813
|
* @param {Document} doc
|
|
1755
1814
|
* @param {ChangeId} content_ref
|
|
@@ -1784,6 +1843,25 @@ export class Keyhive {
|
|
|
1784
1843
|
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1785
1844
|
return ret;
|
|
1786
1845
|
}
|
|
1846
|
+
/**
|
|
1847
|
+
* Encrypt content and also return the application secret key it was
|
|
1848
|
+
* encrypted under.
|
|
1849
|
+
* @param {Document} doc
|
|
1850
|
+
* @param {ChangeId} content_ref
|
|
1851
|
+
* @param {ChangeId[]} js_pred_refs
|
|
1852
|
+
* @param {Uint8Array} content
|
|
1853
|
+
* @returns {Promise<EncryptedKeyed>}
|
|
1854
|
+
*/
|
|
1855
|
+
tryEncryptKeyed(doc, content_ref, js_pred_refs, content) {
|
|
1856
|
+
_assertClass(doc, Document);
|
|
1857
|
+
_assertClass(content_ref, ChangeId);
|
|
1858
|
+
const ptr0 = passArrayJsValueToWasm0(js_pred_refs, wasm.__wbindgen_malloc);
|
|
1859
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1860
|
+
const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
1861
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1862
|
+
const ret = wasm.keyhive_tryEncryptKeyed(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1863
|
+
return ret;
|
|
1864
|
+
}
|
|
1787
1865
|
/**
|
|
1788
1866
|
* @param {Document} doc
|
|
1789
1867
|
* @returns {Promise<Uint8Array | undefined>}
|
|
@@ -2575,7 +2653,50 @@ if (Symbol.dispose) Summary.prototype[Symbol.dispose] = Summary.prototype.free;
|
|
|
2575
2653
|
export function setPanicHook() {
|
|
2576
2654
|
wasm.setPanicHook();
|
|
2577
2655
|
}
|
|
2578
|
-
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* Inverse of [`symmetric_encrypt`]. Reads `nonce(24) || ciphertext`.
|
|
2659
|
+
* @param {Uint8Array} key
|
|
2660
|
+
* @param {Uint8Array} blob
|
|
2661
|
+
* @returns {Uint8Array}
|
|
2662
|
+
*/
|
|
2663
|
+
export function symmetricDecrypt(key, blob) {
|
|
2664
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2665
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2666
|
+
const ptr1 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
|
|
2667
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2668
|
+
const ret = wasm.symmetricDecrypt(ptr0, len0, ptr1, len1);
|
|
2669
|
+
if (ret[3]) {
|
|
2670
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2671
|
+
}
|
|
2672
|
+
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2673
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2674
|
+
return v3;
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* Encrypt `plaintext` under a 32-byte `key`, returning `nonce(24) || ciphertext`.
|
|
2679
|
+
* @param {Uint8Array} key
|
|
2680
|
+
* @param {Uint8Array} plaintext
|
|
2681
|
+
* @param {Uint8Array} associated_data
|
|
2682
|
+
* @returns {Uint8Array}
|
|
2683
|
+
*/
|
|
2684
|
+
export function symmetricEncrypt(key, plaintext, associated_data) {
|
|
2685
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2686
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2687
|
+
const ptr1 = passArray8ToWasm0(plaintext, wasm.__wbindgen_malloc);
|
|
2688
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2689
|
+
const ptr2 = passArray8ToWasm0(associated_data, wasm.__wbindgen_malloc);
|
|
2690
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2691
|
+
const ret = wasm.symmetricEncrypt(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2692
|
+
if (ret[3]) {
|
|
2693
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2694
|
+
}
|
|
2695
|
+
var v4 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2696
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2697
|
+
return v4;
|
|
2698
|
+
}
|
|
2699
|
+
export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
|
|
2579
2700
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2580
2701
|
return ret;
|
|
2581
2702
|
}
|
|
@@ -2597,48 +2718,44 @@ export function __wbg___wasm_refgen_toJsPeer_17636bceb3369eeb(arg0) {
|
|
|
2597
2718
|
var ptr1 = ret.__destroy_into_raw();
|
|
2598
2719
|
return ptr1;
|
|
2599
2720
|
}
|
|
2600
|
-
export function
|
|
2721
|
+
export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
|
|
2601
2722
|
const ret = debugString(arg1);
|
|
2602
2723
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2603
2724
|
const len1 = WASM_VECTOR_LEN;
|
|
2604
2725
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2605
2726
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2606
2727
|
}
|
|
2607
|
-
export function
|
|
2728
|
+
export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
|
|
2608
2729
|
const ret = typeof(arg0) === 'function';
|
|
2609
2730
|
return ret;
|
|
2610
2731
|
}
|
|
2611
|
-
export function
|
|
2732
|
+
export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
|
|
2612
2733
|
const val = arg0;
|
|
2613
2734
|
const ret = typeof(val) === 'object' && val !== null;
|
|
2614
2735
|
return ret;
|
|
2615
2736
|
}
|
|
2616
|
-
export function
|
|
2737
|
+
export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
|
|
2617
2738
|
const ret = typeof(arg0) === 'string';
|
|
2618
2739
|
return ret;
|
|
2619
2740
|
}
|
|
2620
|
-
export function
|
|
2741
|
+
export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
|
|
2621
2742
|
const ret = arg0 === undefined;
|
|
2622
2743
|
return ret;
|
|
2623
2744
|
}
|
|
2624
|
-
export function
|
|
2745
|
+
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
|
|
2625
2746
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2626
2747
|
}
|
|
2627
|
-
export function
|
|
2748
|
+
export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
|
|
2628
2749
|
arg0._wbg_cb_unref();
|
|
2629
2750
|
}
|
|
2630
2751
|
export function __wbg_access_new(arg0) {
|
|
2631
2752
|
const ret = Access.__wrap(arg0);
|
|
2632
2753
|
return ret;
|
|
2633
2754
|
}
|
|
2634
|
-
export function
|
|
2755
|
+
export function __wbg_add_6c7b67a080be853e(arg0, arg1) {
|
|
2635
2756
|
const ret = arg0.add(arg1);
|
|
2636
2757
|
return ret;
|
|
2637
2758
|
}
|
|
2638
|
-
export function __wbg_addmemberupdate_new(arg0) {
|
|
2639
|
-
const ret = AddMemberUpdate.__wrap(arg0);
|
|
2640
|
-
return ret;
|
|
2641
|
-
}
|
|
2642
2759
|
export function __wbg_agent_new(arg0) {
|
|
2643
2760
|
const ret = Agent.__wrap(arg0);
|
|
2644
2761
|
return ret;
|
|
@@ -2651,7 +2768,7 @@ export function __wbg_archive_new(arg0) {
|
|
|
2651
2768
|
const ret = Archive.__wrap(arg0);
|
|
2652
2769
|
return ret;
|
|
2653
2770
|
}
|
|
2654
|
-
export function
|
|
2771
|
+
export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
|
|
2655
2772
|
const ret = arg0.call(arg1, arg2);
|
|
2656
2773
|
return ret;
|
|
2657
2774
|
}, arguments); }
|
|
@@ -2705,6 +2822,10 @@ export function __wbg_debug_3003e89da631cad7(arg0, arg1) {
|
|
|
2705
2822
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2706
2823
|
}
|
|
2707
2824
|
}
|
|
2825
|
+
export function __wbg_decryptedkeyed_new(arg0) {
|
|
2826
|
+
const ret = DecryptedKeyed.__wrap(arg0);
|
|
2827
|
+
return ret;
|
|
2828
|
+
}
|
|
2708
2829
|
export function __wbg_doccontentrefs_new(arg0) {
|
|
2709
2830
|
const ret = DocContentRefs.__wrap(arg0);
|
|
2710
2831
|
return ret;
|
|
@@ -2717,6 +2838,10 @@ export function __wbg_encryptedcontentwithupdate_new(arg0) {
|
|
|
2717
2838
|
const ret = EncryptedContentWithUpdate.__wrap(arg0);
|
|
2718
2839
|
return ret;
|
|
2719
2840
|
}
|
|
2841
|
+
export function __wbg_encryptedkeyed_new(arg0) {
|
|
2842
|
+
const ret = EncryptedKeyed.__wrap(arg0);
|
|
2843
|
+
return ret;
|
|
2844
|
+
}
|
|
2720
2845
|
export function __wbg_error_8b62d3db440cf4a8(arg0, arg1) {
|
|
2721
2846
|
let deferred0_0;
|
|
2722
2847
|
let deferred0_1;
|
|
@@ -2754,11 +2879,11 @@ export function __wbg_event_new(arg0) {
|
|
|
2754
2879
|
const ret = Event.__wrap(arg0);
|
|
2755
2880
|
return ret;
|
|
2756
2881
|
}
|
|
2757
|
-
export function
|
|
2882
|
+
export function __wbg_exportKey_31e8893b69d9dc95() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2758
2883
|
const ret = arg0.exportKey(getStringFromWasm0(arg1, arg2), arg3);
|
|
2759
2884
|
return ret;
|
|
2760
2885
|
}, arguments); }
|
|
2761
|
-
export function
|
|
2886
|
+
export function __wbg_generateKey_3ed60dd4e2cb2a81() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2762
2887
|
const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
|
|
2763
2888
|
return ret;
|
|
2764
2889
|
}, arguments); }
|
|
@@ -2769,19 +2894,19 @@ export function __wbg_generatewebcryptoerror_new(arg0) {
|
|
|
2769
2894
|
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
2770
2895
|
arg0.getRandomValues(arg1);
|
|
2771
2896
|
}, arguments); }
|
|
2772
|
-
export function
|
|
2897
|
+
export function __wbg_get_507a50627bffa49b(arg0, arg1) {
|
|
2773
2898
|
const ret = arg0[arg1 >>> 0];
|
|
2774
2899
|
return ret;
|
|
2775
2900
|
}
|
|
2776
|
-
export function
|
|
2901
|
+
export function __wbg_get_78f252d074a84d0b() { return handleError(function (arg0, arg1) {
|
|
2777
2902
|
const ret = Reflect.get(arg0, arg1);
|
|
2778
2903
|
return ret;
|
|
2779
2904
|
}, arguments); }
|
|
2780
|
-
export function
|
|
2905
|
+
export function __wbg_get_private_key_a1d2a3ef4e88bcd6(arg0) {
|
|
2781
2906
|
const ret = arg0.privateKey;
|
|
2782
2907
|
return ret;
|
|
2783
2908
|
}
|
|
2784
|
-
export function
|
|
2909
|
+
export function __wbg_get_public_key_eae90acbeb39e965(arg0) {
|
|
2785
2910
|
const ret = arg0.publicKey;
|
|
2786
2911
|
return ret;
|
|
2787
2912
|
}
|
|
@@ -2793,7 +2918,7 @@ export function __wbg_individual_new(arg0) {
|
|
|
2793
2918
|
const ret = Individual.__wrap(arg0);
|
|
2794
2919
|
return ret;
|
|
2795
2920
|
}
|
|
2796
|
-
export function
|
|
2921
|
+
export function __wbg_instanceof_Crypto_5e73263038417c75(arg0) {
|
|
2797
2922
|
let result;
|
|
2798
2923
|
try {
|
|
2799
2924
|
result = arg0 instanceof Crypto;
|
|
@@ -2807,11 +2932,11 @@ export function __wbg_keyhive_new(arg0) {
|
|
|
2807
2932
|
const ret = Keyhive.__wrap(arg0);
|
|
2808
2933
|
return ret;
|
|
2809
2934
|
}
|
|
2810
|
-
export function
|
|
2935
|
+
export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
|
|
2811
2936
|
const ret = arg0.length;
|
|
2812
2937
|
return ret;
|
|
2813
2938
|
}
|
|
2814
|
-
export function
|
|
2939
|
+
export function __wbg_length_370319915dc99107(arg0) {
|
|
2815
2940
|
const ret = arg0.length;
|
|
2816
2941
|
return ret;
|
|
2817
2942
|
}
|
|
@@ -2868,38 +2993,38 @@ export function __wbg_new_227d7c05414eb861() {
|
|
|
2868
2993
|
const ret = new Error();
|
|
2869
2994
|
return ret;
|
|
2870
2995
|
}
|
|
2871
|
-
export function
|
|
2872
|
-
const ret = new
|
|
2996
|
+
export function __wbg_new_32b398fb48b6d94a() {
|
|
2997
|
+
const ret = new Array();
|
|
2873
2998
|
return ret;
|
|
2874
2999
|
}
|
|
2875
|
-
export function
|
|
2876
|
-
const ret = new
|
|
3000
|
+
export function __wbg_new_7796ffc7ed656783() {
|
|
3001
|
+
const ret = new Map();
|
|
2877
3002
|
return ret;
|
|
2878
3003
|
}
|
|
2879
|
-
export function
|
|
2880
|
-
const ret = new
|
|
3004
|
+
export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
|
|
3005
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2881
3006
|
return ret;
|
|
2882
3007
|
}
|
|
2883
|
-
export function
|
|
3008
|
+
export function __wbg_new_cd45aabdf6073e84(arg0) {
|
|
2884
3009
|
const ret = new Uint8Array(arg0);
|
|
2885
3010
|
return ret;
|
|
2886
3011
|
}
|
|
2887
|
-
export function
|
|
2888
|
-
const ret = new
|
|
3012
|
+
export function __wbg_new_e64f7b1e88921146(arg0) {
|
|
3013
|
+
const ret = new Set(arg0);
|
|
2889
3014
|
return ret;
|
|
2890
3015
|
}
|
|
2891
|
-
export function
|
|
3016
|
+
export function __wbg_new_from_slice_77cdfb7977362f3c(arg0, arg1) {
|
|
2892
3017
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2893
3018
|
return ret;
|
|
2894
3019
|
}
|
|
2895
|
-
export function
|
|
3020
|
+
export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
|
|
2896
3021
|
try {
|
|
2897
3022
|
var state0 = {a: arg0, b: arg1};
|
|
2898
3023
|
var cb0 = (arg0, arg1) => {
|
|
2899
3024
|
const a = state0.a;
|
|
2900
3025
|
state0.a = 0;
|
|
2901
3026
|
try {
|
|
2902
|
-
return
|
|
3027
|
+
return wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(a, state0.b, arg0, arg1);
|
|
2903
3028
|
} finally {
|
|
2904
3029
|
state0.a = a;
|
|
2905
3030
|
}
|
|
@@ -2910,7 +3035,7 @@ export function __wbg_new_typed_00a409eb4ec4f2d9(arg0, arg1) {
|
|
|
2910
3035
|
state0.a = 0;
|
|
2911
3036
|
}
|
|
2912
3037
|
}
|
|
2913
|
-
export function
|
|
3038
|
+
export function __wbg_new_with_length_e6785c33c8e4cce8(arg0) {
|
|
2914
3039
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
2915
3040
|
return ret;
|
|
2916
3041
|
}
|
|
@@ -2922,18 +3047,18 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
|
2922
3047
|
const ret = arg0.process;
|
|
2923
3048
|
return ret;
|
|
2924
3049
|
}
|
|
2925
|
-
export function
|
|
3050
|
+
export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
|
|
2926
3051
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2927
3052
|
}
|
|
2928
|
-
export function
|
|
3053
|
+
export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
|
|
2929
3054
|
const ret = arg0.push(arg1);
|
|
2930
3055
|
return ret;
|
|
2931
3056
|
}
|
|
2932
|
-
export function
|
|
3057
|
+
export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
|
|
2933
3058
|
const ret = arg0.queueMicrotask;
|
|
2934
3059
|
return ret;
|
|
2935
3060
|
}
|
|
2936
|
-
export function
|
|
3061
|
+
export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
|
|
2937
3062
|
queueMicrotask(arg0);
|
|
2938
3063
|
}
|
|
2939
3064
|
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
@@ -2943,22 +3068,22 @@ export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function (
|
|
|
2943
3068
|
const ret = module.require;
|
|
2944
3069
|
return ret;
|
|
2945
3070
|
}, arguments); }
|
|
2946
|
-
export function
|
|
3071
|
+
export function __wbg_resolve_2191a4dfe481c25b(arg0) {
|
|
2947
3072
|
const ret = Promise.resolve(arg0);
|
|
2948
3073
|
return ret;
|
|
2949
3074
|
}
|
|
2950
|
-
export function
|
|
3075
|
+
export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
|
|
2951
3076
|
const ret = arg0.set(arg1, arg2);
|
|
2952
3077
|
return ret;
|
|
2953
3078
|
}
|
|
2954
|
-
export function
|
|
3079
|
+
export function __wbg_set_name_3bbc583faefa4193(arg0, arg1, arg2) {
|
|
2955
3080
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
2956
3081
|
}
|
|
2957
3082
|
export function __wbg_sharekey_new(arg0) {
|
|
2958
3083
|
const ret = ShareKey.__wrap(arg0);
|
|
2959
3084
|
return ret;
|
|
2960
3085
|
}
|
|
2961
|
-
export function
|
|
3086
|
+
export function __wbg_sign_1b8fb33c8d16115e() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2962
3087
|
const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
|
|
2963
3088
|
return ret;
|
|
2964
3089
|
}, arguments); }
|
|
@@ -2985,19 +3110,19 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
|
|
|
2985
3110
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2986
3111
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2987
3112
|
}
|
|
2988
|
-
export function
|
|
2989
|
-
const ret = typeof
|
|
3113
|
+
export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
|
|
3114
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
2990
3115
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2991
3116
|
}
|
|
2992
|
-
export function
|
|
2993
|
-
const ret = typeof
|
|
3117
|
+
export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
|
|
3118
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2994
3119
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2995
3120
|
}
|
|
2996
|
-
export function
|
|
3121
|
+
export function __wbg_static_accessor_SELF_146583524fe1469b() {
|
|
2997
3122
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2998
3123
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2999
3124
|
}
|
|
3000
|
-
export function
|
|
3125
|
+
export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
|
|
3001
3126
|
const ret = typeof window === 'undefined' ? null : window;
|
|
3002
3127
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3003
3128
|
}
|
|
@@ -3005,11 +3130,11 @@ export function __wbg_stats_new(arg0) {
|
|
|
3005
3130
|
const ret = Stats.__wrap(arg0);
|
|
3006
3131
|
return ret;
|
|
3007
3132
|
}
|
|
3008
|
-
export function
|
|
3133
|
+
export function __wbg_subarray_3ed232c8a6baee09(arg0, arg1, arg2) {
|
|
3009
3134
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3010
3135
|
return ret;
|
|
3011
3136
|
}
|
|
3012
|
-
export function
|
|
3137
|
+
export function __wbg_subtle_ed1dfcaede24af07(arg0) {
|
|
3013
3138
|
const ret = arg0.subtle;
|
|
3014
3139
|
return ret;
|
|
3015
3140
|
}
|
|
@@ -3017,11 +3142,11 @@ export function __wbg_summary_new(arg0) {
|
|
|
3017
3142
|
const ret = Summary.__wrap(arg0);
|
|
3018
3143
|
return ret;
|
|
3019
3144
|
}
|
|
3020
|
-
export function
|
|
3145
|
+
export function __wbg_then_16d107c451e9905d(arg0, arg1, arg2) {
|
|
3021
3146
|
const ret = arg0.then(arg1, arg2);
|
|
3022
3147
|
return ret;
|
|
3023
3148
|
}
|
|
3024
|
-
export function
|
|
3149
|
+
export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
|
|
3025
3150
|
const ret = arg0.then(arg1);
|
|
3026
3151
|
return ret;
|
|
3027
3152
|
}
|
|
@@ -3052,8 +3177,8 @@ export function __wbg_warn_9d7408e9659996aa(arg0, arg1, arg2, arg3, arg4, arg5,
|
|
|
3052
3177
|
}
|
|
3053
3178
|
}
|
|
3054
3179
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
3055
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3056
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3180
|
+
// 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`.
|
|
3181
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a);
|
|
3057
3182
|
return ret;
|
|
3058
3183
|
}
|
|
3059
3184
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
@@ -3131,23 +3256,20 @@ export function __wbindgen_init_externref_table() {
|
|
|
3131
3256
|
table.set(offset + 2, true);
|
|
3132
3257
|
table.set(offset + 3, false);
|
|
3133
3258
|
}
|
|
3134
|
-
function
|
|
3135
|
-
const ret = wasm.
|
|
3259
|
+
function wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2) {
|
|
3260
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h9887d5ab72723f8a(arg0, arg1, arg2);
|
|
3136
3261
|
if (ret[1]) {
|
|
3137
3262
|
throw takeFromExternrefTable0(ret[0]);
|
|
3138
3263
|
}
|
|
3139
3264
|
}
|
|
3140
3265
|
|
|
3141
|
-
function
|
|
3142
|
-
wasm.
|
|
3266
|
+
function wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3) {
|
|
3267
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h58982df154245cbc(arg0, arg1, arg2, arg3);
|
|
3143
3268
|
}
|
|
3144
3269
|
|
|
3145
3270
|
const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3146
3271
|
? { register: () => {}, unregister: () => {} }
|
|
3147
3272
|
: new FinalizationRegistry(ptr => wasm.__wbg_access_free(ptr, 1));
|
|
3148
|
-
const AddMemberUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3149
|
-
? { register: () => {}, unregister: () => {} }
|
|
3150
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_addmemberupdate_free(ptr, 1));
|
|
3151
3273
|
const AgentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3152
3274
|
? { register: () => {}, unregister: () => {} }
|
|
3153
3275
|
: new FinalizationRegistry(ptr => wasm.__wbg_agent_free(ptr, 1));
|
|
@@ -3178,6 +3300,9 @@ const CiphertextStoreFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
3178
3300
|
const ContactCardFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3179
3301
|
? { register: () => {}, unregister: () => {} }
|
|
3180
3302
|
: new FinalizationRegistry(ptr => wasm.__wbg_contactcard_free(ptr, 1));
|
|
3303
|
+
const DecryptedKeyedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3304
|
+
? { register: () => {}, unregister: () => {} }
|
|
3305
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decryptedkeyed_free(ptr, 1));
|
|
3181
3306
|
const DelegationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3182
3307
|
? { register: () => {}, unregister: () => {} }
|
|
3183
3308
|
: new FinalizationRegistry(ptr => wasm.__wbg_delegation_free(ptr, 1));
|
|
@@ -3196,6 +3321,9 @@ const EncryptedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
3196
3321
|
const EncryptedContentWithUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3197
3322
|
? { register: () => {}, unregister: () => {} }
|
|
3198
3323
|
: new FinalizationRegistry(ptr => wasm.__wbg_encryptedcontentwithupdate_free(ptr, 1));
|
|
3324
|
+
const EncryptedKeyedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3325
|
+
? { register: () => {}, unregister: () => {} }
|
|
3326
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_encryptedkeyed_free(ptr, 1));
|
|
3199
3327
|
const EventFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3200
3328
|
? { register: () => {}, unregister: () => {} }
|
|
3201
3329
|
: new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr, 1));
|