@synonymdev/pubky 0.4.0-rc2 → 0.4.0
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/README.md +4 -6
- package/index.cjs +213 -153
- package/index.js +277 -216
- package/package.json +2 -2
- package/pubky.d.ts +37 -21
- package/pubky_bg.wasm +0 -0
package/index.cjs
CHANGED
|
@@ -52,6 +52,11 @@ function handleError(f, args) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
56
|
+
ptr = ptr >>> 0;
|
|
57
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
58
|
+
}
|
|
59
|
+
|
|
55
60
|
function dropObject(idx) {
|
|
56
61
|
if (idx < 132) return;
|
|
57
62
|
heap[idx] = heap_next;
|
|
@@ -228,6 +233,16 @@ function debugString(val) {
|
|
|
228
233
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
229
234
|
return className;
|
|
230
235
|
}
|
|
236
|
+
|
|
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)));
|
|
243
|
+
}
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
231
246
|
/**
|
|
232
247
|
* @param {string} level
|
|
233
248
|
*/
|
|
@@ -260,22 +275,11 @@ function _assertClass(instance, klass) {
|
|
|
260
275
|
* @returns {Uint8Array}
|
|
261
276
|
*/
|
|
262
277
|
module.exports.createRecoveryFile = function(keypair, passphrase) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
wasm.createRecoveryFile(retptr, keypair.__wbg_ptr, ptr0, len0);
|
|
269
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
270
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
271
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
272
|
-
if (r2) {
|
|
273
|
-
throw takeObject(r1);
|
|
274
|
-
}
|
|
275
|
-
return takeObject(r0);
|
|
276
|
-
} finally {
|
|
277
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
278
|
-
}
|
|
278
|
+
_assertClass(keypair, Keypair);
|
|
279
|
+
const ptr0 = passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
280
|
+
const len0 = WASM_VECTOR_LEN;
|
|
281
|
+
const ret = wasm.createRecoveryFile(keypair.__wbg_ptr, ptr0, len0);
|
|
282
|
+
return takeObject(ret);
|
|
279
283
|
};
|
|
280
284
|
|
|
281
285
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -311,33 +315,85 @@ module.exports.decryptRecoveryFile = function(recovery_file, passphrase) {
|
|
|
311
315
|
}
|
|
312
316
|
};
|
|
313
317
|
|
|
314
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
315
|
-
ptr = ptr >>> 0;
|
|
316
|
-
const mem = getDataViewMemory0();
|
|
317
|
-
const result = [];
|
|
318
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
319
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
320
|
-
}
|
|
321
|
-
return result;
|
|
322
|
-
}
|
|
323
318
|
function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
324
|
-
wasm.
|
|
319
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39e5fd1911bc8420(arg0, arg1, addHeapObject(arg2));
|
|
325
320
|
}
|
|
326
321
|
|
|
327
|
-
function
|
|
328
|
-
wasm.
|
|
322
|
+
function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
|
|
323
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h93832735ab1a1a6b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
329
324
|
}
|
|
330
325
|
|
|
331
326
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
332
327
|
|
|
333
328
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
334
329
|
|
|
330
|
+
const AuthRequestFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
331
|
+
? { register: () => {}, unregister: () => {} }
|
|
332
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authrequest_free(ptr >>> 0, 1));
|
|
333
|
+
|
|
334
|
+
class AuthRequest {
|
|
335
|
+
|
|
336
|
+
static __wrap(ptr) {
|
|
337
|
+
ptr = ptr >>> 0;
|
|
338
|
+
const obj = Object.create(AuthRequest.prototype);
|
|
339
|
+
obj.__wbg_ptr = ptr;
|
|
340
|
+
AuthRequestFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
341
|
+
return obj;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
__destroy_into_raw() {
|
|
345
|
+
const ptr = this.__wbg_ptr;
|
|
346
|
+
this.__wbg_ptr = 0;
|
|
347
|
+
AuthRequestFinalization.unregister(this);
|
|
348
|
+
return ptr;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
free() {
|
|
352
|
+
const ptr = this.__destroy_into_raw();
|
|
353
|
+
wasm.__wbg_authrequest_free(ptr, 0);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Returns the Pubky Auth url, which you should show to the user
|
|
357
|
+
* to request an authentication or authorization token.
|
|
358
|
+
*
|
|
359
|
+
* Wait for this token using `this.response()`.
|
|
360
|
+
* @returns {string}
|
|
361
|
+
*/
|
|
362
|
+
url() {
|
|
363
|
+
let deferred1_0;
|
|
364
|
+
let deferred1_1;
|
|
365
|
+
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);
|
|
373
|
+
} finally {
|
|
374
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
375
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Wait for the user to send an authentication or authorization proof.
|
|
380
|
+
*
|
|
381
|
+
* If successful, you should expect an instance of [PublicKey]
|
|
382
|
+
*
|
|
383
|
+
* Otherwise it will throw an error.
|
|
384
|
+
* @returns {Promise<PublicKey>}
|
|
385
|
+
*/
|
|
386
|
+
response() {
|
|
387
|
+
const ret = wasm.authrequest_response(this.__wbg_ptr);
|
|
388
|
+
return takeObject(ret);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
module.exports.AuthRequest = AuthRequest;
|
|
392
|
+
|
|
335
393
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
336
394
|
? { register: () => {}, unregister: () => {} }
|
|
337
395
|
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
|
|
338
|
-
|
|
339
|
-
* A client for Pubky homeserver API, as well as generic HTTP requests to Pubky urls.
|
|
340
|
-
*/
|
|
396
|
+
|
|
341
397
|
class Client {
|
|
342
398
|
|
|
343
399
|
static __wrap(ptr) {
|
|
@@ -379,6 +435,41 @@ class Client {
|
|
|
379
435
|
const ret = wasm.client_testnet();
|
|
380
436
|
return Client.__wrap(ret);
|
|
381
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
|
+
}
|
|
382
473
|
/**
|
|
383
474
|
* Signup to a homeserver and update Pkarr accordingly.
|
|
384
475
|
*
|
|
@@ -395,10 +486,10 @@ class Client {
|
|
|
395
486
|
return takeObject(ret);
|
|
396
487
|
}
|
|
397
488
|
/**
|
|
398
|
-
* Check the current
|
|
489
|
+
* Check the current session for a given Pubky in its homeserver.
|
|
399
490
|
*
|
|
400
|
-
* Returns [Session] or `None` (if
|
|
401
|
-
* or throws the
|
|
491
|
+
* Returns [Session] or `None` (if received `404 NOT_FOUND`),
|
|
492
|
+
* or throws the received error if the response has any other `>=400` status code.
|
|
402
493
|
* @param {PublicKey} pubky
|
|
403
494
|
* @returns {Promise<Session | undefined>}
|
|
404
495
|
*/
|
|
@@ -432,10 +523,10 @@ class Client {
|
|
|
432
523
|
* verifying that AuthToken, and if capabilities were requested, signing in to
|
|
433
524
|
* the Pubky's homeserver and returning the [Session] information.
|
|
434
525
|
*
|
|
435
|
-
* Returns a
|
|
526
|
+
* Returns a [AuthRequest]
|
|
436
527
|
* @param {string} relay
|
|
437
528
|
* @param {string} capabilities
|
|
438
|
-
* @returns {
|
|
529
|
+
* @returns {AuthRequest}
|
|
439
530
|
*/
|
|
440
531
|
authRequest(relay, capabilities) {
|
|
441
532
|
try {
|
|
@@ -451,7 +542,7 @@ class Client {
|
|
|
451
542
|
if (r2) {
|
|
452
543
|
throw takeObject(r1);
|
|
453
544
|
}
|
|
454
|
-
return
|
|
545
|
+
return AuthRequest.__wrap(r0);
|
|
455
546
|
} finally {
|
|
456
547
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
457
548
|
}
|
|
@@ -470,41 +561,6 @@ class Client {
|
|
|
470
561
|
const ret = wasm.client_sendAuthToken(this.__wbg_ptr, keypair.__wbg_ptr, ptr0, len0);
|
|
471
562
|
return takeObject(ret);
|
|
472
563
|
}
|
|
473
|
-
/**
|
|
474
|
-
* Returns a list of Pubky urls (as strings).
|
|
475
|
-
*
|
|
476
|
-
* - `url`: The Pubky url (string) to the directory you want to list its content.
|
|
477
|
-
* - `cursor`: Either a full `pubky://` Url (from previous list response),
|
|
478
|
-
* or a path (to a file or directory) relative to the `url`
|
|
479
|
-
* - `reverse`: List in reverse order
|
|
480
|
-
* - `limit` Limit the number of urls in the response
|
|
481
|
-
* - `shallow`: List directories and files, instead of flat list of files.
|
|
482
|
-
* @param {string} url
|
|
483
|
-
* @param {string | undefined} [cursor]
|
|
484
|
-
* @param {boolean | undefined} [reverse]
|
|
485
|
-
* @param {number | undefined} [limit]
|
|
486
|
-
* @param {boolean | undefined} [shallow]
|
|
487
|
-
* @returns {Promise<Array<any>>}
|
|
488
|
-
*/
|
|
489
|
-
list(url, cursor, reverse, limit, shallow) {
|
|
490
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
-
const len0 = WASM_VECTOR_LEN;
|
|
492
|
-
var ptr1 = isLikeNone(cursor) ? 0 : passStringToWasm0(cursor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
493
|
-
var len1 = WASM_VECTOR_LEN;
|
|
494
|
-
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);
|
|
495
|
-
return takeObject(ret);
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* @param {string} url
|
|
499
|
-
* @param {any | undefined} [request_init]
|
|
500
|
-
* @returns {Promise<Promise<any>>}
|
|
501
|
-
*/
|
|
502
|
-
fetch(url, request_init) {
|
|
503
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
504
|
-
const len0 = WASM_VECTOR_LEN;
|
|
505
|
-
const ret = wasm.client_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(request_init) ? 0 : addHeapObject(request_init));
|
|
506
|
-
return takeObject(ret);
|
|
507
|
-
}
|
|
508
564
|
}
|
|
509
565
|
module.exports.Client = Client;
|
|
510
566
|
|
|
@@ -691,7 +747,7 @@ class Session {
|
|
|
691
747
|
}
|
|
692
748
|
/**
|
|
693
749
|
* Return the capabilities that this session has.
|
|
694
|
-
* @returns {
|
|
750
|
+
* @returns {string[]}
|
|
695
751
|
*/
|
|
696
752
|
capabilities() {
|
|
697
753
|
try {
|
|
@@ -709,36 +765,36 @@ class Session {
|
|
|
709
765
|
}
|
|
710
766
|
module.exports.Session = Session;
|
|
711
767
|
|
|
712
|
-
module.exports.
|
|
768
|
+
module.exports.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
713
769
|
getObject(arg0).abort();
|
|
714
770
|
};
|
|
715
771
|
|
|
716
|
-
module.exports.
|
|
772
|
+
module.exports.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
717
773
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
718
774
|
}, arguments) };
|
|
719
775
|
|
|
720
|
-
module.exports.
|
|
776
|
+
module.exports.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
|
|
721
777
|
const ret = getObject(arg0).arrayBuffer();
|
|
722
778
|
return addHeapObject(ret);
|
|
723
779
|
}, arguments) };
|
|
724
780
|
|
|
725
|
-
module.exports.
|
|
781
|
+
module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
726
782
|
const ret = getObject(arg0).buffer;
|
|
727
783
|
return addHeapObject(ret);
|
|
728
784
|
};
|
|
729
785
|
|
|
730
|
-
module.exports.
|
|
786
|
+
module.exports.__wbg_byteLength_e674b853d9c77e1d = function(arg0) {
|
|
731
787
|
const ret = getObject(arg0).byteLength;
|
|
732
788
|
return ret;
|
|
733
789
|
};
|
|
734
790
|
|
|
735
|
-
module.exports.
|
|
736
|
-
const ret = getObject(arg0).call(getObject(arg1)
|
|
791
|
+
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
792
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
737
793
|
return addHeapObject(ret);
|
|
738
794
|
}, arguments) };
|
|
739
795
|
|
|
740
|
-
module.exports.
|
|
741
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
796
|
+
module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
797
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
742
798
|
return addHeapObject(ret);
|
|
743
799
|
}, arguments) };
|
|
744
800
|
|
|
@@ -747,63 +803,67 @@ module.exports.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
|
|
|
747
803
|
return addHeapObject(ret);
|
|
748
804
|
};
|
|
749
805
|
|
|
750
|
-
module.exports.
|
|
806
|
+
module.exports.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {
|
|
751
807
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
752
808
|
};
|
|
753
809
|
|
|
754
|
-
module.exports.
|
|
810
|
+
module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
755
811
|
const ret = getObject(arg0).done;
|
|
756
812
|
return ret;
|
|
757
813
|
};
|
|
758
814
|
|
|
759
|
-
module.exports.
|
|
815
|
+
module.exports.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {
|
|
760
816
|
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
761
817
|
};
|
|
762
818
|
|
|
763
|
-
module.exports.
|
|
764
|
-
const ret =
|
|
819
|
+
module.exports.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
|
|
820
|
+
const ret = fetch(getObject(arg0));
|
|
765
821
|
return addHeapObject(ret);
|
|
766
822
|
};
|
|
767
823
|
|
|
768
|
-
module.exports.
|
|
769
|
-
const ret = fetch(getObject(
|
|
824
|
+
module.exports.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
825
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
770
826
|
return addHeapObject(ret);
|
|
771
827
|
};
|
|
772
828
|
|
|
773
|
-
module.exports.
|
|
829
|
+
module.exports.__wbg_fetch_dd5ce2b90da36779 = function(arg0) {
|
|
774
830
|
const ret = fetch(getObject(arg0));
|
|
775
831
|
return addHeapObject(ret);
|
|
776
832
|
};
|
|
777
833
|
|
|
834
|
+
module.exports.__wbg_getRandomValues_78e016fdd1d721cf = function() { return handleError(function (arg0, arg1) {
|
|
835
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
836
|
+
}, arguments) };
|
|
837
|
+
|
|
778
838
|
module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
|
|
779
839
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
780
840
|
}, arguments) };
|
|
781
841
|
|
|
782
|
-
module.exports.
|
|
842
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
783
843
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
784
844
|
return addHeapObject(ret);
|
|
785
845
|
}, arguments) };
|
|
786
846
|
|
|
787
|
-
module.exports.
|
|
847
|
+
module.exports.__wbg_getheaders_8326221cf02f205d = function(arg0) {
|
|
788
848
|
const ret = getObject(arg0).headers;
|
|
789
849
|
return addHeapObject(ret);
|
|
790
850
|
};
|
|
791
851
|
|
|
792
|
-
module.exports.
|
|
852
|
+
module.exports.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
|
|
793
853
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
794
854
|
return ret;
|
|
795
855
|
}, arguments) };
|
|
796
856
|
|
|
797
|
-
module.exports.
|
|
857
|
+
module.exports.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
|
|
798
858
|
const ret = getObject(arg0).headers;
|
|
799
859
|
return addHeapObject(ret);
|
|
800
860
|
};
|
|
801
861
|
|
|
802
|
-
module.exports.
|
|
862
|
+
module.exports.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {
|
|
803
863
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
804
864
|
};
|
|
805
865
|
|
|
806
|
-
module.exports.
|
|
866
|
+
module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
807
867
|
let result;
|
|
808
868
|
try {
|
|
809
869
|
result = getObject(arg0) instanceof Response;
|
|
@@ -814,7 +874,7 @@ module.exports.__wbg_instanceof_Response_d3453657e10c4300 = function(arg0) {
|
|
|
814
874
|
return ret;
|
|
815
875
|
};
|
|
816
876
|
|
|
817
|
-
module.exports.
|
|
877
|
+
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
818
878
|
let result;
|
|
819
879
|
try {
|
|
820
880
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -825,17 +885,17 @@ module.exports.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
|
|
|
825
885
|
return ret;
|
|
826
886
|
};
|
|
827
887
|
|
|
828
|
-
module.exports.
|
|
888
|
+
module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
829
889
|
const ret = Symbol.iterator;
|
|
830
890
|
return addHeapObject(ret);
|
|
831
891
|
};
|
|
832
892
|
|
|
833
|
-
module.exports.
|
|
893
|
+
module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
834
894
|
const ret = getObject(arg0).length;
|
|
835
895
|
return ret;
|
|
836
896
|
};
|
|
837
897
|
|
|
838
|
-
module.exports.
|
|
898
|
+
module.exports.__wbg_log_cad59bb680daec67 = function(arg0, arg1, arg2, arg3) {
|
|
839
899
|
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
840
900
|
};
|
|
841
901
|
|
|
@@ -844,24 +904,19 @@ module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
|
|
|
844
904
|
return addHeapObject(ret);
|
|
845
905
|
};
|
|
846
906
|
|
|
847
|
-
module.exports.
|
|
848
|
-
const ret = new Array();
|
|
849
|
-
return addHeapObject(ret);
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
module.exports.__wbg_new_35d748855c4620b9 = function() { return handleError(function () {
|
|
907
|
+
module.exports.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
|
|
853
908
|
const ret = new Headers();
|
|
854
909
|
return addHeapObject(ret);
|
|
855
910
|
}, arguments) };
|
|
856
911
|
|
|
857
|
-
module.exports.
|
|
912
|
+
module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
858
913
|
try {
|
|
859
914
|
var state0 = {a: arg0, b: arg1};
|
|
860
915
|
var cb0 = (arg0, arg1) => {
|
|
861
916
|
const a = state0.a;
|
|
862
917
|
state0.a = 0;
|
|
863
918
|
try {
|
|
864
|
-
return
|
|
919
|
+
return __wbg_adapter_155(a, state0.b, arg0, arg1);
|
|
865
920
|
} finally {
|
|
866
921
|
state0.a = a;
|
|
867
922
|
}
|
|
@@ -873,57 +928,62 @@ module.exports.__wbg_new_3d446df9155128ef = function(arg0, arg1) {
|
|
|
873
928
|
}
|
|
874
929
|
};
|
|
875
930
|
|
|
876
|
-
module.exports.
|
|
877
|
-
const ret = new
|
|
931
|
+
module.exports.__wbg_new_405e22f390576ce2 = function() {
|
|
932
|
+
const ret = new Object();
|
|
878
933
|
return addHeapObject(ret);
|
|
879
934
|
};
|
|
880
935
|
|
|
881
|
-
module.exports.
|
|
882
|
-
const ret = new
|
|
936
|
+
module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
937
|
+
const ret = new Array();
|
|
883
938
|
return addHeapObject(ret);
|
|
884
|
-
}
|
|
939
|
+
};
|
|
885
940
|
|
|
886
|
-
module.exports.
|
|
887
|
-
const ret = new
|
|
941
|
+
module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
942
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
888
943
|
return addHeapObject(ret);
|
|
889
944
|
};
|
|
890
945
|
|
|
891
|
-
module.exports.
|
|
946
|
+
module.exports.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
|
|
947
|
+
const ret = new AbortController();
|
|
948
|
+
return addHeapObject(ret);
|
|
949
|
+
}, arguments) };
|
|
950
|
+
|
|
951
|
+
module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
892
952
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
893
953
|
return addHeapObject(ret);
|
|
894
954
|
};
|
|
895
955
|
|
|
896
|
-
module.exports.
|
|
956
|
+
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
897
957
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
898
958
|
return addHeapObject(ret);
|
|
899
959
|
};
|
|
900
960
|
|
|
901
|
-
module.exports.
|
|
961
|
+
module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
902
962
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
903
963
|
return addHeapObject(ret);
|
|
904
964
|
};
|
|
905
965
|
|
|
906
|
-
module.exports.
|
|
966
|
+
module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
907
967
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
908
968
|
return addHeapObject(ret);
|
|
909
969
|
}, arguments) };
|
|
910
970
|
|
|
911
|
-
module.exports.
|
|
912
|
-
const ret = getObject(arg0).next();
|
|
913
|
-
return addHeapObject(ret);
|
|
914
|
-
}, arguments) };
|
|
915
|
-
|
|
916
|
-
module.exports.__wbg_next_137428deb98342b0 = function(arg0) {
|
|
971
|
+
module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
917
972
|
const ret = getObject(arg0).next;
|
|
918
973
|
return addHeapObject(ret);
|
|
919
974
|
};
|
|
920
975
|
|
|
976
|
+
module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
977
|
+
const ret = getObject(arg0).next();
|
|
978
|
+
return addHeapObject(ret);
|
|
979
|
+
}, arguments) };
|
|
980
|
+
|
|
921
981
|
module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
|
|
922
982
|
const ret = getObject(arg0).node;
|
|
923
983
|
return addHeapObject(ret);
|
|
924
984
|
};
|
|
925
985
|
|
|
926
|
-
module.exports.
|
|
986
|
+
module.exports.__wbg_now_807e54c39636c349 = function() {
|
|
927
987
|
const ret = Date.now();
|
|
928
988
|
return ret;
|
|
929
989
|
};
|
|
@@ -938,16 +998,16 @@ module.exports.__wbg_publickey_new = function(arg0) {
|
|
|
938
998
|
return addHeapObject(ret);
|
|
939
999
|
};
|
|
940
1000
|
|
|
941
|
-
module.exports.
|
|
1001
|
+
module.exports.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
942
1002
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
943
1003
|
return ret;
|
|
944
1004
|
};
|
|
945
1005
|
|
|
946
|
-
module.exports.
|
|
1006
|
+
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
947
1007
|
queueMicrotask(getObject(arg0));
|
|
948
1008
|
};
|
|
949
1009
|
|
|
950
|
-
module.exports.
|
|
1010
|
+
module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
951
1011
|
const ret = getObject(arg0).queueMicrotask;
|
|
952
1012
|
return addHeapObject(ret);
|
|
953
1013
|
};
|
|
@@ -961,7 +1021,7 @@ module.exports.__wbg_require_79b1e9274cde3c87 = function() { return handleError(
|
|
|
961
1021
|
return addHeapObject(ret);
|
|
962
1022
|
}, arguments) };
|
|
963
1023
|
|
|
964
|
-
module.exports.
|
|
1024
|
+
module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
965
1025
|
const ret = Promise.resolve(getObject(arg0));
|
|
966
1026
|
return addHeapObject(ret);
|
|
967
1027
|
};
|
|
@@ -971,90 +1031,90 @@ module.exports.__wbg_session_new = function(arg0) {
|
|
|
971
1031
|
return addHeapObject(ret);
|
|
972
1032
|
};
|
|
973
1033
|
|
|
974
|
-
module.exports.
|
|
1034
|
+
module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
975
1035
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
976
1036
|
};
|
|
977
1037
|
|
|
978
|
-
module.exports.
|
|
1038
|
+
module.exports.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
979
1039
|
getObject(arg0).body = getObject(arg1);
|
|
980
1040
|
};
|
|
981
1041
|
|
|
982
|
-
module.exports.
|
|
1042
|
+
module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
983
1043
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
984
1044
|
};
|
|
985
1045
|
|
|
986
|
-
module.exports.
|
|
1046
|
+
module.exports.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
|
|
987
1047
|
getObject(arg0).headers = getObject(arg1);
|
|
988
1048
|
};
|
|
989
1049
|
|
|
990
|
-
module.exports.
|
|
1050
|
+
module.exports.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
|
|
991
1051
|
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
992
1052
|
};
|
|
993
1053
|
|
|
994
|
-
module.exports.
|
|
1054
|
+
module.exports.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
995
1055
|
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
996
1056
|
};
|
|
997
1057
|
|
|
998
|
-
module.exports.
|
|
1058
|
+
module.exports.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
|
|
999
1059
|
getObject(arg0).signal = getObject(arg1);
|
|
1000
1060
|
};
|
|
1001
1061
|
|
|
1002
|
-
module.exports.
|
|
1062
|
+
module.exports.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
|
|
1003
1063
|
const ret = getObject(arg0).signal;
|
|
1004
1064
|
return addHeapObject(ret);
|
|
1005
1065
|
};
|
|
1006
1066
|
|
|
1007
|
-
module.exports.
|
|
1067
|
+
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
1008
1068
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1009
1069
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1010
1070
|
};
|
|
1011
1071
|
|
|
1012
|
-
module.exports.
|
|
1072
|
+
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
1013
1073
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1014
1074
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1015
1075
|
};
|
|
1016
1076
|
|
|
1017
|
-
module.exports.
|
|
1077
|
+
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
1018
1078
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1019
1079
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1020
1080
|
};
|
|
1021
1081
|
|
|
1022
|
-
module.exports.
|
|
1082
|
+
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
1023
1083
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1024
1084
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1025
1085
|
};
|
|
1026
1086
|
|
|
1027
|
-
module.exports.
|
|
1087
|
+
module.exports.__wbg_status_f6360336ca686bf0 = function(arg0) {
|
|
1028
1088
|
const ret = getObject(arg0).status;
|
|
1029
1089
|
return ret;
|
|
1030
1090
|
};
|
|
1031
1091
|
|
|
1032
|
-
module.exports.
|
|
1092
|
+
module.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
|
|
1033
1093
|
const ret = JSON.stringify(getObject(arg0));
|
|
1034
1094
|
return addHeapObject(ret);
|
|
1035
1095
|
}, arguments) };
|
|
1036
1096
|
|
|
1037
|
-
module.exports.
|
|
1097
|
+
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
1038
1098
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1039
1099
|
return addHeapObject(ret);
|
|
1040
1100
|
};
|
|
1041
1101
|
|
|
1042
|
-
module.exports.
|
|
1102
|
+
module.exports.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
|
|
1043
1103
|
const ret = getObject(arg0).text();
|
|
1044
1104
|
return addHeapObject(ret);
|
|
1045
1105
|
}, arguments) };
|
|
1046
1106
|
|
|
1047
|
-
module.exports.
|
|
1107
|
+
module.exports.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
1048
1108
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
1049
1109
|
return addHeapObject(ret);
|
|
1050
1110
|
};
|
|
1051
1111
|
|
|
1052
|
-
module.exports.
|
|
1112
|
+
module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
1053
1113
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1054
1114
|
return addHeapObject(ret);
|
|
1055
1115
|
};
|
|
1056
1116
|
|
|
1057
|
-
module.exports.
|
|
1117
|
+
module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
1058
1118
|
const ret = getObject(arg1).url;
|
|
1059
1119
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1060
1120
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1062,7 +1122,7 @@ module.exports.__wbg_url_5327bc0a41a9b085 = function(arg0, arg1) {
|
|
|
1062
1122
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1063
1123
|
};
|
|
1064
1124
|
|
|
1065
|
-
module.exports.
|
|
1125
|
+
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
1066
1126
|
const ret = getObject(arg0).value;
|
|
1067
1127
|
return addHeapObject(ret);
|
|
1068
1128
|
};
|
|
@@ -1072,7 +1132,7 @@ module.exports.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {
|
|
|
1072
1132
|
return addHeapObject(ret);
|
|
1073
1133
|
};
|
|
1074
1134
|
|
|
1075
|
-
module.exports.
|
|
1135
|
+
module.exports.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {
|
|
1076
1136
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1077
1137
|
};
|
|
1078
1138
|
|
|
@@ -1086,8 +1146,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
1086
1146
|
return ret;
|
|
1087
1147
|
};
|
|
1088
1148
|
|
|
1089
|
-
module.exports.
|
|
1090
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1149
|
+
module.exports.__wbindgen_closure_wrapper2845 = function(arg0, arg1, arg2) {
|
|
1150
|
+
const ret = makeMutClosure(arg0, arg1, 515, __wbg_adapter_28);
|
|
1091
1151
|
return addHeapObject(ret);
|
|
1092
1152
|
};
|
|
1093
1153
|
|