@synonymdev/pubky 0.4.0 → 0.4.2-rc2

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/index.cjs CHANGED
@@ -9,12 +9,6 @@ imports['__wbindgen_placeholder__'] = module.exports;
9
9
  let wasm;
10
10
  const { TextDecoder, TextEncoder } = require(`util`);
11
11
 
12
- const heap = new Array(128).fill(undefined);
13
-
14
- heap.push(undefined, null, true, false);
15
-
16
- function getObject(idx) { return heap[idx]; }
17
-
18
12
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
19
13
 
20
14
  cachedTextDecoder.decode();
@@ -33,14 +27,9 @@ function getStringFromWasm0(ptr, len) {
33
27
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
34
28
  }
35
29
 
36
- let heap_next = heap.length;
37
-
38
- function addHeapObject(obj) {
39
- if (heap_next === heap.length) heap.push(heap.length + 1);
40
- const idx = heap_next;
41
- heap_next = heap[idx];
42
-
43
- heap[idx] = obj;
30
+ function addToExternrefTable0(obj) {
31
+ const idx = wasm.__externref_table_alloc();
32
+ wasm.__wbindgen_export_2.set(idx, obj);
44
33
  return idx;
45
34
  }
46
35
 
@@ -48,7 +37,8 @@ function handleError(f, args) {
48
37
  try {
49
38
  return f.apply(this, args);
50
39
  } catch (e) {
51
- wasm.__wbindgen_exn_store(addHeapObject(e));
40
+ const idx = addToExternrefTable0(e);
41
+ wasm.__wbindgen_exn_store(idx);
52
42
  }
53
43
  }
54
44
 
@@ -57,18 +47,6 @@ function getArrayU8FromWasm0(ptr, len) {
57
47
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
58
48
  }
59
49
 
60
- function dropObject(idx) {
61
- if (idx < 132) return;
62
- heap[idx] = heap_next;
63
- heap_next = idx;
64
- }
65
-
66
- function takeObject(idx) {
67
- const ret = getObject(idx);
68
- dropObject(idx);
69
- return ret;
70
- }
71
-
72
50
  function isLikeNone(x) {
73
51
  return x === undefined || x === null;
74
52
  }
@@ -141,7 +119,7 @@ function getDataViewMemory0() {
141
119
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
142
120
  ? { register: () => {}, unregister: () => {} }
143
121
  : new FinalizationRegistry(state => {
144
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
122
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
145
123
  });
146
124
 
147
125
  function makeMutClosure(arg0, arg1, dtor, f) {
@@ -157,7 +135,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
157
135
  return f(a, state.b, ...args);
158
136
  } finally {
159
137
  if (--state.cnt === 0) {
160
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
138
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
161
139
  CLOSURE_DTORS.unregister(state);
162
140
  } else {
163
141
  state.a = a;
@@ -234,38 +212,38 @@ function debugString(val) {
234
212
  return className;
235
213
  }
236
214
 
237
- function getArrayJsValueFromWasm0(ptr, len) {
238
- ptr = ptr >>> 0;
239
- const mem = getDataViewMemory0();
240
- const result = [];
241
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
242
- result.push(takeObject(mem.getUint32(i, true)));
215
+ function _assertClass(instance, klass) {
216
+ if (!(instance instanceof klass)) {
217
+ throw new Error(`expected instance of ${klass.name}`);
243
218
  }
244
- return result;
219
+ }
220
+
221
+ function takeFromExternrefTable0(idx) {
222
+ const value = wasm.__wbindgen_export_2.get(idx);
223
+ wasm.__externref_table_dealloc(idx);
224
+ return value;
245
225
  }
246
226
  /**
247
227
  * @param {string} level
248
228
  */
249
229
  module.exports.setLogLevel = function(level) {
250
- try {
251
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
- const len0 = WASM_VECTOR_LEN;
254
- wasm.setLogLevel(retptr, ptr0, len0);
255
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
256
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
257
- if (r1) {
258
- throw takeObject(r0);
259
- }
260
- } finally {
261
- wasm.__wbindgen_add_to_stack_pointer(16);
230
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
+ const len0 = WASM_VECTOR_LEN;
232
+ const ret = wasm.setLogLevel(ptr0, len0);
233
+ if (ret[1]) {
234
+ throw takeFromExternrefTable0(ret[0]);
262
235
  }
263
236
  };
264
237
 
265
- function _assertClass(instance, klass) {
266
- if (!(instance instanceof klass)) {
267
- throw new Error(`expected instance of ${klass.name}`);
238
+ function getArrayJsValueFromWasm0(ptr, len) {
239
+ ptr = ptr >>> 0;
240
+ const mem = getDataViewMemory0();
241
+ const result = [];
242
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
243
+ result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
268
244
  }
245
+ wasm.__externref_drop_slice(ptr, len);
246
+ return result;
269
247
  }
270
248
  /**
271
249
  * Create a recovery file of the `keypair`, containing the secret key encrypted
@@ -279,7 +257,7 @@ module.exports.createRecoveryFile = function(keypair, passphrase) {
279
257
  const ptr0 = passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
258
  const len0 = WASM_VECTOR_LEN;
281
259
  const ret = wasm.createRecoveryFile(keypair.__wbg_ptr, ptr0, len0);
282
- return takeObject(ret);
260
+ return ret;
283
261
  };
284
262
 
285
263
  function passArray8ToWasm0(arg, malloc) {
@@ -296,31 +274,23 @@ function passArray8ToWasm0(arg, malloc) {
296
274
  * @returns {Keypair}
297
275
  */
298
276
  module.exports.decryptRecoveryFile = function(recovery_file, passphrase) {
299
- try {
300
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
301
- const ptr0 = passArray8ToWasm0(recovery_file, wasm.__wbindgen_malloc);
302
- const len0 = WASM_VECTOR_LEN;
303
- const ptr1 = passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
- const len1 = WASM_VECTOR_LEN;
305
- wasm.decryptRecoveryFile(retptr, ptr0, len0, ptr1, len1);
306
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
307
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
308
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
309
- if (r2) {
310
- throw takeObject(r1);
311
- }
312
- return Keypair.__wrap(r0);
313
- } finally {
314
- wasm.__wbindgen_add_to_stack_pointer(16);
277
+ const ptr0 = passArray8ToWasm0(recovery_file, wasm.__wbindgen_malloc);
278
+ const len0 = WASM_VECTOR_LEN;
279
+ const ptr1 = passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
+ const len1 = WASM_VECTOR_LEN;
281
+ const ret = wasm.decryptRecoveryFile(ptr0, len0, ptr1, len1);
282
+ if (ret[2]) {
283
+ throw takeFromExternrefTable0(ret[1]);
315
284
  }
285
+ return Keypair.__wrap(ret[0]);
316
286
  };
317
287
 
318
- function __wbg_adapter_28(arg0, arg1, arg2) {
319
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39e5fd1911bc8420(arg0, arg1, addHeapObject(arg2));
288
+ function __wbg_adapter_30(arg0, arg1, arg2) {
289
+ wasm.closure486_externref_shim(arg0, arg1, arg2);
320
290
  }
321
291
 
322
- function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
323
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h93832735ab1a1a6b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
292
+ function __wbg_adapter_160(arg0, arg1, arg2, arg3) {
293
+ wasm.closure555_externref_shim(arg0, arg1, arg2, arg3);
324
294
  }
325
295
 
326
296
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -363,15 +333,11 @@ class AuthRequest {
363
333
  let deferred1_0;
364
334
  let deferred1_1;
365
335
  try {
366
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
367
- wasm.authrequest_url(retptr, this.__wbg_ptr);
368
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
369
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
370
- deferred1_0 = r0;
371
- deferred1_1 = r1;
372
- return getStringFromWasm0(r0, r1);
336
+ const ret = wasm.authrequest_url(this.__wbg_ptr);
337
+ deferred1_0 = ret[0];
338
+ deferred1_1 = ret[1];
339
+ return getStringFromWasm0(ret[0], ret[1]);
373
340
  } finally {
374
- wasm.__wbindgen_add_to_stack_pointer(16);
375
341
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
376
342
  }
377
343
  }
@@ -385,7 +351,7 @@ class AuthRequest {
385
351
  */
386
352
  response() {
387
353
  const ret = wasm.authrequest_response(this.__wbg_ptr);
388
- return takeObject(ret);
354
+ return ret;
389
355
  }
390
356
  }
391
357
  module.exports.AuthRequest = AuthRequest;
@@ -415,61 +381,6 @@ class Client {
415
381
  const ptr = this.__destroy_into_raw();
416
382
  wasm.__wbg_client_free(ptr, 0);
417
383
  }
418
- /**
419
- * Create Client with default Settings including default relays
420
- */
421
- constructor() {
422
- const ret = wasm.client_new();
423
- this.__wbg_ptr = ret >>> 0;
424
- ClientFinalization.register(this, this.__wbg_ptr, this);
425
- return this;
426
- }
427
- /**
428
- * Create a client with with configurations appropriate for local testing:
429
- * - set Pkarr relays to `["http://localhost:15411"]` instead of default relay.
430
- * - transform `pubky://<pkarr public key>` to `http://<pkarr public key` instead of `https:`
431
- * and read the homeserver HTTP port from the [reserved service parameter key](pubky_common::constants::reserved_param_keys::HTTP_PORT)
432
- * @returns {Client}
433
- */
434
- static testnet() {
435
- const ret = wasm.client_testnet();
436
- return Client.__wrap(ret);
437
- }
438
- /**
439
- * @param {string} url
440
- * @param {any | null} [request_init]
441
- * @returns {Promise<Promise<any>>}
442
- */
443
- fetch(url, request_init) {
444
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
- const len0 = WASM_VECTOR_LEN;
446
- const ret = wasm.client_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(request_init) ? 0 : addHeapObject(request_init));
447
- return takeObject(ret);
448
- }
449
- /**
450
- * Returns a list of Pubky urls (as strings).
451
- *
452
- * - `url`: The Pubky url (string) to the directory you want to list its content.
453
- * - `cursor`: Either a full `pubky://` Url (from previous list response),
454
- * or a path (to a file or directory) relative to the `url`
455
- * - `reverse`: List in reverse order
456
- * - `limit` Limit the number of urls in the response
457
- * - `shallow`: List directories and files, instead of flat list of files.
458
- * @param {string} url
459
- * @param {string | null} [cursor]
460
- * @param {boolean | null} [reverse]
461
- * @param {number | null} [limit]
462
- * @param {boolean | null} [shallow]
463
- * @returns {Promise<Array<any>>}
464
- */
465
- list(url, cursor, reverse, limit, shallow) {
466
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
467
- const len0 = WASM_VECTOR_LEN;
468
- var ptr1 = isLikeNone(cursor) ? 0 : passStringToWasm0(cursor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
469
- var len1 = WASM_VECTOR_LEN;
470
- const ret = wasm.client_list(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(reverse) ? 0xFFFFFF : reverse ? 1 : 0, isLikeNone(limit) ? 0xFFFFFF : limit, isLikeNone(shallow) ? 0xFFFFFF : shallow ? 1 : 0);
471
- return takeObject(ret);
472
- }
473
384
  /**
474
385
  * Signup to a homeserver and update Pkarr accordingly.
475
386
  *
@@ -477,13 +388,16 @@ class Client {
477
388
  * for example "pubky.o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy"
478
389
  * @param {Keypair} keypair
479
390
  * @param {PublicKey} homeserver
391
+ * @param {string | null} [signup_token]
480
392
  * @returns {Promise<Session>}
481
393
  */
482
- signup(keypair, homeserver) {
394
+ signup(keypair, homeserver, signup_token) {
483
395
  _assertClass(keypair, Keypair);
484
396
  _assertClass(homeserver, PublicKey);
485
- const ret = wasm.client_signup(this.__wbg_ptr, keypair.__wbg_ptr, homeserver.__wbg_ptr);
486
- return takeObject(ret);
397
+ var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
398
+ var len0 = WASM_VECTOR_LEN;
399
+ const ret = wasm.client_signup(this.__wbg_ptr, keypair.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
400
+ return ret;
487
401
  }
488
402
  /**
489
403
  * Check the current session for a given Pubky in its homeserver.
@@ -496,7 +410,7 @@ class Client {
496
410
  session(pubky) {
497
411
  _assertClass(pubky, PublicKey);
498
412
  const ret = wasm.client_session(this.__wbg_ptr, pubky.__wbg_ptr);
499
- return takeObject(ret);
413
+ return ret;
500
414
  }
501
415
  /**
502
416
  * Signout from a homeserver.
@@ -506,7 +420,7 @@ class Client {
506
420
  signout(pubky) {
507
421
  _assertClass(pubky, PublicKey);
508
422
  const ret = wasm.client_signout(this.__wbg_ptr, pubky.__wbg_ptr);
509
- return takeObject(ret);
423
+ return ret;
510
424
  }
511
425
  /**
512
426
  * Signin to a homeserver using the root Keypair.
@@ -516,7 +430,7 @@ class Client {
516
430
  signin(keypair) {
517
431
  _assertClass(keypair, Keypair);
518
432
  const ret = wasm.client_signin(this.__wbg_ptr, keypair.__wbg_ptr);
519
- return takeObject(ret);
433
+ return ret;
520
434
  }
521
435
  /**
522
436
  * Return `pubkyauth://` url and wait for the incoming [AuthToken]
@@ -529,23 +443,15 @@ class Client {
529
443
  * @returns {AuthRequest}
530
444
  */
531
445
  authRequest(relay, capabilities) {
532
- try {
533
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
534
- const ptr0 = passStringToWasm0(relay, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
535
- const len0 = WASM_VECTOR_LEN;
536
- const ptr1 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
537
- const len1 = WASM_VECTOR_LEN;
538
- wasm.client_authRequest(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
539
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
540
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
541
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
542
- if (r2) {
543
- throw takeObject(r1);
544
- }
545
- return AuthRequest.__wrap(r0);
546
- } finally {
547
- wasm.__wbindgen_add_to_stack_pointer(16);
446
+ const ptr0 = passStringToWasm0(relay, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const len0 = WASM_VECTOR_LEN;
448
+ const ptr1 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
+ const len1 = WASM_VECTOR_LEN;
450
+ const ret = wasm.client_authRequest(this.__wbg_ptr, ptr0, len0, ptr1, len1);
451
+ if (ret[2]) {
452
+ throw takeFromExternrefTable0(ret[1]);
548
453
  }
454
+ return AuthRequest.__wrap(ret[0]);
549
455
  }
550
456
  /**
551
457
  * Sign an [pubky_common::auth::AuthToken], encrypt it and send it to the
@@ -559,7 +465,85 @@ class Client {
559
465
  const ptr0 = passStringToWasm0(pubkyauth_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
560
466
  const len0 = WASM_VECTOR_LEN;
561
467
  const ret = wasm.client_sendAuthToken(this.__wbg_ptr, keypair.__wbg_ptr, ptr0, len0);
562
- return takeObject(ret);
468
+ return ret;
469
+ }
470
+ /**
471
+ * Republish the user's PKarr record pointing to their homeserver.
472
+ *
473
+ * This method will republish the record if no record exists or if the existing record
474
+ * is older than 6 hours.
475
+ *
476
+ * The method is intended for clients and key managers (e.g., pubky-ring) to
477
+ * keep the records of active users fresh and available in the DHT and relays.
478
+ * It is intended to be used only after failed signin due to homeserver resolution
479
+ * failure. This method is lighter than performing a re-signup into the last known
480
+ * homeserver, but does not return a session token, so a signin must be done after
481
+ * republishing. On a failed signin due to homeserver resolution failure, a key
482
+ * manager should always attempt to republish the last known homeserver.
483
+ * @param {Keypair} keypair
484
+ * @param {PublicKey} host
485
+ * @returns {Promise<void>}
486
+ */
487
+ republishHomeserver(keypair, host) {
488
+ _assertClass(keypair, Keypair);
489
+ _assertClass(host, PublicKey);
490
+ const ret = wasm.client_republishHomeserver(this.__wbg_ptr, keypair.__wbg_ptr, host.__wbg_ptr);
491
+ return ret;
492
+ }
493
+ /**
494
+ * Create Client with default Settings including default relays
495
+ */
496
+ constructor() {
497
+ const ret = wasm.client_new();
498
+ this.__wbg_ptr = ret >>> 0;
499
+ ClientFinalization.register(this, this.__wbg_ptr, this);
500
+ return this;
501
+ }
502
+ /**
503
+ * Create a client with with configurations appropriate for local testing:
504
+ * - set Pkarr relays to `["http://localhost:15411"]` instead of default relay.
505
+ * - transform `pubky://<pkarr public key>` to `http://<pkarr public key` instead of `https:`
506
+ * and read the homeserver HTTP port from the [reserved service parameter key](pubky_common::constants::reserved_param_keys::HTTP_PORT)
507
+ * @returns {Client}
508
+ */
509
+ static testnet() {
510
+ const ret = wasm.client_testnet();
511
+ return Client.__wrap(ret);
512
+ }
513
+ /**
514
+ * @param {string} url
515
+ * @param {any | null} [request_init]
516
+ * @returns {Promise<Promise<any>>}
517
+ */
518
+ fetch(url, request_init) {
519
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
520
+ const len0 = WASM_VECTOR_LEN;
521
+ const ret = wasm.client_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(request_init) ? 0 : addToExternrefTable0(request_init));
522
+ return ret;
523
+ }
524
+ /**
525
+ * Returns a list of Pubky urls (as strings).
526
+ *
527
+ * - `url`: The Pubky url (string) to the directory you want to list its content.
528
+ * - `cursor`: Either a full `pubky://` Url (from previous list response),
529
+ * or a path (to a file or directory) relative to the `url`
530
+ * - `reverse`: List in reverse order
531
+ * - `limit` Limit the number of urls in the response
532
+ * - `shallow`: List directories and files, instead of flat list of files.
533
+ * @param {string} url
534
+ * @param {string | null} [cursor]
535
+ * @param {boolean | null} [reverse]
536
+ * @param {number | null} [limit]
537
+ * @param {boolean | null} [shallow]
538
+ * @returns {Promise<Array<any>>}
539
+ */
540
+ list(url, cursor, reverse, limit, shallow) {
541
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
542
+ const len0 = WASM_VECTOR_LEN;
543
+ var ptr1 = isLikeNone(cursor) ? 0 : passStringToWasm0(cursor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
544
+ var len1 = WASM_VECTOR_LEN;
545
+ const ret = wasm.client_list(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(reverse) ? 0xFFFFFF : reverse ? 1 : 0, isLikeNone(limit) ? 0xFFFFFF : limit, isLikeNone(shallow) ? 0xFFFFFF : shallow ? 1 : 0);
546
+ return ret;
563
547
  }
564
548
  }
565
549
  module.exports.Client = Client;
@@ -603,19 +587,11 @@ class Keypair {
603
587
  * @returns {Keypair}
604
588
  */
605
589
  static fromSecretKey(secret_key) {
606
- try {
607
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
608
- wasm.keypair_fromSecretKey(retptr, addHeapObject(secret_key));
609
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
610
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
611
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
612
- if (r2) {
613
- throw takeObject(r1);
614
- }
615
- return Keypair.__wrap(r0);
616
- } finally {
617
- wasm.__wbindgen_add_to_stack_pointer(16);
590
+ const ret = wasm.keypair_fromSecretKey(secret_key);
591
+ if (ret[2]) {
592
+ throw takeFromExternrefTable0(ret[1]);
618
593
  }
594
+ return Keypair.__wrap(ret[0]);
619
595
  }
620
596
  /**
621
597
  * Returns the secret key of this keypair.
@@ -623,7 +599,7 @@ class Keypair {
623
599
  */
624
600
  secretKey() {
625
601
  const ret = wasm.keypair_secretKey(this.__wbg_ptr);
626
- return takeObject(ret);
602
+ return ret;
627
603
  }
628
604
  /**
629
605
  * Returns the [PublicKey] of this keypair.
@@ -667,7 +643,7 @@ class PublicKey {
667
643
  */
668
644
  to_uint8array() {
669
645
  const ret = wasm.publickey_to_uint8array(this.__wbg_ptr);
670
- return takeObject(ret);
646
+ return ret;
671
647
  }
672
648
  /**
673
649
  * Returns the z-base32 encoding of this public key
@@ -677,15 +653,11 @@ class PublicKey {
677
653
  let deferred1_0;
678
654
  let deferred1_1;
679
655
  try {
680
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
681
- wasm.publickey_z32(retptr, this.__wbg_ptr);
682
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
683
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
684
- deferred1_0 = r0;
685
- deferred1_1 = r1;
686
- return getStringFromWasm0(r0, r1);
656
+ const ret = wasm.publickey_z32(this.__wbg_ptr);
657
+ deferred1_0 = ret[0];
658
+ deferred1_1 = ret[1];
659
+ return getStringFromWasm0(ret[0], ret[1]);
687
660
  } finally {
688
- wasm.__wbindgen_add_to_stack_pointer(16);
689
661
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
690
662
  }
691
663
  }
@@ -695,19 +667,11 @@ class PublicKey {
695
667
  * @returns {PublicKey}
696
668
  */
697
669
  static from(value) {
698
- try {
699
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
700
- wasm.publickey_from(retptr, addHeapObject(value));
701
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
702
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
703
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
704
- if (r2) {
705
- throw takeObject(r1);
706
- }
707
- return PublicKey.__wrap(r0);
708
- } finally {
709
- wasm.__wbindgen_add_to_stack_pointer(16);
670
+ const ret = wasm.publickey_from(value);
671
+ if (ret[2]) {
672
+ throw takeFromExternrefTable0(ret[1]);
710
673
  }
674
+ return PublicKey.__wrap(ret[0]);
711
675
  }
712
676
  }
713
677
  module.exports.PublicKey = PublicKey;
@@ -750,85 +714,78 @@ class Session {
750
714
  * @returns {string[]}
751
715
  */
752
716
  capabilities() {
753
- try {
754
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
755
- wasm.session_capabilities(retptr, this.__wbg_ptr);
756
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
757
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
758
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
759
- wasm.__wbindgen_free(r0, r1 * 4, 4);
760
- return v1;
761
- } finally {
762
- wasm.__wbindgen_add_to_stack_pointer(16);
763
- }
717
+ const ret = wasm.session_capabilities(this.__wbg_ptr);
718
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
719
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
720
+ return v1;
764
721
  }
765
722
  }
766
723
  module.exports.Session = Session;
767
724
 
768
725
  module.exports.__wbg_abort_775ef1d17fc65868 = function(arg0) {
769
- getObject(arg0).abort();
726
+ arg0.abort();
770
727
  };
771
728
 
772
729
  module.exports.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
773
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
730
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
774
731
  }, arguments) };
775
732
 
776
733
  module.exports.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
777
- const ret = getObject(arg0).arrayBuffer();
778
- return addHeapObject(ret);
734
+ const ret = arg0.arrayBuffer();
735
+ return ret;
779
736
  }, arguments) };
780
737
 
781
738
  module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
782
- const ret = getObject(arg0).buffer;
783
- return addHeapObject(ret);
739
+ const ret = arg0.buffer;
740
+ return ret;
784
741
  };
785
742
 
786
743
  module.exports.__wbg_byteLength_e674b853d9c77e1d = function(arg0) {
787
- const ret = getObject(arg0).byteLength;
744
+ const ret = arg0.byteLength;
788
745
  return ret;
789
746
  };
790
747
 
791
748
  module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
792
- const ret = getObject(arg0).call(getObject(arg1));
793
- return addHeapObject(ret);
749
+ const ret = arg0.call(arg1);
750
+ return ret;
794
751
  }, arguments) };
795
752
 
796
753
  module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
797
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
798
- return addHeapObject(ret);
754
+ const ret = arg0.call(arg1, arg2);
755
+ return ret;
799
756
  }, arguments) };
800
757
 
801
758
  module.exports.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
802
- const ret = getObject(arg0).crypto;
803
- return addHeapObject(ret);
759
+ const ret = arg0.crypto;
760
+ return ret;
804
761
  };
805
762
 
806
763
  module.exports.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {
807
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
764
+ console.debug(arg0, arg1, arg2, arg3);
808
765
  };
809
766
 
810
767
  module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
811
- const ret = getObject(arg0).done;
768
+ const ret = arg0.done;
812
769
  return ret;
813
770
  };
814
771
 
815
772
  module.exports.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
816
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
773
+ console.error(arg0, arg1, arg2, arg3);
817
774
  };
