@bitwarden/sdk-internal 0.2.0-main.7 → 0.2.0-main.71
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 -0
- package/bitwarden_wasm_internal.d.ts +156 -37
- package/bitwarden_wasm_internal_bg.js +678 -405
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +35 -25
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +156 -37
- package/node/bitwarden_wasm_internal.js +679 -406
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +35 -25
- package/package.json +5 -4
@@ -81,10 +81,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
81
81
|
return ptr;
|
82
82
|
}
|
83
83
|
|
84
|
-
function isLikeNone(x) {
|
85
|
-
return x === undefined || x === null;
|
86
|
-
}
|
87
|
-
|
88
84
|
let cachedDataViewMemory0 = null;
|
89
85
|
|
90
86
|
function getDataViewMemory0() {
|
@@ -99,8 +95,37 @@ function getDataViewMemory0() {
|
|
99
95
|
return cachedDataViewMemory0;
|
100
96
|
}
|
101
97
|
|
98
|
+
const lTextDecoder =
|
99
|
+
typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
|
100
|
+
|
101
|
+
let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
102
|
+
|
103
|
+
cachedTextDecoder.decode();
|
104
|
+
|
105
|
+
function getStringFromWasm0(ptr, len) {
|
106
|
+
ptr = ptr >>> 0;
|
107
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
108
|
+
}
|
109
|
+
|
102
110
|
let heap_next = heap.length;
|
103
111
|
|
112
|
+
function addHeapObject(obj) {
|
113
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
114
|
+
const idx = heap_next;
|
115
|
+
heap_next = heap[idx];
|
116
|
+
|
117
|
+
heap[idx] = obj;
|
118
|
+
return idx;
|
119
|
+
}
|
120
|
+
|
121
|
+
function handleError(f, args) {
|
122
|
+
try {
|
123
|
+
return f.apply(this, args);
|
124
|
+
} catch (e) {
|
125
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
104
129
|
function dropObject(idx) {
|
105
130
|
if (idx < 132) return;
|
106
131
|
heap[idx] = heap_next;
|
@@ -113,25 +138,40 @@ function takeObject(idx) {
|
|
113
138
|
return ret;
|
114
139
|
}
|
115
140
|
|
116
|
-
function
|
117
|
-
|
118
|
-
const idx = heap_next;
|
119
|
-
heap_next = heap[idx];
|
120
|
-
|
121
|
-
heap[idx] = obj;
|
122
|
-
return idx;
|
141
|
+
function isLikeNone(x) {
|
142
|
+
return x === undefined || x === null;
|
123
143
|
}
|
124
144
|
|
125
|
-
const
|
126
|
-
typeof
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
145
|
+
const CLOSURE_DTORS =
|
146
|
+
typeof FinalizationRegistry === "undefined"
|
147
|
+
? { register: () => {}, unregister: () => {} }
|
148
|
+
: new FinalizationRegistry((state) => {
|
149
|
+
wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
|
150
|
+
});
|
131
151
|
|
132
|
-
function
|
133
|
-
|
134
|
-
|
152
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
153
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
154
|
+
const real = (...args) => {
|
155
|
+
// First up with a closure we increment the internal reference
|
156
|
+
// count. This ensures that the Rust closure environment won't
|
157
|
+
// be deallocated while we're invoking it.
|
158
|
+
state.cnt++;
|
159
|
+
const a = state.a;
|
160
|
+
state.a = 0;
|
161
|
+
try {
|
162
|
+
return f(a, state.b, ...args);
|
163
|
+
} finally {
|
164
|
+
if (--state.cnt === 0) {
|
165
|
+
wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
|
166
|
+
CLOSURE_DTORS.unregister(state);
|
167
|
+
} else {
|
168
|
+
state.a = a;
|
169
|
+
}
|
170
|
+
}
|
171
|
+
};
|
172
|
+
real.original = state;
|
173
|
+
CLOSURE_DTORS.register(real, state, state);
|
174
|
+
return real;
|
135
175
|
}
|
136
176
|
|
137
177
|
function debugString(val) {
|
@@ -175,7 +215,7 @@ function debugString(val) {
|
|
175
215
|
// Test for built-in
|
176
216
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
177
217
|
let className;
|
178
|
-
if (builtInMatches.length > 1) {
|
218
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
179
219
|
className = builtInMatches[1];
|
180
220
|
} else {
|
181
221
|
// Failed to match the standard '[object ClassName]'
|
@@ -199,54 +239,169 @@ function debugString(val) {
|
|
199
239
|
return className;
|
200
240
|
}
|
201
241
|
|
202
|
-
|
203
|
-
typeof FinalizationRegistry === "undefined"
|
204
|
-
? { register: () => {}, unregister: () => {} }
|
205
|
-
: new FinalizationRegistry((state) => {
|
206
|
-
wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
|
207
|
-
});
|
242
|
+
let stack_pointer = 128;
|
208
243
|
|
209
|
-
function
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
244
|
+
function addBorrowedObject(obj) {
|
245
|
+
if (stack_pointer == 1) throw new Error("out of js stack");
|
246
|
+
heap[--stack_pointer] = obj;
|
247
|
+
return stack_pointer;
|
248
|
+
}
|
249
|
+
/**
|
250
|
+
* @param {any} error
|
251
|
+
* @returns {boolean}
|
252
|
+
*/
|
253
|
+
export function isCoreError(error) {
|
254
|
+
try {
|
255
|
+
const ret = wasm.isCoreError(addBorrowedObject(error));
|
256
|
+
return ret !== 0;
|
257
|
+
} finally {
|
258
|
+
heap[stack_pointer++] = undefined;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
/**
|
263
|
+
* @param {any} error
|
264
|
+
* @returns {boolean}
|
265
|
+
*/
|
266
|
+
export function isEncryptionSettingsError(error) {
|
267
|
+
try {
|
268
|
+
const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
|
269
|
+
return ret !== 0;
|
270
|
+
} finally {
|
271
|
+
heap[stack_pointer++] = undefined;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
/**
|
276
|
+
* @param {any} error
|
277
|
+
* @returns {boolean}
|
278
|
+
*/
|
279
|
+
export function isSshKeyExportError(error) {
|
280
|
+
try {
|
281
|
+
const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
|
282
|
+
return ret !== 0;
|
283
|
+
} finally {
|
284
|
+
heap[stack_pointer++] = undefined;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
/**
|
289
|
+
* @param {any} error
|
290
|
+
* @returns {boolean}
|
291
|
+
*/
|
292
|
+
export function isSshKeyImportError(error) {
|
293
|
+
try {
|
294
|
+
const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
|
295
|
+
return ret !== 0;
|
296
|
+
} finally {
|
297
|
+
heap[stack_pointer++] = undefined;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
|
301
|
+
/**
|
302
|
+
* @param {any} error
|
303
|
+
* @returns {boolean}
|
304
|
+
*/
|
305
|
+
export function isKeyGenerationError(error) {
|
306
|
+
try {
|
307
|
+
const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
|
308
|
+
return ret !== 0;
|
309
|
+
} finally {
|
310
|
+
heap[stack_pointer++] = undefined;
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
/**
|
315
|
+
* @param {any} error
|
316
|
+
* @returns {boolean}
|
317
|
+
*/
|
318
|
+
export function isTestError(error) {
|
319
|
+
try {
|
320
|
+
const ret = wasm.isTestError(addBorrowedObject(error));
|
321
|
+
return ret !== 0;
|
322
|
+
} finally {
|
323
|
+
heap[stack_pointer++] = undefined;
|
324
|
+
}
|
325
|
+
}
|
326
|
+
|
327
|
+
/**
|
328
|
+
* Generate a new SSH key pair
|
329
|
+
*
|
330
|
+
* # Arguments
|
331
|
+
* - `key_algorithm` - The algorithm to use for the key pair
|
332
|
+
*
|
333
|
+
* # Returns
|
334
|
+
* - `Ok(SshKey)` if the key was successfully generated
|
335
|
+
* - `Err(KeyGenerationError)` if the key could not be generated
|
336
|
+
* @param {KeyAlgorithm} key_algorithm
|
337
|
+
* @returns {SshKey}
|
338
|
+
*/
|
339
|
+
export function generate_ssh_key(key_algorithm) {
|
340
|
+
try {
|
341
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
342
|
+
wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
|
343
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
344
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
345
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
346
|
+
if (r2) {
|
347
|
+
throw takeObject(r1);
|
227
348
|
}
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
349
|
+
return takeObject(r0);
|
350
|
+
} finally {
|
351
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
352
|
+
}
|
353
|
+
}
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
|
357
|
+
* to an OpenSSH private key with public key and fingerprint
|
358
|
+
*
|
359
|
+
* # Arguments
|
360
|
+
* - `imported_key` - The private key to convert
|
361
|
+
* - `password` - The password to use for decrypting the key
|
362
|
+
*
|
363
|
+
* # Returns
|
364
|
+
* - `Ok(SshKey)` if the key was successfully coneverted
|
365
|
+
* - `Err(PasswordRequired)` if the key is encrypted and no password was provided
|
366
|
+
* - `Err(WrongPassword)` if the password provided is incorrect
|
367
|
+
* - `Err(ParsingError)` if the key could not be parsed
|
368
|
+
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
369
|
+
* @param {string} imported_key
|
370
|
+
* @param {string | null} [password]
|
371
|
+
* @returns {SshKey}
|
372
|
+
*/
|
373
|
+
export function import_ssh_key(imported_key, password) {
|
374
|
+
try {
|
375
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
376
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
377
|
+
const len0 = WASM_VECTOR_LEN;
|
378
|
+
var ptr1 = isLikeNone(password)
|
379
|
+
? 0
|
380
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
381
|
+
var len1 = WASM_VECTOR_LEN;
|
382
|
+
wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
|
383
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
384
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
385
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
386
|
+
if (r2) {
|
387
|
+
throw takeObject(r1);
|
388
|
+
}
|
389
|
+
return takeObject(r0);
|
390
|
+
} finally {
|
391
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
392
|
+
}
|
232
393
|
}
|
394
|
+
|
233
395
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
234
|
-
wasm.
|
396
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8fd8a25b4840f267(
|
235
397
|
arg0,
|
236
398
|
arg1,
|
237
399
|
addHeapObject(arg2),
|
238
400
|
);
|
239
401
|
}
|
240
402
|
|
241
|
-
function
|
242
|
-
|
243
|
-
return f.apply(this, args);
|
244
|
-
} catch (e) {
|
245
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
246
|
-
}
|
247
|
-
}
|
248
|
-
function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
249
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
|
403
|
+
function __wbg_adapter_130(arg0, arg1, arg2, arg3) {
|
404
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2b4228b75de6bd5e(
|
250
405
|
arg0,
|
251
406
|
arg1,
|
252
407
|
addHeapObject(arg2),
|
@@ -254,6 +409,9 @@ function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
|
254
409
|
);
|
255
410
|
}
|
256
411
|
|
412
|
+
/**
|
413
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
414
|
+
*/
|
257
415
|
export const LogLevel = Object.freeze({
|
258
416
|
Trace: 0,
|
259
417
|
0: "Trace",
|
@@ -289,8 +447,8 @@ export class BitwardenClient {
|
|
289
447
|
wasm.__wbg_bitwardenclient_free(ptr, 0);
|
290
448
|
}
|
291
449
|
/**
|
292
|
-
* @param {ClientSettings |
|
293
|
-
* @param {LogLevel |
|
450
|
+
* @param {ClientSettings | null} [settings]
|
451
|
+
* @param {LogLevel | null} [log_level]
|
294
452
|
*/
|
295
453
|
constructor(settings, log_level) {
|
296
454
|
const ret = wasm.bitwardenclient_new(
|
@@ -373,102 +531,147 @@ export class BitwardenClient {
|
|
373
531
|
return takeObject(ret);
|
374
532
|
}
|
375
533
|
/**
|
376
|
-
* @returns {
|
534
|
+
* @returns {CryptoClient}
|
377
535
|
*/
|
378
536
|
crypto() {
|
379
537
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
380
|
-
return
|
538
|
+
return CryptoClient.__wrap(ret);
|
381
539
|
}
|
382
540
|
/**
|
383
|
-
* @returns {
|
541
|
+
* @returns {VaultClient}
|
384
542
|
*/
|
385
543
|
vault() {
|
386
544
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
387
|
-
return
|
545
|
+
return VaultClient.__wrap(ret);
|
388
546
|
}
|
389
547
|
}
|
390
548
|
|
391
|
-
const
|
549
|
+
const ClientFoldersFinalization =
|
392
550
|
typeof FinalizationRegistry === "undefined"
|
393
551
|
? { register: () => {}, unregister: () => {} }
|
394
|
-
: new FinalizationRegistry((ptr) => wasm.
|
552
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
|
395
553
|
|
396
|
-
export class
|
554
|
+
export class ClientFolders {
|
397
555
|
static __wrap(ptr) {
|
398
556
|
ptr = ptr >>> 0;
|
399
|
-
const obj = Object.create(
|
557
|
+
const obj = Object.create(ClientFolders.prototype);
|
400
558
|
obj.__wbg_ptr = ptr;
|
401
|
-
|
559
|
+
ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
|
402
560
|
return obj;
|
403
561
|
}
|
404
562
|
|
405
563
|
__destroy_into_raw() {
|
406
564
|
const ptr = this.__wbg_ptr;
|
407
565
|
this.__wbg_ptr = 0;
|
408
|
-
|
566
|
+
ClientFoldersFinalization.unregister(this);
|
409
567
|
return ptr;
|
410
568
|
}
|
411
569
|
|
412
570
|
free() {
|
413
571
|
const ptr = this.__destroy_into_raw();
|
414
|
-
wasm.
|
415
|
-
}
|
416
|
-
/**
|
417
|
-
* Initialization method for the user crypto. Needs to be called before any other crypto
|
418
|
-
* operations.
|
419
|
-
* @param {InitUserCryptoRequest} req
|
420
|
-
* @returns {Promise<void>}
|
421
|
-
*/
|
422
|
-
initialize_user_crypto(req) {
|
423
|
-
const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
|
424
|
-
return takeObject(ret);
|
572
|
+
wasm.__wbg_clientfolders_free(ptr, 0);
|
425
573
|
}
|
426
574
|
/**
|
427
|
-
*
|
428
|
-
*
|
429
|
-
* @
|
430
|
-
* @returns {Promise<void>}
|
575
|
+
* Decrypt folder
|
576
|
+
* @param {Folder} folder
|
577
|
+
* @returns {FolderView}
|
431
578
|
*/
|
432
|
-
|
433
|
-
|
434
|
-
|
579
|
+
decrypt(folder) {
|
580
|
+
try {
|
581
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
582
|
+
wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
|
583
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
584
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
585
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
586
|
+
if (r2) {
|
587
|
+
throw takeObject(r1);
|
588
|
+
}
|
589
|
+
return takeObject(r0);
|
590
|
+
} finally {
|
591
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
592
|
+
}
|
435
593
|
}
|
436
594
|
}
|
437
595
|
|
438
|
-
const
|
596
|
+
const CryptoClientFinalization =
|
439
597
|
typeof FinalizationRegistry === "undefined"
|
440
598
|
? { register: () => {}, unregister: () => {} }
|
441
|
-
: new FinalizationRegistry((ptr) => wasm.
|
599
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
|
442
600
|
|
443
|
-
export class
|
601
|
+
export class CryptoClient {
|
444
602
|
static __wrap(ptr) {
|
445
603
|
ptr = ptr >>> 0;
|
446
|
-
const obj = Object.create(
|
604
|
+
const obj = Object.create(CryptoClient.prototype);
|
447
605
|
obj.__wbg_ptr = ptr;
|
448
|
-
|
606
|
+
CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
449
607
|
return obj;
|
450
608
|
}
|
451
609
|
|
452
610
|
__destroy_into_raw() {
|
453
611
|
const ptr = this.__wbg_ptr;
|
454
612
|
this.__wbg_ptr = 0;
|
455
|
-
|
613
|
+
CryptoClientFinalization.unregister(this);
|
456
614
|
return ptr;
|
457
615
|
}
|
458
616
|
|
459
617
|
free() {
|
460
618
|
const ptr = this.__destroy_into_raw();
|
461
|
-
wasm.
|
619
|
+
wasm.__wbg_cryptoclient_free(ptr, 0);
|
462
620
|
}
|
463
621
|
/**
|
464
|
-
*
|
465
|
-
*
|
466
|
-
* @
|
622
|
+
* Initialization method for the user crypto. Needs to be called before any other crypto
|
623
|
+
* operations.
|
624
|
+
* @param {InitUserCryptoRequest} req
|
625
|
+
* @returns {Promise<void>}
|
467
626
|
*/
|
468
|
-
|
627
|
+
initialize_user_crypto(req) {
|
628
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
|
629
|
+
return takeObject(ret);
|
630
|
+
}
|
631
|
+
/**
|
632
|
+
* Initialization method for the organization crypto. Needs to be called after
|
633
|
+
* `initialize_user_crypto` but before any other crypto operations.
|
634
|
+
* @param {InitOrgCryptoRequest} req
|
635
|
+
* @returns {Promise<void>}
|
636
|
+
*/
|
637
|
+
initialize_org_crypto(req) {
|
638
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
|
639
|
+
return takeObject(ret);
|
640
|
+
}
|
641
|
+
/**
|
642
|
+
* Generates a new key pair and encrypts the private key with the provided user key.
|
643
|
+
* Crypto initialization not required.
|
644
|
+
* @param {string} user_key
|
645
|
+
* @returns {MakeKeyPairResponse}
|
646
|
+
*/
|
647
|
+
make_key_pair(user_key) {
|
469
648
|
try {
|
470
649
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
471
|
-
|
650
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
651
|
+
const len0 = WASM_VECTOR_LEN;
|
652
|
+
wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
|
653
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
654
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
655
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
656
|
+
if (r2) {
|
657
|
+
throw takeObject(r1);
|
658
|
+
}
|
659
|
+
return takeObject(r0);
|
660
|
+
} finally {
|
661
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
662
|
+
}
|
663
|
+
}
|
664
|
+
/**
|
665
|
+
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
666
|
+
* key. Returns if the private key is decryptable and if it is a valid matching key.
|
667
|
+
* Crypto initialization not required.
|
668
|
+
* @param {VerifyAsymmetricKeysRequest} request
|
669
|
+
* @returns {VerifyAsymmetricKeysResponse}
|
670
|
+
*/
|
671
|
+
verify_asymmetric_keys(request) {
|
672
|
+
try {
|
673
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
674
|
+
wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
|
472
675
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
473
676
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
474
677
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
@@ -482,30 +685,30 @@ export class ClientFolders {
|
|
482
685
|
}
|
483
686
|
}
|
484
687
|
|
485
|
-
const
|
688
|
+
const VaultClientFinalization =
|
486
689
|
typeof FinalizationRegistry === "undefined"
|
487
690
|
? { register: () => {}, unregister: () => {} }
|
488
|
-
: new FinalizationRegistry((ptr) => wasm.
|
691
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
|
489
692
|
|
490
|
-
export class
|
693
|
+
export class VaultClient {
|
491
694
|
static __wrap(ptr) {
|
492
695
|
ptr = ptr >>> 0;
|
493
|
-
const obj = Object.create(
|
696
|
+
const obj = Object.create(VaultClient.prototype);
|
494
697
|
obj.__wbg_ptr = ptr;
|
495
|
-
|
698
|
+
VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
496
699
|
return obj;
|
497
700
|
}
|
498
701
|
|
499
702
|
__destroy_into_raw() {
|
500
703
|
const ptr = this.__wbg_ptr;
|
501
704
|
this.__wbg_ptr = 0;
|
502
|
-
|
705
|
+
VaultClientFinalization.unregister(this);
|
503
706
|
return ptr;
|
504
707
|
}
|
505
708
|
|
506
709
|
free() {
|
507
710
|
const ptr = this.__destroy_into_raw();
|
508
|
-
wasm.
|
711
|
+
wasm.__wbg_vaultclient_free(ptr, 0);
|
509
712
|
}
|
510
713
|
/**
|
511
714
|
* @returns {ClientFolders}
|
@@ -516,162 +719,161 @@ export class ClientVault {
|
|
516
719
|
}
|
517
720
|
}
|
518
721
|
|
519
|
-
export function
|
520
|
-
const
|
521
|
-
const
|
522
|
-
|
523
|
-
? 0
|
524
|
-
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
525
|
-
var len1 = WASM_VECTOR_LEN;
|
722
|
+
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
723
|
+
const ret = String(getObject(arg1));
|
724
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
725
|
+
const len1 = WASM_VECTOR_LEN;
|
526
726
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
527
727
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
528
728
|
}
|
529
729
|
|
530
|
-
export function
|
531
|
-
|
730
|
+
export function __wbg_abort_775ef1d17fc65868(arg0) {
|
731
|
+
getObject(arg0).abort();
|
532
732
|
}
|
533
733
|
|
534
|
-
export function
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
}
|
539
|
-
|
540
|
-
export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
|
541
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
542
|
-
return addHeapObject(ret);
|
543
|
-
}
|
544
|
-
|
545
|
-
export function __wbindgen_is_undefined(arg0) {
|
546
|
-
const ret = getObject(arg0) === undefined;
|
547
|
-
return ret;
|
548
|
-
}
|
549
|
-
|
550
|
-
export function __wbindgen_in(arg0, arg1) {
|
551
|
-
const ret = getObject(arg0) in getObject(arg1);
|
552
|
-
return ret;
|
734
|
+
export function __wbg_append_299d5d48292c0495() {
|
735
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
736
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
737
|
+
}, arguments);
|
553
738
|
}
|
554
739
|
|
555
|
-
export function
|
556
|
-
|
557
|
-
|
740
|
+
export function __wbg_append_8c7dd8d641a5f01b() {
|
741
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
742
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
743
|
+
}, arguments);
|
558
744
|
}
|
559
745
|
|
560
|
-
export function
|
561
|
-
|
562
|
-
|
746
|
+
export function __wbg_append_b2d1fc16de2a0e81() {
|
747
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
748
|
+
getObject(arg0).append(
|
749
|
+
getStringFromWasm0(arg1, arg2),
|
750
|
+
getObject(arg3),
|
751
|
+
getStringFromWasm0(arg4, arg5),
|
752
|
+
);
|
753
|
+
}, arguments);
|
563
754
|
}
|
564
755
|
|
565
|
-
export function
|
566
|
-
|
567
|
-
|
756
|
+
export function __wbg_append_b44785ebeb668479() {
|
757
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
758
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
759
|
+
}, arguments);
|
568
760
|
}
|
569
761
|
|
570
|
-
export function
|
571
|
-
const ret =
|
762
|
+
export function __wbg_buffer_609cc3eee51ed158(arg0) {
|
763
|
+
const ret = getObject(arg0).buffer;
|
572
764
|
return addHeapObject(ret);
|
573
765
|
}
|
574
766
|
|
575
|
-
export function
|
576
|
-
|
577
|
-
|
767
|
+
export function __wbg_call_672a4d21634d4a24() {
|
768
|
+
return handleError(function (arg0, arg1) {
|
769
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
770
|
+
return addHeapObject(ret);
|
771
|
+
}, arguments);
|
578
772
|
}
|
579
773
|
|
580
|
-
export function
|
581
|
-
|
582
|
-
|
774
|
+
export function __wbg_call_7cccdd69e0791ae2() {
|
775
|
+
return handleError(function (arg0, arg1, arg2) {
|
776
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
777
|
+
return addHeapObject(ret);
|
778
|
+
}, arguments);
|
583
779
|
}
|
584
780
|
|
585
|
-
export function
|
586
|
-
const ret = getObject(arg0);
|
781
|
+
export function __wbg_crypto_ed58b8e10a292839(arg0) {
|
782
|
+
const ret = getObject(arg0).crypto;
|
587
783
|
return addHeapObject(ret);
|
588
784
|
}
|
589
785
|
|
590
|
-
export function
|
591
|
-
|
592
|
-
const ret = getObject(arg0).next();
|
593
|
-
return addHeapObject(ret);
|
594
|
-
}, arguments);
|
786
|
+
export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
|
787
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
595
788
|
}
|
596
789
|
|
597
|
-
export function
|
790
|
+
export function __wbg_done_769e5ede4b31c67b(arg0) {
|
598
791
|
const ret = getObject(arg0).done;
|
599
792
|
return ret;
|
600
793
|
}
|
601
794
|
|
602
|
-
export function
|
603
|
-
const ret = getObject(arg0)
|
795
|
+
export function __wbg_entries_3265d4158b33e5dc(arg0) {
|
796
|
+
const ret = Object.entries(getObject(arg0));
|
604
797
|
return addHeapObject(ret);
|
605
798
|
}
|
606
799
|
|
607
|
-
export function
|
800
|
+
export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
608
801
|
let deferred0_0;
|
609
802
|
let deferred0_1;
|
610
803
|
try {
|
611
804
|
deferred0_0 = arg0;
|
612
805
|
deferred0_1 = arg1;
|
613
|
-
|
614
|
-
return addHeapObject(ret);
|
806
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
615
807
|
} finally {
|
616
808
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
617
809
|
}
|
618
810
|
}
|
619
811
|
|
620
|
-
export function
|
621
|
-
|
622
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
623
|
-
return addHeapObject(ret);
|
624
|
-
}, arguments);
|
812
|
+
export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
|
813
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
625
814
|
}
|
626
815
|
|
627
|
-
export function
|
628
|
-
const ret =
|
816
|
+
export function __wbg_fetch_4465c2b10f21a927(arg0) {
|
817
|
+
const ret = fetch(getObject(arg0));
|
629
818
|
return addHeapObject(ret);
|
630
819
|
}
|
631
820
|
|
632
|
-
export function
|
633
|
-
getObject(arg0).
|
821
|
+
export function __wbg_fetch_509096533071c657(arg0, arg1) {
|
822
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
823
|
+
return addHeapObject(ret);
|
634
824
|
}
|
635
825
|
|
636
|
-
export function
|
637
|
-
return handleError(function () {
|
638
|
-
|
639
|
-
return addHeapObject(ret);
|
826
|
+
export function __wbg_getRandomValues_bcb4912f16000dc4() {
|
827
|
+
return handleError(function (arg0, arg1) {
|
828
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
640
829
|
}, arguments);
|
641
830
|
}
|
642
831
|
|
643
|
-
export function
|
644
|
-
|
832
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
833
|
+
return handleError(function (arg0, arg1) {
|
834
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
835
|
+
return addHeapObject(ret);
|
836
|
+
}, arguments);
|
645
837
|
}
|
646
838
|
|
647
|
-
export function
|
648
|
-
getObject(arg0)
|
839
|
+
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
840
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
841
|
+
return addHeapObject(ret);
|
649
842
|
}
|
650
843
|
|
651
|
-
export function
|
652
|
-
getObject(arg0)
|
844
|
+
export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
|
845
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
846
|
+
return addHeapObject(ret);
|
653
847
|
}
|
654
848
|
|
655
|
-
export function
|
656
|
-
|
849
|
+
export function __wbg_has_a5ea9117f258a0ec() {
|
850
|
+
return handleError(function (arg0, arg1) {
|
851
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
852
|
+
return ret;
|
853
|
+
}, arguments);
|
657
854
|
}
|
658
855
|
|
659
|
-
export function
|
660
|
-
const ret = getObject(arg0).
|
856
|
+
export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
|
857
|
+
const ret = getObject(arg0).headers;
|
661
858
|
return addHeapObject(ret);
|
662
859
|
}
|
663
860
|
|
664
|
-
export function
|
665
|
-
getObject(arg0)
|
861
|
+
export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
|
862
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
666
863
|
}
|
667
864
|
|
668
|
-
export function
|
669
|
-
|
670
|
-
|
671
|
-
|
865
|
+
export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
|
866
|
+
let result;
|
867
|
+
try {
|
868
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
869
|
+
} catch (_) {
|
870
|
+
result = false;
|
871
|
+
}
|
872
|
+
const ret = result;
|
873
|
+
return ret;
|
672
874
|
}
|
673
875
|
|
674
|
-
export function
|
876
|
+
export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
|
675
877
|
let result;
|
676
878
|
try {
|
677
879
|
result = getObject(arg0) instanceof Response;
|
@@ -682,75 +884,61 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
|
|
682
884
|
return ret;
|
683
885
|
}
|
684
886
|
|
685
|
-
export function
|
686
|
-
|
887
|
+
export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
|
888
|
+
let result;
|
889
|
+
try {
|
890
|
+
result = getObject(arg0) instanceof Uint8Array;
|
891
|
+
} catch (_) {
|
892
|
+
result = false;
|
893
|
+
}
|
894
|
+
const ret = result;
|
687
895
|
return ret;
|
688
896
|
}
|
689
897
|
|
690
|
-
export function
|
691
|
-
const ret = getObject(
|
692
|
-
|
693
|
-
const len1 = WASM_VECTOR_LEN;
|
694
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
695
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
898
|
+
export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
|
899
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
900
|
+
return ret;
|
696
901
|
}
|
697
902
|
|
698
|
-
export function
|
699
|
-
const ret =
|
903
|
+
export function __wbg_iterator_9a24c88df860dc65() {
|
904
|
+
const ret = Symbol.iterator;
|
700
905
|
return addHeapObject(ret);
|
701
906
|
}
|
702
907
|
|
703
|
-
export function
|
704
|
-
|
705
|
-
|
706
|
-
return addHeapObject(ret);
|
707
|
-
}, arguments);
|
908
|
+
export function __wbg_length_a446193dc22c12f8(arg0) {
|
909
|
+
const ret = getObject(arg0).length;
|
910
|
+
return ret;
|
708
911
|
}
|
709
912
|
|
710
|
-
export function
|
711
|
-
getObject(arg0).
|
913
|
+
export function __wbg_length_e2d2a49132c1b256(arg0) {
|
914
|
+
const ret = getObject(arg0).length;
|
915
|
+
return ret;
|
712
916
|
}
|
713
917
|
|
714
|
-
export function
|
715
|
-
|
716
|
-
const ret = getObject(arg0).text();
|
717
|
-
return addHeapObject(ret);
|
718
|
-
}, arguments);
|
918
|
+
export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
|
919
|
+
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
719
920
|
}
|
720
921
|
|
721
|
-
export function
|
722
|
-
const ret =
|
922
|
+
export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
|
923
|
+
const ret = getObject(arg0).msCrypto;
|
723
924
|
return addHeapObject(ret);
|
724
925
|
}
|
725
926
|
|
726
|
-
export function
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
export function __wbindgen_cb_drop(arg0) {
|
732
|
-
const obj = takeObject(arg0).original;
|
733
|
-
if (obj.cnt-- == 1) {
|
734
|
-
obj.a = 0;
|
735
|
-
return true;
|
736
|
-
}
|
737
|
-
const ret = false;
|
738
|
-
return ret;
|
739
|
-
}
|
740
|
-
|
741
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
742
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
743
|
-
return addHeapObject(ret);
|
927
|
+
export function __wbg_new_018dcc2d6c8c2f6a() {
|
928
|
+
return handleError(function () {
|
929
|
+
const ret = new Headers();
|
930
|
+
return addHeapObject(ret);
|
931
|
+
}, arguments);
|
744
932
|
}
|
745
933
|
|
746
|
-
export function
|
934
|
+
export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
747
935
|
try {
|
748
936
|
var state0 = { a: arg0, b: arg1 };
|
749
937
|
var cb0 = (arg0, arg1) => {
|
750
938
|
const a = state0.a;
|
751
939
|
state0.a = 0;
|
752
940
|
try {
|
753
|
-
return
|
941
|
+
return __wbg_adapter_130(a, state0.b, arg0, arg1);
|
754
942
|
} finally {
|
755
943
|
state0.a = a;
|
756
944
|
}
|
@@ -762,240 +950,293 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
|
|
762
950
|
}
|
763
951
|
}
|
764
952
|
|
765
|
-
export function
|
766
|
-
|
953
|
+
export function __wbg_new_405e22f390576ce2() {
|
954
|
+
const ret = new Object();
|
955
|
+
return addHeapObject(ret);
|
767
956
|
}
|
768
957
|
|
769
|
-
export function
|
958
|
+
export function __wbg_new_78feb108b6472713() {
|
959
|
+
const ret = new Array();
|
960
|
+
return addHeapObject(ret);
|
961
|
+
}
|
962
|
+
|
963
|
+
export function __wbg_new_8a6f238a6ece86ea() {
|
770
964
|
const ret = new Error();
|
771
965
|
return addHeapObject(ret);
|
772
966
|
}
|
773
967
|
|
774
|
-
export function
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
968
|
+
export function __wbg_new_9fd39a253424609a() {
|
969
|
+
return handleError(function () {
|
970
|
+
const ret = new FormData();
|
971
|
+
return addHeapObject(ret);
|
972
|
+
}, arguments);
|
973
|
+
}
|
974
|
+
|
975
|
+
export function __wbg_new_a12002a7f91c75be(arg0) {
|
976
|
+
const ret = new Uint8Array(getObject(arg0));
|
977
|
+
return addHeapObject(ret);
|
978
|
+
}
|
979
|
+
|
980
|
+
export function __wbg_new_c68d7209be747379(arg0, arg1) {
|
981
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
982
|
+
return addHeapObject(ret);
|
983
|
+
}
|
984
|
+
|
985
|
+
export function __wbg_new_e25e5aab09ff45db() {
|
986
|
+
return handleError(function () {
|
987
|
+
const ret = new AbortController();
|
988
|
+
return addHeapObject(ret);
|
989
|
+
}, arguments);
|
780
990
|
}
|
781
991
|
|
782
|
-
export function
|
992
|
+
export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
|
783
993
|
let deferred0_0;
|
784
994
|
let deferred0_1;
|
785
995
|
try {
|
786
996
|
deferred0_0 = arg0;
|
787
997
|
deferred0_1 = arg1;
|
788
|
-
|
998
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
999
|
+
return addHeapObject(ret);
|
789
1000
|
} finally {
|
790
1001
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
791
1002
|
}
|
792
1003
|
}
|
793
1004
|
|
794
|
-
export function
|
795
|
-
|
796
|
-
|
797
|
-
return addHeapObject(ret);
|
798
|
-
}, arguments);
|
1005
|
+
export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
|
1006
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
1007
|
+
return addHeapObject(ret);
|
799
1008
|
}
|
800
1009
|
|
801
|
-
export function
|
802
|
-
|
803
|
-
|
804
|
-
return addHeapObject(ret);
|
805
|
-
}, arguments);
|
1010
|
+
export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
|
1011
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
1012
|
+
return addHeapObject(ret);
|
806
1013
|
}
|
807
1014
|
|
808
|
-
export function
|
809
|
-
|
810
|
-
|
811
|
-
return addHeapObject(ret);
|
812
|
-
}, arguments);
|
1015
|
+
export function __wbg_newwithlength_a381634e90c276d4(arg0) {
|
1016
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
1017
|
+
return addHeapObject(ret);
|
813
1018
|
}
|
814
1019
|
|
815
|
-
export function
|
816
|
-
return handleError(function () {
|
817
|
-
const ret =
|
1020
|
+
export function __wbg_newwithstrandinit_06c535e0a867c635() {
|
1021
|
+
return handleError(function (arg0, arg1, arg2) {
|
1022
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
818
1023
|
return addHeapObject(ret);
|
819
1024
|
}, arguments);
|
820
1025
|
}
|
821
1026
|
|
822
|
-
export function
|
823
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
824
|
-
return addHeapObject(ret);
|
825
|
-
}
|
826
|
-
|
827
|
-
export function __wbg_call_a9ef466721e824f2() {
|
1027
|
+
export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
|
828
1028
|
return handleError(function (arg0, arg1) {
|
829
|
-
const ret = getObject(arg0)
|
1029
|
+
const ret = new Blob(getObject(arg0), getObject(arg1));
|
830
1030
|
return addHeapObject(ret);
|
831
1031
|
}, arguments);
|
832
1032
|
}
|
833
1033
|
|
834
|
-
export function
|
835
|
-
const ret =
|
1034
|
+
export function __wbg_next_25feadfc0913fea9(arg0) {
|
1035
|
+
const ret = getObject(arg0).next;
|
836
1036
|
return addHeapObject(ret);
|
837
1037
|
}
|
838
1038
|
|
839
|
-
export function
|
840
|
-
return handleError(function (arg0
|
841
|
-
const ret =
|
1039
|
+
export function __wbg_next_6574e1a8a62d1055() {
|
1040
|
+
return handleError(function (arg0) {
|
1041
|
+
const ret = getObject(arg0).next();
|
842
1042
|
return addHeapObject(ret);
|
843
1043
|
}, arguments);
|
844
1044
|
}
|
845
1045
|
|
846
|
-
export function
|
847
|
-
const ret =
|
848
|
-
return ret;
|
849
|
-
}
|
850
|
-
|
851
|
-
export function __wbg_next_13b477da1eaa3897(arg0) {
|
852
|
-
const ret = getObject(arg0).next;
|
1046
|
+
export function __wbg_node_02999533c4ea02e3(arg0) {
|
1047
|
+
const ret = getObject(arg0).node;
|
853
1048
|
return addHeapObject(ret);
|
854
1049
|
}
|
855
1050
|
|
856
|
-
export function
|
857
|
-
const ret =
|
1051
|
+
export function __wbg_process_5c1d670bc53614b8(arg0) {
|
1052
|
+
const ret = getObject(arg0).process;
|
858
1053
|
return addHeapObject(ret);
|
859
1054
|
}
|
860
1055
|
|
861
|
-
export function
|
1056
|
+
export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
|
862
1057
|
const ret = getObject(arg0).push(getObject(arg1));
|
863
1058
|
return ret;
|
864
1059
|
}
|
865
1060
|
|
866
|
-
export function
|
867
|
-
|
868
|
-
try {
|
869
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
870
|
-
} catch (_) {
|
871
|
-
result = false;
|
872
|
-
}
|
873
|
-
const ret = result;
|
874
|
-
return ret;
|
1061
|
+
export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
|
1062
|
+
queueMicrotask(getObject(arg0));
|
875
1063
|
}
|
876
1064
|
|
877
|
-
export function
|
878
|
-
const ret =
|
1065
|
+
export function __wbg_queueMicrotask_d3219def82552485(arg0) {
|
1066
|
+
const ret = getObject(arg0).queueMicrotask;
|
879
1067
|
return addHeapObject(ret);
|
880
1068
|
}
|
881
1069
|
|
882
|
-
export function
|
1070
|
+
export function __wbg_randomFillSync_ab2cfe79ebbf2740() {
|
883
1071
|
return handleError(function (arg0, arg1) {
|
884
|
-
|
885
|
-
|
1072
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
1073
|
+
}, arguments);
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
export function __wbg_require_79b1e9274cde3c87() {
|
1077
|
+
return handleError(function () {
|
1078
|
+
const ret = module.require;
|
1079
|
+
return addHeapObject(ret);
|
886
1080
|
}, arguments);
|
887
1081
|
}
|
888
1082
|
|
889
|
-
export function
|
1083
|
+
export function __wbg_resolve_4851785c9c5f573d(arg0) {
|
890
1084
|
const ret = Promise.resolve(getObject(arg0));
|
891
1085
|
return addHeapObject(ret);
|
892
1086
|
}
|
893
1087
|
|
894
|
-
export function
|
895
|
-
|
896
|
-
return addHeapObject(ret);
|
1088
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
1089
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
897
1090
|
}
|
898
1091
|
|
899
|
-
export function
|
900
|
-
|
901
|
-
return addHeapObject(ret);
|
1092
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
1093
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
902
1094
|
}
|
903
1095
|
|
904
|
-
export function
|
905
|
-
|
906
|
-
return addHeapObject(ret);
|
1096
|
+
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
1097
|
+
getObject(arg0).body = getObject(arg1);
|
907
1098
|
}
|
908
1099
|
|
909
|
-
export function
|
910
|
-
|
911
|
-
return addHeapObject(ret);
|
1100
|
+
export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
|
1101
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
912
1102
|
}
|
913
1103
|
|
914
|
-
export function
|
915
|
-
|
916
|
-
return addHeapObject(ret);
|
1104
|
+
export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
|
1105
|
+
getObject(arg0).headers = getObject(arg1);
|
917
1106
|
}
|
918
1107
|
|
919
|
-
export function
|
920
|
-
|
921
|
-
return ret;
|
1108
|
+
export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
|
1109
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
922
1110
|
}
|
923
1111
|
|
924
|
-
export function
|
925
|
-
|
926
|
-
return addHeapObject(ret);
|
1112
|
+
export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
|
1113
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
927
1114
|
}
|
928
1115
|
|
929
|
-
export function
|
930
|
-
|
1116
|
+
export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
|
1117
|
+
let deferred0_0;
|
1118
|
+
let deferred0_1;
|
1119
|
+
try {
|
1120
|
+
deferred0_0 = arg1;
|
1121
|
+
deferred0_1 = arg2;
|
1122
|
+
getObject(arg0).name = getStringFromWasm0(arg1, arg2);
|
1123
|
+
} finally {
|
1124
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
1125
|
+
}
|
931
1126
|
}
|
932
1127
|
|
933
|
-
export function
|
934
|
-
|
1128
|
+
export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
|
1129
|
+
getObject(arg0).signal = getObject(arg1);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
|
1133
|
+
getObject(arg0).type = getStringFromWasm0(arg1, arg2);
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
|
1137
|
+
let deferred0_0;
|
1138
|
+
let deferred0_1;
|
935
1139
|
try {
|
936
|
-
|
937
|
-
|
938
|
-
|
1140
|
+
deferred0_0 = arg1;
|
1141
|
+
deferred0_1 = arg2;
|
1142
|
+
getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
|
1143
|
+
} finally {
|
1144
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
939
1145
|
}
|
940
|
-
const ret = result;
|
941
|
-
return ret;
|
942
1146
|
}
|
943
1147
|
|
944
|
-
export function
|
945
|
-
|
946
|
-
|
947
|
-
return addHeapObject(ret);
|
948
|
-
}, arguments);
|
1148
|
+
export function __wbg_signal_aaf9ad74119f20a4(arg0) {
|
1149
|
+
const ret = getObject(arg0).signal;
|
1150
|
+
return addHeapObject(ret);
|
949
1151
|
}
|
950
1152
|
|
951
|
-
export function
|
952
|
-
|
953
|
-
|
954
|
-
|
1153
|
+
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
1154
|
+
const ret = getObject(arg1).stack;
|
1155
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1156
|
+
const len1 = WASM_VECTOR_LEN;
|
1157
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
1158
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
955
1159
|
}
|
956
1160
|
|
957
|
-
export function
|
958
|
-
|
1161
|
+
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
|
1162
|
+
const ret = typeof global === "undefined" ? null : global;
|
1163
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
959
1164
|
}
|
960
1165
|
|
961
|
-
export function
|
962
|
-
|
963
|
-
|
1166
|
+
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
|
1167
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
1168
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
|
1172
|
+
const ret = typeof self === "undefined" ? null : self;
|
1173
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
|
1177
|
+
const ret = typeof window === "undefined" ? null : window;
|
1178
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
1179
|
+
}
|
1180
|
+
|
1181
|
+
export function __wbg_status_f6360336ca686bf0(arg0) {
|
1182
|
+
const ret = getObject(arg0).status;
|
1183
|
+
return ret;
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
export function __wbg_stringify_f7ed6987935b4a24() {
|
1187
|
+
return handleError(function (arg0) {
|
1188
|
+
const ret = JSON.stringify(getObject(arg0));
|
964
1189
|
return addHeapObject(ret);
|
965
1190
|
}, arguments);
|
966
1191
|
}
|
967
1192
|
|
968
|
-
export function
|
969
|
-
|
970
|
-
|
971
|
-
}, arguments);
|
1193
|
+
export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
|
1194
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
1195
|
+
return addHeapObject(ret);
|
972
1196
|
}
|
973
1197
|
|
974
|
-
export function
|
975
|
-
return handleError(function (arg0
|
976
|
-
getObject(arg0).
|
977
|
-
|
978
|
-
getObject(arg3),
|
979
|
-
getStringFromWasm0(arg4, arg5),
|
980
|
-
);
|
1198
|
+
export function __wbg_text_7805bea50de2af49() {
|
1199
|
+
return handleError(function (arg0) {
|
1200
|
+
const ret = getObject(arg0).text();
|
1201
|
+
return addHeapObject(ret);
|
981
1202
|
}, arguments);
|
982
1203
|
}
|
983
1204
|
|
984
|
-
export function
|
985
|
-
const ret =
|
1205
|
+
export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
|
1206
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
986
1207
|
return addHeapObject(ret);
|
987
1208
|
}
|
988
1209
|
|
989
|
-
export function
|
990
|
-
const ret = getObject(arg0).
|
1210
|
+
export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
|
1211
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
991
1212
|
return addHeapObject(ret);
|
992
1213
|
}
|
993
1214
|
|
994
|
-
export function
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
1215
|
+
export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
|
1216
|
+
const ret = getObject(arg1).url;
|
1217
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1218
|
+
const len1 = WASM_VECTOR_LEN;
|
1219
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
1220
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
1224
|
+
const ret = getObject(arg0).value;
|
1225
|
+
return addHeapObject(ret);
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
export function __wbg_versions_c71aa1626a93e0a1(arg0) {
|
1229
|
+
const ret = getObject(arg0).versions;
|
1230
|
+
return addHeapObject(ret);
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
|
1234
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
1235
|
+
}
|
1236
|
+
|
1237
|
+
export function __wbindgen_as_number(arg0) {
|
1238
|
+
const ret = +getObject(arg0);
|
1239
|
+
return ret;
|
999
1240
|
}
|
1000
1241
|
|
1001
1242
|
export function __wbindgen_boolean_get(arg0) {
|
@@ -1004,19 +1245,19 @@ export function __wbindgen_boolean_get(arg0) {
|
|
1004
1245
|
return ret;
|
1005
1246
|
}
|
1006
1247
|
|
1007
|
-
export function
|
1008
|
-
const obj =
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1248
|
+
export function __wbindgen_cb_drop(arg0) {
|
1249
|
+
const obj = takeObject(arg0).original;
|
1250
|
+
if (obj.cnt-- == 1) {
|
1251
|
+
obj.a = 0;
|
1252
|
+
return true;
|
1253
|
+
}
|
1254
|
+
const ret = false;
|
1255
|
+
return ret;
|
1012
1256
|
}
|
1013
1257
|
|
1014
|
-
export function
|
1015
|
-
const ret =
|
1016
|
-
|
1017
|
-
const len1 = WASM_VECTOR_LEN;
|
1018
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
1019
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
1258
|
+
export function __wbindgen_closure_wrapper2045(arg0, arg1, arg2) {
|
1259
|
+
const ret = makeMutClosure(arg0, arg1, 552, __wbg_adapter_38);
|
1260
|
+
return addHeapObject(ret);
|
1020
1261
|
}
|
1021
1262
|
|
1022
1263
|
export function __wbindgen_debug_string(arg0, arg1) {
|
@@ -1027,47 +1268,79 @@ export function __wbindgen_debug_string(arg0, arg1) {
|
|
1027
1268
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
1028
1269
|
}
|
1029
1270
|
|
1030
|
-
export function
|
1031
|
-
|
1271
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
1272
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1273
|
+
return addHeapObject(ret);
|
1032
1274
|
}
|
1033
1275
|
|
1034
|
-
export function
|
1035
|
-
const ret = getObject(arg0)
|
1036
|
-
return
|
1276
|
+
export function __wbindgen_in(arg0, arg1) {
|
1277
|
+
const ret = getObject(arg0) in getObject(arg1);
|
1278
|
+
return ret;
|
1037
1279
|
}
|
1038
1280
|
|
1039
|
-
export function
|
1040
|
-
|
1281
|
+
export function __wbindgen_is_function(arg0) {
|
1282
|
+
const ret = typeof getObject(arg0) === "function";
|
1283
|
+
return ret;
|
1041
1284
|
}
|
1042
1285
|
|
1043
|
-
export function
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
}, arguments);
|
1286
|
+
export function __wbindgen_is_object(arg0) {
|
1287
|
+
const val = getObject(arg0);
|
1288
|
+
const ret = typeof val === "object" && val !== null;
|
1289
|
+
return ret;
|
1048
1290
|
}
|
1049
1291
|
|
1050
|
-
export function
|
1051
|
-
|
1292
|
+
export function __wbindgen_is_string(arg0) {
|
1293
|
+
const ret = typeof getObject(arg0) === "string";
|
1294
|
+
return ret;
|
1052
1295
|
}
|
1053
1296
|
|
1054
|
-
export function
|
1055
|
-
|
1297
|
+
export function __wbindgen_is_undefined(arg0) {
|
1298
|
+
const ret = getObject(arg0) === undefined;
|
1299
|
+
return ret;
|
1056
1300
|
}
|
1057
1301
|
|
1058
|
-
export function
|
1059
|
-
|
1302
|
+
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
1303
|
+
const ret = getObject(arg0) == getObject(arg1);
|
1304
|
+
return ret;
|
1060
1305
|
}
|
1061
1306
|
|
1062
|
-
export function
|
1063
|
-
|
1307
|
+
export function __wbindgen_memory() {
|
1308
|
+
const ret = wasm.memory;
|
1309
|
+
return addHeapObject(ret);
|
1064
1310
|
}
|
1065
1311
|
|
1066
|
-
export function
|
1067
|
-
|
1312
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
1313
|
+
const obj = getObject(arg1);
|
1314
|
+
const ret = typeof obj === "number" ? obj : undefined;
|
1315
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
1316
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
1320
|
+
const ret = getObject(arg0);
|
1321
|
+
return addHeapObject(ret);
|
1322
|
+
}
|
1323
|
+
|
1324
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
1325
|
+
takeObject(arg0);
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
1329
|
+
const obj = getObject(arg1);
|
1330
|
+
const ret = typeof obj === "string" ? obj : undefined;
|
1331
|
+
var ptr1 = isLikeNone(ret)
|
1332
|
+
? 0
|
1333
|
+
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1334
|
+
var len1 = WASM_VECTOR_LEN;
|
1335
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
1336
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
1068
1337
|
}
|
1069
1338
|
|
1070
|
-
export function
|
1071
|
-
const ret =
|
1339
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1340
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1072
1341
|
return addHeapObject(ret);
|
1073
1342
|
}
|
1343
|
+
|
1344
|
+
export function __wbindgen_throw(arg0, arg1) {
|
1345
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
1346
|
+
}
|