@synonymdev/pubky 0.6.0-rc.6 → 0.6.0-rc.7
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 +58 -13
- package/index.cjs +923 -454
- package/index.js +1037 -566
- package/package.json +1 -1
- package/pubky.d.ts +192 -72
- 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
|
}
|
|
@@ -494,7 +501,85 @@ class AuthFlow {
|
|
|
494
501
|
return ret;
|
|
495
502
|
}
|
|
496
503
|
}
|
|
497
|
-
|
|
504
|
+
if (Symbol.dispose) AuthFlow.prototype[Symbol.dispose] = AuthFlow.prototype.free;
|
|
505
|
+
|
|
506
|
+
exports.AuthFlow = AuthFlow;
|
|
507
|
+
|
|
508
|
+
const AuthFlowKindFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
509
|
+
? { register: () => {}, unregister: () => {} }
|
|
510
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr >>> 0, 1));
|
|
511
|
+
/**
|
|
512
|
+
* The kind of authentication flow to perform.
|
|
513
|
+
* This can either be a sign in or a sign up flow.
|
|
514
|
+
*/
|
|
515
|
+
class AuthFlowKind {
|
|
516
|
+
|
|
517
|
+
static __wrap(ptr) {
|
|
518
|
+
ptr = ptr >>> 0;
|
|
519
|
+
const obj = Object.create(AuthFlowKind.prototype);
|
|
520
|
+
obj.__wbg_ptr = ptr;
|
|
521
|
+
AuthFlowKindFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
522
|
+
return obj;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
__destroy_into_raw() {
|
|
526
|
+
const ptr = this.__wbg_ptr;
|
|
527
|
+
this.__wbg_ptr = 0;
|
|
528
|
+
AuthFlowKindFinalization.unregister(this);
|
|
529
|
+
return ptr;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
free() {
|
|
533
|
+
const ptr = this.__destroy_into_raw();
|
|
534
|
+
wasm.__wbg_authflowkind_free(ptr, 0);
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Create a sign in flow.
|
|
538
|
+
* @returns {AuthFlowKind}
|
|
539
|
+
*/
|
|
540
|
+
static signin() {
|
|
541
|
+
const ret = wasm.authflowkind_signin();
|
|
542
|
+
return AuthFlowKind.__wrap(ret);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Create a sign up flow.
|
|
546
|
+
* # Arguments
|
|
547
|
+
* * `homeserver_public_key` - The public key of the homeserver to sign up on.
|
|
548
|
+
* * `signup_token` - The signup token to use for the signup flow. This is optional.
|
|
549
|
+
* @param {PublicKey} homeserver_public_key
|
|
550
|
+
* @param {string | null} [signup_token]
|
|
551
|
+
* @returns {AuthFlowKind}
|
|
552
|
+
*/
|
|
553
|
+
static signup(homeserver_public_key, signup_token) {
|
|
554
|
+
_assertClass(homeserver_public_key, PublicKey);
|
|
555
|
+
var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
556
|
+
var len0 = WASM_VECTOR_LEN;
|
|
557
|
+
const ret = wasm.authflowkind_signup(homeserver_public_key.__wbg_ptr, ptr0, len0);
|
|
558
|
+
return AuthFlowKind.__wrap(ret);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Get the intent of the authentication flow.
|
|
562
|
+
* # Returns
|
|
563
|
+
* * `"signin"` - If the authentication flow is a sign in flow.
|
|
564
|
+
* * `"signup"` - If the authentication flow is a sign up flow.
|
|
565
|
+
* @returns {string}
|
|
566
|
+
*/
|
|
567
|
+
get intent() {
|
|
568
|
+
let deferred1_0;
|
|
569
|
+
let deferred1_1;
|
|
570
|
+
try {
|
|
571
|
+
const ret = wasm.authflowkind_intent(this.__wbg_ptr);
|
|
572
|
+
deferred1_0 = ret[0];
|
|
573
|
+
deferred1_1 = ret[1];
|
|
574
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
575
|
+
} finally {
|
|
576
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
if (Symbol.dispose) AuthFlowKind.prototype[Symbol.dispose] = AuthFlowKind.prototype.free;
|
|
581
|
+
|
|
582
|
+
exports.AuthFlowKind = AuthFlowKind;
|
|
498
583
|
|
|
499
584
|
const AuthTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
500
585
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -611,7 +696,7 @@ class AuthToken {
|
|
|
611
696
|
*
|
|
612
697
|
* Returns: `string[]`, where each item is the canonical entry `"<scope>:<actions>"`.
|
|
613
698
|
*
|
|
614
|
-
* Example entry: `"/pub/my
|
|
699
|
+
* Example entry: `"/pub/my-cool-app/:rw"`
|
|
615
700
|
* @returns {string[]}
|
|
616
701
|
*/
|
|
617
702
|
get capabilities() {
|
|
@@ -636,7 +721,9 @@ class AuthToken {
|
|
|
636
721
|
return ret;
|
|
637
722
|
}
|
|
638
723
|
}
|
|
639
|
-
|
|
724
|
+
if (Symbol.dispose) AuthToken.prototype[Symbol.dispose] = AuthToken.prototype.free;
|
|
725
|
+
|
|
726
|
+
exports.AuthToken = AuthToken;
|
|
640
727
|
|
|
641
728
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
642
729
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -668,26 +755,6 @@ class Client {
|
|
|
668
755
|
const ptr = this.__destroy_into_raw();
|
|
669
756
|
wasm.__wbg_client_free(ptr, 0);
|
|
670
757
|
}
|
|
671
|
-
/**
|
|
672
|
-
* Perform a raw fetch. Works with `http(s)://` URLs.
|
|
673
|
-
*
|
|
674
|
-
* @param {string} url
|
|
675
|
-
* @param {RequestInit} init Standard fetch options; `credentials: "include"` recommended for session I/O.
|
|
676
|
-
* @returns {Promise<Response>}
|
|
677
|
-
*
|
|
678
|
-
* @example
|
|
679
|
-
* const client = pubky.client;
|
|
680
|
-
* const res = await client.fetch(`https://_pubky.${user}/pub/app/file.txt`, { method: "PUT", body: "hi", credentials: "include" });
|
|
681
|
-
* @param {string} url
|
|
682
|
-
* @param {RequestInit | null} [init]
|
|
683
|
-
* @returns {Promise<Response>}
|
|
684
|
-
*/
|
|
685
|
-
fetch(url, init) {
|
|
686
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
|
-
const len0 = WASM_VECTOR_LEN;
|
|
688
|
-
const ret = wasm.client_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
|
|
689
|
-
return ret;
|
|
690
|
-
}
|
|
691
758
|
/**
|
|
692
759
|
* Create a Pubky HTTP client.
|
|
693
760
|
*
|
|
@@ -747,8 +814,30 @@ class Client {
|
|
|
747
814
|
}
|
|
748
815
|
return Client.__wrap(ret[0]);
|
|
749
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* Perform a raw fetch. Works with `http(s)://` URLs.
|
|
819
|
+
*
|
|
820
|
+
* @param {string} url
|
|
821
|
+
* @param {RequestInit} init Standard fetch options; `credentials: "include"` recommended for session I/O.
|
|
822
|
+
* @returns {Promise<Response>}
|
|
823
|
+
*
|
|
824
|
+
* @example
|
|
825
|
+
* const client = pubky.client;
|
|
826
|
+
* const res = await client.fetch(`https://_pubky.${user}/pub/app/file.txt`, { method: "PUT", body: "hi", credentials: "include" });
|
|
827
|
+
* @param {string} url
|
|
828
|
+
* @param {RequestInit | null} [init]
|
|
829
|
+
* @returns {Promise<Response>}
|
|
830
|
+
*/
|
|
831
|
+
fetch(url, init) {
|
|
832
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
833
|
+
const len0 = WASM_VECTOR_LEN;
|
|
834
|
+
const ret = wasm.client_fetch(this.__wbg_ptr, ptr0, len0, isLikeNone(init) ? 0 : addToExternrefTable0(init));
|
|
835
|
+
return ret;
|
|
836
|
+
}
|
|
750
837
|
}
|
|
751
|
-
|
|
838
|
+
if (Symbol.dispose) Client.prototype[Symbol.dispose] = Client.prototype.free;
|
|
839
|
+
|
|
840
|
+
exports.Client = Client;
|
|
752
841
|
|
|
753
842
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
754
843
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -800,7 +889,9 @@ class IntoUnderlyingByteSource {
|
|
|
800
889
|
wasm.intounderlyingbytesource_cancel(ptr);
|
|
801
890
|
}
|
|
802
891
|
}
|
|
803
|
-
|
|
892
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
893
|
+
|
|
894
|
+
exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
|
|
804
895
|
|
|
805
896
|
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
806
897
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -845,7 +936,9 @@ class IntoUnderlyingSink {
|
|
|
845
936
|
return ret;
|
|
846
937
|
}
|
|
847
938
|
}
|
|
848
|
-
|
|
939
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
940
|
+
|
|
941
|
+
exports.IntoUnderlyingSink = IntoUnderlyingSink;
|
|
849
942
|
|
|
850
943
|
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
851
944
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -885,7 +978,9 @@ class IntoUnderlyingSource {
|
|
|
885
978
|
wasm.intounderlyingsource_cancel(ptr);
|
|
886
979
|
}
|
|
887
980
|
}
|
|
888
|
-
|
|
981
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
982
|
+
|
|
983
|
+
exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
889
984
|
|
|
890
985
|
const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
891
986
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -984,7 +1079,9 @@ class Keypair {
|
|
|
984
1079
|
return Keypair.__wrap(ret[0]);
|
|
985
1080
|
}
|
|
986
1081
|
}
|
|
987
|
-
|
|
1082
|
+
if (Symbol.dispose) Keypair.prototype[Symbol.dispose] = Keypair.prototype.free;
|
|
1083
|
+
|
|
1084
|
+
exports.Keypair = Keypair;
|
|
988
1085
|
|
|
989
1086
|
const PkdnsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
990
1087
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1100,7 +1197,9 @@ class Pkdns {
|
|
|
1100
1197
|
return ret;
|
|
1101
1198
|
}
|
|
1102
1199
|
}
|
|
1103
|
-
|
|
1200
|
+
if (Symbol.dispose) Pkdns.prototype[Symbol.dispose] = Pkdns.prototype.free;
|
|
1201
|
+
|
|
1202
|
+
exports.Pkdns = Pkdns;
|
|
1104
1203
|
|
|
1105
1204
|
const PubkyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1106
1205
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1195,11 +1294,15 @@ class Pubky {
|
|
|
1195
1294
|
* Provide a **capabilities string** and (optionally) a relay base URL.
|
|
1196
1295
|
* The capabilities string is a comma-separated list of entries:
|
|
1197
1296
|
* `"<scope>:<actions>"`, where:
|
|
1198
|
-
* - `scope` starts with `/` (e.g. `/pub/example.
|
|
1297
|
+
* - `scope` starts with `/` (e.g. `/pub/example.com/`).
|
|
1199
1298
|
* - `actions` is any combo of `r` and/or `w` (order normalized; `wr` -> `rw`).
|
|
1200
1299
|
* Pass `""` for no scopes (read-only public session).
|
|
1201
1300
|
*
|
|
1202
1301
|
* @param {string} capabilities Comma-separated caps, e.g. `"/pub/app/:rw,/pub/foo/file:r"`.
|
|
1302
|
+
* @param {AuthFlowKind} kind The kind of authentication flow to perform.
|
|
1303
|
+
* Examples:
|
|
1304
|
+
* - `AuthFlowKind.signin()` - Sign in to an existing account.
|
|
1305
|
+
* - `AuthFlowKind.signup(homeserverPublicKey, signupToken)` - Sign up for a new account.
|
|
1203
1306
|
* @param {string=} relay Optional HTTP relay base (e.g. `"https://…/link/"`).
|
|
1204
1307
|
* @returns {AuthFlow}
|
|
1205
1308
|
* A running auth flow. Show `authorizationUrl` as QR/deeplink,
|
|
@@ -1210,19 +1313,22 @@ class Pubky {
|
|
|
1210
1313
|
* - `{ name: "RequestError" }` if the flow cannot be started (network/relay)
|
|
1211
1314
|
*
|
|
1212
1315
|
* @example
|
|
1213
|
-
* const flow = pubky.startAuthFlow("/pub/my
|
|
1316
|
+
* const flow = pubky.startAuthFlow("/pub/my-cool-app/:rw");
|
|
1214
1317
|
* renderQr(flow.authorizationUrl);
|
|
1215
1318
|
* const session = await flow.awaitApproval();
|
|
1216
1319
|
* @param {Capabilities} capabilities
|
|
1320
|
+
* @param {AuthFlowKind} kind
|
|
1217
1321
|
* @param {string | null} [relay]
|
|
1218
1322
|
* @returns {AuthFlow}
|
|
1219
1323
|
*/
|
|
1220
|
-
startAuthFlow(capabilities, relay) {
|
|
1324
|
+
startAuthFlow(capabilities, kind, relay) {
|
|
1221
1325
|
const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1222
1326
|
const len0 = WASM_VECTOR_LEN;
|
|
1223
|
-
|
|
1224
|
-
var
|
|
1225
|
-
|
|
1327
|
+
_assertClass(kind, AuthFlowKind);
|
|
1328
|
+
var ptr1 = kind.__destroy_into_raw();
|
|
1329
|
+
var ptr2 = isLikeNone(relay) ? 0 : passStringToWasm0(relay, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1330
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1331
|
+
const ret = wasm.pubky_startAuthFlow(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2);
|
|
1226
1332
|
if (ret[2]) {
|
|
1227
1333
|
throw takeFromExternrefTable0(ret[1]);
|
|
1228
1334
|
}
|
|
@@ -1290,8 +1396,31 @@ class Pubky {
|
|
|
1290
1396
|
const ret = wasm.pubky_client(this.__wbg_ptr);
|
|
1291
1397
|
return Client.__wrap(ret);
|
|
1292
1398
|
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Restore a session from a previously exported snapshot, using this instance's client.
|
|
1401
|
+
*
|
|
1402
|
+
* This does **not** read or write any secrets. It revalidates the session metadata with
|
|
1403
|
+
* the server using the browser-managed HTTP-only cookie that must still be present.
|
|
1404
|
+
*
|
|
1405
|
+
* @param {string} exported A string produced by `session.export()`.
|
|
1406
|
+
* @returns {Promise<Session>}
|
|
1407
|
+
* A rehydrated session bound to this SDK's HTTP client.
|
|
1408
|
+
*
|
|
1409
|
+
* @example
|
|
1410
|
+
* const restored = await pubky.restoreSession(localStorage.getItem("pubky-session")!);
|
|
1411
|
+
* @param {string} exported
|
|
1412
|
+
* @returns {Promise<Session>}
|
|
1413
|
+
*/
|
|
1414
|
+
restoreSession(exported) {
|
|
1415
|
+
const ptr0 = passStringToWasm0(exported, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1416
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1417
|
+
const ret = wasm.pubky_restoreSession(this.__wbg_ptr, ptr0, len0);
|
|
1418
|
+
return ret;
|
|
1419
|
+
}
|
|
1293
1420
|
}
|
|
1294
|
-
|
|
1421
|
+
if (Symbol.dispose) Pubky.prototype[Symbol.dispose] = Pubky.prototype.free;
|
|
1422
|
+
|
|
1423
|
+
exports.Pubky = Pubky;
|
|
1295
1424
|
|
|
1296
1425
|
const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1297
1426
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1357,7 +1486,9 @@ class PublicKey {
|
|
|
1357
1486
|
return PublicKey.__wrap(ret[0]);
|
|
1358
1487
|
}
|
|
1359
1488
|
}
|
|
1360
|
-
|
|
1489
|
+
if (Symbol.dispose) PublicKey.prototype[Symbol.dispose] = PublicKey.prototype.free;
|
|
1490
|
+
|
|
1491
|
+
exports.PublicKey = PublicKey;
|
|
1361
1492
|
|
|
1362
1493
|
const PublicStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1363
1494
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1508,60 +1639,127 @@ class PublicStorage {
|
|
|
1508
1639
|
return ret;
|
|
1509
1640
|
}
|
|
1510
1641
|
}
|
|
1511
|
-
|
|
1642
|
+
if (Symbol.dispose) PublicStorage.prototype[Symbol.dispose] = PublicStorage.prototype.free;
|
|
1512
1643
|
|
|
1513
|
-
|
|
1644
|
+
exports.PublicStorage = PublicStorage;
|
|
1645
|
+
|
|
1646
|
+
const SeedExportDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1514
1647
|
? { register: () => {}, unregister: () => {} }
|
|
1515
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
* - Use `storage` for reads/writes (absolute paths like `/pub/app/file.txt`)
|
|
1519
|
-
* - Cookie is managed automatically by the underlying fetch client
|
|
1520
|
-
*/
|
|
1521
|
-
class Session {
|
|
1648
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr >>> 0, 1));
|
|
1649
|
+
|
|
1650
|
+
class SeedExportDeepLink {
|
|
1522
1651
|
|
|
1523
1652
|
static __wrap(ptr) {
|
|
1524
1653
|
ptr = ptr >>> 0;
|
|
1525
|
-
const obj = Object.create(
|
|
1654
|
+
const obj = Object.create(SeedExportDeepLink.prototype);
|
|
1526
1655
|
obj.__wbg_ptr = ptr;
|
|
1527
|
-
|
|
1656
|
+
SeedExportDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1528
1657
|
return obj;
|
|
1529
1658
|
}
|
|
1530
1659
|
|
|
1531
1660
|
__destroy_into_raw() {
|
|
1532
1661
|
const ptr = this.__wbg_ptr;
|
|
1533
1662
|
this.__wbg_ptr = 0;
|
|
1534
|
-
|
|
1663
|
+
SeedExportDeepLinkFinalization.unregister(this);
|
|
1535
1664
|
return ptr;
|
|
1536
1665
|
}
|
|
1537
1666
|
|
|
1538
1667
|
free() {
|
|
1539
1668
|
const ptr = this.__destroy_into_raw();
|
|
1540
|
-
wasm.
|
|
1669
|
+
wasm.__wbg_seedexportdeeplink_free(ptr, 0);
|
|
1541
1670
|
}
|
|
1542
1671
|
/**
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1545
|
-
* @returns {SessionInfo}
|
|
1546
|
-
* @returns {SessionInfo}
|
|
1672
|
+
* @param {string} url
|
|
1673
|
+
* @returns {SeedExportDeepLink}
|
|
1547
1674
|
*/
|
|
1548
|
-
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1675
|
+
static parse(url) {
|
|
1676
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1677
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1678
|
+
const ret = wasm.seedexportdeeplink_parse(ptr0, len0);
|
|
1679
|
+
if (ret[2]) {
|
|
1680
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1681
|
+
}
|
|
1682
|
+
return SeedExportDeepLink.__wrap(ret[0]);
|
|
1551
1683
|
}
|
|
1552
1684
|
/**
|
|
1553
|
-
*
|
|
1554
|
-
*
|
|
1555
|
-
* @returns {SessionStorage}
|
|
1556
|
-
* @returns {SessionStorage}
|
|
1685
|
+
* @returns {Uint8Array}
|
|
1557
1686
|
*/
|
|
1558
|
-
get
|
|
1559
|
-
const ret = wasm.
|
|
1560
|
-
return
|
|
1687
|
+
get secret() {
|
|
1688
|
+
const ret = wasm.seedexportdeeplink_secret(this.__wbg_ptr);
|
|
1689
|
+
return ret;
|
|
1561
1690
|
}
|
|
1562
1691
|
/**
|
|
1563
|
-
*
|
|
1564
|
-
|
|
1692
|
+
* @returns {string}
|
|
1693
|
+
*/
|
|
1694
|
+
toString() {
|
|
1695
|
+
let deferred1_0;
|
|
1696
|
+
let deferred1_1;
|
|
1697
|
+
try {
|
|
1698
|
+
const ret = wasm.seedexportdeeplink_toString(this.__wbg_ptr);
|
|
1699
|
+
deferred1_0 = ret[0];
|
|
1700
|
+
deferred1_1 = ret[1];
|
|
1701
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1702
|
+
} finally {
|
|
1703
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
if (Symbol.dispose) SeedExportDeepLink.prototype[Symbol.dispose] = SeedExportDeepLink.prototype.free;
|
|
1708
|
+
|
|
1709
|
+
exports.SeedExportDeepLink = SeedExportDeepLink;
|
|
1710
|
+
|
|
1711
|
+
const SessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1712
|
+
? { register: () => {}, unregister: () => {} }
|
|
1713
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr >>> 0, 1));
|
|
1714
|
+
/**
|
|
1715
|
+
* An authenticated context “as the user”.
|
|
1716
|
+
* - Use `storage` for reads/writes (absolute paths like `/pub/app/file.txt`)
|
|
1717
|
+
* - Cookie is managed automatically by the underlying fetch client
|
|
1718
|
+
*/
|
|
1719
|
+
class Session {
|
|
1720
|
+
|
|
1721
|
+
static __wrap(ptr) {
|
|
1722
|
+
ptr = ptr >>> 0;
|
|
1723
|
+
const obj = Object.create(Session.prototype);
|
|
1724
|
+
obj.__wbg_ptr = ptr;
|
|
1725
|
+
SessionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1726
|
+
return obj;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
__destroy_into_raw() {
|
|
1730
|
+
const ptr = this.__wbg_ptr;
|
|
1731
|
+
this.__wbg_ptr = 0;
|
|
1732
|
+
SessionFinalization.unregister(this);
|
|
1733
|
+
return ptr;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
free() {
|
|
1737
|
+
const ptr = this.__destroy_into_raw();
|
|
1738
|
+
wasm.__wbg_session_free(ptr, 0);
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Retrieve immutable info about this session (user & capabilities).
|
|
1742
|
+
*
|
|
1743
|
+
* @returns {SessionInfo}
|
|
1744
|
+
* @returns {SessionInfo}
|
|
1745
|
+
*/
|
|
1746
|
+
get info() {
|
|
1747
|
+
const ret = wasm.session_info(this.__wbg_ptr);
|
|
1748
|
+
return SessionInfo.__wrap(ret);
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Access the session-scoped storage API (read/write).
|
|
1752
|
+
*
|
|
1753
|
+
* @returns {SessionStorage}
|
|
1754
|
+
* @returns {SessionStorage}
|
|
1755
|
+
*/
|
|
1756
|
+
get storage() {
|
|
1757
|
+
const ret = wasm.session_storage(this.__wbg_ptr);
|
|
1758
|
+
return SessionStorage.__wrap(ret);
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Invalidate the session on the server (clears server cookie).
|
|
1762
|
+
* Further calls to storage API will fail.
|
|
1565
1763
|
*
|
|
1566
1764
|
* @returns {Promise<void>}
|
|
1567
1765
|
* @returns {Promise<void>}
|
|
@@ -1570,8 +1768,58 @@ class Session {
|
|
|
1570
1768
|
const ret = wasm.session_signout(this.__wbg_ptr);
|
|
1571
1769
|
return ret;
|
|
1572
1770
|
}
|
|
1771
|
+
/**
|
|
1772
|
+
* Export the session metadata so it can be restored after a tab refresh.
|
|
1773
|
+
*
|
|
1774
|
+
* The export string contains **no secrets**; it only serializes the public `SessionInfo`.
|
|
1775
|
+
* Browsers remain responsible for persisting the HTTP-only session cookie.
|
|
1776
|
+
*
|
|
1777
|
+
* @returns {string}
|
|
1778
|
+
* A base64 string to store (e.g. in `localStorage`).
|
|
1779
|
+
* @returns {string}
|
|
1780
|
+
*/
|
|
1781
|
+
export() {
|
|
1782
|
+
let deferred1_0;
|
|
1783
|
+
let deferred1_1;
|
|
1784
|
+
try {
|
|
1785
|
+
const ret = wasm.session_export(this.__wbg_ptr);
|
|
1786
|
+
deferred1_0 = ret[0];
|
|
1787
|
+
deferred1_1 = ret[1];
|
|
1788
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1789
|
+
} finally {
|
|
1790
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Restore a session from an `export()` string.
|
|
1795
|
+
*
|
|
1796
|
+
* The HTTP-only cookie must still be present in the browser; this function does not
|
|
1797
|
+
* read or write any secrets.
|
|
1798
|
+
*
|
|
1799
|
+
* @param {string} exported
|
|
1800
|
+
* A string produced by `session.export()`.
|
|
1801
|
+
* @param {Client=} client
|
|
1802
|
+
* Optional client to reuse transport configuration.
|
|
1803
|
+
* @returns {Promise<Session>}
|
|
1804
|
+
* @param {string} exported
|
|
1805
|
+
* @param {Client | null} [client]
|
|
1806
|
+
* @returns {Promise<Session>}
|
|
1807
|
+
*/
|
|
1808
|
+
static restore(exported, client) {
|
|
1809
|
+
const ptr0 = passStringToWasm0(exported, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1810
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1811
|
+
let ptr1 = 0;
|
|
1812
|
+
if (!isLikeNone(client)) {
|
|
1813
|
+
_assertClass(client, Client);
|
|
1814
|
+
ptr1 = client.__destroy_into_raw();
|
|
1815
|
+
}
|
|
1816
|
+
const ret = wasm.session_restore(ptr0, len0, ptr1);
|
|
1817
|
+
return ret;
|
|
1818
|
+
}
|
|
1573
1819
|
}
|
|
1574
|
-
|
|
1820
|
+
if (Symbol.dispose) Session.prototype[Symbol.dispose] = Session.prototype.free;
|
|
1821
|
+
|
|
1822
|
+
exports.Session = Session;
|
|
1575
1823
|
|
|
1576
1824
|
const SessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1577
1825
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1628,7 +1876,9 @@ class SessionInfo {
|
|
|
1628
1876
|
return v1;
|
|
1629
1877
|
}
|
|
1630
1878
|
}
|
|
1631
|
-
|
|
1879
|
+
if (Symbol.dispose) SessionInfo.prototype[Symbol.dispose] = SessionInfo.prototype.free;
|
|
1880
|
+
|
|
1881
|
+
exports.SessionInfo = SessionInfo;
|
|
1632
1882
|
|
|
1633
1883
|
const SessionStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1634
1884
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1833,7 +2083,9 @@ class SessionStorage {
|
|
|
1833
2083
|
return ret;
|
|
1834
2084
|
}
|
|
1835
2085
|
}
|
|
1836
|
-
|
|
2086
|
+
if (Symbol.dispose) SessionStorage.prototype[Symbol.dispose] = SessionStorage.prototype.free;
|
|
2087
|
+
|
|
2088
|
+
exports.SessionStorage = SessionStorage;
|
|
1837
2089
|
|
|
1838
2090
|
const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1839
2091
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1966,14 +2218,225 @@ class Signer {
|
|
|
1966
2218
|
return Pkdns.__wrap(ret);
|
|
1967
2219
|
}
|
|
1968
2220
|
}
|
|
1969
|
-
|
|
2221
|
+
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
2222
|
+
|
|
2223
|
+
exports.Signer = Signer;
|
|
2224
|
+
|
|
2225
|
+
const SigninDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2226
|
+
? { register: () => {}, unregister: () => {} }
|
|
2227
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr >>> 0, 1));
|
|
2228
|
+
|
|
2229
|
+
class SigninDeepLink {
|
|
2230
|
+
|
|
2231
|
+
static __wrap(ptr) {
|
|
2232
|
+
ptr = ptr >>> 0;
|
|
2233
|
+
const obj = Object.create(SigninDeepLink.prototype);
|
|
2234
|
+
obj.__wbg_ptr = ptr;
|
|
2235
|
+
SigninDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2236
|
+
return obj;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
__destroy_into_raw() {
|
|
2240
|
+
const ptr = this.__wbg_ptr;
|
|
2241
|
+
this.__wbg_ptr = 0;
|
|
2242
|
+
SigninDeepLinkFinalization.unregister(this);
|
|
2243
|
+
return ptr;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
free() {
|
|
2247
|
+
const ptr = this.__destroy_into_raw();
|
|
2248
|
+
wasm.__wbg_signindeeplink_free(ptr, 0);
|
|
2249
|
+
}
|
|
2250
|
+
/**
|
|
2251
|
+
* @param {string} url
|
|
2252
|
+
* @returns {SigninDeepLink}
|
|
2253
|
+
*/
|
|
2254
|
+
static parse(url) {
|
|
2255
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2256
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2257
|
+
const ret = wasm.signindeeplink_parse(ptr0, len0);
|
|
2258
|
+
if (ret[2]) {
|
|
2259
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2260
|
+
}
|
|
2261
|
+
return SigninDeepLink.__wrap(ret[0]);
|
|
2262
|
+
}
|
|
2263
|
+
/**
|
|
2264
|
+
* @returns {string}
|
|
2265
|
+
*/
|
|
2266
|
+
get capabilities() {
|
|
2267
|
+
let deferred1_0;
|
|
2268
|
+
let deferred1_1;
|
|
2269
|
+
try {
|
|
2270
|
+
const ret = wasm.signindeeplink_capabilities(this.__wbg_ptr);
|
|
2271
|
+
deferred1_0 = ret[0];
|
|
2272
|
+
deferred1_1 = ret[1];
|
|
2273
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2274
|
+
} finally {
|
|
2275
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* @returns {string}
|
|
2280
|
+
*/
|
|
2281
|
+
get baseRelayUrl() {
|
|
2282
|
+
let deferred1_0;
|
|
2283
|
+
let deferred1_1;
|
|
2284
|
+
try {
|
|
2285
|
+
const ret = wasm.signindeeplink_baseRelayUrl(this.__wbg_ptr);
|
|
2286
|
+
deferred1_0 = ret[0];
|
|
2287
|
+
deferred1_1 = ret[1];
|
|
2288
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2289
|
+
} finally {
|
|
2290
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* @returns {Uint8Array}
|
|
2295
|
+
*/
|
|
2296
|
+
get secret() {
|
|
2297
|
+
const ret = wasm.signindeeplink_secret(this.__wbg_ptr);
|
|
2298
|
+
return ret;
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* @returns {string}
|
|
2302
|
+
*/
|
|
2303
|
+
toString() {
|
|
2304
|
+
let deferred1_0;
|
|
2305
|
+
let deferred1_1;
|
|
2306
|
+
try {
|
|
2307
|
+
const ret = wasm.signindeeplink_toString(this.__wbg_ptr);
|
|
2308
|
+
deferred1_0 = ret[0];
|
|
2309
|
+
deferred1_1 = ret[1];
|
|
2310
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2311
|
+
} finally {
|
|
2312
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
if (Symbol.dispose) SigninDeepLink.prototype[Symbol.dispose] = SigninDeepLink.prototype.free;
|
|
2317
|
+
|
|
2318
|
+
exports.SigninDeepLink = SigninDeepLink;
|
|
2319
|
+
|
|
2320
|
+
const SignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2321
|
+
? { register: () => {}, unregister: () => {} }
|
|
2322
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr >>> 0, 1));
|
|
2323
|
+
|
|
2324
|
+
class SignupDeepLink {
|
|
2325
|
+
|
|
2326
|
+
static __wrap(ptr) {
|
|
2327
|
+
ptr = ptr >>> 0;
|
|
2328
|
+
const obj = Object.create(SignupDeepLink.prototype);
|
|
2329
|
+
obj.__wbg_ptr = ptr;
|
|
2330
|
+
SignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2331
|
+
return obj;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
__destroy_into_raw() {
|
|
2335
|
+
const ptr = this.__wbg_ptr;
|
|
2336
|
+
this.__wbg_ptr = 0;
|
|
2337
|
+
SignupDeepLinkFinalization.unregister(this);
|
|
2338
|
+
return ptr;
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
free() {
|
|
2342
|
+
const ptr = this.__destroy_into_raw();
|
|
2343
|
+
wasm.__wbg_signupdeeplink_free(ptr, 0);
|
|
2344
|
+
}
|
|
2345
|
+
/**
|
|
2346
|
+
* @param {string} url
|
|
2347
|
+
* @returns {SignupDeepLink}
|
|
2348
|
+
*/
|
|
2349
|
+
static parse(url) {
|
|
2350
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2351
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2352
|
+
const ret = wasm.signupdeeplink_parse(ptr0, len0);
|
|
2353
|
+
if (ret[2]) {
|
|
2354
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2355
|
+
}
|
|
2356
|
+
return SignupDeepLink.__wrap(ret[0]);
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* @returns {string}
|
|
2360
|
+
*/
|
|
2361
|
+
get capabilities() {
|
|
2362
|
+
let deferred1_0;
|
|
2363
|
+
let deferred1_1;
|
|
2364
|
+
try {
|
|
2365
|
+
const ret = wasm.signupdeeplink_capabilities(this.__wbg_ptr);
|
|
2366
|
+
deferred1_0 = ret[0];
|
|
2367
|
+
deferred1_1 = ret[1];
|
|
2368
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2369
|
+
} finally {
|
|
2370
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
/**
|
|
2374
|
+
* @returns {string}
|
|
2375
|
+
*/
|
|
2376
|
+
get baseRelayUrl() {
|
|
2377
|
+
let deferred1_0;
|
|
2378
|
+
let deferred1_1;
|
|
2379
|
+
try {
|
|
2380
|
+
const ret = wasm.signupdeeplink_baseRelayUrl(this.__wbg_ptr);
|
|
2381
|
+
deferred1_0 = ret[0];
|
|
2382
|
+
deferred1_1 = ret[1];
|
|
2383
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2384
|
+
} finally {
|
|
2385
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* @returns {Uint8Array}
|
|
2390
|
+
*/
|
|
2391
|
+
get secret() {
|
|
2392
|
+
const ret = wasm.signupdeeplink_secret(this.__wbg_ptr);
|
|
2393
|
+
return ret;
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* @returns {PublicKey}
|
|
2397
|
+
*/
|
|
2398
|
+
get homeserver() {
|
|
2399
|
+
const ret = wasm.signupdeeplink_homeserver(this.__wbg_ptr);
|
|
2400
|
+
return PublicKey.__wrap(ret);
|
|
2401
|
+
}
|
|
2402
|
+
/**
|
|
2403
|
+
* @returns {string | undefined}
|
|
2404
|
+
*/
|
|
2405
|
+
get signupToken() {
|
|
2406
|
+
const ret = wasm.signupdeeplink_signupToken(this.__wbg_ptr);
|
|
2407
|
+
let v1;
|
|
2408
|
+
if (ret[0] !== 0) {
|
|
2409
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
2410
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2411
|
+
}
|
|
2412
|
+
return v1;
|
|
2413
|
+
}
|
|
2414
|
+
/**
|
|
2415
|
+
* @returns {string}
|
|
2416
|
+
*/
|
|
2417
|
+
toString() {
|
|
2418
|
+
let deferred1_0;
|
|
2419
|
+
let deferred1_1;
|
|
2420
|
+
try {
|
|
2421
|
+
const ret = wasm.signupdeeplink_toString(this.__wbg_ptr);
|
|
2422
|
+
deferred1_0 = ret[0];
|
|
2423
|
+
deferred1_1 = ret[1];
|
|
2424
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2425
|
+
} finally {
|
|
2426
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
if (Symbol.dispose) SignupDeepLink.prototype[Symbol.dispose] = SignupDeepLink.prototype.free;
|
|
1970
2431
|
|
|
1971
|
-
|
|
2432
|
+
exports.SignupDeepLink = SignupDeepLink;
|
|
2433
|
+
|
|
2434
|
+
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
1972
2435
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1973
2436
|
return ret;
|
|
1974
2437
|
};
|
|
1975
2438
|
|
|
1976
|
-
|
|
2439
|
+
exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1977
2440
|
const ret = String(arg1);
|
|
1978
2441
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1979
2442
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1981,186 +2444,272 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
|
1981
2444
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1982
2445
|
};
|
|
1983
2446
|
|
|
1984
|
-
|
|
1985
|
-
|
|
2447
|
+
exports.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
2448
|
+
const v = arg1;
|
|
2449
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
2450
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2451
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2454
|
+
exports.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
2455
|
+
const v = arg0;
|
|
2456
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
2457
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2460
|
+
exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
2461
|
+
const ret = debugString(arg1);
|
|
2462
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2463
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2464
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2465
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
exports.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
2469
|
+
const ret = arg0 in arg1;
|
|
2470
|
+
return ret;
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
exports.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
2474
|
+
const ret = typeof(arg0) === 'bigint';
|
|
2475
|
+
return ret;
|
|
2476
|
+
};
|
|
2477
|
+
|
|
2478
|
+
exports.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
2479
|
+
const ret = typeof(arg0) === 'function';
|
|
2480
|
+
return ret;
|
|
2481
|
+
};
|
|
2482
|
+
|
|
2483
|
+
exports.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
|
|
2484
|
+
const ret = arg0 === null;
|
|
2485
|
+
return ret;
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
exports.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
2489
|
+
const val = arg0;
|
|
2490
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2491
|
+
return ret;
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2494
|
+
exports.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
2495
|
+
const ret = typeof(arg0) === 'string';
|
|
2496
|
+
return ret;
|
|
2497
|
+
};
|
|
2498
|
+
|
|
2499
|
+
exports.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
2500
|
+
const ret = arg0 === undefined;
|
|
2501
|
+
return ret;
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
exports.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
2505
|
+
const ret = arg0 === arg1;
|
|
2506
|
+
return ret;
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
exports.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
2510
|
+
const ret = arg0 == arg1;
|
|
2511
|
+
return ret;
|
|
2512
|
+
};
|
|
2513
|
+
|
|
2514
|
+
exports.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
2515
|
+
const obj = arg1;
|
|
2516
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2517
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2518
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2521
|
+
exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
2522
|
+
const obj = arg1;
|
|
2523
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2524
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2525
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2526
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2527
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2528
|
+
};
|
|
2529
|
+
|
|
2530
|
+
exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
2531
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1986
2532
|
};
|
|
1987
2533
|
|
|
1988
|
-
|
|
2534
|
+
exports.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
|
|
2535
|
+
arg0._wbg_cb_unref();
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2538
|
+
exports.__wbg_abort_28ad55c5825b004d = function(arg0, arg1) {
|
|
1989
2539
|
arg0.abort(arg1);
|
|
1990
2540
|
};
|
|
1991
2541
|
|
|
1992
|
-
|
|
2542
|
+
exports.__wbg_abort_e7eb059f72f9ed0c = function(arg0) {
|
|
2543
|
+
arg0.abort();
|
|
2544
|
+
};
|
|
2545
|
+
|
|
2546
|
+
exports.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1993
2547
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1994
2548
|
}, arguments) };
|
|
1995
2549
|
|
|
1996
|
-
|
|
2550
|
+
exports.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
|
|
1997
2551
|
const ret = arg0.arrayBuffer();
|
|
1998
2552
|
return ret;
|
|
1999
2553
|
}, arguments) };
|
|
2000
2554
|
|
|
2001
|
-
|
|
2555
|
+
exports.__wbg_authtoken_new = function(arg0) {
|
|
2002
2556
|
const ret = AuthToken.__wrap(arg0);
|
|
2003
2557
|
return ret;
|
|
2004
2558
|
};
|
|
2005
2559
|
|
|
2006
|
-
|
|
2560
|
+
exports.__wbg_body_587542b2fd8e06c0 = function(arg0) {
|
|
2007
2561
|
const ret = arg0.body;
|
|
2008
2562
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2009
2563
|
};
|
|
2010
2564
|
|
|
2011
|
-
|
|
2012
|
-
const ret = arg0.buffer;
|
|
2013
|
-
return ret;
|
|
2014
|
-
};
|
|
2015
|
-
|
|
2016
|
-
module.exports.__wbg_buffer_e495ba54cee589cc = function(arg0) {
|
|
2565
|
+
exports.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
|
|
2017
2566
|
const ret = arg0.buffer;
|
|
2018
2567
|
return ret;
|
|
2019
2568
|
};
|
|
2020
2569
|
|
|
2021
|
-
|
|
2570
|
+
exports.__wbg_byobRequest_2344e6975f27456e = function(arg0) {
|
|
2022
2571
|
const ret = arg0.byobRequest;
|
|
2023
2572
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2024
2573
|
};
|
|
2025
2574
|
|
|
2026
|
-
|
|
2575
|
+
exports.__wbg_byteLength_bcd42e4025299788 = function(arg0) {
|
|
2027
2576
|
const ret = arg0.byteLength;
|
|
2028
2577
|
return ret;
|
|
2029
2578
|
};
|
|
2030
2579
|
|
|
2031
|
-
|
|
2580
|
+
exports.__wbg_byteOffset_ca3a6cf7944b364b = function(arg0) {
|
|
2032
2581
|
const ret = arg0.byteOffset;
|
|
2033
2582
|
return ret;
|
|
2034
2583
|
};
|
|
2035
2584
|
|
|
2036
|
-
|
|
2585
|
+
exports.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2037
2586
|
const ret = arg0.call(arg1, arg2);
|
|
2038
2587
|
return ret;
|
|
2039
2588
|
}, arguments) };
|
|
2040
2589
|
|
|
2041
|
-
|
|
2590
|
+
exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
|
|
2042
2591
|
const ret = arg0.call(arg1);
|
|
2043
2592
|
return ret;
|
|
2044
2593
|
}, arguments) };
|
|
2045
2594
|
|
|
2046
|
-
|
|
2595
|
+
exports.__wbg_cancel_48ab6f9dc366e369 = function(arg0) {
|
|
2047
2596
|
const ret = arg0.cancel();
|
|
2048
2597
|
return ret;
|
|
2049
2598
|
};
|
|
2050
2599
|
|
|
2051
|
-
|
|
2600
|
+
exports.__wbg_catch_943836faa5d29bfb = function(arg0, arg1) {
|
|
2052
2601
|
const ret = arg0.catch(arg1);
|
|
2053
2602
|
return ret;
|
|
2054
2603
|
};
|
|
2055
2604
|
|
|
2056
|
-
|
|
2605
|
+
exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
|
|
2057
2606
|
const ret = clearTimeout(arg0);
|
|
2058
2607
|
return ret;
|
|
2059
2608
|
};
|
|
2060
2609
|
|
|
2061
|
-
|
|
2610
|
+
exports.__wbg_close_5a6caed3231b68cd = function() { return handleError(function (arg0) {
|
|
2062
2611
|
arg0.close();
|
|
2063
2612
|
}, arguments) };
|
|
2064
2613
|
|
|
2065
|
-
|
|
2614
|
+
exports.__wbg_close_6956df845478561a = function() { return handleError(function (arg0) {
|
|
2066
2615
|
arg0.close();
|
|
2067
2616
|
}, arguments) };
|
|
2068
2617
|
|
|
2069
|
-
|
|
2618
|
+
exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
2070
2619
|
const ret = arg0.crypto;
|
|
2071
2620
|
return ret;
|
|
2072
2621
|
};
|
|
2073
2622
|
|
|
2074
|
-
|
|
2623
|
+
exports.__wbg_debug_e55e1461940eb14d = function(arg0, arg1, arg2, arg3) {
|
|
2075
2624
|
console.debug(arg0, arg1, arg2, arg3);
|
|
2076
2625
|
};
|
|
2077
2626
|
|
|
2078
|
-
|
|
2627
|
+
exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
2079
2628
|
const ret = arg0.done;
|
|
2080
2629
|
return ret;
|
|
2081
2630
|
};
|
|
2082
2631
|
|
|
2083
|
-
|
|
2632
|
+
exports.__wbg_enqueue_7b18a650aec77898 = function() { return handleError(function (arg0, arg1) {
|
|
2084
2633
|
arg0.enqueue(arg1);
|
|
2085
2634
|
}, arguments) };
|
|
2086
2635
|
|
|
2087
|
-
|
|
2636
|
+
exports.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
2088
2637
|
const ret = Object.entries(arg0);
|
|
2089
2638
|
return ret;
|
|
2090
2639
|
};
|
|
2091
2640
|
|
|
2092
|
-
|
|
2641
|
+
exports.__wbg_error_d8b22cf4e59a6791 = function(arg0, arg1, arg2, arg3) {
|
|
2093
2642
|
console.error(arg0, arg1, arg2, arg3);
|
|
2094
2643
|
};
|
|
2095
2644
|
|
|
2096
|
-
|
|
2645
|
+
exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
|
|
2097
2646
|
const ret = fetch(arg0);
|
|
2098
2647
|
return ret;
|
|
2099
2648
|
};
|
|
2100
2649
|
|
|
2101
|
-
|
|
2102
|
-
const ret =
|
|
2650
|
+
exports.__wbg_fetch_cd778f2325984326 = function(arg0) {
|
|
2651
|
+
const ret = fetch(arg0);
|
|
2103
2652
|
return ret;
|
|
2104
2653
|
};
|
|
2105
2654
|
|
|
2106
|
-
|
|
2107
|
-
const ret = fetch(
|
|
2655
|
+
exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
|
|
2656
|
+
const ret = arg0.fetch(arg1);
|
|
2108
2657
|
return ret;
|
|
2109
2658
|
};
|
|
2110
2659
|
|
|
2111
|
-
|
|
2660
|
+
exports.__wbg_from_a4ad7cbddd0d7135 = function(arg0) {
|
|
2112
2661
|
const ret = Array.from(arg0);
|
|
2113
2662
|
return ret;
|
|
2114
2663
|
};
|
|
2115
2664
|
|
|
2116
|
-
|
|
2665
|
+
exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
2117
2666
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
2118
2667
|
}, arguments) };
|
|
2119
2668
|
|
|
2120
|
-
|
|
2669
|
+
exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
2121
2670
|
arg0.getRandomValues(arg1);
|
|
2122
2671
|
}, arguments) };
|
|
2123
2672
|
|
|
2124
|
-
|
|
2673
|
+
exports.__wbg_getReader_48e00749fe3f6089 = function() { return handleError(function (arg0) {
|
|
2125
2674
|
const ret = arg0.getReader();
|
|
2126
2675
|
return ret;
|
|
2127
2676
|
}, arguments) };
|
|
2128
2677
|
|
|
2129
|
-
|
|
2130
|
-
const ret = Reflect.get(arg0, arg1);
|
|
2131
|
-
return ret;
|
|
2132
|
-
}, arguments) };
|
|
2133
|
-
|
|
2134
|
-
module.exports.__wbg_get_a131a44bd1eb6979 = function(arg0, arg1) {
|
|
2678
|
+
exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
2135
2679
|
const ret = arg0[arg1 >>> 0];
|
|
2136
2680
|
return ret;
|
|
2137
2681
|
};
|
|
2138
2682
|
|
|
2139
|
-
|
|
2683
|
+
exports.__wbg_get_done_a0463af43a1fc764 = function(arg0) {
|
|
2140
2684
|
const ret = arg0.done;
|
|
2141
2685
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
2142
2686
|
};
|
|
2143
2687
|
|
|
2144
|
-
|
|
2688
|
+
exports.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
|
|
2689
|
+
const ret = Reflect.get(arg0, arg1);
|
|
2690
|
+
return ret;
|
|
2691
|
+
}, arguments) };
|
|
2692
|
+
|
|
2693
|
+
exports.__wbg_get_value_5ce96c9f81ce7398 = function(arg0) {
|
|
2145
2694
|
const ret = arg0.value;
|
|
2146
2695
|
return ret;
|
|
2147
2696
|
};
|
|
2148
2697
|
|
|
2149
|
-
|
|
2698
|
+
exports.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
|
|
2150
2699
|
const ret = Reflect.has(arg0, arg1);
|
|
2151
2700
|
return ret;
|
|
2152
2701
|
}, arguments) };
|
|
2153
2702
|
|
|
2154
|
-
|
|
2703
|
+
exports.__wbg_headers_b87d7eaba61c3278 = function(arg0) {
|
|
2155
2704
|
const ret = arg0.headers;
|
|
2156
2705
|
return ret;
|
|
2157
2706
|
};
|
|
2158
2707
|
|
|
2159
|
-
|
|
2708
|
+
exports.__wbg_info_68cd5b51ef7e5137 = function(arg0, arg1, arg2, arg3) {
|
|
2160
2709
|
console.info(arg0, arg1, arg2, arg3);
|
|
2161
2710
|
};
|
|
2162
2711
|
|
|
2163
|
-
|
|
2712
|
+
exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
2164
2713
|
let result;
|
|
2165
2714
|
try {
|
|
2166
2715
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -2171,7 +2720,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_a8b6f580b363f2bc = function(arg0) {
|
|
|
2171
2720
|
return ret;
|
|
2172
2721
|
};
|
|
2173
2722
|
|
|
2174
|
-
|
|
2723
|
+
exports.__wbg_instanceof_Error_a944ec10920129e2 = function(arg0) {
|
|
2175
2724
|
let result;
|
|
2176
2725
|
try {
|
|
2177
2726
|
result = arg0 instanceof Error;
|
|
@@ -2182,7 +2731,7 @@ module.exports.__wbg_instanceof_Error_58a92d81483a4b16 = function(arg0) {
|
|
|
2182
2731
|
return ret;
|
|
2183
2732
|
};
|
|
2184
2733
|
|
|
2185
|
-
|
|
2734
|
+
exports.__wbg_instanceof_Headers_e1daf97ed6a469e9 = function(arg0) {
|
|
2186
2735
|
let result;
|
|
2187
2736
|
try {
|
|
2188
2737
|
result = arg0 instanceof Headers;
|
|
@@ -2193,7 +2742,7 @@ module.exports.__wbg_instanceof_Headers_8b4c0df841a5ed48 = function(arg0) {
|
|
|
2193
2742
|
return ret;
|
|
2194
2743
|
};
|
|
2195
2744
|
|
|
2196
|
-
|
|
2745
|
+
exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
2197
2746
|
let result;
|
|
2198
2747
|
try {
|
|
2199
2748
|
result = arg0 instanceof Map;
|
|
@@ -2204,7 +2753,7 @@ module.exports.__wbg_instanceof_Map_80cc65041c96417a = function(arg0) {
|
|
|
2204
2753
|
return ret;
|
|
2205
2754
|
};
|
|
2206
2755
|
|
|
2207
|
-
|
|
2756
|
+
exports.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
|
|
2208
2757
|
let result;
|
|
2209
2758
|
try {
|
|
2210
2759
|
result = arg0 instanceof Response;
|
|
@@ -2215,7 +2764,7 @@ module.exports.__wbg_instanceof_Response_e80ce8b7a2b968d2 = function(arg0) {
|
|
|
2215
2764
|
return ret;
|
|
2216
2765
|
};
|
|
2217
2766
|
|
|
2218
|
-
|
|
2767
|
+
exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
2219
2768
|
let result;
|
|
2220
2769
|
try {
|
|
2221
2770
|
result = arg0 instanceof Uint8Array;
|
|
@@ -2226,78 +2775,58 @@ module.exports.__wbg_instanceof_Uint8Array_ca460677bc155827 = function(arg0) {
|
|
|
2226
2775
|
return ret;
|
|
2227
2776
|
};
|
|
2228
2777
|
|
|
2229
|
-
|
|
2778
|
+
exports.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
2230
2779
|
const ret = Array.isArray(arg0);
|
|
2231
2780
|
return ret;
|
|
2232
2781
|
};
|
|
2233
2782
|
|
|
2234
|
-
|
|
2783
|
+
exports.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
2235
2784
|
const ret = Number.isSafeInteger(arg0);
|
|
2236
2785
|
return ret;
|
|
2237
2786
|
};
|
|
2238
2787
|
|
|
2239
|
-
|
|
2788
|
+
exports.__wbg_iterator_e5822695327a3c39 = function() {
|
|
2240
2789
|
const ret = Symbol.iterator;
|
|
2241
2790
|
return ret;
|
|
2242
2791
|
};
|
|
2243
2792
|
|
|
2244
|
-
|
|
2793
|
+
exports.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
2245
2794
|
const ret = arg0.length;
|
|
2246
2795
|
return ret;
|
|
2247
2796
|
};
|
|
2248
2797
|
|
|
2249
|
-
|
|
2798
|
+
exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
2250
2799
|
const ret = arg0.length;
|
|
2251
2800
|
return ret;
|
|
2252
2801
|
};
|
|
2253
2802
|
|
|
2254
|
-
|
|
2803
|
+
exports.__wbg_log_45eb3a49e7cdcb64 = function(arg0, arg1, arg2, arg3) {
|
|
2255
2804
|
console.log(arg0, arg1, arg2, arg3);
|
|
2256
2805
|
};
|
|
2257
2806
|
|
|
2258
|
-
|
|
2807
|
+
exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
2259
2808
|
const ret = arg0.msCrypto;
|
|
2260
2809
|
return ret;
|
|
2261
2810
|
};
|
|
2262
2811
|
|
|
2263
|
-
|
|
2812
|
+
exports.__wbg_new_1acc0b6eea89d040 = function() {
|
|
2264
2813
|
const ret = new Object();
|
|
2265
2814
|
return ret;
|
|
2266
2815
|
};
|
|
2267
2816
|
|
|
2268
|
-
|
|
2817
|
+
exports.__wbg_new_2531773dac38ebb3 = function() { return handleError(function () {
|
|
2269
2818
|
const ret = new AbortController();
|
|
2270
2819
|
return ret;
|
|
2271
2820
|
}, arguments) };
|
|
2272
2821
|
|
|
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) {
|
|
2822
|
+
exports.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
|
|
2294
2823
|
try {
|
|
2295
2824
|
var state0 = {a: arg0, b: arg1};
|
|
2296
2825
|
var cb0 = (arg0, arg1) => {
|
|
2297
2826
|
const a = state0.a;
|
|
2298
2827
|
state0.a = 0;
|
|
2299
2828
|
try {
|
|
2300
|
-
return
|
|
2829
|
+
return wasm_bindgen__convert__closures_____invoke__h07d45d2c9c5e1bbe(a, state0.b, arg0, arg1);
|
|
2301
2830
|
} finally {
|
|
2302
2831
|
state0.a = a;
|
|
2303
2832
|
}
|
|
@@ -2309,262 +2838,296 @@ module.exports.__wbg_new_e30c39c06edaabf2 = function(arg0, arg1) {
|
|
|
2309
2838
|
}
|
|
2310
2839
|
};
|
|
2311
2840
|
|
|
2312
|
-
|
|
2841
|
+
exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
2313
2842
|
const ret = new Uint8Array(arg0);
|
|
2314
2843
|
return ret;
|
|
2315
2844
|
};
|
|
2316
2845
|
|
|
2317
|
-
|
|
2846
|
+
exports.__wbg_new_68651c719dcda04e = function() {
|
|
2847
|
+
const ret = new Map();
|
|
2848
|
+
return ret;
|
|
2849
|
+
};
|
|
2850
|
+
|
|
2851
|
+
exports.__wbg_new_9edf9838a2def39c = function() { return handleError(function () {
|
|
2852
|
+
const ret = new Headers();
|
|
2853
|
+
return ret;
|
|
2854
|
+
}, arguments) };
|
|
2855
|
+
|
|
2856
|
+
exports.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
|
|
2857
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2858
|
+
return ret;
|
|
2859
|
+
};
|
|
2860
|
+
|
|
2861
|
+
exports.__wbg_new_e17d9f43105b08be = function() {
|
|
2862
|
+
const ret = new Array();
|
|
2863
|
+
return ret;
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2866
|
+
exports.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
|
|
2318
2867
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2319
2868
|
return ret;
|
|
2320
2869
|
};
|
|
2321
2870
|
|
|
2322
|
-
|
|
2871
|
+
exports.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
|
|
2323
2872
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2324
2873
|
return ret;
|
|
2325
2874
|
};
|
|
2326
2875
|
|
|
2327
|
-
|
|
2876
|
+
exports.__wbg_new_with_byte_offset_and_length_46e3e6a5e9f9e89b = function(arg0, arg1, arg2) {
|
|
2328
2877
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
2329
2878
|
return ret;
|
|
2330
2879
|
};
|
|
2331
2880
|
|
|
2332
|
-
|
|
2881
|
+
exports.__wbg_new_with_into_underlying_source_b47f6a6a596a7f24 = function(arg0, arg1) {
|
|
2333
2882
|
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
|
|
2334
2883
|
return ret;
|
|
2335
2884
|
};
|
|
2336
2885
|
|
|
2337
|
-
|
|
2886
|
+
exports.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
|
|
2338
2887
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
2339
2888
|
return ret;
|
|
2340
2889
|
};
|
|
2341
2890
|
|
|
2342
|
-
|
|
2891
|
+
exports.__wbg_new_with_opt_readable_stream_and_init_b3dac7204db32cac = function() { return handleError(function (arg0, arg1) {
|
|
2343
2892
|
const ret = new Response(arg0, arg1);
|
|
2344
2893
|
return ret;
|
|
2345
2894
|
}, arguments) };
|
|
2346
2895
|
|
|
2347
|
-
|
|
2896
|
+
exports.__wbg_new_with_str_and_init_0ae7728b6ec367b1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2348
2897
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
2349
2898
|
return ret;
|
|
2350
2899
|
}, arguments) };
|
|
2351
2900
|
|
|
2352
|
-
|
|
2901
|
+
exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
|
|
2902
|
+
const ret = arg0.next();
|
|
2903
|
+
return ret;
|
|
2904
|
+
}, arguments) };
|
|
2905
|
+
|
|
2906
|
+
exports.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
2353
2907
|
const ret = arg0.next;
|
|
2354
2908
|
return ret;
|
|
2355
2909
|
};
|
|
2356
2910
|
|
|
2357
|
-
|
|
2358
|
-
const ret = arg0.
|
|
2911
|
+
exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
2912
|
+
const ret = arg0.node;
|
|
2359
2913
|
return ret;
|
|
2360
|
-
}
|
|
2914
|
+
};
|
|
2361
2915
|
|
|
2362
|
-
|
|
2363
|
-
const ret = arg0.
|
|
2916
|
+
exports.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
2917
|
+
const ret = arg0.now();
|
|
2364
2918
|
return ret;
|
|
2365
2919
|
};
|
|
2366
2920
|
|
|
2367
|
-
|
|
2921
|
+
exports.__wbg_now_793306c526e2e3b6 = function() {
|
|
2368
2922
|
const ret = Date.now();
|
|
2369
2923
|
return ret;
|
|
2370
2924
|
};
|
|
2371
2925
|
|
|
2372
|
-
|
|
2926
|
+
exports.__wbg_parse_2a704d6b78abb2b8 = function() { return handleError(function (arg0, arg1) {
|
|
2373
2927
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
2374
2928
|
return ret;
|
|
2375
2929
|
}, arguments) };
|
|
2376
2930
|
|
|
2377
|
-
|
|
2378
|
-
const ret = arg0.
|
|
2931
|
+
exports.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
2932
|
+
const ret = arg0.performance;
|
|
2379
2933
|
return ret;
|
|
2380
2934
|
};
|
|
2381
2935
|
|
|
2382
|
-
|
|
2383
|
-
const ret =
|
|
2936
|
+
exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
2937
|
+
const ret = arg0.process;
|
|
2384
2938
|
return ret;
|
|
2385
2939
|
};
|
|
2386
2940
|
|
|
2387
|
-
|
|
2388
|
-
|
|
2941
|
+
exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
2942
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2943
|
+
};
|
|
2944
|
+
|
|
2945
|
+
exports.__wbg_publickey_new = function(arg0) {
|
|
2946
|
+
const ret = PublicKey.__wrap(arg0);
|
|
2947
|
+
return ret;
|
|
2389
2948
|
};
|
|
2390
2949
|
|
|
2391
|
-
|
|
2950
|
+
exports.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
|
|
2392
2951
|
const ret = arg0.queueMicrotask;
|
|
2393
2952
|
return ret;
|
|
2394
2953
|
};
|
|
2395
2954
|
|
|
2396
|
-
|
|
2955
|
+
exports.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
|
|
2956
|
+
queueMicrotask(arg0);
|
|
2957
|
+
};
|
|
2958
|
+
|
|
2959
|
+
exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
2397
2960
|
arg0.randomFillSync(arg1);
|
|
2398
2961
|
}, arguments) };
|
|
2399
2962
|
|
|
2400
|
-
|
|
2963
|
+
exports.__wbg_read_48f1593df542f968 = function(arg0) {
|
|
2401
2964
|
const ret = arg0.read();
|
|
2402
2965
|
return ret;
|
|
2403
2966
|
};
|
|
2404
2967
|
|
|
2405
|
-
|
|
2968
|
+
exports.__wbg_releaseLock_5d0b5a68887b891d = function(arg0) {
|
|
2406
2969
|
arg0.releaseLock();
|
|
2407
2970
|
};
|
|
2408
2971
|
|
|
2409
|
-
|
|
2972
|
+
exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
2410
2973
|
const ret = module.require;
|
|
2411
2974
|
return ret;
|
|
2412
2975
|
}, arguments) };
|
|
2413
2976
|
|
|
2414
|
-
|
|
2977
|
+
exports.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
|
|
2415
2978
|
const ret = Promise.resolve(arg0);
|
|
2416
2979
|
return ret;
|
|
2417
2980
|
};
|
|
2418
2981
|
|
|
2419
|
-
|
|
2982
|
+
exports.__wbg_respond_0f4dbf5386f5c73e = function() { return handleError(function (arg0, arg1) {
|
|
2420
2983
|
arg0.respond(arg1 >>> 0);
|
|
2421
2984
|
}, arguments) };
|
|
2422
2985
|
|
|
2423
|
-
|
|
2986
|
+
exports.__wbg_session_new = function(arg0) {
|
|
2424
2987
|
const ret = Session.__wrap(arg0);
|
|
2425
2988
|
return ret;
|
|
2426
2989
|
};
|
|
2427
2990
|
|
|
2428
|
-
|
|
2991
|
+
exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
|
|
2429
2992
|
const ret = setTimeout(arg0, arg1);
|
|
2430
2993
|
return ret;
|
|
2431
2994
|
};
|
|
2432
2995
|
|
|
2433
|
-
|
|
2996
|
+
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
2434
2997
|
arg0[arg1] = arg2;
|
|
2435
2998
|
};
|
|
2436
2999
|
|
|
2437
|
-
|
|
2438
|
-
arg0[arg1 >>> 0] = arg2;
|
|
2439
|
-
};
|
|
2440
|
-
|
|
2441
|
-
module.exports.__wbg_set_b042eef31c50834d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3000
|
+
exports.__wbg_set_8b342d8cd9d2a02c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2442
3001
|
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2443
3002
|
}, arguments) };
|
|
2444
3003
|
|
|
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) {
|
|
3004
|
+
exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
2451
3005
|
const ret = arg0.set(arg1, arg2);
|
|
2452
3006
|
return ret;
|
|
2453
3007
|
};
|
|
2454
3008
|
|
|
2455
|
-
|
|
2456
|
-
arg0.set(arg1, arg2
|
|
3009
|
+
exports.__wbg_set_9e6516df7b7d0f19 = function(arg0, arg1, arg2) {
|
|
3010
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
2457
3011
|
};
|
|
2458
3012
|
|
|
2459
|
-
|
|
3013
|
+
exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
|
|
2460
3014
|
arg0.body = arg1;
|
|
2461
3015
|
};
|
|
2462
3016
|
|
|
2463
|
-
|
|
3017
|
+
exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
3018
|
+
arg0[arg1 >>> 0] = arg2;
|
|
3019
|
+
};
|
|
3020
|
+
|
|
3021
|
+
exports.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3022
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
3023
|
+
return ret;
|
|
3024
|
+
}, arguments) };
|
|
3025
|
+
|
|
3026
|
+
exports.__wbg_set_cache_2f9deb19b92b81e3 = function(arg0, arg1) {
|
|
2464
3027
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
2465
3028
|
};
|
|
2466
3029
|
|
|
2467
|
-
|
|
3030
|
+
exports.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
|
|
2468
3031
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2469
3032
|
};
|
|
2470
3033
|
|
|
2471
|
-
|
|
3034
|
+
exports.__wbg_set_headers_107379072e02fee5 = function(arg0, arg1) {
|
|
2472
3035
|
arg0.headers = arg1;
|
|
2473
3036
|
};
|
|
2474
3037
|
|
|
2475
|
-
|
|
3038
|
+
exports.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
|
|
2476
3039
|
arg0.headers = arg1;
|
|
2477
3040
|
};
|
|
2478
3041
|
|
|
2479
|
-
|
|
3042
|
+
exports.__wbg_set_high_water_mark_5142ac1d2fb46365 = function(arg0, arg1) {
|
|
2480
3043
|
arg0.highWaterMark = arg1;
|
|
2481
3044
|
};
|
|
2482
3045
|
|
|
2483
|
-
|
|
3046
|
+
exports.__wbg_set_method_c02d8cbbe204ac2d = function(arg0, arg1, arg2) {
|
|
2484
3047
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
2485
3048
|
};
|
|
2486
3049
|
|
|
2487
|
-
|
|
3050
|
+
exports.__wbg_set_mode_52ef73cfa79639cb = function(arg0, arg1) {
|
|
2488
3051
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2489
3052
|
};
|
|
2490
3053
|
|
|
2491
|
-
|
|
3054
|
+
exports.__wbg_set_name_d94846a29e626702 = function(arg0, arg1, arg2) {
|
|
2492
3055
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
2493
3056
|
};
|
|
2494
3057
|
|
|
2495
|
-
|
|
3058
|
+
exports.__wbg_set_signal_dda2cf7ccb6bee0f = function(arg0, arg1) {
|
|
2496
3059
|
arg0.signal = arg1;
|
|
2497
3060
|
};
|
|
2498
3061
|
|
|
2499
|
-
|
|
3062
|
+
exports.__wbg_set_status_886bf143c25d0706 = function(arg0, arg1) {
|
|
2500
3063
|
arg0.status = arg1;
|
|
2501
3064
|
};
|
|
2502
3065
|
|
|
2503
|
-
|
|
3066
|
+
exports.__wbg_set_status_text_3d83b7e559c076b2 = function(arg0, arg1, arg2) {
|
|
2504
3067
|
arg0.statusText = getStringFromWasm0(arg1, arg2);
|
|
2505
3068
|
};
|
|
2506
3069
|
|
|
2507
|
-
|
|
3070
|
+
exports.__wbg_signal_4db5aa055bf9eb9a = function(arg0) {
|
|
2508
3071
|
const ret = arg0.signal;
|
|
2509
3072
|
return ret;
|
|
2510
3073
|
};
|
|
2511
3074
|
|
|
2512
|
-
|
|
3075
|
+
exports.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
|
|
2513
3076
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2514
3077
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2515
3078
|
};
|
|
2516
3079
|
|
|
2517
|
-
|
|
3080
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
|
|
2518
3081
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2519
3082
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2520
3083
|
};
|
|
2521
3084
|
|
|
2522
|
-
|
|
3085
|
+
exports.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
|
|
2523
3086
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2524
3087
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2525
3088
|
};
|
|
2526
3089
|
|
|
2527
|
-
|
|
3090
|
+
exports.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
|
|
2528
3091
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2529
3092
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2530
3093
|
};
|
|
2531
3094
|
|
|
2532
|
-
|
|
3095
|
+
exports.__wbg_status_de7eed5a7a5bfd5d = function(arg0) {
|
|
2533
3096
|
const ret = arg0.status;
|
|
2534
3097
|
return ret;
|
|
2535
3098
|
};
|
|
2536
3099
|
|
|
2537
|
-
|
|
3100
|
+
exports.__wbg_stringify_b5fb28f6465d9c3e = function() { return handleError(function (arg0) {
|
|
2538
3101
|
const ret = JSON.stringify(arg0);
|
|
2539
3102
|
return ret;
|
|
2540
3103
|
}, arguments) };
|
|
2541
3104
|
|
|
2542
|
-
|
|
3105
|
+
exports.__wbg_subarray_480600f3d6a9f26c = function(arg0, arg1, arg2) {
|
|
2543
3106
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2544
3107
|
return ret;
|
|
2545
3108
|
};
|
|
2546
3109
|
|
|
2547
|
-
|
|
3110
|
+
exports.__wbg_text_dc33c15c17bdfb52 = function() { return handleError(function (arg0) {
|
|
2548
3111
|
const ret = arg0.text();
|
|
2549
3112
|
return ret;
|
|
2550
3113
|
}, arguments) };
|
|
2551
3114
|
|
|
2552
|
-
|
|
2553
|
-
const ret = arg0.then(arg1
|
|
3115
|
+
exports.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
|
|
3116
|
+
const ret = arg0.then(arg1);
|
|
2554
3117
|
return ret;
|
|
2555
3118
|
};
|
|
2556
3119
|
|
|
2557
|
-
|
|
2558
|
-
const ret = arg0.then(arg1);
|
|
3120
|
+
exports.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
|
|
3121
|
+
const ret = arg0.then(arg1, arg2);
|
|
2559
3122
|
return ret;
|
|
2560
3123
|
};
|
|
2561
3124
|
|
|
2562
|
-
|
|
3125
|
+
exports.__wbg_toString_8eec07f6f4c057e4 = function(arg0) {
|
|
2563
3126
|
const ret = arg0.toString();
|
|
2564
3127
|
return ret;
|
|
2565
3128
|
};
|
|
2566
3129
|
|
|
2567
|
-
|
|
3130
|
+
exports.__wbg_url_b36d2a5008eb056f = function(arg0, arg1) {
|
|
2568
3131
|
const ret = arg1.url;
|
|
2569
3132
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2570
3133
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2572,92 +3135,77 @@ module.exports.__wbg_url_e6ed869ea05b7a71 = function(arg0, arg1) {
|
|
|
2572
3135
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2573
3136
|
};
|
|
2574
3137
|
|
|
2575
|
-
|
|
3138
|
+
exports.__wbg_value_692627309814bb8c = function(arg0) {
|
|
2576
3139
|
const ret = arg0.value;
|
|
2577
3140
|
return ret;
|
|
2578
3141
|
};
|
|
2579
3142
|
|
|
2580
|
-
|
|
3143
|
+
exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
2581
3144
|
const ret = arg0.versions;
|
|
2582
3145
|
return ret;
|
|
2583
3146
|
};
|
|
2584
3147
|
|
|
2585
|
-
|
|
3148
|
+
exports.__wbg_view_f6c15ac9fed63bbd = function(arg0) {
|
|
2586
3149
|
const ret = arg0.view;
|
|
2587
3150
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2588
3151
|
};
|
|
2589
3152
|
|
|
2590
|
-
|
|
3153
|
+
exports.__wbg_warn_8f5b5437666d0885 = function(arg0, arg1, arg2, arg3) {
|
|
2591
3154
|
console.warn(arg0, arg1, arg2, arg3);
|
|
2592
3155
|
};
|
|
2593
3156
|
|
|
2594
|
-
|
|
2595
|
-
|
|
3157
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3158
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3159
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2596
3160
|
return ret;
|
|
2597
3161
|
};
|
|
2598
3162
|
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
2604
|
-
const ret = arg0;
|
|
3163
|
+
exports.__wbindgen_cast_236fa6323a6eeed0 = function(arg0, arg1) {
|
|
3164
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 175, function: Function { arguments: [], shim_idx: 176, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3165
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h762d1c23bf8139ea, wasm_bindgen__convert__closures_____invoke__h13019d5ee70bd6b6);
|
|
2605
3166
|
return ret;
|
|
2606
3167
|
};
|
|
2607
3168
|
|
|
2608
|
-
|
|
2609
|
-
|
|
3169
|
+
exports.__wbindgen_cast_25a0a844437d0e92 = function(arg0, arg1) {
|
|
3170
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
3171
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
3172
|
+
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
3173
|
+
const ret = v0;
|
|
2610
3174
|
return ret;
|
|
2611
3175
|
};
|
|
2612
3176
|
|
|
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;
|
|
3177
|
+
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
3178
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
3179
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2623
3180
|
return ret;
|
|
2624
3181
|
};
|
|
2625
3182
|
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
obj.a = 0;
|
|
2630
|
-
return true;
|
|
2631
|
-
}
|
|
2632
|
-
const ret = false;
|
|
3183
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
3184
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
3185
|
+
const ret = arg0;
|
|
2633
3186
|
return ret;
|
|
2634
3187
|
};
|
|
2635
3188
|
|
|
2636
|
-
|
|
2637
|
-
|
|
3189
|
+
exports.__wbindgen_cast_c389e99dd7b90da6 = function(arg0, arg1) {
|
|
3190
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 175, function: Function { arguments: [Externref], shim_idx: 193, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3191
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h762d1c23bf8139ea, wasm_bindgen__convert__closures_____invoke__h69202035a90512ea);
|
|
2638
3192
|
return ret;
|
|
2639
3193
|
};
|
|
2640
3194
|
|
|
2641
|
-
|
|
2642
|
-
|
|
3195
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
3196
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3197
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2643
3198
|
return ret;
|
|
2644
3199
|
};
|
|
2645
3200
|
|
|
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;
|
|
3201
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
3202
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
3203
|
+
const ret = arg0;
|
|
2656
3204
|
return ret;
|
|
2657
3205
|
};
|
|
2658
3206
|
|
|
2659
|
-
|
|
2660
|
-
const table = wasm.
|
|
3207
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
3208
|
+
const table = wasm.__wbindgen_externrefs;
|
|
2661
3209
|
const offset = table.grow(4);
|
|
2662
3210
|
table.set(0, undefined);
|
|
2663
3211
|
table.set(offset + 0, undefined);
|
|
@@ -2667,89 +3215,10 @@ module.exports.__wbindgen_init_externref_table = function() {
|
|
|
2667
3215
|
;
|
|
2668
3216
|
};
|
|
2669
3217
|
|
|
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;
|
|
3218
|
+
const wasmPath = `${__dirname}/pubky_bg.wasm`;
|
|
3219
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
3220
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
3221
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
2753
3222
|
|
|
2754
3223
|
wasm.__wbindgen_start();
|
|
2755
3224
|
|