818
775
 
819
776
  module.exports.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
820
- const ret = fetch(getObject(arg0));
821
- return addHeapObject(ret);
777
+ const ret = fetch(arg0);
778
+ return ret;
822
779
  };
823
780
 
824
781
  module.exports.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
825
- const ret = getObject(arg0).fetch(getObject(arg1));
826
- return addHeapObject(ret);
782
+ const ret = arg0.fetch(arg1);
783
+ return ret;
827
784
  };
828
785
 
829
- module.exports.__wbg_fetch_dd5ce2b90da36779 = function(arg0) {
830
- const ret = fetch(getObject(arg0));
831
- return addHeapObject(ret);
786
+ module.exports.__wbg_fetch_d8b19b0ecd6b9e46 = function(arg0) {
787
+ const ret = fetch(arg0);
788
+ return ret;
832
789
  };
833
790
 
834
791
  module.exports.__wbg_getRandomValues_78e016fdd1d721cf = function() { return handleError(function (arg0, arg1) {
@@ -836,37 +793,37 @@ module.exports.__wbg_getRandomValues_78e016fdd1d721cf = function() { return hand
836
793
  }, arguments) };
837
794
 
838
795
  module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
839
- getObject(arg0).getRandomValues(getObject(arg1));
796
+ arg0.getRandomValues(arg1);
840
797
  }, arguments) };
