@synonymdev/pubky 0.6.0-rc.6 → 0.6.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 +84 -24
- package/index.cjs +935 -443
- package/index.js +1049 -555
- package/package.json +3 -3
- package/pubky.d.ts +201 -68
- package/pubky_bg.wasm +0 -0
package/index.cjs
CHANGED
|
@@ -6,8 +6,6 @@ globalThis.fetch = makeFetchCookie(originalFetch);
|
|
|
6
6
|
|
|
7
7
|
let imports = {};
|
|
8
8
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
9
|
-
let wasm;
|
|
10
|
-
const { TextDecoder, TextEncoder } = require(`util`);
|
|
11
9
|
|
|
12
10
|
let cachedUint8ArrayMemory0 = null;
|
|
13
11
|
|
|
@@ -33,20 +31,18 @@ function getStringFromWasm0(ptr, len) {
|
|
|
33
31
|
|
|
34
32
|
let WASM_VECTOR_LEN = 0;
|
|
35
33
|
|
|
36
|
-
const cachedTextEncoder = new TextEncoder(
|
|
34
|
+
const cachedTextEncoder = new TextEncoder();
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
37
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
38
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
39
|
+
view.set(buf);
|
|
40
|
+
return {
|
|
41
|
+
read: arg.length,
|
|
42
|
+
written: buf.length
|
|
43
|
+
};
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
|
-
: function (arg, view) {
|
|
43
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
44
|
-
view.set(buf);
|
|
45
|
-
return {
|
|
46
|
-
read: arg.length,
|
|
47
|
-
written: buf.length
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
46
|
|
|
51
47
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
52
48
|
|
|
@@ -77,7 +73,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
77
73
|
}
|
|
78
74
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
79
75
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
80
|
-
const ret =
|
|
76
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
81
77
|
|
|
82
78
|
offset += ret.written;
|
|
83
79
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -96,61 +92,10 @@ function getDataViewMemory0() {
|
|
|
96
92
|
return cachedDataViewMemory0;
|
|
97
93
|
}
|
|
98
94
|
|
|
99
|
-
function addToExternrefTable0(obj) {
|
|
100
|
-
const idx = wasm.__externref_table_alloc();
|
|
101
|
-
wasm.__wbindgen_export_4.set(idx, obj);
|
|
102
|
-
return idx;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function handleError(f, args) {
|
|
106
|
-
try {
|
|
107
|
-
return f.apply(this, args);
|
|
108
|
-
} catch (e) {
|
|
109
|
-
const idx = addToExternrefTable0(e);
|
|
110
|
-
wasm.__wbindgen_exn_store(idx);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
95
|
function isLikeNone(x) {
|
|
115
96
|
return x === undefined || x === null;
|
|
116
97
|
}
|
|
117
98
|
|
|
118
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
119
|
-
ptr = ptr >>> 0;
|
|
120
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
124
|
-
? { register: () => {}, unregister: () => {} }
|
|
125
|
-
: new FinalizationRegistry(state => {
|
|
126
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
130
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
131
|
-
const real = (...args) => {
|
|
132
|
-
// First up with a closure we increment the internal reference
|
|
133
|
-
// count. This ensures that the Rust closure environment won't
|
|
134
|
-
// be deallocated while we're invoking it.
|
|
135
|
-
state.cnt++;
|
|
136
|
-
const a = state.a;
|
|
137
|
-
state.a = 0;
|
|
138
|
-
try {
|
|
139
|
-
return f(a, state.b, ...args);
|
|
140
|
-
} finally {
|
|
141
|
-
if (--state.cnt === 0) {
|
|
142
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
143
|
-
CLOSURE_DTORS.unregister(state);
|
|
144
|
-
} else {
|
|
145
|
-
state.a = a;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
real.original = state;
|
|
150
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
151
|
-
return real;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
99
|
function debugString(val) {
|
|
155
100
|
// primitive types
|
|
156
101
|
const type = typeof val;
|
|
@@ -216,23 +161,56 @@ function debugString(val) {
|
|
|
216
161
|
return className;
|
|
217
162
|
}
|
|
218
163
|
|
|
219
|
-
function
|
|
220
|
-
const
|
|
221
|
-
wasm.
|
|
222
|
-
return
|
|
164
|
+
function addToExternrefTable0(obj) {
|
|
165
|
+
const idx = wasm.__externref_table_alloc();
|
|
166
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
167
|
+
return idx;
|
|
223
168
|
}
|
|
224
169
|
|
|
225
|
-
function
|
|
226
|
-
|
|
227
|
-
|
|
170
|
+
function handleError(f, args) {
|
|
171
|
+
try {
|
|
172
|
+
return f.apply(this, args);
|
|
173
|
+
} catch (e) {
|
|
174
|
+
const idx = addToExternrefTable0(e);
|
|
175
|
+
wasm.__wbindgen_exn_store(idx);
|
|
228
176
|
}
|
|
229
177
|
}
|
|
230
178
|
|
|
231
|
-
function
|
|
232
|
-
|
|
233
|
-
getUint8ArrayMemory0().
|
|
234
|
-
|
|
235
|
-
|
|
179
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
180
|
+
ptr = ptr >>> 0;
|
|
181
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
185
|
+
? { register: () => {}, unregister: () => {} }
|
|
186
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
187
|
+
|
|
188
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
189
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
190
|
+
const real = (...args) => {
|
|
191
|
+
|
|
192
|
+
// First up with a closure we increment the internal reference
|
|
193
|
+
// count. This ensures that the Rust closure environment won't
|
|
194
|
+
// be deallocated while we're invoking it.
|
|
195
|
+
state.cnt++;
|
|
196
|
+
const a = state.a;
|
|
197
|
+
state.a = 0;
|
|
198
|
+
try {
|
|
199
|
+
return f(a, state.b, ...args);
|
|
200
|
+
} finally {
|
|
201
|
+
state.a = a;
|
|
202
|
+
real._wbg_cb_unref();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
real._wbg_cb_unref = () => {
|
|
206
|
+
if (--state.cnt === 0) {
|
|
207
|
+
state.dtor(state.a, state.b);
|
|
208
|
+
state.a = 0;
|
|
209
|
+
CLOSURE_DTORS.unregister(state);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
213
|
+
return real;
|
|
236
214
|
}
|
|
237
215
|
|
|
238
216
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
@@ -240,11 +218,30 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
240
218
|
const mem = getDataViewMemory0();
|
|
241
219
|
const result = [];
|
|
242
220
|
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
243
|
-
result.push(wasm.
|
|
221
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
244
222
|
}
|
|
245
223
|
wasm.__externref_drop_slice(ptr, len);
|
|
246
224
|
return result;
|
|
247
225
|
}
|
|
226
|
+
|
|
227
|
+
function _assertClass(instance, klass) {
|
|
228
|
+
if (!(instance instanceof klass)) {
|
|
229
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function takeFromExternrefTable0(idx) {
|
|
234
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
235
|
+
wasm.__externref_table_dealloc(idx);
|
|
236
|
+
return value;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
240
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
241
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
242
|
+
WASM_VECTOR_LEN = arg.length;
|
|
243
|
+
return ptr;
|
|
244
|
+
}
|
|
248
245
|
/**
|
|
249
246
|
* Set the global logging verbosity for the WASM Pubky SDK. Routes Rust `log` output to the browser console.
|
|
250
247
|
*
|
|
@@ -267,7 +264,7 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
267
264
|
* Call once at application startup, before invoking other SDK APIs.
|
|
268
265
|
* @param {Level} level
|
|
269
266
|
*/
|
|
270
|
-
|
|
267
|
+
exports.setLogLevel = function(level) {
|
|
271
268
|
const ret = wasm.setLogLevel((__wbindgen_enum_Level.indexOf(level) + 1 || 6) - 1);
|
|
272
269
|
if (ret[1]) {
|
|
273
270
|
throw takeFromExternrefTable0(ret[0]);
|
|
@@ -282,7 +279,7 @@ module.exports.setLogLevel = function(level) {
|
|
|
282
279
|
* @param {string} identifier
|
|
283
280
|
* @returns {string}
|
|
284
281
|
*/
|
|
285
|
-
|
|
282
|
+
exports.resolvePubky = function(identifier) {
|
|
286
283
|
let deferred3_0;
|
|
287
284
|
let deferred3_1;
|
|
288
285
|
try {
|
|
@@ -316,7 +313,7 @@ module.exports.resolvePubky = function(identifier) {
|
|
|
316
313
|
* @param {string} input
|
|
317
314
|
* @returns {string}
|
|
318
315
|
*/
|
|
319
|
-
|
|
316
|
+
exports.validateCapabilities = function(input) {
|
|
320
317
|
let deferred3_0;
|
|
321
318
|
let deferred3_1;
|
|
322
319
|
try {
|
|
@@ -337,16 +334,16 @@ module.exports.validateCapabilities = function(input) {
|
|
|
337
334
|
}
|
|
338
335
|
};
|
|
339
336
|
|
|
340
|
-
function
|
|
341
|
-
wasm.
|
|
337
|
+
function wasm_bindgen__convert__closures_____invoke__h13019d5ee70bd6b6(arg0, arg1) {
|
|
338
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h13019d5ee70bd6b6(arg0, arg1);
|
|
342
339
|
}
|
|
343
340
|
|
|
344
|
-
function
|
|
345
|
-
wasm.
|
|
341
|
+
function wasm_bindgen__convert__closures_____invoke__h69202035a90512ea(arg0, arg1, arg2) {
|
|
342
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h69202035a90512ea(arg0, arg1, arg2);
|
|
346
343
|
}
|
|
347
344
|
|
|
348
|
-
function
|
|
349
|
-
wasm.
|
|
345
|
+
function wasm_bindgen__convert__closures_____invoke__h07d45d2c9c5e1bbe(arg0, arg1, arg2, arg3) {
|
|
346
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h07d45d2c9c5e1bbe(arg0, arg1, arg2, arg3);
|
|
350
347
|
}
|
|
351
348
|
|
|
352
349
|
const __wbindgen_enum_Level = ["error", "warn", "info", "debug", "trace"];
|
|
@@ -398,10 +395,17 @@ class AuthFlow {
|
|
|
398
395
|
* @param {string} capabilities
|
|
399
396
|
* Comma-separated capabilities, e.g. `"/pub/app/:rw,/priv/foo.txt:r"`.
|
|
400
397
|
* Each entry must be `"<scope>:<actions>"`, where:
|
|
401
|
-
* - `scope` starts with `/` (e.g. `/pub/example.
|
|
398
|
+
* - `scope` starts with `/` (e.g. `/pub/example.com/`)
|
|
402
399
|
* - `actions` is any combo of `r` and/or `w` (order is normalized; `wr` -> `rw`)
|
|
403
400
|
* Empty string is allowed (no scopes).
|
|
404
401
|
*
|
|
402
|
+
* @param {AuthFlowKind} kind
|
|
403
|
+
* The kind of authentication flow to perform.
|
|
404
|
+
* This can either be a sign in or a sign up flow.
|
|
405
|
+
* Examples:
|
|
406
|
+
* - `AuthFlowKind.signin()` - Sign in to an existing account.
|
|
407
|
+
* - `AuthFlowKind.signup(homeserverPublicKey, signupToken)` - Sign up for a new account.
|
|
408
|
+
*
|
|
405
409
|
* @param {string} [relay]
|
|
406
410
|
* Optional HTTP relay base, e.g. `"https://demo.httprelay.io/link/"`.
|
|
407
411
|
* Defaults to the default Synonym-hosted relay when omitted.
|
|
@@ -413,19 +417,22 @@ class AuthFlow {
|
|
|
413
417
|
* - `{ name: "InvalidInput", message: string }` if any capability entry is invalid
|
|
414
418
|
* or for an invalid relay URL.
|
|
415
419
|
* @example
|
|
416
|
-
* const flow = AuthFlow.start("/pub/my
|
|
420
|
+
* const flow = AuthFlow.start("/pub/my-cool-app/:rw,/pub/pubky.app/:w");
|
|
417
421
|
* renderQRCode(flow.authorizationUrl());
|
|
418
422
|
* const session = await flow.awaitApproval();
|
|
419
423
|
* @param {Capabilities} capabilities
|
|
424
|
+
* @param {AuthFlowKind} kind
|
|
420
425
|
* @param {string | null} [relay]
|
|
421
426
|
* @returns {AuthFlow}
|
|
422
427
|
*/
|
|
423
|
-
static start(capabilities, relay) {
|
|
428
|
+
static start(capabilities, kind, relay) {
|
|
424
429
|
const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
430
|
const len0 = WASM_VECTOR_LEN;
|
|
426
|
-
|
|
427
|
-
var
|
|
428
|
-
|
|
431
|
+
_assertClass(kind, AuthFlowKind);
|
|
432
|
+
var ptr1 = kind.__destroy_into_raw();
|
|
433
|
+
var ptr2 = isLikeNone(relay) ? 0 : passStringToWasm0(relay, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
434
|
+
var len2 = WASM_VECTOR_LEN;
|
|
435
|
+
const ret = wasm.authflow_start(ptr0, len0, ptr1, ptr2, len2);
|
|
429
436
|
if (ret[2]) {
|
|
430
437
|
throw takeFromExternrefTable0(ret[1]);
|
|
431
438
|
}
|
|
@@ -464,8 +471,7 @@ class AuthFlow {
|
|
|
464
471
|
* @returns {Promise<Session>}
|
|
465
472
|
*/
|
|
466
473
|
awaitApproval() {
|
|
467
|
-
const
|
|
468
|
-
const ret = wasm.authflow_awaitApproval(ptr);
|
|
474
|
+
const ret = wasm.authflow_awaitApproval(this.__wbg_ptr);
|
|
469
475
|
return ret;
|
|
470
476
|
}
|
|
471
477
|
/**
|
|
@@ -479,8 +485,7 @@ class AuthFlow {
|
|
|
479
485
|
* @returns {Promise<AuthToken>}
|
|
480
486
|
*/
|
|
481
487
|
awaitToken() {
|
|
482
|
-
const
|
|
483
|
-
const ret = wasm.authflow_awaitToken(ptr);
|
|
488
|
+
const ret = wasm.authflow_awaitToken(this.__wbg_ptr);
|
|
484
489
|
return ret;
|
|
485
490
|
}
|
|
486
491
|
/**
|
|
@@ -494,7 +499,85 @@ class AuthFlow {
|
|
|
494
499
|
return ret;
|
|
495
500
|
}
|
|
496
501
|
}
|
|
497
|
-
|
|
502
|
+
if (Symbol.dispose) AuthFlow.prototype[Symbol.dispose] = AuthFlow.prototype.free;
|
|
503
|
+
|
|
504
|
+
exports.AuthFlow = AuthFlow;
|
|
505
|
+
|
|
506
|
+
const AuthFlowKindFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
507
|
+
? { register: () => {}, unregister: () => {} }
|
|
508
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr >>> 0, 1));
|
|
509
|
+
/**
|
|
510
|
+
* The kind of authentication flow to perform.
|
|
511
|
+
* This can either be a sign in or a sign up flow.
|
|
512
|
+
*/
|
|
513
|
+
class AuthFlowKind {
|
|
514
|
+
|
|
515
|
+
static __wrap(ptr) {
|
|
516
|
+
ptr = ptr >>> 0;
|
|
517
|
+
const obj = Object.create(AuthFlowKind.prototype);
|
|
518
|
+
obj.__wbg_ptr = ptr;
|
|
519
|
+
AuthFlowKindFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
520
|
+
return obj;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
__destroy_into_raw() {
|
|
524
|
+
const ptr = this.__wbg_ptr;
|
|
525
|
+
this.__wbg_ptr = 0;
|
|
526
|
+
AuthFlowKindFinalization.unregister(this);
|
|
527
|
+
return ptr;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
free() {
|
|
531
|
+
const ptr = this.__destroy_into_raw();
|
|
532
|
+
wasm.__wbg_authflowkind_free(ptr, 0);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Create a sign in flow.
|
|
536
|
+
* @returns {AuthFlowKind}
|
|
537
|
+
*/
|
|
538
|
+
static signin() {
|
|
539
|
+
const ret = wasm.authflowkind_signin();
|
|
540
|
+
return AuthFlowKind.__wrap(ret);
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Create a sign up flow.
|
|
544
|
+
* # Arguments
|
|
545
|
+
* * `homeserver_public_key` - The public key of the homeserver to sign up on.
|
|
546
|
+
* * `signup_token` - The signup token to use for the signup flow. This is optional.
|
|
547
|
+
* @param {PublicKey} homeserver_public_key
|
|
548
|
+
* @param {string | null} [signup_token]
|
|
549
|
+
* @returns {AuthFlowKind}
|
|
550
|
+
*/
|
|
551
|
+
static signup(homeserver_public_key, signup_token) {
|
|
552
|
+
_assertClass(homeserver_public_key, PublicKey);
|
|
553
|
+
var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
554
|
+
var len0 = WASM_VECTOR_LEN;
|
|
555
|
+
const ret = wasm.authflowkind_signup(homeserver_public_key.__wbg_ptr, ptr0, len0);
|
|
556
|
+
return AuthFlowKind.__wrap(ret);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Get the intent of the authentication flow.
|
|
560
|
+
* # Returns
|
|
561
|
+
* * `"signin"` - If the authentication flow is a sign in flow.
|
|
562
|
+
* * `"signup"` - If the authentication flow is a sign up flow.
|
|
563
|
+
* @returns {string}
|
|
564
|
+
*/
|
|
565
|
+
get intent() {
|
|
566
|
+
let deferred1_0;
|
|
567
|
+
let deferred1_1;
|
|
568
|
+
try {
|
|
569
|
+
const ret = wasm.authflowkind_intent(this.__wbg_ptr);
|
|
570
|
+
deferred1_0 = ret[0];
|
|
571
|
+
deferred1_1 = ret[1];
|
|
572
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
573
|
+
} finally {
|
|
574
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if (Symbol.dispose) AuthFlowKind.prototype[Symbol.dispose] = AuthFlowKind.prototype.free;
|
|
579
|
+
|
|
580
|
+
exports.AuthFlowKind = AuthFlowKind;
|
|
498
581
|
|
|
499
582
|
const AuthTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
500
583
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -515,7 +598,7 @@ const AuthTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
515
598
|
* const token = await flow.awaitToken();
|
|
516
599
|
*
|
|
517
600
|
* // Identify the user
|
|
518
|
-
* console.log(token.publicKey().
|
|
601
|
+
* console.log(token.publicKey().toString());
|
|
519
602
|
*
|
|
520
603
|
* // Optionally forward to a server for verification:
|
|
521
604
|
* await fetch("/api/verify", { method: "POST", body: token.toBytes() });
|
|
@@ -560,7 +643,7 @@ class AuthToken {
|
|
|
560
643
|
* export async function POST(req) {
|
|
561
644
|
* const bytes = new Uint8Array(await req.arrayBuffer());
|
|
562
645
|
* const token = AuthToken.verify(bytes); // throws on failure
|
|
563
|
-
* return new Response(token.publicKey().
|
|
646
|
+
* return new Response(token.publicKey().toString(), { status: 200 });
|
|
564
647
|
* }
|
|
565
648
|
* ```
|
|
566
649
|
* @param {Uint8Array} bytes
|
|
@@ -593,10 +676,11 @@ class AuthToken {
|
|
|
593
676
|
/**
|
|
594
677
|
* Returns the **public key** that authenticated with this token.
|
|
595
678
|
*
|
|
596
|
-
* Use `.
|
|
679
|
+
* Use `.toString()` on the returned `PublicKey` to get the `pubky<z32>` identifier.
|
|
680
|
+
* Call `.z32()` when you specifically need the raw z-base32 value (e.g. hostnames).
|
|
597
681
|
*
|
|
598
682
|
* @example
|
|
599
|
-
* const who =
|
|
683
|
+
* const who = token.publicKey.toString();
|
|
600
684
|
* @returns {PublicKey}
|
|
601
685
|
*/
|
|
602
686
|
get publicKey() {
|
|
@@ -611,7 +695,7 @@ class AuthToken {
|
|
|
611
695
|
*
|
|
612
696
|
* Returns: `string[]`, where each item is the canonical entry `"<scope>:<actions>"`.
|
|
613
697
|
*
|
|
614
|
-
* Example entry: `"/pub/my
|
|
698
|
+
* Example entry: `"/pub/my-cool-app/:rw"`
|
|
615
699
|
* @returns {string[]}
|
|
616
700
|
*/
|
|
617
701
|
get capabilities() {
|
|
@@ -636,7 +720,9 @@ class AuthToken {
|
|
|
636
720
|
return ret;
|
|
637
721
|
}
|
|
638
722
|
}
|
|
639
|
-
|
|
723
|
+
if (Symbol.dispose) AuthToken.prototype[Symbol.dispose] = AuthToken.prototype.free;
|
|
724
|
+
|
|
725
|
+
exports.AuthToken = AuthToken;
|
|
640
726
|
|
|
641
727
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
642
728
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -748,7 +834,9 @@ class Client {
|
|
|
748
834
|
return Client.__wrap(ret[0]);
|
|
749
835
|
}
|
|
750
836
|
}
|
|
751
|
-
|
|
837
|
+
if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
|
|
838
|
+
|
|
839
|
+
exports.Client = Client;
|
|
752
840
|
|
|
753
841
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
754
842
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -800,7 +888,9 @@ class IntoUnderlyingByteSource {
|
|
|
800
888
|
wasm.intounderlyingbytesource_cancel(ptr);
|
|
801
889
|
}
|
|
802
890
|
}
|
|
803
|
-
|
|
891
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
892
|
+
|
|
893
|
+
exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
|
|
804
894
|
|
|
805
895
|
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
806
896
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -845,7 +935,9 @@ class IntoUnderlyingSink {
|
|
|
845
935
|
return ret;
|
|
846
936
|
}
|
|
847
937
|
}
|
|
848
|
-
|
|
938
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
939
|
+
|
|
940
|
+
exports.IntoUnderlyingSink = IntoUnderlyingSink;
|
|
849
941
|
|
|
850
942
|
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
851
943
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -885,7 +977,9 @@ class IntoUnderlyingSource {
|
|
|
885
977
|
wasm.intounderlyingsource_cancel(ptr);
|
|
886
978
|
}
|
|
887
979
|
}
|
|
888
|
-
|
|
980
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
981
|
+
|
|
982
|
+
exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
889
983
|
|
|
890
984
|
const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
891
985
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -921,34 +1015,36 @@ class Keypair {
|
|
|
921
1015
|
return Keypair.__wrap(ret);
|
|
922
1016
|
}
|
|
923
1017
|
/**
|
|
924
|
-
* Generate a [Keypair] from a secret
|
|
925
|
-
* @param {Uint8Array}
|
|
1018
|
+
* Generate a [Keypair] from a 32-byte secret.
|
|
1019
|
+
* @param {Uint8Array} secret
|
|
926
1020
|
* @returns {Keypair}
|
|
927
1021
|
*/
|
|
928
|
-
static
|
|
929
|
-
const ptr0 = passArray8ToWasm0(
|
|
1022
|
+
static fromSecret(secret) {
|
|
1023
|
+
const ptr0 = passArray8ToWasm0(secret, wasm.__wbindgen_malloc);
|
|
930
1024
|
const len0 = WASM_VECTOR_LEN;
|
|
931
|
-
const ret = wasm.
|
|
1025
|
+
const ret = wasm.keypair_fromSecret(ptr0, len0);
|
|
932
1026
|
if (ret[2]) {
|
|
933
1027
|
throw takeFromExternrefTable0(ret[1]);
|
|
934
1028
|
}
|
|
935
1029
|
return Keypair.__wrap(ret[0]);
|
|
936
1030
|
}
|
|
937
1031
|
/**
|
|
938
|
-
* Returns the secret
|
|
1032
|
+
* Returns the secret of this keypair.
|
|
939
1033
|
* @returns {Uint8Array}
|
|
940
1034
|
*/
|
|
941
|
-
|
|
942
|
-
const ret = wasm.
|
|
1035
|
+
secret() {
|
|
1036
|
+
const ret = wasm.keypair_secret(this.__wbg_ptr);
|
|
943
1037
|
return ret;
|
|
944
1038
|
}
|
|
945
1039
|
/**
|
|
946
1040
|
* Returns the [PublicKey] of this keypair.
|
|
947
1041
|
*
|
|
948
|
-
* Use `.
|
|
1042
|
+
* Use `.toString()` on the returned `PublicKey` to get the string form
|
|
1043
|
+
* or `.z32()` to get the z32 string form without prefix.
|
|
1044
|
+
* Transport/storage (query params, headers, persistence) should use `.z32()`.
|
|
949
1045
|
*
|
|
950
1046
|
* @example
|
|
951
|
-
* const who = keypair.publicKey.
|
|
1047
|
+
* const who = keypair.publicKey.toString();
|
|
952
1048
|
* @returns {PublicKey}
|
|
953
1049
|
*/
|
|
954
1050
|
get publicKey() {
|
|
@@ -984,7 +1080,9 @@ class Keypair {
|
|
|
984
1080
|
return Keypair.__wrap(ret[0]);
|
|
985
1081
|
}
|
|
986
1082
|
}
|
|
987
|
-
|
|
1083
|
+
if (Symbol.dispose) Keypair.prototype[Symbol.dispose] = Keypair.prototype.free;
|
|
1084
|
+
|
|
1085
|
+
exports.Keypair = Keypair;
|
|
988
1086
|
|
|
989
1087
|
const PkdnsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
990
1088
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1100,7 +1198,9 @@ class Pkdns {
|
|
|
1100
1198
|
return ret;
|
|
1101
1199
|
}
|
|
1102
1200
|
}
|
|
1103
|
-
|
|
1201
|
+
if (Symbol.dispose) Pkdns.prototype[Symbol.dispose] = Pkdns.prototype.free;
|
|
1202
|
+
|
|
1203
|
+
exports.Pkdns = Pkdns;
|
|
1104
1204
|
|
|
1105
1205
|
const PubkyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1106
1206
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1132,6 +1232,10 @@ class Pubky {
|
|
|
1132
1232
|
/**
|
|
1133
1233
|
* Create a Pubky facade wired for **mainnet** defaults (public relays).
|
|
1134
1234
|
*
|
|
1235
|
+
* Prefer to instantiate only once and use trough your application a single shared `Pubky`
|
|
1236
|
+
* instead of constructing one per request. This avoids reinitializing transports and keeps
|
|
1237
|
+
* the same client available for repeated usage.
|
|
1238
|
+
*
|
|
1135
1239
|
* @returns {Pubky}
|
|
1136
1240
|
* A new facade instance. Use this to create signers, start auth flows, etc.
|
|
1137
1241
|
*
|
|
@@ -1195,11 +1299,15 @@ class Pubky {
|
|
|
1195
1299
|
* Provide a **capabilities string** and (optionally) a relay base URL.
|
|
1196
1300
|
* The capabilities string is a comma-separated list of entries:
|
|
1197
1301
|
* `"<scope>:<actions>"`, where:
|
|
1198
|
-
* - `scope` starts with `/` (e.g. `/pub/example.
|
|
1302
|
+
* - `scope` starts with `/` (e.g. `/pub/example.com/`).
|
|
1199
1303
|
* - `actions` is any combo of `r` and/or `w` (order normalized; `wr` -> `rw`).
|
|
1200
1304
|
* Pass `""` for no scopes (read-only public session).
|
|
1201
1305
|
*
|
|
1202
1306
|
* @param {string} capabilities Comma-separated caps, e.g. `"/pub/app/:rw,/pub/foo/file:r"`.
|
|
1307
|
+
* @param {AuthFlowKind} kind The kind of authentication flow to perform.
|
|
1308
|
+
* Examples:
|
|
1309
|
+
* - `AuthFlowKind.signin()` - Sign in to an existing account.
|
|
1310
|
+
* - `AuthFlowKind.signup(homeserverPublicKey, signupToken)` - Sign up for a new account.
|
|
1203
1311
|
* @param {string=} relay Optional HTTP relay base (e.g. `"https://…/link/"`).
|
|
1204
1312
|
* @returns {AuthFlow}
|
|
1205
1313
|
* A running auth flow. Show `authorizationUrl` as QR/deeplink,
|
|
@@ -1210,19 +1318,22 @@ class Pubky {
|
|
|
1210
1318
|
* - `{ name: "RequestError" }` if the flow cannot be started (network/relay)
|
|
1211
1319
|
*
|
|
1212
1320
|
* @example
|
|
1213
|
-
* const flow = pubky.startAuthFlow("/pub/my
|
|
1321
|
+
* const flow = pubky.startAuthFlow("/pub/my-cool-app/:rw");
|
|
1214
1322
|
* renderQr(flow.authorizationUrl);
|
|
1215
1323
|
* const session = await flow.awaitApproval();
|
|
1216
1324
|
* @param {Capabilities} capabilities
|
|
1325
|
+
* @param {AuthFlowKind} kind
|
|
1217
1326
|
* @param {string | null} [relay]
|
|
1218
1327
|
* @returns {AuthFlow}
|
|
1219
1328
|
*/
|
|
1220
|
-
startAuthFlow(capabilities, relay) {
|
|
1329
|
+
startAuthFlow(capabilities, kind, relay) {
|
|
1221
1330
|
const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1222
1331
|
const len0 = WASM_VECTOR_LEN;
|
|
1223
|
-
|
|
1224
|
-
var
|
|
1225
|
-
|
|
1332
|
+
_assertClass(kind, AuthFlowKind);
|
|
1333
|
+
var ptr1 = kind.__destroy_into_raw();
|
|
1334
|
+
var ptr2 = isLikeNone(relay) ? 0 : passStringToWasm0(relay, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1335
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1336
|
+
const ret = wasm.pubky_startAuthFlow(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2);
|
|
1226
1337
|
if (ret[2]) {
|
|
1227
1338
|
throw takeFromExternrefTable0(ret[1]);
|
|
1228
1339
|
}
|
|
@@ -1249,12 +1360,12 @@ class Pubky {
|
|
|
1249
1360
|
* Public, unauthenticated storage API.
|
|
1250
1361
|
*
|
|
1251
1362
|
* Use for **read-only** public access via addressed paths:
|
|
1252
|
-
* `"<user
|
|
1363
|
+
* `"pubky<user>/pub/…"`.
|
|
1253
1364
|
*
|
|
1254
1365
|
* @returns {PublicStorage}
|
|
1255
1366
|
*
|
|
1256
1367
|
* @example
|
|
1257
|
-
* const text = await pubky.publicStorage.getText(`${userPk.
|
|
1368
|
+
* const text = await pubky.publicStorage.getText(`${userPk.toString()}/pub/example.com/hello.txt`);
|
|
1258
1369
|
* @returns {PublicStorage}
|
|
1259
1370
|
*/
|
|
1260
1371
|
get publicStorage() {
|
|
@@ -1267,7 +1378,7 @@ class Pubky {
|
|
|
1267
1378
|
* Uses an internal read-only Pkdns actor.
|
|
1268
1379
|
*
|
|
1269
1380
|
* @param {PublicKey} user
|
|
1270
|
-
* @returns {Promise<PublicKey|undefined>} Homeserver public key
|
|
1381
|
+
* @returns {Promise<PublicKey|undefined>} Homeserver public key or `undefined` if not found.
|
|
1271
1382
|
* @param {PublicKey} user_public_key
|
|
1272
1383
|
* @returns {Promise<PublicKey | undefined>}
|
|
1273
1384
|
*/
|
|
@@ -1283,15 +1394,38 @@ class Pubky {
|
|
|
1283
1394
|
* Use this for low-level `fetch()` calls or testing with raw URLs.
|
|
1284
1395
|
*
|
|
1285
1396
|
* @example
|
|
1286
|
-
* const r = await pubky.client.fetch(`pubky://${
|
|
1397
|
+
* const r = await pubky.client.fetch(`pubky://${userPk.z32()}/pub/app/file.txt`, { credentials: "include" });
|
|
1287
1398
|
* @returns {Client}
|
|
1288
1399
|
*/
|
|
1289
1400
|
get client() {
|
|
1290
1401
|
const ret = wasm.pubky_client(this.__wbg_ptr);
|
|
1291
1402
|
return Client.__wrap(ret);
|
|
1292
1403
|
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Restore a session from a previously exported snapshot, using this instance's client.
|
|
1406
|
+
*
|
|
1407
|
+
* This does **not** read or write any secrets. It revalidates the session metadata with
|
|
1408
|
+
* the server using the browser-managed HTTP-only cookie that must still be present.
|
|
1409
|
+
*
|
|
1410
|
+
* @param {string} exported A string produced by `session.export()`.
|
|
1411
|
+
* @returns {Promise<Session>}
|
|
1412
|
+
* A rehydrated session bound to this SDK's HTTP client.
|
|
1413
|
+
*
|
|
1414
|
+
* @example
|
|
1415
|
+
* const restored = await pubky.restoreSession(localStorage.getItem("pubky-session")!);
|
|
1416
|
+
* @param {string} exported
|
|
1417
|
+
* @returns {Promise<Session>}
|
|
1418
|
+
*/
|
|
1419
|
+
restoreSession(exported) {
|
|
1420
|
+
const ptr0 = passStringToWasm0(exported, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1421
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1422
|
+
const ret = wasm.pubky_restoreSession(this.__wbg_ptr, ptr0, len0);
|
|
1423
|
+
return ret;
|
|
1424
|
+
}
|
|
1293
1425
|
}
|
|
1294
|
-
|
|
1426
|
+
if (Symbol.dispose) Pubky.prototype[Symbol.dispose] = Pubky.prototype.free;
|
|
1427
|
+
|
|
1428
|
+
exports.Pubky = Pubky;
|
|
1295
1429
|
|
|
1296
1430
|
const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1297
1431
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1342,6 +1476,23 @@ class PublicKey {
|
|
|
1342
1476
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1343
1477
|
}
|
|
1344
1478
|
}
|
|
1479
|
+
/**
|
|
1480
|
+
* Returns the identifier form with the `pubky` prefix.
|
|
1481
|
+
* Use for display only; transport/storage should use `.z32()`.
|
|
1482
|
+
* @returns {string}
|
|
1483
|
+
*/
|
|
1484
|
+
toString() {
|
|
1485
|
+
let deferred1_0;
|
|
1486
|
+
let deferred1_1;
|
|
1487
|
+
try {
|
|
1488
|
+
const ret = wasm.publickey_toString(this.__wbg_ptr);
|
|
1489
|
+
deferred1_0 = ret[0];
|
|
1490
|
+
deferred1_1 = ret[1];
|
|
1491
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1492
|
+
} finally {
|
|
1493
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1345
1496
|
/**
|
|
1346
1497
|
* @throws
|
|
1347
1498
|
* @param {string} value
|
|
@@ -1357,13 +1508,15 @@ class PublicKey {
|
|
|
1357
1508
|
return PublicKey.__wrap(ret[0]);
|
|
1358
1509
|
}
|
|
1359
1510
|
}
|
|
1360
|
-
|
|
1511
|
+
if (Symbol.dispose) PublicKey.prototype[Symbol.dispose] = PublicKey.prototype.free;
|
|
1512
|
+
|
|
1513
|
+
exports.PublicKey = PublicKey;
|
|
1361
1514
|
|
|
1362
1515
|
const PublicStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1363
1516
|
? { register: () => {}, unregister: () => {} }
|
|
1364
1517
|
: new FinalizationRegistry(ptr => wasm.__wbg_publicstorage_free(ptr >>> 0, 1));
|
|
1365
1518
|
/**
|
|
1366
|
-
* Read-only public storage using addressed paths (`"<user
|
|
1519
|
+
* Read-only public storage using addressed paths (`"pubky<user>/pub/..."`).
|
|
1367
1520
|
*/
|
|
1368
1521
|
class PublicStorage {
|
|
1369
1522
|
|
|
@@ -1508,7 +1661,74 @@ class PublicStorage {
|
|
|
1508
1661
|
return ret;
|
|
1509
1662
|
}
|
|
1510
1663
|
}
|
|
1511
|
-
|
|
1664
|
+
if (Symbol.dispose) PublicStorage.prototype[Symbol.dispose] = PublicStorage.prototype.free;
|
|
1665
|
+
|
|
1666
|
+
exports.PublicStorage = PublicStorage;
|
|
1667
|
+
|
|
1668
|
+
const SeedExportDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1669
|
+
? { register: () => {}, unregister: () => {} }
|
|
1670
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr >>> 0, 1));
|
|
1671
|
+
|
|
1672
|
+
class SeedExportDeepLink {
|
|
1673
|
+
|
|
1674
|
+
static __wrap(ptr) {
|
|
1675
|
+
ptr = ptr >>> 0;
|
|
1676
|
+
const obj = Object.create(SeedExportDeepLink.prototype);
|
|
1677
|
+
obj.__wbg_ptr = ptr;
|
|
1678
|
+
SeedExportDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1679
|
+
return obj;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
__destroy_into_raw() {
|
|
1683
|
+
const ptr = this.__wbg_ptr;
|
|
1684
|
+
this.__wbg_ptr = 0;
|
|
1685
|
+
SeedExportDeepLinkFinalization.unregister(this);
|
|
1686
|
+
return ptr;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
free() {
|
|
1690
|
+
const ptr = this.__destroy_into_raw();
|
|
1691
|
+
wasm.__wbg_seedexportdeeplink_free(ptr, 0);
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* @param {string} url
|
|
1695
|
+
* @returns {SeedExportDeepLink}
|
|
1696
|
+
*/
|
|
1697
|
+
static parse(url) {
|
|
1698
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1700
|
+
const ret = wasm.seedexportdeeplink_parse(ptr0, len0);
|
|
1701
|
+
if (ret[2]) {
|
|
1702
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1703
|
+
}
|
|
1704
|
+
return SeedExportDeepLink.__wrap(ret[0]);
|
|
1705
|
+
}
|
|
1706
|
+
/**
|
|
1707
|
+
* @returns {Uint8Array}
|
|
1708
|
+
*/
|
|
1709
|
+
get secret() {
|
|
1710
|
+
const ret = wasm.seedexportdeeplink_secret(this.__wbg_ptr);
|
|
1711
|
+
return ret;
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* @returns {string}
|
|
1715
|
+
*/
|
|
1716
|
+
toString() {
|
|
1717
|
+
let deferred1_0;
|
|
1718
|
+
let deferred1_1;
|
|
1719
|
+
try {
|
|
1720
|
+
const ret = wasm.seedexportdeeplink_toString(this.__wbg_ptr);
|
|
1721
|
+
deferred1_0 = ret[0];
|
|
1722
|
+
deferred1_1 = ret[1];
|
|
1723
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1724
|
+
} finally {
|
|
1725
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
if (Symbol.dispose) SeedExportDeepLink.prototype[Symbol.dispose] = SeedExportDeepLink.prototype.free;
|
|
1730
|
+
|
|
1731
|
+
exports.SeedExportDeepLink = SeedExportDeepLink;
|
|
1512
1732
|
|
|
1513
1733
|
const SessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1514
1734
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1570,19 +1790,69 @@ class Session {
|
|
|
1570
1790
|
const ret = wasm.session_signout(this.__wbg_ptr);
|
|
1571
1791
|
return ret;
|
|
1572
1792
|
}
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1793
|
+
/**
|
|
1794
|
+
* Export the session metadata so it can be restored after a tab refresh.
|
|
1795
|
+
*
|
|
1796
|
+
* The export string contains **no secrets**; it only serializes the public `SessionInfo`.
|
|
1797
|
+
* Browsers remain responsible for persisting the HTTP-only session cookie.
|
|
1798
|
+
*
|
|
1799
|
+
* @returns {string}
|
|
1800
|
+
* A base64 string to store (e.g. in `localStorage`).
|
|
1801
|
+
* @returns {string}
|
|
1802
|
+
*/
|
|
1803
|
+
export() {
|
|
1804
|
+
let deferred1_0;
|
|
1805
|
+
let deferred1_1;
|
|
1806
|
+
try {
|
|
1807
|
+
const ret = wasm.session_export(this.__wbg_ptr);
|
|
1808
|
+
deferred1_0 = ret[0];
|
|
1809
|
+
deferred1_1 = ret[1];
|
|
1810
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1811
|
+
} finally {
|
|
1812
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Restore a session from an `export()` string.
|
|
1817
|
+
*
|
|
1818
|
+
* The HTTP-only cookie must still be present in the browser; this function does not
|
|
1819
|
+
* read or write any secrets.
|
|
1820
|
+
*
|
|
1821
|
+
* @param {string} exported
|
|
1822
|
+
* A string produced by `session.export()`.
|
|
1823
|
+
* @param {Client=} client
|
|
1824
|
+
* Optional client to reuse transport configuration.
|
|
1825
|
+
* @returns {Promise<Session>}
|
|
1826
|
+
* @param {string} exported
|
|
1827
|
+
* @param {Client | null} [client]
|
|
1828
|
+
* @returns {Promise<Session>}
|
|
1829
|
+
*/
|
|
1830
|
+
static restore(exported, client) {
|
|
1831
|
+
const ptr0 = passStringToWasm0(exported, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1832
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1833
|
+
let ptr1 = 0;
|
|
1834
|
+
if (!isLikeNone(client)) {
|
|
1835
|
+
_assertClass(client, Client);
|
|
1836
|
+
ptr1 = client.__destroy_into_raw();
|
|
1837
|
+
}
|
|
1838
|
+
const ret = wasm.session_restore(ptr0, len0, ptr1);
|
|
1839
|
+
return ret;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
if (Symbol.dispose) Session.prototype[Symbol.dispose] = Session.prototype.free;
|
|
1843
|
+
|
|
1844
|
+
exports.Session = Session;
|
|
1845
|
+
|
|
1846
|
+
const SessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1847
|
+
? { register: () => {}, unregister: () => {} }
|
|
1848
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sessioninfo_free(ptr >>> 0, 1));
|
|
1849
|
+
/**
|
|
1850
|
+
* Static snapshot of session metadata.
|
|
1851
|
+
*/
|
|
1852
|
+
class SessionInfo {
|
|
1853
|
+
|
|
1854
|
+
static __wrap(ptr) {
|
|
1855
|
+
ptr = ptr >>> 0;
|
|
1586
1856
|
const obj = Object.create(SessionInfo.prototype);
|
|
1587
1857
|
obj.__wbg_ptr = ptr;
|
|
1588
1858
|
SessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -1603,12 +1873,13 @@ class SessionInfo {
|
|
|
1603
1873
|
/**
|
|
1604
1874
|
* The user’s public key for this session.
|
|
1605
1875
|
*
|
|
1606
|
-
* Use `.
|
|
1876
|
+
* Use `.toString()` on the returned `PublicKey` to get the `pubky<z32>` identifier.
|
|
1877
|
+
* Call `.z32()` when you specifically need the raw z-base32 value (e.g. hostnames).
|
|
1607
1878
|
*
|
|
1608
1879
|
* @returns {PublicKey}
|
|
1609
1880
|
*
|
|
1610
1881
|
* @example
|
|
1611
|
-
* const who = sessionInfo.publicKey.
|
|
1882
|
+
* const who = sessionInfo.publicKey.toString();
|
|
1612
1883
|
* @returns {PublicKey}
|
|
1613
1884
|
*/
|
|
1614
1885
|
get publicKey() {
|
|
@@ -1628,7 +1899,9 @@ class SessionInfo {
|
|
|
1628
1899
|
return v1;
|
|
1629
1900
|
}
|
|
1630
1901
|
}
|
|
1631
|
-
|
|
1902
|
+
if (Symbol.dispose) SessionInfo.prototype[Symbol.dispose] = SessionInfo.prototype.free;
|
|
1903
|
+
|
|
1904
|
+
exports.SessionInfo = SessionInfo;
|
|
1632
1905
|
|
|
1633
1906
|
const SessionStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1634
1907
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1833,7 +2106,9 @@ class SessionStorage {
|
|
|
1833
2106
|
return ret;
|
|
1834
2107
|
}
|
|
1835
2108
|
}
|
|
1836
|
-
|
|
2109
|
+
if (Symbol.dispose) SessionStorage.prototype[Symbol.dispose] = SessionStorage.prototype.free;
|
|
2110
|
+
|
|
2111
|
+
exports.SessionStorage = SessionStorage;
|
|
1837
2112
|
|
|
1838
2113
|
const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1839
2114
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1966,14 +2241,225 @@ class Signer {
|
|
|
1966
2241
|
return Pkdns.__wrap(ret);
|
|
1967
2242
|
}
|
|
1968
2243
|
}
|
|
1969
|
-
|
|
2244
|
+
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
2245
|
+
|
|
2246
|
+
exports.Signer = Signer;
|
|
2247
|
+
|
|
2248
|
+
const SigninDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2249
|
+
? { register: () => {}, unregister: () => {} }
|
|
2250
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr >>> 0, 1));
|
|
2251
|
+
|
|
2252
|
+
class SigninDeepLink {
|
|
2253
|
+
|
|
2254
|
+
static __wrap(ptr) {
|
|
2255
|
+
ptr = ptr >>> 0;
|
|
2256
|
+
const obj = Object.create(SigninDeepLink.prototype);
|
|
2257
|
+
obj.__wbg_ptr = ptr;
|
|
2258
|
+
SigninDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2259
|
+
return obj;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
__destroy_into_raw() {
|
|
2263
|
+
const ptr = this.__wbg_ptr;
|
|
2264
|
+
this.__wbg_ptr = 0;
|
|
2265
|
+
SigninDeepLinkFinalization.unregister(this);
|
|
2266
|
+
return ptr;
|
|
2267
|
+
}
|
|
1970
2268
|
|
|
1971
|
-
|
|
2269
|
+
free() {
|
|
2270
|
+
const ptr = this.__destroy_into_raw();
|
|
2271
|
+
wasm.__wbg_signindeeplink_free(ptr, 0);
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* @param {string} url
|
|
2275
|
+
* @returns {SigninDeepLink}
|
|
2276
|
+
*/
|
|
2277
|
+
static parse(url) {
|
|
2278
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2279
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2280
|
+
const ret = wasm.signindeeplink_parse(ptr0, len0);
|
|
2281
|
+
if (ret[2]) {
|
|
2282
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2283
|
+
}
|
|
2284
|
+
return SigninDeepLink.__wrap(ret[0]);
|
|
2285
|
+
}
|
|
2286
|
+
/**
|
|
2287
|
+
* @returns {string}
|
|
2288
|
+
*/
|
|
2289
|
+
get capabilities() {
|
|
2290
|
+
let deferred1_0;
|
|
2291
|
+
let deferred1_1;
|
|
2292
|
+
try {
|
|
2293
|
+
const ret = wasm.signindeeplink_capabilities(this.__wbg_ptr);
|
|
2294
|
+
deferred1_0 = ret[0];
|
|
2295
|
+
deferred1_1 = ret[1];
|
|
2296
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2297
|
+
} finally {
|
|
2298
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* @returns {string}
|
|
2303
|
+
*/
|
|
2304
|
+
get baseRelayUrl() {
|
|
2305
|
+
let deferred1_0;
|
|
2306
|
+
let deferred1_1;
|
|
2307
|
+
try {
|
|
2308
|
+
const ret = wasm.signindeeplink_baseRelayUrl(this.__wbg_ptr);
|
|
2309
|
+
deferred1_0 = ret[0];
|
|
2310
|
+
deferred1_1 = ret[1];
|
|
2311
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2312
|
+
} finally {
|
|
2313
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* @returns {Uint8Array}
|
|
2318
|
+
*/
|
|
2319
|
+
get secret() {
|
|
2320
|
+
const ret = wasm.signindeeplink_secret(this.__wbg_ptr);
|
|
2321
|
+
return ret;
|
|
2322
|
+
}
|
|
2323
|
+
/**
|
|
2324
|
+
* @returns {string}
|
|
2325
|
+
*/
|
|
2326
|
+
toString() {
|
|
2327
|
+
let deferred1_0;
|
|
2328
|
+
let deferred1_1;
|
|
2329
|
+
try {
|
|
2330
|
+
const ret = wasm.signindeeplink_toString(this.__wbg_ptr);
|
|
2331
|
+
deferred1_0 = ret[0];
|
|
2332
|
+
deferred1_1 = ret[1];
|
|
2333
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2334
|
+
} finally {
|
|
2335
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
if (Symbol.dispose) SigninDeepLink.prototype[Symbol.dispose] = SigninDeepLink.prototype.free;
|
|
2340
|
+
|
|
2341
|
+
exports.SigninDeepLink = SigninDeepLink;
|
|
2342
|
+
|
|
2343
|
+
const SignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2344
|
+
? { register: () => {}, unregister: () => {} }
|
|
2345
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr >>> 0, 1));
|
|
2346
|
+
|
|
2347
|
+
class SignupDeepLink {
|
|
2348
|
+
|
|
2349
|
+
static __wrap(ptr) {
|
|
2350
|
+
ptr = ptr >>> 0;
|
|
2351
|
+
const obj = Object.create(SignupDeepLink.prototype);
|
|
2352
|
+
obj.__wbg_ptr = ptr;
|
|
2353
|
+
SignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2354
|
+
return obj;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
__destroy_into_raw() {
|
|
2358
|
+
const ptr = this.__wbg_ptr;
|
|
2359
|
+
this.__wbg_ptr = 0;
|
|
2360
|
+
SignupDeepLinkFinalization.unregister(this);
|
|
2361
|
+
return ptr;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
free() {
|
|
2365
|
+
const ptr = this.__destroy_into_raw();
|
|
2366
|
+
wasm.__wbg_signupdeeplink_free(ptr, 0);
|
|
2367
|
+
}
|
|
2368
|
+
/**
|
|
2369
|
+
* @param {string} url
|
|
2370
|
+
* @returns {SignupDeepLink}
|
|
2371
|
+
*/
|
|
2372
|
+
static parse(url) {
|
|
2373
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2374
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2375
|
+
const ret = wasm.signupdeeplink_parse(ptr0, len0);
|
|
2376
|
+
if (ret[2]) {
|
|
2377
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2378
|
+
}
|
|
2379
|
+
return SignupDeepLink.__wrap(ret[0]);
|
|
2380
|
+
}
|
|
2381
|
+
/**
|
|
2382
|
+
* @returns {string}
|
|
2383
|
+
*/
|
|
2384
|
+
get capabilities() {
|
|
2385
|
+
let deferred1_0;
|
|
2386
|
+
let deferred1_1;
|
|
2387
|
+
try {
|
|
2388
|
+
const ret = wasm.signupdeeplink_capabilities(this.__wbg_ptr);
|
|
2389
|
+
deferred1_0 = ret[0];
|
|
2390
|
+
deferred1_1 = ret[1];
|
|
2391
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2392
|
+
} finally {
|
|
2393
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
/**
|
|
2397
|
+
* @returns {string}
|
|
2398
|
+
*/
|
|
2399
|
+
get baseRelayUrl() {
|
|
2400
|
+
let deferred1_0;
|
|
2401
|
+
let deferred1_1;
|
|
2402
|
+
try {
|
|
2403
|
+
const ret = wasm.signupdeeplink_baseRelayUrl(this.__wbg_ptr);
|
|
2404
|
+
deferred1_0 = ret[0];
|
|
2405
|
+
deferred1_1 = ret[1];
|
|
2406
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2407
|
+
} finally {
|
|
2408
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2412
|
+
* @returns {Uint8Array}
|
|
2413
|
+
*/
|
|
2414
|
+
get secret() {
|
|
2415
|
+
const ret = wasm.signupdeeplink_secret(this.__wbg_ptr);
|
|
2416
|
+
return ret;
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* @returns {PublicKey}
|
|
2420
|
+
*/
|
|
2421
|
+
get homeserver() {
|
|
2422
|
+
const ret = wasm.signupdeeplink_homeserver(this.__wbg_ptr);
|
|
2423
|
+
return PublicKey.__wrap(ret);
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* @returns {string | undefined}
|
|
2427
|
+
*/
|
|
2428
|
+
get signupToken() {
|
|
2429
|
+
const ret = wasm.signupdeeplink_signupToken(this.__wbg_ptr);
|
|
2430
|
+
let v1;
|
|
2431
|
+
if (ret[0] !== 0) {
|
|
2432
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
2433
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2434
|
+
}
|
|
2435
|
+
return v1;
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* @returns {string}
|
|
2439
|
+
*/
|
|
2440
|
+
toString() {
|
|
2441
|
+
let deferred1_0;
|
|
2442
|
+
let deferred1_1;
|
|
2443
|
+
try {
|
|
2444
|
+
const ret = wasm.signupdeeplink_toString(this.__wbg_ptr);
|
|
2445
|
+
deferred1_0 = ret[0];
|
|
2446
|
+
deferred1_1 = ret[1];
|
|
2447
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2448
|
+
} finally {
|
|
2449
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
if (Symbol.dispose) SignupDeepLink.prototype[Symbol.dispose] = SignupDeepLink.prototype.free;
|
|
2454
|
+
|
|
2455
|
+
exports.SignupDeepLink = SignupDeepLink;
|
|
2456
|
+
|
|
2457
|
+
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
1972
2458
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1973
2459
|
return ret;
|
|
1974
2460
|
};
|
|
1975
2461
|
|
|
1976
|
-
|
|
2462
|
+
exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1977
2463
|
const ret = String(arg1);
|
|
1978
2464
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1979
2465
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1981,186 +2467,272 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
|
1981
2467
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1982
2468
|
};
|
|
1983
2469
|
|
|
1984
|
-
|
|
1985
|
-
|
|
2470
|
+
exports.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
2471
|
+
const v = arg1;
|
|
2472
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
2473
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2474
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
exports.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
2478
|
+
const v = arg0;
|
|
2479
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
2480
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1986
2481
|
};
|
|
1987
2482
|
|
|
1988
|
-
|
|
2483
|
+
exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
2484
|
+
const ret = debugString(arg1);
|
|
2485
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2486
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2487
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2488
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
exports.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
2492
|
+
const ret = arg0 in arg1;
|
|
2493
|
+
return ret;
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
exports.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
2497
|
+
const ret = typeof(arg0) === 'bigint';
|
|
2498
|
+
return ret;
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
exports.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
2502
|
+
const ret = typeof(arg0) === 'function';
|
|
2503
|
+
return ret;
|
|
2504
|
+
};
|
|
2505
|
+
|
|
2506
|
+
exports.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
|
|
2507
|
+
const ret = arg0 === null;
|
|
2508
|
+
return ret;
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
exports.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
2512
|
+
const val = arg0;
|
|
2513
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2514
|
+
return ret;
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2517
|
+
exports.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
2518
|
+
const ret = typeof(arg0) === 'string';
|
|
2519
|
+
return ret;
|
|
2520
|
+
};
|
|
2521
|
+
|
|
2522
|
+
exports.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
2523
|
+
const ret = arg0 === undefined;
|
|
2524
|
+
return ret;
|
|
2525
|
+
};
|
|
2526
|
+
|
|
2527
|
+
exports.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
2528
|
+
const ret = arg0 === arg1;
|
|
2529
|
+
return ret;
|
|
2530
|
+
};
|
|
2531
|
+
|
|
2532
|
+
exports.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
2533
|
+
const ret = arg0 == arg1;
|
|
2534
|
+
return ret;
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2537
|
+
exports.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
2538
|
+
const obj = arg1;
|
|
2539
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2540
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2541
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2542
|
+
};
|
|
2543
|
+
|
|
2544
|
+
exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
2545
|
+
const obj = arg1;
|
|
2546
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2547
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2548
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2549
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2550
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2551
|
+
};
|
|
2552
|
+
|
|
2553
|
+
exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
2554
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
exports.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
2558
|
+
arg0._wbg_cb_unref();
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2561
|
+
exports.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
|
|
1989
2562
|
arg0.abort(arg1);
|
|
1990
2563
|
};
|
|
1991
2564
|
|
|
1992
|
-
|
|
2565
|
+
exports.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
|
|
2566
|
+
arg0.abort();
|
|
2567
|
+
};
|
|
2568
|
+
|
|
2569
|
+
exports.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1993
2570
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1994
2571
|
}, arguments) };
|
|
1995
2572
|
|
|
1996
|
-
|
|
2573
|
+
exports.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
|
|
1997
2574
|
const ret = arg0.arrayBuffer();
|
|
1998
2575
|
return ret;
|
|
1999
2576
|
}, arguments) };
|
|
2000
2577
|
|
|
2001
|
-
|
|
2578
|
+
exports.__wbg_authtoken_new = function(arg0) {
|
|
2002
2579
|
const ret = AuthToken.__wrap(arg0);
|
|
2003
2580
|
return ret;
|
|
2004
2581
|
};
|
|
2005
2582
|
|
|
2006
|
-
|
|
2583
|
+
exports.__wbg_body_587542b2fd8e06c0 = function(arg0) {
|
|
2007
2584
|
const ret = arg0.body;
|
|
2008
2585
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2009
2586
|
};
|
|
2010
2587
|
|
|
2011
|
-
|
|
2012
|
-
const ret = arg0.buffer;
|
|
2013
|
-
return ret;
|
|
2014
|
-
};
|
|
2015
|
-
|
|
2016
|
-
module.exports.__wbg_buffer_e495ba54cee589cc = function(arg0) {
|
|
2588
|
+
exports.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
|
|
2017
2589
|
const ret = arg0.buffer;
|
|
2018
2590
|
return ret;
|
|
2019
2591
|
};
|
|
2020
2592
|
|
|
2021
|
-
|
|
2593
|
+
exports.__wbg_byobRequest_2344e6975f27456e = function(arg0) {
|
|
2022
2594
|
const ret = arg0.byobRequest;
|
|
2023
2595
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2024
2596
|
};
|
|
2025
2597
|
|
|
2026
|
-
|
|
2598
|
+
exports.__wbg_byteLength_bcd42e4025299788 = function(arg0) {
|
|
2027
2599
|
const ret = arg0.byteLength;
|
|
2028
2600
|
return ret;
|
|
2029
2601
|
};
|
|
2030
2602
|
|
|
2031
|
-
|
|
2603
|
+
exports.__wbg_byteOffset_ca3a6cf7944b364b = function(arg0) {
|
|
2032
2604
|
const ret = arg0.byteOffset;
|
|
2033
2605
|
return ret;
|
|
2034
2606
|
};
|
|
2035
2607
|
|
|
2036
|
-
|
|
2608
|
+
exports.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2037
2609
|
const ret = arg0.call(arg1, arg2);
|
|
2038
2610
|
return ret;
|
|
2039
2611
|
}, arguments) };
|
|
2040
2612
|
|
|
2041
|
-
|
|
2613
|
+
exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
|
|
2042
2614
|
const ret = arg0.call(arg1);
|
|
2043
2615
|
return ret;
|
|
2044
2616
|
}, arguments) };
|
|
2045
2617
|
|
|
2046
|
-
|
|
2618
|
+
exports.__wbg_cancel_48ab6f9dc366e369 = function(arg0) {
|
|
2047
2619
|
const ret = arg0.cancel();
|
|
2048
2620
|
return ret;
|
|
2049
2621
|
};
|
|
2050
2622
|
|
|
2051
|
-
|
|
2623
|
+
exports.__wbg_catch_943836faa5d29bfb = function(arg0, arg1) {
|
|
2052
2624
|
const ret = arg0.catch(arg1);
|
|
2053
2625
|
return ret;
|
|
2054
2626
|
};
|
|
2055
2627
|
|
|
2056
|
-
|
|
2628
|
+
exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
|
|
2057
2629
|
const ret = clearTimeout(arg0);
|
|
2058
2630
|
return ret;
|
|
2059
2631
|
};
|
|
2060
2632
|
|
|
2061
|
-
|
|
2633
|
+
exports.__wbg_close_5a6caed3231b68cd = function() { return handleError(function (arg0) {
|
|
2062
2634
|
arg0.close();
|
|
2063
2635
|
}, arguments) };
|
|
2064
2636
|
|
|
2065
|
-
|
|
2637
|
+
exports.__wbg_close_6956df845478561a = function() { return handleError(function (arg0) {
|
|
2066
2638
|
arg0.close();
|
|
2067
2639
|
}, arguments) };
|
|
2068
2640
|
|
|
2069
|
-
|
|
2641
|
+
exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
2070
2642
|
const ret = arg0.crypto;
|
|
2071
2643
|
return ret;
|
|
2072
2644
|
};
|
|
2073
2645
|
|
|
2074
|
-
|
|
2646
|
+
exports.__wbg_debug_e55e1461940eb14d = function(arg0, arg1, arg2, arg3) {
|
|
2075
2647
|
console.debug(arg0, arg1, arg2, arg3);
|
|
2076
2648
|
};
|
|
2077
2649
|
|
|
2078
|
-
|
|
2650
|
+
exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
2079
2651
|
const ret = arg0.done;
|
|
2080
2652
|
return ret;
|
|
2081
2653
|
};
|
|
2082
2654
|
|
|
2083
|
-
|
|
2655
|
+
exports.__wbg_enqueue_7b18a650aec77898 = function() { return handleError(function (arg0, arg1) {
|
|
2084
2656
|
arg0.enqueue(arg1);
|
|
2085
2657
|
}, arguments) };
|
|
2086
2658
|
|
|
2087
|
-
|
|
2659
|
+
exports.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
2088
2660
|
const ret = Object.entries(arg0);
|
|
2089
2661
|
return ret;
|
|
2090
2662
|
};
|
|
2091
2663
|
|
|
2092
|
-
|
|
2664
|
+
exports.__wbg_error_d8b22cf4e59a6791 = function(arg0, arg1, arg2, arg3) {
|
|
2093
2665
|
console.error(arg0, arg1, arg2, arg3);
|
|
2094
2666
|
};
|
|
2095
2667
|
|
|
2096
|
-
|
|
2668
|
+
exports.__wbg_fetch_013f0d75d4254327 = function(arg0) {
|
|
2097
2669
|
const ret = fetch(arg0);
|
|
2098
2670
|
return ret;
|
|
2099
2671
|
};
|
|
2100
2672
|
|
|
2101
|
-
|
|
2102
|
-
const ret =
|
|
2673
|
+
exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
|
|
2674
|
+
const ret = fetch(arg0);
|
|
2103
2675
|
return ret;
|
|
2104
2676
|
};
|
|
2105
2677
|
|
|
2106
|
-
|
|
2107
|
-
const ret = fetch(
|
|
2678
|
+
exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
|
|
2679
|
+
const ret = arg0.fetch(arg1);
|
|
2108
2680
|
return ret;
|
|
2109
2681
|
};
|
|
2110
2682
|
|
|
2111
|
-
|
|
2683
|
+
exports.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
|
|
2112
2684
|
const ret = Array.from(arg0);
|
|
2113
2685
|
return ret;
|
|
2114
2686
|
};
|
|
2115
2687
|
|
|
2116
|
-
|
|
2688
|
+
exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
2117
2689
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
2118
2690
|
}, arguments) };
|
|
2119
2691
|
|
|
2120
|
-
|
|
2692
|
+
exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
2121
2693
|
arg0.getRandomValues(arg1);
|
|
2122
2694
|
}, arguments) };
|
|
2123
2695
|
|
|
2124
|
-
|
|
2696
|
+
exports.__wbg_getReader_48e00749fe3f6089 = function() { return handleError(function (arg0) {
|
|
2125
2697
|
const ret = arg0.getReader();
|
|
2126
2698
|
return ret;
|
|
2127
2699
|
}, arguments) };
|
|
2128
2700
|
|
|
2129
|
-
|
|
2130
|
-
const ret = Reflect.get(arg0, arg1);
|
|
2131
|
-
return ret;
|
|
2132
|
-
}, arguments) };
|
|
2133
|
-
|
|
2134
|
-
module.exports.__wbg_get_a131a44bd1eb6979 = function(arg0, arg1) {
|
|
2701
|
+
exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
2135
2702
|
const ret = arg0[arg1 >>> 0];
|
|
2136
2703
|
return ret;
|
|
2137
2704
|
};
|
|
2138
2705
|
|
|
2139
|
-
|
|
2706
|
+
exports.__wbg_get_done_a0463af43a1fc764 = function(arg0) {
|
|
2140
2707
|
const ret = arg0.done;
|
|
2141
2708
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
2142
2709
|
};
|
|
2143
2710
|
|
|
2144
|
-
|
|
2711
|
+
exports.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
|
|
2712
|
+
const ret = Reflect.get(arg0, arg1);
|
|
2713
|
+
return ret;
|
|
2714
|
+
}, arguments) };
|
|
2715
|
+
|
|
2716
|
+
exports.__wbg_get_value_5ce96c9f81ce7398 = function(arg0) {
|
|
2145
2717
|
const ret = arg0.value;
|
|
2146
2718
|
return ret;
|
|
2147
2719
|
};
|
|
2148
2720
|
|
|
2149
|
-
|
|
2721
|
+
exports.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
|
|
2150
2722
|
const ret = Reflect.has(arg0, arg1);
|
|
2151
2723
|
return ret;
|
|
2152
2724
|
}, arguments) };
|
|
2153
2725
|
|
|
2154
|
-
|
|
2726
|
+
exports.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
|
|
2155
2727
|
const ret = arg0.headers;
|
|
2156
2728
|
return ret;
|
|
2157
2729
|
};
|
|
2158
2730
|
|
|
2159
|
-
|
|
2731
|
+
exports.__wbg_info_68cd5b51ef7e5137 = function(arg0, arg1, arg2, arg3) {
|
|
2160
2732
|
console.info(arg0, arg1, arg2, arg3);
|
|
2161
2733
|
};
|
|
2162
2734
|
|
|
2163
|
-
|
|
2735
|
+
exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
2164
2736
|
let result;
|
|
2165
2737
|
try {
|
|
2166
2738
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -2171,7 +2743,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_a8b6f580b363f2bc = function(arg0) {
|
|
|
2171
2743
|
return ret;
|
|
2172
2744
|
};
|
|
2173
2745
|
|
|
2174
|
-
|
|
2746
|
+
exports.__wbg_instanceof_Error_a944ec10920129e2 = function(arg0) {
|
|
2175
2747
|
let result;
|
|
2176
2748
|
try {
|
|
2177
2749
|
result = arg0 instanceof Error;
|
|
@@ -2182,7 +2754,7 @@ module.exports.__wbg_instanceof_Error_58a92d81483a4b16 = function(arg0) {
|
|
|
2182
2754
|
return ret;
|
|
2183
2755
|
};
|
|
2184
2756
|
|
|
2185
|
-
|
|
2757
|
+
exports.__wbg_instanceof_Headers_e1daf97ed6a469e9 = function(arg0) {
|
|
2186
2758
|
let result;
|
|
2187
2759
|
try {
|
|
2188
2760
|
result = arg0 instanceof Headers;
|
|
@@ -2193,7 +2765,7 @@ module.exports.__wbg_instanceof_Headers_8b4c0df841a5ed48 = function(arg0) {
|
|
|
2193
2765
|
return ret;
|
|
2194
2766
|
};
|
|
2195
2767
|
|
|
2196
|
-
|
|
2768
|
+
exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
2197
2769
|
let result;
|
|
2198
2770
|
try {
|
|
2199
2771
|
result = arg0 instanceof Map;
|
|
@@ -2204,7 +2776,7 @@ module.exports.__wbg_instanceof_Map_80cc65041c96417a = function(arg0) {
|
|
|
2204
2776
|
return ret;
|
|
2205
2777
|
};
|
|
2206
2778
|
|
|
2207
|
-
|
|
2779
|
+
exports.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
|
|
2208
2780
|
let result;
|
|
2209
2781
|
try {
|
|
2210
2782
|
result = arg0 instanceof Response;
|
|
@@ -2215,7 +2787,7 @@ module.exports.__wbg_instanceof_Response_e80ce8b7a2b968d2 = function(arg0) {
|
|
|
2215
2787
|
return ret;
|
|
2216
2788
|
};
|
|
2217
2789
|
|
|
2218
|
-
|
|
2790
|
+
exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
2219
2791
|
let result;
|
|
2220
2792
|
try {
|
|
2221
2793
|
result = arg0 instanceof Uint8Array;
|
|
@@ -2226,78 +2798,58 @@ module.exports.__wbg_instanceof_Uint8Array_ca460677bc155827 = function(arg0) {
|
|
|
2226
2798
|
return ret;
|
|
2227
2799
|
};
|
|
2228
2800
|
|
|
2229
|
-
|
|
2801
|
+
exports.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
2230
2802
|
const ret = Array.isArray(arg0);
|
|
2231
2803
|
return ret;
|
|
2232
2804
|
};
|
|
2233
2805
|
|
|
2234
|
-
|
|
2806
|
+
exports.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
2235
2807
|
const ret = Number.isSafeInteger(arg0);
|
|
2236
2808
|
return ret;
|
|
2237
2809
|
};
|
|
2238
2810
|
|
|
2239
|
-
|
|
2811
|
+
exports.__wbg_iterator_e5822695327a3c39 = function() {
|
|
2240
2812
|
const ret = Symbol.iterator;
|
|
2241
2813
|
return ret;
|
|
2242
2814
|
};
|
|
2243
2815
|
|
|
2244
|
-
|
|
2816
|
+
exports.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
2245
2817
|
const ret = arg0.length;
|
|
2246
2818
|
return ret;
|
|
2247
2819
|
};
|
|
2248
2820
|
|
|
2249
|
-
|
|
2821
|
+
exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
2250
2822
|
const ret = arg0.length;
|
|
2251
2823
|
return ret;
|
|
2252
2824
|
};
|
|
2253
2825
|
|
|
2254
|
-
|
|
2826
|
+
exports.__wbg_log_45eb3a49e7cdcb64 = function(arg0, arg1, arg2, arg3) {
|
|
2255
2827
|
console.log(arg0, arg1, arg2, arg3);
|
|
2256
2828
|
};
|
|
2257
2829
|
|
|
2258
|
-
|
|
2830
|
+
exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
2259
2831
|
const ret = arg0.msCrypto;
|
|
2260
2832
|
return ret;
|
|
2261
2833
|
};
|
|
2262
2834
|
|
|
2263
|
-
|
|
2835
|
+
exports.__wbg_new_1acc0b6eea89d040 = function() {
|
|
2264
2836
|
const ret = new Object();
|
|
2265
2837
|
return ret;
|
|
2266
2838
|
};
|
|
2267
2839
|
|
|
2268
|
-
|
|
2840
|
+
exports.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
|
|
2269
2841
|
const ret = new AbortController();
|
|
2270
2842
|
return ret;
|
|
2271
2843
|
}, arguments) };
|
|
2272
2844
|
|
|
2273
|
-
|
|
2274
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2275
|
-
return ret;
|
|
2276
|
-
};
|
|
2277
|
-
|
|
2278
|
-
module.exports.__wbg_new_4796e1cd2eb9ea6d = function() { return handleError(function () {
|
|
2279
|
-
const ret = new Headers();
|
|
2280
|
-
return ret;
|
|
2281
|
-
}, arguments) };
|
|
2282
|
-
|
|
2283
|
-
module.exports.__wbg_new_58353953ad2097cc = function() {
|
|
2284
|
-
const ret = new Array();
|
|
2285
|
-
return ret;
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
module.exports.__wbg_new_a979b4b45bd55c7f = function() {
|
|
2289
|
-
const ret = new Map();
|
|
2290
|
-
return ret;
|
|
2291
|
-
};
|
|
2292
|
-
|
|
2293
|
-
module.exports.__wbg_new_e30c39c06edaabf2 = function(arg0, arg1) {
|
|
2845
|
+
exports.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
|
|
2294
2846
|
try {
|
|
2295
2847
|
var state0 = {a: arg0, b: arg1};
|
|
2296
2848
|
var cb0 = (arg0, arg1) => {
|
|
2297
2849
|
const a = state0.a;
|
|
2298
2850
|
state0.a = 0;
|
|
2299
2851
|
try {
|
|
2300
|
-
return
|
|
2852
|
+
return wasm_bindgen__convert__closures_____invoke__h07d45d2c9c5e1bbe(a, state0.b, arg0, arg1);
|
|
2301
2853
|
} finally {
|
|
2302
2854
|
state0.a = a;
|
|
2303
2855
|
}
|
|
@@ -2309,262 +2861,296 @@ module.exports.__wbg_new_e30c39c06edaabf2 = function(arg0, arg1) {
|
|
|
2309
2861
|
}
|
|
2310
2862
|
};
|
|
2311
2863
|
|
|
2312
|
-
|
|
2864
|
+
exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
2313
2865
|
const ret = new Uint8Array(arg0);
|
|
2314
2866
|
return ret;
|
|
2315
2867
|
};
|
|
2316
2868
|
|
|
2317
|
-
|
|
2869
|
+
exports.__wbg_new_68651c719dcda04e = function() {
|
|
2870
|
+
const ret = new Map();
|
|
2871
|
+
return ret;
|
|
2872
|
+
};
|
|
2873
|
+
|
|
2874
|
+
exports.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
|
|
2875
|
+
const ret = new Headers();
|
|
2876
|
+
return ret;
|
|
2877
|
+
}, arguments) };
|
|
2878
|
+
|
|
2879
|
+
exports.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
|
|
2880
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2881
|
+
return ret;
|
|
2882
|
+
};
|
|
2883
|
+
|
|
2884
|
+
exports.__wbg_new_e17d9f43105b08be = function() {
|
|
2885
|
+
const ret = new Array();
|
|
2886
|
+
return ret;
|
|
2887
|
+
};
|
|
2888
|
+
|
|
2889
|
+
exports.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
|
|
2318
2890
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2319
2891
|
return ret;
|
|
2320
2892
|
};
|
|
2321
2893
|
|
|
2322
|
-
|
|
2894
|
+
exports.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
2323
2895
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2324
2896
|
return ret;
|
|
2325
2897
|
};
|
|
2326
2898
|
|
|
2327
|
-
|
|
2899
|
+
exports.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b = function(arg0, arg1, arg2) {
|
|
2328
2900
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
2329
2901
|
return ret;
|
|
2330
2902
|
};
|
|
2331
2903
|
|
|
2332
|
-
|
|
2904
|
+
exports.__wbg_new_with_into_underlying_source_b47f6a6a596a7f24 = function(arg0, arg1) {
|
|
2333
2905
|
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
|
|
2334
2906
|
return ret;
|
|
2335
2907
|
};
|
|
2336
2908
|
|
|
2337
|
-
|
|
2909
|
+
exports.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
|
|
2338
2910
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
2339
2911
|
return ret;
|
|
2340
2912
|
};
|
|
2341
2913
|
|
|
2342
|
-
|
|
2914
|
+
exports.__wbg_new_with_opt_readable_stream_and_init_b3dac7204db32cac = function() { return handleError(function (arg0, arg1) {
|
|
2343
2915
|
const ret = new Response(arg0, arg1);
|
|
2344
2916
|
return ret;
|
|
2345
2917
|
}, arguments) };
|
|
2346
2918
|
|
|
2347
|
-
|
|
2919
|
+
exports.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2348
2920
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
2349
2921
|
return ret;
|
|
2350
2922
|
}, arguments) };
|
|
2351
2923
|
|
|
2352
|
-
|
|
2924
|
+
exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
|
|
2925
|
+
const ret = arg0.next();
|
|
2926
|
+
return ret;
|
|
2927
|
+
}, arguments) };
|
|
2928
|
+
|
|
2929
|
+
exports.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
2353
2930
|
const ret = arg0.next;
|
|
2354
2931
|
return ret;
|
|
2355
2932
|
};
|
|
2356
2933
|
|
|
2357
|
-
|
|
2358
|
-
const ret = arg0.
|
|
2934
|
+
exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
2935
|
+
const ret = arg0.node;
|
|
2359
2936
|
return ret;
|
|
2360
|
-
}
|
|
2937
|
+
};
|
|
2361
2938
|
|
|
2362
|
-
|
|
2363
|
-
const ret = arg0.
|
|
2939
|
+
exports.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
2940
|
+
const ret = arg0.now();
|
|
2364
2941
|
return ret;
|
|
2365
2942
|
};
|
|
2366
2943
|
|
|
2367
|
-
|
|
2944
|
+
exports.__wbg_now_793306c526e2e3b6 = function() {
|
|
2368
2945
|
const ret = Date.now();
|
|
2369
2946
|
return ret;
|
|
2370
2947
|
};
|
|
2371
2948
|
|
|
2372
|
-
|
|
2949
|
+
exports.__wbg_parse_2a704d6b78abb2b8 = function() { return handleError(function (arg0, arg1) {
|
|
2373
2950
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
2374
2951
|
return ret;
|
|
2375
2952
|
}, arguments) };
|
|
2376
2953
|
|
|
2377
|
-
|
|
2378
|
-
const ret = arg0.
|
|
2954
|
+
exports.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
2955
|
+
const ret = arg0.performance;
|
|
2379
2956
|
return ret;
|
|
2380
2957
|
};
|
|
2381
2958
|
|
|
2382
|
-
|
|
2383
|
-
const ret =
|
|
2959
|
+
exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
2960
|
+
const ret = arg0.process;
|
|
2384
2961
|
return ret;
|
|
2385
2962
|
};
|
|
2386
2963
|
|
|
2387
|
-
|
|
2388
|
-
|
|
2964
|
+
exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
2965
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2389
2966
|
};
|
|
2390
2967
|
|
|
2391
|
-
|
|
2968
|
+
exports.__wbg_publickey_new = function(arg0) {
|
|
2969
|
+
const ret = PublicKey.__wrap(arg0);
|
|
2970
|
+
return ret;
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2973
|
+
exports.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
|
|
2392
2974
|
const ret = arg0.queueMicrotask;
|
|
2393
2975
|
return ret;
|
|
2394
2976
|
};
|
|
2395
2977
|
|
|
2396
|
-
|
|
2978
|
+
exports.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
|
|
2979
|
+
queueMicrotask(arg0);
|
|
2980
|
+
};
|
|
2981
|
+
|
|
2982
|
+
exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
2397
2983
|
arg0.randomFillSync(arg1);
|
|
2398
2984
|
}, arguments) };
|
|
2399
2985
|
|
|
2400
|
-
|
|
2986
|
+
exports.__wbg_read_48f1593df542f968 = function(arg0) {
|
|
2401
2987
|
const ret = arg0.read();
|
|
2402
2988
|
return ret;
|
|
2403
2989
|
};
|
|
2404
2990
|
|
|
2405
|
-
|
|
2991
|
+
exports.__wbg_releaseLock_5d0b5a68887b891d = function(arg0) {
|
|
2406
2992
|
arg0.releaseLock();
|
|
2407
2993
|
};
|
|
2408
2994
|
|
|
2409
|
-
|
|
2995
|
+
exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
2410
2996
|
const ret = module.require;
|
|
2411
2997
|
return ret;
|
|
2412
2998
|
}, arguments) };
|
|
2413
2999
|
|
|
2414
|
-
|
|
3000
|
+
exports.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
2415
3001
|
const ret = Promise.resolve(arg0);
|
|
2416
3002
|
return ret;
|
|
2417
3003
|
};
|
|
2418
3004
|
|
|
2419
|
-
|
|
3005
|
+
exports.__wbg_respond_0f4dbf5386f5c73e = function() { return handleError(function (arg0, arg1) {
|
|
2420
3006
|
arg0.respond(arg1 >>> 0);
|
|
2421
3007
|
}, arguments) };
|
|
2422
3008
|
|
|
2423
|
-
|
|
3009
|
+
exports.__wbg_session_new = function(arg0) {
|
|
2424
3010
|
const ret = Session.__wrap(arg0);
|
|
2425
3011
|
return ret;
|
|
2426
3012
|
};
|
|
2427
3013
|
|
|
2428
|
-
|
|
3014
|
+
exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
|
|
2429
3015
|
const ret = setTimeout(arg0, arg1);
|
|
2430
3016
|
return ret;
|
|
2431
3017
|
};
|
|
2432
3018
|
|
|
2433
|
-
|
|
3019
|
+
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
2434
3020
|
arg0[arg1] = arg2;
|
|
2435
3021
|
};
|
|
2436
3022
|
|
|
2437
|
-
|
|
2438
|
-
arg0[arg1 >>> 0] = arg2;
|
|
2439
|
-
};
|
|
2440
|
-
|
|
2441
|
-
module.exports.__wbg_set_b042eef31c50834d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3023
|
+
exports.__wbg_set_8b342d8cd9d2a02c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2442
3024
|
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2443
3025
|
}, arguments) };
|
|
2444
3026
|
|
|
2445
|
-
|
|
2446
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
2447
|
-
return ret;
|
|
2448
|
-
}, arguments) };
|
|
2449
|
-
|
|
2450
|
-
module.exports.__wbg_set_d6bdfd275fb8a4ce = function(arg0, arg1, arg2) {
|
|
3027
|
+
exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
2451
3028
|
const ret = arg0.set(arg1, arg2);
|
|
2452
3029
|
return ret;
|
|
2453
3030
|
};
|
|
2454
3031
|
|
|
2455
|
-
|
|
2456
|
-
arg0.set(arg1, arg2
|
|
3032
|
+
exports.__wbg_set_9e6516df7b7d0f19 = function(arg0, arg1, arg2) {
|
|
3033
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
2457
3034
|
};
|
|
2458
3035
|
|
|
2459
|
-
|
|
3036
|
+
exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
|
|
2460
3037
|
arg0.body = arg1;
|
|
2461
3038
|
};
|
|
2462
3039
|
|
|
2463
|
-
|
|
3040
|
+
exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
3041
|
+
arg0[arg1 >>> 0] = arg2;
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
exports.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3045
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
3046
|
+
return ret;
|
|
3047
|
+
}, arguments) };
|
|
3048
|
+
|
|
3049
|
+
exports.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
|
|
2464
3050
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
2465
3051
|
};
|
|
2466
3052
|
|
|
2467
|
-
|
|
3053
|
+
exports.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
|
|
2468
3054
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2469
3055
|
};
|
|
2470
3056
|
|
|
2471
|
-
|
|
3057
|
+
exports.__wbg_set_headers_107379072e02fee5 = function(arg0, arg1) {
|
|
2472
3058
|
arg0.headers = arg1;
|
|
2473
3059
|
};
|
|
2474
3060
|
|
|
2475
|
-
|
|
3061
|
+
exports.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
|
|
2476
3062
|
arg0.headers = arg1;
|
|
2477
3063
|
};
|
|
2478
3064
|
|
|
2479
|
-
|
|
3065
|
+
exports.__wbg_set_high_water_mark_5142ac1d2fb46365 = function(arg0, arg1) {
|
|
2480
3066
|
arg0.highWaterMark = arg1;
|
|
2481
3067
|
};
|
|
2482
3068
|
|
|
2483
|
-
|
|
3069
|
+
exports.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
|
|
2484
3070
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
2485
3071
|
};
|
|
2486
3072
|
|
|
2487
|
-
|
|
3073
|
+
exports.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
|
|
2488
3074
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2489
3075
|
};
|
|
2490
3076
|
|
|
2491
|
-
|
|
3077
|
+
exports.__wbg_set_name_d94846a29e626702 = function(arg0, arg1, arg2) {
|
|
2492
3078
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
2493
3079
|
};
|
|
2494
3080
|
|
|
2495
|
-
|
|
3081
|
+
exports.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
|
|
2496
3082
|
arg0.signal = arg1;
|
|
2497
3083
|
};
|
|
2498
3084
|
|
|
2499
|
-
|
|
3085
|
+
exports.__wbg_set_status_886bf143c25d0706 = function(arg0, arg1) {
|
|
2500
3086
|
arg0.status = arg1;
|
|
2501
3087
|
};
|
|
2502
3088
|
|
|
2503
|
-
|
|
3089
|
+
exports.__wbg_set_status_text_3d83b7e559c076b2 = function(arg0, arg1, arg2) {
|
|
2504
3090
|
arg0.statusText = getStringFromWasm0(arg1, arg2);
|
|
2505
3091
|
};
|
|
2506
3092
|
|
|
2507
|
-
|
|
3093
|
+
exports.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
|
|
2508
3094
|
const ret = arg0.signal;
|
|
2509
3095
|
return ret;
|
|
2510
3096
|
};
|
|
2511
3097
|
|
|
2512
|
-
|
|
3098
|
+
exports.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
|
|
2513
3099
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2514
3100
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2515
3101
|
};
|
|
2516
3102
|
|
|
2517
|
-
|
|
3103
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
|
|
2518
3104
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2519
3105
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2520
3106
|
};
|
|
2521
3107
|
|
|
2522
|
-
|
|
3108
|
+
exports.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
|
|
2523
3109
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2524
3110
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2525
3111
|
};
|
|
2526
3112
|
|
|
2527
|
-
|
|
3113
|
+
exports.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
|
|
2528
3114
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2529
3115
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2530
3116
|
};
|
|
2531
3117
|
|
|
2532
|
-
|
|
3118
|
+
exports.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
|
|
2533
3119
|
const ret = arg0.status;
|
|
2534
3120
|
return ret;
|
|
2535
3121
|
};
|
|
2536
3122
|
|
|
2537
|
-
|
|
3123
|
+
exports.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
|
|
2538
3124
|
const ret = JSON.stringify(arg0);
|
|
2539
3125
|
return ret;
|
|
2540
3126
|
}, arguments) };
|
|
2541
3127
|
|
|
2542
|
-
|
|
3128
|
+
exports.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
|
|
2543
3129
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2544
3130
|
return ret;
|
|
2545
3131
|
};
|
|
2546
3132
|
|
|
2547
|
-
|
|
3133
|
+
exports.__wbg_text_dc33c15c17bdfb52 = function() { return handleError(function (arg0) {
|
|
2548
3134
|
const ret = arg0.text();
|
|
2549
3135
|
return ret;
|
|
2550
3136
|
}, arguments) };
|
|
2551
3137
|
|
|
2552
|
-
|
|
2553
|
-
const ret = arg0.then(arg1
|
|
3138
|
+
exports.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
|
|
3139
|
+
const ret = arg0.then(arg1);
|
|
2554
3140
|
return ret;
|
|
2555
3141
|
};
|
|
2556
3142
|
|
|
2557
|
-
|
|
2558
|
-
const ret = arg0.then(arg1);
|
|
3143
|
+
exports.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
|
|
3144
|
+
const ret = arg0.then(arg1, arg2);
|
|
2559
3145
|
return ret;
|
|
2560
3146
|
};
|
|
2561
3147
|
|
|
2562
|
-
|
|
3148
|
+
exports.__wbg_toString_8eec07f6f4c057e4 = function(arg0) {
|
|
2563
3149
|
const ret = arg0.toString();
|
|
2564
3150
|
return ret;
|
|
2565
3151
|
};
|
|
2566
3152
|
|
|
2567
|
-
|
|
3153
|
+
exports.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
|
|
2568
3154
|
const ret = arg1.url;
|
|
2569
3155
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2570
3156
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2572,92 +3158,77 @@ module.exports.__wbg_url_e6ed869ea05b7a71 = function(arg0, arg1) {
|
|
|
2572
3158
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2573
3159
|
};
|
|
2574
3160
|
|
|
2575
|
-
|
|
3161
|
+
exports.__wbg_value_692627309814bb8c = function(arg0) {
|
|
2576
3162
|
const ret = arg0.value;
|
|
2577
3163
|
return ret;
|
|
2578
3164
|
};
|
|
2579
3165
|
|
|
2580
|
-
|
|
3166
|
+
exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
2581
3167
|
const ret = arg0.versions;
|
|
2582
3168
|
return ret;
|
|
2583
3169
|
};
|
|
2584
3170
|
|
|
2585
|
-
|
|
3171
|
+
exports.__wbg_view_f6c15ac9fed63bbd = function(arg0) {
|
|
2586
3172
|
const ret = arg0.view;
|
|
2587
3173
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2588
3174
|
};
|
|
2589
3175
|
|
|
2590
|
-
|
|
3176
|
+
exports.__wbg_warn_8f5b5437666d0885 = function(arg0, arg1, arg2, arg3) {
|
|
2591
3177
|
console.warn(arg0, arg1, arg2, arg3);
|
|
2592
3178
|
};
|
|
2593
3179
|
|
|
2594
|
-
|
|
2595
|
-
|
|
3180
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3181
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3182
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2596
3183
|
return ret;
|
|
2597
3184
|
};
|
|
2598
3185
|
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
2604
|
-
const ret = arg0;
|
|
3186
|
+
exports.__wbindgen_cast_236fa6323a6eeed0 = function(arg0, arg1) {
|
|
3187
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 175, function: Function { arguments: [], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3188
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h762d1c23bf8139ea, wasm_bindgen__convert__closures_____invoke__h13019d5ee70bd6b6);
|
|
2605
3189
|
return ret;
|
|
2606
3190
|
};
|
|
2607
3191
|
|
|
2608
|
-
|
|
2609
|
-
|
|
3192
|
+
exports.__wbindgen_cast_25a0a844437d0e92 = function(arg0, arg1) {
|
|
3193
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3194
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3195
|
+
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
3196
|
+
const ret = v0;
|
|
2610
3197
|
return ret;
|
|
2611
3198
|
};
|
|
2612
3199
|
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
const ret =
|
|
2616
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2617
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2618
|
-
};
|
|
2619
|
-
|
|
2620
|
-
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
2621
|
-
const v = arg0;
|
|
2622
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
3200
|
+
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
3201
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
3202
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2623
3203
|
return ret;
|
|
2624
3204
|
};
|
|
2625
3205
|
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
obj.a = 0;
|
|
2630
|
-
return true;
|
|
2631
|
-
}
|
|
2632
|
-
const ret = false;
|
|
3206
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
3207
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
3208
|
+
const ret = arg0;
|
|
2633
3209
|
return ret;
|
|
2634
3210
|
};
|
|
2635
3211
|
|
|
2636
|
-
|
|
2637
|
-
|
|
3212
|
+
exports.__wbindgen_cast_c389e99dd7b90da6 = function(arg0, arg1) {
|
|
3213
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 175, function: Function { arguments: [Externref], shim_idx: 193, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3214
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h762d1c23bf8139ea, wasm_bindgen__convert__closures_____invoke__h69202035a90512ea);
|
|
2638
3215
|
return ret;
|
|
2639
3216
|
};
|
|
2640
3217
|
|
|
2641
|
-
|
|
2642
|
-
|
|
3218
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
3219
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3220
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2643
3221
|
return ret;
|
|
2644
3222
|
};
|
|
2645
3223
|
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
const
|
|
2649
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2650
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2651
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2652
|
-
};
|
|
2653
|
-
|
|
2654
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
2655
|
-
const ret = arg0 in arg1;
|
|
3224
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
3225
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
3226
|
+
const ret = arg0;
|
|
2656
3227
|
return ret;
|
|
2657
3228
|
};
|
|
2658
3229
|
|
|
2659
|
-
|
|
2660
|
-
const table = wasm.
|
|
3230
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
3231
|
+
const table = wasm.__wbindgen_externrefs;
|
|
2661
3232
|
const offset = table.grow(4);
|
|
2662
3233
|
table.set(0, undefined);
|
|
2663
3234
|
table.set(offset + 0, undefined);
|
|
@@ -2667,89 +3238,10 @@ module.exports.__wbindgen_init_externref_table = function() {
|
|
|
2667
3238
|
;
|
|
2668
3239
|
};
|
|
2669
3240
|
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
module.exports.__wbindgen_is_function = function(arg0) {
|
|
2676
|
-
const ret = typeof(arg0) === 'function';
|
|
2677
|
-
return ret;
|
|
2678
|
-
};
|
|
2679
|
-
|
|
2680
|
-
module.exports.__wbindgen_is_null = function(arg0) {
|
|
2681
|
-
const ret = arg0 === null;
|
|
2682
|
-
return ret;
|
|
2683
|
-
};
|
|
2684
|
-
|
|
2685
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
2686
|
-
const val = arg0;
|
|
2687
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2688
|
-
return ret;
|
|
2689
|
-
};
|
|
2690
|
-
|
|
2691
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
|
2692
|
-
const ret = typeof(arg0) === 'string';
|
|
2693
|
-
return ret;
|
|
2694
|
-
};
|
|
2695
|
-
|
|
2696
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2697
|
-
const ret = arg0 === undefined;
|
|
2698
|
-
return ret;
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
2702
|
-
const ret = arg0 === arg1;
|
|
2703
|
-
return ret;
|
|
2704
|
-
};
|
|
2705
|
-
|
|
2706
|
-
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2707
|
-
const ret = arg0 == arg1;
|
|
2708
|
-
return ret;
|
|
2709
|
-
};
|
|
2710
|
-
|
|
2711
|
-
module.exports.__wbindgen_memory = function() {
|
|
2712
|
-
const ret = wasm.memory;
|
|
2713
|
-
return ret;
|
|
2714
|
-
};
|
|
2715
|
-
|
|
2716
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
2717
|
-
const obj = arg1;
|
|
2718
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2719
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2720
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2721
|
-
};
|
|
2722
|
-
|
|
2723
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
2724
|
-
const ret = arg0;
|
|
2725
|
-
return ret;
|
|
2726
|
-
};
|
|
2727
|
-
|
|
2728
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2729
|
-
const obj = arg1;
|
|
2730
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2731
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2732
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2733
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2734
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2738
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2739
|
-
return ret;
|
|
2740
|
-
};
|
|
2741
|
-
|
|
2742
|
-
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
2743
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2744
|
-
};
|
|
2745
|
-
|
|
2746
|
-
const path = require('path').join(__dirname, 'pubky_bg.wasm');
|
|
2747
|
-
const bytes = require('fs').readFileSync(path);
|
|
2748
|
-
|
|
2749
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
|
2750
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
2751
|
-
wasm = wasmInstance.exports;
|
|
2752
|
-
module.exports.__wasm = wasm;
|
|
3241
|
+
const wasmPath = `${__dirname}/pubky_bg.wasm`;
|
|
3242
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
3243
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
3244
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
2753
3245
|
|
|
2754
3246
|
wasm.__wbindgen_start();
|
|
2755
3247
|
|