@wireapp/core-crypto 5.3.0 → 6.0.0
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 +21 -22
- package/src/core-crypto-ffi_bg.wasm +0 -0
- package/src/core-crypto-ffi_bg.wasm.d.ts +227 -188
- package/src/corecrypto.d.ts +485 -475
- package/src/corecrypto.js +1496 -902
package/src/corecrypto.js
CHANGED
@@ -62,7 +62,7 @@ class CoreCryptoError extends Error {
|
|
62
62
|
try {
|
63
63
|
const richError = JSON.parse(msg);
|
64
64
|
return new this(richError, ...params);
|
65
|
-
} catch
|
65
|
+
} catch {
|
66
66
|
return this.fallback(msg, ...params);
|
67
67
|
}
|
68
68
|
}
|
@@ -171,13 +171,13 @@ function getStringFromWasm0(ptr, len) {
|
|
171
171
|
ptr = ptr >>> 0;
|
172
172
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
173
173
|
}
|
174
|
+
function isLikeNone(x) {
|
175
|
+
return x === undefined || x === null;
|
176
|
+
}
|
174
177
|
function getArrayU8FromWasm0(ptr, len) {
|
175
178
|
ptr = ptr >>> 0;
|
176
179
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
177
180
|
}
|
178
|
-
function isLikeNone(x) {
|
179
|
-
return x === undefined || x === null;
|
180
|
-
}
|
181
181
|
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((state) => {
|
182
182
|
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
183
183
|
});
|
@@ -258,6 +258,17 @@ ${val.stack}`;
|
|
258
258
|
}
|
259
259
|
return className;
|
260
260
|
}
|
261
|
+
function passArray8ToWasm0(arg, malloc) {
|
262
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
263
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
264
|
+
WASM_VECTOR_LEN = arg.length;
|
265
|
+
return ptr;
|
266
|
+
}
|
267
|
+
function _assertClass(instance, klass) {
|
268
|
+
if (!(instance instanceof klass)) {
|
269
|
+
throw new Error(`expected instance of ${klass.name}`);
|
270
|
+
}
|
271
|
+
}
|
261
272
|
function getArrayJsValueFromWasm0(ptr, len) {
|
262
273
|
ptr = ptr >>> 0;
|
263
274
|
const mem = getDataViewMemory0();
|
@@ -268,21 +279,20 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
268
279
|
wasm.__externref_drop_slice(ptr, len);
|
269
280
|
return result;
|
270
281
|
}
|
271
|
-
function passArray8ToWasm0(arg, malloc) {
|
272
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
273
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
274
|
-
WASM_VECTOR_LEN = arg.length;
|
275
|
-
return ptr;
|
276
|
-
}
|
277
282
|
function passArrayJsValueToWasm0(array, malloc) {
|
278
283
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
279
|
-
const mem = getDataViewMemory0();
|
280
284
|
for (let i = 0;i < array.length; i++) {
|
281
|
-
|
285
|
+
const add = addToExternrefTable0(array[i]);
|
286
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
282
287
|
}
|
283
288
|
WASM_VECTOR_LEN = array.length;
|
284
289
|
return ptr;
|
285
290
|
}
|
291
|
+
function takeFromExternrefTable0(idx) {
|
292
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
293
|
+
wasm.__externref_table_dealloc(idx);
|
294
|
+
return value;
|
295
|
+
}
|
286
296
|
var cachedUint16ArrayMemory0 = null;
|
287
297
|
function getUint16ArrayMemory0() {
|
288
298
|
if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
|
@@ -296,44 +306,43 @@ function passArray16ToWasm0(arg, malloc) {
|
|
296
306
|
WASM_VECTOR_LEN = arg.length;
|
297
307
|
return ptr;
|
298
308
|
}
|
299
|
-
function
|
300
|
-
|
301
|
-
|
309
|
+
function migrateDatabaseKeyTypeToBytes(name, old_key, new_key) {
|
310
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
311
|
+
const len0 = WASM_VECTOR_LEN;
|
312
|
+
const ptr1 = passStringToWasm0(old_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
313
|
+
const len1 = WASM_VECTOR_LEN;
|
314
|
+
_assertClass(new_key, DatabaseKey);
|
315
|
+
const ret = wasm.migrateDatabaseKeyTypeToBytes(ptr0, len0, ptr1, len1, new_key.__wbg_ptr);
|
316
|
+
return ret;
|
317
|
+
}
|
318
|
+
function version() {
|
319
|
+
let deferred1_0;
|
320
|
+
let deferred1_1;
|
321
|
+
try {
|
322
|
+
const ret = wasm.version();
|
323
|
+
deferred1_0 = ret[0];
|
324
|
+
deferred1_1 = ret[1];
|
325
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
326
|
+
} finally {
|
327
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
302
328
|
}
|
303
329
|
}
|
304
|
-
function
|
305
|
-
const
|
306
|
-
|
307
|
-
return value;
|
330
|
+
function build_metadata() {
|
331
|
+
const ret = wasm.build_metadata();
|
332
|
+
return BuildMetadata.__wrap(ret);
|
308
333
|
}
|
309
334
|
function __wbg_adapter_60(arg0, arg1, arg2) {
|
310
|
-
wasm.
|
335
|
+
wasm.closure874_externref_shim(arg0, arg1, arg2);
|
311
336
|
}
|
312
337
|
function __wbg_adapter_63(arg0, arg1, arg2) {
|
313
|
-
wasm.
|
338
|
+
wasm.closure2570_externref_shim(arg0, arg1, arg2);
|
314
339
|
}
|
315
340
|
function __wbg_adapter_66(arg0, arg1, arg2) {
|
316
|
-
wasm.
|
317
|
-
}
|
318
|
-
function
|
319
|
-
wasm.
|
320
|
-
}
|
321
|
-
var Ciphersuite2 = Object.freeze({
|
322
|
-
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
|
323
|
-
"1": "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519",
|
324
|
-
MLS_128_DHKEMP256_AES128GCM_SHA256_P256: 2,
|
325
|
-
"2": "MLS_128_DHKEMP256_AES128GCM_SHA256_P256",
|
326
|
-
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519: 3,
|
327
|
-
"3": "MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519",
|
328
|
-
MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448: 4,
|
329
|
-
"4": "MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448",
|
330
|
-
MLS_256_DHKEMP521_AES256GCM_SHA512_P521: 5,
|
331
|
-
"5": "MLS_256_DHKEMP521_AES256GCM_SHA512_P521",
|
332
|
-
MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448: 6,
|
333
|
-
"6": "MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448",
|
334
|
-
MLS_256_DHKEMP384_AES256GCM_SHA384_P384: 7,
|
335
|
-
"7": "MLS_256_DHKEMP384_AES256GCM_SHA384_P384"
|
336
|
-
});
|
341
|
+
wasm.closure2769_externref_shim(arg0, arg1, arg2);
|
342
|
+
}
|
343
|
+
function __wbg_adapter_566(arg0, arg1, arg2, arg3) {
|
344
|
+
wasm.closure2870_externref_shim(arg0, arg1, arg2, arg3);
|
345
|
+
}
|
337
346
|
var CoreCryptoLogLevel = Object.freeze({
|
338
347
|
Off: 1,
|
339
348
|
"1": "Off",
|
@@ -362,6 +371,28 @@ var DeviceStatus = Object.freeze({
|
|
362
371
|
Revoked: 3,
|
363
372
|
"3": "Revoked"
|
364
373
|
});
|
374
|
+
var E2eiConversationState = Object.freeze({
|
375
|
+
Verified: 1,
|
376
|
+
"1": "Verified",
|
377
|
+
NotVerified: 2,
|
378
|
+
"2": "NotVerified",
|
379
|
+
NotEnabled: 3,
|
380
|
+
"3": "NotEnabled"
|
381
|
+
});
|
382
|
+
var MlsGroupInfoEncryptionType = Object.freeze({
|
383
|
+
Plaintext: 1,
|
384
|
+
"1": "Plaintext",
|
385
|
+
JweEncrypted: 2,
|
386
|
+
"2": "JweEncrypted"
|
387
|
+
});
|
388
|
+
var MlsRatchetTreeType = Object.freeze({
|
389
|
+
Full: 1,
|
390
|
+
"1": "Full",
|
391
|
+
Delta: 2,
|
392
|
+
"2": "Delta",
|
393
|
+
ByRef: 3,
|
394
|
+
"3": "ByRef"
|
395
|
+
});
|
365
396
|
var MlsTransportResponseVariant = Object.freeze({
|
366
397
|
Success: 1,
|
367
398
|
"1": "Success",
|
@@ -449,11 +480,11 @@ class AcmeDirectory {
|
|
449
480
|
const ptr = this.__destroy_into_raw();
|
450
481
|
wasm.__wbg_acmedirectory_free(ptr, 0);
|
451
482
|
}
|
452
|
-
get
|
483
|
+
get newNonce() {
|
453
484
|
let deferred1_0;
|
454
485
|
let deferred1_1;
|
455
486
|
try {
|
456
|
-
const ret = wasm.
|
487
|
+
const ret = wasm.__wbg_get_acmedirectory_newNonce(this.__wbg_ptr);
|
457
488
|
deferred1_0 = ret[0];
|
458
489
|
deferred1_1 = ret[1];
|
459
490
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -461,11 +492,11 @@ class AcmeDirectory {
|
|
461
492
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
462
493
|
}
|
463
494
|
}
|
464
|
-
get
|
495
|
+
get newAccount() {
|
465
496
|
let deferred1_0;
|
466
497
|
let deferred1_1;
|
467
498
|
try {
|
468
|
-
const ret = wasm.
|
499
|
+
const ret = wasm.__wbg_get_acmedirectory_newAccount(this.__wbg_ptr);
|
469
500
|
deferred1_0 = ret[0];
|
470
501
|
deferred1_1 = ret[1];
|
471
502
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -473,11 +504,11 @@ class AcmeDirectory {
|
|
473
504
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
474
505
|
}
|
475
506
|
}
|
476
|
-
get
|
507
|
+
get newOrder() {
|
477
508
|
let deferred1_0;
|
478
509
|
let deferred1_1;
|
479
510
|
try {
|
480
|
-
const ret = wasm.
|
511
|
+
const ret = wasm.__wbg_get_acmedirectory_newOrder(this.__wbg_ptr);
|
481
512
|
deferred1_0 = ret[0];
|
482
513
|
deferred1_1 = ret[1];
|
483
514
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -485,11 +516,11 @@ class AcmeDirectory {
|
|
485
516
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
486
517
|
}
|
487
518
|
}
|
488
|
-
get
|
519
|
+
get revokeCert() {
|
489
520
|
let deferred1_0;
|
490
521
|
let deferred1_1;
|
491
522
|
try {
|
492
|
-
const ret = wasm.
|
523
|
+
const ret = wasm.__wbg_get_acmedirectory_revokeCert(this.__wbg_ptr);
|
493
524
|
deferred1_0 = ret[0];
|
494
525
|
deferred1_1 = ret[1];
|
495
526
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -498,6 +529,41 @@ class AcmeDirectory {
|
|
498
529
|
}
|
499
530
|
}
|
500
531
|
}
|
532
|
+
var ArrayOfByteArrayFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_arrayofbytearray_free(ptr >>> 0, 1));
|
533
|
+
|
534
|
+
class ArrayOfByteArray {
|
535
|
+
static __wrap(ptr) {
|
536
|
+
ptr = ptr >>> 0;
|
537
|
+
const obj = Object.create(ArrayOfByteArray.prototype);
|
538
|
+
obj.__wbg_ptr = ptr;
|
539
|
+
ArrayOfByteArrayFinalization.register(obj, obj.__wbg_ptr, obj);
|
540
|
+
return obj;
|
541
|
+
}
|
542
|
+
__destroy_into_raw() {
|
543
|
+
const ptr = this.__wbg_ptr;
|
544
|
+
this.__wbg_ptr = 0;
|
545
|
+
ArrayOfByteArrayFinalization.unregister(this);
|
546
|
+
return ptr;
|
547
|
+
}
|
548
|
+
free() {
|
549
|
+
const ptr = this.__destroy_into_raw();
|
550
|
+
wasm.__wbg_arrayofbytearray_free(ptr, 0);
|
551
|
+
}
|
552
|
+
constructor(aoba) {
|
553
|
+
const ptr0 = passArrayJsValueToWasm0(aoba, wasm.__wbindgen_malloc);
|
554
|
+
const len0 = WASM_VECTOR_LEN;
|
555
|
+
const ret = wasm.arrayofbytearray_new(ptr0, len0);
|
556
|
+
this.__wbg_ptr = ret >>> 0;
|
557
|
+
ArrayOfByteArrayFinalization.register(this, this.__wbg_ptr, this);
|
558
|
+
return this;
|
559
|
+
}
|
560
|
+
as_arrays() {
|
561
|
+
const ret = wasm.arrayofbytearray_as_arrays(this.__wbg_ptr);
|
562
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
563
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
564
|
+
return v1;
|
565
|
+
}
|
566
|
+
}
|
501
567
|
var BufferedDecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_buffereddecryptedmessage_free(ptr >>> 0, 1));
|
502
568
|
|
503
569
|
class BufferedDecryptedMessage {
|
@@ -519,36 +585,43 @@ class BufferedDecryptedMessage {
|
|
519
585
|
wasm.__wbg_buffereddecryptedmessage_free(ptr, 0);
|
520
586
|
}
|
521
587
|
get message() {
|
522
|
-
const ret = wasm.
|
523
|
-
|
588
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_message(this.__wbg_ptr);
|
589
|
+
let v1;
|
590
|
+
if (ret[0] !== 0) {
|
591
|
+
v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
592
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
593
|
+
}
|
594
|
+
return v1;
|
524
595
|
}
|
525
596
|
get proposals() {
|
526
|
-
const ret = wasm.
|
527
|
-
|
597
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_proposals(this.__wbg_ptr);
|
598
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
599
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
600
|
+
return v1;
|
528
601
|
}
|
529
|
-
get
|
530
|
-
const ret = wasm.
|
602
|
+
get isActive() {
|
603
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_isActive(this.__wbg_ptr);
|
531
604
|
return ret !== 0;
|
532
605
|
}
|
533
|
-
get
|
534
|
-
const ret = wasm.
|
535
|
-
return ret ===
|
606
|
+
get commitDelay() {
|
607
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_commitDelay(this.__wbg_ptr);
|
608
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
536
609
|
}
|
537
|
-
get
|
538
|
-
const ret = wasm.
|
539
|
-
return ret;
|
610
|
+
get senderClientId() {
|
611
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_senderClientId(this.__wbg_ptr);
|
612
|
+
return ret === 0 ? undefined : ClientId.__wrap(ret);
|
540
613
|
}
|
541
|
-
get
|
542
|
-
const ret = wasm.
|
614
|
+
get hasEpochChanged() {
|
615
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_hasEpochChanged(this.__wbg_ptr);
|
543
616
|
return ret !== 0;
|
544
617
|
}
|
545
618
|
get identity() {
|
546
|
-
const ret = wasm.
|
619
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_identity(this.__wbg_ptr);
|
547
620
|
return WireIdentity.__wrap(ret);
|
548
621
|
}
|
549
|
-
get
|
550
|
-
const ret = wasm.
|
551
|
-
return ret;
|
622
|
+
get crlNewDistributionPoints() {
|
623
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_crlNewDistributionPoints(this.__wbg_ptr);
|
624
|
+
return NewCrlDistributionPoints.__wrap(ret);
|
552
625
|
}
|
553
626
|
}
|
554
627
|
var BuildMetadataFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_buildmetadata_free(ptr >>> 0, 1));
|
@@ -624,6 +697,106 @@ class BuildMetadata {
|
|
624
697
|
return getStringFromWasm0(ret[0], ret[1]);
|
625
698
|
}
|
626
699
|
}
|
700
|
+
var CiphersuiteFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_ciphersuite_free(ptr >>> 0, 1));
|
701
|
+
|
702
|
+
class Ciphersuite2 {
|
703
|
+
static __wrap(ptr) {
|
704
|
+
ptr = ptr >>> 0;
|
705
|
+
const obj = Object.create(Ciphersuite2.prototype);
|
706
|
+
obj.__wbg_ptr = ptr;
|
707
|
+
CiphersuiteFinalization.register(obj, obj.__wbg_ptr, obj);
|
708
|
+
return obj;
|
709
|
+
}
|
710
|
+
__destroy_into_raw() {
|
711
|
+
const ptr = this.__wbg_ptr;
|
712
|
+
this.__wbg_ptr = 0;
|
713
|
+
CiphersuiteFinalization.unregister(this);
|
714
|
+
return ptr;
|
715
|
+
}
|
716
|
+
free() {
|
717
|
+
const ptr = this.__destroy_into_raw();
|
718
|
+
wasm.__wbg_ciphersuite_free(ptr, 0);
|
719
|
+
}
|
720
|
+
as_u16() {
|
721
|
+
const ret = wasm.ciphersuite_as_u16(this.__wbg_ptr);
|
722
|
+
return ret;
|
723
|
+
}
|
724
|
+
constructor(discriminant) {
|
725
|
+
const ret = wasm.ciphersuite_new(discriminant);
|
726
|
+
if (ret[2]) {
|
727
|
+
throw takeFromExternrefTable0(ret[1]);
|
728
|
+
}
|
729
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
730
|
+
CiphersuiteFinalization.register(this, this.__wbg_ptr, this);
|
731
|
+
return this;
|
732
|
+
}
|
733
|
+
}
|
734
|
+
var CiphersuitesFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_ciphersuites_free(ptr >>> 0, 1));
|
735
|
+
|
736
|
+
class Ciphersuites {
|
737
|
+
__destroy_into_raw() {
|
738
|
+
const ptr = this.__wbg_ptr;
|
739
|
+
this.__wbg_ptr = 0;
|
740
|
+
CiphersuitesFinalization.unregister(this);
|
741
|
+
return ptr;
|
742
|
+
}
|
743
|
+
free() {
|
744
|
+
const ptr = this.__destroy_into_raw();
|
745
|
+
wasm.__wbg_ciphersuites_free(ptr, 0);
|
746
|
+
}
|
747
|
+
constructor(ids) {
|
748
|
+
const ptr0 = passArray16ToWasm0(ids, wasm.__wbindgen_malloc);
|
749
|
+
const len0 = WASM_VECTOR_LEN;
|
750
|
+
const ret = wasm.ciphersuites_from_u16s(ptr0, len0);
|
751
|
+
if (ret[2]) {
|
752
|
+
throw takeFromExternrefTable0(ret[1]);
|
753
|
+
}
|
754
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
755
|
+
CiphersuitesFinalization.register(this, this.__wbg_ptr, this);
|
756
|
+
return this;
|
757
|
+
}
|
758
|
+
}
|
759
|
+
var ClientIdFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_clientid_free(ptr >>> 0, 1));
|
760
|
+
|
761
|
+
class ClientId {
|
762
|
+
static __wrap(ptr) {
|
763
|
+
ptr = ptr >>> 0;
|
764
|
+
const obj = Object.create(ClientId.prototype);
|
765
|
+
obj.__wbg_ptr = ptr;
|
766
|
+
ClientIdFinalization.register(obj, obj.__wbg_ptr, obj);
|
767
|
+
return obj;
|
768
|
+
}
|
769
|
+
static __unwrap(jsValue) {
|
770
|
+
if (!(jsValue instanceof ClientId)) {
|
771
|
+
return 0;
|
772
|
+
}
|
773
|
+
return jsValue.__destroy_into_raw();
|
774
|
+
}
|
775
|
+
__destroy_into_raw() {
|
776
|
+
const ptr = this.__wbg_ptr;
|
777
|
+
this.__wbg_ptr = 0;
|
778
|
+
ClientIdFinalization.unregister(this);
|
779
|
+
return ptr;
|
780
|
+
}
|
781
|
+
free() {
|
782
|
+
const ptr = this.__destroy_into_raw();
|
783
|
+
wasm.__wbg_clientid_free(ptr, 0);
|
784
|
+
}
|
785
|
+
constructor(bytes) {
|
786
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
787
|
+
const len0 = WASM_VECTOR_LEN;
|
788
|
+
const ret = wasm.clientid_new(ptr0, len0);
|
789
|
+
this.__wbg_ptr = ret >>> 0;
|
790
|
+
ClientIdFinalization.register(this, this.__wbg_ptr, this);
|
791
|
+
return this;
|
792
|
+
}
|
793
|
+
as_bytes() {
|
794
|
+
const ret = wasm.clientid_as_bytes(this.__wbg_ptr);
|
795
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
796
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
797
|
+
return v1;
|
798
|
+
}
|
799
|
+
}
|
627
800
|
var CommitBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_commitbundle_free(ptr >>> 0, 1));
|
628
801
|
|
629
802
|
class CommitBundle {
|
@@ -644,18 +817,40 @@ class CommitBundle {
|
|
644
817
|
const ptr = this.__destroy_into_raw();
|
645
818
|
wasm.__wbg_commitbundle_free(ptr, 0);
|
646
819
|
}
|
820
|
+
get welcome() {
|
821
|
+
const ret = wasm.__wbg_get_commitbundle_welcome(this.__wbg_ptr);
|
822
|
+
let v1;
|
823
|
+
if (ret[0] !== 0) {
|
824
|
+
v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
825
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
826
|
+
}
|
827
|
+
return v1;
|
828
|
+
}
|
829
|
+
set welcome(arg0) {
|
830
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
831
|
+
var len0 = WASM_VECTOR_LEN;
|
832
|
+
wasm.__wbg_set_commitbundle_welcome(this.__wbg_ptr, ptr0, len0);
|
833
|
+
}
|
647
834
|
get commit() {
|
648
|
-
const ret = wasm.
|
649
|
-
|
835
|
+
const ret = wasm.__wbg_get_commitbundle_commit(this.__wbg_ptr);
|
836
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
837
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
838
|
+
return v1;
|
650
839
|
}
|
651
|
-
|
652
|
-
const
|
653
|
-
|
840
|
+
set commit(arg0) {
|
841
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
842
|
+
const len0 = WASM_VECTOR_LEN;
|
843
|
+
wasm.__wbg_set_commitbundle_commit(this.__wbg_ptr, ptr0, len0);
|
654
844
|
}
|
655
845
|
get group_info() {
|
656
|
-
const ret = wasm.
|
846
|
+
const ret = wasm.__wbg_get_commitbundle_group_info(this.__wbg_ptr);
|
657
847
|
return GroupInfoBundle.__wrap(ret);
|
658
848
|
}
|
849
|
+
set group_info(arg0) {
|
850
|
+
_assertClass(arg0, GroupInfoBundle);
|
851
|
+
var ptr0 = arg0.__destroy_into_raw();
|
852
|
+
wasm.__wbg_set_commitbundle_group_info(this.__wbg_ptr, ptr0);
|
853
|
+
}
|
659
854
|
}
|
660
855
|
var ConversationConfigurationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_conversationconfiguration_free(ptr >>> 0, 1));
|
661
856
|
|
@@ -670,10 +865,23 @@ class ConversationConfiguration {
|
|
670
865
|
const ptr = this.__destroy_into_raw();
|
671
866
|
wasm.__wbg_conversationconfiguration_free(ptr, 0);
|
672
867
|
}
|
868
|
+
get ciphersuite() {
|
869
|
+
const ret = wasm.__wbg_get_conversationconfiguration_ciphersuite(this.__wbg_ptr);
|
870
|
+
return ret === 0 ? undefined : Ciphersuite2.__wrap(ret);
|
871
|
+
}
|
872
|
+
get custom() {
|
873
|
+
const ret = wasm.__wbg_get_conversationconfiguration_custom(this.__wbg_ptr);
|
874
|
+
return CustomConfiguration.__wrap(ret);
|
875
|
+
}
|
673
876
|
constructor(ciphersuite, external_senders, key_rotation_span, wire_policy) {
|
674
|
-
|
675
|
-
|
676
|
-
|
877
|
+
let ptr0 = 0;
|
878
|
+
if (!isLikeNone(ciphersuite)) {
|
879
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
880
|
+
ptr0 = ciphersuite.__destroy_into_raw();
|
881
|
+
}
|
882
|
+
var ptr1 = isLikeNone(external_senders) ? 0 : passArrayJsValueToWasm0(external_senders, wasm.__wbindgen_malloc);
|
883
|
+
var len1 = WASM_VECTOR_LEN;
|
884
|
+
const ret = wasm.conversationconfiguration_new(ptr0, ptr1, len1, isLikeNone(key_rotation_span) ? 4294967297 : key_rotation_span >>> 0, isLikeNone(wire_policy) ? 0 : wire_policy);
|
677
885
|
if (ret[2]) {
|
678
886
|
throw takeFromExternrefTable0(ret[1]);
|
679
887
|
}
|
@@ -683,15 +891,9 @@ class ConversationConfiguration {
|
|
683
891
|
}
|
684
892
|
get externalSenders() {
|
685
893
|
const ret = wasm.conversationconfiguration_externalSenders(this.__wbg_ptr);
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
const ret = wasm.__wbg_get_conversationconfiguration_ciphersuite(this.__wbg_ptr);
|
690
|
-
return ret === 0 ? undefined : ret;
|
691
|
-
}
|
692
|
-
get custom() {
|
693
|
-
const ret = wasm.__wbg_get_conversationconfiguration_custom(this.__wbg_ptr);
|
694
|
-
return CustomConfiguration.__wrap(ret);
|
894
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
895
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
896
|
+
return v1;
|
695
897
|
}
|
696
898
|
}
|
697
899
|
var CoreCryptoFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_corecrypto_free(ptr >>> 0, 1));
|
@@ -714,32 +916,50 @@ class CoreCrypto {
|
|
714
916
|
const ptr = this.__destroy_into_raw();
|
715
917
|
wasm.__wbg_corecrypto_free(ptr, 0);
|
716
918
|
}
|
717
|
-
|
718
|
-
|
919
|
+
client_public_key(ciphersuite, credential_type) {
|
920
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
921
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
922
|
+
const ret = wasm.corecrypto_client_public_key(this.__wbg_ptr, ptr0, credential_type);
|
719
923
|
return ret;
|
720
924
|
}
|
721
|
-
|
722
|
-
const ret = wasm.
|
925
|
+
transaction(command) {
|
926
|
+
const ret = wasm.corecrypto_transaction(this.__wbg_ptr, command);
|
723
927
|
return ret;
|
724
928
|
}
|
725
|
-
|
726
|
-
const ret = wasm.
|
929
|
+
conversation_epoch(conversation_id) {
|
930
|
+
const ret = wasm.corecrypto_conversation_epoch(this.__wbg_ptr, conversation_id);
|
931
|
+
return ret;
|
932
|
+
}
|
933
|
+
conversation_ciphersuite(conversation_id) {
|
934
|
+
const ret = wasm.corecrypto_conversation_ciphersuite(this.__wbg_ptr, conversation_id);
|
935
|
+
return ret;
|
936
|
+
}
|
937
|
+
conversation_exists(conversation_id) {
|
938
|
+
const ret = wasm.corecrypto_conversation_exists(this.__wbg_ptr, conversation_id);
|
939
|
+
return ret;
|
940
|
+
}
|
941
|
+
get_client_ids(conversation_id) {
|
942
|
+
const ret = wasm.corecrypto_get_client_ids(this.__wbg_ptr, conversation_id);
|
943
|
+
return ret;
|
944
|
+
}
|
945
|
+
get_external_sender(conversation_id) {
|
946
|
+
const ret = wasm.corecrypto_get_external_sender(this.__wbg_ptr, conversation_id);
|
947
|
+
return ret;
|
948
|
+
}
|
949
|
+
export_secret_key(conversation_id, key_length) {
|
950
|
+
const ret = wasm.corecrypto_export_secret_key(this.__wbg_ptr, conversation_id, key_length);
|
727
951
|
return ret;
|
728
952
|
}
|
729
953
|
get_device_identities(conversation_id, device_ids) {
|
730
|
-
const ptr0 =
|
954
|
+
const ptr0 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
|
731
955
|
const len0 = WASM_VECTOR_LEN;
|
732
|
-
const
|
733
|
-
const len1 = WASM_VECTOR_LEN;
|
734
|
-
const ret = wasm.corecrypto_get_device_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
956
|
+
const ret = wasm.corecrypto_get_device_identities(this.__wbg_ptr, conversation_id, ptr0, len0);
|
735
957
|
return ret;
|
736
958
|
}
|
737
959
|
get_user_identities(conversation_id, user_ids) {
|
738
|
-
const ptr0 =
|
960
|
+
const ptr0 = passArrayJsValueToWasm0(user_ids, wasm.__wbindgen_malloc);
|
739
961
|
const len0 = WASM_VECTOR_LEN;
|
740
|
-
const
|
741
|
-
const len1 = WASM_VECTOR_LEN;
|
742
|
-
const ret = wasm.corecrypto_get_user_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
962
|
+
const ret = wasm.corecrypto_get_user_identities(this.__wbg_ptr, conversation_id, ptr0, len0);
|
743
963
|
return ret;
|
744
964
|
}
|
745
965
|
get_credential_in_use(group_info, credential_type) {
|
@@ -748,57 +968,28 @@ class CoreCrypto {
|
|
748
968
|
const ret = wasm.corecrypto_get_credential_in_use(this.__wbg_ptr, ptr0, len0, credential_type);
|
749
969
|
return ret;
|
750
970
|
}
|
751
|
-
|
752
|
-
|
753
|
-
let deferred1_1;
|
754
|
-
try {
|
755
|
-
const ret = wasm.corecrypto_version();
|
756
|
-
deferred1_0 = ret[0];
|
757
|
-
deferred1_1 = ret[1];
|
758
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
759
|
-
} finally {
|
760
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
761
|
-
}
|
762
|
-
}
|
763
|
-
static build_metadata() {
|
764
|
-
const ret = wasm.corecrypto_build_metadata();
|
765
|
-
return BuildMetadata.__wrap(ret);
|
766
|
-
}
|
767
|
-
static _internal_new(path, key, client_id, ciphersuites, entropy_seed, nb_key_package) {
|
768
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
769
|
-
const len0 = WASM_VECTOR_LEN;
|
770
|
-
const ptr1 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
771
|
-
const len1 = WASM_VECTOR_LEN;
|
772
|
-
const ptr2 = passArray8ToWasm0(client_id, wasm.__wbindgen_malloc);
|
773
|
-
const len2 = WASM_VECTOR_LEN;
|
774
|
-
const ptr3 = passArray16ToWasm0(ciphersuites, wasm.__wbindgen_malloc);
|
775
|
-
const len3 = WASM_VECTOR_LEN;
|
776
|
-
var ptr4 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
777
|
-
var len4 = WASM_VECTOR_LEN;
|
778
|
-
const ret = wasm.corecrypto__internal_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
971
|
+
e2ei_dump_pki_env() {
|
972
|
+
const ret = wasm.corecrypto_e2ei_dump_pki_env(this.__wbg_ptr);
|
779
973
|
return ret;
|
780
974
|
}
|
781
|
-
|
782
|
-
const
|
783
|
-
const len0 = WASM_VECTOR_LEN;
|
784
|
-
const ptr1 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
785
|
-
const len1 = WASM_VECTOR_LEN;
|
786
|
-
var ptr2 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
787
|
-
var len2 = WASM_VECTOR_LEN;
|
788
|
-
const ret = wasm.corecrypto_deferred_init(ptr0, len0, ptr1, len1, ptr2, len2);
|
975
|
+
e2ei_is_pki_env_setup() {
|
976
|
+
const ret = wasm.corecrypto_e2ei_is_pki_env_setup(this.__wbg_ptr);
|
789
977
|
return ret;
|
790
978
|
}
|
791
|
-
|
792
|
-
|
793
|
-
|
979
|
+
e2ei_is_enabled(ciphersuite) {
|
980
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
981
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
982
|
+
const ret = wasm.corecrypto_e2ei_is_enabled(this.__wbg_ptr, ptr0);
|
983
|
+
return ret;
|
794
984
|
}
|
795
|
-
|
796
|
-
|
797
|
-
|
985
|
+
register_epoch_observer(epoch_observer) {
|
986
|
+
_assertClass(epoch_observer, EpochObserver);
|
987
|
+
var ptr0 = epoch_observer.__destroy_into_raw();
|
988
|
+
const ret = wasm.corecrypto_register_epoch_observer(this.__wbg_ptr, ptr0);
|
798
989
|
return ret;
|
799
990
|
}
|
800
991
|
static set_logger(logger) {
|
801
|
-
_assertClass(logger,
|
992
|
+
_assertClass(logger, CoreCryptoLogger);
|
802
993
|
var ptr0 = logger.__destroy_into_raw();
|
803
994
|
wasm.corecrypto_set_logger(ptr0);
|
804
995
|
}
|
@@ -806,56 +997,17 @@ class CoreCrypto {
|
|
806
997
|
wasm.corecrypto_set_max_log_level(level);
|
807
998
|
}
|
808
999
|
provide_transport(callbacks) {
|
809
|
-
_assertClass(callbacks,
|
1000
|
+
_assertClass(callbacks, MlsTransport);
|
810
1001
|
var ptr0 = callbacks.__destroy_into_raw();
|
811
1002
|
const ret = wasm.corecrypto_provide_transport(this.__wbg_ptr, ptr0);
|
812
1003
|
return ret;
|
813
1004
|
}
|
814
|
-
|
815
|
-
const
|
1005
|
+
proteus_session_exists(session_id) {
|
1006
|
+
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1007
|
+
const len0 = WASM_VECTOR_LEN;
|
1008
|
+
const ret = wasm.corecrypto_proteus_session_exists(this.__wbg_ptr, ptr0, len0);
|
816
1009
|
return ret;
|
817
1010
|
}
|
818
|
-
conversation_epoch(conversation_id) {
|
819
|
-
const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
|
820
|
-
const len0 = WASM_VECTOR_LEN;
|
821
|
-
const ret = wasm.corecrypto_conversation_epoch(this.__wbg_ptr, ptr0, len0);
|
822
|
-
return ret;
|
823
|
-
}
|
824
|
-
conversation_ciphersuite(conversation_id) {
|
825
|
-
const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
|
826
|
-
const len0 = WASM_VECTOR_LEN;
|
827
|
-
const ret = wasm.corecrypto_conversation_ciphersuite(this.__wbg_ptr, ptr0, len0);
|
828
|
-
return ret;
|
829
|
-
}
|
830
|
-
conversation_exists(conversation_id) {
|
831
|
-
const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
|
832
|
-
const len0 = WASM_VECTOR_LEN;
|
833
|
-
const ret = wasm.corecrypto_conversation_exists(this.__wbg_ptr, ptr0, len0);
|
834
|
-
return ret;
|
835
|
-
}
|
836
|
-
random_bytes(len) {
|
837
|
-
const ret = wasm.corecrypto_random_bytes(this.__wbg_ptr, len);
|
838
|
-
return ret;
|
839
|
-
}
|
840
|
-
reseed_rng(seed) {
|
841
|
-
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
842
|
-
const len0 = WASM_VECTOR_LEN;
|
843
|
-
const ret = wasm.corecrypto_reseed_rng(this.__wbg_ptr, ptr0, len0);
|
844
|
-
return ret;
|
845
|
-
}
|
846
|
-
proteus_session_exists(session_id) {
|
847
|
-
const ptr0 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
848
|
-
const len0 = WASM_VECTOR_LEN;
|
849
|
-
const ret = wasm.corecrypto_proteus_session_exists(this.__wbg_ptr, ptr0, len0);
|
850
|
-
return ret;
|
851
|
-
}
|
852
|
-
static proteus_last_resort_prekey_id() {
|
853
|
-
const ret = wasm.corecrypto_proteus_last_resort_prekey_id();
|
854
|
-
if (ret[2]) {
|
855
|
-
throw takeFromExternrefTable0(ret[1]);
|
856
|
-
}
|
857
|
-
return ret[0];
|
858
|
-
}
|
859
1011
|
proteus_fingerprint() {
|
860
1012
|
const ret = wasm.corecrypto_proteus_fingerprint(this.__wbg_ptr);
|
861
1013
|
return ret;
|
@@ -872,6 +1024,13 @@ class CoreCrypto {
|
|
872
1024
|
const ret = wasm.corecrypto_proteus_fingerprint_remote(this.__wbg_ptr, ptr0, len0);
|
873
1025
|
return ret;
|
874
1026
|
}
|
1027
|
+
static proteus_last_resort_prekey_id() {
|
1028
|
+
const ret = wasm.corecrypto_proteus_last_resort_prekey_id();
|
1029
|
+
if (ret[2]) {
|
1030
|
+
throw takeFromExternrefTable0(ret[1]);
|
1031
|
+
}
|
1032
|
+
return ret[0];
|
1033
|
+
}
|
875
1034
|
static proteus_fingerprint_prekeybundle(prekey) {
|
876
1035
|
let deferred3_0;
|
877
1036
|
let deferred3_1;
|
@@ -893,30 +1052,50 @@ class CoreCrypto {
|
|
893
1052
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
894
1053
|
}
|
895
1054
|
}
|
896
|
-
|
897
|
-
const
|
1055
|
+
random_bytes(len) {
|
1056
|
+
const ret = wasm.corecrypto_random_bytes(this.__wbg_ptr, len);
|
1057
|
+
return ret;
|
1058
|
+
}
|
1059
|
+
reseed_rng(seed) {
|
1060
|
+
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
898
1061
|
const len0 = WASM_VECTOR_LEN;
|
899
|
-
const ret = wasm.
|
1062
|
+
const ret = wasm.corecrypto_reseed_rng(this.__wbg_ptr, ptr0, len0);
|
900
1063
|
return ret;
|
901
1064
|
}
|
902
|
-
|
903
|
-
const ptr0 =
|
1065
|
+
static async_new(path, key, client_id, ciphersuites, entropy_seed, nb_key_package) {
|
1066
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
904
1067
|
const len0 = WASM_VECTOR_LEN;
|
905
|
-
|
1068
|
+
_assertClass(key, DatabaseKey);
|
1069
|
+
var ptr1 = key.__destroy_into_raw();
|
1070
|
+
var ptr2 = isLikeNone(client_id) ? 0 : passArray8ToWasm0(client_id, wasm.__wbindgen_malloc);
|
1071
|
+
var len2 = WASM_VECTOR_LEN;
|
1072
|
+
let ptr3 = 0;
|
1073
|
+
if (!isLikeNone(ciphersuites)) {
|
1074
|
+
_assertClass(ciphersuites, Ciphersuites);
|
1075
|
+
ptr3 = ciphersuites.__destroy_into_raw();
|
1076
|
+
}
|
1077
|
+
var ptr4 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
1078
|
+
var len4 = WASM_VECTOR_LEN;
|
1079
|
+
const ret = wasm.corecrypto_async_new(ptr0, len0, ptr1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
906
1080
|
return ret;
|
907
1081
|
}
|
908
|
-
|
909
|
-
const ptr0 =
|
1082
|
+
static deferred_init(path, key, entropy_seed) {
|
1083
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
910
1084
|
const len0 = WASM_VECTOR_LEN;
|
911
|
-
|
1085
|
+
_assertClass(key, DatabaseKey);
|
1086
|
+
var ptr1 = key.__destroy_into_raw();
|
1087
|
+
var ptr2 = isLikeNone(entropy_seed) ? 0 : passArray8ToWasm0(entropy_seed, wasm.__wbindgen_malloc);
|
1088
|
+
var len2 = WASM_VECTOR_LEN;
|
1089
|
+
const ret = wasm.corecrypto_deferred_init(ptr0, len0, ptr1, ptr2, len2);
|
912
1090
|
return ret;
|
913
1091
|
}
|
914
|
-
|
915
|
-
const
|
1092
|
+
close() {
|
1093
|
+
const ptr = this.__destroy_into_raw();
|
1094
|
+
const ret = wasm.corecrypto_close(ptr);
|
916
1095
|
return ret;
|
917
1096
|
}
|
918
|
-
|
919
|
-
const ret = wasm.
|
1097
|
+
can_close() {
|
1098
|
+
const ret = wasm.corecrypto_can_close(this.__wbg_ptr);
|
920
1099
|
return ret;
|
921
1100
|
}
|
922
1101
|
}
|
@@ -940,82 +1119,214 @@ class CoreCryptoContext {
|
|
940
1119
|
const ptr = this.__destroy_into_raw();
|
941
1120
|
wasm.__wbg_corecryptocontext_free(ptr, 0);
|
942
1121
|
}
|
943
|
-
|
944
|
-
const ptr0 =
|
1122
|
+
e2ei_new_enrollment(client_id, display_name, handle, team, expiry_sec, ciphersuite) {
|
1123
|
+
const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
945
1124
|
const len0 = WASM_VECTOR_LEN;
|
946
|
-
const
|
1125
|
+
const ptr1 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1126
|
+
const len1 = WASM_VECTOR_LEN;
|
1127
|
+
const ptr2 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1128
|
+
const len2 = WASM_VECTOR_LEN;
|
1129
|
+
var ptr3 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1130
|
+
var len3 = WASM_VECTOR_LEN;
|
1131
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1132
|
+
var ptr4 = ciphersuite.__destroy_into_raw();
|
1133
|
+
const ret = wasm.corecryptocontext_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_sec, ptr4);
|
947
1134
|
return ret;
|
948
1135
|
}
|
949
|
-
|
950
|
-
const
|
1136
|
+
e2ei_new_activation_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
1137
|
+
const ptr0 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1138
|
+
const len0 = WASM_VECTOR_LEN;
|
1139
|
+
const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1140
|
+
const len1 = WASM_VECTOR_LEN;
|
1141
|
+
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1142
|
+
var len2 = WASM_VECTOR_LEN;
|
1143
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1144
|
+
var ptr3 = ciphersuite.__destroy_into_raw();
|
1145
|
+
const ret = wasm.corecryptocontext_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ptr3);
|
951
1146
|
return ret;
|
952
1147
|
}
|
953
|
-
|
954
|
-
|
1148
|
+
e2ei_new_rotate_enrollment(display_name, handle, team, expiry_sec, ciphersuite) {
|
1149
|
+
var ptr0 = isLikeNone(display_name) ? 0 : passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1150
|
+
var len0 = WASM_VECTOR_LEN;
|
1151
|
+
var ptr1 = isLikeNone(handle) ? 0 : passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1152
|
+
var len1 = WASM_VECTOR_LEN;
|
1153
|
+
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1154
|
+
var len2 = WASM_VECTOR_LEN;
|
1155
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1156
|
+
var ptr3 = ciphersuite.__destroy_into_raw();
|
1157
|
+
const ret = wasm.corecryptocontext_e2ei_new_rotate_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ptr3);
|
1158
|
+
return ret;
|
1159
|
+
}
|
1160
|
+
e2ei_register_acme_ca(trust_anchor_pem) {
|
1161
|
+
const ptr0 = passStringToWasm0(trust_anchor_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
955
1162
|
const len0 = WASM_VECTOR_LEN;
|
956
|
-
const
|
957
|
-
const len1 = WASM_VECTOR_LEN;
|
958
|
-
const ret = wasm.corecryptocontext_mls_init(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
1163
|
+
const ret = wasm.corecryptocontext_e2ei_register_acme_ca(this.__wbg_ptr, ptr0, len0);
|
959
1164
|
return ret;
|
960
1165
|
}
|
961
|
-
|
962
|
-
const ptr0 =
|
1166
|
+
e2ei_register_intermediate_ca(cert_pem) {
|
1167
|
+
const ptr0 = passStringToWasm0(cert_pem, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
963
1168
|
const len0 = WASM_VECTOR_LEN;
|
964
|
-
const ret = wasm.
|
1169
|
+
const ret = wasm.corecryptocontext_e2ei_register_intermediate_ca(this.__wbg_ptr, ptr0, len0);
|
965
1170
|
return ret;
|
966
1171
|
}
|
967
|
-
|
968
|
-
const ptr0 =
|
1172
|
+
e2ei_register_crl(crl_dp, crl_der) {
|
1173
|
+
const ptr0 = passStringToWasm0(crl_dp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
969
1174
|
const len0 = WASM_VECTOR_LEN;
|
970
|
-
const ptr1 =
|
1175
|
+
const ptr1 = passArray8ToWasm0(crl_der, wasm.__wbindgen_malloc);
|
971
1176
|
const len1 = WASM_VECTOR_LEN;
|
972
|
-
const
|
973
|
-
const len2 = WASM_VECTOR_LEN;
|
974
|
-
const ret = wasm.corecryptocontext_mls_init_with_client_id(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
1177
|
+
const ret = wasm.corecryptocontext_e2ei_register_crl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
975
1178
|
return ret;
|
976
1179
|
}
|
977
|
-
|
978
|
-
|
1180
|
+
e2ei_mls_init_only(enrollment, certificate_chain, nb_key_package) {
|
1181
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
1182
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
1183
|
+
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1184
|
+
const len1 = WASM_VECTOR_LEN;
|
1185
|
+
const ret = wasm.corecryptocontext_e2ei_mls_init_only(this.__wbg_ptr, ptr0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
979
1186
|
return ret;
|
980
1187
|
}
|
981
|
-
|
982
|
-
const ret = wasm.
|
1188
|
+
e2ei_rotate(conversation_id) {
|
1189
|
+
const ret = wasm.corecryptocontext_e2ei_rotate(this.__wbg_ptr, conversation_id);
|
983
1190
|
return ret;
|
984
1191
|
}
|
985
|
-
|
986
|
-
|
1192
|
+
save_x509_credential(enrollment, certificate_chain) {
|
1193
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
1194
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
1195
|
+
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1196
|
+
const len1 = WASM_VECTOR_LEN;
|
1197
|
+
const ret = wasm.corecryptocontext_save_x509_credential(this.__wbg_ptr, ptr0, ptr1, len1);
|
987
1198
|
return ret;
|
988
1199
|
}
|
989
|
-
|
990
|
-
|
1200
|
+
delete_stale_key_packages(ciphersuite) {
|
1201
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1202
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
1203
|
+
const ret = wasm.corecryptocontext_delete_stale_key_packages(this.__wbg_ptr, ptr0);
|
1204
|
+
return ret;
|
1205
|
+
}
|
1206
|
+
e2ei_enrollment_stash(enrollment) {
|
1207
|
+
_assertClass(enrollment, FfiWireE2EIdentity);
|
1208
|
+
var ptr0 = enrollment.__destroy_into_raw();
|
1209
|
+
const ret = wasm.corecryptocontext_e2ei_enrollment_stash(this.__wbg_ptr, ptr0);
|
1210
|
+
return ret;
|
1211
|
+
}
|
1212
|
+
e2ei_enrollment_stash_pop(handle) {
|
1213
|
+
const ptr0 = passArray8ToWasm0(handle, wasm.__wbindgen_malloc);
|
991
1214
|
const len0 = WASM_VECTOR_LEN;
|
992
|
-
const ret = wasm.
|
1215
|
+
const ret = wasm.corecryptocontext_e2ei_enrollment_stash_pop(this.__wbg_ptr, ptr0, len0);
|
993
1216
|
return ret;
|
994
1217
|
}
|
995
|
-
|
996
|
-
const
|
1218
|
+
e2ei_conversation_state(conversation_id) {
|
1219
|
+
const ret = wasm.corecryptocontext_e2ei_conversation_state(this.__wbg_ptr, conversation_id);
|
1220
|
+
return ret;
|
1221
|
+
}
|
1222
|
+
e2ei_is_enabled(ciphersuite) {
|
1223
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1224
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
1225
|
+
const ret = wasm.corecryptocontext_e2ei_is_enabled(this.__wbg_ptr, ptr0);
|
1226
|
+
return ret;
|
1227
|
+
}
|
1228
|
+
get_device_identities(conversation_id, device_ids) {
|
1229
|
+
const ptr0 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
|
997
1230
|
const len0 = WASM_VECTOR_LEN;
|
998
|
-
|
999
|
-
var ptr1 = config.__destroy_into_raw();
|
1000
|
-
const ret = wasm.corecryptocontext_create_conversation(this.__wbg_ptr, ptr0, len0, creator_credential_type, ptr1);
|
1231
|
+
const ret = wasm.corecryptocontext_get_device_identities(this.__wbg_ptr, conversation_id, ptr0, len0);
|
1001
1232
|
return ret;
|
1002
1233
|
}
|
1003
|
-
|
1004
|
-
const ptr0 =
|
1234
|
+
get_user_identities(conversation_id, user_ids) {
|
1235
|
+
const ptr0 = passArrayJsValueToWasm0(user_ids, wasm.__wbindgen_malloc);
|
1005
1236
|
const len0 = WASM_VECTOR_LEN;
|
1006
|
-
const ret = wasm.
|
1237
|
+
const ret = wasm.corecryptocontext_get_user_identities(this.__wbg_ptr, conversation_id, ptr0, len0);
|
1007
1238
|
return ret;
|
1008
1239
|
}
|
1009
|
-
|
1010
|
-
const ptr0 = passArray8ToWasm0(
|
1240
|
+
get_credential_in_use(group_info, credential_type) {
|
1241
|
+
const ptr0 = passArray8ToWasm0(group_info, wasm.__wbindgen_malloc);
|
1011
1242
|
const len0 = WASM_VECTOR_LEN;
|
1012
|
-
const ret = wasm.
|
1243
|
+
const ret = wasm.corecryptocontext_get_credential_in_use(this.__wbg_ptr, ptr0, len0, credential_type);
|
1244
|
+
return ret;
|
1245
|
+
}
|
1246
|
+
e2ei_dump_pki_env() {
|
1247
|
+
const ret = wasm.corecryptocontext_e2ei_dump_pki_env(this.__wbg_ptr);
|
1248
|
+
return ret;
|
1249
|
+
}
|
1250
|
+
e2ei_is_pki_env_setup() {
|
1251
|
+
const ret = wasm.corecryptocontext_e2ei_is_pki_env_setup(this.__wbg_ptr);
|
1252
|
+
return ret;
|
1253
|
+
}
|
1254
|
+
mls_init(client_id, ciphersuites, nb_key_package) {
|
1255
|
+
_assertClass(client_id, ClientId);
|
1256
|
+
var ptr0 = client_id.__destroy_into_raw();
|
1257
|
+
_assertClass(ciphersuites, Ciphersuites);
|
1258
|
+
var ptr1 = ciphersuites.__destroy_into_raw();
|
1259
|
+
const ret = wasm.corecryptocontext_mls_init(this.__wbg_ptr, ptr0, ptr1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
1260
|
+
return ret;
|
1261
|
+
}
|
1262
|
+
mls_generate_keypairs(ciphersuites) {
|
1263
|
+
_assertClass(ciphersuites, Ciphersuites);
|
1264
|
+
var ptr0 = ciphersuites.__destroy_into_raw();
|
1265
|
+
const ret = wasm.corecryptocontext_mls_generate_keypairs(this.__wbg_ptr, ptr0);
|
1266
|
+
return ret;
|
1267
|
+
}
|
1268
|
+
mls_init_with_client_id(client_id, tmp_client_ids, ciphersuites) {
|
1269
|
+
_assertClass(client_id, ClientId);
|
1270
|
+
var ptr0 = client_id.__destroy_into_raw();
|
1271
|
+
const ptr1 = passArrayJsValueToWasm0(tmp_client_ids, wasm.__wbindgen_malloc);
|
1272
|
+
const len1 = WASM_VECTOR_LEN;
|
1273
|
+
_assertClass(ciphersuites, Ciphersuites);
|
1274
|
+
var ptr2 = ciphersuites.__destroy_into_raw();
|
1275
|
+
const ret = wasm.corecryptocontext_mls_init_with_client_id(this.__wbg_ptr, ptr0, ptr1, len1, ptr2);
|
1276
|
+
return ret;
|
1277
|
+
}
|
1278
|
+
client_public_key(ciphersuite, credential_type) {
|
1279
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1280
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
1281
|
+
const ret = wasm.corecryptocontext_client_public_key(this.__wbg_ptr, ptr0, credential_type);
|
1282
|
+
return ret;
|
1283
|
+
}
|
1284
|
+
conversation_epoch(conversation_id) {
|
1285
|
+
const ret = wasm.corecryptocontext_conversation_epoch(this.__wbg_ptr, conversation_id);
|
1286
|
+
return ret;
|
1287
|
+
}
|
1288
|
+
conversation_ciphersuite(conversation_id) {
|
1289
|
+
const ret = wasm.corecryptocontext_conversation_ciphersuite(this.__wbg_ptr, conversation_id);
|
1013
1290
|
return ret;
|
1014
1291
|
}
|
1015
1292
|
conversation_exists(conversation_id) {
|
1016
|
-
const
|
1017
|
-
|
1018
|
-
|
1293
|
+
const ret = wasm.corecryptocontext_conversation_exists(this.__wbg_ptr, conversation_id);
|
1294
|
+
return ret;
|
1295
|
+
}
|
1296
|
+
get_client_ids(conversation_id) {
|
1297
|
+
const ret = wasm.corecryptocontext_get_client_ids(this.__wbg_ptr, conversation_id);
|
1298
|
+
return ret;
|
1299
|
+
}
|
1300
|
+
export_secret_key(conversation_id, key_length) {
|
1301
|
+
const ret = wasm.corecryptocontext_export_secret_key(this.__wbg_ptr, conversation_id, key_length);
|
1302
|
+
return ret;
|
1303
|
+
}
|
1304
|
+
get_external_sender(conversation_id) {
|
1305
|
+
const ret = wasm.corecryptocontext_get_external_sender(this.__wbg_ptr, conversation_id);
|
1306
|
+
return ret;
|
1307
|
+
}
|
1308
|
+
client_keypackages(ciphersuite, credential_type, amount_requested) {
|
1309
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1310
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
1311
|
+
const ret = wasm.corecryptocontext_client_keypackages(this.__wbg_ptr, ptr0, credential_type, amount_requested);
|
1312
|
+
return ret;
|
1313
|
+
}
|
1314
|
+
client_valid_keypackages_count(ciphersuite, credential_type) {
|
1315
|
+
_assertClass(ciphersuite, Ciphersuite2);
|
1316
|
+
var ptr0 = ciphersuite.__destroy_into_raw();
|
1317
|
+
const ret = wasm.corecryptocontext_client_valid_keypackages_count(this.__wbg_ptr, ptr0, credential_type);
|
1318
|
+
return ret;
|
1319
|
+
}
|
1320
|
+
delete_keypackages(refs) {
|
1321
|
+
_assertClass(refs, ArrayOfByteArray);
|
1322
|
+
var ptr0 = refs.__destroy_into_raw();
|
1323
|
+
const ret = wasm.corecryptocontext_delete_keypackages(this.__wbg_ptr, ptr0);
|
1324
|
+
return ret;
|
1325
|
+
}
|
1326
|
+
create_conversation(conversation_id, creator_credential_type, config) {
|
1327
|
+
_assertClass(config, ConversationConfiguration);
|
1328
|
+
var ptr0 = config.__destroy_into_raw();
|
1329
|
+
const ret = wasm.corecryptocontext_create_conversation(this.__wbg_ptr, conversation_id, creator_credential_type, ptr0);
|
1019
1330
|
return ret;
|
1020
1331
|
}
|
1021
1332
|
process_welcome_message(welcome_message, custom_configuration) {
|
@@ -1027,61 +1338,43 @@ class CoreCryptoContext {
|
|
1027
1338
|
return ret;
|
1028
1339
|
}
|
1029
1340
|
add_clients_to_conversation(conversation_id, key_packages) {
|
1030
|
-
|
1031
|
-
|
1032
|
-
const
|
1033
|
-
const len1 = WASM_VECTOR_LEN;
|
1034
|
-
const ret = wasm.corecryptocontext_add_clients_to_conversation(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1341
|
+
_assertClass(key_packages, ArrayOfByteArray);
|
1342
|
+
var ptr0 = key_packages.__destroy_into_raw();
|
1343
|
+
const ret = wasm.corecryptocontext_add_clients_to_conversation(this.__wbg_ptr, conversation_id, ptr0);
|
1035
1344
|
return ret;
|
1036
1345
|
}
|
1037
1346
|
remove_clients_from_conversation(conversation_id, clients) {
|
1038
|
-
const ptr0 =
|
1347
|
+
const ptr0 = passArrayJsValueToWasm0(clients, wasm.__wbindgen_malloc);
|
1039
1348
|
const len0 = WASM_VECTOR_LEN;
|
1040
|
-
const
|
1041
|
-
const len1 = WASM_VECTOR_LEN;
|
1042
|
-
const ret = wasm.corecryptocontext_remove_clients_from_conversation(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1349
|
+
const ret = wasm.corecryptocontext_remove_clients_from_conversation(this.__wbg_ptr, conversation_id, ptr0, len0);
|
1043
1350
|
return ret;
|
1044
1351
|
}
|
1045
1352
|
mark_conversation_as_child_of(child_id, parent_id) {
|
1046
|
-
const
|
1047
|
-
const len0 = WASM_VECTOR_LEN;
|
1048
|
-
const ptr1 = passArray8ToWasm0(parent_id, wasm.__wbindgen_malloc);
|
1049
|
-
const len1 = WASM_VECTOR_LEN;
|
1050
|
-
const ret = wasm.corecryptocontext_mark_conversation_as_child_of(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1353
|
+
const ret = wasm.corecryptocontext_mark_conversation_as_child_of(this.__wbg_ptr, child_id, parent_id);
|
1051
1354
|
return ret;
|
1052
1355
|
}
|
1053
1356
|
update_keying_material(conversation_id) {
|
1054
|
-
const
|
1055
|
-
const len0 = WASM_VECTOR_LEN;
|
1056
|
-
const ret = wasm.corecryptocontext_update_keying_material(this.__wbg_ptr, ptr0, len0);
|
1357
|
+
const ret = wasm.corecryptocontext_update_keying_material(this.__wbg_ptr, conversation_id);
|
1057
1358
|
return ret;
|
1058
1359
|
}
|
1059
1360
|
commit_pending_proposals(conversation_id) {
|
1060
|
-
const
|
1061
|
-
const len0 = WASM_VECTOR_LEN;
|
1062
|
-
const ret = wasm.corecryptocontext_commit_pending_proposals(this.__wbg_ptr, ptr0, len0);
|
1361
|
+
const ret = wasm.corecryptocontext_commit_pending_proposals(this.__wbg_ptr, conversation_id);
|
1063
1362
|
return ret;
|
1064
1363
|
}
|
1065
1364
|
wipe_conversation(conversation_id) {
|
1066
|
-
const
|
1067
|
-
const len0 = WASM_VECTOR_LEN;
|
1068
|
-
const ret = wasm.corecryptocontext_wipe_conversation(this.__wbg_ptr, ptr0, len0);
|
1365
|
+
const ret = wasm.corecryptocontext_wipe_conversation(this.__wbg_ptr, conversation_id);
|
1069
1366
|
return ret;
|
1070
1367
|
}
|
1071
1368
|
decrypt_message(conversation_id, payload) {
|
1072
|
-
const ptr0 = passArray8ToWasm0(
|
1369
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
1073
1370
|
const len0 = WASM_VECTOR_LEN;
|
1074
|
-
const
|
1075
|
-
const len1 = WASM_VECTOR_LEN;
|
1076
|
-
const ret = wasm.corecryptocontext_decrypt_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1371
|
+
const ret = wasm.corecryptocontext_decrypt_message(this.__wbg_ptr, conversation_id, ptr0, len0);
|
1077
1372
|
return ret;
|
1078
1373
|
}
|
1079
1374
|
encrypt_message(conversation_id, message) {
|
1080
|
-
const ptr0 = passArray8ToWasm0(
|
1375
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
1081
1376
|
const len0 = WASM_VECTOR_LEN;
|
1082
|
-
const
|
1083
|
-
const len1 = WASM_VECTOR_LEN;
|
1084
|
-
const ret = wasm.corecryptocontext_encrypt_message(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1377
|
+
const ret = wasm.corecryptocontext_encrypt_message(this.__wbg_ptr, conversation_id, ptr0, len0);
|
1085
1378
|
return ret;
|
1086
1379
|
}
|
1087
1380
|
join_by_external_commit(group_info, custom_configuration, credential_type) {
|
@@ -1092,28 +1385,6 @@ class CoreCryptoContext {
|
|
1092
1385
|
const ret = wasm.corecryptocontext_join_by_external_commit(this.__wbg_ptr, ptr0, len0, ptr1, credential_type);
|
1093
1386
|
return ret;
|
1094
1387
|
}
|
1095
|
-
random_bytes(len) {
|
1096
|
-
const ret = wasm.corecryptocontext_random_bytes(this.__wbg_ptr, len);
|
1097
|
-
return ret;
|
1098
|
-
}
|
1099
|
-
export_secret_key(conversation_id, key_length) {
|
1100
|
-
const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
|
1101
|
-
const len0 = WASM_VECTOR_LEN;
|
1102
|
-
const ret = wasm.corecryptocontext_export_secret_key(this.__wbg_ptr, ptr0, len0, key_length);
|
1103
|
-
return ret;
|
1104
|
-
}
|
1105
|
-
get_external_sender(id) {
|
1106
|
-
const ptr0 = passArray8ToWasm0(id, wasm.__wbindgen_malloc);
|
1107
|
-
const len0 = WASM_VECTOR_LEN;
|
1108
|
-
const ret = wasm.corecryptocontext_get_external_sender(this.__wbg_ptr, ptr0, len0);
|
1109
|
-
return ret;
|
1110
|
-
}
|
1111
|
-
get_client_ids(conversation_id) {
|
1112
|
-
const ptr0 = passArray8ToWasm0(conversation_id, wasm.__wbindgen_malloc);
|
1113
|
-
const len0 = WASM_VECTOR_LEN;
|
1114
|
-
const ret = wasm.corecryptocontext_get_client_ids(this.__wbg_ptr, ptr0, len0);
|
1115
|
-
return ret;
|
1116
|
-
}
|
1117
1388
|
proteus_init() {
|
1118
1389
|
const ret = wasm.corecryptocontext_proteus_init(this.__wbg_ptr);
|
1119
1390
|
return ret;
|
@@ -1188,13 +1459,6 @@ class CoreCryptoContext {
|
|
1188
1459
|
const ret = wasm.corecryptocontext_proteus_last_resort_prekey(this.__wbg_ptr);
|
1189
1460
|
return ret;
|
1190
1461
|
}
|
1191
|
-
static proteus_last_resort_prekey_id() {
|
1192
|
-
const ret = wasm.corecryptocontext_proteus_last_resort_prekey_id();
|
1193
|
-
if (ret[2]) {
|
1194
|
-
throw takeFromExternrefTable0(ret[1]);
|
1195
|
-
}
|
1196
|
-
return ret[0];
|
1197
|
-
}
|
1198
1462
|
proteus_fingerprint() {
|
1199
1463
|
const ret = wasm.corecryptocontext_proteus_fingerprint(this.__wbg_ptr);
|
1200
1464
|
return ret;
|
@@ -1211,6 +1475,23 @@ class CoreCryptoContext {
|
|
1211
1475
|
const ret = wasm.corecryptocontext_proteus_fingerprint_remote(this.__wbg_ptr, ptr0, len0);
|
1212
1476
|
return ret;
|
1213
1477
|
}
|
1478
|
+
proteus_cryptobox_migrate(path) {
|
1479
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1480
|
+
const len0 = WASM_VECTOR_LEN;
|
1481
|
+
const ret = wasm.corecryptocontext_proteus_cryptobox_migrate(this.__wbg_ptr, ptr0, len0);
|
1482
|
+
return ret;
|
1483
|
+
}
|
1484
|
+
proteus_reload_sessions() {
|
1485
|
+
const ret = wasm.corecryptocontext_proteus_reload_sessions(this.__wbg_ptr);
|
1486
|
+
return ret;
|
1487
|
+
}
|
1488
|
+
static proteus_last_resort_prekey_id() {
|
1489
|
+
const ret = wasm.corecryptocontext_proteus_last_resort_prekey_id();
|
1490
|
+
if (ret[2]) {
|
1491
|
+
throw takeFromExternrefTable0(ret[1]);
|
1492
|
+
}
|
1493
|
+
return ret[0];
|
1494
|
+
}
|
1214
1495
|
static proteus_fingerprint_prekeybundle(prekey) {
|
1215
1496
|
let deferred3_0;
|
1216
1497
|
let deferred3_1;
|
@@ -1232,207 +1513,288 @@ class CoreCryptoContext {
|
|
1232
1513
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
1233
1514
|
}
|
1234
1515
|
}
|
1235
|
-
|
1236
|
-
const ptr0 =
|
1516
|
+
set_data(data) {
|
1517
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
1237
1518
|
const len0 = WASM_VECTOR_LEN;
|
1238
|
-
const ret = wasm.
|
1519
|
+
const ret = wasm.corecryptocontext_set_data(this.__wbg_ptr, ptr0, len0);
|
1239
1520
|
return ret;
|
1240
1521
|
}
|
1241
|
-
|
1242
|
-
const
|
1243
|
-
const len0 = WASM_VECTOR_LEN;
|
1244
|
-
const ptr1 = passStringToWasm0(display_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1245
|
-
const len1 = WASM_VECTOR_LEN;
|
1246
|
-
const ptr2 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1247
|
-
const len2 = WASM_VECTOR_LEN;
|
1248
|
-
var ptr3 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1249
|
-
var len3 = WASM_VECTOR_LEN;
|
1250
|
-
const ret = wasm.corecryptocontext_e2ei_new_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, expiry_sec, ciphersuite);
|
1522
|
+
get_data() {
|
1523
|
+
const ret = wasm.corecryptocontext_get_data(this.__wbg_ptr);
|
1251
1524
|
return ret;
|
1252
1525
|
}
|
1253
|
-
|
1254
|
-
const
|
1255
|
-
const len0 = WASM_VECTOR_LEN;
|
1256
|
-
const ptr1 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1257
|
-
const len1 = WASM_VECTOR_LEN;
|
1258
|
-
var ptr2 = isLikeNone(team) ? 0 : passStringToWasm0(team, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1259
|
-
var len2 = WASM_VECTOR_LEN;
|
1260
|
-
const ret = wasm.corecryptocontext_e2ei_new_activation_enrollment(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, expiry_sec, ciphersuite);
|
1526
|
+
random_bytes(len) {
|
1527
|
+
const ret = wasm.corecryptocontext_random_bytes(this.__wbg_ptr, len);
|
1261
1528
|
return ret;
|
1262
1529
|
}
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
return
|
1530
|
+
}
|
1531
|
+
var CoreCryptoLoggerFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_corecryptologger_free(ptr >>> 0, 1));
|
1532
|
+
|
1533
|
+
class CoreCryptoLogger {
|
1534
|
+
__destroy_into_raw() {
|
1535
|
+
const ptr = this.__wbg_ptr;
|
1536
|
+
this.__wbg_ptr = 0;
|
1537
|
+
CoreCryptoLoggerFinalization.unregister(this);
|
1538
|
+
return ptr;
|
1272
1539
|
}
|
1273
|
-
|
1274
|
-
const
|
1275
|
-
|
1540
|
+
free() {
|
1541
|
+
const ptr = this.__destroy_into_raw();
|
1542
|
+
wasm.__wbg_corecryptologger_free(ptr, 0);
|
1276
1543
|
}
|
1277
|
-
|
1278
|
-
const ret = wasm.
|
1279
|
-
|
1544
|
+
constructor(logger, _this) {
|
1545
|
+
const ret = wasm.corecryptologger_new(logger, _this);
|
1546
|
+
if (ret[2]) {
|
1547
|
+
throw takeFromExternrefTable0(ret[1]);
|
1548
|
+
}
|
1549
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
1550
|
+
CoreCryptoLoggerFinalization.register(this, this.__wbg_ptr, this);
|
1551
|
+
return this;
|
1280
1552
|
}
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1553
|
+
}
|
1554
|
+
var CrlRegistrationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_crlregistration_free(ptr >>> 0, 1));
|
1555
|
+
|
1556
|
+
class CrlRegistration {
|
1557
|
+
static __wrap(ptr) {
|
1558
|
+
ptr = ptr >>> 0;
|
1559
|
+
const obj = Object.create(CrlRegistration.prototype);
|
1560
|
+
obj.__wbg_ptr = ptr;
|
1561
|
+
CrlRegistrationFinalization.register(obj, obj.__wbg_ptr, obj);
|
1562
|
+
return obj;
|
1286
1563
|
}
|
1287
|
-
|
1288
|
-
const
|
1289
|
-
|
1290
|
-
|
1291
|
-
return
|
1564
|
+
__destroy_into_raw() {
|
1565
|
+
const ptr = this.__wbg_ptr;
|
1566
|
+
this.__wbg_ptr = 0;
|
1567
|
+
CrlRegistrationFinalization.unregister(this);
|
1568
|
+
return ptr;
|
1292
1569
|
}
|
1293
|
-
|
1294
|
-
const
|
1295
|
-
|
1296
|
-
const ptr1 = passArray8ToWasm0(crl_der, wasm.__wbindgen_malloc);
|
1297
|
-
const len1 = WASM_VECTOR_LEN;
|
1298
|
-
const ret = wasm.corecryptocontext_e2ei_register_crl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1299
|
-
return ret;
|
1570
|
+
free() {
|
1571
|
+
const ptr = this.__destroy_into_raw();
|
1572
|
+
wasm.__wbg_crlregistration_free(ptr, 0);
|
1300
1573
|
}
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1305
|
-
const len1 = WASM_VECTOR_LEN;
|
1306
|
-
const ret = wasm.corecryptocontext_e2ei_mls_init_only(this.__wbg_ptr, ptr0, ptr1, len1, isLikeNone(nb_key_package) ? 4294967297 : nb_key_package >>> 0);
|
1307
|
-
return ret;
|
1574
|
+
get dirty() {
|
1575
|
+
const ret = wasm.__wbg_get_crlregistration_dirty(this.__wbg_ptr);
|
1576
|
+
return ret !== 0;
|
1308
1577
|
}
|
1309
|
-
|
1310
|
-
|
1311
|
-
const len0 = WASM_VECTOR_LEN;
|
1312
|
-
const ret = wasm.corecryptocontext_e2ei_rotate(this.__wbg_ptr, ptr0, len0);
|
1313
|
-
return ret;
|
1578
|
+
set dirty(arg0) {
|
1579
|
+
wasm.__wbg_set_crlregistration_dirty(this.__wbg_ptr, arg0);
|
1314
1580
|
}
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
const ptr1 = passStringToWasm0(certificate_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1319
|
-
const len1 = WASM_VECTOR_LEN;
|
1320
|
-
const ret = wasm.corecryptocontext_save_x509_credential(this.__wbg_ptr, ptr0, ptr1, len1);
|
1321
|
-
return ret;
|
1581
|
+
get expiration() {
|
1582
|
+
const ret = wasm.__wbg_get_crlregistration_expiration(this.__wbg_ptr);
|
1583
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
1322
1584
|
}
|
1323
|
-
|
1324
|
-
|
1325
|
-
return ret;
|
1585
|
+
set expiration(arg0) {
|
1586
|
+
wasm.__wbg_set_crlregistration_expiration(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
1326
1587
|
}
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
return
|
1588
|
+
constructor(dirty, expiration) {
|
1589
|
+
const ret = wasm.crlregistration_new(dirty, !isLikeNone(expiration), isLikeNone(expiration) ? BigInt(0) : expiration);
|
1590
|
+
this.__wbg_ptr = ret >>> 0;
|
1591
|
+
CrlRegistrationFinalization.register(this, this.__wbg_ptr, this);
|
1592
|
+
return this;
|
1332
1593
|
}
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1594
|
+
}
|
1595
|
+
var CustomConfigurationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_customconfiguration_free(ptr >>> 0, 1));
|
1596
|
+
|
1597
|
+
class CustomConfiguration {
|
1598
|
+
static __wrap(ptr) {
|
1599
|
+
ptr = ptr >>> 0;
|
1600
|
+
const obj = Object.create(CustomConfiguration.prototype);
|
1601
|
+
obj.__wbg_ptr = ptr;
|
1602
|
+
CustomConfigurationFinalization.register(obj, obj.__wbg_ptr, obj);
|
1603
|
+
return obj;
|
1338
1604
|
}
|
1339
|
-
|
1340
|
-
const
|
1341
|
-
|
1342
|
-
|
1343
|
-
return
|
1605
|
+
__destroy_into_raw() {
|
1606
|
+
const ptr = this.__wbg_ptr;
|
1607
|
+
this.__wbg_ptr = 0;
|
1608
|
+
CustomConfigurationFinalization.unregister(this);
|
1609
|
+
return ptr;
|
1344
1610
|
}
|
1345
|
-
|
1346
|
-
const
|
1347
|
-
|
1611
|
+
free() {
|
1612
|
+
const ptr = this.__destroy_into_raw();
|
1613
|
+
wasm.__wbg_customconfiguration_free(ptr, 0);
|
1348
1614
|
}
|
1349
|
-
|
1350
|
-
const
|
1351
|
-
|
1352
|
-
const ptr1 = passArrayJsValueToWasm0(device_ids, wasm.__wbindgen_malloc);
|
1353
|
-
const len1 = WASM_VECTOR_LEN;
|
1354
|
-
const ret = wasm.corecryptocontext_get_device_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1355
|
-
return ret;
|
1615
|
+
get keyRotationSpan() {
|
1616
|
+
const ret = wasm.__wbg_get_customconfiguration_keyRotationSpan(this.__wbg_ptr);
|
1617
|
+
return ret === 4294967297 ? undefined : ret;
|
1356
1618
|
}
|
1357
|
-
|
1358
|
-
|
1359
|
-
const len0 = WASM_VECTOR_LEN;
|
1360
|
-
const ptr1 = passArrayJsValueToWasm0(user_ids, wasm.__wbindgen_malloc);
|
1361
|
-
const len1 = WASM_VECTOR_LEN;
|
1362
|
-
const ret = wasm.corecryptocontext_get_user_identities(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1363
|
-
return ret;
|
1619
|
+
set keyRotationSpan(arg0) {
|
1620
|
+
wasm.__wbg_set_customconfiguration_keyRotationSpan(this.__wbg_ptr, isLikeNone(arg0) ? 4294967297 : arg0 >>> 0);
|
1364
1621
|
}
|
1365
|
-
|
1366
|
-
const
|
1622
|
+
get wirePolicy() {
|
1623
|
+
const ret = wasm.__wbg_get_customconfiguration_wirePolicy(this.__wbg_ptr);
|
1624
|
+
return ret === 0 ? undefined : ret;
|
1625
|
+
}
|
1626
|
+
set wirePolicy(arg0) {
|
1627
|
+
wasm.__wbg_set_customconfiguration_wirePolicy(this.__wbg_ptr, isLikeNone(arg0) ? 0 : arg0);
|
1628
|
+
}
|
1629
|
+
constructor(key_rotation_span, wire_policy) {
|
1630
|
+
const ret = wasm.customconfiguration_new(isLikeNone(key_rotation_span) ? 4294967297 : key_rotation_span >>> 0, isLikeNone(wire_policy) ? 0 : wire_policy);
|
1631
|
+
this.__wbg_ptr = ret >>> 0;
|
1632
|
+
CustomConfigurationFinalization.register(this, this.__wbg_ptr, this);
|
1633
|
+
return this;
|
1634
|
+
}
|
1635
|
+
}
|
1636
|
+
var DatabaseKeyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_databasekey_free(ptr >>> 0, 1));
|
1637
|
+
|
1638
|
+
class DatabaseKey {
|
1639
|
+
__destroy_into_raw() {
|
1640
|
+
const ptr = this.__wbg_ptr;
|
1641
|
+
this.__wbg_ptr = 0;
|
1642
|
+
DatabaseKeyFinalization.unregister(this);
|
1643
|
+
return ptr;
|
1644
|
+
}
|
1645
|
+
free() {
|
1646
|
+
const ptr = this.__destroy_into_raw();
|
1647
|
+
wasm.__wbg_databasekey_free(ptr, 0);
|
1648
|
+
}
|
1649
|
+
constructor(buf) {
|
1650
|
+
const ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
|
1367
1651
|
const len0 = WASM_VECTOR_LEN;
|
1368
|
-
const ret = wasm.
|
1369
|
-
|
1652
|
+
const ret = wasm.databasekey_new(ptr0, len0);
|
1653
|
+
if (ret[2]) {
|
1654
|
+
throw takeFromExternrefTable0(ret[1]);
|
1655
|
+
}
|
1656
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
1657
|
+
DatabaseKeyFinalization.register(this, this.__wbg_ptr, this);
|
1658
|
+
return this;
|
1370
1659
|
}
|
1371
1660
|
}
|
1372
|
-
var
|
1661
|
+
var DecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_decryptedmessage_free(ptr >>> 0, 1));
|
1373
1662
|
|
1374
|
-
class
|
1663
|
+
class DecryptedMessage {
|
1664
|
+
static __wrap(ptr) {
|
1665
|
+
ptr = ptr >>> 0;
|
1666
|
+
const obj = Object.create(DecryptedMessage.prototype);
|
1667
|
+
obj.__wbg_ptr = ptr;
|
1668
|
+
DecryptedMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
1669
|
+
return obj;
|
1670
|
+
}
|
1375
1671
|
__destroy_into_raw() {
|
1376
1672
|
const ptr = this.__wbg_ptr;
|
1377
1673
|
this.__wbg_ptr = 0;
|
1378
|
-
|
1674
|
+
DecryptedMessageFinalization.unregister(this);
|
1379
1675
|
return ptr;
|
1380
1676
|
}
|
1381
1677
|
free() {
|
1382
1678
|
const ptr = this.__destroy_into_raw();
|
1383
|
-
wasm.
|
1679
|
+
wasm.__wbg_decryptedmessage_free(ptr, 0);
|
1384
1680
|
}
|
1385
|
-
|
1386
|
-
const ret = wasm.
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1681
|
+
get message() {
|
1682
|
+
const ret = wasm.__wbg_get_decryptedmessage_message(this.__wbg_ptr);
|
1683
|
+
let v1;
|
1684
|
+
if (ret[0] !== 0) {
|
1685
|
+
v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
1686
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
1687
|
+
}
|
1688
|
+
return v1;
|
1689
|
+
}
|
1690
|
+
get proposals() {
|
1691
|
+
const ret = wasm.__wbg_get_decryptedmessage_proposals(this.__wbg_ptr);
|
1692
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
1693
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
1694
|
+
return v1;
|
1695
|
+
}
|
1696
|
+
get isActive() {
|
1697
|
+
const ret = wasm.__wbg_get_decryptedmessage_isActive(this.__wbg_ptr);
|
1698
|
+
return ret !== 0;
|
1699
|
+
}
|
1700
|
+
get commitDelay() {
|
1701
|
+
const ret = wasm.__wbg_get_decryptedmessage_commitDelay(this.__wbg_ptr);
|
1702
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
1703
|
+
}
|
1704
|
+
get senderClientId() {
|
1705
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_senderClientId(this.__wbg_ptr);
|
1706
|
+
return ret === 0 ? undefined : ClientId.__wrap(ret);
|
1707
|
+
}
|
1708
|
+
get hasEpochChanged() {
|
1709
|
+
const ret = wasm.__wbg_get_decryptedmessage_hasEpochChanged(this.__wbg_ptr);
|
1710
|
+
return ret !== 0;
|
1711
|
+
}
|
1712
|
+
get identity() {
|
1713
|
+
const ret = wasm.__wbg_get_buffereddecryptedmessage_identity(this.__wbg_ptr);
|
1714
|
+
return WireIdentity.__wrap(ret);
|
1715
|
+
}
|
1716
|
+
get bufferedMessages() {
|
1717
|
+
const ret = wasm.__wbg_get_decryptedmessage_bufferedMessages(this.__wbg_ptr);
|
1718
|
+
let v1;
|
1719
|
+
if (ret[0] !== 0) {
|
1720
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
1721
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
1722
|
+
}
|
1723
|
+
return v1;
|
1724
|
+
}
|
1725
|
+
get crlNewDistributionPoints() {
|
1726
|
+
const ret = wasm.__wbg_get_decryptedmessage_crlNewDistributionPoints(this.__wbg_ptr);
|
1727
|
+
return NewCrlDistributionPoints.__wrap(ret);
|
1390
1728
|
}
|
1391
1729
|
}
|
1392
|
-
var
|
1393
|
-
var CustomConfigurationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_customconfiguration_free(ptr >>> 0, 1));
|
1730
|
+
var E2eiDumpedPkiEnvFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_e2eidumpedpkienv_free(ptr >>> 0, 1));
|
1394
1731
|
|
1395
|
-
class
|
1732
|
+
class E2eiDumpedPkiEnv {
|
1396
1733
|
static __wrap(ptr) {
|
1397
1734
|
ptr = ptr >>> 0;
|
1398
|
-
const obj = Object.create(
|
1735
|
+
const obj = Object.create(E2eiDumpedPkiEnv.prototype);
|
1399
1736
|
obj.__wbg_ptr = ptr;
|
1400
|
-
|
1737
|
+
E2eiDumpedPkiEnvFinalization.register(obj, obj.__wbg_ptr, obj);
|
1401
1738
|
return obj;
|
1402
1739
|
}
|
1403
1740
|
__destroy_into_raw() {
|
1404
1741
|
const ptr = this.__wbg_ptr;
|
1405
1742
|
this.__wbg_ptr = 0;
|
1406
|
-
|
1743
|
+
E2eiDumpedPkiEnvFinalization.unregister(this);
|
1407
1744
|
return ptr;
|
1408
1745
|
}
|
1409
1746
|
free() {
|
1410
1747
|
const ptr = this.__destroy_into_raw();
|
1411
|
-
wasm.
|
1748
|
+
wasm.__wbg_e2eidumpedpkienv_free(ptr, 0);
|
1412
1749
|
}
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1750
|
+
get root_ca() {
|
1751
|
+
let deferred1_0;
|
1752
|
+
let deferred1_1;
|
1753
|
+
try {
|
1754
|
+
const ret = wasm.__wbg_get_e2eidumpedpkienv_root_ca(this.__wbg_ptr);
|
1755
|
+
deferred1_0 = ret[0];
|
1756
|
+
deferred1_1 = ret[1];
|
1757
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
1758
|
+
} finally {
|
1759
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1760
|
+
}
|
1418
1761
|
}
|
1419
|
-
get
|
1420
|
-
const ret = wasm.
|
1421
|
-
|
1762
|
+
get intermediates() {
|
1763
|
+
const ret = wasm.__wbg_get_e2eidumpedpkienv_intermediates(this.__wbg_ptr);
|
1764
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
1765
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
1766
|
+
return v1;
|
1422
1767
|
}
|
1423
|
-
|
1424
|
-
wasm.
|
1768
|
+
get crls() {
|
1769
|
+
const ret = wasm.__wbg_get_e2eidumpedpkienv_crls(this.__wbg_ptr);
|
1770
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
1771
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
1772
|
+
return v1;
|
1425
1773
|
}
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1774
|
+
}
|
1775
|
+
var EpochObserverFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_epochobserver_free(ptr >>> 0, 1));
|
1776
|
+
|
1777
|
+
class EpochObserver {
|
1778
|
+
__destroy_into_raw() {
|
1779
|
+
const ptr = this.__wbg_ptr;
|
1780
|
+
this.__wbg_ptr = 0;
|
1781
|
+
EpochObserverFinalization.unregister(this);
|
1782
|
+
return ptr;
|
1429
1783
|
}
|
1430
|
-
|
1431
|
-
|
1784
|
+
free() {
|
1785
|
+
const ptr = this.__destroy_into_raw();
|
1786
|
+
wasm.__wbg_epochobserver_free(ptr, 0);
|
1787
|
+
}
|
1788
|
+
constructor(this_context, epoch_changed) {
|
1789
|
+
const ret = wasm.epochobserver_new(this_context, epoch_changed);
|
1790
|
+
if (ret[2]) {
|
1791
|
+
throw takeFromExternrefTable0(ret[1]);
|
1792
|
+
}
|
1793
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
1794
|
+
EpochObserverFinalization.register(this, this.__wbg_ptr, this);
|
1795
|
+
return this;
|
1432
1796
|
}
|
1433
1797
|
}
|
1434
|
-
var DecryptedMessageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_decryptedmessage_free(ptr >>> 0, 1));
|
1435
|
-
var E2eiDumpedPkiEnvFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_e2eidumpedpkienv_free(ptr >>> 0, 1));
|
1436
1798
|
var FfiWireE2EIdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_ffiwiree2eidentity_free(ptr >>> 0, 1));
|
1437
1799
|
|
1438
1800
|
class FfiWireE2EIdentity {
|
@@ -1466,7 +1828,9 @@ class FfiWireE2EIdentity {
|
|
1466
1828
|
return ret;
|
1467
1829
|
}
|
1468
1830
|
new_account_response(account) {
|
1469
|
-
const
|
1831
|
+
const ptr0 = passArray8ToWasm0(account, wasm.__wbindgen_malloc);
|
1832
|
+
const len0 = WASM_VECTOR_LEN;
|
1833
|
+
const ret = wasm.ffiwiree2eidentity_new_account_response(this.__wbg_ptr, ptr0, len0);
|
1470
1834
|
return ret;
|
1471
1835
|
}
|
1472
1836
|
new_order_request(previous_nonce) {
|
@@ -1476,7 +1840,9 @@ class FfiWireE2EIdentity {
|
|
1476
1840
|
return ret;
|
1477
1841
|
}
|
1478
1842
|
new_order_response(order) {
|
1479
|
-
const
|
1843
|
+
const ptr0 = passArray8ToWasm0(order, wasm.__wbindgen_malloc);
|
1844
|
+
const len0 = WASM_VECTOR_LEN;
|
1845
|
+
const ret = wasm.ffiwiree2eidentity_new_order_response(this.__wbg_ptr, ptr0, len0);
|
1480
1846
|
return ret;
|
1481
1847
|
}
|
1482
1848
|
new_authz_request(url, previous_nonce) {
|
@@ -1488,7 +1854,9 @@ class FfiWireE2EIdentity {
|
|
1488
1854
|
return ret;
|
1489
1855
|
}
|
1490
1856
|
new_authz_response(authz) {
|
1491
|
-
const
|
1857
|
+
const ptr0 = passArray8ToWasm0(authz, wasm.__wbindgen_malloc);
|
1858
|
+
const len0 = WASM_VECTOR_LEN;
|
1859
|
+
const ret = wasm.ffiwiree2eidentity_new_authz_response(this.__wbg_ptr, ptr0, len0);
|
1492
1860
|
return ret;
|
1493
1861
|
}
|
1494
1862
|
create_dpop_token(expiry_secs, backend_nonce) {
|
@@ -1506,19 +1874,9 @@ class FfiWireE2EIdentity {
|
|
1506
1874
|
return ret;
|
1507
1875
|
}
|
1508
1876
|
new_dpop_challenge_response(challenge) {
|
1509
|
-
const
|
1510
|
-
return ret;
|
1511
|
-
}
|
1512
|
-
new_oidc_challenge_request(id_token, previous_nonce) {
|
1513
|
-
const ptr0 = passStringToWasm0(id_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1877
|
+
const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
|
1514
1878
|
const len0 = WASM_VECTOR_LEN;
|
1515
|
-
const
|
1516
|
-
const len1 = WASM_VECTOR_LEN;
|
1517
|
-
const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1518
|
-
return ret;
|
1519
|
-
}
|
1520
|
-
new_oidc_challenge_response(challenge) {
|
1521
|
-
const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_response(this.__wbg_ptr, challenge);
|
1879
|
+
const ret = wasm.ffiwiree2eidentity_new_dpop_challenge_response(this.__wbg_ptr, ptr0, len0);
|
1522
1880
|
return ret;
|
1523
1881
|
}
|
1524
1882
|
check_order_request(order_url, previous_nonce) {
|
@@ -1530,7 +1888,9 @@ class FfiWireE2EIdentity {
|
|
1530
1888
|
return ret;
|
1531
1889
|
}
|
1532
1890
|
check_order_response(order) {
|
1533
|
-
const
|
1891
|
+
const ptr0 = passArray8ToWasm0(order, wasm.__wbindgen_malloc);
|
1892
|
+
const len0 = WASM_VECTOR_LEN;
|
1893
|
+
const ret = wasm.ffiwiree2eidentity_check_order_response(this.__wbg_ptr, ptr0, len0);
|
1534
1894
|
return ret;
|
1535
1895
|
}
|
1536
1896
|
finalize_request(previous_nonce) {
|
@@ -1540,7 +1900,9 @@ class FfiWireE2EIdentity {
|
|
1540
1900
|
return ret;
|
1541
1901
|
}
|
1542
1902
|
finalize_response(finalize) {
|
1543
|
-
const
|
1903
|
+
const ptr0 = passArray8ToWasm0(finalize, wasm.__wbindgen_malloc);
|
1904
|
+
const len0 = WASM_VECTOR_LEN;
|
1905
|
+
const ret = wasm.ffiwiree2eidentity_finalize_response(this.__wbg_ptr, ptr0, len0);
|
1544
1906
|
return ret;
|
1545
1907
|
}
|
1546
1908
|
certificate_request(previous_nonce) {
|
@@ -1549,6 +1911,20 @@ class FfiWireE2EIdentity {
|
|
1549
1911
|
const ret = wasm.ffiwiree2eidentity_certificate_request(this.__wbg_ptr, ptr0, len0);
|
1550
1912
|
return ret;
|
1551
1913
|
}
|
1914
|
+
new_oidc_challenge_request(id_token, previous_nonce) {
|
1915
|
+
const ptr0 = passStringToWasm0(id_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1916
|
+
const len0 = WASM_VECTOR_LEN;
|
1917
|
+
const ptr1 = passStringToWasm0(previous_nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1918
|
+
const len1 = WASM_VECTOR_LEN;
|
1919
|
+
const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_request(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
1920
|
+
return ret;
|
1921
|
+
}
|
1922
|
+
new_oidc_challenge_response(challenge) {
|
1923
|
+
const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
|
1924
|
+
const len0 = WASM_VECTOR_LEN;
|
1925
|
+
const ret = wasm.ffiwiree2eidentity_new_oidc_challenge_response(this.__wbg_ptr, ptr0, len0);
|
1926
|
+
return ret;
|
1927
|
+
}
|
1552
1928
|
}
|
1553
1929
|
var GroupInfoBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_groupinfobundle_free(ptr >>> 0, 1));
|
1554
1930
|
|
@@ -1571,35 +1947,103 @@ class GroupInfoBundle {
|
|
1571
1947
|
wasm.__wbg_groupinfobundle_free(ptr, 0);
|
1572
1948
|
}
|
1573
1949
|
get encryption_type() {
|
1574
|
-
const ret = wasm.
|
1950
|
+
const ret = wasm.__wbg_get_groupinfobundle_encryption_type(this.__wbg_ptr);
|
1575
1951
|
return ret;
|
1576
1952
|
}
|
1953
|
+
set encryption_type(arg0) {
|
1954
|
+
wasm.__wbg_set_groupinfobundle_encryption_type(this.__wbg_ptr, arg0);
|
1955
|
+
}
|
1577
1956
|
get ratchet_tree_type() {
|
1578
|
-
const ret = wasm.
|
1957
|
+
const ret = wasm.__wbg_get_groupinfobundle_ratchet_tree_type(this.__wbg_ptr);
|
1579
1958
|
return ret;
|
1580
1959
|
}
|
1960
|
+
set ratchet_tree_type(arg0) {
|
1961
|
+
wasm.__wbg_set_groupinfobundle_ratchet_tree_type(this.__wbg_ptr, arg0);
|
1962
|
+
}
|
1581
1963
|
get payload() {
|
1582
|
-
const ret = wasm.
|
1583
|
-
|
1964
|
+
const ret = wasm.__wbg_get_groupinfobundle_payload(this.__wbg_ptr);
|
1965
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
1966
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
1967
|
+
return v1;
|
1968
|
+
}
|
1969
|
+
set payload(arg0) {
|
1970
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
1971
|
+
const len0 = WASM_VECTOR_LEN;
|
1972
|
+
wasm.__wbg_set_commitbundle_commit(this.__wbg_ptr, ptr0, len0);
|
1973
|
+
}
|
1974
|
+
}
|
1975
|
+
var MlsTransportFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_mlstransport_free(ptr >>> 0, 1));
|
1976
|
+
|
1977
|
+
class MlsTransport {
|
1978
|
+
__destroy_into_raw() {
|
1979
|
+
const ptr = this.__wbg_ptr;
|
1980
|
+
this.__wbg_ptr = 0;
|
1981
|
+
MlsTransportFinalization.unregister(this);
|
1982
|
+
return ptr;
|
1983
|
+
}
|
1984
|
+
free() {
|
1985
|
+
const ptr = this.__destroy_into_raw();
|
1986
|
+
wasm.__wbg_mlstransport_free(ptr, 0);
|
1987
|
+
}
|
1988
|
+
constructor(this_context, send_commit_bundle, send_message) {
|
1989
|
+
const ret = wasm.mlstransport_new(this_context, send_commit_bundle, send_message);
|
1990
|
+
if (ret[2]) {
|
1991
|
+
throw takeFromExternrefTable0(ret[1]);
|
1992
|
+
}
|
1993
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
1994
|
+
MlsTransportFinalization.register(this, this.__wbg_ptr, this);
|
1995
|
+
return this;
|
1584
1996
|
}
|
1585
1997
|
}
|
1586
|
-
var
|
1998
|
+
var MlsTransportResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_mlstransportresponse_free(ptr >>> 0, 1));
|
1587
1999
|
|
1588
|
-
class
|
2000
|
+
class MlsTransportResponse {
|
2001
|
+
toJSON() {
|
2002
|
+
return {
|
2003
|
+
variant: this.variant,
|
2004
|
+
abort_reason: this.abort_reason
|
2005
|
+
};
|
2006
|
+
}
|
2007
|
+
toString() {
|
2008
|
+
return JSON.stringify(this);
|
2009
|
+
}
|
1589
2010
|
__destroy_into_raw() {
|
1590
2011
|
const ptr = this.__wbg_ptr;
|
1591
2012
|
this.__wbg_ptr = 0;
|
1592
|
-
|
2013
|
+
MlsTransportResponseFinalization.unregister(this);
|
1593
2014
|
return ptr;
|
1594
2015
|
}
|
1595
2016
|
free() {
|
1596
2017
|
const ptr = this.__destroy_into_raw();
|
1597
|
-
wasm.
|
2018
|
+
wasm.__wbg_mlstransportresponse_free(ptr, 0);
|
2019
|
+
}
|
2020
|
+
get variant() {
|
2021
|
+
const ret = wasm.__wbg_get_mlstransportresponse_variant(this.__wbg_ptr);
|
2022
|
+
return ret;
|
2023
|
+
}
|
2024
|
+
set variant(arg0) {
|
2025
|
+
wasm.__wbg_set_mlstransportresponse_variant(this.__wbg_ptr, arg0);
|
2026
|
+
}
|
2027
|
+
get abort_reason() {
|
2028
|
+
const ret = wasm.__wbg_get_mlstransportresponse_abort_reason(this.__wbg_ptr);
|
2029
|
+
let v1;
|
2030
|
+
if (ret[0] !== 0) {
|
2031
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
2032
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
2033
|
+
}
|
2034
|
+
return v1;
|
2035
|
+
}
|
2036
|
+
set abort_reason(arg0) {
|
2037
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2038
|
+
var len0 = WASM_VECTOR_LEN;
|
2039
|
+
wasm.__wbg_set_mlstransportresponse_abort_reason(this.__wbg_ptr, ptr0, len0);
|
1598
2040
|
}
|
1599
|
-
constructor(
|
1600
|
-
|
2041
|
+
constructor(variant, abort_reason) {
|
2042
|
+
var ptr0 = isLikeNone(abort_reason) ? 0 : passStringToWasm0(abort_reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2043
|
+
var len0 = WASM_VECTOR_LEN;
|
2044
|
+
const ret = wasm.mlstransportresponse_new(variant, ptr0, len0);
|
1601
2045
|
this.__wbg_ptr = ret >>> 0;
|
1602
|
-
|
2046
|
+
MlsTransportResponseFinalization.register(this, this.__wbg_ptr, this);
|
1603
2047
|
return this;
|
1604
2048
|
}
|
1605
2049
|
}
|
@@ -1669,16 +2113,46 @@ class NewAcmeOrder {
|
|
1669
2113
|
const ptr = this.__destroy_into_raw();
|
1670
2114
|
wasm.__wbg_newacmeorder_free(ptr, 0);
|
1671
2115
|
}
|
2116
|
+
get delegate() {
|
2117
|
+
const ret = wasm.__wbg_get_newacmeorder_delegate(this.__wbg_ptr);
|
2118
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
2119
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
2120
|
+
return v1;
|
2121
|
+
}
|
1672
2122
|
get authorizations() {
|
1673
|
-
const ret = wasm.
|
2123
|
+
const ret = wasm.__wbg_get_newacmeorder_authorizations(this.__wbg_ptr);
|
1674
2124
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
1675
2125
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
1676
2126
|
return v1;
|
1677
2127
|
}
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
2128
|
+
}
|
2129
|
+
var NewCrlDistributionPointsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_newcrldistributionpoints_free(ptr >>> 0, 1));
|
2130
|
+
|
2131
|
+
class NewCrlDistributionPoints {
|
2132
|
+
static __wrap(ptr) {
|
2133
|
+
ptr = ptr >>> 0;
|
2134
|
+
const obj = Object.create(NewCrlDistributionPoints.prototype);
|
2135
|
+
obj.__wbg_ptr = ptr;
|
2136
|
+
NewCrlDistributionPointsFinalization.register(obj, obj.__wbg_ptr, obj);
|
2137
|
+
return obj;
|
2138
|
+
}
|
2139
|
+
__destroy_into_raw() {
|
2140
|
+
const ptr = this.__wbg_ptr;
|
2141
|
+
this.__wbg_ptr = 0;
|
2142
|
+
NewCrlDistributionPointsFinalization.unregister(this);
|
2143
|
+
return ptr;
|
2144
|
+
}
|
2145
|
+
free() {
|
2146
|
+
const ptr = this.__destroy_into_raw();
|
2147
|
+
wasm.__wbg_newcrldistributionpoints_free(ptr, 0);
|
2148
|
+
}
|
2149
|
+
as_strings() {
|
2150
|
+
const ret = wasm.newcrldistributionpoints_as_strings(this.__wbg_ptr);
|
2151
|
+
let v1;
|
2152
|
+
if (ret[0] !== 0) {
|
2153
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
2154
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
2155
|
+
}
|
1682
2156
|
return v1;
|
1683
2157
|
}
|
1684
2158
|
}
|
@@ -1703,16 +2177,40 @@ class ProposalBundle {
|
|
1703
2177
|
wasm.__wbg_proposalbundle_free(ptr, 0);
|
1704
2178
|
}
|
1705
2179
|
get proposal() {
|
1706
|
-
const ret = wasm.
|
1707
|
-
|
2180
|
+
const ret = wasm.__wbg_get_proposalbundle_proposal(this.__wbg_ptr);
|
2181
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
2182
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
2183
|
+
return v1;
|
2184
|
+
}
|
2185
|
+
set proposal(arg0) {
|
2186
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
2187
|
+
const len0 = WASM_VECTOR_LEN;
|
2188
|
+
wasm.__wbg_set_commitbundle_commit(this.__wbg_ptr, ptr0, len0);
|
1708
2189
|
}
|
1709
2190
|
get proposal_ref() {
|
1710
|
-
const ret = wasm.
|
1711
|
-
|
2191
|
+
const ret = wasm.__wbg_get_proposalbundle_proposal_ref(this.__wbg_ptr);
|
2192
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
2193
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
2194
|
+
return v1;
|
2195
|
+
}
|
2196
|
+
set proposal_ref(arg0) {
|
2197
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
2198
|
+
const len0 = WASM_VECTOR_LEN;
|
2199
|
+
wasm.__wbg_set_proposalbundle_proposal_ref(this.__wbg_ptr, ptr0, len0);
|
1712
2200
|
}
|
1713
2201
|
get crl_new_distribution_points() {
|
1714
|
-
const ret = wasm.
|
1715
|
-
|
2202
|
+
const ret = wasm.__wbg_get_proposalbundle_crl_new_distribution_points(this.__wbg_ptr);
|
2203
|
+
let v1;
|
2204
|
+
if (ret[0] !== 0) {
|
2205
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
2206
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
2207
|
+
}
|
2208
|
+
return v1;
|
2209
|
+
}
|
2210
|
+
set crl_new_distribution_points(arg0) {
|
2211
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
2212
|
+
var len0 = WASM_VECTOR_LEN;
|
2213
|
+
wasm.__wbg_set_proposalbundle_crl_new_distribution_points(this.__wbg_ptr, ptr0, len0);
|
1716
2214
|
}
|
1717
2215
|
}
|
1718
2216
|
var ProteusAutoPrekeyBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_proteusautoprekeybundle_free(ptr >>> 0, 1));
|
@@ -1739,59 +2237,23 @@ class ProteusAutoPrekeyBundle {
|
|
1739
2237
|
const ret = wasm.__wbg_get_proteusautoprekeybundle_id(this.__wbg_ptr);
|
1740
2238
|
return ret;
|
1741
2239
|
}
|
1742
|
-
set id(arg0) {
|
1743
|
-
wasm.__wbg_set_proteusautoprekeybundle_id(this.__wbg_ptr, arg0);
|
1744
|
-
}
|
1745
2240
|
get pkb() {
|
1746
|
-
const ret = wasm.__wbg_get_proteusautoprekeybundle_pkb(this.__wbg_ptr);
|
1747
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
1748
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
1749
|
-
return v1;
|
1750
|
-
}
|
1751
|
-
set pkb(arg0) {
|
1752
|
-
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
1753
|
-
const len0 = WASM_VECTOR_LEN;
|
1754
|
-
wasm.__wbg_set_proteusautoprekeybundle_pkb(this.__wbg_ptr, ptr0, len0);
|
1755
|
-
}
|
1756
|
-
}
|
1757
|
-
var WasmMlsTransportResponseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasmmlstransportresponse_free(ptr >>> 0, 1));
|
1758
|
-
|
1759
|
-
class WasmMlsTransportResponse {
|
1760
|
-
__destroy_into_raw() {
|
1761
|
-
const ptr = this.__wbg_ptr;
|
1762
|
-
this.__wbg_ptr = 0;
|
1763
|
-
WasmMlsTransportResponseFinalization.unregister(this);
|
1764
|
-
return ptr;
|
1765
|
-
}
|
1766
|
-
free() {
|
1767
|
-
const ptr = this.__destroy_into_raw();
|
1768
|
-
wasm.__wbg_wasmmlstransportresponse_free(ptr, 0);
|
1769
|
-
}
|
1770
|
-
constructor(variant, abort_reason) {
|
1771
|
-
var ptr0 = isLikeNone(abort_reason) ? 0 : passStringToWasm0(abort_reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1772
|
-
var len0 = WASM_VECTOR_LEN;
|
1773
|
-
const ret = wasm.wasmmlstransportresponse_new(variant, ptr0, len0);
|
1774
|
-
this.__wbg_ptr = ret >>> 0;
|
1775
|
-
WasmMlsTransportResponseFinalization.register(this, this.__wbg_ptr, this);
|
1776
|
-
return this;
|
1777
|
-
}
|
1778
|
-
get variant() {
|
1779
|
-
const ret = wasm.__wbg_get_wasmmlstransportresponse_variant(this.__wbg_ptr);
|
1780
|
-
return ret;
|
1781
|
-
}
|
1782
|
-
get abort_reason() {
|
1783
|
-
const ret = wasm.__wbg_get_wasmmlstransportresponse_abort_reason(this.__wbg_ptr);
|
1784
|
-
let v1;
|
1785
|
-
if (ret[0] !== 0) {
|
1786
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
1787
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
1788
|
-
}
|
2241
|
+
const ret = wasm.__wbg_get_proteusautoprekeybundle_pkb(this.__wbg_ptr);
|
2242
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
2243
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
1789
2244
|
return v1;
|
1790
2245
|
}
|
1791
2246
|
}
|
1792
2247
|
var WelcomeBundleFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_welcomebundle_free(ptr >>> 0, 1));
|
1793
2248
|
|
1794
2249
|
class WelcomeBundle {
|
2250
|
+
static __wrap(ptr) {
|
2251
|
+
ptr = ptr >>> 0;
|
2252
|
+
const obj = Object.create(WelcomeBundle.prototype);
|
2253
|
+
obj.__wbg_ptr = ptr;
|
2254
|
+
WelcomeBundleFinalization.register(obj, obj.__wbg_ptr, obj);
|
2255
|
+
return obj;
|
2256
|
+
}
|
1795
2257
|
__destroy_into_raw() {
|
1796
2258
|
const ptr = this.__wbg_ptr;
|
1797
2259
|
this.__wbg_ptr = 0;
|
@@ -1803,12 +2265,29 @@ class WelcomeBundle {
|
|
1803
2265
|
wasm.__wbg_welcomebundle_free(ptr, 0);
|
1804
2266
|
}
|
1805
2267
|
get id() {
|
1806
|
-
const ret = wasm.
|
1807
|
-
|
2268
|
+
const ret = wasm.__wbg_get_welcomebundle_id(this.__wbg_ptr);
|
2269
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
2270
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
2271
|
+
return v1;
|
1808
2272
|
}
|
1809
|
-
|
1810
|
-
const
|
1811
|
-
|
2273
|
+
set id(arg0) {
|
2274
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
2275
|
+
const len0 = WASM_VECTOR_LEN;
|
2276
|
+
wasm.__wbg_set_commitbundle_commit(this.__wbg_ptr, ptr0, len0);
|
2277
|
+
}
|
2278
|
+
get crl_new_distribution_points() {
|
2279
|
+
const ret = wasm.__wbg_get_welcomebundle_crl_new_distribution_points(this.__wbg_ptr);
|
2280
|
+
let v1;
|
2281
|
+
if (ret[0] !== 0) {
|
2282
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
2283
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
2284
|
+
}
|
2285
|
+
return v1;
|
2286
|
+
}
|
2287
|
+
set crl_new_distribution_points(arg0) {
|
2288
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
2289
|
+
var len0 = WASM_VECTOR_LEN;
|
2290
|
+
wasm.__wbg_set_welcomebundle_crl_new_distribution_points(this.__wbg_ptr, ptr0, len0);
|
1812
2291
|
}
|
1813
2292
|
}
|
1814
2293
|
var WireIdentityFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_wireidentity_free(ptr >>> 0, 1));
|
@@ -1863,6 +2342,9 @@ class WireIdentity {
|
|
1863
2342
|
const ret = wasm.__wbg_get_wireidentity_credentialType(this.__wbg_ptr);
|
1864
2343
|
return ret;
|
1865
2344
|
}
|
2345
|
+
set credentialType(arg0) {
|
2346
|
+
wasm.__wbg_set_wireidentity_credentialType(this.__wbg_ptr, arg0);
|
2347
|
+
}
|
1866
2348
|
get x509Identity() {
|
1867
2349
|
const ret = wasm.__wbg_get_wireidentity_x509Identity(this.__wbg_ptr);
|
1868
2350
|
return ret === 0 ? undefined : X509Identity.__wrap(ret);
|
@@ -1900,11 +2382,16 @@ class X509Identity {
|
|
1900
2382
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1901
2383
|
}
|
1902
2384
|
}
|
1903
|
-
|
2385
|
+
set handle(arg0) {
|
2386
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2387
|
+
const len0 = WASM_VECTOR_LEN;
|
2388
|
+
wasm.__wbg_set_x509identity_handle(this.__wbg_ptr, ptr0, len0);
|
2389
|
+
}
|
2390
|
+
get display_name() {
|
1904
2391
|
let deferred1_0;
|
1905
2392
|
let deferred1_1;
|
1906
2393
|
try {
|
1907
|
-
const ret = wasm.
|
2394
|
+
const ret = wasm.__wbg_get_x509identity_display_name(this.__wbg_ptr);
|
1908
2395
|
deferred1_0 = ret[0];
|
1909
2396
|
deferred1_1 = ret[1];
|
1910
2397
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -1912,6 +2399,11 @@ class X509Identity {
|
|
1912
2399
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1913
2400
|
}
|
1914
2401
|
}
|
2402
|
+
set display_name(arg0) {
|
2403
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2404
|
+
const len0 = WASM_VECTOR_LEN;
|
2405
|
+
wasm.__wbg_set_x509identity_display_name(this.__wbg_ptr, ptr0, len0);
|
2406
|
+
}
|
1915
2407
|
get domain() {
|
1916
2408
|
let deferred1_0;
|
1917
2409
|
let deferred1_1;
|
@@ -1924,6 +2416,11 @@ class X509Identity {
|
|
1924
2416
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1925
2417
|
}
|
1926
2418
|
}
|
2419
|
+
set domain(arg0) {
|
2420
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2421
|
+
const len0 = WASM_VECTOR_LEN;
|
2422
|
+
wasm.__wbg_set_x509identity_domain(this.__wbg_ptr, ptr0, len0);
|
2423
|
+
}
|
1927
2424
|
get certificate() {
|
1928
2425
|
let deferred1_0;
|
1929
2426
|
let deferred1_1;
|
@@ -1936,11 +2433,16 @@ class X509Identity {
|
|
1936
2433
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1937
2434
|
}
|
1938
2435
|
}
|
1939
|
-
|
2436
|
+
set certificate(arg0) {
|
2437
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2438
|
+
const len0 = WASM_VECTOR_LEN;
|
2439
|
+
wasm.__wbg_set_x509identity_certificate(this.__wbg_ptr, ptr0, len0);
|
2440
|
+
}
|
2441
|
+
get serial_number() {
|
1940
2442
|
let deferred1_0;
|
1941
2443
|
let deferred1_1;
|
1942
2444
|
try {
|
1943
|
-
const ret = wasm.
|
2445
|
+
const ret = wasm.__wbg_get_x509identity_serial_number(this.__wbg_ptr);
|
1944
2446
|
deferred1_0 = ret[0];
|
1945
2447
|
deferred1_1 = ret[1];
|
1946
2448
|
return getStringFromWasm0(ret[0], ret[1]);
|
@@ -1948,14 +2450,25 @@ class X509Identity {
|
|
1948
2450
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
1949
2451
|
}
|
1950
2452
|
}
|
1951
|
-
|
1952
|
-
const
|
2453
|
+
set serial_number(arg0) {
|
2454
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2455
|
+
const len0 = WASM_VECTOR_LEN;
|
2456
|
+
wasm.__wbg_set_x509identity_serial_number(this.__wbg_ptr, ptr0, len0);
|
2457
|
+
}
|
2458
|
+
get not_before() {
|
2459
|
+
const ret = wasm.__wbg_get_x509identity_not_before(this.__wbg_ptr);
|
1953
2460
|
return BigInt.asUintN(64, ret);
|
1954
2461
|
}
|
1955
|
-
|
1956
|
-
|
2462
|
+
set not_before(arg0) {
|
2463
|
+
wasm.__wbg_set_x509identity_not_before(this.__wbg_ptr, arg0);
|
2464
|
+
}
|
2465
|
+
get not_after() {
|
2466
|
+
const ret = wasm.__wbg_get_x509identity_not_after(this.__wbg_ptr);
|
1957
2467
|
return BigInt.asUintN(64, ret);
|
1958
2468
|
}
|
2469
|
+
set not_after(arg0) {
|
2470
|
+
wasm.__wbg_set_x509identity_not_after(this.__wbg_ptr, arg0);
|
2471
|
+
}
|
1959
2472
|
}
|
1960
2473
|
async function __wbg_load(module, imports) {
|
1961
2474
|
if (typeof Response === "function" && module instanceof Response) {
|
@@ -1995,12 +2508,16 @@ function __wbg_get_imports() {
|
|
1995
2508
|
const ret = AcmeDirectory.__wrap(arg0);
|
1996
2509
|
return ret;
|
1997
2510
|
};
|
1998
|
-
imports.wbg.
|
2511
|
+
imports.wbg.__wbg_advance_b3ccc91b80962d79 = function() {
|
1999
2512
|
return handleError(function(arg0, arg1) {
|
2000
2513
|
arg0.advance(arg1 >>> 0);
|
2001
2514
|
}, arguments);
|
2002
2515
|
};
|
2003
|
-
imports.wbg.
|
2516
|
+
imports.wbg.__wbg_arrayofbytearray_new = function(arg0) {
|
2517
|
+
const ret = ArrayOfByteArray.__wrap(arg0);
|
2518
|
+
return ret;
|
2519
|
+
};
|
2520
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
2004
2521
|
const ret = arg0.buffer;
|
2005
2522
|
return ret;
|
2006
2523
|
};
|
@@ -2008,117 +2525,135 @@ function __wbg_get_imports() {
|
|
2008
2525
|
const ret = BufferedDecryptedMessage.__wrap(arg0);
|
2009
2526
|
return ret;
|
2010
2527
|
};
|
2011
|
-
imports.wbg.
|
2528
|
+
imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
2529
|
+
return handleError(function(arg0, arg1) {
|
2530
|
+
const ret = arg0.call(arg1);
|
2531
|
+
return ret;
|
2532
|
+
}, arguments);
|
2533
|
+
};
|
2534
|
+
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
2012
2535
|
return handleError(function(arg0, arg1, arg2) {
|
2013
2536
|
const ret = arg0.call(arg1, arg2);
|
2014
2537
|
return ret;
|
2015
2538
|
}, arguments);
|
2016
2539
|
};
|
2017
|
-
imports.wbg.
|
2018
|
-
return handleError(function(arg0, arg1, arg2, arg3
|
2019
|
-
const ret = arg0.call(arg1, arg2, arg3
|
2540
|
+
imports.wbg.__wbg_call_833bed5770ea2041 = function() {
|
2541
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
2542
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
2020
2543
|
return ret;
|
2021
2544
|
}, arguments);
|
2022
2545
|
};
|
2023
|
-
imports.wbg.
|
2024
|
-
return handleError(function(arg0, arg1) {
|
2025
|
-
const ret = arg0.call(arg1);
|
2546
|
+
imports.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
|
2547
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
2548
|
+
const ret = arg0.call(arg1, arg2, arg3, arg4);
|
2026
2549
|
return ret;
|
2027
2550
|
}, arguments);
|
2028
2551
|
};
|
2029
|
-
imports.wbg.
|
2552
|
+
imports.wbg.__wbg_ciphersuite_new = function(arg0) {
|
2553
|
+
const ret = Ciphersuite2.__wrap(arg0);
|
2554
|
+
return ret;
|
2555
|
+
};
|
2556
|
+
imports.wbg.__wbg_clientid_new = function(arg0) {
|
2557
|
+
const ret = ClientId.__wrap(arg0);
|
2558
|
+
return ret;
|
2559
|
+
};
|
2560
|
+
imports.wbg.__wbg_clientid_unwrap = function(arg0) {
|
2561
|
+
const ret = ClientId.__unwrap(arg0);
|
2562
|
+
return ret;
|
2563
|
+
};
|
2564
|
+
imports.wbg.__wbg_close_26fc2e6856d8567a = function(arg0) {
|
2030
2565
|
arg0.close();
|
2031
2566
|
};
|
2032
2567
|
imports.wbg.__wbg_commitbundle_new = function(arg0) {
|
2033
2568
|
const ret = CommitBundle.__wrap(arg0);
|
2034
2569
|
return ret;
|
2035
2570
|
};
|
2036
|
-
imports.wbg.
|
2037
|
-
return handleError(function(arg0) {
|
2038
|
-
arg0.continue();
|
2039
|
-
}, arguments);
|
2040
|
-
};
|
2041
|
-
imports.wbg.__wbg_continue_7bfcac3cd5016c6b = function() {
|
2571
|
+
imports.wbg.__wbg_continue_91e59787d3598bbb = function() {
|
2042
2572
|
return handleError(function(arg0, arg1) {
|
2043
2573
|
arg0.continue(arg1);
|
2044
2574
|
}, arguments);
|
2045
2575
|
};
|
2576
|
+
imports.wbg.__wbg_continue_c46c11d3dbe1b030 = function() {
|
2577
|
+
return handleError(function(arg0) {
|
2578
|
+
arg0.continue();
|
2579
|
+
}, arguments);
|
2580
|
+
};
|
2046
2581
|
imports.wbg.__wbg_corecrypto_new = function(arg0) {
|
2047
2582
|
const ret = CoreCrypto.__wrap(arg0);
|
2048
2583
|
return ret;
|
2049
2584
|
};
|
2050
|
-
imports.wbg.
|
2051
|
-
return handleError(function(arg0
|
2052
|
-
const ret = arg0.count(
|
2585
|
+
imports.wbg.__wbg_count_613cb921d67a4f26 = function() {
|
2586
|
+
return handleError(function(arg0) {
|
2587
|
+
const ret = arg0.count();
|
2053
2588
|
return ret;
|
2054
2589
|
}, arguments);
|
2055
2590
|
};
|
2056
|
-
imports.wbg.
|
2057
|
-
return handleError(function(arg0) {
|
2058
|
-
const ret = arg0.count();
|
2591
|
+
imports.wbg.__wbg_count_9dbedee4d2474ff8 = function() {
|
2592
|
+
return handleError(function(arg0, arg1) {
|
2593
|
+
const ret = arg0.count(arg1);
|
2059
2594
|
return ret;
|
2060
2595
|
}, arguments);
|
2061
2596
|
};
|
2062
|
-
imports.wbg.
|
2597
|
+
imports.wbg.__wbg_createIndex_873ac48adc772309 = function() {
|
2063
2598
|
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
2064
2599
|
const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3, arg4);
|
2065
2600
|
return ret;
|
2066
2601
|
}, arguments);
|
2067
2602
|
};
|
2068
|
-
imports.wbg.
|
2603
|
+
imports.wbg.__wbg_createIndex_fcfd513cf4581834 = function() {
|
2069
2604
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
2070
2605
|
const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3);
|
2071
2606
|
return ret;
|
2072
2607
|
}, arguments);
|
2073
2608
|
};
|
2074
|
-
imports.wbg.
|
2609
|
+
imports.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9 = function() {
|
2075
2610
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
2076
2611
|
const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);
|
2077
2612
|
return ret;
|
2078
2613
|
}, arguments);
|
2079
2614
|
};
|
2615
|
+
imports.wbg.__wbg_crlregistration_new = function(arg0) {
|
2616
|
+
const ret = CrlRegistration.__wrap(arg0);
|
2617
|
+
return ret;
|
2618
|
+
};
|
2080
2619
|
imports.wbg.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
|
2081
2620
|
const ret = arg0.crypto;
|
2082
2621
|
return ret;
|
2083
2622
|
};
|
2084
|
-
imports.wbg.
|
2623
|
+
imports.wbg.__wbg_decryptedmessage_new = function(arg0) {
|
2624
|
+
const ret = DecryptedMessage.__wrap(arg0);
|
2625
|
+
return ret;
|
2626
|
+
};
|
2627
|
+
imports.wbg.__wbg_deleteIndex_e6717aa0e9691894 = function() {
|
2085
2628
|
return handleError(function(arg0, arg1, arg2) {
|
2086
2629
|
arg0.deleteIndex(getStringFromWasm0(arg1, arg2));
|
2087
2630
|
}, arguments);
|
2088
2631
|
};
|
2089
|
-
imports.wbg.
|
2632
|
+
imports.wbg.__wbg_deleteObjectStore_3f08ae00cd288224 = function() {
|
2090
2633
|
return handleError(function(arg0, arg1, arg2) {
|
2091
2634
|
arg0.deleteObjectStore(getStringFromWasm0(arg1, arg2));
|
2092
2635
|
}, arguments);
|
2093
2636
|
};
|
2094
|
-
imports.wbg.
|
2637
|
+
imports.wbg.__wbg_delete_200677093b4cf756 = function() {
|
2095
2638
|
return handleError(function(arg0, arg1) {
|
2096
2639
|
const ret = arg0.delete(arg1);
|
2097
2640
|
return ret;
|
2098
2641
|
}, arguments);
|
2099
2642
|
};
|
2100
|
-
imports.wbg.
|
2643
|
+
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
2101
2644
|
const ret = arg0.done;
|
2102
2645
|
return ret;
|
2103
2646
|
};
|
2104
|
-
imports.wbg.
|
2105
|
-
const ret =
|
2647
|
+
imports.wbg.__wbg_e2eidumpedpkienv_new = function(arg0) {
|
2648
|
+
const ret = E2eiDumpedPkiEnv.__wrap(arg0);
|
2106
2649
|
return ret;
|
2107
2650
|
};
|
2108
|
-
imports.wbg.
|
2109
|
-
|
2110
|
-
|
2111
|
-
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
2112
|
-
const ret = arg0.epoch_changed(v0, BigInt.asUintN(64, arg3));
|
2113
|
-
return ret;
|
2114
|
-
}, arguments);
|
2115
|
-
};
|
2116
|
-
imports.wbg.__wbg_error_4e9ba4ac0ad780bd = function(arg0) {
|
2117
|
-
console.error(arg0);
|
2651
|
+
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
2652
|
+
const ret = Object.entries(arg0);
|
2653
|
+
return ret;
|
2118
2654
|
};
|
2119
|
-
imports.wbg.
|
2120
|
-
|
2121
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2655
|
+
imports.wbg.__wbg_error_1004b8c64097413f = function(arg0, arg1) {
|
2656
|
+
console.error(arg0, arg1);
|
2122
2657
|
};
|
2123
2658
|
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
2124
2659
|
let deferred0_0;
|
@@ -2131,13 +2666,17 @@ function __wbg_get_imports() {
|
|
2131
2666
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
2132
2667
|
}
|
2133
2668
|
};
|
2134
|
-
imports.wbg.
|
2669
|
+
imports.wbg.__wbg_error_e9332df4e7a14612 = function(arg0) {
|
2670
|
+
const ret = arg0.error;
|
2671
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2672
|
+
};
|
2673
|
+
imports.wbg.__wbg_error_ff4ddaabdfc5dbb3 = function() {
|
2135
2674
|
return handleError(function(arg0) {
|
2136
2675
|
const ret = arg0.error;
|
2137
2676
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2138
2677
|
}, arguments);
|
2139
2678
|
};
|
2140
|
-
imports.wbg.
|
2679
|
+
imports.wbg.__wbg_execute_c6c7aec349db01b1 = function() {
|
2141
2680
|
return handleError(function(arg0, arg1) {
|
2142
2681
|
const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
|
2143
2682
|
return ret;
|
@@ -2147,71 +2686,82 @@ function __wbg_get_imports() {
|
|
2147
2686
|
const ret = FfiWireE2EIdentity.__wrap(arg0);
|
2148
2687
|
return ret;
|
2149
2688
|
};
|
2689
|
+
imports.wbg.__wbg_getAll_1de5635a99f2dae8 = function() {
|
2690
|
+
return handleError(function(arg0) {
|
2691
|
+
const ret = arg0.getAll();
|
2692
|
+
return ret;
|
2693
|
+
}, arguments);
|
2694
|
+
};
|
2695
|
+
imports.wbg.__wbg_getAll_e1f497a121218ab5 = function() {
|
2696
|
+
return handleError(function(arg0, arg1, arg2) {
|
2697
|
+
const ret = arg0.getAll(arg1, arg2 >>> 0);
|
2698
|
+
return ret;
|
2699
|
+
}, arguments);
|
2700
|
+
};
|
2701
|
+
imports.wbg.__wbg_getAll_e6903c610babcd42 = function() {
|
2702
|
+
return handleError(function(arg0, arg1) {
|
2703
|
+
const ret = arg0.getAll(arg1);
|
2704
|
+
return ret;
|
2705
|
+
}, arguments);
|
2706
|
+
};
|
2707
|
+
imports.wbg.__wbg_getRandomValues_3d90134a348e46b3 = function() {
|
2708
|
+
return handleError(function(arg0, arg1) {
|
2709
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
2710
|
+
}, arguments);
|
2711
|
+
};
|
2150
2712
|
imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() {
|
2151
2713
|
return handleError(function(arg0, arg1) {
|
2152
2714
|
arg0.getRandomValues(arg1);
|
2153
2715
|
}, arguments);
|
2154
2716
|
};
|
2155
|
-
imports.wbg.
|
2717
|
+
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
2156
2718
|
const ret = arg0.getTime();
|
2157
2719
|
return ret;
|
2158
2720
|
};
|
2159
|
-
imports.wbg.
|
2160
|
-
const ret = arg0[arg1 >>> 0];
|
2161
|
-
return ret;
|
2162
|
-
};
|
2163
|
-
imports.wbg.__wbg_get_329df8534b48cf11 = function() {
|
2164
|
-
return handleError(function(arg0, arg1) {
|
2165
|
-
const ret = arg0.get(arg1);
|
2166
|
-
return ret;
|
2167
|
-
}, arguments);
|
2168
|
-
};
|
2169
|
-
imports.wbg.__wbg_get_47cc7c79c861e271 = function(arg0, arg1, arg2) {
|
2721
|
+
imports.wbg.__wbg_get_4f73335ab78445db = function(arg0, arg1, arg2) {
|
2170
2722
|
const ret = arg1[arg2 >>> 0];
|
2171
2723
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2172
2724
|
var len1 = WASM_VECTOR_LEN;
|
2173
2725
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
2174
2726
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
2175
2727
|
};
|
2176
|
-
imports.wbg.
|
2728
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
|
2729
|
+
return handleError(function(arg0, arg1) {
|
2730
|
+
const ret = Reflect.get(arg0, arg1);
|
2731
|
+
return ret;
|
2732
|
+
}, arguments);
|
2733
|
+
};
|
2734
|
+
imports.wbg.__wbg_get_8da03f81f6a1111e = function() {
|
2177
2735
|
return handleError(function(arg0, arg1) {
|
2178
2736
|
const ret = arg0.get(arg1);
|
2179
2737
|
return ret;
|
2180
2738
|
}, arguments);
|
2181
2739
|
};
|
2182
|
-
imports.wbg.
|
2740
|
+
imports.wbg.__wbg_get_93e54e8e166fbcab = function() {
|
2183
2741
|
return handleError(function(arg0, arg1) {
|
2184
|
-
const ret =
|
2742
|
+
const ret = arg0.get(arg1);
|
2185
2743
|
return ret;
|
2186
2744
|
}, arguments);
|
2187
2745
|
};
|
2746
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
2747
|
+
const ret = arg0[arg1 >>> 0];
|
2748
|
+
return ret;
|
2749
|
+
};
|
2188
2750
|
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
2189
2751
|
const ret = arg0[arg1];
|
2190
2752
|
return ret;
|
2191
2753
|
};
|
2192
|
-
imports.wbg.
|
2193
|
-
return handleError(function() {
|
2194
|
-
const ret = globalThis.globalThis;
|
2195
|
-
return ret;
|
2196
|
-
}, arguments);
|
2197
|
-
};
|
2198
|
-
imports.wbg.__wbg_global_fc813a897a497d26 = function() {
|
2199
|
-
return handleError(function() {
|
2200
|
-
const ret = global.global;
|
2201
|
-
return ret;
|
2202
|
-
}, arguments);
|
2203
|
-
};
|
2204
|
-
imports.wbg.__wbg_indexNames_5a79feb92b5c7d15 = function(arg0) {
|
2754
|
+
imports.wbg.__wbg_indexNames_0ed82a19d7d88aa3 = function(arg0) {
|
2205
2755
|
const ret = arg0.indexNames;
|
2206
2756
|
return ret;
|
2207
2757
|
};
|
2208
|
-
imports.wbg.
|
2758
|
+
imports.wbg.__wbg_index_e00ca5fff206ee3e = function() {
|
2209
2759
|
return handleError(function(arg0, arg1, arg2) {
|
2210
2760
|
const ret = arg0.index(getStringFromWasm0(arg1, arg2));
|
2211
2761
|
return ret;
|
2212
2762
|
}, arguments);
|
2213
2763
|
};
|
2214
|
-
imports.wbg.
|
2764
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
2215
2765
|
let result;
|
2216
2766
|
try {
|
2217
2767
|
result = arg0 instanceof ArrayBuffer;
|
@@ -2221,7 +2771,7 @@ function __wbg_get_imports() {
|
|
2221
2771
|
const ret = result;
|
2222
2772
|
return ret;
|
2223
2773
|
};
|
2224
|
-
imports.wbg.
|
2774
|
+
imports.wbg.__wbg_instanceof_IdbCursorWithValue_18f39d69ed298f6f = function(arg0) {
|
2225
2775
|
let result;
|
2226
2776
|
try {
|
2227
2777
|
result = arg0 instanceof IDBCursorWithValue;
|
@@ -2231,7 +2781,7 @@ function __wbg_get_imports() {
|
|
2231
2781
|
const ret = result;
|
2232
2782
|
return ret;
|
2233
2783
|
};
|
2234
|
-
imports.wbg.
|
2784
|
+
imports.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9 = function(arg0) {
|
2235
2785
|
let result;
|
2236
2786
|
try {
|
2237
2787
|
result = arg0 instanceof IDBDatabase;
|
@@ -2241,7 +2791,7 @@ function __wbg_get_imports() {
|
|
2241
2791
|
const ret = result;
|
2242
2792
|
return ret;
|
2243
2793
|
};
|
2244
|
-
imports.wbg.
|
2794
|
+
imports.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f = function(arg0) {
|
2245
2795
|
let result;
|
2246
2796
|
try {
|
2247
2797
|
result = arg0 instanceof IDBFactory;
|
@@ -2251,7 +2801,7 @@ function __wbg_get_imports() {
|
|
2251
2801
|
const ret = result;
|
2252
2802
|
return ret;
|
2253
2803
|
};
|
2254
|
-
imports.wbg.
|
2804
|
+
imports.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893 = function(arg0) {
|
2255
2805
|
let result;
|
2256
2806
|
try {
|
2257
2807
|
result = arg0 instanceof IDBOpenDBRequest;
|
@@ -2261,7 +2811,7 @@ function __wbg_get_imports() {
|
|
2261
2811
|
const ret = result;
|
2262
2812
|
return ret;
|
2263
2813
|
};
|
2264
|
-
imports.wbg.
|
2814
|
+
imports.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4 = function(arg0) {
|
2265
2815
|
let result;
|
2266
2816
|
try {
|
2267
2817
|
result = arg0 instanceof IDBRequest;
|
@@ -2271,7 +2821,7 @@ function __wbg_get_imports() {
|
|
2271
2821
|
const ret = result;
|
2272
2822
|
return ret;
|
2273
2823
|
};
|
2274
|
-
imports.wbg.
|
2824
|
+
imports.wbg.__wbg_instanceof_IdbTransaction_746ea660d347650d = function(arg0) {
|
2275
2825
|
let result;
|
2276
2826
|
try {
|
2277
2827
|
result = arg0 instanceof IDBTransaction;
|
@@ -2281,7 +2831,7 @@ function __wbg_get_imports() {
|
|
2281
2831
|
const ret = result;
|
2282
2832
|
return ret;
|
2283
2833
|
};
|
2284
|
-
imports.wbg.
|
2834
|
+
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
2285
2835
|
let result;
|
2286
2836
|
try {
|
2287
2837
|
result = arg0 instanceof Map;
|
@@ -2291,7 +2841,7 @@ function __wbg_get_imports() {
|
|
2291
2841
|
const ret = result;
|
2292
2842
|
return ret;
|
2293
2843
|
};
|
2294
|
-
imports.wbg.
|
2844
|
+
imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
|
2295
2845
|
let result;
|
2296
2846
|
try {
|
2297
2847
|
result = arg0 instanceof Promise;
|
@@ -2301,7 +2851,7 @@ function __wbg_get_imports() {
|
|
2301
2851
|
const ret = result;
|
2302
2852
|
return ret;
|
2303
2853
|
};
|
2304
|
-
imports.wbg.
|
2854
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
2305
2855
|
let result;
|
2306
2856
|
try {
|
2307
2857
|
result = arg0 instanceof Uint8Array;
|
@@ -2311,39 +2861,43 @@ function __wbg_get_imports() {
|
|
2311
2861
|
const ret = result;
|
2312
2862
|
return ret;
|
2313
2863
|
};
|
2314
|
-
imports.wbg.
|
2864
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
2315
2865
|
const ret = Array.isArray(arg0);
|
2316
2866
|
return ret;
|
2317
2867
|
};
|
2318
|
-
imports.wbg.
|
2868
|
+
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
2319
2869
|
const ret = Number.isSafeInteger(arg0);
|
2320
2870
|
return ret;
|
2321
2871
|
};
|
2322
|
-
imports.wbg.
|
2872
|
+
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
2323
2873
|
const ret = Symbol.iterator;
|
2324
2874
|
return ret;
|
2325
2875
|
};
|
2326
|
-
imports.wbg.
|
2876
|
+
imports.wbg.__wbg_keyPath_443ecf3f74202169 = function() {
|
2327
2877
|
return handleError(function(arg0) {
|
2328
2878
|
const ret = arg0.keyPath;
|
2329
2879
|
return ret;
|
2330
2880
|
}, arguments);
|
2331
2881
|
};
|
2332
|
-
imports.wbg.
|
2882
|
+
imports.wbg.__wbg_key_29fefecef430db96 = function() {
|
2333
2883
|
return handleError(function(arg0) {
|
2334
2884
|
const ret = arg0.key;
|
2335
2885
|
return ret;
|
2336
2886
|
}, arguments);
|
2337
2887
|
};
|
2338
|
-
imports.wbg.
|
2888
|
+
imports.wbg.__wbg_length_52b6c4580c5ec934 = function(arg0) {
|
2889
|
+
const ret = arg0.length;
|
2890
|
+
return ret;
|
2891
|
+
};
|
2892
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
2339
2893
|
const ret = arg0.length;
|
2340
2894
|
return ret;
|
2341
2895
|
};
|
2342
|
-
imports.wbg.
|
2896
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
2343
2897
|
const ret = arg0.length;
|
2344
2898
|
return ret;
|
2345
2899
|
};
|
2346
|
-
imports.wbg.
|
2900
|
+
imports.wbg.__wbg_length_f8c2b921ff6325ae = function(arg0) {
|
2347
2901
|
const ret = arg0.length;
|
2348
2902
|
return ret;
|
2349
2903
|
};
|
@@ -2351,29 +2905,29 @@ function __wbg_get_imports() {
|
|
2351
2905
|
const ret = arg0.msCrypto;
|
2352
2906
|
return ret;
|
2353
2907
|
};
|
2354
|
-
imports.wbg.
|
2908
|
+
imports.wbg.__wbg_multiEntry_c146ebd38a5de9ea = function(arg0) {
|
2355
2909
|
const ret = arg0.multiEntry;
|
2356
2910
|
return ret;
|
2357
2911
|
};
|
2358
|
-
imports.wbg.
|
2912
|
+
imports.wbg.__wbg_name_d72edb6eaaa6493a = function(arg0, arg1) {
|
2359
2913
|
const ret = arg1.name;
|
2360
2914
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
2361
2915
|
const len1 = WASM_VECTOR_LEN;
|
2362
2916
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
2363
2917
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
2364
2918
|
};
|
2365
|
-
imports.wbg.
|
2919
|
+
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
2366
2920
|
const ret = new Date;
|
2367
2921
|
return ret;
|
2368
2922
|
};
|
2369
|
-
imports.wbg.
|
2923
|
+
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
2370
2924
|
try {
|
2371
2925
|
var state0 = { a: arg0, b: arg1 };
|
2372
2926
|
var cb0 = (arg02, arg12) => {
|
2373
2927
|
const a = state0.a;
|
2374
2928
|
state0.a = 0;
|
2375
2929
|
try {
|
2376
|
-
return
|
2930
|
+
return __wbg_adapter_566(a, state0.b, arg02, arg12);
|
2377
2931
|
} finally {
|
2378
2932
|
state0.a = a;
|
2379
2933
|
}
|
@@ -2384,28 +2938,28 @@ function __wbg_get_imports() {
|
|
2384
2938
|
state0.a = state0.b = 0;
|
2385
2939
|
}
|
2386
2940
|
};
|
2387
|
-
imports.wbg.
|
2941
|
+
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
2388
2942
|
const ret = new Object;
|
2389
2943
|
return ret;
|
2390
2944
|
};
|
2391
|
-
imports.wbg.
|
2392
|
-
const ret = new
|
2945
|
+
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
2946
|
+
const ret = new Map;
|
2393
2947
|
return ret;
|
2394
2948
|
};
|
2395
|
-
imports.wbg.
|
2396
|
-
const ret = new
|
2949
|
+
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
2950
|
+
const ret = new Array;
|
2397
2951
|
return ret;
|
2398
2952
|
};
|
2399
2953
|
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
2400
2954
|
const ret = new Error;
|
2401
2955
|
return ret;
|
2402
2956
|
};
|
2403
|
-
imports.wbg.
|
2404
|
-
const ret = new
|
2957
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
2958
|
+
const ret = new Uint8Array(arg0);
|
2405
2959
|
return ret;
|
2406
2960
|
};
|
2407
|
-
imports.wbg.
|
2408
|
-
const ret = new
|
2961
|
+
imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
2962
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
2409
2963
|
return ret;
|
2410
2964
|
};
|
2411
2965
|
imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
|
@@ -2416,28 +2970,32 @@ function __wbg_get_imports() {
|
|
2416
2970
|
const ret = NewAcmeOrder.__wrap(arg0);
|
2417
2971
|
return ret;
|
2418
2972
|
};
|
2419
|
-
imports.wbg.
|
2973
|
+
imports.wbg.__wbg_newcrldistributionpoints_new = function(arg0) {
|
2974
|
+
const ret = NewCrlDistributionPoints.__wrap(arg0);
|
2975
|
+
return ret;
|
2976
|
+
};
|
2977
|
+
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
2420
2978
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
2421
2979
|
return ret;
|
2422
2980
|
};
|
2423
|
-
imports.wbg.
|
2981
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
2424
2982
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
2425
2983
|
return ret;
|
2426
2984
|
};
|
2427
|
-
imports.wbg.
|
2985
|
+
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
2428
2986
|
const ret = new Uint8Array(arg0 >>> 0);
|
2429
2987
|
return ret;
|
2430
2988
|
};
|
2431
|
-
imports.wbg.
|
2989
|
+
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
2990
|
+
const ret = arg0.next;
|
2991
|
+
return ret;
|
2992
|
+
};
|
2993
|
+
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
|
2432
2994
|
return handleError(function(arg0) {
|
2433
2995
|
const ret = arg0.next();
|
2434
2996
|
return ret;
|
2435
2997
|
}, arguments);
|
2436
2998
|
};
|
2437
|
-
imports.wbg.__wbg_next_b2690a2dab163f0f = function(arg0) {
|
2438
|
-
const ret = arg0.next;
|
2439
|
-
return ret;
|
2440
|
-
};
|
2441
2999
|
imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) {
|
2442
3000
|
const ret = arg0.node;
|
2443
3001
|
return ret;
|
@@ -2446,45 +3004,45 @@ function __wbg_get_imports() {
|
|
2446
3004
|
const ret = Date.now();
|
2447
3005
|
return ret;
|
2448
3006
|
};
|
2449
|
-
imports.wbg.
|
3007
|
+
imports.wbg.__wbg_now_807e54c39636c349 = function() {
|
2450
3008
|
const ret = Date.now();
|
2451
3009
|
return ret;
|
2452
3010
|
};
|
2453
|
-
imports.wbg.
|
3011
|
+
imports.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf = function(arg0) {
|
2454
3012
|
const ret = arg0.objectStoreNames;
|
2455
3013
|
return ret;
|
2456
3014
|
};
|
2457
|
-
imports.wbg.
|
3015
|
+
imports.wbg.__wbg_objectStore_21878d46d25b64b6 = function() {
|
2458
3016
|
return handleError(function(arg0, arg1, arg2) {
|
2459
3017
|
const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
|
2460
3018
|
return ret;
|
2461
3019
|
}, arguments);
|
2462
3020
|
};
|
2463
|
-
imports.wbg.
|
2464
|
-
return handleError(function(arg0
|
2465
|
-
const ret = arg0.openCursor(
|
3021
|
+
imports.wbg.__wbg_openCursor_238e247d18bde2cd = function() {
|
3022
|
+
return handleError(function(arg0) {
|
3023
|
+
const ret = arg0.openCursor();
|
2466
3024
|
return ret;
|
2467
3025
|
}, arguments);
|
2468
3026
|
};
|
2469
|
-
imports.wbg.
|
2470
|
-
return handleError(function(arg0) {
|
2471
|
-
const ret = arg0.openCursor();
|
3027
|
+
imports.wbg.__wbg_openCursor_6fd4dab51810d238 = function() {
|
3028
|
+
return handleError(function(arg0, arg1, arg2) {
|
3029
|
+
const ret = arg0.openCursor(arg1, __wbindgen_enum_IdbCursorDirection[arg2]);
|
2472
3030
|
return ret;
|
2473
3031
|
}, arguments);
|
2474
3032
|
};
|
2475
|
-
imports.wbg.
|
3033
|
+
imports.wbg.__wbg_openCursor_f4b061aa6d804b93 = function() {
|
2476
3034
|
return handleError(function(arg0, arg1) {
|
2477
3035
|
const ret = arg0.openCursor(arg1);
|
2478
3036
|
return ret;
|
2479
3037
|
}, arguments);
|
2480
3038
|
};
|
2481
|
-
imports.wbg.
|
3039
|
+
imports.wbg.__wbg_open_88b1390d99a7c691 = function() {
|
2482
3040
|
return handleError(function(arg0, arg1, arg2) {
|
2483
3041
|
const ret = arg0.open(getStringFromWasm0(arg1, arg2));
|
2484
3042
|
return ret;
|
2485
3043
|
}, arguments);
|
2486
3044
|
};
|
2487
|
-
imports.wbg.
|
3045
|
+
imports.wbg.__wbg_open_e0c0b2993eb596e1 = function() {
|
2488
3046
|
return handleError(function(arg0, arg1, arg2, arg3) {
|
2489
3047
|
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
2490
3048
|
return ret;
|
@@ -2502,26 +3060,26 @@ function __wbg_get_imports() {
|
|
2502
3060
|
const ret = ProteusAutoPrekeyBundle.__wrap(arg0);
|
2503
3061
|
return ret;
|
2504
3062
|
};
|
2505
|
-
imports.wbg.
|
3063
|
+
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
2506
3064
|
const ret = arg0.push(arg1);
|
2507
3065
|
return ret;
|
2508
3066
|
};
|
2509
|
-
imports.wbg.
|
2510
|
-
return handleError(function(arg0, arg1) {
|
2511
|
-
const ret = arg0.put(arg1);
|
3067
|
+
imports.wbg.__wbg_put_066faa31a6a88f5b = function() {
|
3068
|
+
return handleError(function(arg0, arg1, arg2) {
|
3069
|
+
const ret = arg0.put(arg1, arg2);
|
2512
3070
|
return ret;
|
2513
3071
|
}, arguments);
|
2514
3072
|
};
|
2515
|
-
imports.wbg.
|
2516
|
-
return handleError(function(arg0, arg1
|
2517
|
-
const ret = arg0.put(arg1
|
3073
|
+
imports.wbg.__wbg_put_9ef5363941008835 = function() {
|
3074
|
+
return handleError(function(arg0, arg1) {
|
3075
|
+
const ret = arg0.put(arg1);
|
2518
3076
|
return ret;
|
2519
3077
|
}, arguments);
|
2520
3078
|
};
|
2521
|
-
imports.wbg.
|
3079
|
+
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
2522
3080
|
queueMicrotask(arg0);
|
2523
3081
|
};
|
2524
|
-
imports.wbg.
|
3082
|
+
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
2525
3083
|
const ret = arg0.queueMicrotask;
|
2526
3084
|
return ret;
|
2527
3085
|
};
|
@@ -2530,11 +3088,7 @@ function __wbg_get_imports() {
|
|
2530
3088
|
arg0.randomFillSync(arg1);
|
2531
3089
|
}, arguments);
|
2532
3090
|
};
|
2533
|
-
imports.wbg.
|
2534
|
-
const ret = Promise.reject(arg0);
|
2535
|
-
return ret;
|
2536
|
-
};
|
2537
|
-
imports.wbg.__wbg_request_c061759d78066f9a = function(arg0) {
|
3091
|
+
imports.wbg.__wbg_request_695d684a1f4bb96e = function(arg0) {
|
2538
3092
|
const ret = arg0.request;
|
2539
3093
|
return ret;
|
2540
3094
|
};
|
@@ -2544,72 +3098,66 @@ function __wbg_get_imports() {
|
|
2544
3098
|
return ret;
|
2545
3099
|
}, arguments);
|
2546
3100
|
};
|
2547
|
-
imports.wbg.
|
3101
|
+
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
2548
3102
|
const ret = Promise.resolve(arg0);
|
2549
3103
|
return ret;
|
2550
3104
|
};
|
2551
|
-
imports.wbg.
|
3105
|
+
imports.wbg.__wbg_result_f29afabdf2c05826 = function() {
|
2552
3106
|
return handleError(function(arg0) {
|
2553
3107
|
const ret = arg0.result;
|
2554
3108
|
return ret;
|
2555
3109
|
}, arguments);
|
2556
3110
|
};
|
2557
|
-
imports.wbg.
|
2558
|
-
|
2559
|
-
const ret = self.self;
|
2560
|
-
return ret;
|
2561
|
-
}, arguments);
|
2562
|
-
};
|
2563
|
-
imports.wbg.__wbg_set_1f2956726252aaf4 = function(arg0, arg1, arg2) {
|
2564
|
-
const ret = arg0.set(arg1, arg2);
|
2565
|
-
return ret;
|
3111
|
+
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
3112
|
+
arg0[arg1 >>> 0] = arg2;
|
2566
3113
|
};
|
2567
3114
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
2568
3115
|
arg0[arg1] = arg2;
|
2569
3116
|
};
|
2570
|
-
imports.wbg.
|
2571
|
-
arg0[arg1 >>> 0] = arg2;
|
2572
|
-
};
|
2573
|
-
imports.wbg.__wbg_set_e97d203fd145cdae = function(arg0, arg1, arg2) {
|
3117
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
2574
3118
|
arg0.set(arg1, arg2 >>> 0);
|
2575
3119
|
};
|
2576
|
-
imports.wbg.
|
3120
|
+
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
3121
|
+
const ret = arg0.set(arg1, arg2);
|
3122
|
+
return ret;
|
3123
|
+
};
|
3124
|
+
imports.wbg.__wbg_setautoincrement_8b4327709e9ee7d9 = function(arg0, arg1) {
|
2577
3125
|
arg0.autoIncrement = arg1 !== 0;
|
2578
3126
|
};
|
2579
|
-
imports.wbg.
|
3127
|
+
imports.wbg.__wbg_setcause_180f5110152d3ce3 = function(arg0, arg1) {
|
2580
3128
|
arg0.cause = arg1;
|
2581
3129
|
};
|
2582
|
-
imports.wbg.
|
3130
|
+
imports.wbg.__wbg_setkeypath_691179e313c26ae1 = function(arg0, arg1) {
|
2583
3131
|
arg0.keyPath = arg1;
|
2584
3132
|
};
|
2585
|
-
imports.wbg.
|
3133
|
+
imports.wbg.__wbg_setmultientry_4c4eee871f29837a = function(arg0, arg1) {
|
2586
3134
|
arg0.multiEntry = arg1 !== 0;
|
2587
3135
|
};
|
2588
|
-
imports.wbg.
|
3136
|
+
imports.wbg.__wbg_setname_6df54b7ebf9404a9 = function(arg0, arg1, arg2) {
|
2589
3137
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
2590
3138
|
};
|
2591
|
-
imports.wbg.
|
3139
|
+
imports.wbg.__wbg_setonabort_3bf4db6614fa98e9 = function(arg0, arg1) {
|
2592
3140
|
arg0.onabort = arg1;
|
2593
3141
|
};
|
2594
|
-
imports.wbg.
|
3142
|
+
imports.wbg.__wbg_setoncomplete_4d19df0dadb7c4d4 = function(arg0, arg1) {
|
2595
3143
|
arg0.oncomplete = arg1;
|
2596
3144
|
};
|
2597
|
-
imports.wbg.
|
3145
|
+
imports.wbg.__wbg_setonerror_b0d9d723b8fddbbb = function(arg0, arg1) {
|
2598
3146
|
arg0.onerror = arg1;
|
2599
3147
|
};
|
2600
|
-
imports.wbg.
|
3148
|
+
imports.wbg.__wbg_setonerror_d7e3056cc6e56085 = function(arg0, arg1) {
|
2601
3149
|
arg0.onerror = arg1;
|
2602
3150
|
};
|
2603
|
-
imports.wbg.
|
3151
|
+
imports.wbg.__wbg_setonsuccess_afa464ee777a396d = function(arg0, arg1) {
|
2604
3152
|
arg0.onsuccess = arg1;
|
2605
3153
|
};
|
2606
|
-
imports.wbg.
|
3154
|
+
imports.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f = function(arg0, arg1) {
|
2607
3155
|
arg0.onupgradeneeded = arg1;
|
2608
3156
|
};
|
2609
|
-
imports.wbg.
|
3157
|
+
imports.wbg.__wbg_setonversionchange_6ee07fa49ee1e3a5 = function(arg0, arg1) {
|
2610
3158
|
arg0.onversionchange = arg1;
|
2611
3159
|
};
|
2612
|
-
imports.wbg.
|
3160
|
+
imports.wbg.__wbg_setunique_dd24c422aa05df89 = function(arg0, arg1) {
|
2613
3161
|
arg0.unique = arg1 !== 0;
|
2614
3162
|
};
|
2615
3163
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
@@ -2619,51 +3167,67 @@ function __wbg_get_imports() {
|
|
2619
3167
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
2620
3168
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
2621
3169
|
};
|
2622
|
-
imports.wbg.
|
3170
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
3171
|
+
const ret = typeof global === "undefined" ? null : global;
|
3172
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
3173
|
+
};
|
3174
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
3175
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
3176
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
3177
|
+
};
|
3178
|
+
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
3179
|
+
const ret = typeof self === "undefined" ? null : self;
|
3180
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
3181
|
+
};
|
3182
|
+
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
3183
|
+
const ret = typeof window === "undefined" ? null : window;
|
3184
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
3185
|
+
};
|
3186
|
+
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
2623
3187
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
2624
3188
|
return ret;
|
2625
3189
|
};
|
2626
|
-
imports.wbg.
|
3190
|
+
imports.wbg.__wbg_target_0a62d9d79a2a1ede = function(arg0) {
|
2627
3191
|
const ret = arg0.target;
|
2628
3192
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2629
3193
|
};
|
2630
|
-
imports.wbg.
|
2631
|
-
const ret = arg0.then(arg1
|
3194
|
+
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
3195
|
+
const ret = arg0.then(arg1);
|
2632
3196
|
return ret;
|
2633
3197
|
};
|
2634
|
-
imports.wbg.
|
2635
|
-
const ret = arg0.then(arg1);
|
3198
|
+
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
3199
|
+
const ret = arg0.then(arg1, arg2);
|
2636
3200
|
return ret;
|
2637
3201
|
};
|
2638
|
-
imports.wbg.
|
3202
|
+
imports.wbg.__wbg_toString_5285597960676b7b = function(arg0) {
|
2639
3203
|
const ret = arg0.toString();
|
2640
3204
|
return ret;
|
2641
3205
|
};
|
2642
|
-
imports.wbg.
|
2643
|
-
const ret = arg0.transaction;
|
2644
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2645
|
-
};
|
2646
|
-
imports.wbg.__wbg_transaction_a64054c235725edb = function() {
|
3206
|
+
imports.wbg.__wbg_transaction_d6d07c3c9963c49e = function() {
|
2647
3207
|
return handleError(function(arg0, arg1, arg2) {
|
2648
3208
|
const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);
|
2649
3209
|
return ret;
|
2650
3210
|
}, arguments);
|
2651
3211
|
};
|
2652
|
-
imports.wbg.
|
2653
|
-
const ret = arg0.
|
2654
|
-
return ret;
|
3212
|
+
imports.wbg.__wbg_transaction_e713aa7b07ccaedd = function(arg0) {
|
3213
|
+
const ret = arg0.transaction;
|
3214
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
2655
3215
|
};
|
2656
|
-
imports.wbg.
|
2657
|
-
const ret = arg0.
|
3216
|
+
imports.wbg.__wbg_unique_23ddfed89bddb31d = function(arg0) {
|
3217
|
+
const ret = arg0.unique;
|
2658
3218
|
return ret;
|
2659
3219
|
};
|
2660
|
-
imports.wbg.
|
3220
|
+
imports.wbg.__wbg_value_68c4e9a54bb7fd5e = function() {
|
2661
3221
|
return handleError(function(arg0) {
|
2662
3222
|
const ret = arg0.value;
|
2663
3223
|
return ret;
|
2664
3224
|
}, arguments);
|
2665
3225
|
};
|
2666
|
-
imports.wbg.
|
3226
|
+
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
3227
|
+
const ret = arg0.value;
|
3228
|
+
return ret;
|
3229
|
+
};
|
3230
|
+
imports.wbg.__wbg_version_a70a33e5bbc6d6db = function(arg0) {
|
2667
3231
|
const ret = arg0.version;
|
2668
3232
|
return ret;
|
2669
3233
|
};
|
@@ -2671,11 +3235,9 @@ function __wbg_get_imports() {
|
|
2671
3235
|
const ret = arg0.versions;
|
2672
3236
|
return ret;
|
2673
3237
|
};
|
2674
|
-
imports.wbg.
|
2675
|
-
|
2676
|
-
|
2677
|
-
return ret;
|
2678
|
-
}, arguments);
|
3238
|
+
imports.wbg.__wbg_welcomebundle_new = function(arg0) {
|
3239
|
+
const ret = WelcomeBundle.__wrap(arg0);
|
3240
|
+
return ret;
|
2679
3241
|
};
|
2680
3242
|
imports.wbg.__wbg_wireidentity_new = function(arg0) {
|
2681
3243
|
const ret = WireIdentity.__wrap(arg0);
|
@@ -2720,16 +3282,16 @@ function __wbg_get_imports() {
|
|
2720
3282
|
const ret = false;
|
2721
3283
|
return ret;
|
2722
3284
|
};
|
2723
|
-
imports.wbg.
|
2724
|
-
const ret = makeMutClosure(arg0, arg1,
|
3285
|
+
imports.wbg.__wbindgen_closure_wrapper14007 = function(arg0, arg1, arg2) {
|
3286
|
+
const ret = makeMutClosure(arg0, arg1, 2571, __wbg_adapter_63);
|
2725
3287
|
return ret;
|
2726
3288
|
};
|
2727
|
-
imports.wbg.
|
2728
|
-
const ret = makeMutClosure(arg0, arg1,
|
3289
|
+
imports.wbg.__wbindgen_closure_wrapper15172 = function(arg0, arg1, arg2) {
|
3290
|
+
const ret = makeMutClosure(arg0, arg1, 2770, __wbg_adapter_66);
|
2729
3291
|
return ret;
|
2730
3292
|
};
|
2731
|
-
imports.wbg.
|
2732
|
-
const ret = makeMutClosure(arg0, arg1,
|
3293
|
+
imports.wbg.__wbindgen_closure_wrapper3886 = function(arg0, arg1, arg2) {
|
3294
|
+
const ret = makeMutClosure(arg0, arg1, 875, __wbg_adapter_60);
|
2733
3295
|
return ret;
|
2734
3296
|
};
|
2735
3297
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
@@ -2859,17 +3421,15 @@ async function __wbg_init(module_or_path) {
|
|
2859
3421
|
}
|
2860
3422
|
var core_crypto_ffi_default = __wbg_init;
|
2861
3423
|
|
3424
|
+
// src/Conversions.ts
|
3425
|
+
function safeBigintToNumber(x) {
|
3426
|
+
if (x > BigInt(Number.MAX_SAFE_INTEGER) || x < BigInt(Number.MIN_SAFE_INTEGER)) {
|
3427
|
+
throw new Error(`"${x}" is too large to be safely contained in a JS number`);
|
3428
|
+
}
|
3429
|
+
return new Number(x).valueOf();
|
3430
|
+
}
|
3431
|
+
|
2862
3432
|
// src/CoreCryptoMLS.ts
|
2863
|
-
var CredentialType2;
|
2864
|
-
((CredentialType3) => {
|
2865
|
-
CredentialType3[CredentialType3["Basic"] = 1] = "Basic";
|
2866
|
-
CredentialType3[CredentialType3["X509"] = 2] = "X509";
|
2867
|
-
})(CredentialType2 ||= {});
|
2868
|
-
var WirePolicy2;
|
2869
|
-
((WirePolicy3) => {
|
2870
|
-
WirePolicy3[WirePolicy3["Plaintext"] = 1] = "Plaintext";
|
2871
|
-
WirePolicy3[WirePolicy3["Ciphertext"] = 2] = "Ciphertext";
|
2872
|
-
})(WirePolicy2 ||= {});
|
2873
3433
|
function commitBundleFromFfi(commitBundle) {
|
2874
3434
|
return {
|
2875
3435
|
commit: commitBundle.commit,
|
@@ -2881,38 +3441,72 @@ function commitBundleFromFfi(commitBundle) {
|
|
2881
3441
|
}
|
2882
3442
|
};
|
2883
3443
|
}
|
2884
|
-
|
2885
|
-
|
2886
|
-
|
2887
|
-
|
2888
|
-
}
|
2889
|
-
|
2890
|
-
(
|
2891
|
-
|
2892
|
-
|
2893
|
-
|
2894
|
-
|
2895
|
-
|
2896
|
-
(
|
2897
|
-
|
2898
|
-
|
2899
|
-
|
2900
|
-
}
|
3444
|
+
function decryptedMessageFromFfi(m) {
|
3445
|
+
return {
|
3446
|
+
bufferedMessages: m.bufferedMessages?.map((msg) => bufferedDecryptedMessageFromFfi(msg)) ?? undefined,
|
3447
|
+
...bufferedDecryptedMessageFromFfi(m)
|
3448
|
+
};
|
3449
|
+
}
|
3450
|
+
function bufferedDecryptedMessageFromFfi(m) {
|
3451
|
+
return {
|
3452
|
+
message: m.message,
|
3453
|
+
proposals: m.proposals.map((proposal) => proposalBundleFromFfi(proposal)),
|
3454
|
+
isActive: m.isActive,
|
3455
|
+
commitDelay: m.commitDelay ? safeBigintToNumber(m.commitDelay) : undefined,
|
3456
|
+
senderClientId: m.senderClientId?.as_bytes(),
|
3457
|
+
hasEpochChanged: m.hasEpochChanged,
|
3458
|
+
identity: m.identity,
|
3459
|
+
crlNewDistributionPoints: m.crlNewDistributionPoints.as_strings()
|
3460
|
+
};
|
3461
|
+
}
|
3462
|
+
function proposalBundleFromFfi(p) {
|
3463
|
+
return {
|
3464
|
+
proposal: p.proposal,
|
3465
|
+
proposalRef: p.proposal_ref,
|
3466
|
+
crlNewDistributionPoints: p.crl_new_distribution_points
|
3467
|
+
};
|
3468
|
+
}
|
2901
3469
|
function mapTransportResponseToFfi(response) {
|
2902
3470
|
if (response === "success") {
|
2903
|
-
return new
|
3471
|
+
return new MlsTransportResponse(MlsTransportResponseVariant.Success);
|
2904
3472
|
}
|
2905
3473
|
if (response === "retry") {
|
2906
|
-
return new
|
3474
|
+
return new MlsTransportResponse(MlsTransportResponseVariant.Retry);
|
2907
3475
|
}
|
2908
3476
|
if (response?.abort?.reason !== undefined) {
|
2909
|
-
return new
|
3477
|
+
return new MlsTransportResponse(MlsTransportResponseVariant.Abort, response.abort.reason);
|
2910
3478
|
}
|
2911
3479
|
throw new Error(`Invalid MlsTransportResponse returned from callback: ${response}
|
2912
3480
|
Not a member of the MlsTransportResponse type.`);
|
2913
3481
|
}
|
2914
3482
|
|
3483
|
+
class MlsTransportFfiShim {
|
3484
|
+
inner;
|
3485
|
+
constructor(inner) {
|
3486
|
+
this.inner = inner;
|
3487
|
+
}
|
3488
|
+
async sendCommitBundle(commitBundle) {
|
3489
|
+
const cb = commitBundleFromFfi(commitBundle);
|
3490
|
+
const response = await this.inner.sendCommitBundle(cb);
|
3491
|
+
return mapTransportResponseToFfi(response);
|
3492
|
+
}
|
3493
|
+
async sendMessage(message) {
|
3494
|
+
const response = await this.inner.sendMessage(message);
|
3495
|
+
return mapTransportResponseToFfi(response);
|
3496
|
+
}
|
3497
|
+
}
|
3498
|
+
function mlsTransportToFfi(mlsTransport) {
|
3499
|
+
const shim = new MlsTransportFfiShim(mlsTransport);
|
3500
|
+
return new MlsTransport(shim, shim.sendCommitBundle, shim.sendMessage);
|
3501
|
+
}
|
3502
|
+
|
2915
3503
|
// src/CoreCryptoE2EI.ts
|
3504
|
+
function crlRegistrationFromFfi(r) {
|
3505
|
+
return {
|
3506
|
+
dirty: r.dirty,
|
3507
|
+
expiration: r.expiration ? safeBigintToNumber(r.expiration) : undefined
|
3508
|
+
};
|
3509
|
+
}
|
2916
3510
|
function normalizeEnum(enumType, value) {
|
2917
3511
|
const enumAsString = enumType[value];
|
2918
3512
|
const enumAsDiscriminant = enumType[enumAsString];
|
@@ -2931,13 +3525,7 @@ class E2eiEnrollment {
|
|
2931
3525
|
return this.#enrollment;
|
2932
3526
|
}
|
2933
3527
|
async directoryResponse(directory) {
|
2934
|
-
|
2935
|
-
return {
|
2936
|
-
newNonce: ffiRet.new_nonce,
|
2937
|
-
newAccount: ffiRet.new_account,
|
2938
|
-
newOrder: ffiRet.new_order,
|
2939
|
-
revokeCert: ffiRet.revoke_cert
|
2940
|
-
};
|
3528
|
+
return await CoreCryptoError.asyncMapErr(this.#enrollment.directory_response(directory));
|
2941
3529
|
}
|
2942
3530
|
async newAccountRequest(previousNonce) {
|
2943
3531
|
return await CoreCryptoError.asyncMapErr(this.#enrollment.new_account_request(previousNonce));
|
@@ -2958,7 +3546,8 @@ class E2eiEnrollment {
|
|
2958
3546
|
return await CoreCryptoError.asyncMapErr(this.#enrollment.new_authz_response(authz));
|
2959
3547
|
}
|
2960
3548
|
async createDpopToken(expirySecs, backendNonce) {
|
2961
|
-
|
3549
|
+
const token = await CoreCryptoError.asyncMapErr(this.#enrollment.create_dpop_token(expirySecs, backendNonce));
|
3550
|
+
return new TextEncoder().encode(token);
|
2962
3551
|
}
|
2963
3552
|
async newDpopChallengeRequest(accessToken, previousNonce) {
|
2964
3553
|
return await CoreCryptoError.asyncMapErr(this.#enrollment.new_dpop_challenge_request(accessToken, previousNonce));
|
@@ -2988,16 +3577,16 @@ class E2eiEnrollment {
|
|
2988
3577
|
return await CoreCryptoError.asyncMapErr(this.#enrollment.certificate_request(previousNonce));
|
2989
3578
|
}
|
2990
3579
|
}
|
2991
|
-
var
|
2992
|
-
((
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
2996
|
-
})(
|
3580
|
+
var E2eiConversationState2;
|
3581
|
+
((E2eiConversationState3) => {
|
3582
|
+
E2eiConversationState3[E2eiConversationState3["Verified"] = 1] = "Verified";
|
3583
|
+
E2eiConversationState3[E2eiConversationState3["NotVerified"] = 2] = "NotVerified";
|
3584
|
+
E2eiConversationState3[E2eiConversationState3["NotEnabled"] = 3] = "NotEnabled";
|
3585
|
+
})(E2eiConversationState2 ||= {});
|
2997
3586
|
|
2998
3587
|
// src/ConversationConfiguration.ts
|
2999
3588
|
function conversationConfigurationToFfi(cc) {
|
3000
|
-
const ciphersuite = cc.ciphersuite ?
|
3589
|
+
const ciphersuite = cc.ciphersuite ? new Ciphersuite2(cc.ciphersuite) : null;
|
3001
3590
|
return new ConversationConfiguration(ciphersuite, cc.externalSenders, cc.keyRotationSpan, cc.wirePolicy);
|
3002
3591
|
}
|
3003
3592
|
|
@@ -3017,16 +3606,20 @@ class CoreCryptoContext2 {
|
|
3017
3606
|
return await CoreCryptoError.asyncMapErr(this.#ctx.get_data());
|
3018
3607
|
}
|
3019
3608
|
async mlsInit(clientId, ciphersuites, nbKeyPackage) {
|
3020
|
-
const
|
3021
|
-
|
3609
|
+
const id = new ClientId(clientId);
|
3610
|
+
const cs = new Ciphersuites(Uint16Array.from(ciphersuites.map((cs2) => cs2.valueOf())));
|
3611
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.mls_init(id, cs, nbKeyPackage));
|
3022
3612
|
}
|
3023
3613
|
async mlsGenerateKeypair(ciphersuites) {
|
3024
|
-
const cs = ciphersuites.map((cs2) => cs2.valueOf());
|
3025
|
-
|
3614
|
+
const cs = new Ciphersuites(Uint16Array.from(ciphersuites.map((cs2) => cs2.valueOf())));
|
3615
|
+
const kps = await CoreCryptoError.asyncMapErr(this.#ctx.mls_generate_keypairs(cs));
|
3616
|
+
return kps.map((kp) => kp.as_bytes());
|
3026
3617
|
}
|
3027
3618
|
async mlsInitWithClientId(clientId, signaturePublicKeys, ciphersuites) {
|
3028
|
-
const
|
3029
|
-
|
3619
|
+
const id = new ClientId(clientId);
|
3620
|
+
const pks = signaturePublicKeys.map((pk) => new ClientId(pk));
|
3621
|
+
const cs = new Ciphersuites(Uint16Array.from(ciphersuites.map((cs2) => cs2.valueOf())));
|
3622
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.mls_init_with_client_id(id, pks, cs));
|
3030
3623
|
}
|
3031
3624
|
async conversationExists(conversationId) {
|
3032
3625
|
return await CoreCryptoError.asyncMapErr(this.#ctx.conversation_exists(conversationId));
|
@@ -3035,10 +3628,12 @@ class CoreCryptoContext2 {
|
|
3035
3628
|
return await CoreCryptoError.asyncMapErr(this.#ctx.mark_conversation_as_child_of(childId, parentId));
|
3036
3629
|
}
|
3037
3630
|
async conversationEpoch(conversationId) {
|
3038
|
-
|
3631
|
+
const epoch = await CoreCryptoError.asyncMapErr(this.#ctx.conversation_epoch(conversationId));
|
3632
|
+
return safeBigintToNumber(epoch);
|
3039
3633
|
}
|
3040
3634
|
async conversationCiphersuite(conversationId) {
|
3041
|
-
|
3635
|
+
const cs = await CoreCryptoError.asyncMapErr(this.#ctx.conversation_ciphersuite(conversationId));
|
3636
|
+
return cs.as_u16();
|
3042
3637
|
}
|
3043
3638
|
async wipeConversation(conversationId) {
|
3044
3639
|
return await CoreCryptoError.asyncMapErr(this.#ctx.wipe_conversation(conversationId));
|
@@ -3051,37 +3646,8 @@ class CoreCryptoContext2 {
|
|
3051
3646
|
if (!payload?.length) {
|
3052
3647
|
throw new Error("decryptMessage payload is empty or null");
|
3053
3648
|
}
|
3054
|
-
|
3055
|
-
|
3056
|
-
const ffiCommitDelay = ffiDecryptedMessage.commit_delay;
|
3057
|
-
let commitDelay = undefined;
|
3058
|
-
if (typeof ffiCommitDelay === "number" && ffiCommitDelay >= 0) {
|
3059
|
-
commitDelay = ffiCommitDelay * 1000;
|
3060
|
-
}
|
3061
|
-
const identity = ffiDecryptedMessage.identity;
|
3062
|
-
return {
|
3063
|
-
message: ffiDecryptedMessage.message,
|
3064
|
-
proposals: ffiDecryptedMessage.proposals,
|
3065
|
-
isActive: ffiDecryptedMessage.is_active,
|
3066
|
-
senderClientId: ffiDecryptedMessage.sender_client_id,
|
3067
|
-
commitDelay,
|
3068
|
-
identity,
|
3069
|
-
hasEpochChanged: ffiDecryptedMessage.has_epoch_changed,
|
3070
|
-
bufferedMessages: ffiDecryptedMessage.buffered_messages?.map((m) => ({
|
3071
|
-
message: m.message,
|
3072
|
-
proposals: m.proposals,
|
3073
|
-
isActive: m.is_active,
|
3074
|
-
senderClientId: m.sender_client_id,
|
3075
|
-
commitDelay: m.commit_delay,
|
3076
|
-
identity: m.identity,
|
3077
|
-
hasEpochChanged: m.has_epoch_changed,
|
3078
|
-
crlNewDistributionPoints: m.crl_new_distribution_points
|
3079
|
-
})),
|
3080
|
-
crlNewDistributionPoints: ffiDecryptedMessage.crl_new_distribution_points
|
3081
|
-
};
|
3082
|
-
} catch (e) {
|
3083
|
-
throw CoreCryptoError.fromStdError(e);
|
3084
|
-
}
|
3649
|
+
const ffiDecryptedMessage = await CoreCryptoError.asyncMapErr(this.#ctx.decrypt_message(conversationId, payload));
|
3650
|
+
return decryptedMessageFromFfi(ffiDecryptedMessage);
|
3085
3651
|
}
|
3086
3652
|
async encryptMessage(conversationId, message) {
|
3087
3653
|
return await CoreCryptoError.asyncMapErr(this.#ctx.encrypt_message(conversationId, message));
|
@@ -3092,22 +3658,31 @@ class CoreCryptoContext2 {
|
|
3092
3658
|
return await CoreCryptoError.asyncMapErr(this.#ctx.process_welcome_message(welcomeMessage, config));
|
3093
3659
|
}
|
3094
3660
|
async clientPublicKey(ciphersuite, credentialType) {
|
3095
|
-
|
3661
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3662
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.client_public_key(cs, credentialType));
|
3096
3663
|
}
|
3097
3664
|
async clientValidKeypackagesCount(ciphersuite, credentialType) {
|
3098
|
-
|
3665
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3666
|
+
const kpCount = await CoreCryptoError.asyncMapErr(this.#ctx.client_valid_keypackages_count(cs, credentialType));
|
3667
|
+
return safeBigintToNumber(kpCount);
|
3099
3668
|
}
|
3100
3669
|
async clientKeypackages(ciphersuite, credentialType, amountRequested) {
|
3101
|
-
|
3670
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3671
|
+
const kps = await CoreCryptoError.asyncMapErr(this.#ctx.client_keypackages(cs, credentialType, amountRequested));
|
3672
|
+
return kps.as_arrays();
|
3102
3673
|
}
|
3103
3674
|
async deleteKeypackages(refs) {
|
3104
|
-
|
3675
|
+
const aobaRefs = new ArrayOfByteArray(refs);
|
3676
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.delete_keypackages(aobaRefs));
|
3105
3677
|
}
|
3106
3678
|
async addClientsToConversation(conversationId, keyPackages) {
|
3107
|
-
|
3679
|
+
const kps = new ArrayOfByteArray(keyPackages);
|
3680
|
+
const dps = await CoreCryptoError.asyncMapErr(this.#ctx.add_clients_to_conversation(conversationId, kps));
|
3681
|
+
return dps.as_strings();
|
3108
3682
|
}
|
3109
3683
|
async removeClientsFromConversation(conversationId, clientIds) {
|
3110
|
-
|
3684
|
+
const ids = clientIds.map((id) => new ClientId(id));
|
3685
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.remove_clients_from_conversation(conversationId, ids));
|
3111
3686
|
}
|
3112
3687
|
async updateKeyingMaterial(conversationId) {
|
3113
3688
|
return await CoreCryptoError.asyncMapErr(this.#ctx.update_keying_material(conversationId));
|
@@ -3127,7 +3702,8 @@ class CoreCryptoContext2 {
|
|
3127
3702
|
return await CoreCryptoError.asyncMapErr(this.#ctx.get_external_sender(conversationId));
|
3128
3703
|
}
|
3129
3704
|
async getClientIds(conversationId) {
|
3130
|
-
|
3705
|
+
const ids = await CoreCryptoError.asyncMapErr(this.#ctx.get_client_ids(conversationId));
|
3706
|
+
return ids.map((id) => id.as_bytes());
|
3131
3707
|
}
|
3132
3708
|
async randomBytes(length) {
|
3133
3709
|
return await CoreCryptoError.asyncMapErr(this.#ctx.random_bytes(length));
|
@@ -3191,19 +3767,23 @@ class CoreCryptoContext2 {
|
|
3191
3767
|
return await CoreCryptoError.asyncMapErr(this.#ctx.proteus_cryptobox_migrate(storeName));
|
3192
3768
|
}
|
3193
3769
|
async e2eiNewEnrollment(clientId, displayName, handle, expirySec, ciphersuite, team) {
|
3194
|
-
const
|
3770
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3771
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_new_enrollment(clientId, displayName, handle, team, expirySec, cs));
|
3195
3772
|
return new E2eiEnrollment(e2ei);
|
3196
3773
|
}
|
3197
3774
|
async e2eiNewActivationEnrollment(displayName, handle, expirySec, ciphersuite, team) {
|
3198
|
-
const
|
3775
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3776
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_new_activation_enrollment(displayName, handle, team, expirySec, cs));
|
3199
3777
|
return new E2eiEnrollment(e2ei);
|
3200
3778
|
}
|
3201
3779
|
async e2eiNewRotateEnrollment(expirySec, ciphersuite, displayName, handle, team) {
|
3202
|
-
const
|
3780
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3781
|
+
const e2ei = await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_new_rotate_enrollment(displayName, handle, team, expirySec, cs));
|
3203
3782
|
return new E2eiEnrollment(e2ei);
|
3204
3783
|
}
|
3205
3784
|
async e2eiMlsInitOnly(enrollment, certificateChain, nbKeyPackage) {
|
3206
|
-
|
3785
|
+
const dps = await this.#ctx.e2ei_mls_init_only(enrollment.inner(), certificateChain, nbKeyPackage);
|
3786
|
+
return dps.as_strings();
|
3207
3787
|
}
|
3208
3788
|
async e2eiDumpPKIEnv() {
|
3209
3789
|
return await this.#ctx.e2ei_dump_pki_env();
|
@@ -3215,19 +3795,23 @@ class CoreCryptoContext2 {
|
|
3215
3795
|
return await this.#ctx.e2ei_register_acme_ca(trustAnchorPEM);
|
3216
3796
|
}
|
3217
3797
|
async e2eiRegisterIntermediateCA(certPEM) {
|
3218
|
-
|
3798
|
+
const dps = await this.#ctx.e2ei_register_intermediate_ca(certPEM);
|
3799
|
+
return dps.as_strings();
|
3219
3800
|
}
|
3220
3801
|
async e2eiRegisterCRL(crlDP, crlDER) {
|
3221
|
-
|
3802
|
+
const reg = await this.#ctx.e2ei_register_crl(crlDP, crlDER);
|
3803
|
+
return crlRegistrationFromFfi(reg);
|
3222
3804
|
}
|
3223
3805
|
async e2eiRotate(conversationId) {
|
3224
3806
|
return await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_rotate(conversationId));
|
3225
3807
|
}
|
3226
3808
|
async saveX509Credential(enrollment, certificateChain) {
|
3227
|
-
|
3809
|
+
const dps = await CoreCryptoError.asyncMapErr(this.#ctx.save_x509_credential(enrollment.inner(), certificateChain));
|
3810
|
+
return dps.as_strings();
|
3228
3811
|
}
|
3229
3812
|
async deleteStaleKeyPackages(cipherSuite) {
|
3230
|
-
|
3813
|
+
const cs = new Ciphersuite2(cipherSuite);
|
3814
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.delete_stale_key_packages(cs));
|
3231
3815
|
}
|
3232
3816
|
async e2eiEnrollmentStash(enrollment) {
|
3233
3817
|
return await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_enrollment_stash(enrollment.inner()));
|
@@ -3238,27 +3822,22 @@ class CoreCryptoContext2 {
|
|
3238
3822
|
}
|
3239
3823
|
async e2eiConversationState(conversationId) {
|
3240
3824
|
const state = await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_conversation_state(conversationId));
|
3241
|
-
return normalizeEnum(
|
3825
|
+
return normalizeEnum(E2eiConversationState2, state);
|
3242
3826
|
}
|
3243
3827
|
async e2eiIsEnabled(ciphersuite) {
|
3244
|
-
|
3828
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3829
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.e2ei_is_enabled(cs));
|
3245
3830
|
}
|
3246
3831
|
async getDeviceIdentities(conversationId, deviceIds) {
|
3247
|
-
|
3832
|
+
const dids = deviceIds.map((did) => new ClientId(did));
|
3833
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.get_device_identities(conversationId, dids));
|
3248
3834
|
}
|
3249
3835
|
async getUserIdentities(conversationId, userIds) {
|
3250
|
-
|
3251
|
-
const mapFixed = new Map;
|
3252
|
-
for (const [userId, identities] of map) {
|
3253
|
-
mapFixed.set(userId, identities.flatMap((identity) => {
|
3254
|
-
return identity ? [identity] : [];
|
3255
|
-
}));
|
3256
|
-
}
|
3257
|
-
return mapFixed;
|
3836
|
+
return await CoreCryptoError.asyncMapErr(this.#ctx.get_user_identities(conversationId, userIds));
|
3258
3837
|
}
|
3259
|
-
async getCredentialInUse(groupInfo, credentialType =
|
3838
|
+
async getCredentialInUse(groupInfo, credentialType = CredentialType.X509) {
|
3260
3839
|
const state = await CoreCryptoError.asyncMapErr(this.#ctx.get_credential_in_use(groupInfo, credentialType));
|
3261
|
-
return normalizeEnum(
|
3840
|
+
return normalizeEnum(E2eiConversationState2, state);
|
3262
3841
|
}
|
3263
3842
|
}
|
3264
3843
|
// src/core-crypto-ffi.d.ts
|
@@ -3283,17 +3862,30 @@ class WireIdentity4 {
|
|
3283
3862
|
|
3284
3863
|
class X509Identity2 {
|
3285
3864
|
handle;
|
3286
|
-
|
3865
|
+
display_name;
|
3287
3866
|
domain;
|
3288
3867
|
certificate;
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3868
|
+
serial_number;
|
3869
|
+
not_before;
|
3870
|
+
not_after;
|
3292
3871
|
}
|
3293
3872
|
// src/CoreCryptoInstance.ts
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3873
|
+
class EpochObserverShim {
|
3874
|
+
inner;
|
3875
|
+
constructor(inner) {
|
3876
|
+
this.inner = inner;
|
3877
|
+
}
|
3878
|
+
async epochChanged(conversationId, epoch) {
|
3879
|
+
return this.inner.epochChanged(conversationId, safeBigintToNumber(epoch));
|
3880
|
+
}
|
3881
|
+
}
|
3882
|
+
function setLogger(logger) {
|
3883
|
+
CoreCrypto.set_logger(loggerIntoFfi(logger));
|
3884
|
+
}
|
3885
|
+
function loggerIntoFfi(logger) {
|
3886
|
+
const logFn = logger.log;
|
3887
|
+
const logThis = logger;
|
3888
|
+
return new CoreCryptoLogger(logFn, logThis);
|
3297
3889
|
}
|
3298
3890
|
var CoreCryptoLogLevel2;
|
3299
3891
|
((CoreCryptoLogLevel3) => {
|
@@ -3308,10 +3900,10 @@ function setMaxLogLevel(level) {
|
|
3308
3900
|
CoreCrypto2.setMaxLogLevel(level);
|
3309
3901
|
}
|
3310
3902
|
function buildMetadata() {
|
3311
|
-
return
|
3903
|
+
return build_metadata();
|
3312
3904
|
}
|
3313
|
-
function
|
3314
|
-
return
|
3905
|
+
function version2() {
|
3906
|
+
return version();
|
3315
3907
|
}
|
3316
3908
|
|
3317
3909
|
class CoreCrypto2 {
|
@@ -3320,7 +3912,7 @@ class CoreCrypto2 {
|
|
3320
3912
|
return this.#cc;
|
3321
3913
|
}
|
3322
3914
|
static setLogger(logger) {
|
3323
|
-
CoreCrypto.set_logger(logger);
|
3915
|
+
CoreCrypto.set_logger(loggerIntoFfi(logger));
|
3324
3916
|
}
|
3325
3917
|
static setMaxLogLevel(level) {
|
3326
3918
|
CoreCrypto.set_max_log_level(level);
|
@@ -3334,8 +3926,8 @@ class CoreCrypto2 {
|
|
3334
3926
|
entropySeed,
|
3335
3927
|
nbKeyPackage
|
3336
3928
|
}) {
|
3337
|
-
const cs = ciphersuites.map((cs2) => cs2.valueOf());
|
3338
|
-
const cc = await CoreCryptoError.asyncMapErr(CoreCrypto.
|
3929
|
+
const cs = new Ciphersuites(Uint16Array.from(ciphersuites.map((cs2) => cs2.valueOf())));
|
3930
|
+
const cc = await CoreCryptoError.asyncMapErr(CoreCrypto.async_new(databaseName, key, clientId, cs, entropySeed, nbKeyPackage));
|
3339
3931
|
return new this(cc);
|
3340
3932
|
}
|
3341
3933
|
static async deferredInit({
|
@@ -3374,36 +3966,33 @@ class CoreCrypto2 {
|
|
3374
3966
|
constructor(cc) {
|
3375
3967
|
this.#cc = cc;
|
3376
3968
|
}
|
3969
|
+
async canClose() {
|
3970
|
+
return await this.#cc.can_close();
|
3971
|
+
}
|
3377
3972
|
isLocked() {
|
3378
|
-
return
|
3973
|
+
return false;
|
3379
3974
|
}
|
3380
3975
|
async close() {
|
3381
3976
|
await CoreCryptoError.asyncMapErr(this.#cc.close());
|
3382
3977
|
}
|
3383
|
-
async provideTransport(transportProvider,
|
3384
|
-
|
3385
|
-
|
3386
|
-
const result = await transportProvider.sendCommitBundle(commitBundleFromFfi(commitBundle));
|
3387
|
-
return mapTransportResponseToFfi(result);
|
3388
|
-
}, async (message) => {
|
3389
|
-
const result = await transportProvider.sendMessage(message);
|
3390
|
-
return mapTransportResponseToFfi(result);
|
3391
|
-
}, ctx));
|
3392
|
-
} catch (e) {
|
3393
|
-
throw CoreCryptoError.fromStdError(e);
|
3394
|
-
}
|
3978
|
+
async provideTransport(transportProvider, _ctx = null) {
|
3979
|
+
const transport = mlsTransportToFfi(transportProvider);
|
3980
|
+
return await CoreCryptoError.asyncMapErr(this.#cc.provide_transport(transport));
|
3395
3981
|
}
|
3396
3982
|
async conversationExists(conversationId) {
|
3397
3983
|
return await CoreCryptoError.asyncMapErr(this.#cc.conversation_exists(conversationId));
|
3398
3984
|
}
|
3399
3985
|
async conversationEpoch(conversationId) {
|
3400
|
-
|
3986
|
+
const epoch = await CoreCryptoError.asyncMapErr(this.#cc.conversation_epoch(conversationId));
|
3987
|
+
return safeBigintToNumber(epoch);
|
3401
3988
|
}
|
3402
3989
|
async conversationCiphersuite(conversationId) {
|
3403
|
-
|
3990
|
+
const cs = await CoreCryptoError.asyncMapErr(this.#cc.conversation_ciphersuite(conversationId));
|
3991
|
+
return cs.as_u16();
|
3404
3992
|
}
|
3405
3993
|
async clientPublicKey(ciphersuite, credentialType) {
|
3406
|
-
|
3994
|
+
const cs = new Ciphersuite2(ciphersuite);
|
3995
|
+
return await CoreCryptoError.asyncMapErr(this.#cc.client_public_key(cs, credentialType));
|
3407
3996
|
}
|
3408
3997
|
async exportSecretKey(conversationId, keyLength) {
|
3409
3998
|
return await CoreCryptoError.asyncMapErr(this.#cc.export_secret_key(conversationId, keyLength));
|
@@ -3412,7 +4001,8 @@ class CoreCrypto2 {
|
|
3412
4001
|
return await CoreCryptoError.asyncMapErr(this.#cc.get_external_sender(conversationId));
|
3413
4002
|
}
|
3414
4003
|
async getClientIds(conversationId) {
|
3415
|
-
|
4004
|
+
const cids = await CoreCryptoError.asyncMapErr(this.#cc.get_client_ids(conversationId));
|
4005
|
+
return cids.map((cid) => cid.as_bytes());
|
3416
4006
|
}
|
3417
4007
|
async randomBytes(length) {
|
3418
4008
|
return await CoreCryptoError.asyncMapErr(this.#cc.random_bytes(length));
|
@@ -3452,10 +4042,12 @@ class CoreCrypto2 {
|
|
3452
4042
|
return await this.#cc.e2ei_is_pki_env_setup();
|
3453
4043
|
}
|
3454
4044
|
async e2eiIsEnabled(ciphersuite) {
|
3455
|
-
|
4045
|
+
const cs = new Ciphersuite2(ciphersuite);
|
4046
|
+
return await CoreCryptoError.asyncMapErr(this.#cc.e2ei_is_enabled(cs));
|
3456
4047
|
}
|
3457
4048
|
async getDeviceIdentities(conversationId, deviceIds) {
|
3458
|
-
|
4049
|
+
const dids = deviceIds.map((did) => new ClientId(did));
|
4050
|
+
return await CoreCryptoError.asyncMapErr(this.#cc.get_device_identities(conversationId, dids));
|
3459
4051
|
}
|
3460
4052
|
async getUserIdentities(conversationId, userIds) {
|
3461
4053
|
const map = await CoreCryptoError.asyncMapErr(this.#cc.get_user_identities(conversationId, userIds));
|
@@ -3467,17 +4059,14 @@ class CoreCrypto2 {
|
|
3467
4059
|
}
|
3468
4060
|
return mapFixed;
|
3469
4061
|
}
|
3470
|
-
async getCredentialInUse(groupInfo, credentialType =
|
4062
|
+
async getCredentialInUse(groupInfo, credentialType = CredentialType.X509) {
|
3471
4063
|
const state = await CoreCryptoError.asyncMapErr(this.#cc.get_credential_in_use(groupInfo, credentialType));
|
3472
|
-
return normalizeEnum(
|
4064
|
+
return normalizeEnum(E2eiConversationState2, state);
|
3473
4065
|
}
|
3474
4066
|
async registerEpochObserver(observer) {
|
3475
|
-
const
|
3476
|
-
|
3477
|
-
|
3478
|
-
}
|
3479
|
-
};
|
3480
|
-
return await CoreCryptoError.asyncMapErr(this.#cc.register_epoch_observer(observerIndirector));
|
4067
|
+
const shim = new EpochObserverShim(observer);
|
4068
|
+
const ffi = new EpochObserver(shim, shim.epochChanged);
|
4069
|
+
return await CoreCryptoError.asyncMapErr(this.#cc.register_epoch_observer(ffi));
|
3481
4070
|
}
|
3482
4071
|
}
|
3483
4072
|
// src/CoreCrypto.ts
|
@@ -3492,21 +4081,26 @@ if (typeof window !== "undefined") {
|
|
3492
4081
|
await core_crypto_ffi_default({ module_or_path: module });
|
3493
4082
|
}
|
3494
4083
|
export {
|
3495
|
-
version,
|
4084
|
+
version2 as version,
|
3496
4085
|
setMaxLogLevel,
|
3497
4086
|
setLogger,
|
4087
|
+
migrateDatabaseKeyTypeToBytes,
|
3498
4088
|
buildMetadata,
|
3499
4089
|
X509Identity2 as X509Identity,
|
3500
|
-
|
4090
|
+
WirePolicy,
|
3501
4091
|
WireIdentity4 as WireIdentity,
|
3502
4092
|
WelcomeBundle,
|
3503
|
-
RatchetTreeType,
|
3504
|
-
|
4093
|
+
MlsRatchetTreeType as RatchetTreeType,
|
4094
|
+
NewAcmeOrder,
|
4095
|
+
NewAcmeAuthz,
|
4096
|
+
MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
|
3505
4097
|
E2eiEnrollment,
|
3506
|
-
|
3507
|
-
|
4098
|
+
E2eiDumpedPkiEnv,
|
4099
|
+
E2eiConversationState2 as E2eiConversationState,
|
4100
|
+
DeviceStatus,
|
4101
|
+
DatabaseKey,
|
3508
4102
|
CustomConfiguration,
|
3509
|
-
|
4103
|
+
CredentialType,
|
3510
4104
|
CoreCryptoLogLevel2 as CoreCryptoLogLevel,
|
3511
4105
|
CoreCryptoError,
|
3512
4106
|
CoreCryptoContext2 as CoreCryptoContext,
|