841
798
 
842
799
  module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
843
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
844
- return addHeapObject(ret);
800
+ const ret = Reflect.get(arg0, arg1);
801
+ return ret;
845
802
  }, arguments) };
846
803
 
847
804
  module.exports.__wbg_getheaders_8326221cf02f205d = function(arg0) {
848
- const ret = getObject(arg0).headers;
849
- return addHeapObject(ret);
805
+ const ret = arg0.headers;
806
+ return ret;
850
807
  };
851
808
 
852
809
  module.exports.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
853
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
810
+ const ret = Reflect.has(arg0, arg1);
854
811
  return ret;
855
812
  }, arguments) };
856
813
 
857
814
  module.exports.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
858
- const ret = getObject(arg0).headers;
859
- return addHeapObject(ret);
815
+ const ret = arg0.headers;
816
+ return ret;
860
817
  };
861
818
 
862
819
  module.exports.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {
863
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
820
+ console.info(arg0, arg1, arg2, arg3);
864
821
  };
865
822
 
866
823
  module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
867
824
  let result;
868
825
  try {
869
- result = getObject(arg0) instanceof Response;
826
+ result = arg0 instanceof Response;
870
827
  } catch (_) {
871
828
  result = false;
872
829
  }
@@ -877,7 +834,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
877
834
  module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
