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