@bitwarden/sdk-internal 0.2.0-main.16 → 0.2.0-main.161
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 +1055 -69
- package/bitwarden_wasm_internal_bg.js +2540 -587
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +209 -37
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +1055 -69
- package/node/bitwarden_wasm_internal.js +2561 -595
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +209 -37
- package/package.json +5 -4
|
@@ -3,12 +3,15 @@ export function __wbg_set_wasm(val) {
|
|
|
3
3
|
wasm = val;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
|
|
6
|
+
const heap = new Array(128).fill(undefined);
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
heap.push(undefined, null, true, false);
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
function getObject(idx) {
|
|
11
|
+
return heap[idx];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let WASM_VECTOR_LEN = 0;
|
|
12
15
|
|
|
13
16
|
let cachedUint8ArrayMemory0 = null;
|
|
14
17
|
|
|
@@ -19,44 +22,6 @@ function getUint8ArrayMemory0() {
|
|
|
19
22
|
return cachedUint8ArrayMemory0;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
function getStringFromWasm0(ptr, len) {
|
|
23
|
-
ptr = ptr >>> 0;
|
|
24
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const heap = new Array(128).fill(undefined);
|
|
28
|
-
|
|
29
|
-
heap.push(undefined, null, true, false);
|
|
30
|
-
|
|
31
|
-
let heap_next = heap.length;
|
|
32
|
-
|
|
33
|
-
function addHeapObject(obj) {
|
|
34
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
35
|
-
const idx = heap_next;
|
|
36
|
-
heap_next = heap[idx];
|
|
37
|
-
|
|
38
|
-
heap[idx] = obj;
|
|
39
|
-
return idx;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getObject(idx) {
|
|
43
|
-
return heap[idx];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function dropObject(idx) {
|
|
47
|
-
if (idx < 132) return;
|
|
48
|
-
heap[idx] = heap_next;
|
|
49
|
-
heap_next = idx;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function takeObject(idx) {
|
|
53
|
-
const ret = getObject(idx);
|
|
54
|
-
dropObject(idx);
|
|
55
|
-
return ret;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let WASM_VECTOR_LEN = 0;
|
|
59
|
-
|
|
60
25
|
const lTextEncoder =
|
|
61
26
|
typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder;
|
|
62
27
|
|
|
@@ -116,10 +81,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
116
81
|
return ptr;
|
|
117
82
|
}
|
|
118
83
|
|
|
119
|
-
function isLikeNone(x) {
|
|
120
|
-
return x === undefined || x === null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
84
|
let cachedDataViewMemory0 = null;
|
|
124
85
|
|
|
125
86
|
function getDataViewMemory0() {
|
|
@@ -134,6 +95,90 @@ function getDataViewMemory0() {
|
|
|
134
95
|
return cachedDataViewMemory0;
|
|
135
96
|
}
|
|
136
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
|
+
|
|
110
|
+
let heap_next = heap.length;
|
|
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
|
+
|
|
129
|
+
function dropObject(idx) {
|
|
130
|
+
if (idx < 132) return;
|
|
131
|
+
heap[idx] = heap_next;
|
|
132
|
+
heap_next = idx;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function takeObject(idx) {
|
|
136
|
+
const ret = getObject(idx);
|
|
137
|
+
dropObject(idx);
|
|
138
|
+
return ret;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
142
|
+
ptr = ptr >>> 0;
|
|
143
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function isLikeNone(x) {
|
|
147
|
+
return x === undefined || x === null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const CLOSURE_DTORS =
|
|
151
|
+
typeof FinalizationRegistry === "undefined"
|
|
152
|
+
? { register: () => {}, unregister: () => {} }
|
|
153
|
+
: new FinalizationRegistry((state) => {
|
|
154
|
+
wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
158
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
159
|
+
const real = (...args) => {
|
|
160
|
+
// First up with a closure we increment the internal reference
|
|
161
|
+
// count. This ensures that the Rust closure environment won't
|
|
162
|
+
// be deallocated while we're invoking it.
|
|
163
|
+
state.cnt++;
|
|
164
|
+
const a = state.a;
|
|
165
|
+
state.a = 0;
|
|
166
|
+
try {
|
|
167
|
+
return f(a, state.b, ...args);
|
|
168
|
+
} finally {
|
|
169
|
+
if (--state.cnt === 0) {
|
|
170
|
+
wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
|
|
171
|
+
CLOSURE_DTORS.unregister(state);
|
|
172
|
+
} else {
|
|
173
|
+
state.a = a;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
real.original = state;
|
|
178
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
179
|
+
return real;
|
|
180
|
+
}
|
|
181
|
+
|
|
137
182
|
function debugString(val) {
|
|
138
183
|
// primitive types
|
|
139
184
|
const type = typeof val;
|
|
@@ -175,7 +220,7 @@ function debugString(val) {
|
|
|
175
220
|
// Test for built-in
|
|
176
221
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
177
222
|
let className;
|
|
178
|
-
if (builtInMatches.length > 1) {
|
|
223
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
179
224
|
className = builtInMatches[1];
|
|
180
225
|
} else {
|
|
181
226
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -199,45 +244,6 @@ function debugString(val) {
|
|
|
199
244
|
return className;
|
|
200
245
|
}
|
|
201
246
|
|
|
202
|
-
const CLOSURE_DTORS =
|
|
203
|
-
typeof FinalizationRegistry === "undefined"
|
|
204
|
-
? { register: () => {}, unregister: () => {} }
|
|
205
|
-
: new FinalizationRegistry((state) => {
|
|
206
|
-
wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
210
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
211
|
-
const real = (...args) => {
|
|
212
|
-
// First up with a closure we increment the internal reference
|
|
213
|
-
// count. This ensures that the Rust closure environment won't
|
|
214
|
-
// be deallocated while we're invoking it.
|
|
215
|
-
state.cnt++;
|
|
216
|
-
const a = state.a;
|
|
217
|
-
state.a = 0;
|
|
218
|
-
try {
|
|
219
|
-
return f(a, state.b, ...args);
|
|
220
|
-
} finally {
|
|
221
|
-
if (--state.cnt === 0) {
|
|
222
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
223
|
-
CLOSURE_DTORS.unregister(state);
|
|
224
|
-
} else {
|
|
225
|
-
state.a = a;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
real.original = state;
|
|
230
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
231
|
-
return real;
|
|
232
|
-
}
|
|
233
|
-
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
234
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcab43b83560065d8(
|
|
235
|
-
arg0,
|
|
236
|
-
arg1,
|
|
237
|
-
addHeapObject(arg2),
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
247
|
let stack_pointer = 128;
|
|
242
248
|
|
|
243
249
|
function addBorrowedObject(obj) {
|
|
@@ -249,9 +255,9 @@ function addBorrowedObject(obj) {
|
|
|
249
255
|
* @param {any} error
|
|
250
256
|
* @returns {boolean}
|
|
251
257
|
*/
|
|
252
|
-
export function
|
|
258
|
+
export function isEncryptionSettingsError(error) {
|
|
253
259
|
try {
|
|
254
|
-
const ret = wasm.
|
|
260
|
+
const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
|
|
255
261
|
return ret !== 0;
|
|
256
262
|
} finally {
|
|
257
263
|
heap[stack_pointer++] = undefined;
|
|
@@ -262,22 +268,41 @@ export function isCoreError(error) {
|
|
|
262
268
|
* @param {any} error
|
|
263
269
|
* @returns {boolean}
|
|
264
270
|
*/
|
|
265
|
-
export function
|
|
271
|
+
export function isCryptoError(error) {
|
|
266
272
|
try {
|
|
267
|
-
const ret = wasm.
|
|
273
|
+
const ret = wasm.isCryptoError(addBorrowedObject(error));
|
|
268
274
|
return ret !== 0;
|
|
269
275
|
} finally {
|
|
270
276
|
heap[stack_pointer++] = undefined;
|
|
271
277
|
}
|
|
272
278
|
}
|
|
273
279
|
|
|
280
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
281
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
282
|
+
const mem = getDataViewMemory0();
|
|
283
|
+
for (let i = 0; i < array.length; i++) {
|
|
284
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
285
|
+
}
|
|
286
|
+
WASM_VECTOR_LEN = array.length;
|
|
287
|
+
return ptr;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
291
|
+
ptr = ptr >>> 0;
|
|
292
|
+
const mem = getDataViewMemory0();
|
|
293
|
+
const result = [];
|
|
294
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
295
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
296
|
+
}
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
274
299
|
/**
|
|
275
300
|
* @param {any} error
|
|
276
301
|
* @returns {boolean}
|
|
277
302
|
*/
|
|
278
|
-
export function
|
|
303
|
+
export function isExportError(error) {
|
|
279
304
|
try {
|
|
280
|
-
const ret = wasm.
|
|
305
|
+
const ret = wasm.isExportError(addBorrowedObject(error));
|
|
281
306
|
return ret !== 0;
|
|
282
307
|
} finally {
|
|
283
308
|
heap[stack_pointer++] = undefined;
|
|
@@ -288,9 +313,9 @@ export function isKeyGenerationError(error) {
|
|
|
288
313
|
* @param {any} error
|
|
289
314
|
* @returns {boolean}
|
|
290
315
|
*/
|
|
291
|
-
export function
|
|
316
|
+
export function isUsernameError(error) {
|
|
292
317
|
try {
|
|
293
|
-
const ret = wasm.
|
|
318
|
+
const ret = wasm.isUsernameError(addBorrowedObject(error));
|
|
294
319
|
return ret !== 0;
|
|
295
320
|
} finally {
|
|
296
321
|
heap[stack_pointer++] = undefined;
|
|
@@ -298,248 +323,2042 @@ export function isTestError(error) {
|
|
|
298
323
|
}
|
|
299
324
|
|
|
300
325
|
/**
|
|
301
|
-
* @param {
|
|
302
|
-
* @returns {
|
|
326
|
+
* @param {any} error
|
|
327
|
+
* @returns {boolean}
|
|
303
328
|
*/
|
|
304
|
-
export function
|
|
329
|
+
export function isPasswordError(error) {
|
|
305
330
|
try {
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
309
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
310
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
311
|
-
if (r2) {
|
|
312
|
-
throw takeObject(r1);
|
|
313
|
-
}
|
|
314
|
-
return takeObject(r0);
|
|
331
|
+
const ret = wasm.isPasswordError(addBorrowedObject(error));
|
|
332
|
+
return ret !== 0;
|
|
315
333
|
} finally {
|
|
316
|
-
|
|
334
|
+
heap[stack_pointer++] = undefined;
|
|
317
335
|
}
|
|
318
336
|
}
|
|
319
337
|
|
|
320
|
-
|
|
338
|
+
/**
|
|
339
|
+
* @param {any} error
|
|
340
|
+
* @returns {boolean}
|
|
341
|
+
*/
|
|
342
|
+
export function isPassphraseError(error) {
|
|
321
343
|
try {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
344
|
+
const ret = wasm.isPassphraseError(addBorrowedObject(error));
|
|
345
|
+
return ret !== 0;
|
|
346
|
+
} finally {
|
|
347
|
+
heap[stack_pointer++] = undefined;
|
|
325
348
|
}
|
|
326
349
|
}
|
|
327
|
-
function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
|
|
328
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
|
|
329
|
-
arg0,
|
|
330
|
-
arg1,
|
|
331
|
-
addHeapObject(arg2),
|
|
332
|
-
addHeapObject(arg3),
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
export const LogLevel = Object.freeze({
|
|
337
|
-
Trace: 0,
|
|
338
|
-
0: "Trace",
|
|
339
|
-
Debug: 1,
|
|
340
|
-
1: "Debug",
|
|
341
|
-
Info: 2,
|
|
342
|
-
2: "Info",
|
|
343
|
-
Warn: 3,
|
|
344
|
-
3: "Warn",
|
|
345
|
-
Error: 4,
|
|
346
|
-
4: "Error",
|
|
347
|
-
});
|
|
348
|
-
|
|
349
|
-
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
350
|
-
|
|
351
|
-
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
352
350
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
351
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
352
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
353
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
354
|
+
WASM_VECTOR_LEN = arg.length;
|
|
355
|
+
return ptr;
|
|
356
|
+
}
|
|
357
357
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
358
|
+
function _assertClass(instance, klass) {
|
|
359
|
+
if (!(instance instanceof klass)) {
|
|
360
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @param {any} error
|
|
365
|
+
* @returns {boolean}
|
|
366
|
+
*/
|
|
367
|
+
export function isChannelError(error) {
|
|
368
|
+
try {
|
|
369
|
+
const ret = wasm.isChannelError(addBorrowedObject(error));
|
|
370
|
+
return ret !== 0;
|
|
371
|
+
} finally {
|
|
372
|
+
heap[stack_pointer++] = undefined;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* @param {any} error
|
|
378
|
+
* @returns {boolean}
|
|
379
|
+
*/
|
|
380
|
+
export function isDeserializeError(error) {
|
|
381
|
+
try {
|
|
382
|
+
const ret = wasm.isDeserializeError(addBorrowedObject(error));
|
|
383
|
+
return ret !== 0;
|
|
384
|
+
} finally {
|
|
385
|
+
heap[stack_pointer++] = undefined;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* @param {any} error
|
|
391
|
+
* @returns {boolean}
|
|
392
|
+
*/
|
|
393
|
+
export function isSshKeyExportError(error) {
|
|
394
|
+
try {
|
|
395
|
+
const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
|
|
396
|
+
return ret !== 0;
|
|
397
|
+
} finally {
|
|
398
|
+
heap[stack_pointer++] = undefined;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @param {any} error
|
|
404
|
+
* @returns {boolean}
|
|
405
|
+
*/
|
|
406
|
+
export function isSshKeyImportError(error) {
|
|
407
|
+
try {
|
|
408
|
+
const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
|
|
409
|
+
return ret !== 0;
|
|
410
|
+
} finally {
|
|
411
|
+
heap[stack_pointer++] = undefined;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @param {any} error
|
|
417
|
+
* @returns {boolean}
|
|
418
|
+
*/
|
|
419
|
+
export function isKeyGenerationError(error) {
|
|
420
|
+
try {
|
|
421
|
+
const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
|
|
422
|
+
return ret !== 0;
|
|
423
|
+
} finally {
|
|
424
|
+
heap[stack_pointer++] = undefined;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @param {any} error
|
|
430
|
+
* @returns {boolean}
|
|
431
|
+
*/
|
|
432
|
+
export function isDecryptError(error) {
|
|
433
|
+
try {
|
|
434
|
+
const ret = wasm.isDecryptError(addBorrowedObject(error));
|
|
435
|
+
return ret !== 0;
|
|
436
|
+
} finally {
|
|
437
|
+
heap[stack_pointer++] = undefined;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @param {any} error
|
|
443
|
+
* @returns {boolean}
|
|
444
|
+
*/
|
|
445
|
+
export function isEncryptError(error) {
|
|
446
|
+
try {
|
|
447
|
+
const ret = wasm.isEncryptError(addBorrowedObject(error));
|
|
448
|
+
return ret !== 0;
|
|
449
|
+
} finally {
|
|
450
|
+
heap[stack_pointer++] = undefined;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @param {any} error
|
|
456
|
+
* @returns {boolean}
|
|
457
|
+
*/
|
|
458
|
+
export function isTotpError(error) {
|
|
459
|
+
try {
|
|
460
|
+
const ret = wasm.isTotpError(addBorrowedObject(error));
|
|
461
|
+
return ret !== 0;
|
|
462
|
+
} finally {
|
|
463
|
+
heap[stack_pointer++] = undefined;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @param {any} error
|
|
469
|
+
* @returns {boolean}
|
|
470
|
+
*/
|
|
471
|
+
export function isCipherError(error) {
|
|
472
|
+
try {
|
|
473
|
+
const ret = wasm.isCipherError(addBorrowedObject(error));
|
|
474
|
+
return ret !== 0;
|
|
475
|
+
} finally {
|
|
476
|
+
heap[stack_pointer++] = undefined;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @param {any} error
|
|
482
|
+
* @returns {boolean}
|
|
483
|
+
*/
|
|
484
|
+
export function isDecryptFileError(error) {
|
|
485
|
+
try {
|
|
486
|
+
const ret = wasm.isDecryptFileError(addBorrowedObject(error));
|
|
487
|
+
return ret !== 0;
|
|
488
|
+
} finally {
|
|
489
|
+
heap[stack_pointer++] = undefined;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @param {any} error
|
|
495
|
+
* @returns {boolean}
|
|
496
|
+
*/
|
|
497
|
+
export function isEncryptFileError(error) {
|
|
498
|
+
try {
|
|
499
|
+
const ret = wasm.isEncryptFileError(addBorrowedObject(error));
|
|
500
|
+
return ret !== 0;
|
|
501
|
+
} finally {
|
|
502
|
+
heap[stack_pointer++] = undefined;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @param {LogLevel} level
|
|
508
|
+
*/
|
|
509
|
+
export function set_log_level(level) {
|
|
510
|
+
wasm.set_log_level(level);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @param {LogLevel | null} [log_level]
|
|
515
|
+
*/
|
|
516
|
+
export function init_sdk(log_level) {
|
|
517
|
+
wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Generate a new SSH key pair
|
|
522
|
+
*
|
|
523
|
+
* # Arguments
|
|
524
|
+
* - `key_algorithm` - The algorithm to use for the key pair
|
|
525
|
+
*
|
|
526
|
+
* # Returns
|
|
527
|
+
* - `Ok(SshKey)` if the key was successfully generated
|
|
528
|
+
* - `Err(KeyGenerationError)` if the key could not be generated
|
|
529
|
+
* @param {KeyAlgorithm} key_algorithm
|
|
530
|
+
* @returns {SshKeyView}
|
|
531
|
+
*/
|
|
532
|
+
export function generate_ssh_key(key_algorithm) {
|
|
533
|
+
try {
|
|
534
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
535
|
+
wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
|
|
536
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
537
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
538
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
539
|
+
if (r2) {
|
|
540
|
+
throw takeObject(r1);
|
|
541
|
+
}
|
|
542
|
+
return takeObject(r0);
|
|
543
|
+
} finally {
|
|
544
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
|
|
550
|
+
* to an OpenSSH private key with public key and fingerprint
|
|
551
|
+
*
|
|
552
|
+
* # Arguments
|
|
553
|
+
* - `imported_key` - The private key to convert
|
|
554
|
+
* - `password` - The password to use for decrypting the key
|
|
555
|
+
*
|
|
556
|
+
* # Returns
|
|
557
|
+
* - `Ok(SshKey)` if the key was successfully coneverted
|
|
558
|
+
* - `Err(PasswordRequired)` if the key is encrypted and no password was provided
|
|
559
|
+
* - `Err(WrongPassword)` if the password provided is incorrect
|
|
560
|
+
* - `Err(ParsingError)` if the key could not be parsed
|
|
561
|
+
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
|
562
|
+
* @param {string} imported_key
|
|
563
|
+
* @param {string | null} [password]
|
|
564
|
+
* @returns {SshKeyView}
|
|
565
|
+
*/
|
|
566
|
+
export function import_ssh_key(imported_key, password) {
|
|
567
|
+
try {
|
|
568
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
569
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
570
|
+
const len0 = WASM_VECTOR_LEN;
|
|
571
|
+
var ptr1 = isLikeNone(password)
|
|
572
|
+
? 0
|
|
573
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
574
|
+
var len1 = WASM_VECTOR_LEN;
|
|
575
|
+
wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
|
|
576
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
577
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
578
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
579
|
+
if (r2) {
|
|
580
|
+
throw takeObject(r1);
|
|
581
|
+
}
|
|
582
|
+
return takeObject(r0);
|
|
583
|
+
} finally {
|
|
584
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @param {any} error
|
|
590
|
+
* @returns {boolean}
|
|
591
|
+
*/
|
|
592
|
+
export function isTestError(error) {
|
|
593
|
+
try {
|
|
594
|
+
const ret = wasm.isTestError(addBorrowedObject(error));
|
|
595
|
+
return ret !== 0;
|
|
596
|
+
} finally {
|
|
597
|
+
heap[stack_pointer++] = undefined;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
function __wbg_adapter_50(arg0, arg1) {
|
|
602
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbd39acb59da78aff(
|
|
603
|
+
arg0,
|
|
604
|
+
arg1,
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function __wbg_adapter_53(arg0, arg1, arg2) {
|
|
609
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1fa3d18f05e030bb(
|
|
610
|
+
arg0,
|
|
611
|
+
arg1,
|
|
612
|
+
addHeapObject(arg2),
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
function __wbg_adapter_238(arg0, arg1, arg2, arg3) {
|
|
617
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2a33b0877ef96682(
|
|
618
|
+
arg0,
|
|
619
|
+
arg1,
|
|
620
|
+
addHeapObject(arg2),
|
|
621
|
+
addHeapObject(arg3),
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* @enum {300 | 301 | 302 | 303 | 304 | 305}
|
|
627
|
+
*/
|
|
628
|
+
export const CardLinkedIdType = Object.freeze({
|
|
629
|
+
CardholderName: 300,
|
|
630
|
+
300: "CardholderName",
|
|
631
|
+
ExpMonth: 301,
|
|
632
|
+
301: "ExpMonth",
|
|
633
|
+
ExpYear: 302,
|
|
634
|
+
302: "ExpYear",
|
|
635
|
+
Code: 303,
|
|
636
|
+
303: "Code",
|
|
637
|
+
Brand: 304,
|
|
638
|
+
304: "Brand",
|
|
639
|
+
Number: 305,
|
|
640
|
+
305: "Number",
|
|
641
|
+
});
|
|
642
|
+
/**
|
|
643
|
+
* @enum {0 | 1}
|
|
644
|
+
*/
|
|
645
|
+
export const CipherRepromptType = Object.freeze({
|
|
646
|
+
None: 0,
|
|
647
|
+
0: "None",
|
|
648
|
+
Password: 1,
|
|
649
|
+
1: "Password",
|
|
650
|
+
});
|
|
651
|
+
/**
|
|
652
|
+
* @enum {1 | 2 | 3 | 4 | 5}
|
|
653
|
+
*/
|
|
654
|
+
export const CipherType = Object.freeze({
|
|
655
|
+
Login: 1,
|
|
656
|
+
1: "Login",
|
|
657
|
+
SecureNote: 2,
|
|
658
|
+
2: "SecureNote",
|
|
659
|
+
Card: 3,
|
|
660
|
+
3: "Card",
|
|
661
|
+
Identity: 4,
|
|
662
|
+
4: "Identity",
|
|
663
|
+
SshKey: 5,
|
|
664
|
+
5: "SshKey",
|
|
665
|
+
});
|
|
666
|
+
/**
|
|
667
|
+
* @enum {0 | 1 | 2 | 3}
|
|
668
|
+
*/
|
|
669
|
+
export const FieldType = Object.freeze({
|
|
670
|
+
Text: 0,
|
|
671
|
+
0: "Text",
|
|
672
|
+
Hidden: 1,
|
|
673
|
+
1: "Hidden",
|
|
674
|
+
Boolean: 2,
|
|
675
|
+
2: "Boolean",
|
|
676
|
+
Linked: 3,
|
|
677
|
+
3: "Linked",
|
|
678
|
+
});
|
|
679
|
+
/**
|
|
680
|
+
* @enum {400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418}
|
|
681
|
+
*/
|
|
682
|
+
export const IdentityLinkedIdType = Object.freeze({
|
|
683
|
+
Title: 400,
|
|
684
|
+
400: "Title",
|
|
685
|
+
MiddleName: 401,
|
|
686
|
+
401: "MiddleName",
|
|
687
|
+
Address1: 402,
|
|
688
|
+
402: "Address1",
|
|
689
|
+
Address2: 403,
|
|
690
|
+
403: "Address2",
|
|
691
|
+
Address3: 404,
|
|
692
|
+
404: "Address3",
|
|
693
|
+
City: 405,
|
|
694
|
+
405: "City",
|
|
695
|
+
State: 406,
|
|
696
|
+
406: "State",
|
|
697
|
+
PostalCode: 407,
|
|
698
|
+
407: "PostalCode",
|
|
699
|
+
Country: 408,
|
|
700
|
+
408: "Country",
|
|
701
|
+
Company: 409,
|
|
702
|
+
409: "Company",
|
|
703
|
+
Email: 410,
|
|
704
|
+
410: "Email",
|
|
705
|
+
Phone: 411,
|
|
706
|
+
411: "Phone",
|
|
707
|
+
Ssn: 412,
|
|
708
|
+
412: "Ssn",
|
|
709
|
+
Username: 413,
|
|
710
|
+
413: "Username",
|
|
711
|
+
PassportNumber: 414,
|
|
712
|
+
414: "PassportNumber",
|
|
713
|
+
LicenseNumber: 415,
|
|
714
|
+
415: "LicenseNumber",
|
|
715
|
+
FirstName: 416,
|
|
716
|
+
416: "FirstName",
|
|
717
|
+
LastName: 417,
|
|
718
|
+
417: "LastName",
|
|
719
|
+
FullName: 418,
|
|
720
|
+
418: "FullName",
|
|
721
|
+
});
|
|
722
|
+
/**
|
|
723
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
724
|
+
*/
|
|
725
|
+
export const LogLevel = Object.freeze({
|
|
726
|
+
Trace: 0,
|
|
727
|
+
0: "Trace",
|
|
728
|
+
Debug: 1,
|
|
729
|
+
1: "Debug",
|
|
730
|
+
Info: 2,
|
|
731
|
+
2: "Info",
|
|
732
|
+
Warn: 3,
|
|
733
|
+
3: "Warn",
|
|
734
|
+
Error: 4,
|
|
735
|
+
4: "Error",
|
|
736
|
+
});
|
|
737
|
+
/**
|
|
738
|
+
* @enum {100 | 101}
|
|
739
|
+
*/
|
|
740
|
+
export const LoginLinkedIdType = Object.freeze({
|
|
741
|
+
Username: 100,
|
|
742
|
+
100: "Username",
|
|
743
|
+
Password: 101,
|
|
744
|
+
101: "Password",
|
|
745
|
+
});
|
|
746
|
+
/**
|
|
747
|
+
* @enum {0}
|
|
748
|
+
*/
|
|
749
|
+
export const SecureNoteType = Object.freeze({
|
|
750
|
+
Generic: 0,
|
|
751
|
+
0: "Generic",
|
|
752
|
+
});
|
|
753
|
+
/**
|
|
754
|
+
* @enum {0 | 1 | 2 | 3 | 4 | 5}
|
|
755
|
+
*/
|
|
756
|
+
export const UriMatchType = Object.freeze({
|
|
757
|
+
Domain: 0,
|
|
758
|
+
0: "Domain",
|
|
759
|
+
Host: 1,
|
|
760
|
+
1: "Host",
|
|
761
|
+
StartsWith: 2,
|
|
762
|
+
2: "StartsWith",
|
|
763
|
+
Exact: 3,
|
|
764
|
+
3: "Exact",
|
|
765
|
+
RegularExpression: 4,
|
|
766
|
+
4: "RegularExpression",
|
|
767
|
+
Never: 5,
|
|
768
|
+
5: "Never",
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
772
|
+
|
|
773
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
774
|
+
|
|
775
|
+
const AttachmentsClientFinalization =
|
|
776
|
+
typeof FinalizationRegistry === "undefined"
|
|
777
|
+
? { register: () => {}, unregister: () => {} }
|
|
778
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_attachmentsclient_free(ptr >>> 0, 1));
|
|
779
|
+
|
|
780
|
+
export class AttachmentsClient {
|
|
781
|
+
static __wrap(ptr) {
|
|
782
|
+
ptr = ptr >>> 0;
|
|
783
|
+
const obj = Object.create(AttachmentsClient.prototype);
|
|
784
|
+
obj.__wbg_ptr = ptr;
|
|
785
|
+
AttachmentsClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
786
|
+
return obj;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
__destroy_into_raw() {
|
|
790
|
+
const ptr = this.__wbg_ptr;
|
|
791
|
+
this.__wbg_ptr = 0;
|
|
792
|
+
AttachmentsClientFinalization.unregister(this);
|
|
793
|
+
return ptr;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
free() {
|
|
797
|
+
const ptr = this.__destroy_into_raw();
|
|
798
|
+
wasm.__wbg_attachmentsclient_free(ptr, 0);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Decrypts an attachment's encrypted content
|
|
802
|
+
* @param {Cipher} cipher
|
|
803
|
+
* @param {AttachmentView} attachment
|
|
804
|
+
* @param {Uint8Array} encrypted_buffer
|
|
805
|
+
* @returns {Uint8Array}
|
|
806
|
+
*/
|
|
807
|
+
decrypt_buffer(cipher, attachment, encrypted_buffer) {
|
|
808
|
+
try {
|
|
809
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
810
|
+
const ptr0 = passArray8ToWasm0(encrypted_buffer, wasm.__wbindgen_malloc);
|
|
811
|
+
const len0 = WASM_VECTOR_LEN;
|
|
812
|
+
wasm.attachmentsclient_decrypt_buffer(
|
|
813
|
+
retptr,
|
|
814
|
+
this.__wbg_ptr,
|
|
815
|
+
addHeapObject(cipher),
|
|
816
|
+
addHeapObject(attachment),
|
|
817
|
+
ptr0,
|
|
818
|
+
len0,
|
|
819
|
+
);
|
|
820
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
821
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
822
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
823
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
824
|
+
if (r3) {
|
|
825
|
+
throw takeObject(r2);
|
|
826
|
+
}
|
|
827
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
828
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
829
|
+
return v2;
|
|
830
|
+
} finally {
|
|
831
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
const BitwardenClientFinalization =
|
|
837
|
+
typeof FinalizationRegistry === "undefined"
|
|
838
|
+
? { register: () => {}, unregister: () => {} }
|
|
839
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
|
|
840
|
+
|
|
841
|
+
export class BitwardenClient {
|
|
842
|
+
__destroy_into_raw() {
|
|
843
|
+
const ptr = this.__wbg_ptr;
|
|
844
|
+
this.__wbg_ptr = 0;
|
|
845
|
+
BitwardenClientFinalization.unregister(this);
|
|
846
|
+
return ptr;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
free() {
|
|
850
|
+
const ptr = this.__destroy_into_raw();
|
|
851
|
+
wasm.__wbg_bitwardenclient_free(ptr, 0);
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* @param {ClientSettings | null} [settings]
|
|
855
|
+
*/
|
|
856
|
+
constructor(settings) {
|
|
857
|
+
const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
|
|
858
|
+
this.__wbg_ptr = ret >>> 0;
|
|
859
|
+
BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
|
|
860
|
+
return this;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Test method, echoes back the input
|
|
864
|
+
* @param {string} msg
|
|
865
|
+
* @returns {string}
|
|
866
|
+
*/
|
|
867
|
+
echo(msg) {
|
|
868
|
+
let deferred2_0;
|
|
869
|
+
let deferred2_1;
|
|
870
|
+
try {
|
|
871
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
872
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
873
|
+
const len0 = WASM_VECTOR_LEN;
|
|
874
|
+
wasm.bitwardenclient_echo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
875
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
876
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
877
|
+
deferred2_0 = r0;
|
|
878
|
+
deferred2_1 = r1;
|
|
879
|
+
return getStringFromWasm0(r0, r1);
|
|
880
|
+
} finally {
|
|
881
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
882
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* @returns {string}
|
|
887
|
+
*/
|
|
888
|
+
version() {
|
|
889
|
+
let deferred1_0;
|
|
890
|
+
let deferred1_1;
|
|
891
|
+
try {
|
|
892
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
893
|
+
wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
|
|
894
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
895
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
896
|
+
deferred1_0 = r0;
|
|
897
|
+
deferred1_1 = r1;
|
|
898
|
+
return getStringFromWasm0(r0, r1);
|
|
899
|
+
} finally {
|
|
900
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
901
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* @param {string} msg
|
|
906
|
+
*/
|
|
907
|
+
throw(msg) {
|
|
908
|
+
try {
|
|
909
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
910
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
911
|
+
const len0 = WASM_VECTOR_LEN;
|
|
912
|
+
wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
|
|
913
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
914
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
915
|
+
if (r1) {
|
|
916
|
+
throw takeObject(r0);
|
|
917
|
+
}
|
|
918
|
+
} finally {
|
|
919
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Test method, calls http endpoint
|
|
924
|
+
* @param {string} url
|
|
925
|
+
* @returns {Promise<string>}
|
|
926
|
+
*/
|
|
927
|
+
http_get(url) {
|
|
928
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
929
|
+
const len0 = WASM_VECTOR_LEN;
|
|
930
|
+
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
931
|
+
return takeObject(ret);
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* @returns {CryptoClient}
|
|
935
|
+
*/
|
|
936
|
+
crypto() {
|
|
937
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
938
|
+
return CryptoClient.__wrap(ret);
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* @returns {VaultClient}
|
|
942
|
+
*/
|
|
943
|
+
vault() {
|
|
944
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
945
|
+
return VaultClient.__wrap(ret);
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Constructs a specific client for generating passwords and passphrases
|
|
949
|
+
* @returns {GeneratorClient}
|
|
950
|
+
*/
|
|
951
|
+
generator() {
|
|
952
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
953
|
+
return GeneratorClient.__wrap(ret);
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* @returns {ExporterClient}
|
|
957
|
+
*/
|
|
958
|
+
exporters() {
|
|
959
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
960
|
+
return ExporterClient.__wrap(ret);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
const CiphersClientFinalization =
|
|
965
|
+
typeof FinalizationRegistry === "undefined"
|
|
966
|
+
? { register: () => {}, unregister: () => {} }
|
|
967
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_ciphersclient_free(ptr >>> 0, 1));
|
|
968
|
+
|
|
969
|
+
export class CiphersClient {
|
|
970
|
+
static __wrap(ptr) {
|
|
971
|
+
ptr = ptr >>> 0;
|
|
972
|
+
const obj = Object.create(CiphersClient.prototype);
|
|
973
|
+
obj.__wbg_ptr = ptr;
|
|
974
|
+
CiphersClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
975
|
+
return obj;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
__destroy_into_raw() {
|
|
979
|
+
const ptr = this.__wbg_ptr;
|
|
980
|
+
this.__wbg_ptr = 0;
|
|
981
|
+
CiphersClientFinalization.unregister(this);
|
|
982
|
+
return ptr;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
free() {
|
|
986
|
+
const ptr = this.__destroy_into_raw();
|
|
987
|
+
wasm.__wbg_ciphersclient_free(ptr, 0);
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Encrypt cipher
|
|
991
|
+
*
|
|
992
|
+
* # Arguments
|
|
993
|
+
* - `cipher_view` - The decrypted cipher to encrypt
|
|
994
|
+
*
|
|
995
|
+
* # Returns
|
|
996
|
+
* - `Ok(Cipher)` containing the encrypted cipher
|
|
997
|
+
* - `Err(EncryptError)` if encryption fails
|
|
998
|
+
* @param {CipherView} cipher_view
|
|
999
|
+
* @returns {Cipher}
|
|
1000
|
+
*/
|
|
1001
|
+
encrypt(cipher_view) {
|
|
1002
|
+
try {
|
|
1003
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1004
|
+
wasm.ciphersclient_encrypt(retptr, this.__wbg_ptr, addHeapObject(cipher_view));
|
|
1005
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1006
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1007
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1008
|
+
if (r2) {
|
|
1009
|
+
throw takeObject(r1);
|
|
1010
|
+
}
|
|
1011
|
+
return takeObject(r0);
|
|
1012
|
+
} finally {
|
|
1013
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Decrypt cipher
|
|
1018
|
+
*
|
|
1019
|
+
* # Arguments
|
|
1020
|
+
* - `cipher` - The encrypted cipher to decrypt
|
|
1021
|
+
*
|
|
1022
|
+
* # Returns
|
|
1023
|
+
* - `Ok(CipherView)` containing the decrypted cipher
|
|
1024
|
+
* - `Err(DecryptError)` if decryption fails
|
|
1025
|
+
* @param {Cipher} cipher
|
|
1026
|
+
* @returns {CipherView}
|
|
1027
|
+
*/
|
|
1028
|
+
decrypt(cipher) {
|
|
1029
|
+
try {
|
|
1030
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1031
|
+
wasm.ciphersclient_decrypt(retptr, this.__wbg_ptr, addHeapObject(cipher));
|
|
1032
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1033
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1034
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1035
|
+
if (r2) {
|
|
1036
|
+
throw takeObject(r1);
|
|
1037
|
+
}
|
|
1038
|
+
return takeObject(r0);
|
|
1039
|
+
} finally {
|
|
1040
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Decrypt list of ciphers
|
|
1045
|
+
*
|
|
1046
|
+
* # Arguments
|
|
1047
|
+
* - `ciphers` - The list of encrypted ciphers to decrypt
|
|
1048
|
+
*
|
|
1049
|
+
* # Returns
|
|
1050
|
+
* - `Ok(Vec<CipherListView>)` containing the decrypted ciphers
|
|
1051
|
+
* - `Err(DecryptError)` if decryption fails
|
|
1052
|
+
* @param {Cipher[]} ciphers
|
|
1053
|
+
* @returns {CipherListView[]}
|
|
1054
|
+
*/
|
|
1055
|
+
decrypt_list(ciphers) {
|
|
1056
|
+
try {
|
|
1057
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1058
|
+
const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1059
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1060
|
+
wasm.ciphersclient_decrypt_list(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1061
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1062
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1063
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1064
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1065
|
+
if (r3) {
|
|
1066
|
+
throw takeObject(r2);
|
|
1067
|
+
}
|
|
1068
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1069
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1070
|
+
return v2;
|
|
1071
|
+
} finally {
|
|
1072
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Decrypt FIDO2 credentials
|
|
1077
|
+
*
|
|
1078
|
+
* # Arguments
|
|
1079
|
+
* - `cipher_view` - Cipher to encrypt containing the FIDO2 credential
|
|
1080
|
+
*
|
|
1081
|
+
* # Returns
|
|
1082
|
+
* - `Ok(Vec<Fido2CredentialView>)` containing the decrypted FIDO2 credentials
|
|
1083
|
+
* - `Err(DecryptError)` if decryption fails
|
|
1084
|
+
* @param {CipherView} cipher_view
|
|
1085
|
+
* @returns {Fido2CredentialView[]}
|
|
1086
|
+
*/
|
|
1087
|
+
decrypt_fido2_credentials(cipher_view) {
|
|
1088
|
+
try {
|
|
1089
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1090
|
+
wasm.ciphersclient_decrypt_fido2_credentials(
|
|
1091
|
+
retptr,
|
|
1092
|
+
this.__wbg_ptr,
|
|
1093
|
+
addHeapObject(cipher_view),
|
|
1094
|
+
);
|
|
1095
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1096
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1097
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1098
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1099
|
+
if (r3) {
|
|
1100
|
+
throw takeObject(r2);
|
|
1101
|
+
}
|
|
1102
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1103
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1104
|
+
return v1;
|
|
1105
|
+
} finally {
|
|
1106
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Decrypt key
|
|
1111
|
+
*
|
|
1112
|
+
* This method is a temporary solution to allow typescript client access to decrypted key
|
|
1113
|
+
* values, particularly for FIDO2 credentials.
|
|
1114
|
+
*
|
|
1115
|
+
* # Arguments
|
|
1116
|
+
* - `cipher_view` - Decrypted cipher containing the key
|
|
1117
|
+
*
|
|
1118
|
+
* # Returns
|
|
1119
|
+
* - `Ok(String)` containing the decrypted key
|
|
1120
|
+
* - `Err(CipherError)`
|
|
1121
|
+
* @param {CipherView} cipher_view
|
|
1122
|
+
* @returns {string}
|
|
1123
|
+
*/
|
|
1124
|
+
decrypt_fido2_private_key(cipher_view) {
|
|
1125
|
+
let deferred2_0;
|
|
1126
|
+
let deferred2_1;
|
|
1127
|
+
try {
|
|
1128
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1129
|
+
wasm.ciphersclient_decrypt_fido2_private_key(
|
|
1130
|
+
retptr,
|
|
1131
|
+
this.__wbg_ptr,
|
|
1132
|
+
addHeapObject(cipher_view),
|
|
1133
|
+
);
|
|
1134
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1135
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1136
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1137
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1138
|
+
var ptr1 = r0;
|
|
1139
|
+
var len1 = r1;
|
|
1140
|
+
if (r3) {
|
|
1141
|
+
ptr1 = 0;
|
|
1142
|
+
len1 = 0;
|
|
1143
|
+
throw takeObject(r2);
|
|
1144
|
+
}
|
|
1145
|
+
deferred2_0 = ptr1;
|
|
1146
|
+
deferred2_1 = len1;
|
|
1147
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1148
|
+
} finally {
|
|
1149
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1150
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
const CryptoClientFinalization =
|
|
1156
|
+
typeof FinalizationRegistry === "undefined"
|
|
1157
|
+
? { register: () => {}, unregister: () => {} }
|
|
1158
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
|
|
1159
|
+
|
|
1160
|
+
export class CryptoClient {
|
|
1161
|
+
static __wrap(ptr) {
|
|
1162
|
+
ptr = ptr >>> 0;
|
|
1163
|
+
const obj = Object.create(CryptoClient.prototype);
|
|
1164
|
+
obj.__wbg_ptr = ptr;
|
|
1165
|
+
CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1166
|
+
return obj;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
__destroy_into_raw() {
|
|
1170
|
+
const ptr = this.__wbg_ptr;
|
|
1171
|
+
this.__wbg_ptr = 0;
|
|
1172
|
+
CryptoClientFinalization.unregister(this);
|
|
1173
|
+
return ptr;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
free() {
|
|
1177
|
+
const ptr = this.__destroy_into_raw();
|
|
1178
|
+
wasm.__wbg_cryptoclient_free(ptr, 0);
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Initialization method for the user crypto. Needs to be called before any other crypto
|
|
1182
|
+
* operations.
|
|
1183
|
+
* @param {InitUserCryptoRequest} req
|
|
1184
|
+
* @returns {Promise<void>}
|
|
1185
|
+
*/
|
|
1186
|
+
initialize_user_crypto(req) {
|
|
1187
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
|
|
1188
|
+
return takeObject(ret);
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Initialization method for the organization crypto. Needs to be called after
|
|
1192
|
+
* `initialize_user_crypto` but before any other crypto operations.
|
|
1193
|
+
* @param {InitOrgCryptoRequest} req
|
|
1194
|
+
* @returns {Promise<void>}
|
|
1195
|
+
*/
|
|
1196
|
+
initialize_org_crypto(req) {
|
|
1197
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
|
|
1198
|
+
return takeObject(ret);
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Generates a new key pair and encrypts the private key with the provided user key.
|
|
1202
|
+
* Crypto initialization not required.
|
|
1203
|
+
* @param {string} user_key
|
|
1204
|
+
* @returns {MakeKeyPairResponse}
|
|
1205
|
+
*/
|
|
1206
|
+
make_key_pair(user_key) {
|
|
1207
|
+
try {
|
|
1208
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1209
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1210
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1211
|
+
wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1212
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1213
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1214
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1215
|
+
if (r2) {
|
|
1216
|
+
throw takeObject(r1);
|
|
1217
|
+
}
|
|
1218
|
+
return takeObject(r0);
|
|
1219
|
+
} finally {
|
|
1220
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
|
1225
|
+
* key. Returns if the private key is decryptable and if it is a valid matching key.
|
|
1226
|
+
* Crypto initialization not required.
|
|
1227
|
+
* @param {VerifyAsymmetricKeysRequest} request
|
|
1228
|
+
* @returns {VerifyAsymmetricKeysResponse}
|
|
1229
|
+
*/
|
|
1230
|
+
verify_asymmetric_keys(request) {
|
|
1231
|
+
try {
|
|
1232
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1233
|
+
wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
|
|
1234
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1235
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1236
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1237
|
+
if (r2) {
|
|
1238
|
+
throw takeObject(r1);
|
|
1239
|
+
}
|
|
1240
|
+
return takeObject(r0);
|
|
1241
|
+
} finally {
|
|
1242
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
const ExporterClientFinalization =
|
|
1248
|
+
typeof FinalizationRegistry === "undefined"
|
|
1249
|
+
? { register: () => {}, unregister: () => {} }
|
|
1250
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_exporterclient_free(ptr >>> 0, 1));
|
|
1251
|
+
|
|
1252
|
+
export class ExporterClient {
|
|
1253
|
+
static __wrap(ptr) {
|
|
1254
|
+
ptr = ptr >>> 0;
|
|
1255
|
+
const obj = Object.create(ExporterClient.prototype);
|
|
1256
|
+
obj.__wbg_ptr = ptr;
|
|
1257
|
+
ExporterClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1258
|
+
return obj;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
__destroy_into_raw() {
|
|
1262
|
+
const ptr = this.__wbg_ptr;
|
|
1263
|
+
this.__wbg_ptr = 0;
|
|
1264
|
+
ExporterClientFinalization.unregister(this);
|
|
1265
|
+
return ptr;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
free() {
|
|
1269
|
+
const ptr = this.__destroy_into_raw();
|
|
1270
|
+
wasm.__wbg_exporterclient_free(ptr, 0);
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* @param {Folder[]} folders
|
|
1274
|
+
* @param {Cipher[]} ciphers
|
|
1275
|
+
* @param {ExportFormat} format
|
|
1276
|
+
* @returns {string}
|
|
1277
|
+
*/
|
|
1278
|
+
export_vault(folders, ciphers, format) {
|
|
1279
|
+
let deferred4_0;
|
|
1280
|
+
let deferred4_1;
|
|
1281
|
+
try {
|
|
1282
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1283
|
+
const ptr0 = passArrayJsValueToWasm0(folders, wasm.__wbindgen_malloc);
|
|
1284
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1285
|
+
const ptr1 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1286
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1287
|
+
wasm.exporterclient_export_vault(
|
|
1288
|
+
retptr,
|
|
1289
|
+
this.__wbg_ptr,
|
|
1290
|
+
ptr0,
|
|
1291
|
+
len0,
|
|
1292
|
+
ptr1,
|
|
1293
|
+
len1,
|
|
1294
|
+
addHeapObject(format),
|
|
1295
|
+
);
|
|
1296
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1297
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1298
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1299
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1300
|
+
var ptr3 = r0;
|
|
1301
|
+
var len3 = r1;
|
|
1302
|
+
if (r3) {
|
|
1303
|
+
ptr3 = 0;
|
|
1304
|
+
len3 = 0;
|
|
1305
|
+
throw takeObject(r2);
|
|
1306
|
+
}
|
|
1307
|
+
deferred4_0 = ptr3;
|
|
1308
|
+
deferred4_1 = len3;
|
|
1309
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1310
|
+
} finally {
|
|
1311
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1312
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* @param {Collection[]} collections
|
|
1317
|
+
* @param {Cipher[]} ciphers
|
|
1318
|
+
* @param {ExportFormat} format
|
|
1319
|
+
* @returns {string}
|
|
1320
|
+
*/
|
|
1321
|
+
export_organization_vault(collections, ciphers, format) {
|
|
1322
|
+
let deferred4_0;
|
|
1323
|
+
let deferred4_1;
|
|
1324
|
+
try {
|
|
1325
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1326
|
+
const ptr0 = passArrayJsValueToWasm0(collections, wasm.__wbindgen_malloc);
|
|
1327
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1328
|
+
const ptr1 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1329
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1330
|
+
wasm.exporterclient_export_organization_vault(
|
|
1331
|
+
retptr,
|
|
1332
|
+
this.__wbg_ptr,
|
|
1333
|
+
ptr0,
|
|
1334
|
+
len0,
|
|
1335
|
+
ptr1,
|
|
1336
|
+
len1,
|
|
1337
|
+
addHeapObject(format),
|
|
1338
|
+
);
|
|
1339
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1340
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1341
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1342
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1343
|
+
var ptr3 = r0;
|
|
1344
|
+
var len3 = r1;
|
|
1345
|
+
if (r3) {
|
|
1346
|
+
ptr3 = 0;
|
|
1347
|
+
len3 = 0;
|
|
1348
|
+
throw takeObject(r2);
|
|
1349
|
+
}
|
|
1350
|
+
deferred4_0 = ptr3;
|
|
1351
|
+
deferred4_1 = len3;
|
|
1352
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1353
|
+
} finally {
|
|
1354
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1355
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
/**
|
|
1359
|
+
* Credential Exchange Format (CXF)
|
|
1360
|
+
*
|
|
1361
|
+
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1362
|
+
*
|
|
1363
|
+
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1364
|
+
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1365
|
+
* @param {Account} account
|
|
1366
|
+
* @param {Cipher[]} ciphers
|
|
1367
|
+
* @returns {string}
|
|
1368
|
+
*/
|
|
1369
|
+
export_cxf(account, ciphers) {
|
|
1370
|
+
let deferred3_0;
|
|
1371
|
+
let deferred3_1;
|
|
1372
|
+
try {
|
|
1373
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1374
|
+
const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1375
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1376
|
+
wasm.exporterclient_export_cxf(retptr, this.__wbg_ptr, addHeapObject(account), ptr0, len0);
|
|
1377
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1378
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1379
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1380
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1381
|
+
var ptr2 = r0;
|
|
1382
|
+
var len2 = r1;
|
|
1383
|
+
if (r3) {
|
|
1384
|
+
ptr2 = 0;
|
|
1385
|
+
len2 = 0;
|
|
1386
|
+
throw takeObject(r2);
|
|
1387
|
+
}
|
|
1388
|
+
deferred3_0 = ptr2;
|
|
1389
|
+
deferred3_1 = len2;
|
|
1390
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1391
|
+
} finally {
|
|
1392
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1393
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
/**
|
|
1397
|
+
* Credential Exchange Format (CXF)
|
|
1398
|
+
*
|
|
1399
|
+
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1400
|
+
*
|
|
1401
|
+
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1402
|
+
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1403
|
+
* @param {string} payload
|
|
1404
|
+
* @returns {Cipher[]}
|
|
1405
|
+
*/
|
|
1406
|
+
import_cxf(payload) {
|
|
1407
|
+
try {
|
|
1408
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1409
|
+
const ptr0 = passStringToWasm0(payload, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1410
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1411
|
+
wasm.exporterclient_import_cxf(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1412
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1413
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1414
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1415
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1416
|
+
if (r3) {
|
|
1417
|
+
throw takeObject(r2);
|
|
1418
|
+
}
|
|
1419
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1420
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1421
|
+
return v2;
|
|
1422
|
+
} finally {
|
|
1423
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
const FoldersClientFinalization =
|
|
1429
|
+
typeof FinalizationRegistry === "undefined"
|
|
1430
|
+
? { register: () => {}, unregister: () => {} }
|
|
1431
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_foldersclient_free(ptr >>> 0, 1));
|
|
1432
|
+
|
|
1433
|
+
export class FoldersClient {
|
|
1434
|
+
static __wrap(ptr) {
|
|
1435
|
+
ptr = ptr >>> 0;
|
|
1436
|
+
const obj = Object.create(FoldersClient.prototype);
|
|
1437
|
+
obj.__wbg_ptr = ptr;
|
|
1438
|
+
FoldersClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1439
|
+
return obj;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
__destroy_into_raw() {
|
|
1443
|
+
const ptr = this.__wbg_ptr;
|
|
1444
|
+
this.__wbg_ptr = 0;
|
|
1445
|
+
FoldersClientFinalization.unregister(this);
|
|
1446
|
+
return ptr;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
free() {
|
|
1450
|
+
const ptr = this.__destroy_into_raw();
|
|
1451
|
+
wasm.__wbg_foldersclient_free(ptr, 0);
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Decrypt folder
|
|
1455
|
+
* @param {Folder} folder
|
|
1456
|
+
* @returns {FolderView}
|
|
1457
|
+
*/
|
|
1458
|
+
decrypt(folder) {
|
|
1459
|
+
try {
|
|
1460
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1461
|
+
wasm.foldersclient_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
|
|
1462
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1463
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1464
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1465
|
+
if (r2) {
|
|
1466
|
+
throw takeObject(r1);
|
|
1467
|
+
}
|
|
1468
|
+
return takeObject(r0);
|
|
1469
|
+
} finally {
|
|
1470
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
const GeneratorClientFinalization =
|
|
1476
|
+
typeof FinalizationRegistry === "undefined"
|
|
1477
|
+
? { register: () => {}, unregister: () => {} }
|
|
1478
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_generatorclient_free(ptr >>> 0, 1));
|
|
1479
|
+
|
|
1480
|
+
export class GeneratorClient {
|
|
1481
|
+
static __wrap(ptr) {
|
|
1482
|
+
ptr = ptr >>> 0;
|
|
1483
|
+
const obj = Object.create(GeneratorClient.prototype);
|
|
1484
|
+
obj.__wbg_ptr = ptr;
|
|
1485
|
+
GeneratorClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1486
|
+
return obj;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
__destroy_into_raw() {
|
|
1490
|
+
const ptr = this.__wbg_ptr;
|
|
1491
|
+
this.__wbg_ptr = 0;
|
|
1492
|
+
GeneratorClientFinalization.unregister(this);
|
|
1493
|
+
return ptr;
|
|
364
1494
|
}
|
|
365
1495
|
|
|
366
1496
|
free() {
|
|
367
1497
|
const ptr = this.__destroy_into_raw();
|
|
368
|
-
wasm.
|
|
1498
|
+
wasm.__wbg_generatorclient_free(ptr, 0);
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* Generates a random password.
|
|
1502
|
+
*
|
|
1503
|
+
* The character sets and password length can be customized using the `input` parameter.
|
|
1504
|
+
*
|
|
1505
|
+
* # Examples
|
|
1506
|
+
*
|
|
1507
|
+
* ```
|
|
1508
|
+
* use bitwarden_core::Client;
|
|
1509
|
+
* use bitwarden_generators::{GeneratorClientsExt, PassphraseError, PasswordGeneratorRequest};
|
|
1510
|
+
*
|
|
1511
|
+
* async fn test() -> Result<(), PassphraseError> {
|
|
1512
|
+
* let input = PasswordGeneratorRequest {
|
|
1513
|
+
* lowercase: true,
|
|
1514
|
+
* uppercase: true,
|
|
1515
|
+
* numbers: true,
|
|
1516
|
+
* length: 20,
|
|
1517
|
+
* ..Default::default()
|
|
1518
|
+
* };
|
|
1519
|
+
* let password = Client::new(None).generator().password(input).unwrap();
|
|
1520
|
+
* println!("{}", password);
|
|
1521
|
+
* Ok(())
|
|
1522
|
+
* }
|
|
1523
|
+
* ```
|
|
1524
|
+
* @param {PasswordGeneratorRequest} input
|
|
1525
|
+
* @returns {string}
|
|
1526
|
+
*/
|
|
1527
|
+
password(input) {
|
|
1528
|
+
let deferred2_0;
|
|
1529
|
+
let deferred2_1;
|
|
1530
|
+
try {
|
|
1531
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1532
|
+
wasm.generatorclient_password(retptr, this.__wbg_ptr, addHeapObject(input));
|
|
1533
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1534
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1535
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1536
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1537
|
+
var ptr1 = r0;
|
|
1538
|
+
var len1 = r1;
|
|
1539
|
+
if (r3) {
|
|
1540
|
+
ptr1 = 0;
|
|
1541
|
+
len1 = 0;
|
|
1542
|
+
throw takeObject(r2);
|
|
1543
|
+
}
|
|
1544
|
+
deferred2_0 = ptr1;
|
|
1545
|
+
deferred2_1 = len1;
|
|
1546
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1547
|
+
} finally {
|
|
1548
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1549
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Generates a random passphrase.
|
|
1554
|
+
* A passphrase is a combination of random words separated by a character.
|
|
1555
|
+
* An example of passphrase is `correct horse battery staple`.
|
|
1556
|
+
*
|
|
1557
|
+
* The number of words and their case, the word separator, and the inclusion of
|
|
1558
|
+
* a number in the passphrase can be customized using the `input` parameter.
|
|
1559
|
+
*
|
|
1560
|
+
* # Examples
|
|
1561
|
+
*
|
|
1562
|
+
* ```
|
|
1563
|
+
* use bitwarden_core::Client;
|
|
1564
|
+
* use bitwarden_generators::{GeneratorClientsExt, PassphraseError, PassphraseGeneratorRequest};
|
|
1565
|
+
*
|
|
1566
|
+
* async fn test() -> Result<(), PassphraseError> {
|
|
1567
|
+
* let input = PassphraseGeneratorRequest {
|
|
1568
|
+
* num_words: 4,
|
|
1569
|
+
* ..Default::default()
|
|
1570
|
+
* };
|
|
1571
|
+
* let passphrase = Client::new(None).generator().passphrase(input).unwrap();
|
|
1572
|
+
* println!("{}", passphrase);
|
|
1573
|
+
* Ok(())
|
|
1574
|
+
* }
|
|
1575
|
+
* ```
|
|
1576
|
+
* @param {PassphraseGeneratorRequest} input
|
|
1577
|
+
* @returns {string}
|
|
1578
|
+
*/
|
|
1579
|
+
passphrase(input) {
|
|
1580
|
+
let deferred2_0;
|
|
1581
|
+
let deferred2_1;
|
|
1582
|
+
try {
|
|
1583
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1584
|
+
wasm.generatorclient_passphrase(retptr, this.__wbg_ptr, addHeapObject(input));
|
|
1585
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1586
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1587
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1588
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1589
|
+
var ptr1 = r0;
|
|
1590
|
+
var len1 = r1;
|
|
1591
|
+
if (r3) {
|
|
1592
|
+
ptr1 = 0;
|
|
1593
|
+
len1 = 0;
|
|
1594
|
+
throw takeObject(r2);
|
|
1595
|
+
}
|
|
1596
|
+
deferred2_0 = ptr1;
|
|
1597
|
+
deferred2_1 = len1;
|
|
1598
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1599
|
+
} finally {
|
|
1600
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1601
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
const IncomingMessageFinalization =
|
|
1607
|
+
typeof FinalizationRegistry === "undefined"
|
|
1608
|
+
? { register: () => {}, unregister: () => {} }
|
|
1609
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_incomingmessage_free(ptr >>> 0, 1));
|
|
1610
|
+
|
|
1611
|
+
export class IncomingMessage {
|
|
1612
|
+
static __wrap(ptr) {
|
|
1613
|
+
ptr = ptr >>> 0;
|
|
1614
|
+
const obj = Object.create(IncomingMessage.prototype);
|
|
1615
|
+
obj.__wbg_ptr = ptr;
|
|
1616
|
+
IncomingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1617
|
+
return obj;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
__destroy_into_raw() {
|
|
1621
|
+
const ptr = this.__wbg_ptr;
|
|
1622
|
+
this.__wbg_ptr = 0;
|
|
1623
|
+
IncomingMessageFinalization.unregister(this);
|
|
1624
|
+
return ptr;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
free() {
|
|
1628
|
+
const ptr = this.__destroy_into_raw();
|
|
1629
|
+
wasm.__wbg_incomingmessage_free(ptr, 0);
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* @returns {Uint8Array}
|
|
1633
|
+
*/
|
|
1634
|
+
get payload() {
|
|
1635
|
+
try {
|
|
1636
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1637
|
+
wasm.__wbg_get_incomingmessage_payload(retptr, this.__wbg_ptr);
|
|
1638
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1639
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1640
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1641
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1642
|
+
return v1;
|
|
1643
|
+
} finally {
|
|
1644
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* @param {Uint8Array} arg0
|
|
1649
|
+
*/
|
|
1650
|
+
set payload(arg0) {
|
|
1651
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1652
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1653
|
+
wasm.__wbg_set_incomingmessage_payload(this.__wbg_ptr, ptr0, len0);
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* @returns {Endpoint}
|
|
1657
|
+
*/
|
|
1658
|
+
get destination() {
|
|
1659
|
+
const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
|
|
1660
|
+
return takeObject(ret);
|
|
1661
|
+
}
|
|
1662
|
+
/**
|
|
1663
|
+
* @param {Endpoint} arg0
|
|
1664
|
+
*/
|
|
1665
|
+
set destination(arg0) {
|
|
1666
|
+
wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* @returns {Endpoint}
|
|
1670
|
+
*/
|
|
1671
|
+
get source() {
|
|
1672
|
+
const ret = wasm.__wbg_get_incomingmessage_source(this.__wbg_ptr);
|
|
1673
|
+
return takeObject(ret);
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* @param {Endpoint} arg0
|
|
1677
|
+
*/
|
|
1678
|
+
set source(arg0) {
|
|
1679
|
+
wasm.__wbg_set_incomingmessage_source(this.__wbg_ptr, addHeapObject(arg0));
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* @returns {string | undefined}
|
|
1683
|
+
*/
|
|
1684
|
+
get topic() {
|
|
1685
|
+
try {
|
|
1686
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1687
|
+
wasm.__wbg_get_incomingmessage_topic(retptr, this.__wbg_ptr);
|
|
1688
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1689
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1690
|
+
let v1;
|
|
1691
|
+
if (r0 !== 0) {
|
|
1692
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1693
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1694
|
+
}
|
|
1695
|
+
return v1;
|
|
1696
|
+
} finally {
|
|
1697
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* @param {string | null} [arg0]
|
|
1702
|
+
*/
|
|
1703
|
+
set topic(arg0) {
|
|
1704
|
+
var ptr0 = isLikeNone(arg0)
|
|
1705
|
+
? 0
|
|
1706
|
+
: passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1707
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1708
|
+
wasm.__wbg_set_incomingmessage_topic(this.__wbg_ptr, ptr0, len0);
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* @param {Uint8Array} payload
|
|
1712
|
+
* @param {Endpoint} destination
|
|
1713
|
+
* @param {Endpoint} source
|
|
1714
|
+
* @param {string | null} [topic]
|
|
1715
|
+
*/
|
|
1716
|
+
constructor(payload, destination, source, topic) {
|
|
1717
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
1718
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1719
|
+
var ptr1 = isLikeNone(topic)
|
|
1720
|
+
? 0
|
|
1721
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1722
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1723
|
+
const ret = wasm.incomingmessage_new(
|
|
1724
|
+
ptr0,
|
|
1725
|
+
len0,
|
|
1726
|
+
addHeapObject(destination),
|
|
1727
|
+
addHeapObject(source),
|
|
1728
|
+
ptr1,
|
|
1729
|
+
len1,
|
|
1730
|
+
);
|
|
1731
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1732
|
+
IncomingMessageFinalization.register(this, this.__wbg_ptr, this);
|
|
1733
|
+
return this;
|
|
1734
|
+
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Try to parse the payload as JSON.
|
|
1737
|
+
* @returns {any} The parsed JSON value, or undefined if the payload is not valid JSON.
|
|
1738
|
+
*/
|
|
1739
|
+
parse_payload_as_json() {
|
|
1740
|
+
const ret = wasm.incomingmessage_parse_payload_as_json(this.__wbg_ptr);
|
|
1741
|
+
return takeObject(ret);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
const IpcClientFinalization =
|
|
1746
|
+
typeof FinalizationRegistry === "undefined"
|
|
1747
|
+
? { register: () => {}, unregister: () => {} }
|
|
1748
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_ipcclient_free(ptr >>> 0, 1));
|
|
1749
|
+
|
|
1750
|
+
export class IpcClient {
|
|
1751
|
+
__destroy_into_raw() {
|
|
1752
|
+
const ptr = this.__wbg_ptr;
|
|
1753
|
+
this.__wbg_ptr = 0;
|
|
1754
|
+
IpcClientFinalization.unregister(this);
|
|
1755
|
+
return ptr;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
free() {
|
|
1759
|
+
const ptr = this.__destroy_into_raw();
|
|
1760
|
+
wasm.__wbg_ipcclient_free(ptr, 0);
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* @param {IpcCommunicationBackend} communication_provider
|
|
1764
|
+
*/
|
|
1765
|
+
constructor(communication_provider) {
|
|
1766
|
+
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
1767
|
+
var ptr0 = communication_provider.__destroy_into_raw();
|
|
1768
|
+
const ret = wasm.ipcclient_new(ptr0);
|
|
1769
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1770
|
+
IpcClientFinalization.register(this, this.__wbg_ptr, this);
|
|
1771
|
+
return this;
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* @param {OutgoingMessage} message
|
|
1775
|
+
* @returns {Promise<void>}
|
|
1776
|
+
*/
|
|
1777
|
+
send(message) {
|
|
1778
|
+
_assertClass(message, OutgoingMessage);
|
|
1779
|
+
var ptr0 = message.__destroy_into_raw();
|
|
1780
|
+
const ret = wasm.ipcclient_send(this.__wbg_ptr, ptr0);
|
|
1781
|
+
return takeObject(ret);
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* @returns {Promise<IpcClientSubscription>}
|
|
1785
|
+
*/
|
|
1786
|
+
subscribe() {
|
|
1787
|
+
const ret = wasm.ipcclient_subscribe(this.__wbg_ptr);
|
|
1788
|
+
return takeObject(ret);
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
const IpcClientSubscriptionFinalization =
|
|
1793
|
+
typeof FinalizationRegistry === "undefined"
|
|
1794
|
+
? { register: () => {}, unregister: () => {} }
|
|
1795
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_ipcclientsubscription_free(ptr >>> 0, 1));
|
|
1796
|
+
|
|
1797
|
+
export class IpcClientSubscription {
|
|
1798
|
+
static __wrap(ptr) {
|
|
1799
|
+
ptr = ptr >>> 0;
|
|
1800
|
+
const obj = Object.create(IpcClientSubscription.prototype);
|
|
1801
|
+
obj.__wbg_ptr = ptr;
|
|
1802
|
+
IpcClientSubscriptionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1803
|
+
return obj;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
__destroy_into_raw() {
|
|
1807
|
+
const ptr = this.__wbg_ptr;
|
|
1808
|
+
this.__wbg_ptr = 0;
|
|
1809
|
+
IpcClientSubscriptionFinalization.unregister(this);
|
|
1810
|
+
return ptr;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
free() {
|
|
1814
|
+
const ptr = this.__destroy_into_raw();
|
|
1815
|
+
wasm.__wbg_ipcclientsubscription_free(ptr, 0);
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* @returns {Promise<IncomingMessage>}
|
|
1819
|
+
*/
|
|
1820
|
+
receive() {
|
|
1821
|
+
const ret = wasm.ipcclientsubscription_receive(this.__wbg_ptr);
|
|
1822
|
+
return takeObject(ret);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
const IpcCommunicationBackendFinalization =
|
|
1827
|
+
typeof FinalizationRegistry === "undefined"
|
|
1828
|
+
? { register: () => {}, unregister: () => {} }
|
|
1829
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_ipccommunicationbackend_free(ptr >>> 0, 1));
|
|
1830
|
+
|
|
1831
|
+
export class IpcCommunicationBackend {
|
|
1832
|
+
__destroy_into_raw() {
|
|
1833
|
+
const ptr = this.__wbg_ptr;
|
|
1834
|
+
this.__wbg_ptr = 0;
|
|
1835
|
+
IpcCommunicationBackendFinalization.unregister(this);
|
|
1836
|
+
return ptr;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
free() {
|
|
1840
|
+
const ptr = this.__destroy_into_raw();
|
|
1841
|
+
wasm.__wbg_ipccommunicationbackend_free(ptr, 0);
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* @param {IpcCommunicationBackendSender} sender
|
|
1845
|
+
*/
|
|
1846
|
+
constructor(sender) {
|
|
1847
|
+
const ret = wasm.ipccommunicationbackend_new(addHeapObject(sender));
|
|
1848
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1849
|
+
IpcCommunicationBackendFinalization.register(this, this.__wbg_ptr, this);
|
|
1850
|
+
return this;
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* JavaScript function to provide a received message to the backend/IPC framework.
|
|
1854
|
+
* @param {IncomingMessage} message
|
|
1855
|
+
*/
|
|
1856
|
+
deliver_message(message) {
|
|
1857
|
+
try {
|
|
1858
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1859
|
+
_assertClass(message, IncomingMessage);
|
|
1860
|
+
var ptr0 = message.__destroy_into_raw();
|
|
1861
|
+
wasm.ipccommunicationbackend_deliver_message(retptr, this.__wbg_ptr, ptr0);
|
|
1862
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1863
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1864
|
+
if (r1) {
|
|
1865
|
+
throw takeObject(r0);
|
|
1866
|
+
}
|
|
1867
|
+
} finally {
|
|
1868
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
const OutgoingMessageFinalization =
|
|
1874
|
+
typeof FinalizationRegistry === "undefined"
|
|
1875
|
+
? { register: () => {}, unregister: () => {} }
|
|
1876
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_outgoingmessage_free(ptr >>> 0, 1));
|
|
1877
|
+
|
|
1878
|
+
export class OutgoingMessage {
|
|
1879
|
+
static __wrap(ptr) {
|
|
1880
|
+
ptr = ptr >>> 0;
|
|
1881
|
+
const obj = Object.create(OutgoingMessage.prototype);
|
|
1882
|
+
obj.__wbg_ptr = ptr;
|
|
1883
|
+
OutgoingMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1884
|
+
return obj;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
__destroy_into_raw() {
|
|
1888
|
+
const ptr = this.__wbg_ptr;
|
|
1889
|
+
this.__wbg_ptr = 0;
|
|
1890
|
+
OutgoingMessageFinalization.unregister(this);
|
|
1891
|
+
return ptr;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
free() {
|
|
1895
|
+
const ptr = this.__destroy_into_raw();
|
|
1896
|
+
wasm.__wbg_outgoingmessage_free(ptr, 0);
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
* @returns {Uint8Array}
|
|
1900
|
+
*/
|
|
1901
|
+
get payload() {
|
|
1902
|
+
try {
|
|
1903
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1904
|
+
wasm.__wbg_get_outgoingmessage_payload(retptr, this.__wbg_ptr);
|
|
1905
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1906
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1907
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1908
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1909
|
+
return v1;
|
|
1910
|
+
} finally {
|
|
1911
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* @param {Uint8Array} arg0
|
|
1916
|
+
*/
|
|
1917
|
+
set payload(arg0) {
|
|
1918
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1919
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1920
|
+
wasm.__wbg_set_outgoingmessage_payload(this.__wbg_ptr, ptr0, len0);
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* @returns {Endpoint}
|
|
1924
|
+
*/
|
|
1925
|
+
get destination() {
|
|
1926
|
+
const ret = wasm.__wbg_get_incomingmessage_destination(this.__wbg_ptr);
|
|
1927
|
+
return takeObject(ret);
|
|
369
1928
|
}
|
|
370
1929
|
/**
|
|
371
|
-
* @param {
|
|
372
|
-
* @param {LogLevel | undefined} [log_level]
|
|
1930
|
+
* @param {Endpoint} arg0
|
|
373
1931
|
*/
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
1932
|
+
set destination(arg0) {
|
|
1933
|
+
wasm.__wbg_set_incomingmessage_destination(this.__wbg_ptr, addHeapObject(arg0));
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
* @returns {string | undefined}
|
|
1937
|
+
*/
|
|
1938
|
+
get topic() {
|
|
1939
|
+
try {
|
|
1940
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1941
|
+
wasm.__wbg_get_outgoingmessage_topic(retptr, this.__wbg_ptr);
|
|
1942
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1943
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1944
|
+
let v1;
|
|
1945
|
+
if (r0 !== 0) {
|
|
1946
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1947
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1948
|
+
}
|
|
1949
|
+
return v1;
|
|
1950
|
+
} finally {
|
|
1951
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* @param {string | null} [arg0]
|
|
1956
|
+
*/
|
|
1957
|
+
set topic(arg0) {
|
|
1958
|
+
var ptr0 = isLikeNone(arg0)
|
|
1959
|
+
? 0
|
|
1960
|
+
: passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1961
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1962
|
+
wasm.__wbg_set_outgoingmessage_topic(this.__wbg_ptr, ptr0, len0);
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* @param {Uint8Array} payload
|
|
1966
|
+
* @param {Endpoint} destination
|
|
1967
|
+
* @param {string | null} [topic]
|
|
1968
|
+
*/
|
|
1969
|
+
constructor(payload, destination, topic) {
|
|
1970
|
+
const ptr0 = passArray8ToWasm0(payload, wasm.__wbindgen_malloc);
|
|
1971
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1972
|
+
var ptr1 = isLikeNone(topic)
|
|
1973
|
+
? 0
|
|
1974
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1975
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1976
|
+
const ret = wasm.outgoingmessage_new(ptr0, len0, addHeapObject(destination), ptr1, len1);
|
|
379
1977
|
this.__wbg_ptr = ret >>> 0;
|
|
380
|
-
|
|
1978
|
+
OutgoingMessageFinalization.register(this, this.__wbg_ptr, this);
|
|
381
1979
|
return this;
|
|
382
1980
|
}
|
|
383
1981
|
/**
|
|
384
|
-
*
|
|
385
|
-
* @param {
|
|
1982
|
+
* Create a new message and encode the payload as JSON.
|
|
1983
|
+
* @param {any} payload
|
|
1984
|
+
* @param {Endpoint} destination
|
|
1985
|
+
* @param {string | null} [topic]
|
|
1986
|
+
* @returns {OutgoingMessage}
|
|
1987
|
+
*/
|
|
1988
|
+
static new_json_payload(payload, destination, topic) {
|
|
1989
|
+
try {
|
|
1990
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1991
|
+
var ptr0 = isLikeNone(topic)
|
|
1992
|
+
? 0
|
|
1993
|
+
: passStringToWasm0(topic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1994
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1995
|
+
wasm.outgoingmessage_new_json_payload(
|
|
1996
|
+
retptr,
|
|
1997
|
+
addHeapObject(payload),
|
|
1998
|
+
addHeapObject(destination),
|
|
1999
|
+
ptr0,
|
|
2000
|
+
len0,
|
|
2001
|
+
);
|
|
2002
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2003
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2004
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2005
|
+
if (r2) {
|
|
2006
|
+
throw takeObject(r1);
|
|
2007
|
+
}
|
|
2008
|
+
return OutgoingMessage.__wrap(r0);
|
|
2009
|
+
} finally {
|
|
2010
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
const PureCryptoFinalization =
|
|
2016
|
+
typeof FinalizationRegistry === "undefined"
|
|
2017
|
+
? { register: () => {}, unregister: () => {} }
|
|
2018
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_purecrypto_free(ptr >>> 0, 1));
|
|
2019
|
+
/**
|
|
2020
|
+
* This module represents a stopgap solution to provide access to primitive crypto functions for JS
|
|
2021
|
+
* clients. It is not intended to be used outside of the JS clients and this pattern should not be
|
|
2022
|
+
* proliferated. It is necessary because we want to use SDK crypto prior to the SDK being fully
|
|
2023
|
+
* responsible for state and keys.
|
|
2024
|
+
*/
|
|
2025
|
+
export class PureCrypto {
|
|
2026
|
+
__destroy_into_raw() {
|
|
2027
|
+
const ptr = this.__wbg_ptr;
|
|
2028
|
+
this.__wbg_ptr = 0;
|
|
2029
|
+
PureCryptoFinalization.unregister(this);
|
|
2030
|
+
return ptr;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
free() {
|
|
2034
|
+
const ptr = this.__destroy_into_raw();
|
|
2035
|
+
wasm.__wbg_purecrypto_free(ptr, 0);
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* @param {string} enc_string
|
|
2039
|
+
* @param {Uint8Array} key
|
|
386
2040
|
* @returns {string}
|
|
387
2041
|
*/
|
|
388
|
-
|
|
389
|
-
let
|
|
390
|
-
let
|
|
2042
|
+
static symmetric_decrypt(enc_string, key) {
|
|
2043
|
+
let deferred4_0;
|
|
2044
|
+
let deferred4_1;
|
|
391
2045
|
try {
|
|
392
2046
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
393
|
-
const ptr0 = passStringToWasm0(
|
|
2047
|
+
const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
394
2048
|
const len0 = WASM_VECTOR_LEN;
|
|
395
|
-
|
|
2049
|
+
const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2050
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2051
|
+
wasm.purecrypto_symmetric_decrypt(retptr, ptr0, len0, ptr1, len1);
|
|
396
2052
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
397
2053
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
2054
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2055
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
2056
|
+
var ptr3 = r0;
|
|
2057
|
+
var len3 = r1;
|
|
2058
|
+
if (r3) {
|
|
2059
|
+
ptr3 = 0;
|
|
2060
|
+
len3 = 0;
|
|
2061
|
+
throw takeObject(r2);
|
|
2062
|
+
}
|
|
2063
|
+
deferred4_0 = ptr3;
|
|
2064
|
+
deferred4_1 = len3;
|
|
2065
|
+
return getStringFromWasm0(ptr3, len3);
|
|
401
2066
|
} finally {
|
|
402
2067
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
403
|
-
wasm.__wbindgen_free(
|
|
2068
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
404
2069
|
}
|
|
405
2070
|
}
|
|
406
2071
|
/**
|
|
2072
|
+
* @param {string} enc_string
|
|
2073
|
+
* @param {Uint8Array} key
|
|
2074
|
+
* @returns {Uint8Array}
|
|
2075
|
+
*/
|
|
2076
|
+
static symmetric_decrypt_to_bytes(enc_string, key) {
|
|
2077
|
+
try {
|
|
2078
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2079
|
+
const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2080
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2081
|
+
const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2082
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2083
|
+
wasm.purecrypto_symmetric_decrypt_to_bytes(retptr, ptr0, len0, ptr1, len1);
|
|
2084
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2085
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2086
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2087
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
2088
|
+
if (r3) {
|
|
2089
|
+
throw takeObject(r2);
|
|
2090
|
+
}
|
|
2091
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2092
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
2093
|
+
return v3;
|
|
2094
|
+
} finally {
|
|
2095
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* @param {Uint8Array} enc_bytes
|
|
2100
|
+
* @param {Uint8Array} key
|
|
2101
|
+
* @returns {Uint8Array}
|
|
2102
|
+
*/
|
|
2103
|
+
static symmetric_decrypt_array_buffer(enc_bytes, key) {
|
|
2104
|
+
try {
|
|
2105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2106
|
+
const ptr0 = passArray8ToWasm0(enc_bytes, wasm.__wbindgen_malloc);
|
|
2107
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2108
|
+
const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2109
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2110
|
+
wasm.purecrypto_symmetric_decrypt_array_buffer(retptr, ptr0, len0, ptr1, len1);
|
|
2111
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2112
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2113
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2114
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
2115
|
+
if (r3) {
|
|
2116
|
+
throw takeObject(r2);
|
|
2117
|
+
}
|
|
2118
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2119
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
2120
|
+
return v3;
|
|
2121
|
+
} finally {
|
|
2122
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
/**
|
|
2126
|
+
* @param {string} plain
|
|
2127
|
+
* @param {Uint8Array} key
|
|
407
2128
|
* @returns {string}
|
|
408
2129
|
*/
|
|
409
|
-
|
|
410
|
-
let
|
|
411
|
-
let
|
|
2130
|
+
static symmetric_encrypt(plain, key) {
|
|
2131
|
+
let deferred4_0;
|
|
2132
|
+
let deferred4_1;
|
|
412
2133
|
try {
|
|
413
2134
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
414
|
-
wasm.
|
|
2135
|
+
const ptr0 = passStringToWasm0(plain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2136
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2137
|
+
const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2138
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2139
|
+
wasm.purecrypto_symmetric_encrypt(retptr, ptr0, len0, ptr1, len1);
|
|
415
2140
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
416
2141
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
2142
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2143
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
2144
|
+
var ptr3 = r0;
|
|
2145
|
+
var len3 = r1;
|
|
2146
|
+
if (r3) {
|
|
2147
|
+
ptr3 = 0;
|
|
2148
|
+
len3 = 0;
|
|
2149
|
+
throw takeObject(r2);
|
|
2150
|
+
}
|
|
2151
|
+
deferred4_0 = ptr3;
|
|
2152
|
+
deferred4_1 = len3;
|
|
2153
|
+
return getStringFromWasm0(ptr3, len3);
|
|
420
2154
|
} finally {
|
|
421
2155
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
422
|
-
wasm.__wbindgen_free(
|
|
2156
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
423
2157
|
}
|
|
424
2158
|
}
|
|
425
2159
|
/**
|
|
426
|
-
* @param {
|
|
427
|
-
* @
|
|
2160
|
+
* @param {Uint8Array} plain
|
|
2161
|
+
* @param {Uint8Array} key
|
|
2162
|
+
* @returns {Uint8Array}
|
|
428
2163
|
*/
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
2164
|
+
static symmetric_encrypt_to_array_buffer(plain, key) {
|
|
2165
|
+
try {
|
|
2166
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2167
|
+
const ptr0 = passArray8ToWasm0(plain, wasm.__wbindgen_malloc);
|
|
2168
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2169
|
+
const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
2170
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2171
|
+
wasm.purecrypto_symmetric_encrypt_to_array_buffer(retptr, ptr0, len0, ptr1, len1);
|
|
2172
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2173
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2174
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
2175
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
2176
|
+
if (r3) {
|
|
2177
|
+
throw takeObject(r2);
|
|
2178
|
+
}
|
|
2179
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2180
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
2181
|
+
return v3;
|
|
2182
|
+
} finally {
|
|
2183
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
const ReceiveErrorFinalization =
|
|
2189
|
+
typeof FinalizationRegistry === "undefined"
|
|
2190
|
+
? { register: () => {}, unregister: () => {} }
|
|
2191
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_receiveerror_free(ptr >>> 0, 1));
|
|
2192
|
+
|
|
2193
|
+
export class ReceiveError {
|
|
2194
|
+
static __wrap(ptr) {
|
|
2195
|
+
ptr = ptr >>> 0;
|
|
2196
|
+
const obj = Object.create(ReceiveError.prototype);
|
|
2197
|
+
obj.__wbg_ptr = ptr;
|
|
2198
|
+
ReceiveErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2199
|
+
return obj;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
__destroy_into_raw() {
|
|
2203
|
+
const ptr = this.__wbg_ptr;
|
|
2204
|
+
this.__wbg_ptr = 0;
|
|
2205
|
+
ReceiveErrorFinalization.unregister(this);
|
|
2206
|
+
return ptr;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
free() {
|
|
2210
|
+
const ptr = this.__destroy_into_raw();
|
|
2211
|
+
wasm.__wbg_receiveerror_free(ptr, 0);
|
|
434
2212
|
}
|
|
435
2213
|
/**
|
|
436
|
-
*
|
|
437
|
-
* @param {string} url
|
|
438
|
-
* @returns {Promise<string>}
|
|
2214
|
+
* @returns {boolean}
|
|
439
2215
|
*/
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
2216
|
+
get timeout() {
|
|
2217
|
+
const ret = wasm.__wbg_get_receiveerror_timeout(this.__wbg_ptr);
|
|
2218
|
+
return ret !== 0;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* @param {boolean} arg0
|
|
2222
|
+
*/
|
|
2223
|
+
set timeout(arg0) {
|
|
2224
|
+
wasm.__wbg_set_receiveerror_timeout(this.__wbg_ptr, arg0);
|
|
2225
|
+
}
|
|
2226
|
+
/**
|
|
2227
|
+
* @returns {any}
|
|
2228
|
+
*/
|
|
2229
|
+
get crypto() {
|
|
2230
|
+
const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
|
|
444
2231
|
return takeObject(ret);
|
|
445
2232
|
}
|
|
446
2233
|
/**
|
|
447
|
-
* @
|
|
2234
|
+
* @param {any} arg0
|
|
448
2235
|
*/
|
|
449
|
-
crypto() {
|
|
450
|
-
|
|
451
|
-
return ClientCrypto.__wrap(ret);
|
|
2236
|
+
set crypto(arg0) {
|
|
2237
|
+
wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
|
|
452
2238
|
}
|
|
453
2239
|
/**
|
|
454
|
-
* @returns {
|
|
2240
|
+
* @returns {any}
|
|
455
2241
|
*/
|
|
456
|
-
|
|
457
|
-
const ret = wasm.
|
|
458
|
-
return
|
|
2242
|
+
get communication() {
|
|
2243
|
+
const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
|
|
2244
|
+
return takeObject(ret);
|
|
2245
|
+
}
|
|
2246
|
+
/**
|
|
2247
|
+
* @param {any} arg0
|
|
2248
|
+
*/
|
|
2249
|
+
set communication(arg0) {
|
|
2250
|
+
wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
|
|
459
2251
|
}
|
|
460
2252
|
}
|
|
461
2253
|
|
|
462
|
-
const
|
|
2254
|
+
const SendErrorFinalization =
|
|
463
2255
|
typeof FinalizationRegistry === "undefined"
|
|
464
2256
|
? { register: () => {}, unregister: () => {} }
|
|
465
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
2257
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_senderror_free(ptr >>> 0, 1));
|
|
466
2258
|
|
|
467
|
-
export class
|
|
2259
|
+
export class SendError {
|
|
468
2260
|
static __wrap(ptr) {
|
|
469
2261
|
ptr = ptr >>> 0;
|
|
470
|
-
const obj = Object.create(
|
|
2262
|
+
const obj = Object.create(SendError.prototype);
|
|
471
2263
|
obj.__wbg_ptr = ptr;
|
|
472
|
-
|
|
2264
|
+
SendErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
473
2265
|
return obj;
|
|
474
2266
|
}
|
|
475
2267
|
|
|
476
2268
|
__destroy_into_raw() {
|
|
477
2269
|
const ptr = this.__wbg_ptr;
|
|
478
2270
|
this.__wbg_ptr = 0;
|
|
479
|
-
|
|
2271
|
+
SendErrorFinalization.unregister(this);
|
|
480
2272
|
return ptr;
|
|
481
2273
|
}
|
|
482
2274
|
|
|
483
2275
|
free() {
|
|
484
2276
|
const ptr = this.__destroy_into_raw();
|
|
485
|
-
wasm.
|
|
2277
|
+
wasm.__wbg_senderror_free(ptr, 0);
|
|
486
2278
|
}
|
|
487
2279
|
/**
|
|
488
|
-
*
|
|
489
|
-
* operations.
|
|
490
|
-
* @param {InitUserCryptoRequest} req
|
|
491
|
-
* @returns {Promise<void>}
|
|
2280
|
+
* @returns {any}
|
|
492
2281
|
*/
|
|
493
|
-
|
|
494
|
-
const ret = wasm.
|
|
2282
|
+
get crypto() {
|
|
2283
|
+
const ret = wasm.__wbg_get_receiveerror_crypto(this.__wbg_ptr);
|
|
495
2284
|
return takeObject(ret);
|
|
496
2285
|
}
|
|
497
2286
|
/**
|
|
498
|
-
*
|
|
499
|
-
* `initialize_user_crypto` but before any other crypto operations.
|
|
500
|
-
* @param {InitOrgCryptoRequest} req
|
|
501
|
-
* @returns {Promise<void>}
|
|
2287
|
+
* @param {any} arg0
|
|
502
2288
|
*/
|
|
503
|
-
|
|
504
|
-
|
|
2289
|
+
set crypto(arg0) {
|
|
2290
|
+
wasm.__wbg_set_receiveerror_crypto(this.__wbg_ptr, addHeapObject(arg0));
|
|
2291
|
+
}
|
|
2292
|
+
/**
|
|
2293
|
+
* @returns {any}
|
|
2294
|
+
*/
|
|
2295
|
+
get communication() {
|
|
2296
|
+
const ret = wasm.__wbg_get_receiveerror_communication(this.__wbg_ptr);
|
|
505
2297
|
return takeObject(ret);
|
|
506
2298
|
}
|
|
2299
|
+
/**
|
|
2300
|
+
* @param {any} arg0
|
|
2301
|
+
*/
|
|
2302
|
+
set communication(arg0) {
|
|
2303
|
+
wasm.__wbg_set_receiveerror_communication(this.__wbg_ptr, addHeapObject(arg0));
|
|
2304
|
+
}
|
|
507
2305
|
}
|
|
508
2306
|
|
|
509
|
-
const
|
|
2307
|
+
const TotpClientFinalization =
|
|
510
2308
|
typeof FinalizationRegistry === "undefined"
|
|
511
2309
|
? { register: () => {}, unregister: () => {} }
|
|
512
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
2310
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_totpclient_free(ptr >>> 0, 1));
|
|
513
2311
|
|
|
514
|
-
export class
|
|
2312
|
+
export class TotpClient {
|
|
515
2313
|
static __wrap(ptr) {
|
|
516
2314
|
ptr = ptr >>> 0;
|
|
517
|
-
const obj = Object.create(
|
|
2315
|
+
const obj = Object.create(TotpClient.prototype);
|
|
518
2316
|
obj.__wbg_ptr = ptr;
|
|
519
|
-
|
|
2317
|
+
TotpClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
520
2318
|
return obj;
|
|
521
2319
|
}
|
|
522
2320
|
|
|
523
2321
|
__destroy_into_raw() {
|
|
524
2322
|
const ptr = this.__wbg_ptr;
|
|
525
2323
|
this.__wbg_ptr = 0;
|
|
526
|
-
|
|
2324
|
+
TotpClientFinalization.unregister(this);
|
|
527
2325
|
return ptr;
|
|
528
2326
|
}
|
|
529
2327
|
|
|
530
2328
|
free() {
|
|
531
2329
|
const ptr = this.__destroy_into_raw();
|
|
532
|
-
wasm.
|
|
2330
|
+
wasm.__wbg_totpclient_free(ptr, 0);
|
|
533
2331
|
}
|
|
534
2332
|
/**
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
2333
|
+
* Generates a TOTP code from a provided key
|
|
2334
|
+
*
|
|
2335
|
+
* # Arguments
|
|
2336
|
+
* - `key` - Can be:
|
|
2337
|
+
* - A base32 encoded string
|
|
2338
|
+
* - OTP Auth URI
|
|
2339
|
+
* - Steam URI
|
|
2340
|
+
* - `time_ms` - Optional timestamp in milliseconds
|
|
2341
|
+
*
|
|
2342
|
+
* # Returns
|
|
2343
|
+
* - `Ok(TotpResponse)` containing the generated code and period
|
|
2344
|
+
* - `Err(TotpError)` if code generation fails
|
|
2345
|
+
* @param {string} key
|
|
2346
|
+
* @param {number | null} [time_ms]
|
|
2347
|
+
* @returns {TotpResponse}
|
|
538
2348
|
*/
|
|
539
|
-
|
|
2349
|
+
generate_totp(key, time_ms) {
|
|
540
2350
|
try {
|
|
541
2351
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
542
|
-
|
|
2352
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2353
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2354
|
+
wasm.totpclient_generate_totp(
|
|
2355
|
+
retptr,
|
|
2356
|
+
this.__wbg_ptr,
|
|
2357
|
+
ptr0,
|
|
2358
|
+
len0,
|
|
2359
|
+
!isLikeNone(time_ms),
|
|
2360
|
+
isLikeNone(time_ms) ? 0 : time_ms,
|
|
2361
|
+
);
|
|
543
2362
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
544
2363
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
545
2364
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -553,223 +2372,244 @@ export class ClientFolders {
|
|
|
553
2372
|
}
|
|
554
2373
|
}
|
|
555
2374
|
|
|
556
|
-
const
|
|
2375
|
+
const VaultClientFinalization =
|
|
557
2376
|
typeof FinalizationRegistry === "undefined"
|
|
558
2377
|
? { register: () => {}, unregister: () => {} }
|
|
559
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
2378
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
|
|
560
2379
|
|
|
561
|
-
export class
|
|
2380
|
+
export class VaultClient {
|
|
562
2381
|
static __wrap(ptr) {
|
|
563
2382
|
ptr = ptr >>> 0;
|
|
564
|
-
const obj = Object.create(
|
|
2383
|
+
const obj = Object.create(VaultClient.prototype);
|
|
565
2384
|
obj.__wbg_ptr = ptr;
|
|
566
|
-
|
|
2385
|
+
VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
567
2386
|
return obj;
|
|
568
2387
|
}
|
|
569
2388
|
|
|
570
2389
|
__destroy_into_raw() {
|
|
571
2390
|
const ptr = this.__wbg_ptr;
|
|
572
2391
|
this.__wbg_ptr = 0;
|
|
573
|
-
|
|
2392
|
+
VaultClientFinalization.unregister(this);
|
|
574
2393
|
return ptr;
|
|
575
2394
|
}
|
|
576
2395
|
|
|
577
2396
|
free() {
|
|
578
2397
|
const ptr = this.__destroy_into_raw();
|
|
579
|
-
wasm.
|
|
2398
|
+
wasm.__wbg_vaultclient_free(ptr, 0);
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* @returns {AttachmentsClient}
|
|
2402
|
+
*/
|
|
2403
|
+
attachments() {
|
|
2404
|
+
const ret = wasm.vaultclient_attachments(this.__wbg_ptr);
|
|
2405
|
+
return AttachmentsClient.__wrap(ret);
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* @returns {CiphersClient}
|
|
2409
|
+
*/
|
|
2410
|
+
ciphers() {
|
|
2411
|
+
const ret = wasm.vaultclient_attachments(this.__wbg_ptr);
|
|
2412
|
+
return CiphersClient.__wrap(ret);
|
|
580
2413
|
}
|
|
581
2414
|
/**
|
|
582
|
-
* @returns {
|
|
2415
|
+
* @returns {FoldersClient}
|
|
583
2416
|
*/
|
|
584
2417
|
folders() {
|
|
585
|
-
const ret = wasm.
|
|
586
|
-
return
|
|
2418
|
+
const ret = wasm.vaultclient_attachments(this.__wbg_ptr);
|
|
2419
|
+
return FoldersClient.__wrap(ret);
|
|
587
2420
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
deferred0_0 = arg0;
|
|
595
|
-
deferred0_1 = arg1;
|
|
596
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
597
|
-
return addHeapObject(ret);
|
|
598
|
-
} finally {
|
|
599
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2421
|
+
/**
|
|
2422
|
+
* @returns {TotpClient}
|
|
2423
|
+
*/
|
|
2424
|
+
totp() {
|
|
2425
|
+
const ret = wasm.vaultclient_totp(this.__wbg_ptr);
|
|
2426
|
+
return TotpClient.__wrap(ret);
|
|
600
2427
|
}
|
|
601
2428
|
}
|
|
602
2429
|
|
|
603
|
-
export function
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
getObject(arg0).name = getStringFromWasm0(arg1, arg2);
|
|
610
|
-
} finally {
|
|
611
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
612
|
-
}
|
|
2430
|
+
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
2431
|
+
const ret = String(getObject(arg1));
|
|
2432
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2433
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2434
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2435
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
613
2436
|
}
|
|
614
2437
|
|
|
615
|
-
export function
|
|
616
|
-
|
|
617
|
-
let deferred0_1;
|
|
618
|
-
try {
|
|
619
|
-
deferred0_0 = arg1;
|
|
620
|
-
deferred0_1 = arg2;
|
|
621
|
-
getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
|
|
622
|
-
} finally {
|
|
623
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
624
|
-
}
|
|
2438
|
+
export function __wbg_abort_410ec47a64ac6117(arg0, arg1) {
|
|
2439
|
+
getObject(arg0).abort(getObject(arg1));
|
|
625
2440
|
}
|
|
626
2441
|
|
|
627
|
-
export function
|
|
628
|
-
|
|
629
|
-
return addHeapObject(ret);
|
|
2442
|
+
export function __wbg_abort_775ef1d17fc65868(arg0) {
|
|
2443
|
+
getObject(arg0).abort();
|
|
630
2444
|
}
|
|
631
2445
|
|
|
632
|
-
export function
|
|
633
|
-
return handleError(function (arg0, arg1) {
|
|
634
|
-
|
|
635
|
-
return addHeapObject(ret);
|
|
2446
|
+
export function __wbg_append_299d5d48292c0495() {
|
|
2447
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2448
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
636
2449
|
}, arguments);
|
|
637
2450
|
}
|
|
638
2451
|
|
|
639
|
-
export function
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
export function __wbindgen_string_get(arg0, arg1) {
|
|
644
|
-
const obj = getObject(arg1);
|
|
645
|
-
const ret = typeof obj === "string" ? obj : undefined;
|
|
646
|
-
var ptr1 = isLikeNone(ret)
|
|
647
|
-
? 0
|
|
648
|
-
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
649
|
-
var len1 = WASM_VECTOR_LEN;
|
|
650
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
651
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2452
|
+
export function __wbg_append_8c7dd8d641a5f01b() {
|
|
2453
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2454
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2455
|
+
}, arguments);
|
|
652
2456
|
}
|
|
653
2457
|
|
|
654
|
-
export function
|
|
655
|
-
|
|
656
|
-
|
|
2458
|
+
export function __wbg_append_b2d1fc16de2a0e81() {
|
|
2459
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2460
|
+
getObject(arg0).append(
|
|
2461
|
+
getStringFromWasm0(arg1, arg2),
|
|
2462
|
+
getObject(arg3),
|
|
2463
|
+
getStringFromWasm0(arg4, arg5),
|
|
2464
|
+
);
|
|
2465
|
+
}, arguments);
|
|
657
2466
|
}
|
|
658
2467
|
|
|
659
|
-
export function
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
2468
|
+
export function __wbg_append_b44785ebeb668479() {
|
|
2469
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2470
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
2471
|
+
}, arguments);
|
|
663
2472
|
}
|
|
664
2473
|
|
|
665
|
-
export function
|
|
666
|
-
const ret = getObject(arg0)
|
|
2474
|
+
export function __wbg_buffer_609cc3eee51ed158(arg0) {
|
|
2475
|
+
const ret = getObject(arg0).buffer;
|
|
667
2476
|
return addHeapObject(ret);
|
|
668
2477
|
}
|
|
669
2478
|
|
|
670
|
-
export function
|
|
671
|
-
|
|
672
|
-
|
|
2479
|
+
export function __wbg_call_672a4d21634d4a24() {
|
|
2480
|
+
return handleError(function (arg0, arg1) {
|
|
2481
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2482
|
+
return addHeapObject(ret);
|
|
2483
|
+
}, arguments);
|
|
673
2484
|
}
|
|
674
2485
|
|
|
675
|
-
export function
|
|
676
|
-
|
|
677
|
-
|
|
2486
|
+
export function __wbg_call_7cccdd69e0791ae2() {
|
|
2487
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
2488
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2489
|
+
return addHeapObject(ret);
|
|
2490
|
+
}, arguments);
|
|
678
2491
|
}
|
|
679
2492
|
|
|
680
|
-
export function
|
|
681
|
-
const ret =
|
|
682
|
-
return ret;
|
|
2493
|
+
export function __wbg_clearTimeout_86721db0036bea98(arg0) {
|
|
2494
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2495
|
+
return addHeapObject(ret);
|
|
683
2496
|
}
|
|
684
2497
|
|
|
685
|
-
export function
|
|
686
|
-
const ret =
|
|
687
|
-
return ret;
|
|
2498
|
+
export function __wbg_crypto_574e78ad8b13b65f(arg0) {
|
|
2499
|
+
const ret = getObject(arg0).crypto;
|
|
2500
|
+
return addHeapObject(ret);
|
|
688
2501
|
}
|
|
689
2502
|
|
|
690
|
-
export function
|
|
691
|
-
|
|
2503
|
+
export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
|
|
2504
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
export function __wbg_done_769e5ede4b31c67b(arg0) {
|
|
2508
|
+
const ret = getObject(arg0).done;
|
|
692
2509
|
return ret;
|
|
693
2510
|
}
|
|
694
2511
|
|
|
695
|
-
export function
|
|
2512
|
+
export function __wbg_entries_3265d4158b33e5dc(arg0) {
|
|
696
2513
|
const ret = Object.entries(getObject(arg0));
|
|
697
2514
|
return addHeapObject(ret);
|
|
698
2515
|
}
|
|
699
2516
|
|
|
700
|
-
export function
|
|
701
|
-
|
|
702
|
-
|
|
2517
|
+
export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
2518
|
+
let deferred0_0;
|
|
2519
|
+
let deferred0_1;
|
|
2520
|
+
try {
|
|
2521
|
+
deferred0_0 = arg0;
|
|
2522
|
+
deferred0_1 = arg1;
|
|
2523
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
2524
|
+
} finally {
|
|
2525
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2526
|
+
}
|
|
703
2527
|
}
|
|
704
2528
|
|
|
705
|
-
export function
|
|
706
|
-
|
|
707
|
-
return addHeapObject(ret);
|
|
2529
|
+
export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
|
|
2530
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
708
2531
|
}
|
|
709
2532
|
|
|
710
|
-
export function
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
return addHeapObject(ret);
|
|
714
|
-
}, arguments);
|
|
2533
|
+
export function __wbg_fetch_509096533071c657(arg0, arg1) {
|
|
2534
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
2535
|
+
return addHeapObject(ret);
|
|
715
2536
|
}
|
|
716
2537
|
|
|
717
|
-
export function
|
|
718
|
-
const ret = getObject(arg0);
|
|
2538
|
+
export function __wbg_fetch_d36a73832f0a45e8(arg0) {
|
|
2539
|
+
const ret = fetch(getObject(arg0));
|
|
719
2540
|
return addHeapObject(ret);
|
|
720
2541
|
}
|
|
721
2542
|
|
|
722
|
-
export function
|
|
723
|
-
|
|
724
|
-
|
|
2543
|
+
export function __wbg_getRandomValues_3d90134a348e46b3() {
|
|
2544
|
+
return handleError(function (arg0, arg1) {
|
|
2545
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
2546
|
+
}, arguments);
|
|
725
2547
|
}
|
|
726
2548
|
|
|
727
|
-
export function
|
|
728
|
-
|
|
2549
|
+
export function __wbg_getRandomValues_b8f5dbd5f3995a9e() {
|
|
2550
|
+
return handleError(function (arg0, arg1) {
|
|
2551
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2552
|
+
}, arguments);
|
|
729
2553
|
}
|
|
730
2554
|
|
|
731
|
-
export function
|
|
732
|
-
|
|
733
|
-
|
|
2555
|
+
export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
2556
|
+
const ret = getObject(arg0).getTime();
|
|
2557
|
+
return ret;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
2561
|
+
return handleError(function (arg0, arg1) {
|
|
2562
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
734
2563
|
return addHeapObject(ret);
|
|
735
2564
|
}, arguments);
|
|
736
2565
|
}
|
|
737
2566
|
|
|
738
|
-
export function
|
|
739
|
-
getObject(arg0)
|
|
2567
|
+
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
2568
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2569
|
+
return addHeapObject(ret);
|
|
740
2570
|
}
|
|
741
2571
|
|
|
742
|
-
export function
|
|
743
|
-
getObject(arg0)
|
|
2572
|
+
export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
|
|
2573
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
2574
|
+
return addHeapObject(ret);
|
|
744
2575
|
}
|
|
745
2576
|
|
|
746
|
-
export function
|
|
747
|
-
|
|
2577
|
+
export function __wbg_has_a5ea9117f258a0ec() {
|
|
2578
|
+
return handleError(function (arg0, arg1) {
|
|
2579
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
2580
|
+
return ret;
|
|
2581
|
+
}, arguments);
|
|
748
2582
|
}
|
|
749
2583
|
|
|
750
|
-
export function
|
|
751
|
-
|
|
2584
|
+
export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
|
|
2585
|
+
const ret = getObject(arg0).headers;
|
|
2586
|
+
return addHeapObject(ret);
|
|
752
2587
|
}
|
|
753
2588
|
|
|
754
|
-
export function
|
|
755
|
-
const ret =
|
|
2589
|
+
export function __wbg_incomingmessage_new(arg0) {
|
|
2590
|
+
const ret = IncomingMessage.__wrap(arg0);
|
|
756
2591
|
return addHeapObject(ret);
|
|
757
2592
|
}
|
|
758
2593
|
|
|
759
|
-
export function
|
|
760
|
-
getObject(arg0)
|
|
2594
|
+
export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
|
|
2595
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
761
2596
|
}
|
|
762
2597
|
|
|
763
|
-
export function
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
2598
|
+
export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
|
|
2599
|
+
let result;
|
|
2600
|
+
try {
|
|
2601
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
2602
|
+
} catch (_) {
|
|
2603
|
+
result = false;
|
|
2604
|
+
}
|
|
2605
|
+
const ret = result;
|
|
2606
|
+
return ret;
|
|
767
2607
|
}
|
|
768
2608
|
|
|
769
|
-
export function
|
|
2609
|
+
export function __wbg_instanceof_Map_f3469ce2244d2430(arg0) {
|
|
770
2610
|
let result;
|
|
771
2611
|
try {
|
|
772
|
-
result = getObject(arg0) instanceof
|
|
2612
|
+
result = getObject(arg0) instanceof Map;
|
|
773
2613
|
} catch (_) {
|
|
774
2614
|
result = false;
|
|
775
2615
|
}
|
|
@@ -777,82 +2617,87 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
|
|
|
777
2617
|
return ret;
|
|
778
2618
|
}
|
|
779
2619
|
|
|
780
|
-
export function
|
|
781
|
-
|
|
2620
|
+
export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
|
|
2621
|
+
let result;
|
|
2622
|
+
try {
|
|
2623
|
+
result = getObject(arg0) instanceof Response;
|
|
2624
|
+
} catch (_) {
|
|
2625
|
+
result = false;
|
|
2626
|
+
}
|
|
2627
|
+
const ret = result;
|
|
782
2628
|
return ret;
|
|
783
2629
|
}
|
|
784
2630
|
|
|
785
|
-
export function
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
2631
|
+
export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
|
|
2632
|
+
let result;
|
|
2633
|
+
try {
|
|
2634
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
2635
|
+
} catch (_) {
|
|
2636
|
+
result = false;
|
|
2637
|
+
}
|
|
2638
|
+
const ret = result;
|
|
2639
|
+
return ret;
|
|
791
2640
|
}
|
|
792
2641
|
|
|
793
|
-
export function
|
|
794
|
-
const ret =
|
|
2642
|
+
export function __wbg_ipcclientsubscription_new(arg0) {
|
|
2643
|
+
const ret = IpcClientSubscription.__wrap(arg0);
|
|
795
2644
|
return addHeapObject(ret);
|
|
796
2645
|
}
|
|
797
2646
|
|
|
798
|
-
export function
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
return addHeapObject(ret);
|
|
802
|
-
}, arguments);
|
|
2647
|
+
export function __wbg_isArray_a1eab7e0d067391b(arg0) {
|
|
2648
|
+
const ret = Array.isArray(getObject(arg0));
|
|
2649
|
+
return ret;
|
|
803
2650
|
}
|
|
804
2651
|
|
|
805
|
-
export function
|
|
806
|
-
const ret = getObject(arg0)
|
|
2652
|
+
export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
|
|
2653
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
807
2654
|
return ret;
|
|
808
2655
|
}
|
|
809
2656
|
|
|
810
|
-
export function
|
|
811
|
-
const ret =
|
|
2657
|
+
export function __wbg_iterator_9a24c88df860dc65() {
|
|
2658
|
+
const ret = Symbol.iterator;
|
|
812
2659
|
return addHeapObject(ret);
|
|
813
2660
|
}
|
|
814
2661
|
|
|
815
|
-
export function
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
return addHeapObject(ret);
|
|
819
|
-
}, arguments);
|
|
2662
|
+
export function __wbg_length_a446193dc22c12f8(arg0) {
|
|
2663
|
+
const ret = getObject(arg0).length;
|
|
2664
|
+
return ret;
|
|
820
2665
|
}
|
|
821
2666
|
|
|
822
|
-
export function
|
|
823
|
-
getObject(arg0).
|
|
2667
|
+
export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
2668
|
+
const ret = getObject(arg0).length;
|
|
2669
|
+
return ret;
|
|
824
2670
|
}
|
|
825
2671
|
|
|
826
|
-
export function
|
|
827
|
-
|
|
828
|
-
const ret = getObject(arg0).text();
|
|
829
|
-
return addHeapObject(ret);
|
|
830
|
-
}, arguments);
|
|
2672
|
+
export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
|
|
2673
|
+
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
831
2674
|
}
|
|
832
2675
|
|
|
833
|
-
export function
|
|
834
|
-
const
|
|
835
|
-
|
|
836
|
-
obj.a = 0;
|
|
837
|
-
return true;
|
|
838
|
-
}
|
|
839
|
-
const ret = false;
|
|
840
|
-
return ret;
|
|
2676
|
+
export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
|
|
2677
|
+
const ret = getObject(arg0).msCrypto;
|
|
2678
|
+
return addHeapObject(ret);
|
|
841
2679
|
}
|
|
842
2680
|
|
|
843
|
-
export function
|
|
844
|
-
const ret = new
|
|
2681
|
+
export function __wbg_new0_f788a2397c7ca929() {
|
|
2682
|
+
const ret = new Date();
|
|
845
2683
|
return addHeapObject(ret);
|
|
846
2684
|
}
|
|
847
2685
|
|
|
848
|
-
export function
|
|
2686
|
+
export function __wbg_new_018dcc2d6c8c2f6a() {
|
|
2687
|
+
return handleError(function () {
|
|
2688
|
+
const ret = new Headers();
|
|
2689
|
+
return addHeapObject(ret);
|
|
2690
|
+
}, arguments);
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
849
2694
|
try {
|
|
850
2695
|
var state0 = { a: arg0, b: arg1 };
|
|
851
2696
|
var cb0 = (arg0, arg1) => {
|
|
852
2697
|
const a = state0.a;
|
|
853
2698
|
state0.a = 0;
|
|
854
2699
|
try {
|
|
855
|
-
return
|
|
2700
|
+
return __wbg_adapter_238(a, state0.b, arg0, arg1);
|
|
856
2701
|
} finally {
|
|
857
2702
|
state0.a = a;
|
|
858
2703
|
}
|
|
@@ -864,287 +2709,343 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
|
|
|
864
2709
|
}
|
|
865
2710
|
}
|
|
866
2711
|
|
|
867
|
-
export function
|
|
868
|
-
|
|
2712
|
+
export function __wbg_new_405e22f390576ce2() {
|
|
2713
|
+
const ret = new Object();
|
|
2714
|
+
return addHeapObject(ret);
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
export function __wbg_new_78feb108b6472713() {
|
|
2718
|
+
const ret = new Array();
|
|
2719
|
+
return addHeapObject(ret);
|
|
869
2720
|
}
|
|
870
2721
|
|
|
871
|
-
export function
|
|
2722
|
+
export function __wbg_new_8a6f238a6ece86ea() {
|
|
872
2723
|
const ret = new Error();
|
|
873
2724
|
return addHeapObject(ret);
|
|
874
2725
|
}
|
|
875
2726
|
|
|
876
|
-
export function
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
2727
|
+
export function __wbg_new_9fd39a253424609a() {
|
|
2728
|
+
return handleError(function () {
|
|
2729
|
+
const ret = new FormData();
|
|
2730
|
+
return addHeapObject(ret);
|
|
2731
|
+
}, arguments);
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
export function __wbg_new_a12002a7f91c75be(arg0) {
|
|
2735
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
2736
|
+
return addHeapObject(ret);
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
export function __wbg_new_c68d7209be747379(arg0, arg1) {
|
|
2740
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2741
|
+
return addHeapObject(ret);
|
|
882
2742
|
}
|
|
883
2743
|
|
|
884
|
-
export function
|
|
2744
|
+
export function __wbg_new_e25e5aab09ff45db() {
|
|
2745
|
+
return handleError(function () {
|
|
2746
|
+
const ret = new AbortController();
|
|
2747
|
+
return addHeapObject(ret);
|
|
2748
|
+
}, arguments);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
|
|
885
2752
|
let deferred0_0;
|
|
886
2753
|
let deferred0_1;
|
|
887
2754
|
try {
|
|
888
2755
|
deferred0_0 = arg0;
|
|
889
2756
|
deferred0_1 = arg1;
|
|
890
|
-
|
|
2757
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2758
|
+
return addHeapObject(ret);
|
|
891
2759
|
} finally {
|
|
892
2760
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
893
2761
|
}
|
|
894
2762
|
}
|
|
895
2763
|
|
|
896
|
-
export function
|
|
897
|
-
const ret =
|
|
2764
|
+
export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
|
|
2765
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
898
2766
|
return addHeapObject(ret);
|
|
899
2767
|
}
|
|
900
2768
|
|
|
901
|
-
export function
|
|
902
|
-
const ret = getObject(arg0)
|
|
2769
|
+
export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
|
|
2770
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
903
2771
|
return addHeapObject(ret);
|
|
904
2772
|
}
|
|
905
2773
|
|
|
906
|
-
export function
|
|
907
|
-
const ret =
|
|
2774
|
+
export function __wbg_newwithlength_a381634e90c276d4(arg0) {
|
|
2775
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
2776
|
+
return addHeapObject(ret);
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
export function __wbg_newwithstrandinit_06c535e0a867c635() {
|
|
2780
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
2781
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
2782
|
+
return addHeapObject(ret);
|
|
2783
|
+
}, arguments);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
|
|
2787
|
+
return handleError(function (arg0, arg1) {
|
|
2788
|
+
const ret = new Blob(getObject(arg0), getObject(arg1));
|
|
2789
|
+
return addHeapObject(ret);
|
|
2790
|
+
}, arguments);
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
export function __wbg_next_25feadfc0913fea9(arg0) {
|
|
2794
|
+
const ret = getObject(arg0).next;
|
|
908
2795
|
return addHeapObject(ret);
|
|
909
2796
|
}
|
|
910
2797
|
|
|
911
|
-
export function
|
|
2798
|
+
export function __wbg_next_6574e1a8a62d1055() {
|
|
2799
|
+
return handleError(function (arg0) {
|
|
2800
|
+
const ret = getObject(arg0).next();
|
|
2801
|
+
return addHeapObject(ret);
|
|
2802
|
+
}, arguments);
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
export function __wbg_node_905d3e251edff8a2(arg0) {
|
|
912
2806
|
const ret = getObject(arg0).node;
|
|
913
2807
|
return addHeapObject(ret);
|
|
914
2808
|
}
|
|
915
2809
|
|
|
916
|
-
export function
|
|
917
|
-
return handleError(function () {
|
|
918
|
-
const ret =
|
|
2810
|
+
export function __wbg_parse_def2e24ef1252aff() {
|
|
2811
|
+
return handleError(function (arg0, arg1) {
|
|
2812
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
919
2813
|
return addHeapObject(ret);
|
|
920
2814
|
}, arguments);
|
|
921
2815
|
}
|
|
922
2816
|
|
|
923
|
-
export function
|
|
924
|
-
const ret =
|
|
2817
|
+
export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
|
|
2818
|
+
const ret = getObject(arg0).process;
|
|
2819
|
+
return addHeapObject(ret);
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
|
|
2823
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
925
2824
|
return ret;
|
|
926
2825
|
}
|
|
927
2826
|
|
|
928
|
-
export function
|
|
929
|
-
|
|
930
|
-
return addHeapObject(ret);
|
|
2827
|
+
export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
|
|
2828
|
+
queueMicrotask(getObject(arg0));
|
|
931
2829
|
}
|
|
932
2830
|
|
|
933
|
-
export function
|
|
934
|
-
const ret =
|
|
2831
|
+
export function __wbg_queueMicrotask_d3219def82552485(arg0) {
|
|
2832
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
935
2833
|
return addHeapObject(ret);
|
|
936
2834
|
}
|
|
937
2835
|
|
|
938
|
-
export function
|
|
939
|
-
|
|
940
|
-
|
|
2836
|
+
export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
2837
|
+
return handleError(function (arg0, arg1) {
|
|
2838
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2839
|
+
}, arguments);
|
|
941
2840
|
}
|
|
942
2841
|
|
|
943
|
-
export function
|
|
944
|
-
const ret =
|
|
2842
|
+
export function __wbg_receiveerror_new(arg0) {
|
|
2843
|
+
const ret = ReceiveError.__wrap(arg0);
|
|
945
2844
|
return addHeapObject(ret);
|
|
946
2845
|
}
|
|
947
2846
|
|
|
948
|
-
export function
|
|
949
|
-
|
|
2847
|
+
export function __wbg_require_60cc747a6bc5215a() {
|
|
2848
|
+
return handleError(function () {
|
|
2849
|
+
const ret = module.require;
|
|
2850
|
+
return addHeapObject(ret);
|
|
2851
|
+
}, arguments);
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
export function __wbg_resolve_4851785c9c5f573d(arg0) {
|
|
2855
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
950
2856
|
return addHeapObject(ret);
|
|
951
2857
|
}
|
|
952
2858
|
|
|
953
|
-
export function
|
|
2859
|
+
export function __wbg_send_9b8fc6bb517867dd() {
|
|
954
2860
|
return handleError(function (arg0, arg1) {
|
|
955
|
-
getObject(arg0).
|
|
2861
|
+
const ret = getObject(arg0).send(OutgoingMessage.__wrap(arg1));
|
|
2862
|
+
return addHeapObject(ret);
|
|
956
2863
|
}, arguments);
|
|
957
2864
|
}
|
|
958
2865
|
|
|
959
|
-
export function
|
|
960
|
-
const ret =
|
|
2866
|
+
export function __wbg_senderror_new(arg0) {
|
|
2867
|
+
const ret = SendError.__wrap(arg0);
|
|
961
2868
|
return addHeapObject(ret);
|
|
962
2869
|
}
|
|
963
2870
|
|
|
964
|
-
export function
|
|
965
|
-
|
|
966
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
967
|
-
}, arguments);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
export function __wbg_new_fec2611eb9180f95(arg0) {
|
|
971
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
2871
|
+
export function __wbg_setTimeout_2e707715f8cc9497(arg0, arg1) {
|
|
2872
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
972
2873
|
return addHeapObject(ret);
|
|
973
2874
|
}
|
|
974
2875
|
|
|
975
|
-
export function
|
|
976
|
-
getObject(arg0)
|
|
2876
|
+
export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
|
|
2877
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
977
2878
|
}
|
|
978
2879
|
|
|
979
|
-
export function
|
|
980
|
-
|
|
981
|
-
const ret = self.self;
|
|
982
|
-
return addHeapObject(ret);
|
|
983
|
-
}, arguments);
|
|
2880
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
2881
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
984
2882
|
}
|
|
985
2883
|
|
|
986
|
-
export function
|
|
987
|
-
|
|
988
|
-
const ret = window.window;
|
|
989
|
-
return addHeapObject(ret);
|
|
990
|
-
}, arguments);
|
|
2884
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
2885
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
991
2886
|
}
|
|
992
2887
|
|
|
993
|
-
export function
|
|
994
|
-
|
|
995
|
-
const ret = globalThis.globalThis;
|
|
996
|
-
return addHeapObject(ret);
|
|
997
|
-
}, arguments);
|
|
2888
|
+
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
2889
|
+
getObject(arg0).body = getObject(arg1);
|
|
998
2890
|
}
|
|
999
2891
|
|
|
1000
|
-
export function
|
|
1001
|
-
|
|
1002
|
-
const ret = global.global;
|
|
1003
|
-
return addHeapObject(ret);
|
|
1004
|
-
}, arguments);
|
|
2892
|
+
export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
|
|
2893
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1005
2894
|
}
|
|
1006
2895
|
|
|
1007
|
-
export function
|
|
1008
|
-
|
|
1009
|
-
return addHeapObject(ret);
|
|
2896
|
+
export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
|
|
2897
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1010
2898
|
}
|
|
1011
2899
|
|
|
1012
|
-
export function
|
|
1013
|
-
|
|
1014
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
1015
|
-
return addHeapObject(ret);
|
|
1016
|
-
}, arguments);
|
|
2900
|
+
export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
|
|
2901
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1017
2902
|
}
|
|
1018
2903
|
|
|
1019
|
-
export function
|
|
1020
|
-
|
|
1021
|
-
return addHeapObject(ret);
|
|
2904
|
+
export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
|
|
2905
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1022
2906
|
}
|
|
1023
2907
|
|
|
1024
|
-
export function
|
|
1025
|
-
|
|
1026
|
-
|
|
2908
|
+
export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
|
|
2909
|
+
let deferred0_0;
|
|
2910
|
+
let deferred0_1;
|
|
2911
|
+
try {
|
|
2912
|
+
deferred0_0 = arg1;
|
|
2913
|
+
deferred0_1 = arg2;
|
|
2914
|
+
getObject(arg0).name = getStringFromWasm0(arg1, arg2);
|
|
2915
|
+
} finally {
|
|
2916
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2917
|
+
}
|
|
1027
2918
|
}
|
|
1028
2919
|
|
|
1029
|
-
export function
|
|
1030
|
-
|
|
1031
|
-
return addHeapObject(ret);
|
|
2920
|
+
export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
|
|
2921
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1032
2922
|
}
|
|
1033
2923
|
|
|
1034
|
-
export function
|
|
1035
|
-
|
|
1036
|
-
return ret;
|
|
2924
|
+
export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
|
|
2925
|
+
getObject(arg0).type = getStringFromWasm0(arg1, arg2);
|
|
1037
2926
|
}
|
|
1038
2927
|
|
|
1039
|
-
export function
|
|
1040
|
-
let
|
|
2928
|
+
export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
|
|
2929
|
+
let deferred0_0;
|
|
2930
|
+
let deferred0_1;
|
|
1041
2931
|
try {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
2932
|
+
deferred0_0 = arg1;
|
|
2933
|
+
deferred0_1 = arg2;
|
|
2934
|
+
getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
|
|
2935
|
+
} finally {
|
|
2936
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1045
2937
|
}
|
|
1046
|
-
const ret = result;
|
|
1047
|
-
return ret;
|
|
1048
2938
|
}
|
|
1049
2939
|
|
|
1050
|
-
export function
|
|
1051
|
-
const ret =
|
|
2940
|
+
export function __wbg_signal_aaf9ad74119f20a4(arg0) {
|
|
2941
|
+
const ret = getObject(arg0).signal;
|
|
1052
2942
|
return addHeapObject(ret);
|
|
1053
2943
|
}
|
|
1054
2944
|
|
|
1055
|
-
export function
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
2945
|
+
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
2946
|
+
const ret = getObject(arg1).stack;
|
|
2947
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2948
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2949
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2950
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1060
2951
|
}
|
|
1061
2952
|
|
|
1062
|
-
export function
|
|
1063
|
-
const ret =
|
|
1064
|
-
return addHeapObject(ret);
|
|
2953
|
+
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
|
|
2954
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
2955
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1065
2956
|
}
|
|
1066
2957
|
|
|
1067
|
-
export function
|
|
1068
|
-
const ret =
|
|
1069
|
-
return addHeapObject(ret);
|
|
2958
|
+
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
|
|
2959
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
2960
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1070
2961
|
}
|
|
1071
2962
|
|
|
1072
|
-
export function
|
|
1073
|
-
const ret =
|
|
1074
|
-
return addHeapObject(ret);
|
|
2963
|
+
export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
|
|
2964
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
2965
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1075
2966
|
}
|
|
1076
2967
|
|
|
1077
|
-
export function
|
|
1078
|
-
const ret =
|
|
1079
|
-
return ret;
|
|
2968
|
+
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
|
|
2969
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
2970
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1080
2971
|
}
|
|
1081
2972
|
|
|
1082
|
-
export function
|
|
1083
|
-
|
|
1084
|
-
try {
|
|
1085
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1086
|
-
} catch (_) {
|
|
1087
|
-
result = false;
|
|
1088
|
-
}
|
|
1089
|
-
const ret = result;
|
|
2973
|
+
export function __wbg_status_f6360336ca686bf0(arg0) {
|
|
2974
|
+
const ret = getObject(arg0).status;
|
|
1090
2975
|
return ret;
|
|
1091
2976
|
}
|
|
1092
2977
|
|
|
1093
|
-
export function
|
|
1094
|
-
return handleError(function () {
|
|
1095
|
-
const ret =
|
|
2978
|
+
export function __wbg_stringify_f7ed6987935b4a24() {
|
|
2979
|
+
return handleError(function (arg0) {
|
|
2980
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1096
2981
|
return addHeapObject(ret);
|
|
1097
2982
|
}, arguments);
|
|
1098
2983
|
}
|
|
1099
2984
|
|
|
1100
|
-
export function
|
|
1101
|
-
|
|
1102
|
-
|
|
2985
|
+
export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
|
|
2986
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2987
|
+
return addHeapObject(ret);
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
export function __wbg_text_7805bea50de2af49() {
|
|
2991
|
+
return handleError(function (arg0) {
|
|
2992
|
+
const ret = getObject(arg0).text();
|
|
2993
|
+
return addHeapObject(ret);
|
|
1103
2994
|
}, arguments);
|
|
1104
2995
|
}
|
|
1105
2996
|
|
|
1106
|
-
export function
|
|
1107
|
-
getObject(arg0).
|
|
2997
|
+
export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
|
|
2998
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2999
|
+
return addHeapObject(ret);
|
|
1108
3000
|
}
|
|
1109
3001
|
|
|
1110
|
-
export function
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
return addHeapObject(ret);
|
|
1114
|
-
}, arguments);
|
|
3002
|
+
export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
|
|
3003
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
3004
|
+
return addHeapObject(ret);
|
|
1115
3005
|
}
|
|
1116
3006
|
|
|
1117
|
-
export function
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
3007
|
+
export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
|
|
3008
|
+
const ret = getObject(arg1).url;
|
|
3009
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3010
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3011
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3012
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1121
3013
|
}
|
|
1122
3014
|
|
|
1123
|
-
export function
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
getStringFromWasm0(arg1, arg2),
|
|
1127
|
-
getObject(arg3),
|
|
1128
|
-
getStringFromWasm0(arg4, arg5),
|
|
1129
|
-
);
|
|
1130
|
-
}, arguments);
|
|
3015
|
+
export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
|
3016
|
+
const ret = getObject(arg0).value;
|
|
3017
|
+
return addHeapObject(ret);
|
|
1131
3018
|
}
|
|
1132
3019
|
|
|
1133
|
-
export function
|
|
1134
|
-
const ret =
|
|
3020
|
+
export function __wbg_versions_c01dfd4722a88165(arg0) {
|
|
3021
|
+
const ret = getObject(arg0).versions;
|
|
1135
3022
|
return addHeapObject(ret);
|
|
1136
3023
|
}
|
|
1137
3024
|
|
|
1138
|
-
export function
|
|
1139
|
-
|
|
3025
|
+
export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
|
|
3026
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
export function __wbindgen_as_number(arg0) {
|
|
3030
|
+
const ret = +getObject(arg0);
|
|
3031
|
+
return ret;
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
export function __wbindgen_bigint_from_i64(arg0) {
|
|
3035
|
+
const ret = arg0;
|
|
1140
3036
|
return addHeapObject(ret);
|
|
1141
3037
|
}
|
|
1142
3038
|
|
|
1143
|
-
export function
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
3039
|
+
export function __wbindgen_bigint_from_u64(arg0) {
|
|
3040
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
3041
|
+
return addHeapObject(ret);
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
|
|
3045
|
+
const v = getObject(arg1);
|
|
3046
|
+
const ret = typeof v === "bigint" ? v : undefined;
|
|
3047
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
3048
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1148
3049
|
}
|
|
1149
3050
|
|
|
1150
3051
|
export function __wbindgen_boolean_get(arg0) {
|
|
@@ -1153,19 +3054,24 @@ export function __wbindgen_boolean_get(arg0) {
|
|
|
1153
3054
|
return ret;
|
|
1154
3055
|
}
|
|
1155
3056
|
|
|
1156
|
-
export function
|
|
1157
|
-
const obj =
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
3057
|
+
export function __wbindgen_cb_drop(arg0) {
|
|
3058
|
+
const obj = takeObject(arg0).original;
|
|
3059
|
+
if (obj.cnt-- == 1) {
|
|
3060
|
+
obj.a = 0;
|
|
3061
|
+
return true;
|
|
3062
|
+
}
|
|
3063
|
+
const ret = false;
|
|
3064
|
+
return ret;
|
|
1161
3065
|
}
|
|
1162
3066
|
|
|
1163
|
-
export function
|
|
1164
|
-
const ret =
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
3067
|
+
export function __wbindgen_closure_wrapper2889(arg0, arg1, arg2) {
|
|
3068
|
+
const ret = makeMutClosure(arg0, arg1, 669, __wbg_adapter_50);
|
|
3069
|
+
return addHeapObject(ret);
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
export function __wbindgen_closure_wrapper3282(arg0, arg1, arg2) {
|
|
3073
|
+
const ret = makeMutClosure(arg0, arg1, 791, __wbg_adapter_53);
|
|
3074
|
+
return addHeapObject(ret);
|
|
1169
3075
|
}
|
|
1170
3076
|
|
|
1171
3077
|
export function __wbindgen_debug_string(arg0, arg1) {
|
|
@@ -1176,47 +3082,94 @@ export function __wbindgen_debug_string(arg0, arg1) {
|
|
|
1176
3082
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1177
3083
|
}
|
|
1178
3084
|
|
|
1179
|
-
export function
|
|
1180
|
-
|
|
3085
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
3086
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
3087
|
+
return addHeapObject(ret);
|
|
1181
3088
|
}
|
|
1182
3089
|
|
|
1183
|
-
export function
|
|
1184
|
-
const ret = getObject(arg0)
|
|
1185
|
-
return
|
|
3090
|
+
export function __wbindgen_in(arg0, arg1) {
|
|
3091
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
3092
|
+
return ret;
|
|
1186
3093
|
}
|
|
1187
3094
|
|
|
1188
|
-
export function
|
|
1189
|
-
|
|
3095
|
+
export function __wbindgen_is_bigint(arg0) {
|
|
3096
|
+
const ret = typeof getObject(arg0) === "bigint";
|
|
3097
|
+
return ret;
|
|
1190
3098
|
}
|
|
1191
3099
|
|
|
1192
|
-
export function
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
return addHeapObject(ret);
|
|
1196
|
-
}, arguments);
|
|
3100
|
+
export function __wbindgen_is_function(arg0) {
|
|
3101
|
+
const ret = typeof getObject(arg0) === "function";
|
|
3102
|
+
return ret;
|
|
1197
3103
|
}
|
|
1198
3104
|
|
|
1199
|
-
export function
|
|
1200
|
-
|
|
3105
|
+
export function __wbindgen_is_object(arg0) {
|
|
3106
|
+
const val = getObject(arg0);
|
|
3107
|
+
const ret = typeof val === "object" && val !== null;
|
|
3108
|
+
return ret;
|
|
1201
3109
|
}
|
|
1202
3110
|
|
|
1203
|
-
export function
|
|
1204
|
-
|
|
3111
|
+
export function __wbindgen_is_string(arg0) {
|
|
3112
|
+
const ret = typeof getObject(arg0) === "string";
|
|
3113
|
+
return ret;
|
|
1205
3114
|
}
|
|
1206
3115
|
|
|
1207
|
-
export function
|
|
1208
|
-
|
|
3116
|
+
export function __wbindgen_is_undefined(arg0) {
|
|
3117
|
+
const ret = getObject(arg0) === undefined;
|
|
3118
|
+
return ret;
|
|
1209
3119
|
}
|
|
1210
3120
|
|
|
1211
|
-
export function
|
|
1212
|
-
|
|
3121
|
+
export function __wbindgen_jsval_eq(arg0, arg1) {
|
|
3122
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
3123
|
+
return ret;
|
|
1213
3124
|
}
|
|
1214
3125
|
|
|
1215
|
-
export function
|
|
1216
|
-
|
|
3126
|
+
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
3127
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
3128
|
+
return ret;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
export function __wbindgen_memory() {
|
|
3132
|
+
const ret = wasm.memory;
|
|
3133
|
+
return addHeapObject(ret);
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
|
3137
|
+
const obj = getObject(arg1);
|
|
3138
|
+
const ret = typeof obj === "number" ? obj : undefined;
|
|
3139
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
3140
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
export function __wbindgen_number_new(arg0) {
|
|
3144
|
+
const ret = arg0;
|
|
3145
|
+
return addHeapObject(ret);
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
|
3149
|
+
const ret = getObject(arg0);
|
|
3150
|
+
return addHeapObject(ret);
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
3154
|
+
takeObject(arg0);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
|
3158
|
+
const obj = getObject(arg1);
|
|
3159
|
+
const ret = typeof obj === "string" ? obj : undefined;
|
|
3160
|
+
var ptr1 = isLikeNone(ret)
|
|
3161
|
+
? 0
|
|
3162
|
+
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3163
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3164
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3165
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1217
3166
|
}
|
|
1218
3167
|
|
|
1219
|
-
export function
|
|
1220
|
-
const ret =
|
|
3168
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
|
3169
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1221
3170
|
return addHeapObject(ret);
|
|
1222
3171
|
}
|
|
3172
|
+
|
|
3173
|
+
export function __wbindgen_throw(arg0, arg1) {
|
|
3174
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3175
|
+
}
|