878
835
  let result;
879
836
  try {
880
- result = getObject(arg0) instanceof Uint8Array;
837
+ result = arg0 instanceof Uint8Array;
881
838
  } catch (_) {
882
839
  result = false;
883
840
  }
@@ -887,26 +844,26 @@ module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
887
844
 
888
845
  module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
889
846
  const ret = Symbol.iterator;
890
- return addHeapObject(ret);
847
+ return ret;
891
848
  };
892
849
 
893
850
  module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
894
- const ret = getObject(arg0).length;
851
+ const ret = arg0.length;
895
852
  return ret;
896
853
  };
897
854
 
898
855
  module.exports.__wbg_log_cad59bb680daec67 = function(arg0, arg1, arg2, arg3) {
899
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
856
+ console.log(arg0, arg1, arg2, arg3);
900
857
  };
901
858
 
902
859
  module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
903
- const ret = getObject(arg0).msCrypto;
904
- return addHeapObject(ret);
860
+ const ret = arg0.msCrypto;
861
+ return ret;
905
862
  };
906
863
 
907
864
  module.exports.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
908
865
  const ret = new Headers();
909
- return addHeapObject(ret);
866
+ return ret;
910
867
  }, arguments) };
911
868
 
912
869
  module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
@@ -916,13 +873,13 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
916
873
  const a = state0.a;
