@wireapp/core-crypto 0.6.0-rc.3 → 0.6.0-rc.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,28 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
26
26
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
27
27
|
}
|
28
28
|
|
29
|
+
class CoreCryptoError extends Error {
|
30
|
+
constructor(message, rustStackTrace, ...params) {
|
31
|
+
super(...params);
|
32
|
+
|
33
|
+
if (Error.captureStackTrace) {
|
34
|
+
Error.captureStackTrace(this, CoreCryptoError);
|
35
|
+
}
|
36
|
+
|
37
|
+
this.name = "CoreCryptoError";
|
38
|
+
this.rustStackTrace = rustStackTrace;
|
39
|
+
this.proteusErrorCode = 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
setProteusErrorCode(code) {
|
43
|
+
this.proteusErrorCode = code;
|
44
|
+
}
|
45
|
+
|
46
|
+
proteusError() {
|
47
|
+
return this.proteusErrorCode;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
29
51
|
let wasm$1;
|
30
52
|
|
31
53
|
const heap = new Array(32).fill(undefined);
|
@@ -57,6 +79,37 @@ function takeObject(idx) {
|
|
57
79
|
return ret;
|
58
80
|
}
|
59
81
|
|
82
|
+
function isLikeNone(x) {
|
83
|
+
return x === undefined || x === null;
|
84
|
+
}
|
85
|
+
|
86
|
+
let cachedFloat64Memory0 = new Float64Array();
|
87
|
+
|
88
|
+
function getFloat64Memory0() {
|
89
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
90
|
+
cachedFloat64Memory0 = new Float64Array(wasm$1.memory.buffer);
|
91
|
+
}
|
92
|
+
return cachedFloat64Memory0;
|
93
|
+
}
|
94
|
+
|
95
|
+
let cachedInt32Memory0 = new Int32Array();
|
96
|
+
|
97
|
+
function getInt32Memory0() {
|
98
|
+
if (cachedInt32Memory0.byteLength === 0) {
|
99
|
+
cachedInt32Memory0 = new Int32Array(wasm$1.memory.buffer);
|
100
|
+
}
|
101
|
+
return cachedInt32Memory0;
|
102
|
+
}
|
103
|
+
|
104
|
+
let cachedBigInt64Memory0 = new BigInt64Array();
|
105
|
+
|
106
|
+
function getBigInt64Memory0() {
|
107
|
+
if (cachedBigInt64Memory0.byteLength === 0) {
|
108
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm$1.memory.buffer);
|
109
|
+
}
|
110
|
+
return cachedBigInt64Memory0;
|
111
|
+
}
|
112
|
+
|
60
113
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
61
114
|
|
62
115
|
cachedTextDecoder.decode();
|
@@ -129,37 +182,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
129
182
|
return ptr;
|
130
183
|
}
|
131
184
|
|
132
|
-
function isLikeNone(x) {
|
133
|
-
return x === undefined || x === null;
|
134
|
-
}
|
135
|
-
|
136
|
-
let cachedInt32Memory0 = new Int32Array();
|
137
|
-
|
138
|
-
function getInt32Memory0() {
|
139
|
-
if (cachedInt32Memory0.byteLength === 0) {
|
140
|
-
cachedInt32Memory0 = new Int32Array(wasm$1.memory.buffer);
|
141
|
-
}
|
142
|
-
return cachedInt32Memory0;
|
143
|
-
}
|
144
|
-
|
145
|
-
let cachedFloat64Memory0 = new Float64Array();
|
146
|
-
|
147
|
-
function getFloat64Memory0() {
|
148
|
-
if (cachedFloat64Memory0.byteLength === 0) {
|
149
|
-
cachedFloat64Memory0 = new Float64Array(wasm$1.memory.buffer);
|
150
|
-
}
|
151
|
-
return cachedFloat64Memory0;
|
152
|
-
}
|
153
|
-
|
154
|
-
let cachedBigInt64Memory0 = new BigInt64Array();
|
155
|
-
|
156
|
-
function getBigInt64Memory0() {
|
157
|
-
if (cachedBigInt64Memory0.byteLength === 0) {
|
158
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm$1.memory.buffer);
|
159
|
-
}
|
160
|
-
return cachedBigInt64Memory0;
|
161
|
-
}
|
162
|
-
|
163
185
|
function debugString(val) {
|
164
186
|
// primitive types
|
165
187
|
const type = typeof val;
|
@@ -252,7 +274,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
252
274
|
function __wbg_adapter_52(arg0, arg1, arg2) {
|
253
275
|
try {
|
254
276
|
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
255
|
-
wasm$1.
|
277
|
+
wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h577395c5a39b7036(retptr, arg0, arg1, addHeapObject(arg2));
|
256
278
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
257
279
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
258
280
|
if (r1) {
|
@@ -264,31 +286,7 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
264
286
|
}
|
265
287
|
|
266
288
|
function __wbg_adapter_55(arg0, arg1, arg2) {
|
267
|
-
wasm$1.
|
268
|
-
}
|
269
|
-
|
270
|
-
/**
|
271
|
-
* Returns the current version of CoreCrypto
|
272
|
-
* @returns {string}
|
273
|
-
*/
|
274
|
-
function version() {
|
275
|
-
try {
|
276
|
-
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
277
|
-
wasm$1.version(retptr);
|
278
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
279
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
280
|
-
return getStringFromWasm0(r0, r1);
|
281
|
-
} finally {
|
282
|
-
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
283
|
-
wasm$1.__wbindgen_free(r0, r1);
|
284
|
-
}
|
285
|
-
}
|
286
|
-
|
287
|
-
function passArray8ToWasm0(arg, malloc) {
|
288
|
-
const ptr = malloc(arg.length * 1);
|
289
|
-
getUint8Memory0().set(arg, ptr / 1);
|
290
|
-
WASM_VECTOR_LEN = arg.length;
|
291
|
-
return ptr;
|
289
|
+
wasm$1._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6fecff61d3f85de1(arg0, arg1, addHeapObject(arg2));
|
292
290
|
}
|
293
291
|
|
294
292
|
function _assertClass(instance, klass) {
|
@@ -317,6 +315,39 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
317
315
|
return ptr;
|
318
316
|
}
|
319
317
|
|
318
|
+
function passArray8ToWasm0(arg, malloc) {
|
319
|
+
const ptr = malloc(arg.length * 1);
|
320
|
+
getUint8Memory0().set(arg, ptr / 1);
|
321
|
+
WASM_VECTOR_LEN = arg.length;
|
322
|
+
return ptr;
|
323
|
+
}
|
324
|
+
|
325
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
326
|
+
const mem = getUint32Memory0();
|
327
|
+
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
|
328
|
+
const result = [];
|
329
|
+
for (let i = 0; i < slice.length; i++) {
|
330
|
+
result.push(takeObject(slice[i]));
|
331
|
+
}
|
332
|
+
return result;
|
333
|
+
}
|
334
|
+
/**
|
335
|
+
* Returns the current version of CoreCrypto
|
336
|
+
* @returns {string}
|
337
|
+
*/
|
338
|
+
function version() {
|
339
|
+
try {
|
340
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
341
|
+
wasm$1.version(retptr);
|
342
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
343
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
344
|
+
return getStringFromWasm0(r0, r1);
|
345
|
+
} finally {
|
346
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
347
|
+
wasm$1.__wbindgen_free(r0, r1);
|
348
|
+
}
|
349
|
+
}
|
350
|
+
|
320
351
|
function handleError(f, args) {
|
321
352
|
try {
|
322
353
|
return f.apply(this, args);
|
@@ -328,8 +359,8 @@ function handleError(f, args) {
|
|
328
359
|
function getArrayU8FromWasm0(ptr, len) {
|
329
360
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
330
361
|
}
|
331
|
-
function
|
332
|
-
wasm$1.
|
362
|
+
function __wbg_adapter_264(arg0, arg1, arg2, arg3) {
|
363
|
+
wasm$1.wasm_bindgen__convert__closures__invoke2_mut__ha446eb95921e2107(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
333
364
|
}
|
334
365
|
|
335
366
|
/**
|
@@ -377,8 +408,16 @@ MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448:6,"6":"MLS_256_DHKEMX448_CHACHA2
|
|
377
408
|
*/
|
378
409
|
MLS_256_DHKEMP384_AES256GCM_SHA384_P384:7,"7":"MLS_256_DHKEMP384_AES256GCM_SHA384_P384", });
|
379
410
|
/**
|
411
|
+
* See [core_crypto::e2e_identity::types::E2eiAcmeChallenge]
|
380
412
|
*/
|
381
|
-
class
|
413
|
+
class AcmeChallenge {
|
414
|
+
|
415
|
+
static __wrap(ptr) {
|
416
|
+
const obj = Object.create(AcmeChallenge.prototype);
|
417
|
+
obj.ptr = ptr;
|
418
|
+
|
419
|
+
return obj;
|
420
|
+
}
|
382
421
|
|
383
422
|
__destroy_into_raw() {
|
384
423
|
const ptr = this.ptr;
|
@@ -389,37 +428,48 @@ class CommitBundle {
|
|
389
428
|
|
390
429
|
free() {
|
391
430
|
const ptr = this.__destroy_into_raw();
|
392
|
-
wasm$1.
|
431
|
+
wasm$1.__wbg_acmechallenge_free(ptr);
|
393
432
|
}
|
394
433
|
/**
|
395
|
-
* @
|
434
|
+
* @param {Uint8Array} delegate
|
435
|
+
* @param {string} url
|
396
436
|
*/
|
397
|
-
|
398
|
-
const
|
399
|
-
|
437
|
+
constructor(delegate, url) {
|
438
|
+
const ptr0 = passStringToWasm0(url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
439
|
+
const len0 = WASM_VECTOR_LEN;
|
440
|
+
const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0);
|
441
|
+
return AcmeChallenge.__wrap(ret);
|
400
442
|
}
|
401
443
|
/**
|
402
|
-
* @returns {Uint8Array
|
444
|
+
* @returns {Uint8Array}
|
403
445
|
*/
|
404
|
-
get
|
405
|
-
const ret = wasm$1.
|
446
|
+
get delegate() {
|
447
|
+
const ret = wasm$1.acmechallenge_delegate(this.ptr);
|
406
448
|
return takeObject(ret);
|
407
449
|
}
|
408
450
|
/**
|
409
|
-
* @returns {
|
451
|
+
* @returns {string}
|
410
452
|
*/
|
411
|
-
get
|
412
|
-
|
413
|
-
|
453
|
+
get url() {
|
454
|
+
try {
|
455
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
456
|
+
wasm$1.acmechallenge_url(retptr, this.ptr);
|
457
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
458
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
459
|
+
return getStringFromWasm0(r0, r1);
|
460
|
+
} finally {
|
461
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
462
|
+
wasm$1.__wbindgen_free(r0, r1);
|
463
|
+
}
|
414
464
|
}
|
415
465
|
}
|
416
466
|
/**
|
417
|
-
*
|
467
|
+
* See [core_crypto::e2e_identity::types::E2eiAcmeDirectory]
|
418
468
|
*/
|
419
|
-
class
|
469
|
+
class AcmeDirectory {
|
420
470
|
|
421
471
|
static __wrap(ptr) {
|
422
|
-
const obj = Object.create(
|
472
|
+
const obj = Object.create(AcmeDirectory.prototype);
|
423
473
|
obj.ptr = ptr;
|
424
474
|
|
425
475
|
return obj;
|
@@ -434,24 +484,80 @@ class ConversationConfiguration {
|
|
434
484
|
|
435
485
|
free() {
|
436
486
|
const ptr = this.__destroy_into_raw();
|
437
|
-
wasm$1.
|
487
|
+
wasm$1.__wbg_acmedirectory_free(ptr);
|
438
488
|
}
|
439
489
|
/**
|
440
|
-
* @param {
|
441
|
-
* @param {
|
442
|
-
* @param {
|
443
|
-
* @param {number | undefined} wire_policy
|
490
|
+
* @param {string} new_nonce
|
491
|
+
* @param {string} new_account
|
492
|
+
* @param {string} new_order
|
444
493
|
*/
|
445
|
-
constructor(
|
446
|
-
|
447
|
-
|
448
|
-
const
|
449
|
-
|
494
|
+
constructor(new_nonce, new_account, new_order) {
|
495
|
+
const ptr0 = passStringToWasm0(new_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
496
|
+
const len0 = WASM_VECTOR_LEN;
|
497
|
+
const ptr1 = passStringToWasm0(new_account, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
498
|
+
const len1 = WASM_VECTOR_LEN;
|
499
|
+
const ptr2 = passStringToWasm0(new_order, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
500
|
+
const len2 = WASM_VECTOR_LEN;
|
501
|
+
const ret = wasm$1.acmedirectory_new(ptr0, len0, ptr1, len1, ptr2, len2);
|
502
|
+
return AcmeDirectory.__wrap(ret);
|
503
|
+
}
|
504
|
+
/**
|
505
|
+
* @returns {string}
|
506
|
+
*/
|
507
|
+
get new_nonce() {
|
508
|
+
try {
|
509
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
510
|
+
wasm$1.acmedirectory_new_nonce(retptr, this.ptr);
|
511
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
512
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
513
|
+
return getStringFromWasm0(r0, r1);
|
514
|
+
} finally {
|
515
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
516
|
+
wasm$1.__wbindgen_free(r0, r1);
|
517
|
+
}
|
518
|
+
}
|
519
|
+
/**
|
520
|
+
* @returns {string}
|
521
|
+
*/
|
522
|
+
get new_account() {
|
523
|
+
try {
|
524
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
525
|
+
wasm$1.acmechallenge_url(retptr, this.ptr);
|
526
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
527
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
528
|
+
return getStringFromWasm0(r0, r1);
|
529
|
+
} finally {
|
530
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
531
|
+
wasm$1.__wbindgen_free(r0, r1);
|
532
|
+
}
|
533
|
+
}
|
534
|
+
/**
|
535
|
+
* @returns {string}
|
536
|
+
*/
|
537
|
+
get new_order() {
|
538
|
+
try {
|
539
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
540
|
+
wasm$1.acmedirectory_new_order(retptr, this.ptr);
|
541
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
542
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
543
|
+
return getStringFromWasm0(r0, r1);
|
544
|
+
} finally {
|
545
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
546
|
+
wasm$1.__wbindgen_free(r0, r1);
|
547
|
+
}
|
450
548
|
}
|
451
549
|
}
|
452
550
|
/**
|
551
|
+
* See [core_crypto::e2e_identity::types::E2eiAcmeFinalize]
|
453
552
|
*/
|
454
|
-
class
|
553
|
+
class AcmeFinalize {
|
554
|
+
|
555
|
+
static __wrap(ptr) {
|
556
|
+
const obj = Object.create(AcmeFinalize.prototype);
|
557
|
+
obj.ptr = ptr;
|
558
|
+
|
559
|
+
return obj;
|
560
|
+
}
|
455
561
|
|
456
562
|
__destroy_into_raw() {
|
457
563
|
const ptr = this.ptr;
|
@@ -462,20 +568,68 @@ class ConversationInitBundle {
|
|
462
568
|
|
463
569
|
free() {
|
464
570
|
const ptr = this.__destroy_into_raw();
|
465
|
-
wasm$1.
|
571
|
+
wasm$1.__wbg_acmefinalize_free(ptr);
|
572
|
+
}
|
573
|
+
/**
|
574
|
+
* @param {Uint8Array} delegate
|
575
|
+
* @param {string} certificate_url
|
576
|
+
*/
|
577
|
+
constructor(delegate, certificate_url) {
|
578
|
+
const ptr0 = passStringToWasm0(certificate_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
579
|
+
const len0 = WASM_VECTOR_LEN;
|
580
|
+
const ret = wasm$1.acmechallenge_new(addHeapObject(delegate), ptr0, len0);
|
581
|
+
return AcmeFinalize.__wrap(ret);
|
466
582
|
}
|
467
583
|
/**
|
468
584
|
* @returns {Uint8Array}
|
469
585
|
*/
|
470
|
-
get
|
471
|
-
const ret = wasm$1.
|
586
|
+
get delegate() {
|
587
|
+
const ret = wasm$1.acmechallenge_delegate(this.ptr);
|
472
588
|
return takeObject(ret);
|
473
589
|
}
|
474
590
|
/**
|
591
|
+
* @returns {string}
|
592
|
+
*/
|
593
|
+
get certificate_url() {
|
594
|
+
try {
|
595
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
596
|
+
wasm$1.acmechallenge_url(retptr, this.ptr);
|
597
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
598
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
599
|
+
return getStringFromWasm0(r0, r1);
|
600
|
+
} finally {
|
601
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
602
|
+
wasm$1.__wbindgen_free(r0, r1);
|
603
|
+
}
|
604
|
+
}
|
605
|
+
}
|
606
|
+
/**
|
607
|
+
*/
|
608
|
+
class CommitBundle {
|
609
|
+
|
610
|
+
__destroy_into_raw() {
|
611
|
+
const ptr = this.ptr;
|
612
|
+
this.ptr = 0;
|
613
|
+
|
614
|
+
return ptr;
|
615
|
+
}
|
616
|
+
|
617
|
+
free() {
|
618
|
+
const ptr = this.__destroy_into_raw();
|
619
|
+
wasm$1.__wbg_commitbundle_free(ptr);
|
620
|
+
}
|
621
|
+
/**
|
475
622
|
* @returns {Uint8Array}
|
476
623
|
*/
|
477
624
|
get commit() {
|
478
|
-
const ret = wasm$1.
|
625
|
+
const ret = wasm$1.commitbundle_commit(this.ptr);
|
626
|
+
return takeObject(ret);
|
627
|
+
}
|
628
|
+
/**
|
629
|
+
* @returns {Uint8Array | undefined}
|
630
|
+
*/
|
631
|
+
get welcome() {
|
632
|
+
const ret = wasm$1.commitbundle_welcome(this.ptr);
|
479
633
|
return takeObject(ret);
|
480
634
|
}
|
481
635
|
/**
|
@@ -487,11 +641,84 @@ class ConversationInitBundle {
|
|
487
641
|
}
|
488
642
|
}
|
489
643
|
/**
|
644
|
+
* see [core_crypto::prelude::MlsConversationConfiguration]
|
490
645
|
*/
|
491
|
-
class
|
646
|
+
class ConversationConfiguration {
|
492
647
|
|
493
648
|
static __wrap(ptr) {
|
494
|
-
const obj = Object.create(
|
649
|
+
const obj = Object.create(ConversationConfiguration.prototype);
|
650
|
+
obj.ptr = ptr;
|
651
|
+
|
652
|
+
return obj;
|
653
|
+
}
|
654
|
+
|
655
|
+
__destroy_into_raw() {
|
656
|
+
const ptr = this.ptr;
|
657
|
+
this.ptr = 0;
|
658
|
+
|
659
|
+
return ptr;
|
660
|
+
}
|
661
|
+
|
662
|
+
free() {
|
663
|
+
const ptr = this.__destroy_into_raw();
|
664
|
+
wasm$1.__wbg_conversationconfiguration_free(ptr);
|
665
|
+
}
|
666
|
+
/**
|
667
|
+
* @param {number | undefined} ciphersuite
|
668
|
+
* @param {(Uint8Array)[] | undefined} external_senders
|
669
|
+
* @param {number | undefined} key_rotation_span
|
670
|
+
* @param {number | undefined} wire_policy
|
671
|
+
*/
|
672
|
+
constructor(ciphersuite, external_senders, key_rotation_span, wire_policy) {
|
673
|
+
var ptr0 = isLikeNone(external_senders) ? 0 : passArrayJsValueToWasm0(external_senders, wasm$1.__wbindgen_malloc);
|
674
|
+
var len0 = WASM_VECTOR_LEN;
|
675
|
+
const ret = wasm$1.conversationconfiguration_new(isLikeNone(ciphersuite) ? 8 : ciphersuite, ptr0, len0, !isLikeNone(key_rotation_span), isLikeNone(key_rotation_span) ? 0 : key_rotation_span, isLikeNone(wire_policy) ? 3 : wire_policy);
|
676
|
+
return ConversationConfiguration.__wrap(ret);
|
677
|
+
}
|
678
|
+
}
|
679
|
+
/**
|
680
|
+
*/
|
681
|
+
class ConversationInitBundle {
|
682
|
+
|
683
|
+
__destroy_into_raw() {
|
684
|
+
const ptr = this.ptr;
|
685
|
+
this.ptr = 0;
|
686
|
+
|
687
|
+
return ptr;
|
688
|
+
}
|
689
|
+
|
690
|
+
free() {
|
691
|
+
const ptr = this.__destroy_into_raw();
|
692
|
+
wasm$1.__wbg_conversationinitbundle_free(ptr);
|
693
|
+
}
|
694
|
+
/**
|
695
|
+
* @returns {Uint8Array}
|
696
|
+
*/
|
697
|
+
get conversation_id() {
|
698
|
+
const ret = wasm$1.commitbundle_commit(this.ptr);
|
699
|
+
return takeObject(ret);
|
700
|
+
}
|
701
|
+
/**
|
702
|
+
* @returns {Uint8Array}
|
703
|
+
*/
|
704
|
+
get commit() {
|
705
|
+
const ret = wasm$1.conversationinitbundle_commit(this.ptr);
|
706
|
+
return takeObject(ret);
|
707
|
+
}
|
708
|
+
/**
|
709
|
+
* @returns {PublicGroupStateBundle}
|
710
|
+
*/
|
711
|
+
get public_group_state() {
|
712
|
+
const ret = wasm$1.commitbundle_public_group_state(this.ptr);
|
713
|
+
return PublicGroupStateBundle.__wrap(ret);
|
714
|
+
}
|
715
|
+
}
|
716
|
+
/**
|
717
|
+
*/
|
718
|
+
class CoreCrypto$1 {
|
719
|
+
|
720
|
+
static __wrap(ptr) {
|
721
|
+
const obj = Object.create(CoreCrypto$1.prototype);
|
495
722
|
obj.ptr = ptr;
|
496
723
|
|
497
724
|
return obj;
|
@@ -1233,6 +1460,15 @@ class CoreCrypto$1 {
|
|
1233
1460
|
const ret = wasm$1.corecrypto_get_client_ids(this.ptr, ptr0, len0);
|
1234
1461
|
return takeObject(ret);
|
1235
1462
|
}
|
1463
|
+
/**
|
1464
|
+
* see [core_crypto::MlsCentral::new_acme_enrollment]
|
1465
|
+
* @param {number} ciphersuite
|
1466
|
+
* @returns {Promise<WireE2eIdentity>}
|
1467
|
+
*/
|
1468
|
+
new_acme_enrollment(ciphersuite) {
|
1469
|
+
const ret = wasm$1.corecrypto_new_acme_enrollment(this.ptr, ciphersuite);
|
1470
|
+
return takeObject(ret);
|
1471
|
+
}
|
1236
1472
|
}
|
1237
1473
|
/**
|
1238
1474
|
* see [core_crypto::prelude::CoreCryptoCallbacks]
|
@@ -1469,6 +1705,130 @@ class MemberAddedMessages {
|
|
1469
1705
|
}
|
1470
1706
|
}
|
1471
1707
|
/**
|
1708
|
+
* See [core_crypto::e2e_identity::types::E2eiNewAcmeAuthz]
|
1709
|
+
*/
|
1710
|
+
class NewAcmeAuthz {
|
1711
|
+
|
1712
|
+
static __wrap(ptr) {
|
1713
|
+
const obj = Object.create(NewAcmeAuthz.prototype);
|
1714
|
+
obj.ptr = ptr;
|
1715
|
+
|
1716
|
+
return obj;
|
1717
|
+
}
|
1718
|
+
|
1719
|
+
__destroy_into_raw() {
|
1720
|
+
const ptr = this.ptr;
|
1721
|
+
this.ptr = 0;
|
1722
|
+
|
1723
|
+
return ptr;
|
1724
|
+
}
|
1725
|
+
|
1726
|
+
free() {
|
1727
|
+
const ptr = this.__destroy_into_raw();
|
1728
|
+
wasm$1.__wbg_newacmeauthz_free(ptr);
|
1729
|
+
}
|
1730
|
+
/**
|
1731
|
+
* @param {string} identifier
|
1732
|
+
* @param {AcmeChallenge | undefined} wire_http_challenge
|
1733
|
+
* @param {AcmeChallenge | undefined} wire_oidc_challenge
|
1734
|
+
*/
|
1735
|
+
constructor(identifier, wire_http_challenge, wire_oidc_challenge) {
|
1736
|
+
const ptr0 = passStringToWasm0(identifier, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
1737
|
+
const len0 = WASM_VECTOR_LEN;
|
1738
|
+
let ptr1 = 0;
|
1739
|
+
if (!isLikeNone(wire_http_challenge)) {
|
1740
|
+
_assertClass(wire_http_challenge, AcmeChallenge);
|
1741
|
+
ptr1 = wire_http_challenge.ptr;
|
1742
|
+
wire_http_challenge.ptr = 0;
|
1743
|
+
}
|
1744
|
+
let ptr2 = 0;
|
1745
|
+
if (!isLikeNone(wire_oidc_challenge)) {
|
1746
|
+
_assertClass(wire_oidc_challenge, AcmeChallenge);
|
1747
|
+
ptr2 = wire_oidc_challenge.ptr;
|
1748
|
+
wire_oidc_challenge.ptr = 0;
|
1749
|
+
}
|
1750
|
+
const ret = wasm$1.newacmeauthz_new(ptr0, len0, ptr1, ptr2);
|
1751
|
+
return NewAcmeAuthz.__wrap(ret);
|
1752
|
+
}
|
1753
|
+
/**
|
1754
|
+
* @returns {string}
|
1755
|
+
*/
|
1756
|
+
get identifier() {
|
1757
|
+
try {
|
1758
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
1759
|
+
wasm$1.acmedirectory_new_nonce(retptr, this.ptr);
|
1760
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
1761
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
1762
|
+
return getStringFromWasm0(r0, r1);
|
1763
|
+
} finally {
|
1764
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
1765
|
+
wasm$1.__wbindgen_free(r0, r1);
|
1766
|
+
}
|
1767
|
+
}
|
1768
|
+
/**
|
1769
|
+
* @returns {AcmeChallenge | undefined}
|
1770
|
+
*/
|
1771
|
+
get wire_http_challenge() {
|
1772
|
+
const ret = wasm$1.newacmeauthz_wire_http_challenge(this.ptr);
|
1773
|
+
return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
|
1774
|
+
}
|
1775
|
+
/**
|
1776
|
+
* @returns {AcmeChallenge | undefined}
|
1777
|
+
*/
|
1778
|
+
get wire_oidc_challenge() {
|
1779
|
+
const ret = wasm$1.newacmeauthz_wire_oidc_challenge(this.ptr);
|
1780
|
+
return ret === 0 ? undefined : AcmeChallenge.__wrap(ret);
|
1781
|
+
}
|
1782
|
+
}
|
1783
|
+
/**
|
1784
|
+
* See [core_crypto::e2e_identity::types::E2eiNewAcmeOrder]
|
1785
|
+
*/
|
1786
|
+
class NewAcmeOrder {
|
1787
|
+
|
1788
|
+
static __wrap(ptr) {
|
1789
|
+
const obj = Object.create(NewAcmeOrder.prototype);
|
1790
|
+
obj.ptr = ptr;
|
1791
|
+
|
1792
|
+
return obj;
|
1793
|
+
}
|
1794
|
+
|
1795
|
+
__destroy_into_raw() {
|
1796
|
+
const ptr = this.ptr;
|
1797
|
+
this.ptr = 0;
|
1798
|
+
|
1799
|
+
return ptr;
|
1800
|
+
}
|
1801
|
+
|
1802
|
+
free() {
|
1803
|
+
const ptr = this.__destroy_into_raw();
|
1804
|
+
wasm$1.__wbg_newacmeorder_free(ptr);
|
1805
|
+
}
|
1806
|
+
/**
|
1807
|
+
* @param {Uint8Array} delegate
|
1808
|
+
* @param {(Uint8Array)[]} authorizations
|
1809
|
+
*/
|
1810
|
+
constructor(delegate, authorizations) {
|
1811
|
+
const ptr0 = passArrayJsValueToWasm0(authorizations, wasm$1.__wbindgen_malloc);
|
1812
|
+
const len0 = WASM_VECTOR_LEN;
|
1813
|
+
const ret = wasm$1.newacmeorder_new(addHeapObject(delegate), ptr0, len0);
|
1814
|
+
return NewAcmeOrder.__wrap(ret);
|
1815
|
+
}
|
1816
|
+
/**
|
1817
|
+
* @returns {Uint8Array}
|
1818
|
+
*/
|
1819
|
+
get delegate() {
|
1820
|
+
const ret = wasm$1.acmechallenge_delegate(this.ptr);
|
1821
|
+
return takeObject(ret);
|
1822
|
+
}
|
1823
|
+
/**
|
1824
|
+
* @returns {Array<any>}
|
1825
|
+
*/
|
1826
|
+
get authorizations() {
|
1827
|
+
const ret = wasm$1.newacmeorder_authorizations(this.ptr);
|
1828
|
+
return takeObject(ret);
|
1829
|
+
}
|
1830
|
+
}
|
1831
|
+
/**
|
1472
1832
|
*/
|
1473
1833
|
class ProposalBundle {
|
1474
1834
|
|
@@ -1549,6 +1909,413 @@ class PublicGroupStateBundle {
|
|
1549
1909
|
return takeObject(ret);
|
1550
1910
|
}
|
1551
1911
|
}
|
1912
|
+
/**
|
1913
|
+
*/
|
1914
|
+
class WireE2eIdentity$1 {
|
1915
|
+
|
1916
|
+
static __wrap(ptr) {
|
1917
|
+
const obj = Object.create(WireE2eIdentity$1.prototype);
|
1918
|
+
obj.ptr = ptr;
|
1919
|
+
|
1920
|
+
return obj;
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
__destroy_into_raw() {
|
1924
|
+
const ptr = this.ptr;
|
1925
|
+
this.ptr = 0;
|
1926
|
+
|
1927
|
+
return ptr;
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
free() {
|
1931
|
+
const ptr = this.__destroy_into_raw();
|
1932
|
+
wasm$1.__wbg_wiree2eidentity_free(ptr);
|
1933
|
+
}
|
1934
|
+
/**
|
1935
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::directory_response]
|
1936
|
+
* @param {Uint8Array} directory
|
1937
|
+
* @returns {any}
|
1938
|
+
*/
|
1939
|
+
directory_response(directory) {
|
1940
|
+
try {
|
1941
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
1942
|
+
const ptr0 = passArray8ToWasm0(directory, wasm$1.__wbindgen_malloc);
|
1943
|
+
const len0 = WASM_VECTOR_LEN;
|
1944
|
+
wasm$1.wiree2eidentity_directory_response(retptr, this.ptr, ptr0, len0);
|
1945
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
1946
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
1947
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
1948
|
+
if (r2) {
|
1949
|
+
throw takeObject(r1);
|
1950
|
+
}
|
1951
|
+
return takeObject(r0);
|
1952
|
+
} finally {
|
1953
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
1954
|
+
}
|
1955
|
+
}
|
1956
|
+
/**
|
1957
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_account_request]
|
1958
|
+
* @param {any} directory
|
1959
|
+
* @param {string} previous_nonce
|
1960
|
+
* @returns {Uint8Array}
|
1961
|
+
*/
|
1962
|
+
new_account_request(directory, previous_nonce) {
|
1963
|
+
try {
|
1964
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
1965
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
1966
|
+
const len0 = WASM_VECTOR_LEN;
|
1967
|
+
wasm$1.wiree2eidentity_new_account_request(retptr, this.ptr, addHeapObject(directory), ptr0, len0);
|
1968
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
1969
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
1970
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
1971
|
+
if (r2) {
|
1972
|
+
throw takeObject(r1);
|
1973
|
+
}
|
1974
|
+
return takeObject(r0);
|
1975
|
+
} finally {
|
1976
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
1977
|
+
}
|
1978
|
+
}
|
1979
|
+
/**
|
1980
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_account_response]
|
1981
|
+
* @param {Uint8Array} account
|
1982
|
+
* @returns {Uint8Array}
|
1983
|
+
*/
|
1984
|
+
new_account_response(account) {
|
1985
|
+
try {
|
1986
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
1987
|
+
wasm$1.wiree2eidentity_new_account_response(retptr, this.ptr, addHeapObject(account));
|
1988
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
1989
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
1990
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
1991
|
+
if (r2) {
|
1992
|
+
throw takeObject(r1);
|
1993
|
+
}
|
1994
|
+
return takeObject(r0);
|
1995
|
+
} finally {
|
1996
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
1997
|
+
}
|
1998
|
+
}
|
1999
|
+
/**
|
2000
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
|
2001
|
+
* @param {string} handle
|
2002
|
+
* @param {string} client_id
|
2003
|
+
* @param {number} expiry_days
|
2004
|
+
* @param {any} directory
|
2005
|
+
* @param {Uint8Array} account
|
2006
|
+
* @param {string} previous_nonce
|
2007
|
+
* @returns {Uint8Array}
|
2008
|
+
*/
|
2009
|
+
new_order_request(handle, client_id, expiry_days, directory, account, previous_nonce) {
|
2010
|
+
try {
|
2011
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2012
|
+
const ptr0 = passStringToWasm0(handle, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2013
|
+
const len0 = WASM_VECTOR_LEN;
|
2014
|
+
const ptr1 = passStringToWasm0(client_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2015
|
+
const len1 = WASM_VECTOR_LEN;
|
2016
|
+
const ptr2 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2017
|
+
const len2 = WASM_VECTOR_LEN;
|
2018
|
+
wasm$1.wiree2eidentity_new_order_request(retptr, this.ptr, ptr0, len0, ptr1, len1, expiry_days, addHeapObject(directory), addHeapObject(account), ptr2, len2);
|
2019
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2020
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2021
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2022
|
+
if (r2) {
|
2023
|
+
throw takeObject(r1);
|
2024
|
+
}
|
2025
|
+
return takeObject(r0);
|
2026
|
+
} finally {
|
2027
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2028
|
+
}
|
2029
|
+
}
|
2030
|
+
/**
|
2031
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_order_response]
|
2032
|
+
* @param {Uint8Array} order
|
2033
|
+
* @returns {any}
|
2034
|
+
*/
|
2035
|
+
new_order_response(order) {
|
2036
|
+
try {
|
2037
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2038
|
+
wasm$1.wiree2eidentity_new_order_response(retptr, this.ptr, addHeapObject(order));
|
2039
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2040
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2041
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2042
|
+
if (r2) {
|
2043
|
+
throw takeObject(r1);
|
2044
|
+
}
|
2045
|
+
return takeObject(r0);
|
2046
|
+
} finally {
|
2047
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2048
|
+
}
|
2049
|
+
}
|
2050
|
+
/**
|
2051
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_request]
|
2052
|
+
* @param {string} url
|
2053
|
+
* @param {Uint8Array} account
|
2054
|
+
* @param {string} previous_nonce
|
2055
|
+
* @returns {Uint8Array}
|
2056
|
+
*/
|
2057
|
+
new_authz_request(url, account, previous_nonce) {
|
2058
|
+
try {
|
2059
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2060
|
+
const ptr0 = passStringToWasm0(url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2061
|
+
const len0 = WASM_VECTOR_LEN;
|
2062
|
+
const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2063
|
+
const len1 = WASM_VECTOR_LEN;
|
2064
|
+
wasm$1.wiree2eidentity_new_authz_request(retptr, this.ptr, ptr0, len0, addHeapObject(account), ptr1, len1);
|
2065
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2066
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2067
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2068
|
+
if (r2) {
|
2069
|
+
throw takeObject(r1);
|
2070
|
+
}
|
2071
|
+
return takeObject(r0);
|
2072
|
+
} finally {
|
2073
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2074
|
+
}
|
2075
|
+
}
|
2076
|
+
/**
|
2077
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_response]
|
2078
|
+
* @param {Uint8Array} authz
|
2079
|
+
* @returns {any}
|
2080
|
+
*/
|
2081
|
+
new_authz_response(authz) {
|
2082
|
+
try {
|
2083
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2084
|
+
wasm$1.wiree2eidentity_new_authz_response(retptr, this.ptr, addHeapObject(authz));
|
2085
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2086
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2087
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2088
|
+
if (r2) {
|
2089
|
+
throw takeObject(r1);
|
2090
|
+
}
|
2091
|
+
return takeObject(r0);
|
2092
|
+
} finally {
|
2093
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2094
|
+
}
|
2095
|
+
}
|
2096
|
+
/**
|
2097
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
|
2098
|
+
* @param {string} access_token_url
|
2099
|
+
* @param {string} user_id
|
2100
|
+
* @param {bigint} client_id
|
2101
|
+
* @param {string} domain
|
2102
|
+
* @param {any} client_id_challenge
|
2103
|
+
* @param {string} backend_nonce
|
2104
|
+
* @param {number} expiry_days
|
2105
|
+
* @returns {string}
|
2106
|
+
*/
|
2107
|
+
create_dpop_token(access_token_url, user_id, client_id, domain, client_id_challenge, backend_nonce, expiry_days) {
|
2108
|
+
try {
|
2109
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2110
|
+
const ptr0 = passStringToWasm0(access_token_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2111
|
+
const len0 = WASM_VECTOR_LEN;
|
2112
|
+
const ptr1 = passStringToWasm0(user_id, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2113
|
+
const len1 = WASM_VECTOR_LEN;
|
2114
|
+
const ptr2 = passStringToWasm0(domain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2115
|
+
const len2 = WASM_VECTOR_LEN;
|
2116
|
+
const ptr3 = passStringToWasm0(backend_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2117
|
+
const len3 = WASM_VECTOR_LEN;
|
2118
|
+
wasm$1.wiree2eidentity_create_dpop_token(retptr, this.ptr, ptr0, len0, ptr1, len1, client_id, ptr2, len2, addHeapObject(client_id_challenge), ptr3, len3, expiry_days);
|
2119
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2120
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2121
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2122
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
2123
|
+
var ptr4 = r0;
|
2124
|
+
var len4 = r1;
|
2125
|
+
if (r3) {
|
2126
|
+
ptr4 = 0; len4 = 0;
|
2127
|
+
throw takeObject(r2);
|
2128
|
+
}
|
2129
|
+
return getStringFromWasm0(ptr4, len4);
|
2130
|
+
} finally {
|
2131
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2132
|
+
wasm$1.__wbindgen_free(ptr4, len4);
|
2133
|
+
}
|
2134
|
+
}
|
2135
|
+
/**
|
2136
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_challenge_request]
|
2137
|
+
* @param {any} handle_challenge
|
2138
|
+
* @param {Uint8Array} account
|
2139
|
+
* @param {string} previous_nonce
|
2140
|
+
* @returns {Uint8Array}
|
2141
|
+
*/
|
2142
|
+
new_challenge_request(handle_challenge, account, previous_nonce) {
|
2143
|
+
try {
|
2144
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2145
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2146
|
+
const len0 = WASM_VECTOR_LEN;
|
2147
|
+
wasm$1.wiree2eidentity_new_challenge_request(retptr, this.ptr, addHeapObject(handle_challenge), addHeapObject(account), ptr0, len0);
|
2148
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2149
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2150
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2151
|
+
if (r2) {
|
2152
|
+
throw takeObject(r1);
|
2153
|
+
}
|
2154
|
+
return takeObject(r0);
|
2155
|
+
} finally {
|
2156
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2157
|
+
}
|
2158
|
+
}
|
2159
|
+
/**
|
2160
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::new_challenge_response]
|
2161
|
+
* @param {Uint8Array} challenge
|
2162
|
+
*/
|
2163
|
+
new_challenge_response(challenge) {
|
2164
|
+
try {
|
2165
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2166
|
+
wasm$1.wiree2eidentity_new_challenge_response(retptr, this.ptr, addHeapObject(challenge));
|
2167
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2168
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2169
|
+
if (r1) {
|
2170
|
+
throw takeObject(r0);
|
2171
|
+
}
|
2172
|
+
} finally {
|
2173
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2174
|
+
}
|
2175
|
+
}
|
2176
|
+
/**
|
2177
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::check_order_request]
|
2178
|
+
* @param {string} order_url
|
2179
|
+
* @param {Uint8Array} account
|
2180
|
+
* @param {string} previous_nonce
|
2181
|
+
* @returns {Uint8Array}
|
2182
|
+
*/
|
2183
|
+
check_order_request(order_url, account, previous_nonce) {
|
2184
|
+
try {
|
2185
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2186
|
+
const ptr0 = passStringToWasm0(order_url, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2187
|
+
const len0 = WASM_VECTOR_LEN;
|
2188
|
+
const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2189
|
+
const len1 = WASM_VECTOR_LEN;
|
2190
|
+
wasm$1.wiree2eidentity_check_order_request(retptr, this.ptr, ptr0, len0, addHeapObject(account), ptr1, len1);
|
2191
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2192
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2193
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2194
|
+
if (r2) {
|
2195
|
+
throw takeObject(r1);
|
2196
|
+
}
|
2197
|
+
return takeObject(r0);
|
2198
|
+
} finally {
|
2199
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2200
|
+
}
|
2201
|
+
}
|
2202
|
+
/**
|
2203
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::check_order_response]
|
2204
|
+
* @param {Uint8Array} order
|
2205
|
+
* @returns {Uint8Array}
|
2206
|
+
*/
|
2207
|
+
check_order_response(order) {
|
2208
|
+
try {
|
2209
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2210
|
+
wasm$1.wiree2eidentity_check_order_response(retptr, this.ptr, addHeapObject(order));
|
2211
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2212
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2213
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2214
|
+
if (r2) {
|
2215
|
+
throw takeObject(r1);
|
2216
|
+
}
|
2217
|
+
return takeObject(r0);
|
2218
|
+
} finally {
|
2219
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2220
|
+
}
|
2221
|
+
}
|
2222
|
+
/**
|
2223
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::finalize_request]
|
2224
|
+
* @param {(Uint8Array)[]} domains
|
2225
|
+
* @param {Uint8Array} order
|
2226
|
+
* @param {Uint8Array} account
|
2227
|
+
* @param {string} previous_nonce
|
2228
|
+
* @returns {Uint8Array}
|
2229
|
+
*/
|
2230
|
+
finalize_request(domains, order, account, previous_nonce) {
|
2231
|
+
try {
|
2232
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2233
|
+
const ptr0 = passArrayJsValueToWasm0(domains, wasm$1.__wbindgen_malloc);
|
2234
|
+
const len0 = WASM_VECTOR_LEN;
|
2235
|
+
const ptr1 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2236
|
+
const len1 = WASM_VECTOR_LEN;
|
2237
|
+
wasm$1.wiree2eidentity_finalize_request(retptr, this.ptr, ptr0, len0, addHeapObject(order), addHeapObject(account), ptr1, len1);
|
2238
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2239
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2240
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2241
|
+
if (r2) {
|
2242
|
+
throw takeObject(r1);
|
2243
|
+
}
|
2244
|
+
return takeObject(r0);
|
2245
|
+
} finally {
|
2246
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2247
|
+
}
|
2248
|
+
}
|
2249
|
+
/**
|
2250
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::finalize_response]
|
2251
|
+
* @param {Uint8Array} finalize
|
2252
|
+
* @returns {any}
|
2253
|
+
*/
|
2254
|
+
finalize_response(finalize) {
|
2255
|
+
try {
|
2256
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2257
|
+
wasm$1.wiree2eidentity_finalize_response(retptr, this.ptr, addHeapObject(finalize));
|
2258
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2259
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2260
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2261
|
+
if (r2) {
|
2262
|
+
throw takeObject(r1);
|
2263
|
+
}
|
2264
|
+
return takeObject(r0);
|
2265
|
+
} finally {
|
2266
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2267
|
+
}
|
2268
|
+
}
|
2269
|
+
/**
|
2270
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::certificate_request]
|
2271
|
+
* @param {any} finalize
|
2272
|
+
* @param {Uint8Array} account
|
2273
|
+
* @param {string} previous_nonce
|
2274
|
+
* @returns {Uint8Array}
|
2275
|
+
*/
|
2276
|
+
certificate_request(finalize, account, previous_nonce) {
|
2277
|
+
try {
|
2278
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2279
|
+
const ptr0 = passStringToWasm0(previous_nonce, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2280
|
+
const len0 = WASM_VECTOR_LEN;
|
2281
|
+
wasm$1.wiree2eidentity_certificate_request(retptr, this.ptr, addHeapObject(finalize), addHeapObject(account), ptr0, len0);
|
2282
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2283
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2284
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2285
|
+
if (r2) {
|
2286
|
+
throw takeObject(r1);
|
2287
|
+
}
|
2288
|
+
return takeObject(r0);
|
2289
|
+
} finally {
|
2290
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2291
|
+
}
|
2292
|
+
}
|
2293
|
+
/**
|
2294
|
+
* See [core_crypto::e2e_identity::WireE2eIdentity::certificate_response]
|
2295
|
+
* @param {string} certificate_chain
|
2296
|
+
* @returns {(Uint8Array)[]}
|
2297
|
+
*/
|
2298
|
+
certificate_response(certificate_chain) {
|
2299
|
+
try {
|
2300
|
+
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
2301
|
+
const ptr0 = passStringToWasm0(certificate_chain, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2302
|
+
const len0 = WASM_VECTOR_LEN;
|
2303
|
+
wasm$1.wiree2eidentity_certificate_response(retptr, this.ptr, ptr0, len0);
|
2304
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
2305
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
2306
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
2307
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
2308
|
+
if (r3) {
|
2309
|
+
throw takeObject(r2);
|
2310
|
+
}
|
2311
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
2312
|
+
wasm$1.__wbindgen_free(r0, r1 * 4);
|
2313
|
+
return v1;
|
2314
|
+
} finally {
|
2315
|
+
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
2316
|
+
}
|
2317
|
+
}
|
2318
|
+
}
|
1552
2319
|
|
1553
2320
|
async function load(module, imports) {
|
1554
2321
|
if (typeof Response === 'function' && module instanceof Response) {
|
@@ -1588,54 +2355,30 @@ function getImports() {
|
|
1588
2355
|
const ret = getObject(arg0);
|
1589
2356
|
return addHeapObject(ret);
|
1590
2357
|
};
|
1591
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
1592
|
-
takeObject(arg0);
|
1593
|
-
};
|
1594
2358
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
1595
2359
|
const val = getObject(arg0);
|
1596
2360
|
const ret = typeof(val) === 'object' && val !== null;
|
1597
2361
|
return ret;
|
1598
2362
|
};
|
2363
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
2364
|
+
takeObject(arg0);
|
2365
|
+
};
|
1599
2366
|
imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
1600
2367
|
const ret = getObject(arg0)[getObject(arg1)];
|
1601
2368
|
return addHeapObject(ret);
|
1602
2369
|
};
|
1603
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
1604
|
-
const ret = getObject(arg0) === undefined;
|
1605
|
-
return ret;
|
1606
|
-
};
|
1607
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
1608
|
-
const ret = getObject(arg0) in getObject(arg1);
|
1609
|
-
return ret;
|
1610
|
-
};
|
1611
|
-
imports.wbg.__wbg_objectStoreNames_8c06c40d2b05141c = function(arg0) {
|
1612
|
-
const ret = getObject(arg0).objectStoreNames;
|
1613
|
-
return addHeapObject(ret);
|
1614
|
-
};
|
1615
|
-
imports.wbg.__wbg_length_b59f358f797fd9f4 = function(arg0) {
|
1616
|
-
const ret = getObject(arg0).length;
|
1617
|
-
return ret;
|
1618
|
-
};
|
1619
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
1620
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
1621
|
-
return addHeapObject(ret);
|
1622
|
-
};
|
1623
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
1624
|
-
const obj = getObject(arg1);
|
1625
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1626
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
1627
|
-
var len0 = WASM_VECTOR_LEN;
|
1628
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1629
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
2370
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
2371
|
+
const ret = getObject(arg0) === undefined;
|
2372
|
+
return ret;
|
2373
|
+
};
|
2374
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
2375
|
+
const ret = getObject(arg0) in getObject(arg1);
|
2376
|
+
return ret;
|
1630
2377
|
};
|
1631
2378
|
imports.wbg.__wbg_length_6e3bbe7c8bd4dbd8 = function(arg0) {
|
1632
2379
|
const ret = getObject(arg0).length;
|
1633
2380
|
return ret;
|
1634
2381
|
};
|
1635
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
1636
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1637
|
-
return addHeapObject(ret);
|
1638
|
-
};
|
1639
2382
|
imports.wbg.__wbg_new0_a57059d72c5b7aee = function() {
|
1640
2383
|
const ret = new Date();
|
1641
2384
|
return addHeapObject(ret);
|
@@ -1685,6 +2428,18 @@ function getImports() {
|
|
1685
2428
|
const ret = BigInt.asUintN(64, arg0);
|
1686
2429
|
return addHeapObject(ret);
|
1687
2430
|
};
|
2431
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
2432
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
2433
|
+
return addHeapObject(ret);
|
2434
|
+
};
|
2435
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
2436
|
+
const obj = getObject(arg1);
|
2437
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
2438
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
2439
|
+
var len0 = WASM_VECTOR_LEN;
|
2440
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
2441
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
2442
|
+
};
|
1688
2443
|
imports.wbg.__wbg_isArray_27c46c67f498e15d = function(arg0) {
|
1689
2444
|
const ret = Array.isArray(getObject(arg0));
|
1690
2445
|
return ret;
|
@@ -1697,6 +2452,10 @@ function getImports() {
|
|
1697
2452
|
const ret = getObject(arg0)[arg1 >>> 0];
|
1698
2453
|
return addHeapObject(ret);
|
1699
2454
|
};
|
2455
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
2456
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
2457
|
+
return addHeapObject(ret);
|
2458
|
+
};
|
1700
2459
|
imports.wbg.__wbg_corecrypto_new = function(arg0) {
|
1701
2460
|
const ret = CoreCrypto$1.__wrap(arg0);
|
1702
2461
|
return addHeapObject(ret);
|
@@ -1704,22 +2463,45 @@ function getImports() {
|
|
1704
2463
|
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
1705
2464
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
1706
2465
|
};
|
1707
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
1708
|
-
const ret = arg0;
|
1709
|
-
return addHeapObject(ret);
|
1710
|
-
};
|
1711
2466
|
imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
|
1712
2467
|
const ret = new Object();
|
1713
2468
|
return addHeapObject(ret);
|
1714
2469
|
};
|
2470
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
2471
|
+
const ret = arg0;
|
2472
|
+
return addHeapObject(ret);
|
2473
|
+
};
|
1715
2474
|
imports.wbg.__wbg_call_168da88779e35f61 = function() { return handleError(function (arg0, arg1, arg2) {
|
1716
2475
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
1717
2476
|
return addHeapObject(ret);
|
1718
2477
|
}, arguments) };
|
2478
|
+
imports.wbg.__wbg_new_1d9a920c6bfc44a8 = function() {
|
2479
|
+
const ret = new Array();
|
2480
|
+
return addHeapObject(ret);
|
2481
|
+
};
|
1719
2482
|
imports.wbg.__wbg_new_8c3f0052272a457a = function(arg0) {
|
1720
2483
|
const ret = new Uint8Array(getObject(arg0));
|
1721
2484
|
return addHeapObject(ret);
|
1722
2485
|
};
|
2486
|
+
imports.wbg.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
|
2487
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
2488
|
+
return ret;
|
2489
|
+
};
|
2490
|
+
imports.wbg.__wbg_wiree2eidentity_new = function(arg0) {
|
2491
|
+
const ret = WireE2eIdentity$1.__wrap(arg0);
|
2492
|
+
return addHeapObject(ret);
|
2493
|
+
};
|
2494
|
+
imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
|
2495
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
2496
|
+
};
|
2497
|
+
imports.wbg.__wbg_new_268f7b7dd3430798 = function() {
|
2498
|
+
const ret = new Map();
|
2499
|
+
return addHeapObject(ret);
|
2500
|
+
};
|
2501
|
+
imports.wbg.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
|
2502
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
2503
|
+
return addHeapObject(ret);
|
2504
|
+
};
|
1723
2505
|
imports.wbg.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
1724
2506
|
try {
|
1725
2507
|
var state0 = {a: arg0, b: arg1};
|
@@ -1727,7 +2509,7 @@ function getImports() {
|
|
1727
2509
|
const a = state0.a;
|
1728
2510
|
state0.a = 0;
|
1729
2511
|
try {
|
1730
|
-
return
|
2512
|
+
return __wbg_adapter_264(a, state0.b, arg0, arg1);
|
1731
2513
|
} finally {
|
1732
2514
|
state0.a = a;
|
1733
2515
|
}
|
@@ -1738,24 +2520,16 @@ function getImports() {
|
|
1738
2520
|
state0.a = state0.b = 0;
|
1739
2521
|
}
|
1740
2522
|
};
|
1741
|
-
imports.wbg.
|
1742
|
-
const ret =
|
2523
|
+
imports.wbg.__wbg_objectStoreNames_8c06c40d2b05141c = function(arg0) {
|
2524
|
+
const ret = getObject(arg0).objectStoreNames;
|
1743
2525
|
return addHeapObject(ret);
|
1744
2526
|
};
|
1745
|
-
imports.wbg.
|
1746
|
-
|
1747
|
-
};
|
1748
|
-
imports.wbg.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
|
1749
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
2527
|
+
imports.wbg.__wbg_length_b59f358f797fd9f4 = function(arg0) {
|
2528
|
+
const ret = getObject(arg0).length;
|
1750
2529
|
return ret;
|
1751
2530
|
};
|
1752
|
-
imports.wbg.
|
1753
|
-
|
1754
|
-
return addHeapObject(ret);
|
1755
|
-
};
|
1756
|
-
imports.wbg.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
|
1757
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
1758
|
-
return addHeapObject(ret);
|
2531
|
+
imports.wbg.__wbg_setproteuserrorcode_5c292d4c4f7e5b6e = function(arg0, arg1) {
|
2532
|
+
getObject(arg0).set_proteus_error_code(arg1 >>> 0);
|
1759
2533
|
};
|
1760
2534
|
imports.wbg.__wbg_call_3999bee59e9f7719 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
1761
2535
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
@@ -1773,6 +2547,23 @@ function getImports() {
|
|
1773
2547
|
const ret = ProposalBundle.__wrap(arg0);
|
1774
2548
|
return addHeapObject(ret);
|
1775
2549
|
};
|
2550
|
+
imports.wbg.__wbg_new_141b86f11ac9df62 = function(arg0, arg1, arg2, arg3) {
|
2551
|
+
try {
|
2552
|
+
const ret = new CoreCryptoError(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
2553
|
+
return addHeapObject(ret);
|
2554
|
+
} finally {
|
2555
|
+
wasm$1.__wbindgen_free(arg0, arg1);
|
2556
|
+
wasm$1.__wbindgen_free(arg2, arg3);
|
2557
|
+
}
|
2558
|
+
};
|
2559
|
+
imports.wbg.__wbg_now_4d4a1d65c7a8c0ba = function() {
|
2560
|
+
const ret = Date.now();
|
2561
|
+
return ret;
|
2562
|
+
};
|
2563
|
+
imports.wbg.__wbg_now_78244d2ced74c026 = function() {
|
2564
|
+
const ret = performance.now();
|
2565
|
+
return ret;
|
2566
|
+
};
|
1776
2567
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
1777
2568
|
const ret = new Error();
|
1778
2569
|
return addHeapObject(ret);
|
@@ -1824,23 +2615,18 @@ function getImports() {
|
|
1824
2615
|
const ret = false;
|
1825
2616
|
return ret;
|
1826
2617
|
};
|
1827
|
-
imports.wbg.
|
1828
|
-
const ret = getObject(arg0).
|
2618
|
+
imports.wbg.__wbg_get_6285bf458a1ee758 = function() { return handleError(function (arg0, arg1) {
|
2619
|
+
const ret = getObject(arg0).get(getObject(arg1));
|
1829
2620
|
return addHeapObject(ret);
|
1830
2621
|
}, arguments) };
|
1831
|
-
imports.wbg.
|
1832
|
-
const ret = getObject(arg0).
|
2622
|
+
imports.wbg.__wbg_put_84e7fc93eee27b28 = function() { return handleError(function (arg0, arg1, arg2) {
|
2623
|
+
const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
|
2624
|
+
return addHeapObject(ret);
|
2625
|
+
}, arguments) };
|
2626
|
+
imports.wbg.__wbg_put_f2763b05a07f3233 = function() { return handleError(function (arg0, arg1) {
|
2627
|
+
const ret = getObject(arg0).put(getObject(arg1));
|
1833
2628
|
return addHeapObject(ret);
|
1834
2629
|
}, arguments) };
|
1835
|
-
imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
|
1836
|
-
getObject(arg0).onupgradeneeded = getObject(arg1);
|
1837
|
-
};
|
1838
|
-
imports.wbg.__wbg_setonsuccess_5f71593bc51653a3 = function(arg0, arg1) {
|
1839
|
-
getObject(arg0).onsuccess = getObject(arg1);
|
1840
|
-
};
|
1841
|
-
imports.wbg.__wbg_setonerror_d5771cc5bf9ea74c = function(arg0, arg1) {
|
1842
|
-
getObject(arg0).onerror = getObject(arg1);
|
1843
|
-
};
|
1844
2630
|
imports.wbg.__wbg_delete_8abedd1043b4105d = function() { return handleError(function (arg0, arg1) {
|
1845
2631
|
const ret = getObject(arg0).delete(getObject(arg1));
|
1846
2632
|
return addHeapObject(ret);
|
@@ -1853,18 +2639,6 @@ function getImports() {
|
|
1853
2639
|
const ret = getObject(arg0).count(getObject(arg1));
|
1854
2640
|
return addHeapObject(ret);
|
1855
2641
|
}, arguments) };
|
1856
|
-
imports.wbg.__wbg_get_6285bf458a1ee758 = function() { return handleError(function (arg0, arg1) {
|
1857
|
-
const ret = getObject(arg0).get(getObject(arg1));
|
1858
|
-
return addHeapObject(ret);
|
1859
|
-
}, arguments) };
|
1860
|
-
imports.wbg.__wbg_put_84e7fc93eee27b28 = function() { return handleError(function (arg0, arg1, arg2) {
|
1861
|
-
const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
|
1862
|
-
return addHeapObject(ret);
|
1863
|
-
}, arguments) };
|
1864
|
-
imports.wbg.__wbg_put_f2763b05a07f3233 = function() { return handleError(function (arg0, arg1) {
|
1865
|
-
const ret = getObject(arg0).put(getObject(arg1));
|
1866
|
-
return addHeapObject(ret);
|
1867
|
-
}, arguments) };
|
1868
2642
|
imports.wbg.__wbg_openCursor_e036069f0e326708 = function() { return handleError(function (arg0, arg1) {
|
1869
2643
|
const ret = getObject(arg0).openCursor(getObject(arg1));
|
1870
2644
|
return addHeapObject(ret);
|
@@ -1873,6 +2647,23 @@ function getImports() {
|
|
1873
2647
|
const ret = getObject(arg0).openCursor();
|
1874
2648
|
return addHeapObject(ret);
|
1875
2649
|
}, arguments) };
|
2650
|
+
imports.wbg.__wbg_setonsuccess_5f71593bc51653a3 = function(arg0, arg1) {
|
2651
|
+
getObject(arg0).onsuccess = getObject(arg1);
|
2652
|
+
};
|
2653
|
+
imports.wbg.__wbg_open_a31c3fe1fdc244eb = function() { return handleError(function (arg0, arg1, arg2) {
|
2654
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2));
|
2655
|
+
return addHeapObject(ret);
|
2656
|
+
}, arguments) };
|
2657
|
+
imports.wbg.__wbg_open_c5d5fb2df44b9d10 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
2658
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
2659
|
+
return addHeapObject(ret);
|
2660
|
+
}, arguments) };
|
2661
|
+
imports.wbg.__wbg_setonupgradeneeded_17d0b9530f1e0cac = function(arg0, arg1) {
|
2662
|
+
getObject(arg0).onupgradeneeded = getObject(arg1);
|
2663
|
+
};
|
2664
|
+
imports.wbg.__wbg_setonerror_d5771cc5bf9ea74c = function(arg0, arg1) {
|
2665
|
+
getObject(arg0).onerror = getObject(arg1);
|
2666
|
+
};
|
1876
2667
|
imports.wbg.__wbg_index_86861edf1478f49c = function() { return handleError(function (arg0, arg1, arg2) {
|
1877
2668
|
const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
|
1878
2669
|
return addHeapObject(ret);
|
@@ -1893,13 +2684,13 @@ function getImports() {
|
|
1893
2684
|
const ret = getObject(arg0).openCursor(getObject(arg1));
|
1894
2685
|
return addHeapObject(ret);
|
1895
2686
|
}, arguments) };
|
2687
|
+
imports.wbg.__wbg_close_5a04b9ce11dade22 = function(arg0) {
|
2688
|
+
getObject(arg0).close();
|
2689
|
+
};
|
1896
2690
|
imports.wbg.__wbg_deleteDatabase_f6454de6a88aebde = function() { return handleError(function (arg0, arg1, arg2) {
|
1897
2691
|
const ret = getObject(arg0).deleteDatabase(getStringFromWasm0(arg1, arg2));
|
1898
2692
|
return addHeapObject(ret);
|
1899
2693
|
}, arguments) };
|
1900
|
-
imports.wbg.__wbg_close_5a04b9ce11dade22 = function(arg0) {
|
1901
|
-
getObject(arg0).close();
|
1902
|
-
};
|
1903
2694
|
imports.wbg.__wbg_randomFillSync_6894564c2c334c42 = function() { return handleError(function (arg0, arg1, arg2) {
|
1904
2695
|
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
1905
2696
|
}, arguments) };
|
@@ -2021,10 +2812,6 @@ function getImports() {
|
|
2021
2812
|
const ret = getObject(arg0).result;
|
2022
2813
|
return addHeapObject(ret);
|
2023
2814
|
}, arguments) };
|
2024
|
-
imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
|
2025
|
-
const ret = getObject(arg0).error;
|
2026
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
2027
|
-
}, arguments) };
|
2028
2815
|
imports.wbg.__wbg_contains_6cf516181cd86571 = function(arg0, arg1, arg2) {
|
2029
2816
|
const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
|
2030
2817
|
return ret;
|
@@ -2051,6 +2838,10 @@ function getImports() {
|
|
2051
2838
|
imports.wbg.__wbg_deleteObjectStore_1b698c5fd1bc077d = function() { return handleError(function (arg0, arg1, arg2) {
|
2052
2839
|
getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
|
2053
2840
|
}, arguments) };
|
2841
|
+
imports.wbg.__wbg_error_aacf5ac191e54ed0 = function() { return handleError(function (arg0) {
|
2842
|
+
const ret = getObject(arg0).error;
|
2843
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
2844
|
+
}, arguments) };
|
2054
2845
|
imports.wbg.__wbindgen_is_falsy = function(arg0) {
|
2055
2846
|
const ret = !getObject(arg0);
|
2056
2847
|
return ret;
|
@@ -2076,6 +2867,24 @@ function getImports() {
|
|
2076
2867
|
const ret = getObject(arg0).toString();
|
2077
2868
|
return addHeapObject(ret);
|
2078
2869
|
};
|
2870
|
+
imports.wbg.__wbg_instanceof_Window_acc97ff9f5d2c7b4 = function(arg0) {
|
2871
|
+
let result;
|
2872
|
+
try {
|
2873
|
+
result = getObject(arg0) instanceof Window;
|
2874
|
+
} catch {
|
2875
|
+
result = false;
|
2876
|
+
}
|
2877
|
+
const ret = result;
|
2878
|
+
return ret;
|
2879
|
+
};
|
2880
|
+
imports.wbg.__wbg_crypto_9f07beb1e97bfa1b = function() { return handleError(function (arg0) {
|
2881
|
+
const ret = getObject(arg0).crypto;
|
2882
|
+
return addHeapObject(ret);
|
2883
|
+
}, arguments) };
|
2884
|
+
imports.wbg.__wbg_getRandomValues_f134f772d240c51f = function() { return handleError(function (arg0, arg1, arg2) {
|
2885
|
+
const ret = getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
|
2886
|
+
return addHeapObject(ret);
|
2887
|
+
}, arguments) };
|
2079
2888
|
imports.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003 = function(arg0) {
|
2080
2889
|
let result;
|
2081
2890
|
try {
|
@@ -2151,12 +2960,12 @@ function getImports() {
|
|
2151
2960
|
const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
|
2152
2961
|
return addHeapObject(ret);
|
2153
2962
|
}, arguments) };
|
2154
|
-
imports.wbg.
|
2155
|
-
const ret = makeMutClosure(arg0, arg1,
|
2963
|
+
imports.wbg.__wbindgen_closure_wrapper2699 = function(arg0, arg1, arg2) {
|
2964
|
+
const ret = makeMutClosure(arg0, arg1, 141, __wbg_adapter_52);
|
2156
2965
|
return addHeapObject(ret);
|
2157
2966
|
};
|
2158
|
-
imports.wbg.
|
2159
|
-
const ret = makeMutClosure(arg0, arg1,
|
2967
|
+
imports.wbg.__wbindgen_closure_wrapper4619 = function(arg0, arg1, arg2) {
|
2968
|
+
const ret = makeMutClosure(arg0, arg1, 141, __wbg_adapter_55);
|
2160
2969
|
return addHeapObject(ret);
|
2161
2970
|
};
|
2162
2971
|
|
@@ -2189,9 +2998,7 @@ function initSync(module) {
|
|
2189
2998
|
}
|
2190
2999
|
|
2191
3000
|
async function init(input) {
|
2192
|
-
|
2193
|
-
input = new URL('index_bg.wasm', import.meta.url);
|
2194
|
-
}
|
3001
|
+
|
2195
3002
|
const imports = getImports();
|
2196
3003
|
|
2197
3004
|
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
@@ -2208,6 +3015,9 @@ var exports = /*#__PURE__*/Object.freeze({
|
|
2208
3015
|
version: version,
|
2209
3016
|
WirePolicy: WirePolicy$1,
|
2210
3017
|
Ciphersuite: Ciphersuite$1,
|
3018
|
+
AcmeChallenge: AcmeChallenge,
|
3019
|
+
AcmeDirectory: AcmeDirectory,
|
3020
|
+
AcmeFinalize: AcmeFinalize,
|
2211
3021
|
CommitBundle: CommitBundle,
|
2212
3022
|
ConversationConfiguration: ConversationConfiguration,
|
2213
3023
|
ConversationInitBundle: ConversationInitBundle,
|
@@ -2217,8 +3027,11 @@ var exports = /*#__PURE__*/Object.freeze({
|
|
2217
3027
|
DecryptedMessage: DecryptedMessage,
|
2218
3028
|
Invitee: Invitee,
|
2219
3029
|
MemberAddedMessages: MemberAddedMessages,
|
3030
|
+
NewAcmeAuthz: NewAcmeAuthz,
|
3031
|
+
NewAcmeOrder: NewAcmeOrder,
|
2220
3032
|
ProposalBundle: ProposalBundle,
|
2221
3033
|
PublicGroupStateBundle: PublicGroupStateBundle,
|
3034
|
+
WireE2eIdentity: WireE2eIdentity$1,
|
2222
3035
|
initSync: initSync,
|
2223
3036
|
'default': init
|
2224
3037
|
});
|
@@ -2226,7 +3039,7 @@ var exports = /*#__PURE__*/Object.freeze({
|
|
2226
3039
|
var wasm = async (opt = {}) => {
|
2227
3040
|
let {importHook, serverPath} = opt;
|
2228
3041
|
|
2229
|
-
let path = "assets/core_crypto_ffi-
|
3042
|
+
let path = "assets/core_crypto_ffi-2b0ceda6.wasm";
|
2230
3043
|
|
2231
3044
|
if (serverPath != null) {
|
2232
3045
|
path = serverPath + /[^\/\\]*$/.exec(path)[0];
|
@@ -2242,39 +3055,39 @@ var wasm = async (opt = {}) => {
|
|
2242
3055
|
|
2243
3056
|
// Wire
|
2244
3057
|
// Copyright (C) 2022 Wire Swiss GmbH
|
2245
|
-
var _a, _CoreCrypto_module, _CoreCrypto_cc;
|
3058
|
+
var _a, _CoreCrypto_module, _CoreCrypto_cc, _b, _WireE2eIdentity_module, _WireE2eIdentity_e2ei;
|
2246
3059
|
/**
|
2247
|
-
* see [core_crypto::prelude::CiphersuiteName]
|
2248
|
-
*/
|
3060
|
+
* see [core_crypto::prelude::CiphersuiteName]
|
3061
|
+
*/
|
2249
3062
|
var Ciphersuite;
|
2250
3063
|
(function (Ciphersuite) {
|
2251
3064
|
/**
|
2252
|
-
|
2253
|
-
|
3065
|
+
* DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
|
3066
|
+
*/
|
2254
3067
|
Ciphersuite[Ciphersuite["MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519"] = 1] = "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519";
|
2255
3068
|
/**
|
2256
|
-
|
2257
|
-
|
3069
|
+
* DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256
|
3070
|
+
*/
|
2258
3071
|
Ciphersuite[Ciphersuite["MLS_128_DHKEMP256_AES128GCM_SHA256_P256"] = 2] = "MLS_128_DHKEMP256_AES128GCM_SHA256_P256";
|
2259
3072
|
/**
|
2260
|
-
|
2261
|
-
|
3073
|
+
* DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
|
3074
|
+
*/
|
2262
3075
|
Ciphersuite[Ciphersuite["MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519"] = 3] = "MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519";
|
2263
3076
|
/**
|
2264
|
-
|
2265
|
-
|
3077
|
+
* DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
|
3078
|
+
*/
|
2266
3079
|
Ciphersuite[Ciphersuite["MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448"] = 4] = "MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448";
|
2267
3080
|
/**
|
2268
|
-
|
2269
|
-
|
3081
|
+
* DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521
|
3082
|
+
*/
|
2270
3083
|
Ciphersuite[Ciphersuite["MLS_256_DHKEMP521_AES256GCM_SHA512_P521"] = 5] = "MLS_256_DHKEMP521_AES256GCM_SHA512_P521";
|
2271
3084
|
/**
|
2272
|
-
|
2273
|
-
|
3085
|
+
* DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
|
3086
|
+
*/
|
2274
3087
|
Ciphersuite[Ciphersuite["MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448"] = 6] = "MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448";
|
2275
3088
|
/**
|
2276
|
-
|
2277
|
-
|
3089
|
+
* DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
|
3090
|
+
*/
|
2278
3091
|
Ciphersuite[Ciphersuite["MLS_256_DHKEMP384_AES256GCM_SHA384_P384"] = 7] = "MLS_256_DHKEMP384_AES256GCM_SHA384_P384";
|
2279
3092
|
})(Ciphersuite || (Ciphersuite = {}));
|
2280
3093
|
/**
|
@@ -2820,7 +3633,7 @@ class CoreCrypto {
|
|
2820
3633
|
* **CAUTION**: only use this when you had an explicit response from the Delivery Service
|
2821
3634
|
* e.g. 403. Do not use otherwise e.g. 5xx responses, timeout etc..
|
2822
3635
|
* **DO NOT** use when Delivery Service responds 409, pending state will be renewed
|
2823
|
-
* in {@link CoreCrypto.
|
3636
|
+
* in {@link CoreCrypto.decryptMessage}
|
2824
3637
|
*
|
2825
3638
|
* @param conversationId - The group's ID
|
2826
3639
|
*/
|
@@ -3006,7 +3819,7 @@ class CoreCrypto {
|
|
3006
3819
|
*
|
3007
3820
|
* @param prekey - the prekey bundle to get the fingerprint from
|
3008
3821
|
* @returns Hex-encoded public key string
|
3009
|
-
|
3822
|
+
**/
|
3010
3823
|
static proteusFingerprintPrekeybundle(prekey) {
|
3011
3824
|
return __classPrivateFieldGet(this, _a, "f", _CoreCrypto_module).CoreCrypto.proteus_fingerprint_prekeybundle(prekey);
|
3012
3825
|
}
|
@@ -3018,6 +3831,18 @@ class CoreCrypto {
|
|
3018
3831
|
async proteusCryptoboxMigrate(storeName) {
|
3019
3832
|
return await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").proteus_cryptobox_migrate(storeName);
|
3020
3833
|
}
|
3834
|
+
/**
|
3835
|
+
* Creates an enrollment instance with private key material you can use in order to fetch
|
3836
|
+
* a new x509 certificate from the acme server.
|
3837
|
+
* Make sure to call [WireE2eIdentity::free] (not yet available) to dispose this instance and its associated
|
3838
|
+
* keying material.
|
3839
|
+
*
|
3840
|
+
* @param ciphersuite - For generating signing key material. Only {@link Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519} is supported currently
|
3841
|
+
*/
|
3842
|
+
async newAcmeEnrollment() {
|
3843
|
+
const e2ei = await __classPrivateFieldGet(this, _CoreCrypto_cc, "f").new_acme_enrollment(Ciphersuite.MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519);
|
3844
|
+
return new WireE2eIdentity(e2ei, __classPrivateFieldGet(CoreCrypto, _a, "f", _CoreCrypto_module));
|
3845
|
+
}
|
3021
3846
|
/**
|
3022
3847
|
* Returns the current version of {@link CoreCrypto}
|
3023
3848
|
*
|
@@ -3033,5 +3858,197 @@ class CoreCrypto {
|
|
3033
3858
|
_a = CoreCrypto, _CoreCrypto_cc = new WeakMap();
|
3034
3859
|
/** @hidden */
|
3035
3860
|
_CoreCrypto_module = { value: void 0 };
|
3861
|
+
class WireE2eIdentity {
|
3862
|
+
/** @hidden */
|
3863
|
+
constructor(e2ei, module) {
|
3864
|
+
/** @hidden */
|
3865
|
+
_WireE2eIdentity_e2ei.set(this, void 0);
|
3866
|
+
__classPrivateFieldSet(this, _WireE2eIdentity_e2ei, e2ei, "f");
|
3867
|
+
if (!__classPrivateFieldGet(WireE2eIdentity, _b, "f", _WireE2eIdentity_module)) {
|
3868
|
+
__classPrivateFieldSet(WireE2eIdentity, _b, module, "f", _WireE2eIdentity_module);
|
3869
|
+
}
|
3870
|
+
}
|
3871
|
+
/**
|
3872
|
+
* Parses the response from `GET /acme/{provisioner-name}/directory`.
|
3873
|
+
* Use this {@link AcmeDirectory} in the next step to fetch the first nonce from the acme server. Use
|
3874
|
+
* {@link AcmeDirectory.newNonce}.
|
3875
|
+
*
|
3876
|
+
* @param directory HTTP response body
|
3877
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.1.1
|
3878
|
+
*/
|
3879
|
+
directoryResponse(directory) {
|
3880
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").directory_response(directory);
|
3881
|
+
}
|
3882
|
+
/**
|
3883
|
+
* For creating a new acme account. This returns a signed JWS-alike request body to send to
|
3884
|
+
* `POST /acme/{provisioner-name}/new-account`.
|
3885
|
+
*
|
3886
|
+
* @param directory you got from {@link directoryResponse}
|
3887
|
+
* @param previousNonce you got from calling `HEAD {@link AcmeDirectory.newNonce}`
|
3888
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
|
3889
|
+
*/
|
3890
|
+
newAccountRequest(directory, previousNonce) {
|
3891
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_account_request(directory, previousNonce);
|
3892
|
+
}
|
3893
|
+
/**
|
3894
|
+
* Parses the response from `POST /acme/{provisioner-name}/new-account`.
|
3895
|
+
* @param account HTTP response body
|
3896
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3
|
3897
|
+
*/
|
3898
|
+
newAccountResponse(account) {
|
3899
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_account_response(account);
|
3900
|
+
}
|
3901
|
+
/**
|
3902
|
+
* Creates a new acme order for the handle (userId + display name) and the clientId.
|
3903
|
+
*
|
3904
|
+
* @param handle domain of the authorization server e.g. `idp.example.org`
|
3905
|
+
* @param clientId domain of the wire-server e.g. `wire.example.org`
|
3906
|
+
* @param expiryDays generated x509 certificate expiry
|
3907
|
+
* @param directory you got from {@link directoryResponse}
|
3908
|
+
* @param account you got from {@link newAccountResponse}
|
3909
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-account`
|
3910
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
3911
|
+
*/
|
3912
|
+
newOrderRequest(handle, clientId, expiryDays, directory, account, previousNonce) {
|
3913
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_request(handle, clientId, expiryDays, directory, account, previousNonce);
|
3914
|
+
}
|
3915
|
+
/**
|
3916
|
+
* Parses the response from `POST /acme/{provisioner-name}/new-order`.
|
3917
|
+
*
|
3918
|
+
* @param order HTTP response body
|
3919
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
3920
|
+
*/
|
3921
|
+
newOrderResponse(order) {
|
3922
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_order_response(order);
|
3923
|
+
}
|
3924
|
+
/**
|
3925
|
+
* Creates a new authorization request.
|
3926
|
+
*
|
3927
|
+
* @param url one of the URL in new order's authorizations (use {@link NewAcmeOrder.authorizations} from {@link newOrderResponse})
|
3928
|
+
* @param account you got from {@link newAccountResponse}
|
3929
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/new-order` (or from the
|
3930
|
+
* previous to this method if you are creating the second authorization)
|
3931
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
|
3932
|
+
*/
|
3933
|
+
newAuthzRequest(url, account, previousNonce) {
|
3934
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_authz_request(url, account, previousNonce);
|
3935
|
+
}
|
3936
|
+
/**
|
3937
|
+
* Parses the response from `POST /acme/{provisioner-name}/authz/{authz-id}`
|
3938
|
+
*
|
3939
|
+
* You then have to map the challenge from this authorization object. The `client_id_challenge`
|
3940
|
+
* will be the one with the `client_id_host` (you supplied to {@link newOrderRequest}) identifier,
|
3941
|
+
* the other will be your `handle_challenge`.
|
3942
|
+
*
|
3943
|
+
* @param authz HTTP response body
|
3944
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
|
3945
|
+
*/
|
3946
|
+
newAuthzResponse(authz) {
|
3947
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_authz_response(authz);
|
3948
|
+
}
|
3949
|
+
/**
|
3950
|
+
* Generates a new client Dpop JWT token. It demonstrates proof of possession of the nonces
|
3951
|
+
* (from wire-server & acme server) and will be verified by the acme server when verifying the
|
3952
|
+
* challenge (in order to deliver a certificate).
|
3953
|
+
*
|
3954
|
+
* Then send it to `POST /clients/{id}/access-token`
|
3955
|
+
* {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token} on wire-server.
|
3956
|
+
*
|
3957
|
+
* @param accessTokenUrl backend endpoint where this token will be sent. Should be this one {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_clients__cid__access_token}
|
3958
|
+
* @param userId an UUIDv4 uniquely identifying the user
|
3959
|
+
* @param clientId client identifier
|
3960
|
+
* @param domain owning backend domain e.g. `wire.com`
|
3961
|
+
* @param clientIdChallenge you found after {@link newAuthzResponse}
|
3962
|
+
* @param backendNonce you get by calling `GET /clients/token/nonce` on wire-server as defined here {@link https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/get_clients__client__nonce}
|
3963
|
+
* @param expiryDays token expiry in days
|
3964
|
+
*/
|
3965
|
+
createDpopToken(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays) {
|
3966
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").create_dpop_token(accessTokenUrl, userId, clientId, domain, clientIdChallenge, backendNonce, expiryDays);
|
3967
|
+
}
|
3968
|
+
/**
|
3969
|
+
* Creates a new challenge request.
|
3970
|
+
*
|
3971
|
+
* @param handleChallenge you found after {@link newAuthzResponse}
|
3972
|
+
* @param account you found after {@link newAccountResponse}
|
3973
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/authz/{authz-id}`
|
3974
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
|
3975
|
+
*/
|
3976
|
+
newChallengeRequest(handleChallenge, account, previousNonce) {
|
3977
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_request(handleChallenge, account, previousNonce);
|
3978
|
+
}
|
3979
|
+
/**
|
3980
|
+
* Parses the response from `POST /acme/{provisioner-name}/challenge/{challenge-id}`.
|
3981
|
+
*
|
3982
|
+
* @param challenge HTTP response body
|
3983
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
|
3984
|
+
*/
|
3985
|
+
newChallengeResponse(challenge) {
|
3986
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").new_challenge_response(challenge);
|
3987
|
+
}
|
3988
|
+
/**
|
3989
|
+
* Verifies that the previous challenge has been completed.
|
3990
|
+
*
|
3991
|
+
* @param orderUrl `location` header from http response you got from {@link newOrderResponse}
|
3992
|
+
* @param account you found after {@link newAccountResponse}
|
3993
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/challenge/{challenge-id}`
|
3994
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
3995
|
+
*/
|
3996
|
+
checkOrderRequest(orderUrl, account, previousNonce) {
|
3997
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").check_order_request(orderUrl, account, previousNonce);
|
3998
|
+
}
|
3999
|
+
/**
|
4000
|
+
* Parses the response from `POST /acme/{provisioner-name}/order/{order-id}`.
|
4001
|
+
*
|
4002
|
+
* @param order HTTP response body
|
4003
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
4004
|
+
*/
|
4005
|
+
checkOrderResponse(order) {
|
4006
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").check_order_response(order);
|
4007
|
+
}
|
4008
|
+
/**
|
4009
|
+
* Final step before fetching the certificate.
|
4010
|
+
*
|
4011
|
+
* @param domains you want to generate a certificate for e.g. `["wire.com"]`
|
4012
|
+
* @param order you got from {@link checkOrderResponse}
|
4013
|
+
* @param account you found after {@link newAccountResponse}
|
4014
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}`
|
4015
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
4016
|
+
*/
|
4017
|
+
finalizeRequest(domains, order, account, previousNonce) {
|
4018
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_request(domains, order, account, previousNonce);
|
4019
|
+
}
|
4020
|
+
/**
|
4021
|
+
* Parses the response from `POST /acme/{provisioner-name}/order/{order-id}/finalize`.
|
4022
|
+
*
|
4023
|
+
* @param finalize HTTP response body
|
4024
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
4025
|
+
*/
|
4026
|
+
finalizeResponse(finalize) {
|
4027
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").finalize_response(finalize);
|
4028
|
+
}
|
4029
|
+
/**
|
4030
|
+
* Creates a request for finally fetching the x509 certificate.
|
4031
|
+
*
|
4032
|
+
* @param finalize you got from {@link finalizeResponse}
|
4033
|
+
* @param account you got from {@link newAccountResponse}
|
4034
|
+
* @param previousNonce `replay-nonce` response header from `POST /acme/{provisioner-name}/order/{order-id}/finalize`
|
4035
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
|
4036
|
+
*/
|
4037
|
+
certificateRequest(finalize, account, previousNonce) {
|
4038
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").certificate_request(finalize, account, previousNonce);
|
4039
|
+
}
|
4040
|
+
/**
|
4041
|
+
* Parses the response from `POST /acme/{provisioner-name}/certificate/{certificate-id}`.
|
4042
|
+
*
|
4043
|
+
* @param certificateChain HTTP string response body
|
4044
|
+
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4.2
|
4045
|
+
*/
|
4046
|
+
certificateResponse(certificateChain) {
|
4047
|
+
return __classPrivateFieldGet(this, _WireE2eIdentity_e2ei, "f").certificate_response(certificateChain);
|
4048
|
+
}
|
4049
|
+
}
|
4050
|
+
_b = WireE2eIdentity, _WireE2eIdentity_e2ei = new WeakMap();
|
4051
|
+
/** @hidden */
|
4052
|
+
_WireE2eIdentity_module = { value: void 0 };
|
3036
4053
|
|
3037
|
-
export { Ciphersuite, CoreCrypto, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WirePolicy };
|
4054
|
+
export { Ciphersuite, CoreCrypto, ExternalProposalType, ProposalType, PublicGroupStateEncryptionType, RatchetTreeType, WireE2eIdentity, WirePolicy };
|