bitmask-core 0.2.1 → 0.2.2

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.
@@ -0,0 +1,894 @@
1
+ import * as wasm from './bitmask_core_bg.wasm';
2
+
3
+ const heap = new Array(32).fill(undefined);
4
+
5
+ heap.push(undefined, null, true, false);
6
+
7
+ function getObject(idx) { return heap[idx]; }
8
+
9
+ let heap_next = heap.length;
10
+
11
+ function dropObject(idx) {
12
+ if (idx < 36) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
15
+ }
16
+
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
21
+ }
22
+
23
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
24
+
25
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
26
+
27
+ cachedTextDecoder.decode();
28
+
29
+ let cachegetUint8Memory0 = null;
30
+ function getUint8Memory0() {
31
+ if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
32
+ cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
33
+ }
34
+ return cachegetUint8Memory0;
35
+ }
36
+
37
+ function getStringFromWasm0(ptr, len) {
38
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
+ }
40
+
41
+ function addHeapObject(obj) {
42
+ if (heap_next === heap.length) heap.push(heap.length + 1);
43
+ const idx = heap_next;
44
+ heap_next = heap[idx];
45
+
46
+ heap[idx] = obj;
47
+ return idx;
48
+ }
49
+
50
+ let WASM_VECTOR_LEN = 0;
51
+
52
+ const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
53
+
54
+ let cachedTextEncoder = new lTextEncoder('utf-8');
55
+
56
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
57
+ ? function (arg, view) {
58
+ return cachedTextEncoder.encodeInto(arg, view);
59
+ }
60
+ : function (arg, view) {
61
+ const buf = cachedTextEncoder.encode(arg);
62
+ view.set(buf);
63
+ return {
64
+ read: arg.length,
65
+ written: buf.length
66
+ };
67
+ });
68
+
69
+ function passStringToWasm0(arg, malloc, realloc) {
70
+
71
+ if (realloc === undefined) {
72
+ const buf = cachedTextEncoder.encode(arg);
73
+ const ptr = malloc(buf.length);
74
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
75
+ WASM_VECTOR_LEN = buf.length;
76
+ return ptr;
77
+ }
78
+
79
+ let len = arg.length;
80
+ let ptr = malloc(len);
81
+
82
+ const mem = getUint8Memory0();
83
+
84
+ let offset = 0;
85
+
86
+ for (; offset < len; offset++) {
87
+ const code = arg.charCodeAt(offset);
88
+ if (code > 0x7F) break;
89
+ mem[ptr + offset] = code;
90
+ }
91
+
92
+ if (offset !== len) {
93
+ if (offset !== 0) {
94
+ arg = arg.slice(offset);
95
+ }
96
+ ptr = realloc(ptr, len, len = offset + arg.length * 3);
97
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
98
+ const ret = encodeString(arg, view);
99
+
100
+ offset += ret.written;
101
+ }
102
+
103
+ WASM_VECTOR_LEN = offset;
104
+ return ptr;
105
+ }
106
+
107
+ let cachegetInt32Memory0 = null;
108
+ function getInt32Memory0() {
109
+ if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
110
+ cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
111
+ }
112
+ return cachegetInt32Memory0;
113
+ }
114
+
115
+ function isLikeNone(x) {
116
+ return x === undefined || x === null;
117
+ }
118
+
119
+ function debugString(val) {
120
+ // primitive types
121
+ const type = typeof val;
122
+ if (type == 'number' || type == 'boolean' || val == null) {
123
+ return `${val}`;
124
+ }
125
+ if (type == 'string') {
126
+ return `"${val}"`;
127
+ }
128
+ if (type == 'symbol') {
129
+ const description = val.description;
130
+ if (description == null) {
131
+ return 'Symbol';
132
+ } else {
133
+ return `Symbol(${description})`;
134
+ }
135
+ }
136
+ if (type == 'function') {
137
+ const name = val.name;
138
+ if (typeof name == 'string' && name.length > 0) {
139
+ return `Function(${name})`;
140
+ } else {
141
+ return 'Function';
142
+ }
143
+ }
144
+ // objects
145
+ if (Array.isArray(val)) {
146
+ const length = val.length;
147
+ let debug = '[';
148
+ if (length > 0) {
149
+ debug += debugString(val[0]);
150
+ }
151
+ for(let i = 1; i < length; i++) {
152
+ debug += ', ' + debugString(val[i]);
153
+ }
154
+ debug += ']';
155
+ return debug;
156
+ }
157
+ // Test for built-in
158
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
159
+ let className;
160
+ if (builtInMatches.length > 1) {
161
+ className = builtInMatches[1];
162
+ } else {
163
+ // Failed to match the standard '[object ClassName]'
164
+ return toString.call(val);
165
+ }
166
+ if (className == 'Object') {
167
+ // we're a user defined class or Object
168
+ // JSON.stringify avoids problems with cycles, and is generally much
169
+ // easier than looping through ownProperties of `val`.
170
+ try {
171
+ return 'Object(' + JSON.stringify(val) + ')';
172
+ } catch (_) {
173
+ return 'Object';
174
+ }
175
+ }
176
+ // errors
177
+ if (val instanceof Error) {
178
+ return `${val.name}: ${val.message}\n${val.stack}`;
179
+ }
180
+ // TODO we could test for more things here, like `Set`s and `Map`s.
181
+ return className;
182
+ }
183
+
184
+ function makeMutClosure(arg0, arg1, dtor, f) {
185
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
186
+ const real = (...args) => {
187
+ // First up with a closure we increment the internal reference
188
+ // count. This ensures that the Rust closure environment won't
189
+ // be deallocated while we're invoking it.
190
+ state.cnt++;
191
+ const a = state.a;
192
+ state.a = 0;
193
+ try {
194
+ return f(a, state.b, ...args);
195
+ } finally {
196
+ if (--state.cnt === 0) {
197
+ wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
198
+
199
+ } else {
200
+ state.a = a;
201
+ }
202
+ }
203
+ };
204
+ real.original = state;
205
+
206
+ return real;
207
+ }
208
+ function __wbg_adapter_28(arg0, arg1, arg2) {
209
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha021fcb608f43403(arg0, arg1, addHeapObject(arg2));
210
+ }
211
+
212
+ /**
213
+ * @param {string} password
214
+ * @param {string} encrypted_descriptors
215
+ * @returns {Promise<any>}
216
+ */
217
+ export function get_vault(password, encrypted_descriptors) {
218
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
221
+ const len1 = WASM_VECTOR_LEN;
222
+ const ret = wasm.get_vault(ptr0, len0, ptr1, len1);
223
+ return takeObject(ret);
224
+ }
225
+
226
+ /**
227
+ * @param {string} encryption_password
228
+ * @param {string} seed_password
229
+ * @returns {Promise<any>}
230
+ */
231
+ export function get_mnemonic_seed(encryption_password, seed_password) {
232
+ const ptr0 = passStringToWasm0(encryption_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
233
+ const len0 = WASM_VECTOR_LEN;
234
+ const ptr1 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
235
+ const len1 = WASM_VECTOR_LEN;
236
+ const ret = wasm.get_mnemonic_seed(ptr0, len0, ptr1, len1);
237
+ return takeObject(ret);
238
+ }
239
+
240
+ /**
241
+ * @param {string} mnemonic
242
+ * @param {string} encryption_password
243
+ * @param {string} seed_password
244
+ * @returns {Promise<any>}
245
+ */
246
+ export function save_mnemonic_seed(mnemonic, encryption_password, seed_password) {
247
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
+ const len0 = WASM_VECTOR_LEN;
249
+ const ptr1 = passStringToWasm0(encryption_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
+ const len1 = WASM_VECTOR_LEN;
251
+ const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
252
+ const len2 = WASM_VECTOR_LEN;
253
+ const ret = wasm.save_mnemonic_seed(ptr0, len0, ptr1, len1, ptr2, len2);
254
+ return takeObject(ret);
255
+ }
256
+
257
+ /**
258
+ * @param {string} descriptor
259
+ * @param {string | undefined} change_descriptor
260
+ * @returns {Promise<any>}
261
+ */
262
+ export function get_wallet_data(descriptor, change_descriptor) {
263
+ const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
264
+ const len0 = WASM_VECTOR_LEN;
265
+ var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
+ var len1 = WASM_VECTOR_LEN;
267
+ const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
268
+ return takeObject(ret);
269
+ }
270
+
271
+ /**
272
+ * @returns {Promise<any>}
273
+ */
274
+ export function import_list_assets() {
275
+ const ret = wasm.import_list_assets();
276
+ return takeObject(ret);
277
+ }
278
+
279
+ /**
280
+ * @param {string} rgb_tokens_descriptor
281
+ * @param {string | undefined} asset
282
+ * @param {string | undefined} genesis
283
+ * @returns {Promise<any>}
284
+ */
285
+ export function import_asset(rgb_tokens_descriptor, asset, genesis) {
286
+ const ptr0 = passStringToWasm0(rgb_tokens_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
287
+ const len0 = WASM_VECTOR_LEN;
288
+ var ptr1 = isLikeNone(asset) ? 0 : passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
289
+ var len1 = WASM_VECTOR_LEN;
290
+ var ptr2 = isLikeNone(genesis) ? 0 : passStringToWasm0(genesis, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
291
+ var len2 = WASM_VECTOR_LEN;
292
+ const ret = wasm.import_asset(ptr0, len0, ptr1, len1, ptr2, len2);
293
+ return takeObject(ret);
294
+ }
295
+
296
+ /**
297
+ * @param {string} utxo_string
298
+ * @returns {Promise<any>}
299
+ */
300
+ export function set_blinded_utxo(utxo_string) {
301
+ const ptr0 = passStringToWasm0(utxo_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
+ const len0 = WASM_VECTOR_LEN;
303
+ const ret = wasm.set_blinded_utxo(ptr0, len0);
304
+ return takeObject(ret);
305
+ }
306
+
307
+ const u32CvtShim = new Uint32Array(2);
308
+
309
+ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
310
+ /**
311
+ * @param {string} descriptor
312
+ * @param {string} change_descriptor
313
+ * @param {string} address
314
+ * @param {BigInt} amount
315
+ * @returns {Promise<any>}
316
+ */
317
+ export function send_sats(descriptor, change_descriptor, address, amount) {
318
+ const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
319
+ const len0 = WASM_VECTOR_LEN;
320
+ const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
321
+ const len1 = WASM_VECTOR_LEN;
322
+ const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
323
+ const len2 = WASM_VECTOR_LEN;
324
+ uint64CvtShim[0] = amount;
325
+ const low3 = u32CvtShim[0];
326
+ const high3 = u32CvtShim[1];
327
+ const ret = wasm.send_sats(ptr0, len0, ptr1, len1, ptr2, len2, low3, high3);
328
+ return takeObject(ret);
329
+ }
330
+
331
+ /**
332
+ * @param {string} descriptor
333
+ * @param {string} change_descriptor
334
+ * @param {string} address
335
+ * @param {string} uda_address
336
+ * @returns {Promise<any>}
337
+ */
338
+ export function fund_wallet(descriptor, change_descriptor, address, uda_address) {
339
+ const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
+ const len0 = WASM_VECTOR_LEN;
341
+ const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
342
+ const len1 = WASM_VECTOR_LEN;
343
+ const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
344
+ const len2 = WASM_VECTOR_LEN;
345
+ const ptr3 = passStringToWasm0(uda_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
+ const len3 = WASM_VECTOR_LEN;
347
+ const ret = wasm.fund_wallet(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
348
+ return takeObject(ret);
349
+ }
350
+
351
+ /**
352
+ * @param {string} btc_descriptor
353
+ * @param {string} btc_change_descriptor
354
+ * @param {string} rgb_tokens_descriptor
355
+ * @param {string} blinded_utxo
356
+ * @param {BigInt} amount
357
+ * @param {string} asset
358
+ * @returns {Promise<any>}
359
+ */
360
+ export function send_tokens(btc_descriptor, btc_change_descriptor, rgb_tokens_descriptor, blinded_utxo, amount, asset) {
361
+ const ptr0 = passStringToWasm0(btc_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
+ const len0 = WASM_VECTOR_LEN;
363
+ const ptr1 = passStringToWasm0(btc_change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
364
+ const len1 = WASM_VECTOR_LEN;
365
+ const ptr2 = passStringToWasm0(rgb_tokens_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
366
+ const len2 = WASM_VECTOR_LEN;
367
+ const ptr3 = passStringToWasm0(blinded_utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
368
+ const len3 = WASM_VECTOR_LEN;
369
+ uint64CvtShim[0] = amount;
370
+ const low4 = u32CvtShim[0];
371
+ const high4 = u32CvtShim[1];
372
+ const ptr5 = passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
+ const len5 = WASM_VECTOR_LEN;
374
+ const ret = wasm.send_tokens(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, low4, high4, ptr5, len5);
375
+ return takeObject(ret);
376
+ }
377
+
378
+ /**
379
+ * @param {string} consignment
380
+ * @returns {Promise<any>}
381
+ */
382
+ export function validate_transaction(consignment) {
383
+ const ptr0 = passStringToWasm0(consignment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
+ const len0 = WASM_VECTOR_LEN;
385
+ const ret = wasm.validate_transaction(ptr0, len0);
386
+ return takeObject(ret);
387
+ }
388
+
389
+ /**
390
+ * @param {string} consignment
391
+ * @param {string} txid
392
+ * @param {number} vout
393
+ * @param {string} blinding
394
+ * @returns {Promise<any>}
395
+ */
396
+ export function accept_transaction(consignment, txid, vout, blinding) {
397
+ const ptr0 = passStringToWasm0(consignment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
398
+ const len0 = WASM_VECTOR_LEN;
399
+ const ptr1 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
400
+ const len1 = WASM_VECTOR_LEN;
401
+ const ptr2 = passStringToWasm0(blinding, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
402
+ const len2 = WASM_VECTOR_LEN;
403
+ const ret = wasm.accept_transaction(ptr0, len0, ptr1, len1, vout, ptr2, len2);
404
+ return takeObject(ret);
405
+ }
406
+
407
+ /**
408
+ * @param {string} network_str
409
+ */
410
+ export function switch_network(network_str) {
411
+ const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
412
+ const len0 = WASM_VECTOR_LEN;
413
+ wasm.switch_network(ptr0, len0);
414
+ }
415
+
416
+ function handleError(f, args) {
417
+ try {
418
+ return f.apply(this, args);
419
+ } catch (e) {
420
+ wasm.__wbindgen_exn_store(addHeapObject(e));
421
+ }
422
+ }
423
+
424
+ function getArrayU8FromWasm0(ptr, len) {
425
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
426
+ }
427
+
428
+ let cachegetUint32Memory0 = null;
429
+ function getUint32Memory0() {
430
+ if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) {
431
+ cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer);
432
+ }
433
+ return cachegetUint32Memory0;
434
+ }
435
+
436
+ function getArrayJsValueFromWasm0(ptr, len) {
437
+ const mem = getUint32Memory0();
438
+ const slice = mem.subarray(ptr / 4, ptr / 4 + len);
439
+ const result = [];
440
+ for (let i = 0; i < slice.length; i++) {
441
+ result.push(takeObject(slice[i]));
442
+ }
443
+ return result;
444
+ }
445
+ function __wbg_adapter_144(arg0, arg1, arg2, arg3) {
446
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__hd8d8cef78709b705(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
447
+ }
448
+
449
+ export function __wbindgen_object_drop_ref(arg0) {
450
+ takeObject(arg0);
451
+ };
452
+
453
+ export function __wbindgen_string_new(arg0, arg1) {
454
+ const ret = getStringFromWasm0(arg0, arg1);
455
+ return addHeapObject(ret);
456
+ };
457
+
458
+ export function __wbindgen_json_serialize(arg0, arg1) {
459
+ const obj = getObject(arg1);
460
+ const ret = JSON.stringify(obj === undefined ? null : obj);
461
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len0 = WASM_VECTOR_LEN;
463
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
464
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
465
+ };
466
+
467
+ export function __wbindgen_cb_drop(arg0) {
468
+ const obj = takeObject(arg0).original;
469
+ if (obj.cnt-- == 1) {
470
+ obj.a = 0;
471
+ return true;
472
+ }
473
+ const ret = false;
474
+ return ret;
475
+ };
476
+
477
+ export function __wbindgen_string_get(arg0, arg1) {
478
+ const obj = getObject(arg1);
479
+ const ret = typeof(obj) === 'string' ? obj : undefined;
480
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
481
+ var len0 = WASM_VECTOR_LEN;
482
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
483
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
484
+ };
485
+
486
+ export function __wbindgen_is_string(arg0) {
487
+ const ret = typeof(getObject(arg0)) === 'string';
488
+ return ret;
489
+ };
490
+
491
+ export function __wbindgen_object_clone_ref(arg0) {
492
+ const ret = getObject(arg0);
493
+ return addHeapObject(ret);
494
+ };
495
+
496
+ export function __wbg_randomFillSync_654a7797990fb8db() { return handleError(function (arg0, arg1, arg2) {
497
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
498
+ }, arguments) };
499
+
500
+ export function __wbg_getRandomValues_fb6b088efb6bead2() { return handleError(function (arg0, arg1) {
501
+ getObject(arg0).getRandomValues(getObject(arg1));
502
+ }, arguments) };
503
+
504
+ export function __wbg_process_70251ed1291754d5(arg0) {
505
+ const ret = getObject(arg0).process;
506
+ return addHeapObject(ret);
507
+ };
508
+
509
+ export function __wbindgen_is_object(arg0) {
510
+ const val = getObject(arg0);
511
+ const ret = typeof(val) === 'object' && val !== null;
512
+ return ret;
513
+ };
514
+
515
+ export function __wbg_versions_b23f2588cdb2ddbb(arg0) {
516
+ const ret = getObject(arg0).versions;
517
+ return addHeapObject(ret);
518
+ };
519
+
520
+ export function __wbg_node_61b8c9a82499895d(arg0) {
521
+ const ret = getObject(arg0).node;
522
+ return addHeapObject(ret);
523
+ };
524
+
525
+ export function __wbg_static_accessor_NODE_MODULE_33b45247c55045b0() {
526
+ const ret = module;
527
+ return addHeapObject(ret);
528
+ };
529
+
530
+ export function __wbg_require_2a93bc09fee45aca() { return handleError(function (arg0, arg1, arg2) {
531
+ const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
532
+ return addHeapObject(ret);
533
+ }, arguments) };
534
+
535
+ export function __wbg_crypto_2f56257a38275dbd(arg0) {
536
+ const ret = getObject(arg0).crypto;
537
+ return addHeapObject(ret);
538
+ };
539
+
540
+ export function __wbg_msCrypto_d07655bf62361f21(arg0) {
541
+ const ret = getObject(arg0).msCrypto;
542
+ return addHeapObject(ret);
543
+ };
544
+
545
+ export function __wbg_log_06b7ffc63a0f8bee(arg0, arg1) {
546
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
547
+ wasm.__wbindgen_free(arg0, arg1 * 4);
548
+ console.log(...v0);
549
+ };
550
+
551
+ export function __wbg_fetch_811d43d6bdcad5b1(arg0) {
552
+ const ret = fetch(getObject(arg0));
553
+ return addHeapObject(ret);
554
+ };
555
+
556
+ export function __wbg_instanceof_Window_0e6c0f1096d66c3c(arg0) {
557
+ const ret = getObject(arg0) instanceof Window;
558
+ return ret;
559
+ };
560
+
561
+ export function __wbg_fetch_ef7a6623d1fcd3b8(arg0, arg1) {
562
+ const ret = getObject(arg0).fetch(getObject(arg1));
563
+ return addHeapObject(ret);
564
+ };
565
+
566
+ export function __wbg_fetch_bf56e2a9f0644e3f(arg0, arg1) {
567
+ const ret = getObject(arg0).fetch(getObject(arg1));
568
+ return addHeapObject(ret);
569
+ };
570
+
571
+ export function __wbg_new_89d7f088c1c45353() { return handleError(function () {
572
+ const ret = new Headers();
573
+ return addHeapObject(ret);
574
+ }, arguments) };
575
+
576
+ export function __wbg_append_f4f93bc73c45ee3e() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
577
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
578
+ }, arguments) };
579
+
580
+ export function __wbg_set_6884dcc6cdd65022() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
581
+ getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
582
+ }, arguments) };
583
+
584
+ export function __wbg_instanceof_Response_ccfeb62399355bcd(arg0) {
585
+ const ret = getObject(arg0) instanceof Response;
586
+ return ret;
587
+ };
588
+
589
+ export function __wbg_url_06c0f822d68d195c(arg0, arg1) {
590
+ const ret = getObject(arg1).url;
591
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
592
+ const len0 = WASM_VECTOR_LEN;
593
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
594
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
595
+ };
596
+
597
+ export function __wbg_redirected_17a06c497781a0f9(arg0) {
598
+ const ret = getObject(arg0).redirected;
599
+ return ret;
600
+ };
601
+
602
+ export function __wbg_status_600fd8b881393898(arg0) {
603
+ const ret = getObject(arg0).status;
604
+ return ret;
605
+ };
606
+
607
+ export function __wbg_headers_9e7f2c05a9b962ea(arg0) {
608
+ const ret = getObject(arg0).headers;
609
+ return addHeapObject(ret);
610
+ };
611
+
612
+ export function __wbg_bodyUsed_a4ed3e07be0adcaa(arg0) {
613
+ const ret = getObject(arg0).bodyUsed;
614
+ return ret;
615
+ };
616
+
617
+ export function __wbg_arrayBuffer_5a99283a3954c850() { return handleError(function (arg0) {
618
+ const ret = getObject(arg0).arrayBuffer();
619
+ return addHeapObject(ret);
620
+ }, arguments) };
621
+
622
+ export function __wbg_json_df9259ba758ea2fe() { return handleError(function (arg0) {
623
+ const ret = getObject(arg0).json();
624
+ return addHeapObject(ret);
625
+ }, arguments) };
626
+
627
+ export function __wbg_text_2612fbe0b9d32220() { return handleError(function (arg0) {
628
+ const ret = getObject(arg0).text();
629
+ return addHeapObject(ret);
630
+ }, arguments) };
631
+
632
+ export function __wbg_newwithstrandinit_fd99688f189f053e() { return handleError(function (arg0, arg1, arg2) {
633
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
634
+ return addHeapObject(ret);
635
+ }, arguments) };
636
+
637
+ export function __wbg_randomFillSync_d2ba53160aec6aba(arg0, arg1, arg2) {
638
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
639
+ };
640
+
641
+ export function __wbg_getRandomValues_e57c9b75ddead065(arg0, arg1) {
642
+ getObject(arg0).getRandomValues(getObject(arg1));
643
+ };
644
+
645
+ export function __wbg_self_86b4b13392c7af56() { return handleError(function () {
646
+ const ret = self.self;
647
+ return addHeapObject(ret);
648
+ }, arguments) };
649
+
650
+ export function __wbg_crypto_b8c92eaac23d0d80(arg0) {
651
+ const ret = getObject(arg0).crypto;
652
+ return addHeapObject(ret);
653
+ };
654
+
655
+ export function __wbg_msCrypto_9ad6677321a08dd8(arg0) {
656
+ const ret = getObject(arg0).msCrypto;
657
+ return addHeapObject(ret);
658
+ };
659
+
660
+ export function __wbindgen_is_undefined(arg0) {
661
+ const ret = getObject(arg0) === undefined;
662
+ return ret;
663
+ };
664
+
665
+ export function __wbg_static_accessor_MODULE_452b4680e8614c81() {
666
+ const ret = module;
667
+ return addHeapObject(ret);
668
+ };
669
+
670
+ export function __wbg_require_f5521a5b85ad2542(arg0, arg1, arg2) {
671
+ const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
672
+ return addHeapObject(ret);
673
+ };
674
+
675
+ export function __wbg_getRandomValues_dd27e6b0652b3236(arg0) {
676
+ const ret = getObject(arg0).getRandomValues;
677
+ return addHeapObject(ret);
678
+ };
679
+
680
+ export function __wbg_get_590a2cd912f2ae46(arg0, arg1) {
681
+ const ret = getObject(arg0)[arg1 >>> 0];
682
+ return addHeapObject(ret);
683
+ };
684
+
685
+ export function __wbindgen_is_function(arg0) {
686
+ const ret = typeof(getObject(arg0)) === 'function';
687
+ return ret;
688
+ };
689
+
690
+ export function __wbg_newnoargs_e23b458e372830de(arg0, arg1) {
691
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
692
+ return addHeapObject(ret);
693
+ };
694
+
695
+ export function __wbg_next_cabb70b365520721(arg0) {
696
+ const ret = getObject(arg0).next;
697
+ return addHeapObject(ret);
698
+ };
699
+
700
+ export function __wbg_next_bf3d83fc18df496e() { return handleError(function (arg0) {
701
+ const ret = getObject(arg0).next();
702
+ return addHeapObject(ret);
703
+ }, arguments) };
704
+
705
+ export function __wbg_done_040f966faa9a72b3(arg0) {
706
+ const ret = getObject(arg0).done;
707
+ return ret;
708
+ };
709
+
710
+ export function __wbg_value_419afbd9b9574c4c(arg0) {
711
+ const ret = getObject(arg0).value;
712
+ return addHeapObject(ret);
713
+ };
714
+
715
+ export function __wbg_iterator_4832ef1f15b0382b() {
716
+ const ret = Symbol.iterator;
717
+ return addHeapObject(ret);
718
+ };
719
+
720
+ export function __wbg_get_a9cab131e3152c49() { return handleError(function (arg0, arg1) {
721
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
722
+ return addHeapObject(ret);
723
+ }, arguments) };
724
+
725
+ export function __wbg_call_ae78342adc33730a() { return handleError(function (arg0, arg1) {
726
+ const ret = getObject(arg0).call(getObject(arg1));
727
+ return addHeapObject(ret);
728
+ }, arguments) };
729
+
730
+ export function __wbg_new_36359baae5a47e27() {
731
+ const ret = new Object();
732
+ return addHeapObject(ret);
733
+ };
734
+
735
+ export function __wbg_self_99737b4dcdf6f0d8() { return handleError(function () {
736
+ const ret = self.self;
737
+ return addHeapObject(ret);
738
+ }, arguments) };
739
+
740
+ export function __wbg_window_9b61fbbf3564c4fb() { return handleError(function () {
741
+ const ret = window.window;
742
+ return addHeapObject(ret);
743
+ }, arguments) };
744
+
745
+ export function __wbg_globalThis_8e275ef40caea3a3() { return handleError(function () {
746
+ const ret = globalThis.globalThis;
747
+ return addHeapObject(ret);
748
+ }, arguments) };
749
+
750
+ export function __wbg_global_5de1e0f82bddcd27() { return handleError(function () {
751
+ const ret = global.global;
752
+ return addHeapObject(ret);
753
+ }, arguments) };
754
+
755
+ export function __wbg_instanceof_Error_b074c76f6096db9b(arg0) {
756
+ const ret = getObject(arg0) instanceof Error;
757
+ return ret;
758
+ };
759
+
760
+ export function __wbg_message_dcca38fbff239fbf(arg0) {
761
+ const ret = getObject(arg0).message;
762
+ return addHeapObject(ret);
763
+ };
764
+
765
+ export function __wbg_name_642dd84602f48d65(arg0) {
766
+ const ret = getObject(arg0).name;
767
+ return addHeapObject(ret);
768
+ };
769
+
770
+ export function __wbg_toString_eec28c54c24b830b(arg0) {
771
+ const ret = getObject(arg0).toString();
772
+ return addHeapObject(ret);
773
+ };
774
+
775
+ export function __wbg_call_3ed288a247f13ea5() { return handleError(function (arg0, arg1, arg2) {
776
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
777
+ return addHeapObject(ret);
778
+ }, arguments) };
779
+
780
+ export function __wbg_entries_b76c49f92ac283c4(arg0) {
781
+ const ret = getObject(arg0).entries();
782
+ return addHeapObject(ret);
783
+ };
784
+
785
+ export function __wbg_now_04bcd3bf9fb6165e() {
786
+ const ret = Date.now();
787
+ return ret;
788
+ };
789
+
790
+ export function __wbg_new_37705eed627d5ed9(arg0, arg1) {
791
+ try {
792
+ var state0 = {a: arg0, b: arg1};
793
+ var cb0 = (arg0, arg1) => {
794
+ const a = state0.a;
795
+ state0.a = 0;
796
+ try {
797
+ return __wbg_adapter_144(a, state0.b, arg0, arg1);
798
+ } finally {
799
+ state0.a = a;
800
+ }
801
+ };
802
+ const ret = new Promise(cb0);
803
+ return addHeapObject(ret);
804
+ } finally {
805
+ state0.a = state0.b = 0;
806
+ }
807
+ };
808
+
809
+ export function __wbg_resolve_a9a87bdd64e9e62c(arg0) {
810
+ const ret = Promise.resolve(getObject(arg0));
811
+ return addHeapObject(ret);
812
+ };
813
+
814
+ export function __wbg_then_ce526c837d07b68f(arg0, arg1) {
815
+ const ret = getObject(arg0).then(getObject(arg1));
816
+ return addHeapObject(ret);
817
+ };
818
+
819
+ export function __wbg_then_842e65b843962f56(arg0, arg1, arg2) {
820
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
821
+ return addHeapObject(ret);
822
+ };
823
+
824
+ export function __wbg_buffer_7af23f65f6c64548(arg0) {
825
+ const ret = getObject(arg0).buffer;
826
+ return addHeapObject(ret);
827
+ };
828
+
829
+ export function __wbg_newwithbyteoffsetandlength_ce1e75f0ce5f7974(arg0, arg1, arg2) {
830
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
831
+ return addHeapObject(ret);
832
+ };
833
+
834
+ export function __wbg_new_cc9018bd6f283b6f(arg0) {
835
+ const ret = new Uint8Array(getObject(arg0));
836
+ return addHeapObject(ret);
837
+ };
838
+
839
+ export function __wbg_set_f25e869e4565d2a2(arg0, arg1, arg2) {
840
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
841
+ };
842
+
843
+ export function __wbg_length_0acb1cf9bbaf8519(arg0) {
844
+ const ret = getObject(arg0).length;
845
+ return ret;
846
+ };
847
+
848
+ export function __wbg_newwithlength_8f0657faca9f1422(arg0) {
849
+ const ret = new Uint8Array(arg0 >>> 0);
850
+ return addHeapObject(ret);
851
+ };
852
+
853
+ export function __wbg_subarray_da527dbd24eafb6b(arg0, arg1, arg2) {
854
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
855
+ return addHeapObject(ret);
856
+ };
857
+
858
+ export function __wbg_has_ce995ec88636803d() { return handleError(function (arg0, arg1) {
859
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
860
+ return ret;
861
+ }, arguments) };
862
+
863
+ export function __wbg_set_93b1c87ee2af852e() { return handleError(function (arg0, arg1, arg2) {
864
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
865
+ return ret;
866
+ }, arguments) };
867
+
868
+ export function __wbg_stringify_c760003feffcc1f2() { return handleError(function (arg0) {
869
+ const ret = JSON.stringify(getObject(arg0));
870
+ return addHeapObject(ret);
871
+ }, arguments) };
872
+
873
+ export function __wbindgen_debug_string(arg0, arg1) {
874
+ const ret = debugString(getObject(arg1));
875
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
876
+ const len0 = WASM_VECTOR_LEN;
877
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
878
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
879
+ };
880
+
881
+ export function __wbindgen_throw(arg0, arg1) {
882
+ throw new Error(getStringFromWasm0(arg0, arg1));
883
+ };
884
+
885
+ export function __wbindgen_memory() {
886
+ const ret = wasm.memory;
887
+ return addHeapObject(ret);
888
+ };
889
+
890
+ export function __wbindgen_closure_wrapper2518(arg0, arg1, arg2) {
891
+ const ret = makeMutClosure(arg0, arg1, 788, __wbg_adapter_28);
892
+ return addHeapObject(ret);
893
+ };
894
+