917
874
  state0.a = 0;
918
875
  try {
919
- return __wbg_adapter_155(a, state0.b, arg0, arg1);
876
+ return __wbg_adapter_160(a, state0.b, arg0, arg1);
920
877
  } finally {
921
878
  state0.a = a;
922
879
  }
923
880
  };
924
881
  const ret = new Promise(cb0);
925
- return addHeapObject(ret);
882
+ return ret;
926
883
  } finally {
927
884
  state0.a = state0.b = 0;
928
885
  }
@@ -930,57 +887,57 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
930
887
 
931
888
  module.exports.__wbg_new_405e22f390576ce2 = function() {
932
889
  const ret = new Object();
933
- return addHeapObject(ret);
890
+ return ret;
934
891
  };
935
892
 
936
893
  module.exports.__wbg_new_78feb108b6472713 = function() {
937
894
  const ret = new Array();
938
- return addHeapObject(ret);
895
+ return ret;
939
896
  };
940
897
 
941
898
  module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
942
- const ret = new Uint8Array(getObject(arg0));
943
- return addHeapObject(ret);
899
+ const ret = new Uint8Array(arg0);
900
+ return ret;
944
901
  };
945
902
 
946
903
  module.exports.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
947
904
  const ret = new AbortController();
948
- return addHeapObject(ret);
905
+ return ret;
949
906
  }, arguments) };
