@bitwarden/sdk-internal 0.2.0-main.95 → 0.2.0-main.97
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/VERSION +1 -1
- package/bitwarden_wasm_internal.js +1 -0
- package/bitwarden_wasm_internal_bg.js +243 -390
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +39 -37
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.js +245 -390
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +39 -37
- package/package.json +1 -1
@@ -3,14 +3,6 @@ imports["__wbindgen_placeholder__"] = module.exports;
|
|
3
3
|
let wasm;
|
4
4
|
const { TextEncoder, TextDecoder } = require(`util`);
|
5
5
|
|
6
|
-
const heap = new Array(128).fill(undefined);
|
7
|
-
|
8
|
-
heap.push(undefined, null, true, false);
|
9
|
-
|
10
|
-
function getObject(idx) {
|
11
|
-
return heap[idx];
|
12
|
-
}
|
13
|
-
|
14
6
|
let WASM_VECTOR_LEN = 0;
|
15
7
|
|
16
8
|
let cachedUint8ArrayMemory0 = null;
|
@@ -101,14 +93,9 @@ function getStringFromWasm0(ptr, len) {
|
|
101
93
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
102
94
|
}
|
103
95
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
108
|
-
const idx = heap_next;
|
109
|
-
heap_next = heap[idx];
|
110
|
-
|
111
|
-
heap[idx] = obj;
|
96
|
+
function addToExternrefTable0(obj) {
|
97
|
+
const idx = wasm.__externref_table_alloc();
|
98
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
112
99
|
return idx;
|
113
100
|
}
|
114
101
|
|
@@ -116,22 +103,11 @@ function handleError(f, args) {
|
|
116
103
|
try {
|
117
104
|
return f.apply(this, args);
|
118
105
|
} catch (e) {
|
119
|
-
|
106
|
+
const idx = addToExternrefTable0(e);
|
107
|
+
wasm.__wbindgen_exn_store(idx);
|
120
108
|
}
|
121
109
|
}
|
122
110
|
|
123
|
-
function dropObject(idx) {
|
124
|
-
if (idx < 132) return;
|
125
|
-
heap[idx] = heap_next;
|
126
|
-
heap_next = idx;
|
127
|
-
}
|
128
|
-
|
129
|
-
function takeObject(idx) {
|
130
|
-
const ret = getObject(idx);
|
131
|
-
dropObject(idx);
|
132
|
-
return ret;
|
133
|
-
}
|
134
|
-
|
135
111
|
function isLikeNone(x) {
|
136
112
|
return x === undefined || x === null;
|
137
113
|
}
|
@@ -140,7 +116,7 @@ const CLOSURE_DTORS =
|
|
140
116
|
typeof FinalizationRegistry === "undefined"
|
141
117
|
? { register: () => {}, unregister: () => {} }
|
142
118
|
: new FinalizationRegistry((state) => {
|
143
|
-
wasm.
|
119
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
144
120
|
});
|
145
121
|
|
146
122
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
@@ -156,7 +132,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
156
132
|
return f(a, state.b, ...args);
|
157
133
|
} finally {
|
158
134
|
if (--state.cnt === 0) {
|
159
|
-
wasm.
|
135
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
160
136
|
CLOSURE_DTORS.unregister(state);
|
161
137
|
} else {
|
162
138
|
state.a = a;
|
@@ -232,25 +208,13 @@ function debugString(val) {
|
|
232
208
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
233
209
|
return className;
|
234
210
|
}
|
235
|
-
|
236
|
-
let stack_pointer = 128;
|
237
|
-
|
238
|
-
function addBorrowedObject(obj) {
|
239
|
-
if (stack_pointer == 1) throw new Error("out of js stack");
|
240
|
-
heap[--stack_pointer] = obj;
|
241
|
-
return stack_pointer;
|
242
|
-
}
|
243
211
|
/**
|
244
212
|
* @param {any} error
|
245
213
|
* @returns {boolean}
|
246
214
|
*/
|
247
215
|
module.exports.isEncryptionSettingsError = function (error) {
|
248
|
-
|
249
|
-
|
250
|
-
return ret !== 0;
|
251
|
-
} finally {
|
252
|
-
heap[stack_pointer++] = undefined;
|
253
|
-
}
|
216
|
+
const ret = wasm.isEncryptionSettingsError(error);
|
217
|
+
return ret !== 0;
|
254
218
|
};
|
255
219
|
|
256
220
|
/**
|
@@ -258,12 +222,8 @@ module.exports.isEncryptionSettingsError = function (error) {
|
|
258
222
|
* @returns {boolean}
|
259
223
|
*/
|
260
224
|
module.exports.isCryptoError = function (error) {
|
261
|
-
|
262
|
-
|
263
|
-
return ret !== 0;
|
264
|
-
} finally {
|
265
|
-
heap[stack_pointer++] = undefined;
|
266
|
-
}
|
225
|
+
const ret = wasm.isCryptoError(error);
|
226
|
+
return ret !== 0;
|
267
227
|
};
|
268
228
|
|
269
229
|
/**
|
@@ -271,12 +231,8 @@ module.exports.isCryptoError = function (error) {
|
|
271
231
|
* @returns {boolean}
|
272
232
|
*/
|
273
233
|
module.exports.isSshKeyExportError = function (error) {
|
274
|
-
|
275
|
-
|
276
|
-
return ret !== 0;
|
277
|
-
} finally {
|
278
|
-
heap[stack_pointer++] = undefined;
|
279
|
-
}
|
234
|
+
const ret = wasm.isSshKeyExportError(error);
|
235
|
+
return ret !== 0;
|
280
236
|
};
|
281
237
|
|
282
238
|
/**
|
@@ -284,12 +240,8 @@ module.exports.isSshKeyExportError = function (error) {
|
|
284
240
|
* @returns {boolean}
|
285
241
|
*/
|
286
242
|
module.exports.isSshKeyImportError = function (error) {
|
287
|
-
|
288
|
-
|
289
|
-
return ret !== 0;
|
290
|
-
} finally {
|
291
|
-
heap[stack_pointer++] = undefined;
|
292
|
-
}
|
243
|
+
const ret = wasm.isSshKeyImportError(error);
|
244
|
+
return ret !== 0;
|
293
245
|
};
|
294
246
|
|
295
247
|
/**
|
@@ -297,12 +249,8 @@ module.exports.isSshKeyImportError = function (error) {
|
|
297
249
|
* @returns {boolean}
|
298
250
|
*/
|
299
251
|
module.exports.isKeyGenerationError = function (error) {
|
300
|
-
|
301
|
-
|
302
|
-
return ret !== 0;
|
303
|
-
} finally {
|
304
|
-
heap[stack_pointer++] = undefined;
|
305
|
-
}
|
252
|
+
const ret = wasm.isKeyGenerationError(error);
|
253
|
+
return ret !== 0;
|
306
254
|
};
|
307
255
|
|
308
256
|
/**
|
@@ -310,12 +258,8 @@ module.exports.isKeyGenerationError = function (error) {
|
|
310
258
|
* @returns {boolean}
|
311
259
|
*/
|
312
260
|
module.exports.isDecryptFileError = function (error) {
|
313
|
-
|
314
|
-
|
315
|
-
return ret !== 0;
|
316
|
-
} finally {
|
317
|
-
heap[stack_pointer++] = undefined;
|
318
|
-
}
|
261
|
+
const ret = wasm.isDecryptFileError(error);
|
262
|
+
return ret !== 0;
|
319
263
|
};
|
320
264
|
|
321
265
|
/**
|
@@ -323,12 +267,8 @@ module.exports.isDecryptFileError = function (error) {
|
|
323
267
|
* @returns {boolean}
|
324
268
|
*/
|
325
269
|
module.exports.isEncryptFileError = function (error) {
|
326
|
-
|
327
|
-
|
328
|
-
return ret !== 0;
|
329
|
-
} finally {
|
330
|
-
heap[stack_pointer++] = undefined;
|
331
|
-
}
|
270
|
+
const ret = wasm.isEncryptFileError(error);
|
271
|
+
return ret !== 0;
|
332
272
|
};
|
333
273
|
|
334
274
|
/**
|
@@ -336,12 +276,8 @@ module.exports.isEncryptFileError = function (error) {
|
|
336
276
|
* @returns {boolean}
|
337
277
|
*/
|
338
278
|
module.exports.isDecryptError = function (error) {
|
339
|
-
|
340
|
-
|
341
|
-
return ret !== 0;
|
342
|
-
} finally {
|
343
|
-
heap[stack_pointer++] = undefined;
|
344
|
-
}
|
279
|
+
const ret = wasm.isDecryptError(error);
|
280
|
+
return ret !== 0;
|
345
281
|
};
|
346
282
|
|
347
283
|
/**
|
@@ -349,12 +285,8 @@ module.exports.isDecryptError = function (error) {
|
|
349
285
|
* @returns {boolean}
|
350
286
|
*/
|
351
287
|
module.exports.isEncryptError = function (error) {
|
352
|
-
|
353
|
-
|
354
|
-
return ret !== 0;
|
355
|
-
} finally {
|
356
|
-
heap[stack_pointer++] = undefined;
|
357
|
-
}
|
288
|
+
const ret = wasm.isEncryptError(error);
|
289
|
+
return ret !== 0;
|
358
290
|
};
|
359
291
|
|
360
292
|
/**
|
@@ -362,14 +294,15 @@ module.exports.isEncryptError = function (error) {
|
|
362
294
|
* @returns {boolean}
|
363
295
|
*/
|
364
296
|
module.exports.isTotpError = function (error) {
|
365
|
-
|
366
|
-
|
367
|
-
return ret !== 0;
|
368
|
-
} finally {
|
369
|
-
heap[stack_pointer++] = undefined;
|
370
|
-
}
|
297
|
+
const ret = wasm.isTotpError(error);
|
298
|
+
return ret !== 0;
|
371
299
|
};
|
372
300
|
|
301
|
+
function takeFromExternrefTable0(idx) {
|
302
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
303
|
+
wasm.__externref_table_dealloc(idx);
|
304
|
+
return value;
|
305
|
+
}
|
373
306
|
/**
|
374
307
|
* Generate a new SSH key pair
|
375
308
|
*
|
@@ -383,19 +316,11 @@ module.exports.isTotpError = function (error) {
|
|
383
316
|
* @returns {SshKey}
|
384
317
|
*/
|
385
318
|
module.exports.generate_ssh_key = function (key_algorithm) {
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
390
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
391
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
392
|
-
if (r2) {
|
393
|
-
throw takeObject(r1);
|
394
|
-
}
|
395
|
-
return takeObject(r0);
|
396
|
-
} finally {
|
397
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
319
|
+
const ret = wasm.generate_ssh_key(key_algorithm);
|
320
|
+
if (ret[2]) {
|
321
|
+
throw takeFromExternrefTable0(ret[1]);
|
398
322
|
}
|
323
|
+
return takeFromExternrefTable0(ret[0]);
|
399
324
|
};
|
400
325
|
|
401
326
|
/**
|
@@ -417,25 +342,17 @@ module.exports.generate_ssh_key = function (key_algorithm) {
|
|
417
342
|
* @returns {SshKey}
|
418
343
|
*/
|
419
344
|
module.exports.import_ssh_key = function (imported_key, password) {
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
430
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
431
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
432
|
-
if (r2) {
|
433
|
-
throw takeObject(r1);
|
434
|
-
}
|
435
|
-
return takeObject(r0);
|
436
|
-
} finally {
|
437
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
345
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
346
|
+
const len0 = WASM_VECTOR_LEN;
|
347
|
+
var ptr1 = isLikeNone(password)
|
348
|
+
? 0
|
349
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
350
|
+
var len1 = WASM_VECTOR_LEN;
|
351
|
+
const ret = wasm.import_ssh_key(ptr0, len0, ptr1, len1);
|
352
|
+
if (ret[2]) {
|
353
|
+
throw takeFromExternrefTable0(ret[1]);
|
438
354
|
}
|
355
|
+
return takeFromExternrefTable0(ret[0]);
|
439
356
|
};
|
440
357
|
|
441
358
|
/**
|
@@ -443,29 +360,16 @@ module.exports.import_ssh_key = function (imported_key, password) {
|
|
443
360
|
* @returns {boolean}
|
444
361
|
*/
|
445
362
|
module.exports.isTestError = function (error) {
|
446
|
-
|
447
|
-
|
448
|
-
return ret !== 0;
|
449
|
-
} finally {
|
450
|
-
heap[stack_pointer++] = undefined;
|
451
|
-
}
|
363
|
+
const ret = wasm.isTestError(error);
|
364
|
+
return ret !== 0;
|
452
365
|
};
|
453
366
|
|
454
|
-
function
|
455
|
-
wasm.
|
456
|
-
arg0,
|
457
|
-
arg1,
|
458
|
-
addHeapObject(arg2),
|
459
|
-
);
|
367
|
+
function __wbg_adapter_42(arg0, arg1, arg2) {
|
368
|
+
wasm.closure605_externref_shim(arg0, arg1, arg2);
|
460
369
|
}
|
461
370
|
|
462
|
-
function
|
463
|
-
wasm.
|
464
|
-
arg0,
|
465
|
-
arg1,
|
466
|
-
addHeapObject(arg2),
|
467
|
-
addHeapObject(arg3),
|
468
|
-
);
|
371
|
+
function __wbg_adapter_145(arg0, arg1, arg2, arg3) {
|
372
|
+
wasm.closure453_externref_shim(arg0, arg1, arg2, arg3);
|
469
373
|
}
|
470
374
|
|
471
375
|
/**
|
@@ -511,7 +415,7 @@ class BitwardenClient {
|
|
511
415
|
*/
|
512
416
|
constructor(settings, log_level) {
|
513
417
|
const ret = wasm.bitwardenclient_new(
|
514
|
-
isLikeNone(settings) ? 0 :
|
418
|
+
isLikeNone(settings) ? 0 : addToExternrefTable0(settings),
|
515
419
|
isLikeNone(log_level) ? 5 : log_level,
|
516
420
|
);
|
517
421
|
this.__wbg_ptr = ret >>> 0;
|
@@ -527,17 +431,13 @@ class BitwardenClient {
|
|
527
431
|
let deferred2_0;
|
528
432
|
let deferred2_1;
|
529
433
|
try {
|
530
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
531
434
|
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
532
435
|
const len0 = WASM_VECTOR_LEN;
|
533
|
-
wasm.bitwardenclient_echo(
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
deferred2_1 = r1;
|
538
|
-
return getStringFromWasm0(r0, r1);
|
436
|
+
const ret = wasm.bitwardenclient_echo(this.__wbg_ptr, ptr0, len0);
|
437
|
+
deferred2_0 = ret[0];
|
438
|
+
deferred2_1 = ret[1];
|
439
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
539
440
|
} finally {
|
540
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
541
441
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
542
442
|
}
|
543
443
|
}
|
@@ -548,15 +448,11 @@ class BitwardenClient {
|
|
548
448
|
let deferred1_0;
|
549
449
|
let deferred1_1;
|
550
450
|
try {
|
551
|
-
const
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
deferred1_0 = r0;
|
556
|
-
deferred1_1 = r1;
|
557
|
-
return getStringFromWasm0(r0, r1);
|
451
|
+
const ret = wasm.bitwardenclient_version(this.__wbg_ptr);
|
452
|
+
deferred1_0 = ret[0];
|
453
|
+
deferred1_1 = ret[1];
|
454
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
558
455
|
} finally {
|
559
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
560
456
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
561
457
|
}
|
562
458
|
}
|
@@ -564,18 +460,11 @@ class BitwardenClient {
|
|
564
460
|
* @param {string} msg
|
565
461
|
*/
|
566
462
|
throw(msg) {
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
573
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
574
|
-
if (r1) {
|
575
|
-
throw takeObject(r0);
|
576
|
-
}
|
577
|
-
} finally {
|
578
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
463
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
464
|
+
const len0 = WASM_VECTOR_LEN;
|
465
|
+
const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
|
466
|
+
if (ret[1]) {
|
467
|
+
throw takeFromExternrefTable0(ret[0]);
|
579
468
|
}
|
580
469
|
}
|
581
470
|
/**
|
@@ -587,7 +476,7 @@ class BitwardenClient {
|
|
587
476
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
588
477
|
const len0 = WASM_VECTOR_LEN;
|
589
478
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
590
|
-
return
|
479
|
+
return ret;
|
591
480
|
}
|
592
481
|
/**
|
593
482
|
* @returns {CryptoClient}
|
@@ -637,19 +526,11 @@ class ClientFolders {
|
|
637
526
|
* @returns {FolderView}
|
638
527
|
*/
|
639
528
|
decrypt(folder) {
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
644
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
645
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
646
|
-
if (r2) {
|
647
|
-
throw takeObject(r1);
|
648
|
-
}
|
649
|
-
return takeObject(r0);
|
650
|
-
} finally {
|
651
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
529
|
+
const ret = wasm.clientfolders_decrypt(this.__wbg_ptr, folder);
|
530
|
+
if (ret[2]) {
|
531
|
+
throw takeFromExternrefTable0(ret[1]);
|
652
532
|
}
|
533
|
+
return takeFromExternrefTable0(ret[0]);
|
653
534
|
}
|
654
535
|
}
|
655
536
|
module.exports.ClientFolders = ClientFolders;
|
@@ -697,28 +578,19 @@ class ClientTotp {
|
|
697
578
|
* @returns {TotpResponse}
|
698
579
|
*/
|
699
580
|
generate_totp(key, time_ms) {
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
);
|
712
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
713
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
714
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
715
|
-
if (r2) {
|
716
|
-
throw takeObject(r1);
|
717
|
-
}
|
718
|
-
return takeObject(r0);
|
719
|
-
} finally {
|
720
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
581
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
582
|
+
const len0 = WASM_VECTOR_LEN;
|
583
|
+
const ret = wasm.clienttotp_generate_totp(
|
584
|
+
this.__wbg_ptr,
|
585
|
+
ptr0,
|
586
|
+
len0,
|
587
|
+
!isLikeNone(time_ms),
|
588
|
+
isLikeNone(time_ms) ? 0 : time_ms,
|
589
|
+
);
|
590
|
+
if (ret[2]) {
|
591
|
+
throw takeFromExternrefTable0(ret[1]);
|
721
592
|
}
|
593
|
+
return takeFromExternrefTable0(ret[0]);
|
722
594
|
}
|
723
595
|
}
|
724
596
|
module.exports.ClientTotp = ClientTotp;
|
@@ -755,8 +627,8 @@ class CryptoClient {
|
|
755
627
|
* @returns {Promise<void>}
|
756
628
|
*/
|
757
629
|
initialize_user_crypto(req) {
|
758
|
-
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr,
|
759
|
-
return
|
630
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, req);
|
631
|
+
return ret;
|
760
632
|
}
|
761
633
|
/**
|
762
634
|
* Initialization method for the organization crypto. Needs to be called after
|
@@ -765,8 +637,8 @@ class CryptoClient {
|
|
765
637
|
* @returns {Promise<void>}
|
766
638
|
*/
|
767
639
|
initialize_org_crypto(req) {
|
768
|
-
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr,
|
769
|
-
return
|
640
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, req);
|
641
|
+
return ret;
|
770
642
|
}
|
771
643
|
/**
|
772
644
|
* Generates a new key pair and encrypts the private key with the provided user key.
|
@@ -775,21 +647,13 @@ class CryptoClient {
|
|
775
647
|
* @returns {MakeKeyPairResponse}
|
776
648
|
*/
|
777
649
|
make_key_pair(user_key) {
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
784
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
785
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
786
|
-
if (r2) {
|
787
|
-
throw takeObject(r1);
|
788
|
-
}
|
789
|
-
return takeObject(r0);
|
790
|
-
} finally {
|
791
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
650
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
651
|
+
const len0 = WASM_VECTOR_LEN;
|
652
|
+
const ret = wasm.cryptoclient_make_key_pair(this.__wbg_ptr, ptr0, len0);
|
653
|
+
if (ret[2]) {
|
654
|
+
throw takeFromExternrefTable0(ret[1]);
|
792
655
|
}
|
656
|
+
return takeFromExternrefTable0(ret[0]);
|
793
657
|
}
|
794
658
|
/**
|
795
659
|
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
@@ -799,19 +663,11 @@ class CryptoClient {
|
|
799
663
|
* @returns {VerifyAsymmetricKeysResponse}
|
800
664
|
*/
|
801
665
|
verify_asymmetric_keys(request) {
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
806
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
807
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
808
|
-
if (r2) {
|
809
|
-
throw takeObject(r1);
|
810
|
-
}
|
811
|
-
return takeObject(r0);
|
812
|
-
} finally {
|
813
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
666
|
+
const ret = wasm.cryptoclient_verify_asymmetric_keys(this.__wbg_ptr, request);
|
667
|
+
if (ret[2]) {
|
668
|
+
throw takeFromExternrefTable0(ret[1]);
|
814
669
|
}
|
670
|
+
return takeFromExternrefTable0(ret[0]);
|
815
671
|
}
|
816
672
|
}
|
817
673
|
module.exports.CryptoClient = CryptoClient;
|
@@ -859,7 +715,7 @@ class VaultClient {
|
|
859
715
|
module.exports.VaultClient = VaultClient;
|
860
716
|
|
861
717
|
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
|
862
|
-
const ret = String(
|
718
|
+
const ret = String(arg1);
|
863
719
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
864
720
|
const len1 = WASM_VECTOR_LEN;
|
865
721
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
@@ -867,73 +723,69 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
|
|
867
723
|
};
|
868
724
|
|
869
725
|
module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
|
870
|
-
|
726
|
+
arg0.abort();
|
871
727
|
};
|
872
728
|
|
873
729
|
module.exports.__wbg_append_299d5d48292c0495 = function () {
|
874
730
|
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
875
|
-
|
731
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
876
732
|
}, arguments);
|
877
733
|
};
|
878
734
|
|
879
735
|
module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
|
880
736
|
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
881
|
-
|
737
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
882
738
|
}, arguments);
|
883
739
|
};
|
884
740
|
|
885
741
|
module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
|
886
742
|
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
887
|
-
|
888
|
-
getStringFromWasm0(arg1, arg2),
|
889
|
-
getObject(arg3),
|
890
|
-
getStringFromWasm0(arg4, arg5),
|
891
|
-
);
|
743
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
|
892
744
|
}, arguments);
|
893
745
|
};
|
894
746
|
|
895
747
|
module.exports.__wbg_append_b44785ebeb668479 = function () {
|
896
748
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
897
|
-
|
749
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3);
|
898
750
|
}, arguments);
|
899
751
|
};
|
900
752
|
|
901
753
|
module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
|
902
|
-
const ret =
|
903
|
-
return
|
754
|
+
const ret = arg0.buffer;
|
755
|
+
return ret;
|
904
756
|
};
|
905
757
|
|
906
758
|
module.exports.__wbg_call_672a4d21634d4a24 = function () {
|
907
759
|
return handleError(function (arg0, arg1) {
|
908
|
-
const ret =
|
909
|
-
return
|
760
|
+
const ret = arg0.call(arg1);
|
761
|
+
return ret;
|
910
762
|
}, arguments);
|
911
763
|
};
|
912
764
|
|
913
765
|
module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
914
766
|
return handleError(function (arg0, arg1, arg2) {
|
915
|
-
const ret =
|
916
|
-
return
|
767
|
+
const ret = arg0.call(arg1, arg2);
|
768
|
+
return ret;
|
917
769
|
}, arguments);
|
918
770
|
};
|
919
771
|
|
920
772
|
module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
|
921
|
-
const ret =
|
922
|
-
return
|
773
|
+
const ret = arg0.crypto;
|
774
|
+
return ret;
|
923
775
|
};
|
924
776
|
|
925
777
|
module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
|
926
|
-
console.debug(
|
778
|
+
console.debug(arg0, arg1, arg2, arg3);
|
927
779
|
};
|
928
780
|
|
929
781
|
module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
|
930
|
-
const ret =
|
782
|
+
const ret = arg0.done;
|
931
783
|
return ret;
|
932
784
|
};
|
933
785
|
|
934
786
|
module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
|
935
|
-
const ret = Object.entries(
|
936
|
-
return
|
787
|
+
const ret = Object.entries(arg0);
|
788
|
+
return ret;
|
937
789
|
};
|
938
790
|
|
939
791
|
module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
|
@@ -949,67 +801,67 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
|
|
949
801
|
};
|
950
802
|
|
951
803
|
module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
|
952
|
-
console.error(
|
804
|
+
console.error(arg0, arg1, arg2, arg3);
|
953
805
|
};
|
954
806
|
|
955
807
|
module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
|
956
|
-
const ret = fetch(
|
957
|
-
return
|
808
|
+
const ret = fetch(arg0);
|
809
|
+
return ret;
|
958
810
|
};
|
959
811
|
|
960
812
|
module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
961
|
-
const ret =
|
962
|
-
return
|
813
|
+
const ret = arg0.fetch(arg1);
|
814
|
+
return ret;
|
963
815
|
};
|
964
816
|
|
965
817
|
module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
|
966
818
|
return handleError(function (arg0, arg1) {
|
967
|
-
|
819
|
+
arg0.getRandomValues(arg1);
|
968
820
|
}, arguments);
|
969
821
|
};
|
970
822
|
|
971
823
|
module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
972
|
-
const ret =
|
824
|
+
const ret = arg0.getTime();
|
973
825
|
return ret;
|
974
826
|
};
|
975
827
|
|
976
828
|
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
977
829
|
return handleError(function (arg0, arg1) {
|
978
|
-
const ret = Reflect.get(
|
979
|
-
return
|
830
|
+
const ret = Reflect.get(arg0, arg1);
|
831
|
+
return ret;
|
980
832
|
}, arguments);
|
981
833
|
};
|
982
834
|
|
983
835
|
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
984
|
-
const ret =
|
985
|
-
return
|
836
|
+
const ret = arg0[arg1 >>> 0];
|
837
|
+
return ret;
|
986
838
|
};
|
987
839
|
|
988
840
|
module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
|
989
|
-
const ret =
|
990
|
-
return
|
841
|
+
const ret = arg0[arg1];
|
842
|
+
return ret;
|
991
843
|
};
|
992
844
|
|
993
845
|
module.exports.__wbg_has_a5ea9117f258a0ec = function () {
|
994
846
|
return handleError(function (arg0, arg1) {
|
995
|
-
const ret = Reflect.has(
|
847
|
+
const ret = Reflect.has(arg0, arg1);
|
996
848
|
return ret;
|
997
849
|
}, arguments);
|
998
850
|
};
|
999
851
|
|
1000
852
|
module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
|
1001
|
-
const ret =
|
1002
|
-
return
|
853
|
+
const ret = arg0.headers;
|
854
|
+
return ret;
|
1003
855
|
};
|
1004
856
|
|
1005
857
|
module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
|
1006
|
-
console.info(
|
858
|
+
console.info(arg0, arg1, arg2, arg3);
|
1007
859
|
};
|
1008
860
|
|
1009
861
|
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
|
1010
862
|
let result;
|
1011
863
|
try {
|
1012
|
-
result =
|
864
|
+
result = arg0 instanceof ArrayBuffer;
|
1013
865
|
} catch (_) {
|
1014
866
|
result = false;
|
1015
867
|
}
|
@@ -1020,7 +872,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
|
|
1020
872
|
module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
|
1021
873
|
let result;
|
1022
874
|
try {
|
1023
|
-
result =
|
875
|
+
result = arg0 instanceof Response;
|
1024
876
|
} catch (_) {
|
1025
877
|
result = false;
|
1026
878
|
}
|
@@ -1031,7 +883,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
|
|
1031
883
|
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
|
1032
884
|
let result;
|
1033
885
|
try {
|
1034
|
-
result =
|
886
|
+
result = arg0 instanceof Uint8Array;
|
1035
887
|
} catch (_) {
|
1036
888
|
result = false;
|
1037
889
|
}
|
@@ -1040,43 +892,43 @@ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
|
|
1040
892
|
};
|
1041
893
|
|
1042
894
|
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
|
1043
|
-
const ret = Number.isSafeInteger(
|
895
|
+
const ret = Number.isSafeInteger(arg0);
|
1044
896
|
return ret;
|
1045
897
|
};
|
1046
898
|
|
1047
899
|
module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
|
1048
900
|
const ret = Symbol.iterator;
|
1049
|
-
return
|
901
|
+
return ret;
|
1050
902
|
};
|
1051
903
|
|
1052
904
|
module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
|
1053
|
-
const ret =
|
905
|
+
const ret = arg0.length;
|
1054
906
|
return ret;
|
1055
907
|
};
|
1056
908
|
|
1057
909
|
module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
1058
|
-
const ret =
|
910
|
+
const ret = arg0.length;
|
1059
911
|
return ret;
|
1060
912
|
};
|
1061
913
|
|
1062
914
|
module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
|
1063
|
-
console.log(
|
915
|
+
console.log(arg0, arg1, arg2, arg3);
|
1064
916
|
};
|
1065
917
|
|
1066
918
|
module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
|
1067
|
-
const ret =
|
1068
|
-
return
|
919
|
+
const ret = arg0.msCrypto;
|
920
|
+
return ret;
|
1069
921
|
};
|
1070
922
|
|
1071
923
|
module.exports.__wbg_new0_f788a2397c7ca929 = function () {
|
1072
924
|
const ret = new Date();
|
1073
|
-
return
|
925
|
+
return ret;
|
1074
926
|
};
|
1075
927
|
|
1076
928
|
module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
|
1077
929
|
return handleError(function () {
|
1078
930
|
const ret = new Headers();
|
1079
|
-
return
|
931
|
+
return ret;
|
1080
932
|
}, arguments);
|
1081
933
|
};
|
1082
934
|
|
@@ -1087,13 +939,13 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
1087
939
|
const a = state0.a;
|
1088
940
|
state0.a = 0;
|
1089
941
|
try {
|
1090
|
-
return
|
942
|
+
return __wbg_adapter_145(a, state0.b, arg0, arg1);
|
1091
943
|
} finally {
|
1092
944
|
state0.a = a;
|
1093
945
|
}
|
1094
946
|
};
|
1095
947
|
const ret = new Promise(cb0);
|
1096
|
-
return
|
948
|
+
return ret;
|
1097
949
|
} finally {
|
1098
950
|
state0.a = state0.b = 0;
|
1099
951
|
}
|
@@ -1101,40 +953,40 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
1101
953
|
|
1102
954
|
module.exports.__wbg_new_405e22f390576ce2 = function () {
|
1103
955
|
const ret = new Object();
|
1104
|
-
return
|
956
|
+
return ret;
|
1105
957
|
};
|
1106
958
|
|
1107
959
|
module.exports.__wbg_new_78feb108b6472713 = function () {
|
1108
960
|
const ret = new Array();
|
1109
|
-
return
|
961
|
+
return ret;
|
1110
962
|
};
|
1111
963
|
|
1112
964
|
module.exports.__wbg_new_8a6f238a6ece86ea = function () {
|
1113
965
|
const ret = new Error();
|
1114
|
-
return
|
966
|
+
return ret;
|
1115
967
|
};
|
1116
968
|
|
1117
969
|
module.exports.__wbg_new_9fd39a253424609a = function () {
|
1118
970
|
return handleError(function () {
|
1119
971
|
const ret = new FormData();
|
1120
|
-
return
|
972
|
+
return ret;
|
1121
973
|
}, arguments);
|
1122
974
|
};
|
1123
975
|
|
1124
976
|
module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
|
1125
|
-
const ret = new Uint8Array(
|
1126
|
-
return
|
977
|
+
const ret = new Uint8Array(arg0);
|
978
|
+
return ret;
|
1127
979
|
};
|
1128
980
|
|
1129
981
|
module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
|
1130
982
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1131
|
-
return
|
983
|
+
return ret;
|
1132
984
|
};
|
1133
985
|
|
1134
986
|
module.exports.__wbg_new_e25e5aab09ff45db = function () {
|
1135
987
|
return handleError(function () {
|
1136
988
|
const ret = new AbortController();
|
1137
|
-
return
|
989
|
+
return ret;
|
1138
990
|
}, arguments);
|
1139
991
|
};
|
1140
992
|
|
@@ -1145,7 +997,7 @@ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
|
|
1145
997
|
deferred0_0 = arg0;
|
1146
998
|
deferred0_1 = arg1;
|
1147
999
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1148
|
-
return
|
1000
|
+
return ret;
|
1149
1001
|
} finally {
|
1150
1002
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
1151
1003
|
}
|
@@ -1153,113 +1005,113 @@ module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
|
|
1153
1005
|
|
1154
1006
|
module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
|
1155
1007
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
1156
|
-
return
|
1008
|
+
return ret;
|
1157
1009
|
};
|
1158
1010
|
|
1159
1011
|
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
|
1160
|
-
const ret = new Uint8Array(
|
1161
|
-
return
|
1012
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
1013
|
+
return ret;
|
1162
1014
|
};
|
1163
1015
|
|
1164
1016
|
module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
|
1165
1017
|
const ret = new Uint8Array(arg0 >>> 0);
|
1166
|
-
return
|
1018
|
+
return ret;
|
1167
1019
|
};
|
1168
1020
|
|
1169
1021
|
module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
|
1170
1022
|
return handleError(function (arg0, arg1, arg2) {
|
1171
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1),
|
1172
|
-
return
|
1023
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
1024
|
+
return ret;
|
1173
1025
|
}, arguments);
|
1174
1026
|
};
|
1175
1027
|
|
1176
1028
|
module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
|
1177
1029
|
return handleError(function (arg0, arg1) {
|
1178
|
-
const ret = new Blob(
|
1179
|
-
return
|
1030
|
+
const ret = new Blob(arg0, arg1);
|
1031
|
+
return ret;
|
1180
1032
|
}, arguments);
|
1181
1033
|
};
|
1182
1034
|
|
1183
1035
|
module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
|
1184
|
-
const ret =
|
1185
|
-
return
|
1036
|
+
const ret = arg0.next;
|
1037
|
+
return ret;
|
1186
1038
|
};
|
1187
1039
|
|
1188
1040
|
module.exports.__wbg_next_6574e1a8a62d1055 = function () {
|
1189
1041
|
return handleError(function (arg0) {
|
1190
|
-
const ret =
|
1191
|
-
return
|
1042
|
+
const ret = arg0.next();
|
1043
|
+
return ret;
|
1192
1044
|
}, arguments);
|
1193
1045
|
};
|
1194
1046
|
|
1195
1047
|
module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
1196
|
-
const ret =
|
1197
|
-
return
|
1048
|
+
const ret = arg0.node;
|
1049
|
+
return ret;
|
1198
1050
|
};
|
1199
1051
|
|
1200
1052
|
module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
1201
|
-
const ret =
|
1202
|
-
return
|
1053
|
+
const ret = arg0.process;
|
1054
|
+
return ret;
|
1203
1055
|
};
|
1204
1056
|
|
1205
1057
|
module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
|
1206
|
-
const ret =
|
1058
|
+
const ret = arg0.push(arg1);
|
1207
1059
|
return ret;
|
1208
1060
|
};
|
1209
1061
|
|
1210
1062
|
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
|
1211
|
-
queueMicrotask(
|
1063
|
+
queueMicrotask(arg0);
|
1212
1064
|
};
|
1213
1065
|
|
1214
1066
|
module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
|
1215
|
-
const ret =
|
1216
|
-
return
|
1067
|
+
const ret = arg0.queueMicrotask;
|
1068
|
+
return ret;
|
1217
1069
|
};
|
1218
1070
|
|
1219
1071
|
module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
|
1220
1072
|
return handleError(function (arg0, arg1) {
|
1221
|
-
|
1073
|
+
arg0.randomFillSync(arg1);
|
1222
1074
|
}, arguments);
|
1223
1075
|
};
|
1224
1076
|
|
1225
1077
|
module.exports.__wbg_require_79b1e9274cde3c87 = function () {
|
1226
1078
|
return handleError(function () {
|
1227
1079
|
const ret = module.require;
|
1228
|
-
return
|
1080
|
+
return ret;
|
1229
1081
|
}, arguments);
|
1230
1082
|
};
|
1231
1083
|
|
1232
1084
|
module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
|
1233
|
-
const ret = Promise.resolve(
|
1234
|
-
return
|
1085
|
+
const ret = Promise.resolve(arg0);
|
1086
|
+
return ret;
|
1235
1087
|
};
|
1236
1088
|
|
1237
1089
|
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
1238
|
-
|
1090
|
+
arg0[arg1] = arg2;
|
1239
1091
|
};
|
1240
1092
|
|
1241
1093
|
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
1242
|
-
|
1094
|
+
arg0.set(arg1, arg2 >>> 0);
|
1243
1095
|
};
|
1244
1096
|
|
1245
1097
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
1246
|
-
|
1098
|
+
arg0.body = arg1;
|
1247
1099
|
};
|
1248
1100
|
|
1249
1101
|
module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
|
1250
|
-
|
1102
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
1251
1103
|
};
|
1252
1104
|
|
1253
1105
|
module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
|
1254
|
-
|
1106
|
+
arg0.headers = arg1;
|
1255
1107
|
};
|
1256
1108
|
|
1257
1109
|
module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
|
1258
|
-
|
1110
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
1259
1111
|
};
|
1260
1112
|
|
1261
1113
|
module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
|
1262
|
-
|
1114
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
1263
1115
|
};
|
1264
1116
|
|
1265
1117
|
module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
|
@@ -1268,18 +1120,18 @@ module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
|
|
1268
1120
|
try {
|
1269
1121
|
deferred0_0 = arg1;
|
1270
1122
|
deferred0_1 = arg2;
|
1271
|
-
|
1123
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
1272
1124
|
} finally {
|
1273
1125
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
1274
1126
|
}
|
1275
1127
|
};
|
1276
1128
|
|
1277
1129
|
module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
|
1278
|
-
|
1130
|
+
arg0.signal = arg1;
|
1279
1131
|
};
|
1280
1132
|
|
1281
1133
|
module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
|
1282
|
-
|
1134
|
+
arg0.type = getStringFromWasm0(arg1, arg2);
|
1283
1135
|
};
|
1284
1136
|
|
1285
1137
|
module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
|
@@ -1288,19 +1140,19 @@ module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
|
|
1288
1140
|
try {
|
1289
1141
|
deferred0_0 = arg1;
|
1290
1142
|
deferred0_1 = arg2;
|
1291
|
-
|
1143
|
+
arg0.variant = getStringFromWasm0(arg1, arg2);
|
1292
1144
|
} finally {
|
1293
1145
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
1294
1146
|
}
|
1295
1147
|
};
|
1296
1148
|
|
1297
1149
|
module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
|
1298
|
-
const ret =
|
1299
|
-
return
|
1150
|
+
const ret = arg0.signal;
|
1151
|
+
return ret;
|
1300
1152
|
};
|
1301
1153
|
|
1302
1154
|
module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
|
1303
|
-
const ret =
|
1155
|
+
const ret = arg1.stack;
|
1304
1156
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1305
1157
|
const len1 = WASM_VECTOR_LEN;
|
1306
1158
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
@@ -1309,60 +1161,60 @@ module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
|
|
1309
1161
|
|
1310
1162
|
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
|
1311
1163
|
const ret = typeof global === "undefined" ? null : global;
|
1312
|
-
return isLikeNone(ret) ? 0 :
|
1164
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
1313
1165
|
};
|
1314
1166
|
|
1315
1167
|
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
|
1316
1168
|
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
1317
|
-
return isLikeNone(ret) ? 0 :
|
1169
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
1318
1170
|
};
|
1319
1171
|
|
1320
1172
|
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
|
1321
1173
|
const ret = typeof self === "undefined" ? null : self;
|
1322
|
-
return isLikeNone(ret) ? 0 :
|
1174
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
1323
1175
|
};
|
1324
1176
|
|
1325
1177
|
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
|
1326
1178
|
const ret = typeof window === "undefined" ? null : window;
|
1327
|
-
return isLikeNone(ret) ? 0 :
|
1179
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
1328
1180
|
};
|
1329
1181
|
|
1330
1182
|
module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
|
1331
|
-
const ret =
|
1183
|
+
const ret = arg0.status;
|
1332
1184
|
return ret;
|
1333
1185
|
};
|
1334
1186
|
|
1335
1187
|
module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
|
1336
1188
|
return handleError(function (arg0) {
|
1337
|
-
const ret = JSON.stringify(
|
1338
|
-
return
|
1189
|
+
const ret = JSON.stringify(arg0);
|
1190
|
+
return ret;
|
1339
1191
|
}, arguments);
|
1340
1192
|
};
|
1341
1193
|
|
1342
1194
|
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
|
1343
|
-
const ret =
|
1344
|
-
return
|
1195
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
1196
|
+
return ret;
|
1345
1197
|
};
|
1346
1198
|
|
1347
1199
|
module.exports.__wbg_text_7805bea50de2af49 = function () {
|
1348
1200
|
return handleError(function (arg0) {
|
1349
|
-
const ret =
|
1350
|
-
return
|
1201
|
+
const ret = arg0.text();
|
1202
|
+
return ret;
|
1351
1203
|
}, arguments);
|
1352
1204
|
};
|
1353
1205
|
|
1354
1206
|
module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
|
1355
|
-
const ret =
|
1356
|
-
return
|
1207
|
+
const ret = arg0.then(arg1);
|
1208
|
+
return ret;
|
1357
1209
|
};
|
1358
1210
|
|
1359
1211
|
module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
|
1360
|
-
const ret =
|
1361
|
-
return
|
1212
|
+
const ret = arg0.then(arg1, arg2);
|
1213
|
+
return ret;
|
1362
1214
|
};
|
1363
1215
|
|
1364
1216
|
module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
|
1365
|
-
const ret =
|
1217
|
+
const ret = arg1.url;
|
1366
1218
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1367
1219
|
const len1 = WASM_VECTOR_LEN;
|
1368
1220
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
@@ -1370,32 +1222,32 @@ module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
|
|
1370
1222
|
};
|
1371
1223
|
|
1372
1224
|
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
|
1373
|
-
const ret =
|
1374
|
-
return
|
1225
|
+
const ret = arg0.value;
|
1226
|
+
return ret;
|
1375
1227
|
};
|
1376
1228
|
|
1377
1229
|
module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
|
1378
|
-
const ret =
|
1379
|
-
return
|
1230
|
+
const ret = arg0.versions;
|
1231
|
+
return ret;
|
1380
1232
|
};
|
1381
1233
|
|
1382
1234
|
module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
|
1383
|
-
console.warn(
|
1235
|
+
console.warn(arg0, arg1, arg2, arg3);
|
1384
1236
|
};
|
1385
1237
|
|
1386
1238
|
module.exports.__wbindgen_as_number = function (arg0) {
|
1387
|
-
const ret = +
|
1239
|
+
const ret = +arg0;
|
1388
1240
|
return ret;
|
1389
1241
|
};
|
1390
1242
|
|
1391
1243
|
module.exports.__wbindgen_boolean_get = function (arg0) {
|
1392
|
-
const v =
|
1244
|
+
const v = arg0;
|
1393
1245
|
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
1394
1246
|
return ret;
|
1395
1247
|
};
|
1396
1248
|
|
1397
1249
|
module.exports.__wbindgen_cb_drop = function (arg0) {
|
1398
|
-
const obj =
|
1250
|
+
const obj = arg0.original;
|
1399
1251
|
if (obj.cnt-- == 1) {
|
1400
1252
|
obj.a = 0;
|
1401
1253
|
return true;
|
@@ -1404,13 +1256,13 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
1404
1256
|
return ret;
|
1405
1257
|
};
|
1406
1258
|
|
1407
|
-
module.exports.
|
1408
|
-
const ret = makeMutClosure(arg0, arg1,
|
1409
|
-
return
|
1259
|
+
module.exports.__wbindgen_closure_wrapper2159 = function (arg0, arg1, arg2) {
|
1260
|
+
const ret = makeMutClosure(arg0, arg1, 606, __wbg_adapter_42);
|
1261
|
+
return ret;
|
1410
1262
|
};
|
1411
1263
|
|
1412
1264
|
module.exports.__wbindgen_debug_string = function (arg0, arg1) {
|
1413
|
-
const ret = debugString(
|
1265
|
+
const ret = debugString(arg1);
|
1414
1266
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1415
1267
|
const len1 = WASM_VECTOR_LEN;
|
1416
1268
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
@@ -1419,47 +1271,57 @@ module.exports.__wbindgen_debug_string = function (arg0, arg1) {
|
|
1419
1271
|
|
1420
1272
|
module.exports.__wbindgen_error_new = function (arg0, arg1) {
|
1421
1273
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1422
|
-
return
|
1274
|
+
return ret;
|
1423
1275
|
};
|
1424
1276
|
|
1425
1277
|
module.exports.__wbindgen_in = function (arg0, arg1) {
|
1426
|
-
const ret =
|
1278
|
+
const ret = arg0 in arg1;
|
1427
1279
|
return ret;
|
1428
1280
|
};
|
1429
1281
|
|
1282
|
+
module.exports.__wbindgen_init_externref_table = function () {
|
1283
|
+
const table = wasm.__wbindgen_export_4;
|
1284
|
+
const offset = table.grow(4);
|
1285
|
+
table.set(0, undefined);
|
1286
|
+
table.set(offset + 0, undefined);
|
1287
|
+
table.set(offset + 1, null);
|
1288
|
+
table.set(offset + 2, true);
|
1289
|
+
table.set(offset + 3, false);
|
1290
|
+
};
|
1291
|
+
|
1430
1292
|
module.exports.__wbindgen_is_function = function (arg0) {
|
1431
|
-
const ret = typeof
|
1293
|
+
const ret = typeof arg0 === "function";
|
1432
1294
|
return ret;
|
1433
1295
|
};
|
1434
1296
|
|
1435
1297
|
module.exports.__wbindgen_is_object = function (arg0) {
|
1436
|
-
const val =
|
1298
|
+
const val = arg0;
|
1437
1299
|
const ret = typeof val === "object" && val !== null;
|
1438
1300
|
return ret;
|
1439
1301
|
};
|
1440
1302
|
|
1441
1303
|
module.exports.__wbindgen_is_string = function (arg0) {
|
1442
|
-
const ret = typeof
|
1304
|
+
const ret = typeof arg0 === "string";
|
1443
1305
|
return ret;
|
1444
1306
|
};
|
1445
1307
|
|
1446
1308
|
module.exports.__wbindgen_is_undefined = function (arg0) {
|
1447
|
-
const ret =
|
1309
|
+
const ret = arg0 === undefined;
|
1448
1310
|
return ret;
|
1449
1311
|
};
|
1450
1312
|
|
1451
1313
|
module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
|
1452
|
-
const ret =
|
1314
|
+
const ret = arg0 == arg1;
|
1453
1315
|
return ret;
|
1454
1316
|
};
|
1455
1317
|
|
1456
1318
|
module.exports.__wbindgen_memory = function () {
|
1457
1319
|
const ret = wasm.memory;
|
1458
|
-
return
|
1320
|
+
return ret;
|
1459
1321
|
};
|
1460
1322
|
|
1461
1323
|
module.exports.__wbindgen_number_get = function (arg0, arg1) {
|
1462
|
-
const obj =
|
1324
|
+
const obj = arg1;
|
1463
1325
|
const ret = typeof obj === "number" ? obj : undefined;
|
1464
1326
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
1465
1327
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
@@ -1467,20 +1329,11 @@ module.exports.__wbindgen_number_get = function (arg0, arg1) {
|
|
1467
1329
|
|
1468
1330
|
module.exports.__wbindgen_number_new = function (arg0) {
|
1469
1331
|
const ret = arg0;
|
1470
|
-
return
|
1471
|
-
};
|
1472
|
-
|
1473
|
-
module.exports.__wbindgen_object_clone_ref = function (arg0) {
|
1474
|
-
const ret = getObject(arg0);
|
1475
|
-
return addHeapObject(ret);
|
1476
|
-
};
|
1477
|
-
|
1478
|
-
module.exports.__wbindgen_object_drop_ref = function (arg0) {
|
1479
|
-
takeObject(arg0);
|
1332
|
+
return ret;
|
1480
1333
|
};
|
1481
1334
|
|
1482
1335
|
module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
1483
|
-
const obj =
|
1336
|
+
const obj = arg1;
|
1484
1337
|
const ret = typeof obj === "string" ? obj : undefined;
|
1485
1338
|
var ptr1 = isLikeNone(ret)
|
1486
1339
|
? 0
|
@@ -1492,7 +1345,7 @@ module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
|
1492
1345
|
|
1493
1346
|
module.exports.__wbindgen_string_new = function (arg0, arg1) {
|
1494
1347
|
const ret = getStringFromWasm0(arg0, arg1);
|
1495
|
-
return
|
1348
|
+
return ret;
|
1496
1349
|
};
|
1497
1350
|
|
1498
1351
|
module.exports.__wbindgen_throw = function (arg0, arg1) {
|
@@ -1506,3 +1359,5 @@ const wasmModule = new WebAssembly.Module(bytes);
|
|
1506
1359
|
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
1507
1360
|
wasm = wasmInstance.exports;
|
1508
1361
|
module.exports.__wasm = wasm;
|
1362
|
+
|
1363
|
+
wasm.__wbindgen_start();
|