@learncard/didkit-plugin 1.9.8 → 1.9.9
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/dist/didkit/didkit_wasm.d.ts +29 -29
- package/dist/didkit/didkit_wasm.js +540 -517
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +3 -3
- package/dist/didkit/index.d.ts +9 -0
- package/dist/didkit/index.d.ts.map +1 -1
- package/dist/didkit-plugin.cjs.development.cjs +336 -326
- package/dist/didkit-plugin.cjs.development.cjs.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.cjs +2 -2
- package/dist/didkit-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/didkit-plugin.esm.js +336 -326
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +29 -29
- package/dist/didkit_wasm.js +540 -517
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +3 -3
- package/package.json +3 -3
- package/src/didkit/index.ts +12 -3
- package/src/didkit/pkg/didkit_wasm.d.ts +29 -29
- package/src/didkit/pkg/didkit_wasm.js +540 -517
- package/src/didkit/pkg/didkit_wasm_bg.wasm +0 -0
- package/src/didkit/pkg/didkit_wasm_bg.wasm.d.ts +3 -3
package/dist/didkit_wasm.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
let WASM_VECTOR_LEN = 0;
|
|
4
|
-
|
|
5
3
|
let cachedUint8ArrayMemory0 = null;
|
|
6
4
|
|
|
7
5
|
function getUint8ArrayMemory0() {
|
|
@@ -11,20 +9,41 @@ function getUint8ArrayMemory0() {
|
|
|
11
9
|
return cachedUint8ArrayMemory0;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
cachedTextDecoder.decode();
|
|
15
|
+
|
|
16
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
+
let numBytesDecoded = 0;
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
numBytesDecoded += len;
|
|
20
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
|
+
cachedTextDecoder.decode();
|
|
23
|
+
numBytesDecoded = len;
|
|
24
|
+
}
|
|
25
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getStringFromWasm0(ptr, len) {
|
|
29
|
+
ptr = ptr >>> 0;
|
|
30
|
+
return decodeText(ptr, len);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let WASM_VECTOR_LEN = 0;
|
|
34
|
+
|
|
35
|
+
const cachedTextEncoder = new TextEncoder();
|
|
36
|
+
|
|
37
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
38
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
39
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
40
|
+
view.set(buf);
|
|
41
|
+
return {
|
|
42
|
+
read: arg.length,
|
|
43
|
+
written: buf.length
|
|
44
|
+
};
|
|
45
|
+
}
|
|
19
46
|
}
|
|
20
|
-
: function (arg, view) {
|
|
21
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
22
|
-
view.set(buf);
|
|
23
|
-
return {
|
|
24
|
-
read: arg.length,
|
|
25
|
-
written: buf.length
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
47
|
|
|
29
48
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
30
49
|
|
|
@@ -55,7 +74,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
55
74
|
}
|
|
56
75
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
57
76
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
58
|
-
const ret =
|
|
77
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
59
78
|
|
|
60
79
|
offset += ret.written;
|
|
61
80
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -74,15 +93,6 @@ function getDataViewMemory0() {
|
|
|
74
93
|
return cachedDataViewMemory0;
|
|
75
94
|
}
|
|
76
95
|
|
|
77
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
78
|
-
|
|
79
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
80
|
-
|
|
81
|
-
function getStringFromWasm0(ptr, len) {
|
|
82
|
-
ptr = ptr >>> 0;
|
|
83
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
96
|
function addToExternrefTable0(obj) {
|
|
87
97
|
const idx = wasm.__externref_table_alloc();
|
|
88
98
|
wasm.__wbindgen_export_4.set(idx, obj);
|
|
@@ -107,37 +117,6 @@ function isLikeNone(x) {
|
|
|
107
117
|
return x === undefined || x === null;
|
|
108
118
|
}
|
|
109
119
|
|
|
110
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
111
|
-
? { register: () => {}, unregister: () => {} }
|
|
112
|
-
: new FinalizationRegistry(state => {
|
|
113
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
117
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
118
|
-
const real = (...args) => {
|
|
119
|
-
// First up with a closure we increment the internal reference
|
|
120
|
-
// count. This ensures that the Rust closure environment won't
|
|
121
|
-
// be deallocated while we're invoking it.
|
|
122
|
-
state.cnt++;
|
|
123
|
-
const a = state.a;
|
|
124
|
-
state.a = 0;
|
|
125
|
-
try {
|
|
126
|
-
return f(a, state.b, ...args);
|
|
127
|
-
} finally {
|
|
128
|
-
if (--state.cnt === 0) {
|
|
129
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
130
|
-
CLOSURE_DTORS.unregister(state);
|
|
131
|
-
} else {
|
|
132
|
-
state.a = a;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
real.original = state;
|
|
137
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
138
|
-
return real;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
120
|
function debugString(val) {
|
|
142
121
|
// primitive types
|
|
143
122
|
const type = typeof val;
|
|
@@ -202,186 +181,144 @@ function debugString(val) {
|
|
|
202
181
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
203
182
|
return className;
|
|
204
183
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
const len0 = WASM_VECTOR_LEN;
|
|
212
|
-
const ret = wasm.verifyInvocationSignature(ptr0, len0);
|
|
213
|
-
return ret;
|
|
184
|
+
|
|
185
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
186
|
+
? { register: () => {}, unregister: () => {} }
|
|
187
|
+
: new FinalizationRegistry(
|
|
188
|
+
state => {
|
|
189
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
214
190
|
}
|
|
191
|
+
);
|
|
215
192
|
|
|
216
|
-
function
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
193
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
194
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
195
|
+
const real = (...args) => {
|
|
196
|
+
|
|
197
|
+
// First up with a closure we increment the internal reference
|
|
198
|
+
// count. This ensures that the Rust closure environment won't
|
|
199
|
+
// be deallocated while we're invoking it.
|
|
200
|
+
state.cnt++;
|
|
201
|
+
const a = state.a;
|
|
202
|
+
state.a = 0;
|
|
203
|
+
try {
|
|
204
|
+
return f(a, state.b, ...args);
|
|
205
|
+
} finally {
|
|
206
|
+
if (--state.cnt === 0) {
|
|
207
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
208
|
+
CLOSURE_DTORS.unregister(state);
|
|
209
|
+
} else {
|
|
210
|
+
state.a = a;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
real.original = state;
|
|
215
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
216
|
+
return real;
|
|
220
217
|
}
|
|
221
218
|
/**
|
|
222
|
-
* @param {string} method_pattern
|
|
223
|
-
* @param {string} jwk
|
|
224
219
|
* @returns {string}
|
|
225
220
|
*/
|
|
226
|
-
export function
|
|
227
|
-
let
|
|
228
|
-
let
|
|
221
|
+
export function getVersion() {
|
|
222
|
+
let deferred1_0;
|
|
223
|
+
let deferred1_1;
|
|
229
224
|
try {
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const ret = wasm.keyToDID(ptr0, len0, ptr1, len1);
|
|
235
|
-
var ptr3 = ret[0];
|
|
236
|
-
var len3 = ret[1];
|
|
237
|
-
if (ret[3]) {
|
|
238
|
-
ptr3 = 0; len3 = 0;
|
|
239
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
240
|
-
}
|
|
241
|
-
deferred4_0 = ptr3;
|
|
242
|
-
deferred4_1 = len3;
|
|
243
|
-
return getStringFromWasm0(ptr3, len3);
|
|
225
|
+
const ret = wasm.getVersion();
|
|
226
|
+
deferred1_0 = ret[0];
|
|
227
|
+
deferred1_1 = ret[1];
|
|
228
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
244
229
|
} finally {
|
|
245
|
-
wasm.__wbindgen_free(
|
|
230
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
246
231
|
}
|
|
247
232
|
}
|
|
248
233
|
|
|
249
234
|
/**
|
|
250
|
-
* @param {string}
|
|
235
|
+
* @param {string} presentation
|
|
251
236
|
* @param {string} preparation
|
|
252
237
|
* @param {string} signature
|
|
253
238
|
* @returns {Promise<any>}
|
|
254
239
|
*/
|
|
255
|
-
export function
|
|
256
|
-
const ptr0 = passStringToWasm0(
|
|
240
|
+
export function completeIssuePresentation(presentation, preparation, signature) {
|
|
241
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
257
242
|
const len0 = WASM_VECTOR_LEN;
|
|
258
243
|
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
259
244
|
const len1 = WASM_VECTOR_LEN;
|
|
260
245
|
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
261
246
|
const len2 = WASM_VECTOR_LEN;
|
|
262
|
-
const ret = wasm.
|
|
247
|
+
const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
263
248
|
return ret;
|
|
264
249
|
}
|
|
265
250
|
|
|
266
251
|
/**
|
|
267
|
-
* @param {string}
|
|
268
|
-
* @param {string}
|
|
252
|
+
* @param {string} vp
|
|
253
|
+
* @param {string} proof_options
|
|
254
|
+
* @param {string} context_map
|
|
269
255
|
* @returns {Promise<any>}
|
|
270
256
|
*/
|
|
271
|
-
export function
|
|
272
|
-
const ptr0 = passStringToWasm0(
|
|
257
|
+
export function verifyPresentation(vp, proof_options, context_map) {
|
|
258
|
+
const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
273
259
|
const len0 = WASM_VECTOR_LEN;
|
|
274
|
-
const ptr1 = passStringToWasm0(
|
|
260
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
275
261
|
const len1 = WASM_VECTOR_LEN;
|
|
276
|
-
const
|
|
262
|
+
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
+
const len2 = WASM_VECTOR_LEN;
|
|
264
|
+
const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
277
265
|
return ret;
|
|
278
266
|
}
|
|
279
267
|
|
|
280
268
|
/**
|
|
281
|
-
* @param {string}
|
|
269
|
+
* @param {string} holder
|
|
282
270
|
* @param {string} linked_data_proof_options
|
|
283
|
-
* @param {string}
|
|
271
|
+
* @param {string} key
|
|
272
|
+
* @param {string} context_map
|
|
284
273
|
* @returns {Promise<any>}
|
|
285
274
|
*/
|
|
286
|
-
export function
|
|
287
|
-
const ptr0 = passStringToWasm0(
|
|
275
|
+
export function DIDAuth(holder, linked_data_proof_options, key, context_map) {
|
|
276
|
+
const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
288
277
|
const len0 = WASM_VECTOR_LEN;
|
|
289
278
|
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
279
|
const len1 = WASM_VECTOR_LEN;
|
|
291
|
-
const ptr2 = passStringToWasm0(
|
|
280
|
+
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
281
|
const len2 = WASM_VECTOR_LEN;
|
|
293
|
-
const
|
|
282
|
+
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
+
const len3 = WASM_VECTOR_LEN;
|
|
284
|
+
const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
294
285
|
return ret;
|
|
295
286
|
}
|
|
296
287
|
|
|
297
288
|
/**
|
|
298
289
|
* @param {string} invocation
|
|
299
|
-
* @param {string}
|
|
300
|
-
* @param {string} linked_data_proof_options
|
|
301
|
-
* @param {string} key
|
|
290
|
+
* @param {string} delegation
|
|
302
291
|
* @returns {Promise<any>}
|
|
303
292
|
*/
|
|
304
|
-
export function
|
|
293
|
+
export function verifyInvocation(invocation, delegation) {
|
|
305
294
|
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
295
|
const len0 = WASM_VECTOR_LEN;
|
|
307
|
-
const ptr1 = passStringToWasm0(
|
|
296
|
+
const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
308
297
|
const len1 = WASM_VECTOR_LEN;
|
|
309
|
-
const
|
|
310
|
-
const len2 = WASM_VECTOR_LEN;
|
|
311
|
-
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
312
|
-
const len3 = WASM_VECTOR_LEN;
|
|
313
|
-
const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
298
|
+
const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);
|
|
314
299
|
return ret;
|
|
315
300
|
}
|
|
316
301
|
|
|
317
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
318
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
319
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
320
|
-
WASM_VECTOR_LEN = arg.length;
|
|
321
|
-
return ptr;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* @param {Uint8Array} bytes
|
|
325
|
-
* @returns {string}
|
|
326
|
-
*/
|
|
327
|
-
export function generateSecp256k1KeyFromBytes(bytes) {
|
|
328
|
-
let deferred3_0;
|
|
329
|
-
let deferred3_1;
|
|
330
|
-
try {
|
|
331
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
332
|
-
const len0 = WASM_VECTOR_LEN;
|
|
333
|
-
const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
|
|
334
|
-
var ptr2 = ret[0];
|
|
335
|
-
var len2 = ret[1];
|
|
336
|
-
if (ret[3]) {
|
|
337
|
-
ptr2 = 0; len2 = 0;
|
|
338
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
339
|
-
}
|
|
340
|
-
deferred3_0 = ptr2;
|
|
341
|
-
deferred3_1 = len2;
|
|
342
|
-
return getStringFromWasm0(ptr2, len2);
|
|
343
|
-
} finally {
|
|
344
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
302
|
/**
|
|
349
|
-
* @param {string}
|
|
350
|
-
* @param {string} preparation
|
|
351
|
-
* @param {string} signature
|
|
303
|
+
* @param {string} url
|
|
352
304
|
* @returns {Promise<any>}
|
|
353
305
|
*/
|
|
354
|
-
export function
|
|
355
|
-
const ptr0 = passStringToWasm0(
|
|
306
|
+
export function contextLoader(url) {
|
|
307
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
308
|
const len0 = WASM_VECTOR_LEN;
|
|
357
|
-
const
|
|
358
|
-
const len1 = WASM_VECTOR_LEN;
|
|
359
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
-
const len2 = WASM_VECTOR_LEN;
|
|
361
|
-
const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
309
|
+
const ret = wasm.contextLoader(ptr0, len0);
|
|
362
310
|
return ret;
|
|
363
311
|
}
|
|
364
312
|
|
|
365
313
|
/**
|
|
366
|
-
* @
|
|
314
|
+
* @param {string} tz
|
|
315
|
+
* @returns {Promise<any>}
|
|
367
316
|
*/
|
|
368
|
-
export function
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
var ptr1 = ret[0];
|
|
374
|
-
var len1 = ret[1];
|
|
375
|
-
if (ret[3]) {
|
|
376
|
-
ptr1 = 0; len1 = 0;
|
|
377
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
378
|
-
}
|
|
379
|
-
deferred2_0 = ptr1;
|
|
380
|
-
deferred2_1 = len1;
|
|
381
|
-
return getStringFromWasm0(ptr1, len1);
|
|
382
|
-
} finally {
|
|
383
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
384
|
-
}
|
|
317
|
+
export function JWKFromTezos(tz) {
|
|
318
|
+
const ptr0 = passStringToWasm0(tz, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
|
+
const len0 = WASM_VECTOR_LEN;
|
|
320
|
+
const ret = wasm.JWKFromTezos(ptr0, len0);
|
|
321
|
+
return ret;
|
|
385
322
|
}
|
|
386
323
|
|
|
387
324
|
/**
|
|
@@ -424,24 +361,71 @@ export function prepareDelegateCapability(capability, linked_data_proof_options,
|
|
|
424
361
|
return ret;
|
|
425
362
|
}
|
|
426
363
|
|
|
427
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
428
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
429
|
-
for (let i = 0; i < array.length; i++) {
|
|
430
|
-
const add = addToExternrefTable0(array[i]);
|
|
431
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
432
|
-
}
|
|
433
|
-
WASM_VECTOR_LEN = array.length;
|
|
434
|
-
return ptr;
|
|
435
|
-
}
|
|
436
364
|
/**
|
|
437
|
-
* @param {
|
|
438
|
-
* @param {string
|
|
365
|
+
* @param {string} capability
|
|
366
|
+
* @param {string} preparation
|
|
367
|
+
* @param {string} signature
|
|
439
368
|
* @returns {Promise<any>}
|
|
440
369
|
*/
|
|
441
|
-
export function
|
|
442
|
-
const ptr0 =
|
|
370
|
+
export function completeDelegateCapability(capability, preparation, signature) {
|
|
371
|
+
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
443
372
|
const len0 = WASM_VECTOR_LEN;
|
|
444
|
-
const
|
|
373
|
+
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
374
|
+
const len1 = WASM_VECTOR_LEN;
|
|
375
|
+
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
376
|
+
const len2 = WASM_VECTOR_LEN;
|
|
377
|
+
const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
378
|
+
return ret;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @param {string} delegation
|
|
383
|
+
* @returns {Promise<any>}
|
|
384
|
+
*/
|
|
385
|
+
export function verifyDelegation(delegation) {
|
|
386
|
+
const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
387
|
+
const len0 = WASM_VECTOR_LEN;
|
|
388
|
+
const ret = wasm.verifyDelegation(ptr0, len0);
|
|
389
|
+
return ret;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @param {string} invocation
|
|
394
|
+
* @param {string} target_id
|
|
395
|
+
* @param {string} linked_data_proof_options
|
|
396
|
+
* @param {string} key
|
|
397
|
+
* @returns {Promise<any>}
|
|
398
|
+
*/
|
|
399
|
+
export function invokeCapability(invocation, target_id, linked_data_proof_options, key) {
|
|
400
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
401
|
+
const len0 = WASM_VECTOR_LEN;
|
|
402
|
+
const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
403
|
+
const len1 = WASM_VECTOR_LEN;
|
|
404
|
+
const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
405
|
+
const len2 = WASM_VECTOR_LEN;
|
|
406
|
+
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len3 = WASM_VECTOR_LEN;
|
|
408
|
+
const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
409
|
+
return ret;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* @param {string} invocation
|
|
414
|
+
* @param {string} target_id
|
|
415
|
+
* @param {string} linked_data_proof_options
|
|
416
|
+
* @param {string} public_key
|
|
417
|
+
* @returns {Promise<any>}
|
|
418
|
+
*/
|
|
419
|
+
export function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {
|
|
420
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
421
|
+
const len0 = WASM_VECTOR_LEN;
|
|
422
|
+
const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
const len1 = WASM_VECTOR_LEN;
|
|
424
|
+
const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
|
+
const len2 = WASM_VECTOR_LEN;
|
|
426
|
+
const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
427
|
+
const len3 = WASM_VECTOR_LEN;
|
|
428
|
+
const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
445
429
|
return ret;
|
|
446
430
|
}
|
|
447
431
|
|
|
@@ -463,58 +447,107 @@ export function completeInvokeCapability(invocation, preparation, signature) {
|
|
|
463
447
|
}
|
|
464
448
|
|
|
465
449
|
/**
|
|
466
|
-
* @param {string}
|
|
450
|
+
* @param {string} invocation
|
|
467
451
|
* @returns {Promise<any>}
|
|
468
452
|
*/
|
|
469
|
-
export function
|
|
470
|
-
const ptr0 = passStringToWasm0(
|
|
453
|
+
export function verifyInvocationSignature(invocation) {
|
|
454
|
+
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
471
455
|
const len0 = WASM_VECTOR_LEN;
|
|
472
|
-
const ret = wasm.
|
|
456
|
+
const ret = wasm.verifyInvocationSignature(ptr0, len0);
|
|
457
|
+
return ret;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @returns {Promise<any>}
|
|
462
|
+
*/
|
|
463
|
+
export function clearCache() {
|
|
464
|
+
const ret = wasm.clearCache();
|
|
473
465
|
return ret;
|
|
474
466
|
}
|
|
475
467
|
|
|
476
468
|
/**
|
|
477
469
|
* @param {string} did
|
|
470
|
+
* @param {string} input_metadata
|
|
478
471
|
* @returns {Promise<any>}
|
|
479
472
|
*/
|
|
480
|
-
export function
|
|
473
|
+
export function didResolver(did, input_metadata) {
|
|
481
474
|
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
482
475
|
const len0 = WASM_VECTOR_LEN;
|
|
483
|
-
const
|
|
476
|
+
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
477
|
+
const len1 = WASM_VECTOR_LEN;
|
|
478
|
+
const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
|
|
484
479
|
return ret;
|
|
485
480
|
}
|
|
486
481
|
|
|
487
482
|
/**
|
|
488
|
-
* @param {string}
|
|
489
|
-
* @param {string}
|
|
490
|
-
* @param {string} context_map
|
|
483
|
+
* @param {string} did
|
|
484
|
+
* @param {string} input_metadata
|
|
491
485
|
* @returns {Promise<any>}
|
|
492
486
|
*/
|
|
493
|
-
export function
|
|
494
|
-
const ptr0 = passStringToWasm0(
|
|
487
|
+
export function resolveDID(did, input_metadata) {
|
|
488
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
495
489
|
const len0 = WASM_VECTOR_LEN;
|
|
496
|
-
const ptr1 = passStringToWasm0(
|
|
490
|
+
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
497
491
|
const len1 = WASM_VECTOR_LEN;
|
|
498
|
-
const
|
|
499
|
-
const len2 = WASM_VECTOR_LEN;
|
|
500
|
-
const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
492
|
+
const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
|
|
501
493
|
return ret;
|
|
502
494
|
}
|
|
503
495
|
|
|
496
|
+
function takeFromExternrefTable0(idx) {
|
|
497
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
498
|
+
wasm.__externref_table_dealloc(idx);
|
|
499
|
+
return value;
|
|
500
|
+
}
|
|
504
501
|
/**
|
|
505
|
-
* @param {string}
|
|
506
|
-
* @param {string}
|
|
507
|
-
* @
|
|
502
|
+
* @param {string} method_pattern
|
|
503
|
+
* @param {string} jwk
|
|
504
|
+
* @returns {string}
|
|
505
|
+
*/
|
|
506
|
+
export function keyToDID(method_pattern, jwk) {
|
|
507
|
+
let deferred4_0;
|
|
508
|
+
let deferred4_1;
|
|
509
|
+
try {
|
|
510
|
+
const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
511
|
+
const len0 = WASM_VECTOR_LEN;
|
|
512
|
+
const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
513
|
+
const len1 = WASM_VECTOR_LEN;
|
|
514
|
+
const ret = wasm.keyToDID(ptr0, len0, ptr1, len1);
|
|
515
|
+
var ptr3 = ret[0];
|
|
516
|
+
var len3 = ret[1];
|
|
517
|
+
if (ret[3]) {
|
|
518
|
+
ptr3 = 0; len3 = 0;
|
|
519
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
520
|
+
}
|
|
521
|
+
deferred4_0 = ptr3;
|
|
522
|
+
deferred4_1 = len3;
|
|
523
|
+
return getStringFromWasm0(ptr3, len3);
|
|
524
|
+
} finally {
|
|
525
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @param {string} method_pattern
|
|
531
|
+
* @param {string} jwk
|
|
508
532
|
* @returns {Promise<any>}
|
|
509
533
|
*/
|
|
510
|
-
export function
|
|
511
|
-
const ptr0 = passStringToWasm0(
|
|
534
|
+
export function keyToVerificationMethod(method_pattern, jwk) {
|
|
535
|
+
const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
536
|
const len0 = WASM_VECTOR_LEN;
|
|
513
|
-
const ptr1 = passStringToWasm0(
|
|
537
|
+
const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
538
|
const len1 = WASM_VECTOR_LEN;
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
539
|
+
const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);
|
|
540
|
+
return ret;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* @param {string} did
|
|
545
|
+
* @returns {Promise<any>}
|
|
546
|
+
*/
|
|
547
|
+
export function didToVerificationMethod(did) {
|
|
548
|
+
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
549
|
+
const len0 = WASM_VECTOR_LEN;
|
|
550
|
+
const ret = wasm.didToVerificationMethod(ptr0, len0);
|
|
518
551
|
return ret;
|
|
519
552
|
}
|
|
520
553
|
|
|
@@ -539,75 +572,90 @@ export function issueCredential(credential, proof_options, key, context_map) {
|
|
|
539
572
|
}
|
|
540
573
|
|
|
541
574
|
/**
|
|
542
|
-
* @param {string}
|
|
543
|
-
* @param {string}
|
|
575
|
+
* @param {string} credential
|
|
576
|
+
* @param {string} linked_data_proof_options
|
|
577
|
+
* @param {string} public_key
|
|
544
578
|
* @returns {Promise<any>}
|
|
545
579
|
*/
|
|
546
|
-
export function
|
|
547
|
-
const ptr0 = passStringToWasm0(
|
|
580
|
+
export function prepareIssueCredential(credential, linked_data_proof_options, public_key) {
|
|
581
|
+
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
582
|
const len0 = WASM_VECTOR_LEN;
|
|
549
|
-
const ptr1 = passStringToWasm0(
|
|
583
|
+
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
550
584
|
const len1 = WASM_VECTOR_LEN;
|
|
551
|
-
const
|
|
585
|
+
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
586
|
+
const len2 = WASM_VECTOR_LEN;
|
|
587
|
+
const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
552
588
|
return ret;
|
|
553
589
|
}
|
|
554
590
|
|
|
555
591
|
/**
|
|
556
|
-
* @param {string}
|
|
557
|
-
* @param {string
|
|
592
|
+
* @param {string} credential
|
|
593
|
+
* @param {string} preparation
|
|
594
|
+
* @param {string} signature
|
|
558
595
|
* @returns {Promise<any>}
|
|
559
596
|
*/
|
|
560
|
-
export function
|
|
561
|
-
const ptr0 = passStringToWasm0(
|
|
597
|
+
export function completeIssueCredential(credential, preparation, signature) {
|
|
598
|
+
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
562
599
|
const len0 = WASM_VECTOR_LEN;
|
|
563
|
-
const ptr1 =
|
|
600
|
+
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
564
601
|
const len1 = WASM_VECTOR_LEN;
|
|
565
|
-
const
|
|
602
|
+
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
603
|
+
const len2 = WASM_VECTOR_LEN;
|
|
604
|
+
const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
566
605
|
return ret;
|
|
567
606
|
}
|
|
568
607
|
|
|
569
608
|
/**
|
|
570
|
-
* @param {string}
|
|
571
|
-
* @param {string}
|
|
572
|
-
* @param {string}
|
|
573
|
-
* @param {string} public_key
|
|
609
|
+
* @param {string} vc
|
|
610
|
+
* @param {string} proof_options
|
|
611
|
+
* @param {string} context_map
|
|
574
612
|
* @returns {Promise<any>}
|
|
575
613
|
*/
|
|
576
|
-
export function
|
|
577
|
-
const ptr0 = passStringToWasm0(
|
|
614
|
+
export function verifyCredential(vc, proof_options, context_map) {
|
|
615
|
+
const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
616
|
const len0 = WASM_VECTOR_LEN;
|
|
579
|
-
const ptr1 = passStringToWasm0(
|
|
617
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
580
618
|
const len1 = WASM_VECTOR_LEN;
|
|
581
|
-
const ptr2 = passStringToWasm0(
|
|
619
|
+
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
582
620
|
const len2 = WASM_VECTOR_LEN;
|
|
583
|
-
const
|
|
584
|
-
const len3 = WASM_VECTOR_LEN;
|
|
585
|
-
const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
621
|
+
const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
586
622
|
return ret;
|
|
587
623
|
}
|
|
588
624
|
|
|
589
625
|
/**
|
|
590
|
-
* @param {string}
|
|
591
|
-
* @param {string
|
|
626
|
+
* @param {string} presentation
|
|
627
|
+
* @param {string} proof_options
|
|
628
|
+
* @param {string} key
|
|
629
|
+
* @param {string} context_map
|
|
592
630
|
* @returns {Promise<any>}
|
|
593
631
|
*/
|
|
594
|
-
export function
|
|
595
|
-
const ptr0 = passStringToWasm0(
|
|
632
|
+
export function issuePresentation(presentation, proof_options, key, context_map) {
|
|
633
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
596
634
|
const len0 = WASM_VECTOR_LEN;
|
|
597
|
-
const ptr1 =
|
|
635
|
+
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
598
636
|
const len1 = WASM_VECTOR_LEN;
|
|
599
|
-
const
|
|
637
|
+
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
638
|
+
const len2 = WASM_VECTOR_LEN;
|
|
639
|
+
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
640
|
+
const len3 = WASM_VECTOR_LEN;
|
|
641
|
+
const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
600
642
|
return ret;
|
|
601
643
|
}
|
|
602
644
|
|
|
603
645
|
/**
|
|
604
|
-
* @param {string}
|
|
646
|
+
* @param {string} presentation
|
|
647
|
+
* @param {string} linked_data_proof_options
|
|
648
|
+
* @param {string} public_key
|
|
605
649
|
* @returns {Promise<any>}
|
|
606
650
|
*/
|
|
607
|
-
export function
|
|
608
|
-
const ptr0 = passStringToWasm0(
|
|
651
|
+
export function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {
|
|
652
|
+
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
609
653
|
const len0 = WASM_VECTOR_LEN;
|
|
610
|
-
const
|
|
654
|
+
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
655
|
+
const len1 = WASM_VECTOR_LEN;
|
|
656
|
+
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
657
|
+
const len2 = WASM_VECTOR_LEN;
|
|
658
|
+
const ret = wasm.prepareIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
611
659
|
return ret;
|
|
612
660
|
}
|
|
613
661
|
|
|
@@ -633,101 +681,70 @@ export function generateEd25519Key() {
|
|
|
633
681
|
}
|
|
634
682
|
}
|
|
635
683
|
|
|
636
|
-
|
|
637
|
-
*
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
* @returns {Promise<any>}
|
|
642
|
-
*/
|
|
643
|
-
export function issuePresentation(presentation, proof_options, key, context_map) {
|
|
644
|
-
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
645
|
-
const len0 = WASM_VECTOR_LEN;
|
|
646
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
647
|
-
const len1 = WASM_VECTOR_LEN;
|
|
648
|
-
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
649
|
-
const len2 = WASM_VECTOR_LEN;
|
|
650
|
-
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
651
|
-
const len3 = WASM_VECTOR_LEN;
|
|
652
|
-
const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
653
|
-
return ret;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* @returns {Promise<any>}
|
|
658
|
-
*/
|
|
659
|
-
export function clearCache() {
|
|
660
|
-
const ret = wasm.clearCache();
|
|
661
|
-
return ret;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* @param {string} vc
|
|
666
|
-
* @param {string} proof_options
|
|
667
|
-
* @param {string} context_map
|
|
668
|
-
* @returns {Promise<any>}
|
|
669
|
-
*/
|
|
670
|
-
export function verifyCredential(vc, proof_options, context_map) {
|
|
671
|
-
const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
672
|
-
const len0 = WASM_VECTOR_LEN;
|
|
673
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
674
|
-
const len1 = WASM_VECTOR_LEN;
|
|
675
|
-
const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
676
|
-
const len2 = WASM_VECTOR_LEN;
|
|
677
|
-
const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
678
|
-
return ret;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* @param {string} did
|
|
683
|
-
* @param {string} input_metadata
|
|
684
|
-
* @returns {Promise<any>}
|
|
685
|
-
*/
|
|
686
|
-
export function resolveDID(did, input_metadata) {
|
|
687
|
-
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
688
|
-
const len0 = WASM_VECTOR_LEN;
|
|
689
|
-
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
690
|
-
const len1 = WASM_VECTOR_LEN;
|
|
691
|
-
const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
|
|
692
|
-
return ret;
|
|
684
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
685
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
686
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
687
|
+
WASM_VECTOR_LEN = arg.length;
|
|
688
|
+
return ptr;
|
|
693
689
|
}
|
|
694
|
-
|
|
695
690
|
/**
|
|
696
|
-
* @param {
|
|
697
|
-
* @returns {
|
|
691
|
+
* @param {Uint8Array} bytes
|
|
692
|
+
* @returns {string}
|
|
698
693
|
*/
|
|
699
|
-
export function
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
694
|
+
export function generateEd25519KeyFromBytes(bytes) {
|
|
695
|
+
let deferred3_0;
|
|
696
|
+
let deferred3_1;
|
|
697
|
+
try {
|
|
698
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
700
|
+
const ret = wasm.generateEd25519KeyFromBytes(ptr0, len0);
|
|
701
|
+
var ptr2 = ret[0];
|
|
702
|
+
var len2 = ret[1];
|
|
703
|
+
if (ret[3]) {
|
|
704
|
+
ptr2 = 0; len2 = 0;
|
|
705
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
706
|
+
}
|
|
707
|
+
deferred3_0 = ptr2;
|
|
708
|
+
deferred3_1 = len2;
|
|
709
|
+
return getStringFromWasm0(ptr2, len2);
|
|
710
|
+
} finally {
|
|
711
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
712
|
+
}
|
|
704
713
|
}
|
|
705
714
|
|
|
706
715
|
/**
|
|
707
|
-
* @
|
|
708
|
-
* @param {string} delegation
|
|
709
|
-
* @returns {Promise<any>}
|
|
716
|
+
* @returns {string}
|
|
710
717
|
*/
|
|
711
|
-
export function
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
+
export function generateSecp256k1Key() {
|
|
719
|
+
let deferred2_0;
|
|
720
|
+
let deferred2_1;
|
|
721
|
+
try {
|
|
722
|
+
const ret = wasm.generateSecp256k1Key();
|
|
723
|
+
var ptr1 = ret[0];
|
|
724
|
+
var len1 = ret[1];
|
|
725
|
+
if (ret[3]) {
|
|
726
|
+
ptr1 = 0; len1 = 0;
|
|
727
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
728
|
+
}
|
|
729
|
+
deferred2_0 = ptr1;
|
|
730
|
+
deferred2_1 = len1;
|
|
731
|
+
return getStringFromWasm0(ptr1, len1);
|
|
732
|
+
} finally {
|
|
733
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
734
|
+
}
|
|
718
735
|
}
|
|
719
736
|
|
|
720
737
|
/**
|
|
721
738
|
* @param {Uint8Array} bytes
|
|
722
739
|
* @returns {string}
|
|
723
740
|
*/
|
|
724
|
-
export function
|
|
741
|
+
export function generateSecp256k1KeyFromBytes(bytes) {
|
|
725
742
|
let deferred3_0;
|
|
726
743
|
let deferred3_1;
|
|
727
744
|
try {
|
|
728
745
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
729
746
|
const len0 = WASM_VECTOR_LEN;
|
|
730
|
-
const ret = wasm.
|
|
747
|
+
const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
|
|
731
748
|
var ptr2 = ret[0];
|
|
732
749
|
var len2 = ret[1];
|
|
733
750
|
if (ret[3]) {
|
|
@@ -742,85 +759,83 @@ export function generateEd25519KeyFromBytes(bytes) {
|
|
|
742
759
|
}
|
|
743
760
|
}
|
|
744
761
|
|
|
762
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
763
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
764
|
+
for (let i = 0; i < array.length; i++) {
|
|
765
|
+
const add = addToExternrefTable0(array[i]);
|
|
766
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
767
|
+
}
|
|
768
|
+
WASM_VECTOR_LEN = array.length;
|
|
769
|
+
return ptr;
|
|
770
|
+
}
|
|
745
771
|
/**
|
|
746
|
-
* @param {string}
|
|
747
|
-
* @param {string[]}
|
|
772
|
+
* @param {string} cleartext
|
|
773
|
+
* @param {string[]} recipients
|
|
748
774
|
* @returns {Promise<any>}
|
|
749
775
|
*/
|
|
750
|
-
export function
|
|
751
|
-
const ptr0 = passStringToWasm0(
|
|
776
|
+
export function createJwe(cleartext, recipients) {
|
|
777
|
+
const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
752
778
|
const len0 = WASM_VECTOR_LEN;
|
|
753
|
-
const ptr1 = passArrayJsValueToWasm0(
|
|
779
|
+
const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
|
|
754
780
|
const len1 = WASM_VECTOR_LEN;
|
|
755
|
-
const ret = wasm.
|
|
781
|
+
const ret = wasm.createJwe(ptr0, len0, ptr1, len1);
|
|
756
782
|
return ret;
|
|
757
783
|
}
|
|
758
784
|
|
|
759
785
|
/**
|
|
760
|
-
* @param {string}
|
|
761
|
-
* @param {string}
|
|
762
|
-
* @param {string} key
|
|
763
|
-
* @param {string} context_map
|
|
786
|
+
* @param {string} jwe
|
|
787
|
+
* @param {string[]} jwks
|
|
764
788
|
* @returns {Promise<any>}
|
|
765
789
|
*/
|
|
766
|
-
export function
|
|
767
|
-
const ptr0 = passStringToWasm0(
|
|
790
|
+
export function decryptJwe(jwe, jwks) {
|
|
791
|
+
const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
768
792
|
const len0 = WASM_VECTOR_LEN;
|
|
769
|
-
const ptr1 =
|
|
793
|
+
const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
|
|
770
794
|
const len1 = WASM_VECTOR_LEN;
|
|
771
|
-
const
|
|
772
|
-
const len2 = WASM_VECTOR_LEN;
|
|
773
|
-
const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
774
|
-
const len3 = WASM_VECTOR_LEN;
|
|
775
|
-
const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
795
|
+
const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
|
|
776
796
|
return ret;
|
|
777
797
|
}
|
|
778
798
|
|
|
779
799
|
/**
|
|
780
|
-
* @param {
|
|
781
|
-
* @param {string}
|
|
782
|
-
* @param {string} signature
|
|
800
|
+
* @param {any} cleartext
|
|
801
|
+
* @param {string[]} recipients
|
|
783
802
|
* @returns {Promise<any>}
|
|
784
803
|
*/
|
|
785
|
-
export function
|
|
786
|
-
const ptr0 =
|
|
804
|
+
export function createDagJwe(cleartext, recipients) {
|
|
805
|
+
const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
|
|
787
806
|
const len0 = WASM_VECTOR_LEN;
|
|
788
|
-
const
|
|
789
|
-
const len1 = WASM_VECTOR_LEN;
|
|
790
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
791
|
-
const len2 = WASM_VECTOR_LEN;
|
|
792
|
-
const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
807
|
+
const ret = wasm.createDagJwe(cleartext, ptr0, len0);
|
|
793
808
|
return ret;
|
|
794
809
|
}
|
|
795
810
|
|
|
796
811
|
/**
|
|
797
|
-
* @
|
|
812
|
+
* @param {string} jwe
|
|
813
|
+
* @param {string[]} jwks
|
|
814
|
+
* @returns {Promise<any>}
|
|
798
815
|
*/
|
|
799
|
-
export function
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
807
|
-
} finally {
|
|
808
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
809
|
-
}
|
|
816
|
+
export function decryptDagJwe(jwe, jwks) {
|
|
817
|
+
const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
818
|
+
const len0 = WASM_VECTOR_LEN;
|
|
819
|
+
const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
|
|
820
|
+
const len1 = WASM_VECTOR_LEN;
|
|
821
|
+
const ret = wasm.decryptDagJwe(ptr0, len0, ptr1, len1);
|
|
822
|
+
return ret;
|
|
810
823
|
}
|
|
811
824
|
|
|
812
|
-
function
|
|
813
|
-
wasm.
|
|
825
|
+
function __wbg_adapter_10(arg0, arg1, arg2) {
|
|
826
|
+
wasm.closure4206_externref_shim(arg0, arg1, arg2);
|
|
814
827
|
}
|
|
815
828
|
|
|
816
|
-
function
|
|
817
|
-
wasm.
|
|
829
|
+
function __wbg_adapter_170(arg0, arg1, arg2, arg3) {
|
|
830
|
+
wasm.closure4605_externref_shim(arg0, arg1, arg2, arg3);
|
|
818
831
|
}
|
|
819
832
|
|
|
820
833
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
821
834
|
|
|
822
835
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
823
836
|
|
|
837
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
838
|
+
|
|
824
839
|
async function __wbg_load(module, imports) {
|
|
825
840
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
826
841
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -828,7 +843,9 @@ async function __wbg_load(module, imports) {
|
|
|
828
843
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
829
844
|
|
|
830
845
|
} catch (e) {
|
|
831
|
-
|
|
846
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
847
|
+
|
|
848
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
832
849
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
833
850
|
|
|
834
851
|
} else {
|
|
@@ -855,6 +872,10 @@ async function __wbg_load(module, imports) {
|
|
|
855
872
|
function __wbg_get_imports() {
|
|
856
873
|
const imports = {};
|
|
857
874
|
imports.wbg = {};
|
|
875
|
+
imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
|
|
876
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
877
|
+
return ret;
|
|
878
|
+
};
|
|
858
879
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
859
880
|
const ret = String(arg1);
|
|
860
881
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -862,25 +883,21 @@ function __wbg_get_imports() {
|
|
|
862
883
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
863
884
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
864
885
|
};
|
|
865
|
-
imports.wbg.
|
|
886
|
+
imports.wbg.__wbg_abort_67e1b49bf6614565 = function(arg0) {
|
|
866
887
|
arg0.abort();
|
|
867
888
|
};
|
|
868
|
-
imports.wbg.
|
|
889
|
+
imports.wbg.__wbg_append_72a3c0addd2bce38 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
869
890
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
870
891
|
}, arguments) };
|
|
871
|
-
imports.wbg.
|
|
892
|
+
imports.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() { return handleError(function (arg0) {
|
|
872
893
|
const ret = arg0.arrayBuffer();
|
|
873
894
|
return ret;
|
|
874
895
|
}, arguments) };
|
|
875
|
-
imports.wbg.
|
|
876
|
-
const ret = arg0.buffer;
|
|
877
|
-
return ret;
|
|
878
|
-
};
|
|
879
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
896
|
+
imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
880
897
|
const ret = arg0.call(arg1);
|
|
881
898
|
return ret;
|
|
882
899
|
}, arguments) };
|
|
883
|
-
imports.wbg.
|
|
900
|
+
imports.wbg.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
884
901
|
const ret = arg0.call(arg1, arg2);
|
|
885
902
|
return ret;
|
|
886
903
|
}, arguments) };
|
|
@@ -892,15 +909,15 @@ function __wbg_get_imports() {
|
|
|
892
909
|
const ret = arg0.crypto;
|
|
893
910
|
return ret;
|
|
894
911
|
};
|
|
895
|
-
imports.wbg.
|
|
912
|
+
imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
|
|
896
913
|
const ret = arg0.done;
|
|
897
914
|
return ret;
|
|
898
915
|
};
|
|
899
|
-
imports.wbg.
|
|
916
|
+
imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
|
|
900
917
|
const ret = Object.entries(arg0);
|
|
901
918
|
return ret;
|
|
902
919
|
};
|
|
903
|
-
imports.wbg.
|
|
920
|
+
imports.wbg.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
|
|
904
921
|
const ret = arg0.fetch(arg1);
|
|
905
922
|
return ret;
|
|
906
923
|
};
|
|
@@ -908,16 +925,16 @@ function __wbg_get_imports() {
|
|
|
908
925
|
const ret = fetch(arg0);
|
|
909
926
|
return ret;
|
|
910
927
|
};
|
|
911
|
-
imports.wbg.
|
|
928
|
+
imports.wbg.__wbg_from_88bc52ce20ba6318 = function(arg0) {
|
|
912
929
|
const ret = Array.from(arg0);
|
|
913
930
|
return ret;
|
|
914
931
|
};
|
|
932
|
+
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
933
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
934
|
+
}, arguments) };
|
|
915
935
|
imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
|
|
916
936
|
arg0.getRandomValues(arg1);
|
|
917
937
|
};
|
|
918
|
-
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
919
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
920
|
-
}, arguments) };
|
|
921
938
|
imports.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {
|
|
922
939
|
const ret = arg0.getRandomValues;
|
|
923
940
|
return ret;
|
|
@@ -925,27 +942,27 @@ function __wbg_get_imports() {
|
|
|
925
942
|
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
926
943
|
arg0.getRandomValues(arg1);
|
|
927
944
|
}, arguments) };
|
|
928
|
-
imports.wbg.
|
|
945
|
+
imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
|
|
929
946
|
const ret = arg0.getTime();
|
|
930
947
|
return ret;
|
|
931
948
|
};
|
|
932
|
-
imports.wbg.
|
|
933
|
-
const ret = Reflect.get(arg0, arg1);
|
|
934
|
-
return ret;
|
|
935
|
-
}, arguments) };
|
|
936
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
949
|
+
imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
937
950
|
const ret = arg0[arg1 >>> 0];
|
|
938
951
|
return ret;
|
|
939
952
|
};
|
|
940
|
-
imports.wbg.
|
|
953
|
+
imports.wbg.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
954
|
+
const ret = Reflect.get(arg0, arg1);
|
|
955
|
+
return ret;
|
|
956
|
+
}, arguments) };
|
|
957
|
+
imports.wbg.__wbg_has_b89e451f638123e3 = function() { return handleError(function (arg0, arg1) {
|
|
941
958
|
const ret = Reflect.has(arg0, arg1);
|
|
942
959
|
return ret;
|
|
943
960
|
}, arguments) };
|
|
944
|
-
imports.wbg.
|
|
961
|
+
imports.wbg.__wbg_headers_29fec3c72865cd75 = function(arg0) {
|
|
945
962
|
const ret = arg0.headers;
|
|
946
963
|
return ret;
|
|
947
964
|
};
|
|
948
|
-
imports.wbg.
|
|
965
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
|
|
949
966
|
let result;
|
|
950
967
|
try {
|
|
951
968
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -955,7 +972,7 @@ function __wbg_get_imports() {
|
|
|
955
972
|
const ret = result;
|
|
956
973
|
return ret;
|
|
957
974
|
};
|
|
958
|
-
imports.wbg.
|
|
975
|
+
imports.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b = function(arg0) {
|
|
959
976
|
let result;
|
|
960
977
|
try {
|
|
961
978
|
result = arg0 instanceof Map;
|
|
@@ -965,7 +982,7 @@ function __wbg_get_imports() {
|
|
|
965
982
|
const ret = result;
|
|
966
983
|
return ret;
|
|
967
984
|
};
|
|
968
|
-
imports.wbg.
|
|
985
|
+
imports.wbg.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
|
|
969
986
|
let result;
|
|
970
987
|
try {
|
|
971
988
|
result = arg0 instanceof Response;
|
|
@@ -975,7 +992,7 @@ function __wbg_get_imports() {
|
|
|
975
992
|
const ret = result;
|
|
976
993
|
return ret;
|
|
977
994
|
};
|
|
978
|
-
imports.wbg.
|
|
995
|
+
imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
|
|
979
996
|
let result;
|
|
980
997
|
try {
|
|
981
998
|
result = arg0 instanceof Uint8Array;
|
|
@@ -985,27 +1002,27 @@ function __wbg_get_imports() {
|
|
|
985
1002
|
const ret = result;
|
|
986
1003
|
return ret;
|
|
987
1004
|
};
|
|
988
|
-
imports.wbg.
|
|
1005
|
+
imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
|
|
989
1006
|
const ret = Array.isArray(arg0);
|
|
990
1007
|
return ret;
|
|
991
1008
|
};
|
|
992
|
-
imports.wbg.
|
|
1009
|
+
imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
|
|
993
1010
|
const ret = Number.isSafeInteger(arg0);
|
|
994
1011
|
return ret;
|
|
995
1012
|
};
|
|
996
|
-
imports.wbg.
|
|
1013
|
+
imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
|
|
997
1014
|
const ret = Symbol.iterator;
|
|
998
1015
|
return ret;
|
|
999
1016
|
};
|
|
1000
|
-
imports.wbg.
|
|
1017
|
+
imports.wbg.__wbg_keys_ef52390b2ae0e714 = function(arg0) {
|
|
1001
1018
|
const ret = Object.keys(arg0);
|
|
1002
1019
|
return ret;
|
|
1003
1020
|
};
|
|
1004
|
-
imports.wbg.
|
|
1021
|
+
imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
1005
1022
|
const ret = arg0.length;
|
|
1006
1023
|
return ret;
|
|
1007
1024
|
};
|
|
1008
|
-
imports.wbg.
|
|
1025
|
+
imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
1009
1026
|
const ret = arg0.length;
|
|
1010
1027
|
return ret;
|
|
1011
1028
|
};
|
|
@@ -1017,22 +1034,26 @@ function __wbg_get_imports() {
|
|
|
1017
1034
|
const ret = arg0.msCrypto;
|
|
1018
1035
|
return ret;
|
|
1019
1036
|
};
|
|
1020
|
-
imports.wbg.
|
|
1037
|
+
imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
|
|
1021
1038
|
const ret = new Date();
|
|
1022
1039
|
return ret;
|
|
1023
1040
|
};
|
|
1024
|
-
imports.wbg.
|
|
1025
|
-
const ret = new
|
|
1041
|
+
imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
1042
|
+
const ret = new Object();
|
|
1026
1043
|
return ret;
|
|
1027
|
-
}
|
|
1028
|
-
imports.wbg.
|
|
1044
|
+
};
|
|
1045
|
+
imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
|
|
1046
|
+
const ret = new Array();
|
|
1047
|
+
return ret;
|
|
1048
|
+
};
|
|
1049
|
+
imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
1029
1050
|
try {
|
|
1030
1051
|
var state0 = {a: arg0, b: arg1};
|
|
1031
1052
|
var cb0 = (arg0, arg1) => {
|
|
1032
1053
|
const a = state0.a;
|
|
1033
1054
|
state0.a = 0;
|
|
1034
1055
|
try {
|
|
1035
|
-
return
|
|
1056
|
+
return __wbg_adapter_170(a, state0.b, arg0, arg1);
|
|
1036
1057
|
} finally {
|
|
1037
1058
|
state0.a = a;
|
|
1038
1059
|
}
|
|
@@ -1043,47 +1064,43 @@ function __wbg_get_imports() {
|
|
|
1043
1064
|
state0.a = state0.b = 0;
|
|
1044
1065
|
}
|
|
1045
1066
|
};
|
|
1046
|
-
imports.wbg.
|
|
1047
|
-
const ret = new Object();
|
|
1048
|
-
return ret;
|
|
1049
|
-
};
|
|
1050
|
-
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
1067
|
+
imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
|
|
1051
1068
|
const ret = new Map();
|
|
1052
1069
|
return ret;
|
|
1053
1070
|
};
|
|
1054
|
-
imports.wbg.
|
|
1055
|
-
const ret = new Array();
|
|
1056
|
-
return ret;
|
|
1057
|
-
};
|
|
1058
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
1071
|
+
imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
|
|
1059
1072
|
const ret = new Uint8Array(arg0);
|
|
1060
1073
|
return ret;
|
|
1061
1074
|
};
|
|
1062
|
-
imports.wbg.
|
|
1075
|
+
imports.wbg.__wbg_new_66b9434b4e59b63e = function() { return handleError(function () {
|
|
1063
1076
|
const ret = new AbortController();
|
|
1064
1077
|
return ret;
|
|
1065
1078
|
}, arguments) };
|
|
1066
|
-
imports.wbg.
|
|
1067
|
-
const ret = new
|
|
1079
|
+
imports.wbg.__wbg_new_f6e53210afea8e45 = function() { return handleError(function () {
|
|
1080
|
+
const ret = new Headers();
|
|
1081
|
+
return ret;
|
|
1082
|
+
}, arguments) };
|
|
1083
|
+
imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
|
|
1084
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1068
1085
|
return ret;
|
|
1069
1086
|
};
|
|
1070
|
-
imports.wbg.
|
|
1071
|
-
const ret = new
|
|
1087
|
+
imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
1088
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1072
1089
|
return ret;
|
|
1073
1090
|
};
|
|
1074
|
-
imports.wbg.
|
|
1091
|
+
imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
|
|
1075
1092
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1076
1093
|
return ret;
|
|
1077
1094
|
};
|
|
1078
|
-
imports.wbg.
|
|
1095
|
+
imports.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1079
1096
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1080
1097
|
return ret;
|
|
1081
1098
|
}, arguments) };
|
|
1082
|
-
imports.wbg.
|
|
1099
|
+
imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
|
|
1083
1100
|
const ret = arg0.next;
|
|
1084
1101
|
return ret;
|
|
1085
1102
|
};
|
|
1086
|
-
imports.wbg.
|
|
1103
|
+
imports.wbg.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
|
|
1087
1104
|
const ret = arg0.next();
|
|
1088
1105
|
return ret;
|
|
1089
1106
|
}, arguments) };
|
|
@@ -1091,7 +1108,7 @@ function __wbg_get_imports() {
|
|
|
1091
1108
|
const ret = arg0.node;
|
|
1092
1109
|
return ret;
|
|
1093
1110
|
};
|
|
1094
|
-
imports.wbg.
|
|
1111
|
+
imports.wbg.__wbg_now_886b39d7ec380719 = function(arg0) {
|
|
1095
1112
|
const ret = arg0.now();
|
|
1096
1113
|
return ret;
|
|
1097
1114
|
};
|
|
@@ -1099,14 +1116,17 @@ function __wbg_get_imports() {
|
|
|
1099
1116
|
const ret = arg0.process;
|
|
1100
1117
|
return ret;
|
|
1101
1118
|
};
|
|
1102
|
-
imports.wbg.
|
|
1119
|
+
imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
|
|
1120
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1121
|
+
};
|
|
1122
|
+
imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
1103
1123
|
const ret = arg0.push(arg1);
|
|
1104
1124
|
return ret;
|
|
1105
1125
|
};
|
|
1106
|
-
imports.wbg.
|
|
1126
|
+
imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
|
|
1107
1127
|
queueMicrotask(arg0);
|
|
1108
1128
|
};
|
|
1109
|
-
imports.wbg.
|
|
1129
|
+
imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
|
|
1110
1130
|
const ret = arg0.queueMicrotask;
|
|
1111
1131
|
return ret;
|
|
1112
1132
|
};
|
|
@@ -1124,7 +1144,7 @@ function __wbg_get_imports() {
|
|
|
1124
1144
|
const ret = module.require;
|
|
1125
1145
|
return ret;
|
|
1126
1146
|
}, arguments) };
|
|
1127
|
-
imports.wbg.
|
|
1147
|
+
imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
|
|
1128
1148
|
const ret = Promise.resolve(arg0);
|
|
1129
1149
|
return ret;
|
|
1130
1150
|
};
|
|
@@ -1132,50 +1152,50 @@ function __wbg_get_imports() {
|
|
|
1132
1152
|
const ret = self.self;
|
|
1133
1153
|
return ret;
|
|
1134
1154
|
}, arguments) };
|
|
1135
|
-
imports.wbg.
|
|
1136
|
-
arg0
|
|
1155
|
+
imports.wbg.__wbg_set_1353b2a5e96bc48c = function(arg0, arg1, arg2) {
|
|
1156
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1137
1157
|
};
|
|
1138
1158
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1139
1159
|
arg0[arg1] = arg2;
|
|
1140
1160
|
};
|
|
1141
|
-
imports.wbg.
|
|
1142
|
-
|
|
1161
|
+
imports.wbg.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1162
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1163
|
+
return ret;
|
|
1164
|
+
}, arguments) };
|
|
1165
|
+
imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
|
|
1166
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1143
1167
|
};
|
|
1144
|
-
imports.wbg.
|
|
1168
|
+
imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
|
|
1145
1169
|
const ret = arg0.set(arg1, arg2);
|
|
1146
1170
|
return ret;
|
|
1147
1171
|
};
|
|
1148
|
-
imports.wbg.
|
|
1149
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1150
|
-
return ret;
|
|
1151
|
-
}, arguments) };
|
|
1152
|
-
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
1172
|
+
imports.wbg.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
|
|
1153
1173
|
arg0.body = arg1;
|
|
1154
1174
|
};
|
|
1155
|
-
imports.wbg.
|
|
1175
|
+
imports.wbg.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
|
|
1156
1176
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1157
1177
|
};
|
|
1158
|
-
imports.wbg.
|
|
1178
|
+
imports.wbg.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
|
|
1159
1179
|
arg0.headers = arg1;
|
|
1160
1180
|
};
|
|
1161
|
-
imports.wbg.
|
|
1181
|
+
imports.wbg.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
|
|
1162
1182
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1163
1183
|
};
|
|
1164
|
-
imports.wbg.
|
|
1184
|
+
imports.wbg.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
|
|
1165
1185
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1166
1186
|
};
|
|
1167
|
-
imports.wbg.
|
|
1187
|
+
imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
|
|
1168
1188
|
arg0.signal = arg1;
|
|
1169
1189
|
};
|
|
1170
|
-
imports.wbg.
|
|
1190
|
+
imports.wbg.__wbg_signal_da4d466ce86118b5 = function(arg0) {
|
|
1171
1191
|
const ret = arg0.signal;
|
|
1172
1192
|
return ret;
|
|
1173
1193
|
};
|
|
1174
|
-
imports.wbg.
|
|
1194
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
|
|
1175
1195
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1176
1196
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1177
1197
|
};
|
|
1178
|
-
imports.wbg.
|
|
1198
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
|
|
1179
1199
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1180
1200
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1181
1201
|
};
|
|
@@ -1183,42 +1203,42 @@ function __wbg_get_imports() {
|
|
|
1183
1203
|
const ret = module;
|
|
1184
1204
|
return ret;
|
|
1185
1205
|
};
|
|
1186
|
-
imports.wbg.
|
|
1206
|
+
imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
|
|
1187
1207
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1188
1208
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1189
1209
|
};
|
|
1190
|
-
imports.wbg.
|
|
1210
|
+
imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
|
|
1191
1211
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1192
1212
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1193
1213
|
};
|
|
1194
|
-
imports.wbg.
|
|
1214
|
+
imports.wbg.__wbg_status_3fea3036088621d6 = function(arg0) {
|
|
1195
1215
|
const ret = arg0.status;
|
|
1196
1216
|
return ret;
|
|
1197
1217
|
};
|
|
1198
|
-
imports.wbg.
|
|
1218
|
+
imports.wbg.__wbg_stringify_b98c93d0a190446a = function() { return handleError(function (arg0) {
|
|
1199
1219
|
const ret = JSON.stringify(arg0);
|
|
1200
1220
|
return ret;
|
|
1201
1221
|
}, arguments) };
|
|
1202
|
-
imports.wbg.
|
|
1222
|
+
imports.wbg.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
|
|
1203
1223
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1204
1224
|
return ret;
|
|
1205
1225
|
};
|
|
1206
|
-
imports.wbg.
|
|
1207
|
-
const ret = arg0.then(arg1);
|
|
1226
|
+
imports.wbg.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
|
|
1227
|
+
const ret = arg0.then(arg1, arg2);
|
|
1208
1228
|
return ret;
|
|
1209
1229
|
};
|
|
1210
|
-
imports.wbg.
|
|
1211
|
-
const ret = arg0.then(arg1
|
|
1230
|
+
imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
|
|
1231
|
+
const ret = arg0.then(arg1);
|
|
1212
1232
|
return ret;
|
|
1213
1233
|
};
|
|
1214
|
-
imports.wbg.
|
|
1234
|
+
imports.wbg.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
|
|
1215
1235
|
const ret = arg1.url;
|
|
1216
1236
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1217
1237
|
const len1 = WASM_VECTOR_LEN;
|
|
1218
1238
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1219
1239
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1220
1240
|
};
|
|
1221
|
-
imports.wbg.
|
|
1241
|
+
imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
|
|
1222
1242
|
const ret = arg0.value;
|
|
1223
1243
|
return ret;
|
|
1224
1244
|
};
|
|
@@ -1226,30 +1246,18 @@ function __wbg_get_imports() {
|
|
|
1226
1246
|
const ret = arg0.versions;
|
|
1227
1247
|
return ret;
|
|
1228
1248
|
};
|
|
1229
|
-
imports.wbg.
|
|
1230
|
-
const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
1231
|
-
return ret;
|
|
1232
|
-
};
|
|
1233
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
1234
|
-
const ret = arg0;
|
|
1235
|
-
return ret;
|
|
1236
|
-
};
|
|
1237
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1238
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1239
|
-
return ret;
|
|
1240
|
-
};
|
|
1241
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
1249
|
+
imports.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
|
|
1242
1250
|
const v = arg1;
|
|
1243
1251
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1244
1252
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1245
1253
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1246
1254
|
};
|
|
1247
|
-
imports.wbg.
|
|
1255
|
+
imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
|
|
1248
1256
|
const v = arg0;
|
|
1249
|
-
const ret = typeof(v) === 'boolean' ?
|
|
1250
|
-
return ret;
|
|
1257
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1258
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1251
1259
|
};
|
|
1252
|
-
imports.wbg.
|
|
1260
|
+
imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
|
|
1253
1261
|
const obj = arg0.original;
|
|
1254
1262
|
if (obj.cnt-- == 1) {
|
|
1255
1263
|
obj.a = 0;
|
|
@@ -1258,83 +1266,57 @@ function __wbg_get_imports() {
|
|
|
1258
1266
|
const ret = false;
|
|
1259
1267
|
return ret;
|
|
1260
1268
|
};
|
|
1261
|
-
imports.wbg.
|
|
1262
|
-
const ret = makeMutClosure(arg0, arg1, 4150, __wbg_adapter_54);
|
|
1263
|
-
return ret;
|
|
1264
|
-
};
|
|
1265
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1269
|
+
imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
|
|
1266
1270
|
const ret = debugString(arg1);
|
|
1267
1271
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1268
1272
|
const len1 = WASM_VECTOR_LEN;
|
|
1269
1273
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1270
1274
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1271
1275
|
};
|
|
1272
|
-
imports.wbg.
|
|
1273
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1274
|
-
return ret;
|
|
1275
|
-
};
|
|
1276
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
1276
|
+
imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
|
|
1277
1277
|
const ret = arg0 in arg1;
|
|
1278
1278
|
return ret;
|
|
1279
1279
|
};
|
|
1280
|
-
imports.wbg.
|
|
1281
|
-
const table = wasm.__wbindgen_export_4;
|
|
1282
|
-
const offset = table.grow(4);
|
|
1283
|
-
table.set(0, undefined);
|
|
1284
|
-
table.set(offset + 0, undefined);
|
|
1285
|
-
table.set(offset + 1, null);
|
|
1286
|
-
table.set(offset + 2, true);
|
|
1287
|
-
table.set(offset + 3, false);
|
|
1288
|
-
;
|
|
1289
|
-
};
|
|
1290
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
1280
|
+
imports.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
|
|
1291
1281
|
const ret = typeof(arg0) === 'bigint';
|
|
1292
1282
|
return ret;
|
|
1293
1283
|
};
|
|
1294
|
-
imports.wbg.
|
|
1284
|
+
imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
|
|
1295
1285
|
const ret = typeof(arg0) === 'function';
|
|
1296
1286
|
return ret;
|
|
1297
1287
|
};
|
|
1298
|
-
imports.wbg.
|
|
1288
|
+
imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
|
|
1299
1289
|
const ret = arg0 === null;
|
|
1300
1290
|
return ret;
|
|
1301
1291
|
};
|
|
1302
|
-
imports.wbg.
|
|
1292
|
+
imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
1303
1293
|
const val = arg0;
|
|
1304
1294
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1305
1295
|
return ret;
|
|
1306
1296
|
};
|
|
1307
|
-
imports.wbg.
|
|
1297
|
+
imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
1308
1298
|
const ret = typeof(arg0) === 'string';
|
|
1309
1299
|
return ret;
|
|
1310
1300
|
};
|
|
1311
|
-
imports.wbg.
|
|
1301
|
+
imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
1312
1302
|
const ret = arg0 === undefined;
|
|
1313
1303
|
return ret;
|
|
1314
1304
|
};
|
|
1315
|
-
imports.wbg.
|
|
1305
|
+
imports.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
|
|
1316
1306
|
const ret = arg0 === arg1;
|
|
1317
1307
|
return ret;
|
|
1318
1308
|
};
|
|
1319
|
-
imports.wbg.
|
|
1309
|
+
imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
|
|
1320
1310
|
const ret = arg0 == arg1;
|
|
1321
1311
|
return ret;
|
|
1322
1312
|
};
|
|
1323
|
-
imports.wbg.
|
|
1324
|
-
const ret = wasm.memory;
|
|
1325
|
-
return ret;
|
|
1326
|
-
};
|
|
1327
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1313
|
+
imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
|
|
1328
1314
|
const obj = arg1;
|
|
1329
1315
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1330
1316
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1331
1317
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1332
1318
|
};
|
|
1333
|
-
imports.wbg.
|
|
1334
|
-
const ret = arg0;
|
|
1335
|
-
return ret;
|
|
1336
|
-
};
|
|
1337
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1319
|
+
imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
|
|
1338
1320
|
const obj = arg1;
|
|
1339
1321
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1340
1322
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1342,12 +1324,53 @@ function __wbg_get_imports() {
|
|
|
1342
1324
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1343
1325
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1344
1326
|
};
|
|
1345
|
-
imports.wbg.
|
|
1327
|
+
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
1328
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1329
|
+
};
|
|
1330
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1331
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1346
1332
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1347
1333
|
return ret;
|
|
1348
1334
|
};
|
|
1349
|
-
imports.wbg.
|
|
1350
|
-
|
|
1335
|
+
imports.wbg.__wbindgen_cast_2ddd8a25ff58642a = function(arg0, arg1) {
|
|
1336
|
+
// Cast intrinsic for `I128 -> Externref`.
|
|
1337
|
+
const ret = (BigInt.asUintN(64, arg0) | (arg1 << BigInt(64)));
|
|
1338
|
+
return ret;
|
|
1339
|
+
};
|
|
1340
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1341
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1342
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1343
|
+
return ret;
|
|
1344
|
+
};
|
|
1345
|
+
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
1346
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1347
|
+
const ret = arg0;
|
|
1348
|
+
return ret;
|
|
1349
|
+
};
|
|
1350
|
+
imports.wbg.__wbindgen_cast_9f5eb788ede76783 = function(arg0, arg1) {
|
|
1351
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 4205, function: Function { arguments: [Externref], shim_idx: 4206, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1352
|
+
const ret = makeMutClosure(arg0, arg1, 4205, __wbg_adapter_10);
|
|
1353
|
+
return ret;
|
|
1354
|
+
};
|
|
1355
|
+
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
1356
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1357
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1358
|
+
return ret;
|
|
1359
|
+
};
|
|
1360
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1361
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1362
|
+
const ret = arg0;
|
|
1363
|
+
return ret;
|
|
1364
|
+
};
|
|
1365
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1366
|
+
const table = wasm.__wbindgen_export_4;
|
|
1367
|
+
const offset = table.grow(4);
|
|
1368
|
+
table.set(0, undefined);
|
|
1369
|
+
table.set(offset + 0, undefined);
|
|
1370
|
+
table.set(offset + 1, null);
|
|
1371
|
+
table.set(offset + 2, true);
|
|
1372
|
+
table.set(offset + 3, false);
|
|
1373
|
+
;
|
|
1351
1374
|
};
|
|
1352
1375
|
|
|
1353
1376
|
return imports;
|