950
907
 
951
908
  module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
952
909
  const ret = new Function(getStringFromWasm0(arg0, arg1));
953
- return addHeapObject(ret);
910
+ return ret;
954
911
  };
955
912
 
956
913
  module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
957
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
958
- return addHeapObject(ret);
914
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
915
+ return ret;
959
916
  };
960
917
 
961
918
  module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
962
919
  const ret = new Uint8Array(arg0 >>> 0);
963
- return addHeapObject(ret);
920
+ return ret;
964
921
  };
965
922
 
966
923
  module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
967
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
968
- return addHeapObject(ret);
924
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
925
+ return ret;
969
926
  }, arguments) };
970
927
 
971
928
  module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
972
- const ret = getObject(arg0).next;
973
- return addHeapObject(ret);
929
+ const ret = arg0.next;
930
+ return ret;
974
931
  };
975
932
 
976
933
  module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
977
- const ret = getObject(arg0).next();
978
- return addHeapObject(ret);
934
+ const ret = arg0.next();
935
+ return ret;
979
936
  }, arguments) };
980
937
 
981
938
  module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
982
- const ret = getObject(arg0).node;
983
- return addHeapObject(ret);
939
+ const ret = arg0.node;
940
+ return ret;
984
941
  };
985
942
 
986
943
  module.exports.__wbg_now_807e54c39636c349 = function() {
@@ -989,133 +946,133 @@ module.exports.__wbg_now_807e54c39636c349 = function() {
989
946
  };
990
947
 
991
948
  module.exports.__wbg_process_5c1d670bc53614b8 = function(arg0) {
992
- const ret = getObject(arg0).process;
993
- return addHeapObject(ret);
949
+ const ret = arg0.process;
950
+ return ret;
994
951
  };
995
952
 
996
953
  module.exports.__wbg_publickey_new = function(arg0) {
997
954
  const ret = PublicKey.__wrap(arg0);
998
- return addHeapObject(ret);
955
+ return ret;
999
956
  };
1000
957
 
1001
958
  module.exports.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
1002
- const ret = getObject(arg0).push(getObject(arg1));
959
+ const ret = arg0.push(arg1);
1003
960
  return ret;
1004
961
  };
