@keyhive/keyhive 0.0.0-alpha.4 → 0.0.0-alpha.40
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/README.md +1 -6
- package/package.json +7 -4
- package/pkg/README.md +1 -6
- package/pkg/keyhive_wasm.d.ts +51 -96
- package/pkg/keyhive_wasm_bg.js +561 -690
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +146 -147
- package/pkg/package.json +1 -1
- package/pkg-node/README.md +1 -6
- package/pkg-node/keyhive_wasm.d.ts +51 -96
- package/pkg-node/keyhive_wasm.js +564 -717
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +146 -147
- package/pkg-node/package.json +1 -1
- package/pkg-slim/README.md +1 -6
- package/pkg-slim/keyhive_wasm.d.ts +197 -243
- package/pkg-slim/keyhive_wasm.js +525 -670
- 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 +146 -147
- package/pkg-slim/package.json +1 -1
package/pkg-slim/keyhive_wasm.js
CHANGED
|
@@ -117,6 +117,12 @@ function isLikeNone(x) {
|
|
|
117
117
|
return x === undefined || x === null;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
function _assertClass(instance, klass) {
|
|
121
|
+
if (!(instance instanceof klass)) {
|
|
122
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
120
126
|
function debugString(val) {
|
|
121
127
|
// primitive types
|
|
122
128
|
const type = typeof val;
|
|
@@ -182,11 +188,22 @@ function debugString(val) {
|
|
|
182
188
|
return className;
|
|
183
189
|
}
|
|
184
190
|
|
|
191
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
192
|
+
ptr = ptr >>> 0;
|
|
193
|
+
const mem = getDataViewMemory0();
|
|
194
|
+
const result = [];
|
|
195
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
196
|
+
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
197
|
+
}
|
|
198
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
199
|
+
return result;
|
|
200
|
+
}
|
|
201
|
+
|
|
185
202
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
186
203
|
? { register: () => {}, unregister: () => {} }
|
|
187
204
|
: new FinalizationRegistry(
|
|
188
205
|
state => {
|
|
189
|
-
wasm.
|
|
206
|
+
wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
|
|
190
207
|
}
|
|
191
208
|
);
|
|
192
209
|
|
|
@@ -204,7 +221,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
204
221
|
return f(a, state.b, ...args);
|
|
205
222
|
} finally {
|
|
206
223
|
if (--state.cnt === 0) {
|
|
207
|
-
wasm.
|
|
224
|
+
wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
|
|
208
225
|
CLOSURE_DTORS.unregister(state);
|
|
209
226
|
} else {
|
|
210
227
|
state.a = a;
|
|
@@ -216,17 +233,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
216
233
|
return real;
|
|
217
234
|
}
|
|
218
235
|
|
|
219
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
220
|
-
ptr = ptr >>> 0;
|
|
221
|
-
const mem = getDataViewMemory0();
|
|
222
|
-
const result = [];
|
|
223
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
224
|
-
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
225
|
-
}
|
|
226
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
227
|
-
return result;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
236
|
function passArray8ToWasm0(arg, malloc) {
|
|
231
237
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
232
238
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -240,12 +246,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
240
246
|
return value;
|
|
241
247
|
}
|
|
242
248
|
|
|
243
|
-
function _assertClass(instance, klass) {
|
|
244
|
-
if (!(instance instanceof klass)) {
|
|
245
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
249
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
250
250
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
251
251
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -265,12 +265,12 @@ export function setPanicHook() {
|
|
|
265
265
|
wasm.setPanicHook();
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
function
|
|
269
|
-
wasm.
|
|
268
|
+
function __wbg_adapter_8(arg0, arg1, arg2) {
|
|
269
|
+
wasm.closure425_externref_shim(arg0, arg1, arg2);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
function
|
|
273
|
-
wasm.
|
|
272
|
+
function __wbg_adapter_315(arg0, arg1, arg2, arg3) {
|
|
273
|
+
wasm.closure582_externref_shim(arg0, arg1, arg2, arg3);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
const AccessFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -326,49 +326,6 @@ export class Access {
|
|
|
326
326
|
}
|
|
327
327
|
if (Symbol.dispose) Access.prototype[Symbol.dispose] = Access.prototype.free;
|
|
328
328
|
|
|
329
|
-
const AddMemberErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
330
|
-
? { register: () => {}, unregister: () => {} }
|
|
331
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_addmembererror_free(ptr >>> 0, 1));
|
|
332
|
-
|
|
333
|
-
export class AddMemberError {
|
|
334
|
-
|
|
335
|
-
static __wrap(ptr) {
|
|
336
|
-
ptr = ptr >>> 0;
|
|
337
|
-
const obj = Object.create(AddMemberError.prototype);
|
|
338
|
-
obj.__wbg_ptr = ptr;
|
|
339
|
-
AddMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
340
|
-
return obj;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
__destroy_into_raw() {
|
|
344
|
-
const ptr = this.__wbg_ptr;
|
|
345
|
-
this.__wbg_ptr = 0;
|
|
346
|
-
AddMemberErrorFinalization.unregister(this);
|
|
347
|
-
return ptr;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
free() {
|
|
351
|
-
const ptr = this.__destroy_into_raw();
|
|
352
|
-
wasm.__wbg_addmembererror_free(ptr, 0);
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* @returns {string}
|
|
356
|
-
*/
|
|
357
|
-
message() {
|
|
358
|
-
let deferred1_0;
|
|
359
|
-
let deferred1_1;
|
|
360
|
-
try {
|
|
361
|
-
const ret = wasm.addmembererror_message(this.__wbg_ptr);
|
|
362
|
-
deferred1_0 = ret[0];
|
|
363
|
-
deferred1_1 = ret[1];
|
|
364
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
365
|
-
} finally {
|
|
366
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
if (Symbol.dispose) AddMemberError.prototype[Symbol.dispose] = AddMemberError.prototype.free;
|
|
371
|
-
|
|
372
329
|
const AgentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
373
330
|
? { register: () => {}, unregister: () => {} }
|
|
374
331
|
: new FinalizationRegistry(ptr => wasm.__wbg_agent_free(ptr >>> 0, 1));
|
|
@@ -495,17 +452,14 @@ export class Archive {
|
|
|
495
452
|
* @param {CiphertextStore} ciphertext_store
|
|
496
453
|
* @param {Signer} signer
|
|
497
454
|
* @param {Function} event_handler
|
|
498
|
-
* @returns {Keyhive}
|
|
455
|
+
* @returns {Promise<Keyhive>}
|
|
499
456
|
*/
|
|
500
457
|
tryToKeyhive(ciphertext_store, signer, event_handler) {
|
|
501
458
|
_assertClass(ciphertext_store, CiphertextStore);
|
|
502
459
|
var ptr0 = ciphertext_store.__destroy_into_raw();
|
|
503
460
|
_assertClass(signer, Signer);
|
|
504
461
|
const ret = wasm.archive_tryToKeyhive(this.__wbg_ptr, ptr0, signer.__wbg_ptr, event_handler);
|
|
505
|
-
|
|
506
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
507
|
-
}
|
|
508
|
-
return Keyhive.__wrap(ret[0]);
|
|
462
|
+
return ret;
|
|
509
463
|
}
|
|
510
464
|
}
|
|
511
465
|
if (Symbol.dispose) Archive.prototype[Symbol.dispose] = Archive.prototype.free;
|
|
@@ -658,22 +612,22 @@ export class CgkaOperation {
|
|
|
658
612
|
}
|
|
659
613
|
if (Symbol.dispose) CgkaOperation.prototype[Symbol.dispose] = CgkaOperation.prototype.free;
|
|
660
614
|
|
|
661
|
-
const
|
|
615
|
+
const ChangeIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
662
616
|
? { register: () => {}, unregister: () => {} }
|
|
663
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
617
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_changeid_free(ptr >>> 0, 1));
|
|
664
618
|
|
|
665
|
-
export class
|
|
619
|
+
export class ChangeId {
|
|
666
620
|
|
|
667
621
|
static __wrap(ptr) {
|
|
668
622
|
ptr = ptr >>> 0;
|
|
669
|
-
const obj = Object.create(
|
|
623
|
+
const obj = Object.create(ChangeId.prototype);
|
|
670
624
|
obj.__wbg_ptr = ptr;
|
|
671
|
-
|
|
625
|
+
ChangeIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
672
626
|
return obj;
|
|
673
627
|
}
|
|
674
628
|
|
|
675
629
|
static __unwrap(jsValue) {
|
|
676
|
-
if (!(jsValue instanceof
|
|
630
|
+
if (!(jsValue instanceof ChangeId)) {
|
|
677
631
|
return 0;
|
|
678
632
|
}
|
|
679
633
|
return jsValue.__destroy_into_raw();
|
|
@@ -682,13 +636,13 @@ export class ChangeRef {
|
|
|
682
636
|
__destroy_into_raw() {
|
|
683
637
|
const ptr = this.__wbg_ptr;
|
|
684
638
|
this.__wbg_ptr = 0;
|
|
685
|
-
|
|
639
|
+
ChangeIdFinalization.unregister(this);
|
|
686
640
|
return ptr;
|
|
687
641
|
}
|
|
688
642
|
|
|
689
643
|
free() {
|
|
690
644
|
const ptr = this.__destroy_into_raw();
|
|
691
|
-
wasm.
|
|
645
|
+
wasm.__wbg_changeid_free(ptr, 0);
|
|
692
646
|
}
|
|
693
647
|
/**
|
|
694
648
|
* @param {Uint8Array} bytes
|
|
@@ -696,22 +650,29 @@ export class ChangeRef {
|
|
|
696
650
|
constructor(bytes) {
|
|
697
651
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
698
652
|
const len0 = WASM_VECTOR_LEN;
|
|
699
|
-
const ret = wasm.
|
|
653
|
+
const ret = wasm.changeid_new(ptr0, len0);
|
|
700
654
|
this.__wbg_ptr = ret >>> 0;
|
|
701
|
-
|
|
655
|
+
ChangeIdFinalization.register(this, this.__wbg_ptr, this);
|
|
702
656
|
return this;
|
|
703
657
|
}
|
|
704
658
|
/**
|
|
705
659
|
* @returns {Uint8Array}
|
|
706
660
|
*/
|
|
707
661
|
get bytes() {
|
|
708
|
-
const ret = wasm.
|
|
662
|
+
const ret = wasm.changeid_bytes(this.__wbg_ptr);
|
|
709
663
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
710
664
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
711
665
|
return v1;
|
|
712
666
|
}
|
|
667
|
+
/**
|
|
668
|
+
* @returns {ChangeId}
|
|
669
|
+
*/
|
|
670
|
+
__wasm_refgen_toChangeId() {
|
|
671
|
+
const ret = wasm.changeid___wasm_refgen_toChangeId(this.__wbg_ptr);
|
|
672
|
+
return ChangeId.__wrap(ret);
|
|
673
|
+
}
|
|
713
674
|
}
|
|
714
|
-
if (Symbol.dispose)
|
|
675
|
+
if (Symbol.dispose) ChangeId.prototype[Symbol.dispose] = ChangeId.prototype.free;
|
|
715
676
|
|
|
716
677
|
const CiphertextStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
717
678
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -804,6 +765,13 @@ export class ContactCard {
|
|
|
804
765
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
805
766
|
return v1;
|
|
806
767
|
}
|
|
768
|
+
/**
|
|
769
|
+
* @returns {Agent}
|
|
770
|
+
*/
|
|
771
|
+
toAgent() {
|
|
772
|
+
const ret = wasm.contactcard_toAgent(this.__wbg_ptr);
|
|
773
|
+
return Agent.__wrap(ret);
|
|
774
|
+
}
|
|
807
775
|
/**
|
|
808
776
|
* @param {string} json
|
|
809
777
|
* @returns {ContactCard}
|
|
@@ -897,26 +865,6 @@ export class Delegation {
|
|
|
897
865
|
}
|
|
898
866
|
if (Symbol.dispose) Delegation.prototype[Symbol.dispose] = Delegation.prototype.free;
|
|
899
867
|
|
|
900
|
-
const DelegationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
901
|
-
? { register: () => {}, unregister: () => {} }
|
|
902
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_delegationerror_free(ptr >>> 0, 1));
|
|
903
|
-
|
|
904
|
-
export class DelegationError {
|
|
905
|
-
|
|
906
|
-
__destroy_into_raw() {
|
|
907
|
-
const ptr = this.__wbg_ptr;
|
|
908
|
-
this.__wbg_ptr = 0;
|
|
909
|
-
DelegationErrorFinalization.unregister(this);
|
|
910
|
-
return ptr;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
free() {
|
|
914
|
-
const ptr = this.__destroy_into_raw();
|
|
915
|
-
wasm.__wbg_delegationerror_free(ptr, 0);
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
if (Symbol.dispose) DelegationError.prototype[Symbol.dispose] = DelegationError.prototype.free;
|
|
919
|
-
|
|
920
868
|
const DocContentRefsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
921
869
|
? { register: () => {}, unregister: () => {} }
|
|
922
870
|
: new FinalizationRegistry(ptr => wasm.__wbg_doccontentrefs_free(ptr >>> 0, 1));
|
|
@@ -944,7 +892,7 @@ export class DocContentRefs {
|
|
|
944
892
|
}
|
|
945
893
|
/**
|
|
946
894
|
* @param {DocumentId} doc_id
|
|
947
|
-
* @param {
|
|
895
|
+
* @param {ChangeId[]} change_hashes
|
|
948
896
|
*/
|
|
949
897
|
constructor(doc_id, change_hashes) {
|
|
950
898
|
_assertClass(doc_id, DocumentId);
|
|
@@ -960,12 +908,14 @@ export class DocContentRefs {
|
|
|
960
908
|
return this;
|
|
961
909
|
}
|
|
962
910
|
/**
|
|
963
|
-
* @param {
|
|
911
|
+
* @param {ChangeId} hash
|
|
912
|
+
* @returns {Promise<void>}
|
|
964
913
|
*/
|
|
965
|
-
|
|
966
|
-
_assertClass(hash,
|
|
914
|
+
addChangeId(hash) {
|
|
915
|
+
_assertClass(hash, ChangeId);
|
|
967
916
|
var ptr0 = hash.__destroy_into_raw();
|
|
968
|
-
wasm.
|
|
917
|
+
const ret = wasm.doccontentrefs_addChangeId(this.__wbg_ptr, ptr0);
|
|
918
|
+
return ret;
|
|
969
919
|
}
|
|
970
920
|
/**
|
|
971
921
|
* @returns {DocumentId}
|
|
@@ -975,13 +925,11 @@ export class DocContentRefs {
|
|
|
975
925
|
return DocumentId.__wrap(ret);
|
|
976
926
|
}
|
|
977
927
|
/**
|
|
978
|
-
* @returns {
|
|
928
|
+
* @returns {Promise<ChangeId[]>}
|
|
979
929
|
*/
|
|
980
930
|
get change_hashes() {
|
|
981
931
|
const ret = wasm.doccontentrefs_change_hashes(this.__wbg_ptr);
|
|
982
|
-
|
|
983
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
984
|
-
return v1;
|
|
932
|
+
return ret;
|
|
985
933
|
}
|
|
986
934
|
}
|
|
987
935
|
if (Symbol.dispose) DocContentRefs.prototype[Symbol.dispose] = DocContentRefs.prototype.free;
|
|
@@ -1000,13 +948,6 @@ export class Document {
|
|
|
1000
948
|
return obj;
|
|
1001
949
|
}
|
|
1002
950
|
|
|
1003
|
-
static __unwrap(jsValue) {
|
|
1004
|
-
if (!(jsValue instanceof Document)) {
|
|
1005
|
-
return 0;
|
|
1006
|
-
}
|
|
1007
|
-
return jsValue.__destroy_into_raw();
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
951
|
__destroy_into_raw() {
|
|
1011
952
|
const ptr = this.__wbg_ptr;
|
|
1012
953
|
this.__wbg_ptr = 0;
|
|
@@ -1022,7 +963,7 @@ export class Document {
|
|
|
1022
963
|
* @returns {Identifier}
|
|
1023
964
|
*/
|
|
1024
965
|
get id() {
|
|
1025
|
-
const ret = wasm.
|
|
966
|
+
const ret = wasm.document_doc_id(this.__wbg_ptr);
|
|
1026
967
|
return Identifier.__wrap(ret);
|
|
1027
968
|
}
|
|
1028
969
|
/**
|
|
@@ -1046,6 +987,20 @@ export class Document {
|
|
|
1046
987
|
const ret = wasm.document_toAgent(this.__wbg_ptr);
|
|
1047
988
|
return Agent.__wrap(ret);
|
|
1048
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* @returns {Membered}
|
|
992
|
+
*/
|
|
993
|
+
toMembered() {
|
|
994
|
+
const ret = wasm.document_toMembered(this.__wbg_ptr);
|
|
995
|
+
return Membered.__wrap(ret);
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* @returns {Document}
|
|
999
|
+
*/
|
|
1000
|
+
__wasm_refgen_toDocument() {
|
|
1001
|
+
const ret = wasm.document___wasm_refgen_toDocument(this.__wbg_ptr);
|
|
1002
|
+
return Document.__wrap(ret);
|
|
1003
|
+
}
|
|
1049
1004
|
}
|
|
1050
1005
|
if (Symbol.dispose) Document.prototype[Symbol.dispose] = Document.prototype.free;
|
|
1051
1006
|
|
|
@@ -1091,11 +1046,11 @@ export class DocumentId {
|
|
|
1091
1046
|
/**
|
|
1092
1047
|
* @returns {string}
|
|
1093
1048
|
*/
|
|
1094
|
-
|
|
1049
|
+
toString() {
|
|
1095
1050
|
let deferred1_0;
|
|
1096
1051
|
let deferred1_1;
|
|
1097
1052
|
try {
|
|
1098
|
-
const ret = wasm.
|
|
1053
|
+
const ret = wasm.documentid_toString(this.__wbg_ptr);
|
|
1099
1054
|
deferred1_0 = ret[0];
|
|
1100
1055
|
deferred1_1 = ret[1];
|
|
1101
1056
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1314,51 +1269,22 @@ export class Event {
|
|
|
1314
1269
|
const ret = wasm.event_tryIntoSignedRevocation(this.__wbg_ptr);
|
|
1315
1270
|
return ret === 0 ? undefined : SignedRevocation.__wrap(ret);
|
|
1316
1271
|
}
|
|
1317
|
-
}
|
|
1318
|
-
if (Symbol.dispose) Event.prototype[Symbol.dispose] = Event.prototype.free;
|
|
1319
|
-
|
|
1320
|
-
const GenerateDocErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1321
|
-
? { register: () => {}, unregister: () => {} }
|
|
1322
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_generatedocerror_free(ptr >>> 0, 1));
|
|
1323
|
-
|
|
1324
|
-
export class GenerateDocError {
|
|
1325
|
-
|
|
1326
|
-
static __wrap(ptr) {
|
|
1327
|
-
ptr = ptr >>> 0;
|
|
1328
|
-
const obj = Object.create(GenerateDocError.prototype);
|
|
1329
|
-
obj.__wbg_ptr = ptr;
|
|
1330
|
-
GenerateDocErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1331
|
-
return obj;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
__destroy_into_raw() {
|
|
1335
|
-
const ptr = this.__wbg_ptr;
|
|
1336
|
-
this.__wbg_ptr = 0;
|
|
1337
|
-
GenerateDocErrorFinalization.unregister(this);
|
|
1338
|
-
return ptr;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
free() {
|
|
1342
|
-
const ptr = this.__destroy_into_raw();
|
|
1343
|
-
wasm.__wbg_generatedocerror_free(ptr, 0);
|
|
1344
|
-
}
|
|
1345
1272
|
/**
|
|
1346
|
-
*
|
|
1273
|
+
* Converts the underlying [`Event`] to a [`StaticEvent`] and then
|
|
1274
|
+
* serializes it.
|
|
1275
|
+
* @returns {Uint8Array}
|
|
1347
1276
|
*/
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
const ret = wasm.generatedocerror_message(this.__wbg_ptr);
|
|
1353
|
-
deferred1_0 = ret[0];
|
|
1354
|
-
deferred1_1 = ret[1];
|
|
1355
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1356
|
-
} finally {
|
|
1357
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1277
|
+
toBytes() {
|
|
1278
|
+
const ret = wasm.event_toBytes(this.__wbg_ptr);
|
|
1279
|
+
if (ret[3]) {
|
|
1280
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1358
1281
|
}
|
|
1282
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1283
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1284
|
+
return v1;
|
|
1359
1285
|
}
|
|
1360
1286
|
}
|
|
1361
|
-
if (Symbol.dispose)
|
|
1287
|
+
if (Symbol.dispose) Event.prototype[Symbol.dispose] = Event.prototype.free;
|
|
1362
1288
|
|
|
1363
1289
|
const GenerateWebCryptoErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1364
1290
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1403,41 +1329,6 @@ export class GenerateWebCryptoError {
|
|
|
1403
1329
|
}
|
|
1404
1330
|
if (Symbol.dispose) GenerateWebCryptoError.prototype[Symbol.dispose] = GenerateWebCryptoError.prototype.free;
|
|
1405
1331
|
|
|
1406
|
-
const GetCiphertextErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1407
|
-
? { register: () => {}, unregister: () => {} }
|
|
1408
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_getciphertexterror_free(ptr >>> 0, 1));
|
|
1409
|
-
|
|
1410
|
-
export class GetCiphertextError {
|
|
1411
|
-
|
|
1412
|
-
__destroy_into_raw() {
|
|
1413
|
-
const ptr = this.__wbg_ptr;
|
|
1414
|
-
this.__wbg_ptr = 0;
|
|
1415
|
-
GetCiphertextErrorFinalization.unregister(this);
|
|
1416
|
-
return ptr;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
free() {
|
|
1420
|
-
const ptr = this.__destroy_into_raw();
|
|
1421
|
-
wasm.__wbg_getciphertexterror_free(ptr, 0);
|
|
1422
|
-
}
|
|
1423
|
-
/**
|
|
1424
|
-
* @returns {string}
|
|
1425
|
-
*/
|
|
1426
|
-
get message() {
|
|
1427
|
-
let deferred1_0;
|
|
1428
|
-
let deferred1_1;
|
|
1429
|
-
try {
|
|
1430
|
-
const ret = wasm.getciphertexterror_message(this.__wbg_ptr);
|
|
1431
|
-
deferred1_0 = ret[0];
|
|
1432
|
-
deferred1_1 = ret[1];
|
|
1433
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1434
|
-
} finally {
|
|
1435
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
if (Symbol.dispose) GetCiphertextError.prototype[Symbol.dispose] = GetCiphertextError.prototype.free;
|
|
1440
|
-
|
|
1441
1332
|
const GroupFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1442
1333
|
? { register: () => {}, unregister: () => {} }
|
|
1443
1334
|
: new FinalizationRegistry(ptr => wasm.__wbg_group_free(ptr >>> 0, 1));
|
|
@@ -1467,7 +1358,7 @@ export class Group {
|
|
|
1467
1358
|
* @returns {Identifier}
|
|
1468
1359
|
*/
|
|
1469
1360
|
get id() {
|
|
1470
|
-
const ret = wasm.
|
|
1361
|
+
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1471
1362
|
return Identifier.__wrap(ret);
|
|
1472
1363
|
}
|
|
1473
1364
|
/**
|
|
@@ -1478,13 +1369,11 @@ export class Group {
|
|
|
1478
1369
|
return GroupId.__wrap(ret);
|
|
1479
1370
|
}
|
|
1480
1371
|
/**
|
|
1481
|
-
* @returns {Capability[]}
|
|
1372
|
+
* @returns {Promise<Capability[]>}
|
|
1482
1373
|
*/
|
|
1483
|
-
|
|
1374
|
+
members() {
|
|
1484
1375
|
const ret = wasm.group_members(this.__wbg_ptr);
|
|
1485
|
-
|
|
1486
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1487
|
-
return v1;
|
|
1376
|
+
return ret;
|
|
1488
1377
|
}
|
|
1489
1378
|
/**
|
|
1490
1379
|
* @returns {Peer}
|
|
@@ -1507,6 +1396,13 @@ export class Group {
|
|
|
1507
1396
|
const ret = wasm.group_toMembered(this.__wbg_ptr);
|
|
1508
1397
|
return Membered.__wrap(ret);
|
|
1509
1398
|
}
|
|
1399
|
+
/**
|
|
1400
|
+
* @returns {Group}
|
|
1401
|
+
*/
|
|
1402
|
+
__wasm_refgen_toGroup() {
|
|
1403
|
+
const ret = wasm.group___wasm_refgen_toGroup(this.__wbg_ptr);
|
|
1404
|
+
return Group.__wrap(ret);
|
|
1405
|
+
}
|
|
1510
1406
|
}
|
|
1511
1407
|
if (Symbol.dispose) Group.prototype[Symbol.dispose] = Group.prototype.free;
|
|
1512
1408
|
|
|
@@ -1709,18 +1605,18 @@ export class Individual {
|
|
|
1709
1605
|
* @returns {IndividualId}
|
|
1710
1606
|
*/
|
|
1711
1607
|
get individualId() {
|
|
1712
|
-
const ret = wasm.
|
|
1608
|
+
const ret = wasm.individual_id(this.__wbg_ptr);
|
|
1713
1609
|
return IndividualId.__wrap(ret);
|
|
1714
1610
|
}
|
|
1715
1611
|
/**
|
|
1716
1612
|
* @param {DocumentId} doc_id
|
|
1717
|
-
* @returns {ShareKey}
|
|
1613
|
+
* @returns {Promise<ShareKey>}
|
|
1718
1614
|
*/
|
|
1719
1615
|
pickPrekey(doc_id) {
|
|
1720
1616
|
_assertClass(doc_id, DocumentId);
|
|
1721
1617
|
var ptr0 = doc_id.__destroy_into_raw();
|
|
1722
1618
|
const ret = wasm.individual_pickPrekey(this.__wbg_ptr, ptr0);
|
|
1723
|
-
return
|
|
1619
|
+
return ret;
|
|
1724
1620
|
}
|
|
1725
1621
|
}
|
|
1726
1622
|
if (Symbol.dispose) Individual.prototype[Symbol.dispose] = Individual.prototype.free;
|
|
@@ -1782,170 +1678,64 @@ export class Invocation {
|
|
|
1782
1678
|
}
|
|
1783
1679
|
if (Symbol.dispose) Invocation.prototype[Symbol.dispose] = Invocation.prototype.free;
|
|
1784
1680
|
|
|
1785
|
-
const
|
|
1681
|
+
const KeyhiveFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1786
1682
|
? { register: () => {}, unregister: () => {} }
|
|
1787
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1683
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keyhive_free(ptr >>> 0, 1));
|
|
1788
1684
|
|
|
1789
|
-
export class
|
|
1685
|
+
export class Keyhive {
|
|
1790
1686
|
|
|
1791
1687
|
static __wrap(ptr) {
|
|
1792
1688
|
ptr = ptr >>> 0;
|
|
1793
|
-
const obj = Object.create(
|
|
1689
|
+
const obj = Object.create(Keyhive.prototype);
|
|
1794
1690
|
obj.__wbg_ptr = ptr;
|
|
1795
|
-
|
|
1691
|
+
KeyhiveFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1796
1692
|
return obj;
|
|
1797
1693
|
}
|
|
1798
1694
|
|
|
1799
1695
|
__destroy_into_raw() {
|
|
1800
1696
|
const ptr = this.__wbg_ptr;
|
|
1801
1697
|
this.__wbg_ptr = 0;
|
|
1802
|
-
|
|
1698
|
+
KeyhiveFinalization.unregister(this);
|
|
1803
1699
|
return ptr;
|
|
1804
1700
|
}
|
|
1805
1701
|
|
|
1806
1702
|
free() {
|
|
1807
1703
|
const ptr = this.__destroy_into_raw();
|
|
1808
|
-
wasm.
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
if (Symbol.dispose) JsDecryptError.prototype[Symbol.dispose] = JsDecryptError.prototype.free;
|
|
1812
|
-
|
|
1813
|
-
const JsEncryptErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1814
|
-
? { register: () => {}, unregister: () => {} }
|
|
1815
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jsencrypterror_free(ptr >>> 0, 1));
|
|
1816
|
-
|
|
1817
|
-
export class JsEncryptError {
|
|
1818
|
-
|
|
1819
|
-
static __wrap(ptr) {
|
|
1820
|
-
ptr = ptr >>> 0;
|
|
1821
|
-
const obj = Object.create(JsEncryptError.prototype);
|
|
1822
|
-
obj.__wbg_ptr = ptr;
|
|
1823
|
-
JsEncryptErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1824
|
-
return obj;
|
|
1704
|
+
wasm.__wbg_keyhive_free(ptr, 0);
|
|
1825
1705
|
}
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1706
|
+
/**
|
|
1707
|
+
* @param {Signer} signer
|
|
1708
|
+
* @param {CiphertextStore} ciphertext_store
|
|
1709
|
+
* @param {Function} event_handler
|
|
1710
|
+
* @returns {Promise<Keyhive>}
|
|
1711
|
+
*/
|
|
1712
|
+
static init(signer, ciphertext_store, event_handler) {
|
|
1713
|
+
_assertClass(signer, Signer);
|
|
1714
|
+
_assertClass(ciphertext_store, CiphertextStore);
|
|
1715
|
+
const ret = wasm.keyhive_init(signer.__wbg_ptr, ciphertext_store.__wbg_ptr, event_handler);
|
|
1716
|
+
return ret;
|
|
1832
1717
|
}
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1718
|
+
/**
|
|
1719
|
+
* @returns {IndividualId}
|
|
1720
|
+
*/
|
|
1721
|
+
get id() {
|
|
1722
|
+
const ret = wasm.keyhive_id(this.__wbg_ptr);
|
|
1723
|
+
return IndividualId.__wrap(ret);
|
|
1837
1724
|
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
export class JsReceivePreKeyOpError {
|
|
1846
|
-
|
|
1847
|
-
static __wrap(ptr) {
|
|
1848
|
-
ptr = ptr >>> 0;
|
|
1849
|
-
const obj = Object.create(JsReceivePreKeyOpError.prototype);
|
|
1850
|
-
obj.__wbg_ptr = ptr;
|
|
1851
|
-
JsReceivePreKeyOpErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1852
|
-
return obj;
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
__destroy_into_raw() {
|
|
1856
|
-
const ptr = this.__wbg_ptr;
|
|
1857
|
-
this.__wbg_ptr = 0;
|
|
1858
|
-
JsReceivePreKeyOpErrorFinalization.unregister(this);
|
|
1859
|
-
return ptr;
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
free() {
|
|
1863
|
-
const ptr = this.__destroy_into_raw();
|
|
1864
|
-
wasm.__wbg_jsreceiveprekeyoperror_free(ptr, 0);
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
if (Symbol.dispose) JsReceivePreKeyOpError.prototype[Symbol.dispose] = JsReceivePreKeyOpError.prototype.free;
|
|
1868
|
-
|
|
1869
|
-
const JsReceiveStaticEventErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1870
|
-
? { register: () => {}, unregister: () => {} }
|
|
1871
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jsreceivestaticeventerror_free(ptr >>> 0, 1));
|
|
1872
|
-
|
|
1873
|
-
export class JsReceiveStaticEventError {
|
|
1874
|
-
|
|
1875
|
-
static __wrap(ptr) {
|
|
1876
|
-
ptr = ptr >>> 0;
|
|
1877
|
-
const obj = Object.create(JsReceiveStaticEventError.prototype);
|
|
1878
|
-
obj.__wbg_ptr = ptr;
|
|
1879
|
-
JsReceiveStaticEventErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1880
|
-
return obj;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
__destroy_into_raw() {
|
|
1884
|
-
const ptr = this.__wbg_ptr;
|
|
1885
|
-
this.__wbg_ptr = 0;
|
|
1886
|
-
JsReceiveStaticEventErrorFinalization.unregister(this);
|
|
1887
|
-
return ptr;
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
free() {
|
|
1891
|
-
const ptr = this.__destroy_into_raw();
|
|
1892
|
-
wasm.__wbg_jsreceivestaticeventerror_free(ptr, 0);
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
if (Symbol.dispose) JsReceiveStaticEventError.prototype[Symbol.dispose] = JsReceiveStaticEventError.prototype.free;
|
|
1896
|
-
|
|
1897
|
-
const KeyhiveFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1898
|
-
? { register: () => {}, unregister: () => {} }
|
|
1899
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_keyhive_free(ptr >>> 0, 1));
|
|
1900
|
-
|
|
1901
|
-
export class Keyhive {
|
|
1902
|
-
|
|
1903
|
-
static __wrap(ptr) {
|
|
1904
|
-
ptr = ptr >>> 0;
|
|
1905
|
-
const obj = Object.create(Keyhive.prototype);
|
|
1906
|
-
obj.__wbg_ptr = ptr;
|
|
1907
|
-
KeyhiveFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1908
|
-
return obj;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
__destroy_into_raw() {
|
|
1912
|
-
const ptr = this.__wbg_ptr;
|
|
1913
|
-
this.__wbg_ptr = 0;
|
|
1914
|
-
KeyhiveFinalization.unregister(this);
|
|
1915
|
-
return ptr;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
free() {
|
|
1919
|
-
const ptr = this.__destroy_into_raw();
|
|
1920
|
-
wasm.__wbg_keyhive_free(ptr, 0);
|
|
1725
|
+
/**
|
|
1726
|
+
* @returns {IndividualId}
|
|
1727
|
+
*/
|
|
1728
|
+
get whoami() {
|
|
1729
|
+
const ret = wasm.keyhive_whoami(this.__wbg_ptr);
|
|
1730
|
+
return IndividualId.__wrap(ret);
|
|
1921
1731
|
}
|
|
1922
1732
|
/**
|
|
1923
|
-
* @
|
|
1924
|
-
* @param {CiphertextStore} ciphertext_store
|
|
1925
|
-
* @param {Function} event_handler
|
|
1926
|
-
* @returns {Promise<Keyhive>}
|
|
1733
|
+
* @returns {Promise<Individual>}
|
|
1927
1734
|
*/
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
_assertClass(ciphertext_store, CiphertextStore);
|
|
1931
|
-
var ptr0 = ciphertext_store.__destroy_into_raw();
|
|
1932
|
-
const ret = wasm.keyhive_init(signer.__wbg_ptr, ptr0, event_handler);
|
|
1735
|
+
get individual() {
|
|
1736
|
+
const ret = wasm.keyhive_individual(this.__wbg_ptr);
|
|
1933
1737
|
return ret;
|
|
1934
1738
|
}
|
|
1935
|
-
/**
|
|
1936
|
-
* @returns {IndividualId}
|
|
1937
|
-
*/
|
|
1938
|
-
get id() {
|
|
1939
|
-
const ret = wasm.keyhive_id(this.__wbg_ptr);
|
|
1940
|
-
return IndividualId.__wrap(ret);
|
|
1941
|
-
}
|
|
1942
|
-
/**
|
|
1943
|
-
* @returns {IndividualId}
|
|
1944
|
-
*/
|
|
1945
|
-
get whoami() {
|
|
1946
|
-
const ret = wasm.keyhive_id(this.__wbg_ptr);
|
|
1947
|
-
return IndividualId.__wrap(ret);
|
|
1948
|
-
}
|
|
1949
1739
|
/**
|
|
1950
1740
|
* @returns {string}
|
|
1951
1741
|
*/
|
|
@@ -1962,25 +1752,25 @@ export class Keyhive {
|
|
|
1962
1752
|
}
|
|
1963
1753
|
}
|
|
1964
1754
|
/**
|
|
1965
|
-
* @param {Peer[]}
|
|
1755
|
+
* @param {Peer[]} js_coparents
|
|
1966
1756
|
* @returns {Promise<Group>}
|
|
1967
1757
|
*/
|
|
1968
|
-
generateGroup(
|
|
1969
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
1758
|
+
generateGroup(js_coparents) {
|
|
1759
|
+
const ptr0 = passArrayJsValueToWasm0(js_coparents, wasm.__wbindgen_malloc);
|
|
1970
1760
|
const len0 = WASM_VECTOR_LEN;
|
|
1971
1761
|
const ret = wasm.keyhive_generateGroup(this.__wbg_ptr, ptr0, len0);
|
|
1972
1762
|
return ret;
|
|
1973
1763
|
}
|
|
1974
1764
|
/**
|
|
1975
1765
|
* @param {Peer[]} coparents
|
|
1976
|
-
* @param {
|
|
1977
|
-
* @param {
|
|
1766
|
+
* @param {ChangeId} initial_content_ref_head
|
|
1767
|
+
* @param {ChangeId[]} more_initial_content_refs
|
|
1978
1768
|
* @returns {Promise<Document>}
|
|
1979
1769
|
*/
|
|
1980
1770
|
generateDocument(coparents, initial_content_ref_head, more_initial_content_refs) {
|
|
1981
1771
|
const ptr0 = passArrayJsValueToWasm0(coparents, wasm.__wbindgen_malloc);
|
|
1982
1772
|
const len0 = WASM_VECTOR_LEN;
|
|
1983
|
-
_assertClass(initial_content_ref_head,
|
|
1773
|
+
_assertClass(initial_content_ref_head, ChangeId);
|
|
1984
1774
|
var ptr1 = initial_content_ref_head.__destroy_into_raw();
|
|
1985
1775
|
const ptr2 = passArrayJsValueToWasm0(more_initial_content_refs, wasm.__wbindgen_malloc);
|
|
1986
1776
|
const len2 = WASM_VECTOR_LEN;
|
|
@@ -1999,17 +1789,17 @@ export class Keyhive {
|
|
|
1999
1789
|
}
|
|
2000
1790
|
/**
|
|
2001
1791
|
* @param {Document} doc
|
|
2002
|
-
* @param {
|
|
2003
|
-
* @param {
|
|
1792
|
+
* @param {ChangeId} content_ref
|
|
1793
|
+
* @param {ChangeId[]} js_pred_refs
|
|
2004
1794
|
* @param {Uint8Array} content
|
|
2005
1795
|
* @returns {Promise<EncryptedContentWithUpdate>}
|
|
2006
1796
|
*/
|
|
2007
|
-
tryEncrypt(doc, content_ref,
|
|
1797
|
+
tryEncrypt(doc, content_ref, js_pred_refs, content) {
|
|
2008
1798
|
_assertClass(doc, Document);
|
|
2009
1799
|
var ptr0 = doc.__destroy_into_raw();
|
|
2010
|
-
_assertClass(content_ref,
|
|
1800
|
+
_assertClass(content_ref, ChangeId);
|
|
2011
1801
|
var ptr1 = content_ref.__destroy_into_raw();
|
|
2012
|
-
const ptr2 = passArrayJsValueToWasm0(
|
|
1802
|
+
const ptr2 = passArrayJsValueToWasm0(js_pred_refs, wasm.__wbindgen_malloc);
|
|
2013
1803
|
const len2 = WASM_VECTOR_LEN;
|
|
2014
1804
|
const ptr3 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
2015
1805
|
const len3 = WASM_VECTOR_LEN;
|
|
@@ -2018,40 +1808,31 @@ export class Keyhive {
|
|
|
2018
1808
|
}
|
|
2019
1809
|
/**
|
|
2020
1810
|
* @param {Document} doc
|
|
2021
|
-
* @param {
|
|
2022
|
-
* @param {
|
|
1811
|
+
* @param {ChangeId} content_ref
|
|
1812
|
+
* @param {ChangeId[]} pred_refs
|
|
2023
1813
|
* @param {Uint8Array} content
|
|
2024
1814
|
* @returns {Promise<EncryptedContentWithUpdate>}
|
|
2025
1815
|
*/
|
|
2026
1816
|
tryEncryptArchive(doc, content_ref, pred_refs, content) {
|
|
2027
1817
|
_assertClass(doc, Document);
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
const
|
|
2032
|
-
const
|
|
2033
|
-
const
|
|
2034
|
-
const len3 = WASM_VECTOR_LEN;
|
|
2035
|
-
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3);
|
|
1818
|
+
_assertClass(content_ref, ChangeId);
|
|
1819
|
+
const ptr0 = passArrayJsValueToWasm0(pred_refs, wasm.__wbindgen_malloc);
|
|
1820
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1821
|
+
const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_malloc);
|
|
1822
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1823
|
+
const ret = wasm.keyhive_tryEncryptArchive(this.__wbg_ptr, doc.__wbg_ptr, content_ref.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2036
1824
|
return ret;
|
|
2037
1825
|
}
|
|
2038
1826
|
/**
|
|
2039
1827
|
* @param {Document} doc
|
|
2040
1828
|
* @param {Encrypted} encrypted
|
|
2041
|
-
* @returns {Uint8Array}
|
|
1829
|
+
* @returns {Promise<Uint8Array>}
|
|
2042
1830
|
*/
|
|
2043
1831
|
tryDecrypt(doc, encrypted) {
|
|
2044
1832
|
_assertClass(doc, Document);
|
|
2045
|
-
var ptr0 = doc.__destroy_into_raw();
|
|
2046
1833
|
_assertClass(encrypted, Encrypted);
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
if (ret[3]) {
|
|
2050
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
2051
|
-
}
|
|
2052
|
-
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2053
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2054
|
-
return v3;
|
|
1834
|
+
const ret = wasm.keyhive_tryDecrypt(this.__wbg_ptr, doc.__wbg_ptr, encrypted.__wbg_ptr);
|
|
1835
|
+
return ret;
|
|
2055
1836
|
}
|
|
2056
1837
|
/**
|
|
2057
1838
|
* @param {Agent} to_add
|
|
@@ -2083,13 +1864,11 @@ export class Keyhive {
|
|
|
2083
1864
|
return ret;
|
|
2084
1865
|
}
|
|
2085
1866
|
/**
|
|
2086
|
-
* @returns {Summary[]}
|
|
1867
|
+
* @returns {Promise<Summary[]>}
|
|
2087
1868
|
*/
|
|
2088
1869
|
reachableDocs() {
|
|
2089
1870
|
const ret = wasm.keyhive_reachableDocs(this.__wbg_ptr);
|
|
2090
|
-
|
|
2091
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2092
|
-
return v1;
|
|
1871
|
+
return ret;
|
|
2093
1872
|
}
|
|
2094
1873
|
/**
|
|
2095
1874
|
* @param {Document} doc
|
|
@@ -2126,71 +1905,74 @@ export class Keyhive {
|
|
|
2126
1905
|
}
|
|
2127
1906
|
/**
|
|
2128
1907
|
* @param {ContactCard} contact_card
|
|
2129
|
-
* @returns {Individual}
|
|
1908
|
+
* @returns {Promise<Individual>}
|
|
2130
1909
|
*/
|
|
2131
1910
|
receiveContactCard(contact_card) {
|
|
2132
1911
|
_assertClass(contact_card, ContactCard);
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
if (ret[2]) {
|
|
2136
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
2137
|
-
}
|
|
2138
|
-
return Individual.__wrap(ret[0]);
|
|
1912
|
+
const ret = wasm.keyhive_receiveContactCard(this.__wbg_ptr, contact_card.__wbg_ptr);
|
|
1913
|
+
return ret;
|
|
2139
1914
|
}
|
|
2140
1915
|
/**
|
|
2141
1916
|
* @param {Identifier} id
|
|
2142
|
-
* @returns {Agent | undefined}
|
|
1917
|
+
* @returns {Promise<Agent | undefined>}
|
|
2143
1918
|
*/
|
|
2144
1919
|
getAgent(id) {
|
|
2145
1920
|
_assertClass(id, Identifier);
|
|
2146
1921
|
const ret = wasm.keyhive_getAgent(this.__wbg_ptr, id.__wbg_ptr);
|
|
2147
|
-
return ret
|
|
1922
|
+
return ret;
|
|
2148
1923
|
}
|
|
2149
1924
|
/**
|
|
2150
|
-
* @param {
|
|
2151
|
-
* @returns {Group | undefined}
|
|
1925
|
+
* @param {GroupId} group_id
|
|
1926
|
+
* @returns {Promise<Group | undefined>}
|
|
2152
1927
|
*/
|
|
2153
|
-
getGroup(
|
|
2154
|
-
_assertClass(
|
|
2155
|
-
const ret = wasm.keyhive_getGroup(this.__wbg_ptr,
|
|
2156
|
-
return ret
|
|
1928
|
+
getGroup(group_id) {
|
|
1929
|
+
_assertClass(group_id, GroupId);
|
|
1930
|
+
const ret = wasm.keyhive_getGroup(this.__wbg_ptr, group_id.__wbg_ptr);
|
|
1931
|
+
return ret;
|
|
2157
1932
|
}
|
|
2158
1933
|
/**
|
|
2159
1934
|
* @param {DocumentId} doc_id
|
|
2160
|
-
* @returns {
|
|
1935
|
+
* @returns {Promise<Document | undefined>}
|
|
1936
|
+
*/
|
|
1937
|
+
getDocument(doc_id) {
|
|
1938
|
+
_assertClass(doc_id, DocumentId);
|
|
1939
|
+
const ret = wasm.keyhive_getDocument(this.__wbg_ptr, doc_id.__wbg_ptr);
|
|
1940
|
+
return ret;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* @param {DocumentId} doc_id
|
|
1944
|
+
* @returns {Promise<Membership[]>}
|
|
2161
1945
|
*/
|
|
2162
1946
|
docMemberCapabilities(doc_id) {
|
|
2163
1947
|
_assertClass(doc_id, DocumentId);
|
|
2164
1948
|
const ret = wasm.keyhive_docMemberCapabilities(this.__wbg_ptr, doc_id.__wbg_ptr);
|
|
2165
|
-
|
|
2166
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2167
|
-
return v1;
|
|
1949
|
+
return ret;
|
|
2168
1950
|
}
|
|
2169
1951
|
/**
|
|
2170
1952
|
* @param {Identifier} id
|
|
2171
1953
|
* @param {DocumentId} doc_id
|
|
2172
|
-
* @returns {Access | undefined}
|
|
1954
|
+
* @returns {Promise<Access | undefined>}
|
|
2173
1955
|
*/
|
|
2174
1956
|
accessForDoc(id, doc_id) {
|
|
2175
1957
|
_assertClass(id, Identifier);
|
|
2176
1958
|
_assertClass(doc_id, DocumentId);
|
|
2177
1959
|
const ret = wasm.keyhive_accessForDoc(this.__wbg_ptr, id.__wbg_ptr, doc_id.__wbg_ptr);
|
|
2178
|
-
return ret
|
|
1960
|
+
return ret;
|
|
2179
1961
|
}
|
|
2180
1962
|
/**
|
|
2181
|
-
* @returns {Archive}
|
|
1963
|
+
* @returns {Promise<Archive>}
|
|
2182
1964
|
*/
|
|
2183
1965
|
intoArchive() {
|
|
2184
1966
|
const ptr = this.__destroy_into_raw();
|
|
2185
1967
|
const ret = wasm.keyhive_intoArchive(ptr);
|
|
2186
|
-
return
|
|
1968
|
+
return ret;
|
|
2187
1969
|
}
|
|
2188
1970
|
/**
|
|
2189
|
-
* @returns {Archive}
|
|
1971
|
+
* @returns {Promise<Archive>}
|
|
2190
1972
|
*/
|
|
2191
1973
|
toArchive() {
|
|
2192
1974
|
const ret = wasm.keyhive_toArchive(this.__wbg_ptr);
|
|
2193
|
-
return
|
|
1975
|
+
return ret;
|
|
2194
1976
|
}
|
|
2195
1977
|
/**
|
|
2196
1978
|
* @param {Archive} archive
|
|
@@ -2201,6 +1983,21 @@ export class Keyhive {
|
|
|
2201
1983
|
const ret = wasm.keyhive_ingestArchive(this.__wbg_ptr, archive.__wbg_ptr);
|
|
2202
1984
|
return ret;
|
|
2203
1985
|
}
|
|
1986
|
+
/**
|
|
1987
|
+
* @param {Array<any>} events_bytes_array
|
|
1988
|
+
* @returns {Promise<Array<any>>}
|
|
1989
|
+
*/
|
|
1990
|
+
ingestEventsBytes(events_bytes_array) {
|
|
1991
|
+
const ret = wasm.keyhive_ingestEventsBytes(this.__wbg_ptr, events_bytes_array);
|
|
1992
|
+
return ret;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* @returns {Promise<Stats>}
|
|
1996
|
+
*/
|
|
1997
|
+
stats() {
|
|
1998
|
+
const ret = wasm.keyhive_stats(this.__wbg_ptr);
|
|
1999
|
+
return ret;
|
|
2000
|
+
}
|
|
2204
2001
|
}
|
|
2205
2002
|
if (Symbol.dispose) Keyhive.prototype[Symbol.dispose] = Keyhive.prototype.free;
|
|
2206
2003
|
|
|
@@ -2232,6 +2029,48 @@ export class Membered {
|
|
|
2232
2029
|
}
|
|
2233
2030
|
if (Symbol.dispose) Membered.prototype[Symbol.dispose] = Membered.prototype.free;
|
|
2234
2031
|
|
|
2032
|
+
const MembershipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2033
|
+
? { register: () => {}, unregister: () => {} }
|
|
2034
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_membership_free(ptr >>> 0, 1));
|
|
2035
|
+
|
|
2036
|
+
export class Membership {
|
|
2037
|
+
|
|
2038
|
+
static __wrap(ptr) {
|
|
2039
|
+
ptr = ptr >>> 0;
|
|
2040
|
+
const obj = Object.create(Membership.prototype);
|
|
2041
|
+
obj.__wbg_ptr = ptr;
|
|
2042
|
+
MembershipFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2043
|
+
return obj;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
__destroy_into_raw() {
|
|
2047
|
+
const ptr = this.__wbg_ptr;
|
|
2048
|
+
this.__wbg_ptr = 0;
|
|
2049
|
+
MembershipFinalization.unregister(this);
|
|
2050
|
+
return ptr;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
free() {
|
|
2054
|
+
const ptr = this.__destroy_into_raw();
|
|
2055
|
+
wasm.__wbg_membership_free(ptr, 0);
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* @returns {Agent}
|
|
2059
|
+
*/
|
|
2060
|
+
get who() {
|
|
2061
|
+
const ret = wasm.membership_who(this.__wbg_ptr);
|
|
2062
|
+
return Agent.__wrap(ret);
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* @returns {Access}
|
|
2066
|
+
*/
|
|
2067
|
+
get can() {
|
|
2068
|
+
const ret = wasm.membership_can(this.__wbg_ptr);
|
|
2069
|
+
return Access.__wrap(ret);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
if (Symbol.dispose) Membership.prototype[Symbol.dispose] = Membership.prototype.free;
|
|
2073
|
+
|
|
2235
2074
|
const PeerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2236
2075
|
? { register: () => {}, unregister: () => {} }
|
|
2237
2076
|
: new FinalizationRegistry(ptr => wasm.__wbg_peer_free(ptr >>> 0, 1));
|
|
@@ -2246,13 +2085,6 @@ export class Peer {
|
|
|
2246
2085
|
return obj;
|
|
2247
2086
|
}
|
|
2248
2087
|
|
|
2249
|
-
static __unwrap(jsValue) {
|
|
2250
|
-
if (!(jsValue instanceof Peer)) {
|
|
2251
|
-
return 0;
|
|
2252
|
-
}
|
|
2253
|
-
return jsValue.__destroy_into_raw();
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
2088
|
__destroy_into_raw() {
|
|
2257
2089
|
const ptr = this.__wbg_ptr;
|
|
2258
2090
|
this.__wbg_ptr = 0;
|
|
@@ -2264,6 +2096,13 @@ export class Peer {
|
|
|
2264
2096
|
const ptr = this.__destroy_into_raw();
|
|
2265
2097
|
wasm.__wbg_peer_free(ptr, 0);
|
|
2266
2098
|
}
|
|
2099
|
+
/**
|
|
2100
|
+
* @returns {Identifier}
|
|
2101
|
+
*/
|
|
2102
|
+
get id() {
|
|
2103
|
+
const ret = wasm.peer_id(this.__wbg_ptr);
|
|
2104
|
+
return Identifier.__wrap(ret);
|
|
2105
|
+
}
|
|
2267
2106
|
/**
|
|
2268
2107
|
* @returns {string}
|
|
2269
2108
|
*/
|
|
@@ -2300,28 +2139,15 @@ export class Peer {
|
|
|
2300
2139
|
const ret = wasm.peer_isDocument(this.__wbg_ptr);
|
|
2301
2140
|
return ret !== 0;
|
|
2302
2141
|
}
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
export class RemoveCiphertextError {
|
|
2311
|
-
|
|
2312
|
-
__destroy_into_raw() {
|
|
2313
|
-
const ptr = this.__wbg_ptr;
|
|
2314
|
-
this.__wbg_ptr = 0;
|
|
2315
|
-
RemoveCiphertextErrorFinalization.unregister(this);
|
|
2316
|
-
return ptr;
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
|
-
free() {
|
|
2320
|
-
const ptr = this.__destroy_into_raw();
|
|
2321
|
-
wasm.__wbg_removeciphertexterror_free(ptr, 0);
|
|
2142
|
+
/**
|
|
2143
|
+
* @returns {Peer}
|
|
2144
|
+
*/
|
|
2145
|
+
__wasm_refgen_toPeer() {
|
|
2146
|
+
const ret = wasm.peer___wasm_refgen_toPeer(this.__wbg_ptr);
|
|
2147
|
+
return Peer.__wrap(ret);
|
|
2322
2148
|
}
|
|
2323
2149
|
}
|
|
2324
|
-
if (Symbol.dispose)
|
|
2150
|
+
if (Symbol.dispose) Peer.prototype[Symbol.dispose] = Peer.prototype.free;
|
|
2325
2151
|
|
|
2326
2152
|
const RevocationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2327
2153
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2379,85 +2205,6 @@ export class Revocation {
|
|
|
2379
2205
|
}
|
|
2380
2206
|
if (Symbol.dispose) Revocation.prototype[Symbol.dispose] = Revocation.prototype.free;
|
|
2381
2207
|
|
|
2382
|
-
const RevokeMemberErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2383
|
-
? { register: () => {}, unregister: () => {} }
|
|
2384
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_revokemembererror_free(ptr >>> 0, 1));
|
|
2385
|
-
|
|
2386
|
-
export class RevokeMemberError {
|
|
2387
|
-
|
|
2388
|
-
static __wrap(ptr) {
|
|
2389
|
-
ptr = ptr >>> 0;
|
|
2390
|
-
const obj = Object.create(RevokeMemberError.prototype);
|
|
2391
|
-
obj.__wbg_ptr = ptr;
|
|
2392
|
-
RevokeMemberErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2393
|
-
return obj;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
__destroy_into_raw() {
|
|
2397
|
-
const ptr = this.__wbg_ptr;
|
|
2398
|
-
this.__wbg_ptr = 0;
|
|
2399
|
-
RevokeMemberErrorFinalization.unregister(this);
|
|
2400
|
-
return ptr;
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
free() {
|
|
2404
|
-
const ptr = this.__destroy_into_raw();
|
|
2405
|
-
wasm.__wbg_revokemembererror_free(ptr, 0);
|
|
2406
|
-
}
|
|
2407
|
-
/**
|
|
2408
|
-
* @returns {string}
|
|
2409
|
-
*/
|
|
2410
|
-
get message() {
|
|
2411
|
-
let deferred1_0;
|
|
2412
|
-
let deferred1_1;
|
|
2413
|
-
try {
|
|
2414
|
-
const ret = wasm.revokemembererror_message(this.__wbg_ptr);
|
|
2415
|
-
deferred1_0 = ret[0];
|
|
2416
|
-
deferred1_1 = ret[1];
|
|
2417
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
2418
|
-
} finally {
|
|
2419
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
if (Symbol.dispose) RevokeMemberError.prototype[Symbol.dispose] = RevokeMemberError.prototype.free;
|
|
2424
|
-
|
|
2425
|
-
const SerializationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2426
|
-
? { register: () => {}, unregister: () => {} }
|
|
2427
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_serializationerror_free(ptr >>> 0, 1));
|
|
2428
|
-
|
|
2429
|
-
export class SerializationError {
|
|
2430
|
-
|
|
2431
|
-
static __wrap(ptr) {
|
|
2432
|
-
ptr = ptr >>> 0;
|
|
2433
|
-
const obj = Object.create(SerializationError.prototype);
|
|
2434
|
-
obj.__wbg_ptr = ptr;
|
|
2435
|
-
SerializationErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2436
|
-
return obj;
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
__destroy_into_raw() {
|
|
2440
|
-
const ptr = this.__wbg_ptr;
|
|
2441
|
-
this.__wbg_ptr = 0;
|
|
2442
|
-
SerializationErrorFinalization.unregister(this);
|
|
2443
|
-
return ptr;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
free() {
|
|
2447
|
-
const ptr = this.__destroy_into_raw();
|
|
2448
|
-
wasm.__wbg_serializationerror_free(ptr, 0);
|
|
2449
|
-
}
|
|
2450
|
-
/**
|
|
2451
|
-
* @returns {any}
|
|
2452
|
-
*/
|
|
2453
|
-
toError() {
|
|
2454
|
-
const ptr = this.__destroy_into_raw();
|
|
2455
|
-
const ret = wasm.serializationerror_toError(ptr);
|
|
2456
|
-
return ret;
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
if (Symbol.dispose) SerializationError.prototype[Symbol.dispose] = SerializationError.prototype.free;
|
|
2460
|
-
|
|
2461
2208
|
const ShareKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2462
2209
|
? { register: () => {}, unregister: () => {} }
|
|
2463
2210
|
: new FinalizationRegistry(ptr => wasm.__wbg_sharekey_free(ptr >>> 0, 1));
|
|
@@ -2519,13 +2266,19 @@ export class Signed {
|
|
|
2519
2266
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2520
2267
|
const len0 = WASM_VECTOR_LEN;
|
|
2521
2268
|
const ret = wasm.signed_fromBytes(ptr0, len0);
|
|
2522
|
-
|
|
2269
|
+
if (ret[2]) {
|
|
2270
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2271
|
+
}
|
|
2272
|
+
return Signed.__wrap(ret[0]);
|
|
2523
2273
|
}
|
|
2524
2274
|
/**
|
|
2525
2275
|
* @returns {Uint8Array}
|
|
2526
2276
|
*/
|
|
2527
2277
|
toBytes() {
|
|
2528
2278
|
const ret = wasm.signed_toBytes(this.__wbg_ptr);
|
|
2279
|
+
if (ret[3]) {
|
|
2280
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2281
|
+
}
|
|
2529
2282
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
2530
2283
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2531
2284
|
return v1;
|
|
@@ -2878,39 +2631,74 @@ export class Signer {
|
|
|
2878
2631
|
}
|
|
2879
2632
|
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
2880
2633
|
|
|
2881
|
-
const
|
|
2634
|
+
const StatsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2882
2635
|
? { register: () => {}, unregister: () => {} }
|
|
2883
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
2636
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_stats_free(ptr >>> 0, 1));
|
|
2884
2637
|
|
|
2885
|
-
export class
|
|
2638
|
+
export class Stats {
|
|
2886
2639
|
|
|
2887
2640
|
static __wrap(ptr) {
|
|
2888
2641
|
ptr = ptr >>> 0;
|
|
2889
|
-
const obj = Object.create(
|
|
2642
|
+
const obj = Object.create(Stats.prototype);
|
|
2890
2643
|
obj.__wbg_ptr = ptr;
|
|
2891
|
-
|
|
2644
|
+
StatsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2892
2645
|
return obj;
|
|
2893
2646
|
}
|
|
2894
2647
|
|
|
2895
2648
|
__destroy_into_raw() {
|
|
2896
2649
|
const ptr = this.__wbg_ptr;
|
|
2897
2650
|
this.__wbg_ptr = 0;
|
|
2898
|
-
|
|
2651
|
+
StatsFinalization.unregister(this);
|
|
2899
2652
|
return ptr;
|
|
2900
2653
|
}
|
|
2901
2654
|
|
|
2902
2655
|
free() {
|
|
2903
2656
|
const ptr = this.__destroy_into_raw();
|
|
2904
|
-
wasm.
|
|
2657
|
+
wasm.__wbg_stats_free(ptr, 0);
|
|
2658
|
+
}
|
|
2659
|
+
/**
|
|
2660
|
+
* @returns {bigint}
|
|
2661
|
+
*/
|
|
2662
|
+
get individuals() {
|
|
2663
|
+
const ret = wasm.stats_individuals(this.__wbg_ptr);
|
|
2664
|
+
return BigInt.asUintN(64, ret);
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* @returns {bigint}
|
|
2668
|
+
*/
|
|
2669
|
+
get groups() {
|
|
2670
|
+
const ret = wasm.stats_groups(this.__wbg_ptr);
|
|
2671
|
+
return BigInt.asUintN(64, ret);
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* @returns {bigint}
|
|
2675
|
+
*/
|
|
2676
|
+
get docs() {
|
|
2677
|
+
const ret = wasm.stats_docs(this.__wbg_ptr);
|
|
2678
|
+
return BigInt.asUintN(64, ret);
|
|
2679
|
+
}
|
|
2680
|
+
/**
|
|
2681
|
+
* @returns {bigint}
|
|
2682
|
+
*/
|
|
2683
|
+
get delegations() {
|
|
2684
|
+
const ret = wasm.stats_delegations(this.__wbg_ptr);
|
|
2685
|
+
return BigInt.asUintN(64, ret);
|
|
2686
|
+
}
|
|
2687
|
+
/**
|
|
2688
|
+
* @returns {bigint}
|
|
2689
|
+
*/
|
|
2690
|
+
get revocations() {
|
|
2691
|
+
const ret = wasm.stats_revocations(this.__wbg_ptr);
|
|
2692
|
+
return BigInt.asUintN(64, ret);
|
|
2905
2693
|
}
|
|
2906
2694
|
/**
|
|
2907
2695
|
* @returns {string}
|
|
2908
2696
|
*/
|
|
2909
|
-
|
|
2697
|
+
toString() {
|
|
2910
2698
|
let deferred1_0;
|
|
2911
2699
|
let deferred1_1;
|
|
2912
2700
|
try {
|
|
2913
|
-
const ret = wasm.
|
|
2701
|
+
const ret = wasm.stats_toString(this.__wbg_ptr);
|
|
2914
2702
|
deferred1_0 = ret[0];
|
|
2915
2703
|
deferred1_1 = ret[1];
|
|
2916
2704
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -2919,49 +2707,7 @@ export class SigningError {
|
|
|
2919
2707
|
}
|
|
2920
2708
|
}
|
|
2921
2709
|
}
|
|
2922
|
-
if (Symbol.dispose)
|
|
2923
|
-
|
|
2924
|
-
const SimpleCapabilityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2925
|
-
? { register: () => {}, unregister: () => {} }
|
|
2926
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_simplecapability_free(ptr >>> 0, 1));
|
|
2927
|
-
|
|
2928
|
-
export class SimpleCapability {
|
|
2929
|
-
|
|
2930
|
-
static __wrap(ptr) {
|
|
2931
|
-
ptr = ptr >>> 0;
|
|
2932
|
-
const obj = Object.create(SimpleCapability.prototype);
|
|
2933
|
-
obj.__wbg_ptr = ptr;
|
|
2934
|
-
SimpleCapabilityFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2935
|
-
return obj;
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
__destroy_into_raw() {
|
|
2939
|
-
const ptr = this.__wbg_ptr;
|
|
2940
|
-
this.__wbg_ptr = 0;
|
|
2941
|
-
SimpleCapabilityFinalization.unregister(this);
|
|
2942
|
-
return ptr;
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
free() {
|
|
2946
|
-
const ptr = this.__destroy_into_raw();
|
|
2947
|
-
wasm.__wbg_simplecapability_free(ptr, 0);
|
|
2948
|
-
}
|
|
2949
|
-
/**
|
|
2950
|
-
* @returns {Agent}
|
|
2951
|
-
*/
|
|
2952
|
-
get who() {
|
|
2953
|
-
const ret = wasm.simplecapability_who(this.__wbg_ptr);
|
|
2954
|
-
return Agent.__wrap(ret);
|
|
2955
|
-
}
|
|
2956
|
-
/**
|
|
2957
|
-
* @returns {Access}
|
|
2958
|
-
*/
|
|
2959
|
-
get can() {
|
|
2960
|
-
const ret = wasm.simplecapability_can(this.__wbg_ptr);
|
|
2961
|
-
return Access.__wrap(ret);
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
if (Symbol.dispose) SimpleCapability.prototype[Symbol.dispose] = SimpleCapability.prototype.free;
|
|
2710
|
+
if (Symbol.dispose) Stats.prototype[Symbol.dispose] = Stats.prototype.free;
|
|
2965
2711
|
|
|
2966
2712
|
const SummaryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2967
2713
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3005,42 +2751,6 @@ export class Summary {
|
|
|
3005
2751
|
}
|
|
3006
2752
|
if (Symbol.dispose) Summary.prototype[Symbol.dispose] = Summary.prototype.free;
|
|
3007
2753
|
|
|
3008
|
-
const TryFromArchiveErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3009
|
-
? { register: () => {}, unregister: () => {} }
|
|
3010
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tryfromarchiveerror_free(ptr >>> 0, 1));
|
|
3011
|
-
|
|
3012
|
-
export class TryFromArchiveError {
|
|
3013
|
-
|
|
3014
|
-
static __wrap(ptr) {
|
|
3015
|
-
ptr = ptr >>> 0;
|
|
3016
|
-
const obj = Object.create(TryFromArchiveError.prototype);
|
|
3017
|
-
obj.__wbg_ptr = ptr;
|
|
3018
|
-
TryFromArchiveErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3019
|
-
return obj;
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
__destroy_into_raw() {
|
|
3023
|
-
const ptr = this.__wbg_ptr;
|
|
3024
|
-
this.__wbg_ptr = 0;
|
|
3025
|
-
TryFromArchiveErrorFinalization.unregister(this);
|
|
3026
|
-
return ptr;
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
|
-
free() {
|
|
3030
|
-
const ptr = this.__destroy_into_raw();
|
|
3031
|
-
wasm.__wbg_tryfromarchiveerror_free(ptr, 0);
|
|
3032
|
-
}
|
|
3033
|
-
/**
|
|
3034
|
-
* @returns {any}
|
|
3035
|
-
*/
|
|
3036
|
-
toError() {
|
|
3037
|
-
const ptr = this.__destroy_into_raw();
|
|
3038
|
-
const ret = wasm.tryfromarchiveerror_toError(ptr);
|
|
3039
|
-
return ret;
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
if (Symbol.dispose) TryFromArchiveError.prototype[Symbol.dispose] = TryFromArchiveError.prototype.free;
|
|
3043
|
-
|
|
3044
2754
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
3045
2755
|
|
|
3046
2756
|
async function __wbg_load(module, imports) {
|
|
@@ -3083,8 +2793,16 @@ function __wbg_get_imports() {
|
|
|
3083
2793
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
3084
2794
|
return ret;
|
|
3085
2795
|
};
|
|
3086
|
-
imports.wbg.
|
|
3087
|
-
const ret =
|
|
2796
|
+
imports.wbg.__wbg_access_new = function(arg0) {
|
|
2797
|
+
const ret = Access.__wrap(arg0);
|
|
2798
|
+
return ret;
|
|
2799
|
+
};
|
|
2800
|
+
imports.wbg.__wbg_agent_new = function(arg0) {
|
|
2801
|
+
const ret = Agent.__wrap(arg0);
|
|
2802
|
+
return ret;
|
|
2803
|
+
};
|
|
2804
|
+
imports.wbg.__wbg_archive_new = function(arg0) {
|
|
2805
|
+
const ret = Archive.__wrap(arg0);
|
|
3088
2806
|
return ret;
|
|
3089
2807
|
};
|
|
3090
2808
|
imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
@@ -3107,12 +2825,12 @@ function __wbg_get_imports() {
|
|
|
3107
2825
|
const ret = Capability.__wrap(arg0);
|
|
3108
2826
|
return ret;
|
|
3109
2827
|
};
|
|
3110
|
-
imports.wbg.
|
|
3111
|
-
const ret =
|
|
2828
|
+
imports.wbg.__wbg_changeid_new = function(arg0) {
|
|
2829
|
+
const ret = ChangeId.__wrap(arg0);
|
|
3112
2830
|
return ret;
|
|
3113
2831
|
};
|
|
3114
|
-
imports.wbg.
|
|
3115
|
-
const ret =
|
|
2832
|
+
imports.wbg.__wbg_changeid_unwrap = function(arg0) {
|
|
2833
|
+
const ret = ChangeId.__unwrap(arg0);
|
|
3116
2834
|
return ret;
|
|
3117
2835
|
};
|
|
3118
2836
|
imports.wbg.__wbg_contactcard_new = function(arg0) {
|
|
@@ -3123,10 +2841,28 @@ function __wbg_get_imports() {
|
|
|
3123
2841
|
const ret = arg0.crypto;
|
|
3124
2842
|
return ret;
|
|
3125
2843
|
};
|
|
3126
|
-
imports.wbg.
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
2844
|
+
imports.wbg.__wbg_debug_68afdd09483bcd1b = function(arg0, arg1) {
|
|
2845
|
+
let deferred0_0;
|
|
2846
|
+
let deferred0_1;
|
|
2847
|
+
try {
|
|
2848
|
+
deferred0_0 = arg0;
|
|
2849
|
+
deferred0_1 = arg1;
|
|
2850
|
+
console.debug(getStringFromWasm0(arg0, arg1));
|
|
2851
|
+
} finally {
|
|
2852
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
imports.wbg.__wbg_debug_a4fe41d1a79aaba9 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2856
|
+
let deferred0_0;
|
|
2857
|
+
let deferred0_1;
|
|
2858
|
+
try {
|
|
2859
|
+
deferred0_0 = arg0;
|
|
2860
|
+
deferred0_1 = arg1;
|
|
2861
|
+
console.debug(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2862
|
+
} finally {
|
|
2863
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2864
|
+
}
|
|
2865
|
+
};
|
|
3130
2866
|
imports.wbg.__wbg_doccontentrefs_new = function(arg0) {
|
|
3131
2867
|
const ret = DocContentRefs.__wrap(arg0);
|
|
3132
2868
|
return ret;
|
|
@@ -3135,10 +2871,6 @@ function __wbg_get_imports() {
|
|
|
3135
2871
|
const ret = Document.__wrap(arg0);
|
|
3136
2872
|
return ret;
|
|
3137
2873
|
};
|
|
3138
|
-
imports.wbg.__wbg_document_unwrap = function(arg0) {
|
|
3139
|
-
const ret = Document.__unwrap(arg0);
|
|
3140
|
-
return ret;
|
|
3141
|
-
};
|
|
3142
2874
|
imports.wbg.__wbg_encryptedcontentwithupdate_new = function(arg0) {
|
|
3143
2875
|
const ret = EncryptedContentWithUpdate.__wrap(arg0);
|
|
3144
2876
|
return ret;
|
|
@@ -3154,6 +2886,28 @@ function __wbg_get_imports() {
|
|
|
3154
2886
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3155
2887
|
}
|
|
3156
2888
|
};
|
|
2889
|
+
imports.wbg.__wbg_error_be2b0d69ec6dd379 = function(arg0, arg1) {
|
|
2890
|
+
let deferred0_0;
|
|
2891
|
+
let deferred0_1;
|
|
2892
|
+
try {
|
|
2893
|
+
deferred0_0 = arg0;
|
|
2894
|
+
deferred0_1 = arg1;
|
|
2895
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
2896
|
+
} finally {
|
|
2897
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
imports.wbg.__wbg_error_fa36d085107c9dd5 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2901
|
+
let deferred0_0;
|
|
2902
|
+
let deferred0_1;
|
|
2903
|
+
try {
|
|
2904
|
+
deferred0_0 = arg0;
|
|
2905
|
+
deferred0_1 = arg1;
|
|
2906
|
+
console.error(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2907
|
+
} finally {
|
|
2908
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2909
|
+
}
|
|
2910
|
+
};
|
|
3157
2911
|
imports.wbg.__wbg_event_new = function(arg0) {
|
|
3158
2912
|
const ret = Event.__wrap(arg0);
|
|
3159
2913
|
return ret;
|
|
@@ -3166,10 +2920,6 @@ function __wbg_get_imports() {
|
|
|
3166
2920
|
const ret = arg0.generateKey(getStringFromWasm0(arg1, arg2), arg3 !== 0, arg4);
|
|
3167
2921
|
return ret;
|
|
3168
2922
|
}, arguments) };
|
|
3169
|
-
imports.wbg.__wbg_generatedocerror_new = function(arg0) {
|
|
3170
|
-
const ret = GenerateDocError.__wrap(arg0);
|
|
3171
|
-
return ret;
|
|
3172
|
-
};
|
|
3173
2923
|
imports.wbg.__wbg_generatewebcryptoerror_new = function(arg0) {
|
|
3174
2924
|
const ret = GenerateWebCryptoError.__wrap(arg0);
|
|
3175
2925
|
return ret;
|
|
@@ -3177,6 +2927,10 @@ function __wbg_get_imports() {
|
|
|
3177
2927
|
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
3178
2928
|
arg0.getRandomValues(arg1);
|
|
3179
2929
|
}, arguments) };
|
|
2930
|
+
imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
2931
|
+
const ret = arg0[arg1 >>> 0];
|
|
2932
|
+
return ret;
|
|
2933
|
+
};
|
|
3180
2934
|
imports.wbg.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
3181
2935
|
const ret = Reflect.get(arg0, arg1);
|
|
3182
2936
|
return ret;
|
|
@@ -3193,6 +2947,10 @@ function __wbg_get_imports() {
|
|
|
3193
2947
|
const ret = Group.__wrap(arg0);
|
|
3194
2948
|
return ret;
|
|
3195
2949
|
};
|
|
2950
|
+
imports.wbg.__wbg_individual_new = function(arg0) {
|
|
2951
|
+
const ret = Individual.__wrap(arg0);
|
|
2952
|
+
return ret;
|
|
2953
|
+
};
|
|
3196
2954
|
imports.wbg.__wbg_instanceof_Crypto_33ac2d91cca59233 = function(arg0) {
|
|
3197
2955
|
let result;
|
|
3198
2956
|
try {
|
|
@@ -3203,44 +2961,71 @@ function __wbg_get_imports() {
|
|
|
3203
2961
|
const ret = result;
|
|
3204
2962
|
return ret;
|
|
3205
2963
|
};
|
|
3206
|
-
imports.wbg.
|
|
3207
|
-
|
|
3208
|
-
try {
|
|
3209
|
-
result = arg0 instanceof Window;
|
|
3210
|
-
} catch (_) {
|
|
3211
|
-
result = false;
|
|
3212
|
-
}
|
|
3213
|
-
const ret = result;
|
|
2964
|
+
imports.wbg.__wbg_keyhive_new = function(arg0) {
|
|
2965
|
+
const ret = Keyhive.__wrap(arg0);
|
|
3214
2966
|
return ret;
|
|
3215
2967
|
};
|
|
3216
|
-
imports.wbg.
|
|
3217
|
-
const ret =
|
|
2968
|
+
imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
2969
|
+
const ret = arg0.length;
|
|
3218
2970
|
return ret;
|
|
3219
2971
|
};
|
|
3220
|
-
imports.wbg.
|
|
3221
|
-
const ret =
|
|
2972
|
+
imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
2973
|
+
const ret = arg0.length;
|
|
3222
2974
|
return ret;
|
|
3223
2975
|
};
|
|
3224
|
-
imports.wbg.
|
|
3225
|
-
|
|
3226
|
-
|
|
2976
|
+
imports.wbg.__wbg_log_98ea330cbdc64a56 = function(arg0, arg1) {
|
|
2977
|
+
let deferred0_0;
|
|
2978
|
+
let deferred0_1;
|
|
2979
|
+
try {
|
|
2980
|
+
deferred0_0 = arg0;
|
|
2981
|
+
deferred0_1 = arg1;
|
|
2982
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
2983
|
+
} finally {
|
|
2984
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2985
|
+
}
|
|
3227
2986
|
};
|
|
3228
|
-
imports.wbg.
|
|
3229
|
-
|
|
3230
|
-
|
|
2987
|
+
imports.wbg.__wbg_log_f996de40931ab7d1 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
2988
|
+
let deferred0_0;
|
|
2989
|
+
let deferred0_1;
|
|
2990
|
+
try {
|
|
2991
|
+
deferred0_0 = arg0;
|
|
2992
|
+
deferred0_1 = arg1;
|
|
2993
|
+
console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
2994
|
+
} finally {
|
|
2995
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2996
|
+
}
|
|
3231
2997
|
};
|
|
3232
|
-
imports.wbg.
|
|
3233
|
-
|
|
3234
|
-
return ret;
|
|
2998
|
+
imports.wbg.__wbg_mark_49688daf5a319979 = function(arg0, arg1) {
|
|
2999
|
+
performance.mark(getStringFromWasm0(arg0, arg1));
|
|
3235
3000
|
};
|
|
3236
|
-
imports.wbg.
|
|
3237
|
-
|
|
3001
|
+
imports.wbg.__wbg_measure_52555d98d3c0f41a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3002
|
+
let deferred0_0;
|
|
3003
|
+
let deferred0_1;
|
|
3004
|
+
let deferred1_0;
|
|
3005
|
+
let deferred1_1;
|
|
3006
|
+
try {
|
|
3007
|
+
deferred0_0 = arg0;
|
|
3008
|
+
deferred0_1 = arg1;
|
|
3009
|
+
deferred1_0 = arg2;
|
|
3010
|
+
deferred1_1 = arg3;
|
|
3011
|
+
performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
3012
|
+
} finally {
|
|
3013
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3014
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3015
|
+
}
|
|
3016
|
+
}, arguments) };
|
|
3017
|
+
imports.wbg.__wbg_membership_new = function(arg0) {
|
|
3018
|
+
const ret = Membership.__wrap(arg0);
|
|
3238
3019
|
return ret;
|
|
3239
3020
|
};
|
|
3240
3021
|
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
3241
3022
|
const ret = arg0.msCrypto;
|
|
3242
3023
|
return ret;
|
|
3243
3024
|
};
|
|
3025
|
+
imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
|
|
3026
|
+
const ret = new Array();
|
|
3027
|
+
return ret;
|
|
3028
|
+
};
|
|
3244
3029
|
imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
3245
3030
|
try {
|
|
3246
3031
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -3248,7 +3033,7 @@ function __wbg_get_imports() {
|
|
|
3248
3033
|
const a = state0.a;
|
|
3249
3034
|
state0.a = 0;
|
|
3250
3035
|
try {
|
|
3251
|
-
return
|
|
3036
|
+
return __wbg_adapter_315(a, state0.b, arg0, arg1);
|
|
3252
3037
|
} finally {
|
|
3253
3038
|
state0.a = a;
|
|
3254
3039
|
}
|
|
@@ -3267,6 +3052,14 @@ function __wbg_get_imports() {
|
|
|
3267
3052
|
const ret = new Error();
|
|
3268
3053
|
return ret;
|
|
3269
3054
|
};
|
|
3055
|
+
imports.wbg.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
|
|
3056
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
3057
|
+
return ret;
|
|
3058
|
+
};
|
|
3059
|
+
imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
|
|
3060
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
3061
|
+
return ret;
|
|
3062
|
+
};
|
|
3270
3063
|
imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
3271
3064
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
3272
3065
|
return ret;
|
|
@@ -3279,10 +3072,6 @@ function __wbg_get_imports() {
|
|
|
3279
3072
|
const ret = arg0.node;
|
|
3280
3073
|
return ret;
|
|
3281
3074
|
};
|
|
3282
|
-
imports.wbg.__wbg_peer_unwrap = function(arg0) {
|
|
3283
|
-
const ret = Peer.__unwrap(arg0);
|
|
3284
|
-
return ret;
|
|
3285
|
-
};
|
|
3286
3075
|
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
3287
3076
|
const ret = arg0.process;
|
|
3288
3077
|
return ret;
|
|
@@ -3290,6 +3079,10 @@ function __wbg_get_imports() {
|
|
|
3290
3079
|
imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
|
|
3291
3080
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
3292
3081
|
};
|
|
3082
|
+
imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
3083
|
+
const ret = arg0.push(arg1);
|
|
3084
|
+
return ret;
|
|
3085
|
+
};
|
|
3293
3086
|
imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
|
|
3294
3087
|
queueMicrotask(arg0);
|
|
3295
3088
|
};
|
|
@@ -3308,13 +3101,8 @@ function __wbg_get_imports() {
|
|
|
3308
3101
|
const ret = Promise.resolve(arg0);
|
|
3309
3102
|
return ret;
|
|
3310
3103
|
};
|
|
3311
|
-
imports.wbg.
|
|
3312
|
-
|
|
3313
|
-
return ret;
|
|
3314
|
-
};
|
|
3315
|
-
imports.wbg.__wbg_serializationerror_new = function(arg0) {
|
|
3316
|
-
const ret = SerializationError.__wrap(arg0);
|
|
3317
|
-
return ret;
|
|
3104
|
+
imports.wbg.__wbg_setname_832b43d4602cb930 = function(arg0, arg1, arg2) {
|
|
3105
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
3318
3106
|
};
|
|
3319
3107
|
imports.wbg.__wbg_sharekey_new = function(arg0) {
|
|
3320
3108
|
const ret = ShareKey.__wrap(arg0);
|
|
@@ -3340,14 +3128,6 @@ function __wbg_get_imports() {
|
|
|
3340
3128
|
const ret = Signer.__wrap(arg0);
|
|
3341
3129
|
return ret;
|
|
3342
3130
|
};
|
|
3343
|
-
imports.wbg.__wbg_signingerror_new = function(arg0) {
|
|
3344
|
-
const ret = SigningError.__wrap(arg0);
|
|
3345
|
-
return ret;
|
|
3346
|
-
};
|
|
3347
|
-
imports.wbg.__wbg_simplecapability_new = function(arg0) {
|
|
3348
|
-
const ret = SimpleCapability.__wrap(arg0);
|
|
3349
|
-
return ret;
|
|
3350
|
-
};
|
|
3351
3131
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
3352
3132
|
const ret = arg1.stack;
|
|
3353
3133
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -3371,6 +3151,10 @@ function __wbg_get_imports() {
|
|
|
3371
3151
|
const ret = typeof window === 'undefined' ? null : window;
|
|
3372
3152
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3373
3153
|
};
|
|
3154
|
+
imports.wbg.__wbg_stats_new = function(arg0) {
|
|
3155
|
+
const ret = Stats.__wrap(arg0);
|
|
3156
|
+
return ret;
|
|
3157
|
+
};
|
|
3374
3158
|
imports.wbg.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
|
|
3375
3159
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3376
3160
|
return ret;
|
|
@@ -3391,14 +3175,50 @@ function __wbg_get_imports() {
|
|
|
3391
3175
|
const ret = arg0.then(arg1);
|
|
3392
3176
|
return ret;
|
|
3393
3177
|
};
|
|
3394
|
-
imports.wbg.__wbg_tryfromarchiveerror_new = function(arg0) {
|
|
3395
|
-
const ret = TryFromArchiveError.__wrap(arg0);
|
|
3396
|
-
return ret;
|
|
3397
|
-
};
|
|
3398
3178
|
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
3399
3179
|
const ret = arg0.versions;
|
|
3400
3180
|
return ret;
|
|
3401
3181
|
};
|
|
3182
|
+
imports.wbg.__wbg_warn_c6311e9cb983aa2a = function(arg0, arg1) {
|
|
3183
|
+
let deferred0_0;
|
|
3184
|
+
let deferred0_1;
|
|
3185
|
+
try {
|
|
3186
|
+
deferred0_0 = arg0;
|
|
3187
|
+
deferred0_1 = arg1;
|
|
3188
|
+
console.warn(getStringFromWasm0(arg0, arg1));
|
|
3189
|
+
} finally {
|
|
3190
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
imports.wbg.__wbg_warn_de3a09d072c895e6 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
3194
|
+
let deferred0_0;
|
|
3195
|
+
let deferred0_1;
|
|
3196
|
+
try {
|
|
3197
|
+
deferred0_0 = arg0;
|
|
3198
|
+
deferred0_1 = arg1;
|
|
3199
|
+
console.warn(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
|
|
3200
|
+
} finally {
|
|
3201
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3202
|
+
}
|
|
3203
|
+
};
|
|
3204
|
+
imports.wbg.__wbg_wasmrefgentoChangeId_31238620806c0c3d = function(arg0) {
|
|
3205
|
+
const ret = arg0.__wasm_refgen_toChangeId();
|
|
3206
|
+
_assertClass(ret, ChangeId);
|
|
3207
|
+
var ptr1 = ret.__destroy_into_raw();
|
|
3208
|
+
return ptr1;
|
|
3209
|
+
};
|
|
3210
|
+
imports.wbg.__wbg_wasmrefgentoDocument_d755d52439ab43bc = function(arg0) {
|
|
3211
|
+
const ret = arg0.__wasm_refgen_toDocument();
|
|
3212
|
+
_assertClass(ret, Document);
|
|
3213
|
+
var ptr1 = ret.__destroy_into_raw();
|
|
3214
|
+
return ptr1;
|
|
3215
|
+
};
|
|
3216
|
+
imports.wbg.__wbg_wasmrefgentoPeer_e7758239790d7eb6 = function(arg0) {
|
|
3217
|
+
const ret = arg0.__wasm_refgen_toPeer();
|
|
3218
|
+
_assertClass(ret, Peer);
|
|
3219
|
+
var ptr1 = ret.__destroy_into_raw();
|
|
3220
|
+
return ptr1;
|
|
3221
|
+
};
|
|
3402
3222
|
imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
|
|
3403
3223
|
const obj = arg0.original;
|
|
3404
3224
|
if (obj.cnt-- == 1) {
|
|
@@ -3435,11 +3255,6 @@ function __wbg_get_imports() {
|
|
|
3435
3255
|
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
3436
3256
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3437
3257
|
};
|
|
3438
|
-
imports.wbg.__wbindgen_cast_133053e9d0cd85aa = function(arg0, arg1) {
|
|
3439
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 422, function: Function { arguments: [Externref], shim_idx: 423, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3440
|
-
const ret = makeMutClosure(arg0, arg1, 422, __wbg_adapter_14);
|
|
3441
|
-
return ret;
|
|
3442
|
-
};
|
|
3443
3258
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3444
3259
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3445
3260
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -3452,6 +3267,41 @@ function __wbg_get_imports() {
|
|
|
3452
3267
|
const ret = v0;
|
|
3453
3268
|
return ret;
|
|
3454
3269
|
};
|
|
3270
|
+
imports.wbg.__wbindgen_cast_6300122139088863 = function(arg0, arg1) {
|
|
3271
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3272
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3273
|
+
// Cast intrinsic for `Vector(NamedExternref("ChangeId")) -> Externref`.
|
|
3274
|
+
const ret = v0;
|
|
3275
|
+
return ret;
|
|
3276
|
+
};
|
|
3277
|
+
imports.wbg.__wbindgen_cast_6d311b4990fb968e = function(arg0, arg1) {
|
|
3278
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3279
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3280
|
+
// Cast intrinsic for `Vector(NamedExternref("Summary")) -> Externref`.
|
|
3281
|
+
const ret = v0;
|
|
3282
|
+
return ret;
|
|
3283
|
+
};
|
|
3284
|
+
imports.wbg.__wbindgen_cast_6e33e4871eebdb43 = function(arg0, arg1) {
|
|
3285
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3286
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3287
|
+
// Cast intrinsic for `Vector(NamedExternref("Membership")) -> Externref`.
|
|
3288
|
+
const ret = v0;
|
|
3289
|
+
return ret;
|
|
3290
|
+
};
|
|
3291
|
+
imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
|
|
3292
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
3293
|
+
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
3294
|
+
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
3295
|
+
const ret = v0;
|
|
3296
|
+
return ret;
|
|
3297
|
+
};
|
|
3298
|
+
imports.wbg.__wbindgen_cast_a81e76255c07f2e8 = function(arg0, arg1) {
|
|
3299
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3300
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3301
|
+
// Cast intrinsic for `Vector(NamedExternref("Capability")) -> Externref`.
|
|
3302
|
+
const ret = v0;
|
|
3303
|
+
return ret;
|
|
3304
|
+
};
|
|
3455
3305
|
imports.wbg.__wbindgen_cast_ae91babfc5c19b28 = function(arg0, arg1) {
|
|
3456
3306
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3457
3307
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
@@ -3464,6 +3314,11 @@ function __wbg_get_imports() {
|
|
|
3464
3314
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3465
3315
|
return ret;
|
|
3466
3316
|
};
|
|
3317
|
+
imports.wbg.__wbindgen_cast_eec2736b920f1ce2 = function(arg0, arg1) {
|
|
3318
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 424, function: Function { arguments: [Externref], shim_idx: 425, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3319
|
+
const ret = makeMutClosure(arg0, arg1, 424, __wbg_adapter_8);
|
|
3320
|
+
return ret;
|
|
3321
|
+
};
|
|
3467
3322
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
3468
3323
|
const table = wasm.__wbindgen_export_2;
|
|
3469
3324
|
const offset = table.grow(4);
|