1005
962
 
1006
963
  module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
1007
- queueMicrotask(getObject(arg0));
964
+ queueMicrotask(arg0);
1008
965
  };
1009
966
 
1010
967
  module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
1011
- const ret = getObject(arg0).queueMicrotask;
1012
- return addHeapObject(ret);
968
+ const ret = arg0.queueMicrotask;
969
+ return ret;
1013
970
  };
1014
971
 
1015
972
  module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) {
1016
- getObject(arg0).randomFillSync(takeObject(arg1));
973
+ arg0.randomFillSync(arg1);
1017
974
  }, arguments) };
1018
975
 
1019
976
  module.exports.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {
1020
977
  const ret = module.require;
1021
- return addHeapObject(ret);
978
+ return ret;
1022
979
  }, arguments) };
1023
980
 
1024
981
  module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
1025
- const ret = Promise.resolve(getObject(arg0));
1026
- return addHeapObject(ret);
982
+ const ret = Promise.resolve(arg0);
983
+ return ret;
1027
984
  };
1028
985
 
1029
986
  module.exports.__wbg_session_new = function(arg0) {
1030
987
  const ret = Session.__wrap(arg0);
1031
- return addHeapObject(ret);
988
+ return ret;
1032
989
  };
1033
990
 
1034
991
  module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
1035
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
992
+ arg0.set(arg1, arg2 >>> 0);
1036
993
  };
1037
994
 
1038
995
  module.exports.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
1039
- getObject(arg0).body = getObject(arg1);
996
+ arg0.body = arg1;
1040
997
  };
1041
998
 
1042
999
  module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
1043
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1000
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1044
1001
  };
1045
1002
 
1046
1003
  module.exports.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
1047
- getObject(arg0).headers = getObject(arg1);
1004
+ arg0.headers = arg1;
1048
1005
  };
1049
1006
 
1050
1007
  module.exports.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
1051
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1008
+ arg0.method = getStringFromWasm0(arg1, arg2);
1052
1009
  };
1053
1010
 
1054
1011
  module.exports.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
1055
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1012
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1056
1013
  };
1057
1014
 
1058
1015
  module.exports.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
1059
- getObject(arg0).signal = getObject(arg1);
1016
+ arg0.signal = arg1;
1060
1017
  };
1061
1018
 
1062
1019
  module.exports.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
1063
- const ret = getObject(arg0).signal;
1064
- return addHeapObject(ret);
1020
+ const ret = arg0.signal;
1021
+ return ret;
1065
1022
  };
1066
1023
 
1067
1024
  module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
1068
1025
  const ret = typeof global === 'undefined' ? null : global;
1069
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1026
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1070
1027
  };
1071
1028
 
1072
1029
  module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
1073
1030
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
1074
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1031
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1075
1032
  };
1076
1033
 
1077
1034
  module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
1078
1035
  const ret = typeof self === 'undefined' ? null : self;
1079
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1036
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1080
1037
  };
1081
1038
 
1082
1039
  module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
1083
1040
  const ret = typeof window === 'undefined' ? null : window;
1084
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1041
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1085
1042
  };
1086
1043
 
1087
1044
  module.exports.__wbg_status_f6360336ca686bf0 = function(arg0) {
1088
- const ret = getObject(arg0).status;
1045
+ const ret = arg0.status;
1089
1046
  return ret;
1090
1047
  };
1091
1048
 
1092
1049
  module.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
1093
- const ret = JSON.stringify(getObject(arg0));
1094
- return addHeapObject(ret);
1050
+ const ret = JSON.stringify(arg0);
1051
+ return ret;
1095
1052
  }, arguments) };
1096
1053
 
1097
1054
  module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
1098
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1099
- return addHeapObject(ret);
1055
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1056
+ return ret;
1100
1057
  };
1101
1058
 
1102
1059
  module.exports.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
1103
- const ret = getObject(arg0).text();
1104
- return addHeapObject(ret);
1060
+ const ret = arg0.text();
1061
+ return ret;
1105
1062
  }, arguments) };
1106
1063
 
1107
1064
  module.exports.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
1108
- const ret = getObject(arg0).then(getObject(arg1));
1109
- return addHeapObject(ret);
1065
+ const ret = arg0.then(arg1);
1066
+ return ret;
1110
1067
  };
1111
1068
 
1112
1069
  module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
1113
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1114
- return addHeapObject(ret);
1070
+ const ret = arg0.then(arg1, arg2);
1071
+ return ret;
1115
1072
  };
1116
1073
 
1117
1074
  module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
1118
- const ret = getObject(arg1).url;
1075
+ const ret = arg1.url;
1119
1076
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1120
1077
  const len1 = WASM_VECTOR_LEN;
1121
1078
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
@@ -1123,21 +1080,21 @@ module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
1123
1080
  };
1124
1081
 
1125
1082
  module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
1126
- const ret = getObject(arg0).value;
1127
- return addHeapObject(ret);
1083
+ const ret = arg0.value;
1084
+ return ret;
1128
1085
  };
1129
1086
 
1130
1087
  module.exports.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {
1131
- const ret = getObject(arg0).versions;
1132
- return addHeapObject(ret);
1088
+ const ret = arg0.versions;
1089
+ return ret;
1133
1090
  };
1134
1091
 
1135
1092
  module.exports.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {
1136
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1093
+ console.warn(arg0, arg1, arg2, arg3);
1137
1094
  };
1138
1095
 
1139
1096
  module.exports.__wbindgen_cb_drop = function(arg0) {
1140
- const obj = takeObject(arg0).original;
1097
+ const obj = arg0.original;
1141
1098
  if (obj.cnt-- == 1) {
1142
1099
  obj.a = 0;
1143
1100
  return true;
@@ -1146,61 +1103,63 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
1146
1103
  return ret;
1147
1104
  };
1148
1105
 
1149
- module.exports.__wbindgen_closure_wrapper2845 = function(arg0, arg1, arg2) {
1150
- const ret = makeMutClosure(arg0, arg1, 515, __wbg_adapter_28);
1151
- return addHeapObject(ret);
1106
+ module.exports.__wbindgen_closure_wrapper2701 = function(arg0, arg1, arg2) {
1107
+ const ret = makeMutClosure(arg0, arg1, 487, __wbg_adapter_30);
1108
+ return ret;
1152
1109
  };
1153
1110
 
1154
1111
  module.exports.__wbindgen_debug_string = function(arg0, arg1) {
1155
- const ret = debugString(getObject(arg1));
1112
+ const ret = debugString(arg1);
1156
1113
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1157
1114
  const len1 = WASM_VECTOR_LEN;
1158
1115
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1159
1116
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1160
1117
  };
1161
1118
 
1119
+ module.exports.__wbindgen_init_externref_table = function() {
1120
+ const table = wasm.__wbindgen_export_2;
1121
+ const offset = table.grow(4);
1122
+ table.set(0, undefined);
1123
+ table.set(offset + 0, undefined);
1124
+ table.set(offset + 1, null);
1125
+ table.set(offset + 2, true);
1126
+ table.set(offset + 3, false);
1127
+ ;
1128
+ };
1129
+
1162
1130
  module.exports.__wbindgen_is_function = function(arg0) {
1163
- const ret = typeof(getObject(arg0)) === 'function';
1131
+ const ret = typeof(arg0) === 'function';
1164
1132
  return ret;
1165
1133
  };
1166
1134
 
1167
1135
  module.exports.__wbindgen_is_null = function(arg0) {
1168
- const ret = getObject(arg0) === null;
1136
+ const ret = arg0 === null;
1169
1137
  return ret;
1170
1138
  };
1171
1139
 
1172
1140
  module.exports.__wbindgen_is_object = function(arg0) {
1173
- const val = getObject(arg0);
1141
+ const val = arg0;
1174
1142
  const ret = typeof(val) === 'object' && val !== null;
1175
1143
  return ret;
1176
1144
  };
1177
1145
 
1178
1146
  module.exports.__wbindgen_is_string = function(arg0) {
1179
- const ret = typeof(getObject(arg0)) === 'string';
1147
+ const ret = typeof(arg0) === 'string';
1180
1148
  return ret;
1181
1149
  };
1182
1150
 
1183
1151
  module.exports.__wbindgen_is_undefined = function(arg0) {
1184
- const ret = getObject(arg0) === undefined;
1152
+ const ret = arg0 === undefined;
1185
1153
  return ret;
1186
1154
  };
1187
1155
 
1188
1156
  module.exports.__wbindgen_memory = function() {
1189
1157
  const ret = wasm.memory;
1190
- return addHeapObject(ret);
1191
- };
1192
-
1193
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
1194
- const ret = getObject(arg0);
1195
- return addHeapObject(ret);
1196
- };
1197
-
1198
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
1199
- takeObject(arg0);
1158
+ return ret;
1200
1159
  };
1201
1160
 
1202
1161
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
1203
- const obj = getObject(arg1);
1162
+ const obj = arg1;
1204
1163
  const ret = typeof(obj) === 'string' ? obj : undefined;
1205
1164
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1206
1165
  var len1 = WASM_VECTOR_LEN;
@@ -1210,7 +1169,7 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
1210
1169
 
1211
1170
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
1212
1171
  const ret = getStringFromWasm0(arg0, arg1);
1213
- return addHeapObject(ret);
1172
+ return ret;
1214
1173
  };
1215
1174
 
1216
1175
  module.exports.__wbindgen_throw = function(arg0, arg1) {
@@ -1225,3 +1184,5 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
1225
1184
  wasm = wasmInstance.exports;
1226
1185
  module.exports.__wasm = wasm;
1227
1186
 
1187
+ wasm.__wbindgen_start();
1188
+