@learncard/core 8.5.4 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core.cjs.development.js +843 -68960
- package/dist/core.cjs.development.js.map +4 -4
- package/dist/core.cjs.production.min.js +1 -948
- package/dist/core.cjs.production.min.js.map +4 -4
- package/dist/core.esm.js +1059 -69187
- package/dist/core.esm.js.map +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/types/LearnCard.d.ts +0 -57
- package/dist/types/helpers.d.ts +0 -15
- package/dist/types/planes.d.ts +36 -5
- package/dist/types/utilities.d.ts +4 -0
- package/dist/wallet/plugins/index.d.ts +1 -13
- package/package.json +4 -24
- package/dist/didkit/didkit_wasm.d.ts +0 -251
- package/dist/didkit/didkit_wasm.js +0 -1135
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +0 -43
- package/dist/didkit/index.d.ts +0 -4
- package/dist/didkit_wasm.d.ts +0 -251
- package/dist/didkit_wasm.js +0 -1135
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +0 -43
- package/dist/wallet/defaults.d.ts +0 -5
- package/dist/wallet/init.d.ts +0 -29
- package/dist/wallet/initializers/apiLearnCard.d.ts +0 -14
- package/dist/wallet/initializers/customLearnCard.d.ts +0 -7
- package/dist/wallet/initializers/emptyLearnCard.d.ts +0 -7
- package/dist/wallet/initializers/learnCardFromSeed.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/hardcodedTokens.d.ts +0 -22
- package/dist/wallet/plugins/EthereumPlugin/helpers.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/index.d.ts +0 -7
- package/dist/wallet/plugins/EthereumPlugin/types.d.ts +0 -32
- package/dist/wallet/plugins/ceramic/ceramic.d.ts +0 -215
- package/dist/wallet/plugins/ceramic/helpers.d.ts +0 -3
- package/dist/wallet/plugins/ceramic/index.d.ts +0 -4
- package/dist/wallet/plugins/ceramic/types.d.ts +0 -43
- package/dist/wallet/plugins/chapi/chapi.d.ts +0 -5
- package/dist/wallet/plugins/chapi/index.d.ts +0 -2
- package/dist/wallet/plugins/chapi/types.d.ts +0 -88
- package/dist/wallet/plugins/didkey/helpers.d.ts +0 -4
- package/dist/wallet/plugins/didkey/index.d.ts +0 -217
- package/dist/wallet/plugins/didkey/types.d.ts +0 -18
- package/dist/wallet/plugins/didkit/index.d.ts +0 -8
- package/dist/wallet/plugins/didkit/types.d.ts +0 -40
- package/dist/wallet/plugins/expiration/index.d.ts +0 -7
- package/dist/wallet/plugins/expiration/types.d.ts +0 -3
- package/dist/wallet/plugins/idx/idx.d.ts +0 -6
- package/dist/wallet/plugins/idx/index.d.ts +0 -4
- package/dist/wallet/plugins/idx/types.d.ts +0 -54
- package/dist/wallet/plugins/learn-card/index.d.ts +0 -7
- package/dist/wallet/plugins/learn-card/types.d.ts +0 -17
- package/dist/wallet/plugins/learn-card/verify.d.ts +0 -215
- package/dist/wallet/plugins/vc/index.d.ts +0 -2
- package/dist/wallet/plugins/vc/issueCredential.d.ts +0 -98
- package/dist/wallet/plugins/vc/issuePresentation.d.ts +0 -220
- package/dist/wallet/plugins/vc/types.d.ts +0 -35
- package/dist/wallet/plugins/vc/vc.d.ts +0 -5
- package/dist/wallet/plugins/vc/verifyCredential.d.ts +0 -8
- package/dist/wallet/plugins/vc/verifyPresentation.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/helpers.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/index.d.ts +0 -8
- package/dist/wallet/plugins/vc-api/types.d.ts +0 -20
- package/dist/wallet/plugins/vc-resolution/index.d.ts +0 -6
- package/dist/wallet/plugins/vc-resolution/types.d.ts +0 -13
- package/dist/wallet/plugins/vc-templates/index.d.ts +0 -2
- package/dist/wallet/plugins/vc-templates/templates.d.ts +0 -6
- package/dist/wallet/plugins/vc-templates/types.d.ts +0 -68
- package/dist/wallet/plugins/vc-templates/vc-templates.d.ts +0 -5
- package/dist/wallet/plugins/vpqr/index.d.ts +0 -7
- package/dist/wallet/plugins/vpqr/types.d.ts +0 -12
@@ -1,1135 +0,0 @@
|
|
1
|
-
|
2
|
-
let wasm;
|
3
|
-
|
4
|
-
const heap = new Array(32).fill(undefined);
|
5
|
-
|
6
|
-
heap.push(undefined, null, true, false);
|
7
|
-
|
8
|
-
function getObject(idx) { return heap[idx]; }
|
9
|
-
|
10
|
-
let heap_next = heap.length;
|
11
|
-
|
12
|
-
function dropObject(idx) {
|
13
|
-
if (idx < 36) return;
|
14
|
-
heap[idx] = heap_next;
|
15
|
-
heap_next = idx;
|
16
|
-
}
|
17
|
-
|
18
|
-
function takeObject(idx) {
|
19
|
-
const ret = getObject(idx);
|
20
|
-
dropObject(idx);
|
21
|
-
return ret;
|
22
|
-
}
|
23
|
-
|
24
|
-
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
25
|
-
|
26
|
-
cachedTextDecoder.decode();
|
27
|
-
|
28
|
-
let cachedUint8Memory0 = new Uint8Array();
|
29
|
-
|
30
|
-
function getUint8Memory0() {
|
31
|
-
if (cachedUint8Memory0.byteLength === 0) {
|
32
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
33
|
-
}
|
34
|
-
return cachedUint8Memory0;
|
35
|
-
}
|
36
|
-
|
37
|
-
function getStringFromWasm0(ptr, len) {
|
38
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
39
|
-
}
|
40
|
-
|
41
|
-
function addHeapObject(obj) {
|
42
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
43
|
-
const idx = heap_next;
|
44
|
-
heap_next = heap[idx];
|
45
|
-
|
46
|
-
heap[idx] = obj;
|
47
|
-
return idx;
|
48
|
-
}
|
49
|
-
|
50
|
-
let WASM_VECTOR_LEN = 0;
|
51
|
-
|
52
|
-
const cachedTextEncoder = new TextEncoder('utf-8');
|
53
|
-
|
54
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
55
|
-
? function (arg, view) {
|
56
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
57
|
-
}
|
58
|
-
: function (arg, view) {
|
59
|
-
const buf = cachedTextEncoder.encode(arg);
|
60
|
-
view.set(buf);
|
61
|
-
return {
|
62
|
-
read: arg.length,
|
63
|
-
written: buf.length
|
64
|
-
};
|
65
|
-
});
|
66
|
-
|
67
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
68
|
-
|
69
|
-
if (realloc === undefined) {
|
70
|
-
const buf = cachedTextEncoder.encode(arg);
|
71
|
-
const ptr = malloc(buf.length);
|
72
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
73
|
-
WASM_VECTOR_LEN = buf.length;
|
74
|
-
return ptr;
|
75
|
-
}
|
76
|
-
|
77
|
-
let len = arg.length;
|
78
|
-
let ptr = malloc(len);
|
79
|
-
|
80
|
-
const mem = getUint8Memory0();
|
81
|
-
|
82
|
-
let offset = 0;
|
83
|
-
|
84
|
-
for (; offset < len; offset++) {
|
85
|
-
const code = arg.charCodeAt(offset);
|
86
|
-
if (code > 0x7F) break;
|
87
|
-
mem[ptr + offset] = code;
|
88
|
-
}
|
89
|
-
|
90
|
-
if (offset !== len) {
|
91
|
-
if (offset !== 0) {
|
92
|
-
arg = arg.slice(offset);
|
93
|
-
}
|
94
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
95
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
96
|
-
const ret = encodeString(arg, view);
|
97
|
-
|
98
|
-
offset += ret.written;
|
99
|
-
}
|
100
|
-
|
101
|
-
WASM_VECTOR_LEN = offset;
|
102
|
-
return ptr;
|
103
|
-
}
|
104
|
-
|
105
|
-
function isLikeNone(x) {
|
106
|
-
return x === undefined || x === null;
|
107
|
-
}
|
108
|
-
|
109
|
-
let cachedInt32Memory0 = new Int32Array();
|
110
|
-
|
111
|
-
function getInt32Memory0() {
|
112
|
-
if (cachedInt32Memory0.byteLength === 0) {
|
113
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
114
|
-
}
|
115
|
-
return cachedInt32Memory0;
|
116
|
-
}
|
117
|
-
|
118
|
-
function debugString(val) {
|
119
|
-
// primitive types
|
120
|
-
const type = typeof val;
|
121
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
122
|
-
return `${val}`;
|
123
|
-
}
|
124
|
-
if (type == 'string') {
|
125
|
-
return `"${val}"`;
|
126
|
-
}
|
127
|
-
if (type == 'symbol') {
|
128
|
-
const description = val.description;
|
129
|
-
if (description == null) {
|
130
|
-
return 'Symbol';
|
131
|
-
} else {
|
132
|
-
return `Symbol(${description})`;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
if (type == 'function') {
|
136
|
-
const name = val.name;
|
137
|
-
if (typeof name == 'string' && name.length > 0) {
|
138
|
-
return `Function(${name})`;
|
139
|
-
} else {
|
140
|
-
return 'Function';
|
141
|
-
}
|
142
|
-
}
|
143
|
-
// objects
|
144
|
-
if (Array.isArray(val)) {
|
145
|
-
const length = val.length;
|
146
|
-
let debug = '[';
|
147
|
-
if (length > 0) {
|
148
|
-
debug += debugString(val[0]);
|
149
|
-
}
|
150
|
-
for(let i = 1; i < length; i++) {
|
151
|
-
debug += ', ' + debugString(val[i]);
|
152
|
-
}
|
153
|
-
debug += ']';
|
154
|
-
return debug;
|
155
|
-
}
|
156
|
-
// Test for built-in
|
157
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
158
|
-
let className;
|
159
|
-
if (builtInMatches.length > 1) {
|
160
|
-
className = builtInMatches[1];
|
161
|
-
} else {
|
162
|
-
// Failed to match the standard '[object ClassName]'
|
163
|
-
return toString.call(val);
|
164
|
-
}
|
165
|
-
if (className == 'Object') {
|
166
|
-
// we're a user defined class or Object
|
167
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
168
|
-
// easier than looping through ownProperties of `val`.
|
169
|
-
try {
|
170
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
171
|
-
} catch (_) {
|
172
|
-
return 'Object';
|
173
|
-
}
|
174
|
-
}
|
175
|
-
// errors
|
176
|
-
if (val instanceof Error) {
|
177
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
178
|
-
}
|
179
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
180
|
-
return className;
|
181
|
-
}
|
182
|
-
|
183
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
184
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
185
|
-
const real = (...args) => {
|
186
|
-
// First up with a closure we increment the internal reference
|
187
|
-
// count. This ensures that the Rust closure environment won't
|
188
|
-
// be deallocated while we're invoking it.
|
189
|
-
state.cnt++;
|
190
|
-
const a = state.a;
|
191
|
-
state.a = 0;
|
192
|
-
try {
|
193
|
-
return f(a, state.b, ...args);
|
194
|
-
} finally {
|
195
|
-
if (--state.cnt === 0) {
|
196
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
197
|
-
|
198
|
-
} else {
|
199
|
-
state.a = a;
|
200
|
-
}
|
201
|
-
}
|
202
|
-
};
|
203
|
-
real.original = state;
|
204
|
-
|
205
|
-
return real;
|
206
|
-
}
|
207
|
-
function __wbg_adapter_26(arg0, arg1, arg2) {
|
208
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf6251ee6687a20b8(arg0, arg1, addHeapObject(arg2));
|
209
|
-
}
|
210
|
-
|
211
|
-
/**
|
212
|
-
* @returns {string}
|
213
|
-
*/
|
214
|
-
export function getVersion() {
|
215
|
-
try {
|
216
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
217
|
-
wasm.getVersion(retptr);
|
218
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
219
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
220
|
-
return getStringFromWasm0(r0, r1);
|
221
|
-
} finally {
|
222
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
223
|
-
wasm.__wbindgen_free(r0, r1);
|
224
|
-
}
|
225
|
-
}
|
226
|
-
|
227
|
-
/**
|
228
|
-
* @param {string} did
|
229
|
-
* @param {string} input_metadata
|
230
|
-
* @returns {Promise<any>}
|
231
|
-
*/
|
232
|
-
export function didResolver(did, input_metadata) {
|
233
|
-
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
234
|
-
const len0 = WASM_VECTOR_LEN;
|
235
|
-
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
236
|
-
const len1 = WASM_VECTOR_LEN;
|
237
|
-
const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
|
238
|
-
return takeObject(ret);
|
239
|
-
}
|
240
|
-
|
241
|
-
/**
|
242
|
-
* @param {string} did
|
243
|
-
* @param {string} input_metadata
|
244
|
-
* @returns {Promise<any>}
|
245
|
-
*/
|
246
|
-
export function resolveDID(did, input_metadata) {
|
247
|
-
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
248
|
-
const len0 = WASM_VECTOR_LEN;
|
249
|
-
const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
250
|
-
const len1 = WASM_VECTOR_LEN;
|
251
|
-
const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
|
252
|
-
return takeObject(ret);
|
253
|
-
}
|
254
|
-
|
255
|
-
/**
|
256
|
-
* @returns {string}
|
257
|
-
*/
|
258
|
-
export function generateEd25519Key() {
|
259
|
-
try {
|
260
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
261
|
-
wasm.generateEd25519Key(retptr);
|
262
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
263
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
264
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
265
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
266
|
-
var ptr0 = r0;
|
267
|
-
var len0 = r1;
|
268
|
-
if (r3) {
|
269
|
-
ptr0 = 0; len0 = 0;
|
270
|
-
throw takeObject(r2);
|
271
|
-
}
|
272
|
-
return getStringFromWasm0(ptr0, len0);
|
273
|
-
} finally {
|
274
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
275
|
-
wasm.__wbindgen_free(ptr0, len0);
|
276
|
-
}
|
277
|
-
}
|
278
|
-
|
279
|
-
function passArray8ToWasm0(arg, malloc) {
|
280
|
-
const ptr = malloc(arg.length * 1);
|
281
|
-
getUint8Memory0().set(arg, ptr / 1);
|
282
|
-
WASM_VECTOR_LEN = arg.length;
|
283
|
-
return ptr;
|
284
|
-
}
|
285
|
-
/**
|
286
|
-
* @param {Uint8Array} bytes
|
287
|
-
* @returns {string}
|
288
|
-
*/
|
289
|
-
export function generateEd25519KeyFromBytes(bytes) {
|
290
|
-
try {
|
291
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
292
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
293
|
-
const len0 = WASM_VECTOR_LEN;
|
294
|
-
wasm.generateEd25519KeyFromBytes(retptr, ptr0, len0);
|
295
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
296
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
297
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
298
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
299
|
-
var ptr1 = r0;
|
300
|
-
var len1 = r1;
|
301
|
-
if (r3) {
|
302
|
-
ptr1 = 0; len1 = 0;
|
303
|
-
throw takeObject(r2);
|
304
|
-
}
|
305
|
-
return getStringFromWasm0(ptr1, len1);
|
306
|
-
} finally {
|
307
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
308
|
-
wasm.__wbindgen_free(ptr1, len1);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
/**
|
313
|
-
* @returns {string}
|
314
|
-
*/
|
315
|
-
export function generateSecp256k1Key() {
|
316
|
-
try {
|
317
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
318
|
-
wasm.generateSecp256k1Key(retptr);
|
319
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
320
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
321
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
322
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
323
|
-
var ptr0 = r0;
|
324
|
-
var len0 = r1;
|
325
|
-
if (r3) {
|
326
|
-
ptr0 = 0; len0 = 0;
|
327
|
-
throw takeObject(r2);
|
328
|
-
}
|
329
|
-
return getStringFromWasm0(ptr0, len0);
|
330
|
-
} finally {
|
331
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
332
|
-
wasm.__wbindgen_free(ptr0, len0);
|
333
|
-
}
|
334
|
-
}
|
335
|
-
|
336
|
-
/**
|
337
|
-
* @param {Uint8Array} bytes
|
338
|
-
* @returns {string}
|
339
|
-
*/
|
340
|
-
export function generateSecp256k1KeyFromBytes(bytes) {
|
341
|
-
try {
|
342
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
343
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
344
|
-
const len0 = WASM_VECTOR_LEN;
|
345
|
-
wasm.generateSecp256k1KeyFromBytes(retptr, ptr0, len0);
|
346
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
347
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
348
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
349
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
350
|
-
var ptr1 = r0;
|
351
|
-
var len1 = r1;
|
352
|
-
if (r3) {
|
353
|
-
ptr1 = 0; len1 = 0;
|
354
|
-
throw takeObject(r2);
|
355
|
-
}
|
356
|
-
return getStringFromWasm0(ptr1, len1);
|
357
|
-
} finally {
|
358
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
359
|
-
wasm.__wbindgen_free(ptr1, len1);
|
360
|
-
}
|
361
|
-
}
|
362
|
-
|
363
|
-
/**
|
364
|
-
* @param {string} method_pattern
|
365
|
-
* @param {string} jwk
|
366
|
-
* @returns {string}
|
367
|
-
*/
|
368
|
-
export function keyToDID(method_pattern, jwk) {
|
369
|
-
try {
|
370
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
371
|
-
const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
372
|
-
const len0 = WASM_VECTOR_LEN;
|
373
|
-
const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
374
|
-
const len1 = WASM_VECTOR_LEN;
|
375
|
-
wasm.keyToDID(retptr, ptr0, len0, ptr1, len1);
|
376
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
377
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
378
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
379
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
380
|
-
var ptr2 = r0;
|
381
|
-
var len2 = r1;
|
382
|
-
if (r3) {
|
383
|
-
ptr2 = 0; len2 = 0;
|
384
|
-
throw takeObject(r2);
|
385
|
-
}
|
386
|
-
return getStringFromWasm0(ptr2, len2);
|
387
|
-
} finally {
|
388
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
389
|
-
wasm.__wbindgen_free(ptr2, len2);
|
390
|
-
}
|
391
|
-
}
|
392
|
-
|
393
|
-
/**
|
394
|
-
* @param {string} method_pattern
|
395
|
-
* @param {string} jwk
|
396
|
-
* @returns {Promise<any>}
|
397
|
-
*/
|
398
|
-
export function keyToVerificationMethod(method_pattern, jwk) {
|
399
|
-
const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
400
|
-
const len0 = WASM_VECTOR_LEN;
|
401
|
-
const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
402
|
-
const len1 = WASM_VECTOR_LEN;
|
403
|
-
const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);
|
404
|
-
return takeObject(ret);
|
405
|
-
}
|
406
|
-
|
407
|
-
/**
|
408
|
-
* @param {string} did
|
409
|
-
* @returns {Promise<any>}
|
410
|
-
*/
|
411
|
-
export function didToVerificationMethod(did) {
|
412
|
-
const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
413
|
-
const len0 = WASM_VECTOR_LEN;
|
414
|
-
const ret = wasm.didToVerificationMethod(ptr0, len0);
|
415
|
-
return takeObject(ret);
|
416
|
-
}
|
417
|
-
|
418
|
-
/**
|
419
|
-
* @param {string} credential
|
420
|
-
* @param {string} proof_options
|
421
|
-
* @param {string} key
|
422
|
-
* @returns {Promise<any>}
|
423
|
-
*/
|
424
|
-
export function issueCredential(credential, proof_options, key) {
|
425
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
426
|
-
const len0 = WASM_VECTOR_LEN;
|
427
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
428
|
-
const len1 = WASM_VECTOR_LEN;
|
429
|
-
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
430
|
-
const len2 = WASM_VECTOR_LEN;
|
431
|
-
const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
432
|
-
return takeObject(ret);
|
433
|
-
}
|
434
|
-
|
435
|
-
/**
|
436
|
-
* @param {string} credential
|
437
|
-
* @param {string} linked_data_proof_options
|
438
|
-
* @param {string} public_key
|
439
|
-
* @returns {Promise<any>}
|
440
|
-
*/
|
441
|
-
export function prepareIssueCredential(credential, linked_data_proof_options, public_key) {
|
442
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
443
|
-
const len0 = WASM_VECTOR_LEN;
|
444
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
445
|
-
const len1 = WASM_VECTOR_LEN;
|
446
|
-
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
447
|
-
const len2 = WASM_VECTOR_LEN;
|
448
|
-
const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
449
|
-
return takeObject(ret);
|
450
|
-
}
|
451
|
-
|
452
|
-
/**
|
453
|
-
* @param {string} credential
|
454
|
-
* @param {string} preparation
|
455
|
-
* @param {string} signature
|
456
|
-
* @returns {Promise<any>}
|
457
|
-
*/
|
458
|
-
export function completeIssueCredential(credential, preparation, signature) {
|
459
|
-
const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
460
|
-
const len0 = WASM_VECTOR_LEN;
|
461
|
-
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
462
|
-
const len1 = WASM_VECTOR_LEN;
|
463
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
464
|
-
const len2 = WASM_VECTOR_LEN;
|
465
|
-
const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);
|
466
|
-
return takeObject(ret);
|
467
|
-
}
|
468
|
-
|
469
|
-
/**
|
470
|
-
* @param {string} vc
|
471
|
-
* @param {string} proof_options
|
472
|
-
* @returns {Promise<any>}
|
473
|
-
*/
|
474
|
-
export function verifyCredential(vc, proof_options) {
|
475
|
-
const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
476
|
-
const len0 = WASM_VECTOR_LEN;
|
477
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
478
|
-
const len1 = WASM_VECTOR_LEN;
|
479
|
-
const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1);
|
480
|
-
return takeObject(ret);
|
481
|
-
}
|
482
|
-
|
483
|
-
/**
|
484
|
-
* @param {string} presentation
|
485
|
-
* @param {string} proof_options
|
486
|
-
* @param {string} key
|
487
|
-
* @returns {Promise<any>}
|
488
|
-
*/
|
489
|
-
export function issuePresentation(presentation, proof_options, key) {
|
490
|
-
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
491
|
-
const len0 = WASM_VECTOR_LEN;
|
492
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
493
|
-
const len1 = WASM_VECTOR_LEN;
|
494
|
-
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
495
|
-
const len2 = WASM_VECTOR_LEN;
|
496
|
-
const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
497
|
-
return takeObject(ret);
|
498
|
-
}
|
499
|
-
|
500
|
-
/**
|
501
|
-
* @param {string} presentation
|
502
|
-
* @param {string} linked_data_proof_options
|
503
|
-
* @param {string} public_key
|
504
|
-
* @returns {Promise<any>}
|
505
|
-
*/
|
506
|
-
export function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {
|
507
|
-
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
508
|
-
const len0 = WASM_VECTOR_LEN;
|
509
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
510
|
-
const len1 = WASM_VECTOR_LEN;
|
511
|
-
const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
512
|
-
const len2 = WASM_VECTOR_LEN;
|
513
|
-
const ret = wasm.prepareIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
514
|
-
return takeObject(ret);
|
515
|
-
}
|
516
|
-
|
517
|
-
/**
|
518
|
-
* @param {string} presentation
|
519
|
-
* @param {string} preparation
|
520
|
-
* @param {string} signature
|
521
|
-
* @returns {Promise<any>}
|
522
|
-
*/
|
523
|
-
export function completeIssuePresentation(presentation, preparation, signature) {
|
524
|
-
const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
525
|
-
const len0 = WASM_VECTOR_LEN;
|
526
|
-
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
527
|
-
const len1 = WASM_VECTOR_LEN;
|
528
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
529
|
-
const len2 = WASM_VECTOR_LEN;
|
530
|
-
const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);
|
531
|
-
return takeObject(ret);
|
532
|
-
}
|
533
|
-
|
534
|
-
/**
|
535
|
-
* @param {string} vp
|
536
|
-
* @param {string} proof_options
|
537
|
-
* @returns {Promise<any>}
|
538
|
-
*/
|
539
|
-
export function verifyPresentation(vp, proof_options) {
|
540
|
-
const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
541
|
-
const len0 = WASM_VECTOR_LEN;
|
542
|
-
const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
543
|
-
const len1 = WASM_VECTOR_LEN;
|
544
|
-
const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1);
|
545
|
-
return takeObject(ret);
|
546
|
-
}
|
547
|
-
|
548
|
-
/**
|
549
|
-
* @param {string} holder
|
550
|
-
* @param {string} linked_data_proof_options
|
551
|
-
* @param {string} key
|
552
|
-
* @returns {Promise<any>}
|
553
|
-
*/
|
554
|
-
export function DIDAuth(holder, linked_data_proof_options, key) {
|
555
|
-
const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
556
|
-
const len0 = WASM_VECTOR_LEN;
|
557
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
558
|
-
const len1 = WASM_VECTOR_LEN;
|
559
|
-
const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
560
|
-
const len2 = WASM_VECTOR_LEN;
|
561
|
-
const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2);
|
562
|
-
return takeObject(ret);
|
563
|
-
}
|
564
|
-
|
565
|
-
/**
|
566
|
-
* @param {string} tz
|
567
|
-
* @returns {Promise<any>}
|
568
|
-
*/
|
569
|
-
export function JWKFromTezos(tz) {
|
570
|
-
const ptr0 = passStringToWasm0(tz, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
571
|
-
const len0 = WASM_VECTOR_LEN;
|
572
|
-
const ret = wasm.JWKFromTezos(ptr0, len0);
|
573
|
-
return takeObject(ret);
|
574
|
-
}
|
575
|
-
|
576
|
-
/**
|
577
|
-
* @param {string} capability
|
578
|
-
* @param {string} linked_data_proof_options
|
579
|
-
* @param {string} parents
|
580
|
-
* @param {string} key
|
581
|
-
* @returns {Promise<any>}
|
582
|
-
*/
|
583
|
-
export function delegateCapability(capability, linked_data_proof_options, parents, key) {
|
584
|
-
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
585
|
-
const len0 = WASM_VECTOR_LEN;
|
586
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
587
|
-
const len1 = WASM_VECTOR_LEN;
|
588
|
-
const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
589
|
-
const len2 = WASM_VECTOR_LEN;
|
590
|
-
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
591
|
-
const len3 = WASM_VECTOR_LEN;
|
592
|
-
const ret = wasm.delegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
593
|
-
return takeObject(ret);
|
594
|
-
}
|
595
|
-
|
596
|
-
/**
|
597
|
-
* @param {string} capability
|
598
|
-
* @param {string} linked_data_proof_options
|
599
|
-
* @param {string} parents
|
600
|
-
* @param {string} public_key
|
601
|
-
* @returns {Promise<any>}
|
602
|
-
*/
|
603
|
-
export function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {
|
604
|
-
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
605
|
-
const len0 = WASM_VECTOR_LEN;
|
606
|
-
const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
607
|
-
const len1 = WASM_VECTOR_LEN;
|
608
|
-
const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
609
|
-
const len2 = WASM_VECTOR_LEN;
|
610
|
-
const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
611
|
-
const len3 = WASM_VECTOR_LEN;
|
612
|
-
const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
613
|
-
return takeObject(ret);
|
614
|
-
}
|
615
|
-
|
616
|
-
/**
|
617
|
-
* @param {string} capability
|
618
|
-
* @param {string} preparation
|
619
|
-
* @param {string} signature
|
620
|
-
* @returns {Promise<any>}
|
621
|
-
*/
|
622
|
-
export function completeDelegateCapability(capability, preparation, signature) {
|
623
|
-
const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
624
|
-
const len0 = WASM_VECTOR_LEN;
|
625
|
-
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
626
|
-
const len1 = WASM_VECTOR_LEN;
|
627
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
628
|
-
const len2 = WASM_VECTOR_LEN;
|
629
|
-
const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
630
|
-
return takeObject(ret);
|
631
|
-
}
|
632
|
-
|
633
|
-
/**
|
634
|
-
* @param {string} delegation
|
635
|
-
* @returns {Promise<any>}
|
636
|
-
*/
|
637
|
-
export function verifyDelegation(delegation) {
|
638
|
-
const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
639
|
-
const len0 = WASM_VECTOR_LEN;
|
640
|
-
const ret = wasm.verifyDelegation(ptr0, len0);
|
641
|
-
return takeObject(ret);
|
642
|
-
}
|
643
|
-
|
644
|
-
/**
|
645
|
-
* @param {string} invocation
|
646
|
-
* @param {string} target_id
|
647
|
-
* @param {string} linked_data_proof_options
|
648
|
-
* @param {string} key
|
649
|
-
* @returns {Promise<any>}
|
650
|
-
*/
|
651
|
-
export function invokeCapability(invocation, target_id, linked_data_proof_options, key) {
|
652
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
653
|
-
const len0 = WASM_VECTOR_LEN;
|
654
|
-
const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
655
|
-
const len1 = WASM_VECTOR_LEN;
|
656
|
-
const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
657
|
-
const len2 = WASM_VECTOR_LEN;
|
658
|
-
const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
659
|
-
const len3 = WASM_VECTOR_LEN;
|
660
|
-
const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
661
|
-
return takeObject(ret);
|
662
|
-
}
|
663
|
-
|
664
|
-
/**
|
665
|
-
* @param {string} invocation
|
666
|
-
* @param {string} target_id
|
667
|
-
* @param {string} linked_data_proof_options
|
668
|
-
* @param {string} public_key
|
669
|
-
* @returns {Promise<any>}
|
670
|
-
*/
|
671
|
-
export function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {
|
672
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
673
|
-
const len0 = WASM_VECTOR_LEN;
|
674
|
-
const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
675
|
-
const len1 = WASM_VECTOR_LEN;
|
676
|
-
const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
677
|
-
const len2 = WASM_VECTOR_LEN;
|
678
|
-
const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
679
|
-
const len3 = WASM_VECTOR_LEN;
|
680
|
-
const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
681
|
-
return takeObject(ret);
|
682
|
-
}
|
683
|
-
|
684
|
-
/**
|
685
|
-
* @param {string} invocation
|
686
|
-
* @param {string} preparation
|
687
|
-
* @param {string} signature
|
688
|
-
* @returns {Promise<any>}
|
689
|
-
*/
|
690
|
-
export function completeInvokeCapability(invocation, preparation, signature) {
|
691
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
692
|
-
const len0 = WASM_VECTOR_LEN;
|
693
|
-
const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
694
|
-
const len1 = WASM_VECTOR_LEN;
|
695
|
-
const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
696
|
-
const len2 = WASM_VECTOR_LEN;
|
697
|
-
const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);
|
698
|
-
return takeObject(ret);
|
699
|
-
}
|
700
|
-
|
701
|
-
/**
|
702
|
-
* @param {string} invocation
|
703
|
-
* @returns {Promise<any>}
|
704
|
-
*/
|
705
|
-
export function verifyInvocationSignature(invocation) {
|
706
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
707
|
-
const len0 = WASM_VECTOR_LEN;
|
708
|
-
const ret = wasm.verifyInvocationSignature(ptr0, len0);
|
709
|
-
return takeObject(ret);
|
710
|
-
}
|
711
|
-
|
712
|
-
/**
|
713
|
-
* @param {string} invocation
|
714
|
-
* @param {string} delegation
|
715
|
-
* @returns {Promise<any>}
|
716
|
-
*/
|
717
|
-
export function verifyInvocation(invocation, delegation) {
|
718
|
-
const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
719
|
-
const len0 = WASM_VECTOR_LEN;
|
720
|
-
const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
721
|
-
const len1 = WASM_VECTOR_LEN;
|
722
|
-
const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);
|
723
|
-
return takeObject(ret);
|
724
|
-
}
|
725
|
-
|
726
|
-
/**
|
727
|
-
* @param {string} url
|
728
|
-
* @returns {Promise<any>}
|
729
|
-
*/
|
730
|
-
export function contextLoader(url) {
|
731
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
732
|
-
const len0 = WASM_VECTOR_LEN;
|
733
|
-
const ret = wasm.contextLoader(ptr0, len0);
|
734
|
-
return takeObject(ret);
|
735
|
-
}
|
736
|
-
|
737
|
-
function handleError(f, args) {
|
738
|
-
try {
|
739
|
-
return f.apply(this, args);
|
740
|
-
} catch (e) {
|
741
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
742
|
-
}
|
743
|
-
}
|
744
|
-
|
745
|
-
function getArrayU8FromWasm0(ptr, len) {
|
746
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
747
|
-
}
|
748
|
-
function __wbg_adapter_133(arg0, arg1, arg2, arg3) {
|
749
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h63ffd509f6690aab(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
750
|
-
}
|
751
|
-
|
752
|
-
async function load(module, imports) {
|
753
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
754
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
755
|
-
try {
|
756
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
757
|
-
|
758
|
-
} catch (e) {
|
759
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
760
|
-
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);
|
761
|
-
|
762
|
-
} else {
|
763
|
-
throw e;
|
764
|
-
}
|
765
|
-
}
|
766
|
-
}
|
767
|
-
|
768
|
-
const bytes = await module.arrayBuffer();
|
769
|
-
return await WebAssembly.instantiate(bytes, imports);
|
770
|
-
|
771
|
-
} else {
|
772
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
773
|
-
|
774
|
-
if (instance instanceof WebAssembly.Instance) {
|
775
|
-
return { instance, module };
|
776
|
-
|
777
|
-
} else {
|
778
|
-
return instance;
|
779
|
-
}
|
780
|
-
}
|
781
|
-
}
|
782
|
-
|
783
|
-
function getImports() {
|
784
|
-
const imports = {};
|
785
|
-
imports.wbg = {};
|
786
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
787
|
-
takeObject(arg0);
|
788
|
-
};
|
789
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
790
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
791
|
-
return addHeapObject(ret);
|
792
|
-
};
|
793
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
794
|
-
const obj = takeObject(arg0).original;
|
795
|
-
if (obj.cnt-- == 1) {
|
796
|
-
obj.a = 0;
|
797
|
-
return true;
|
798
|
-
}
|
799
|
-
const ret = false;
|
800
|
-
return ret;
|
801
|
-
};
|
802
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
803
|
-
const ret = getObject(arg0);
|
804
|
-
return addHeapObject(ret);
|
805
|
-
};
|
806
|
-
imports.wbg.__wbg_fetch_b1379d93c1e2b015 = function(arg0) {
|
807
|
-
const ret = fetch(getObject(arg0));
|
808
|
-
return addHeapObject(ret);
|
809
|
-
};
|
810
|
-
imports.wbg.__wbg_fetch_17b968b9c79d3c56 = function(arg0, arg1) {
|
811
|
-
const ret = getObject(arg0).fetch(getObject(arg1));
|
812
|
-
return addHeapObject(ret);
|
813
|
-
};
|
814
|
-
imports.wbg.__wbg_new_4cba26249c1686cd = function() { return handleError(function () {
|
815
|
-
const ret = new Headers();
|
816
|
-
return addHeapObject(ret);
|
817
|
-
}, arguments) };
|
818
|
-
imports.wbg.__wbg_append_9c6d4d7f71076e48 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
819
|
-
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
820
|
-
}, arguments) };
|
821
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
822
|
-
const obj = getObject(arg1);
|
823
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
824
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
825
|
-
var len0 = WASM_VECTOR_LEN;
|
826
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
827
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
828
|
-
};
|
829
|
-
imports.wbg.__wbg_instanceof_Response_240e67e5796c3c6b = function(arg0) {
|
830
|
-
const ret = getObject(arg0) instanceof Response;
|
831
|
-
return ret;
|
832
|
-
};
|
833
|
-
imports.wbg.__wbg_url_0f503b904b694ff5 = function(arg0, arg1) {
|
834
|
-
const ret = getObject(arg1).url;
|
835
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
836
|
-
const len0 = WASM_VECTOR_LEN;
|
837
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
838
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
839
|
-
};
|
840
|
-
imports.wbg.__wbg_status_9067c6a4fdd064c9 = function(arg0) {
|
841
|
-
const ret = getObject(arg0).status;
|
842
|
-
return ret;
|
843
|
-
};
|
844
|
-
imports.wbg.__wbg_headers_aa309e800cf75016 = function(arg0) {
|
845
|
-
const ret = getObject(arg0).headers;
|
846
|
-
return addHeapObject(ret);
|
847
|
-
};
|
848
|
-
imports.wbg.__wbg_arrayBuffer_ccd485f4d2929b08 = function() { return handleError(function (arg0) {
|
849
|
-
const ret = getObject(arg0).arrayBuffer();
|
850
|
-
return addHeapObject(ret);
|
851
|
-
}, arguments) };
|
852
|
-
imports.wbg.__wbg_newwithstrandinit_de7c409ec8538105 = function() { return handleError(function (arg0, arg1, arg2) {
|
853
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
854
|
-
return addHeapObject(ret);
|
855
|
-
}, arguments) };
|
856
|
-
imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
|
857
|
-
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
858
|
-
}, arguments) };
|
859
|
-
imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
|
860
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
861
|
-
}, arguments) };
|
862
|
-
imports.wbg.__wbg_process_e56fd54cf6319b6c = function(arg0) {
|
863
|
-
const ret = getObject(arg0).process;
|
864
|
-
return addHeapObject(ret);
|
865
|
-
};
|
866
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
867
|
-
const val = getObject(arg0);
|
868
|
-
const ret = typeof(val) === 'object' && val !== null;
|
869
|
-
return ret;
|
870
|
-
};
|
871
|
-
imports.wbg.__wbg_versions_77e21455908dad33 = function(arg0) {
|
872
|
-
const ret = getObject(arg0).versions;
|
873
|
-
return addHeapObject(ret);
|
874
|
-
};
|
875
|
-
imports.wbg.__wbg_node_0dd25d832e4785d5 = function(arg0) {
|
876
|
-
const ret = getObject(arg0).node;
|
877
|
-
return addHeapObject(ret);
|
878
|
-
};
|
879
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
880
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
881
|
-
return ret;
|
882
|
-
};
|
883
|
-
imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) {
|
884
|
-
const ret = getObject(arg0).crypto;
|
885
|
-
return addHeapObject(ret);
|
886
|
-
};
|
887
|
-
imports.wbg.__wbg_msCrypto_5a86d77a66230f81 = function(arg0) {
|
888
|
-
const ret = getObject(arg0).msCrypto;
|
889
|
-
return addHeapObject(ret);
|
890
|
-
};
|
891
|
-
imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
|
892
|
-
const ret = module;
|
893
|
-
return addHeapObject(ret);
|
894
|
-
};
|
895
|
-
imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
|
896
|
-
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
897
|
-
return addHeapObject(ret);
|
898
|
-
}, arguments) };
|
899
|
-
imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
|
900
|
-
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
901
|
-
};
|
902
|
-
imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
|
903
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
904
|
-
};
|
905
|
-
imports.wbg.__wbg_self_86b4b13392c7af56 = function() { return handleError(function () {
|
906
|
-
const ret = self.self;
|
907
|
-
return addHeapObject(ret);
|
908
|
-
}, arguments) };
|
909
|
-
imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
|
910
|
-
const ret = getObject(arg0).crypto;
|
911
|
-
return addHeapObject(ret);
|
912
|
-
};
|
913
|
-
imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
|
914
|
-
const ret = getObject(arg0).msCrypto;
|
915
|
-
return addHeapObject(ret);
|
916
|
-
};
|
917
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
918
|
-
const ret = getObject(arg0) === undefined;
|
919
|
-
return ret;
|
920
|
-
};
|
921
|
-
imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
|
922
|
-
const ret = module;
|
923
|
-
return addHeapObject(ret);
|
924
|
-
};
|
925
|
-
imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
|
926
|
-
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
927
|
-
return addHeapObject(ret);
|
928
|
-
};
|
929
|
-
imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
|
930
|
-
const ret = getObject(arg0).getRandomValues;
|
931
|
-
return addHeapObject(ret);
|
932
|
-
};
|
933
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
934
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
935
|
-
return ret;
|
936
|
-
};
|
937
|
-
imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
|
938
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
939
|
-
return addHeapObject(ret);
|
940
|
-
};
|
941
|
-
imports.wbg.__wbg_next_726d1c2255989269 = function(arg0) {
|
942
|
-
const ret = getObject(arg0).next;
|
943
|
-
return addHeapObject(ret);
|
944
|
-
};
|
945
|
-
imports.wbg.__wbg_next_3d0c4cc33e7418c9 = function() { return handleError(function (arg0) {
|
946
|
-
const ret = getObject(arg0).next();
|
947
|
-
return addHeapObject(ret);
|
948
|
-
}, arguments) };
|
949
|
-
imports.wbg.__wbg_done_e5655b169bb04f60 = function(arg0) {
|
950
|
-
const ret = getObject(arg0).done;
|
951
|
-
return ret;
|
952
|
-
};
|
953
|
-
imports.wbg.__wbg_value_8f901bca1014f843 = function(arg0) {
|
954
|
-
const ret = getObject(arg0).value;
|
955
|
-
return addHeapObject(ret);
|
956
|
-
};
|
957
|
-
imports.wbg.__wbg_iterator_22ed2b976832ff0c = function() {
|
958
|
-
const ret = Symbol.iterator;
|
959
|
-
return addHeapObject(ret);
|
960
|
-
};
|
961
|
-
imports.wbg.__wbg_get_72332cd2bc57924c = function() { return handleError(function (arg0, arg1) {
|
962
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
963
|
-
return addHeapObject(ret);
|
964
|
-
}, arguments) };
|
965
|
-
imports.wbg.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function (arg0, arg1) {
|
966
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
967
|
-
return addHeapObject(ret);
|
968
|
-
}, arguments) };
|
969
|
-
imports.wbg.__wbg_new_e6a9fecc2bf26696 = function() {
|
970
|
-
const ret = new Object();
|
971
|
-
return addHeapObject(ret);
|
972
|
-
};
|
973
|
-
imports.wbg.__wbg_self_fd00a1ef86d1b2ed = function() { return handleError(function () {
|
974
|
-
const ret = self.self;
|
975
|
-
return addHeapObject(ret);
|
976
|
-
}, arguments) };
|
977
|
-
imports.wbg.__wbg_window_6f6e346d8bbd61d7 = function() { return handleError(function () {
|
978
|
-
const ret = window.window;
|
979
|
-
return addHeapObject(ret);
|
980
|
-
}, arguments) };
|
981
|
-
imports.wbg.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () {
|
982
|
-
const ret = globalThis.globalThis;
|
983
|
-
return addHeapObject(ret);
|
984
|
-
}, arguments) };
|
985
|
-
imports.wbg.__wbg_global_67175caf56f55ca9 = function() { return handleError(function () {
|
986
|
-
const ret = global.global;
|
987
|
-
return addHeapObject(ret);
|
988
|
-
}, arguments) };
|
989
|
-
imports.wbg.__wbg_call_65af9f665ab6ade5 = function() { return handleError(function (arg0, arg1, arg2) {
|
990
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
991
|
-
return addHeapObject(ret);
|
992
|
-
}, arguments) };
|
993
|
-
imports.wbg.__wbg_getTime_58b0bdbebd4ef11d = function(arg0) {
|
994
|
-
const ret = getObject(arg0).getTime();
|
995
|
-
return ret;
|
996
|
-
};
|
997
|
-
imports.wbg.__wbg_new0_adda2d4bcb124f0a = function() {
|
998
|
-
const ret = new Date();
|
999
|
-
return addHeapObject(ret);
|
1000
|
-
};
|
1001
|
-
imports.wbg.__wbg_new_52205195aa880fc2 = function(arg0, arg1) {
|
1002
|
-
try {
|
1003
|
-
var state0 = {a: arg0, b: arg1};
|
1004
|
-
var cb0 = (arg0, arg1) => {
|
1005
|
-
const a = state0.a;
|
1006
|
-
state0.a = 0;
|
1007
|
-
try {
|
1008
|
-
return __wbg_adapter_133(a, state0.b, arg0, arg1);
|
1009
|
-
} finally {
|
1010
|
-
state0.a = a;
|
1011
|
-
}
|
1012
|
-
};
|
1013
|
-
const ret = new Promise(cb0);
|
1014
|
-
return addHeapObject(ret);
|
1015
|
-
} finally {
|
1016
|
-
state0.a = state0.b = 0;
|
1017
|
-
}
|
1018
|
-
};
|
1019
|
-
imports.wbg.__wbg_resolve_0107b3a501450ba0 = function(arg0) {
|
1020
|
-
const ret = Promise.resolve(getObject(arg0));
|
1021
|
-
return addHeapObject(ret);
|
1022
|
-
};
|
1023
|
-
imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) {
|
1024
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
1025
|
-
return addHeapObject(ret);
|
1026
|
-
};
|
1027
|
-
imports.wbg.__wbg_then_e5489f796341454b = function(arg0, arg1, arg2) {
|
1028
|
-
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
1029
|
-
return addHeapObject(ret);
|
1030
|
-
};
|
1031
|
-
imports.wbg.__wbg_buffer_34f5ec9f8a838ba0 = function(arg0) {
|
1032
|
-
const ret = getObject(arg0).buffer;
|
1033
|
-
return addHeapObject(ret);
|
1034
|
-
};
|
1035
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_88fdad741db1b182 = function(arg0, arg1, arg2) {
|
1036
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
1037
|
-
return addHeapObject(ret);
|
1038
|
-
};
|
1039
|
-
imports.wbg.__wbg_new_cda198d9dbc6d7ea = function(arg0) {
|
1040
|
-
const ret = new Uint8Array(getObject(arg0));
|
1041
|
-
return addHeapObject(ret);
|
1042
|
-
};
|
1043
|
-
imports.wbg.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) {
|
1044
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
1045
|
-
};
|
1046
|
-
imports.wbg.__wbg_length_51f19f73d6d9eff3 = function(arg0) {
|
1047
|
-
const ret = getObject(arg0).length;
|
1048
|
-
return ret;
|
1049
|
-
};
|
1050
|
-
imports.wbg.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) {
|
1051
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
1052
|
-
return addHeapObject(ret);
|
1053
|
-
};
|
1054
|
-
imports.wbg.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) {
|
1055
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
1056
|
-
return addHeapObject(ret);
|
1057
|
-
};
|
1058
|
-
imports.wbg.__wbg_has_3be27932089d278e = function() { return handleError(function (arg0, arg1) {
|
1059
|
-
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
1060
|
-
return ret;
|
1061
|
-
}, arguments) };
|
1062
|
-
imports.wbg.__wbg_set_2762e698c2f5b7e0 = function() { return handleError(function (arg0, arg1, arg2) {
|
1063
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
1064
|
-
return ret;
|
1065
|
-
}, arguments) };
|
1066
|
-
imports.wbg.__wbg_stringify_d8d1ee75d5b55ce4 = function() { return handleError(function (arg0) {
|
1067
|
-
const ret = JSON.stringify(getObject(arg0));
|
1068
|
-
return addHeapObject(ret);
|
1069
|
-
}, arguments) };
|
1070
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
1071
|
-
const ret = debugString(getObject(arg1));
|
1072
|
-
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1073
|
-
const len0 = WASM_VECTOR_LEN;
|
1074
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1075
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1076
|
-
};
|
1077
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
1078
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
1079
|
-
};
|
1080
|
-
imports.wbg.__wbindgen_memory = function() {
|
1081
|
-
const ret = wasm.memory;
|
1082
|
-
return addHeapObject(ret);
|
1083
|
-
};
|
1084
|
-
imports.wbg.__wbindgen_closure_wrapper9508 = function(arg0, arg1, arg2) {
|
1085
|
-
const ret = makeMutClosure(arg0, arg1, 2773, __wbg_adapter_26);
|
1086
|
-
return addHeapObject(ret);
|
1087
|
-
};
|
1088
|
-
|
1089
|
-
return imports;
|
1090
|
-
}
|
1091
|
-
|
1092
|
-
function initMemory(imports, maybe_memory) {
|
1093
|
-
|
1094
|
-
}
|
1095
|
-
|
1096
|
-
function finalizeInit(instance, module) {
|
1097
|
-
wasm = instance.exports;
|
1098
|
-
init.__wbindgen_wasm_module = module;
|
1099
|
-
cachedInt32Memory0 = new Int32Array();
|
1100
|
-
cachedUint8Memory0 = new Uint8Array();
|
1101
|
-
|
1102
|
-
|
1103
|
-
return wasm;
|
1104
|
-
}
|
1105
|
-
|
1106
|
-
function initSync(bytes) {
|
1107
|
-
const imports = getImports();
|
1108
|
-
|
1109
|
-
initMemory(imports);
|
1110
|
-
|
1111
|
-
const module = new WebAssembly.Module(bytes);
|
1112
|
-
const instance = new WebAssembly.Instance(module, imports);
|
1113
|
-
|
1114
|
-
return finalizeInit(instance, module);
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
async function init(input) {
|
1118
|
-
if (typeof input === 'undefined') {
|
1119
|
-
input = new URL('didkit_wasm_bg.wasm', import.meta.url);
|
1120
|
-
}
|
1121
|
-
const imports = getImports();
|
1122
|
-
|
1123
|
-
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
1124
|
-
input = fetch(input);
|
1125
|
-
}
|
1126
|
-
|
1127
|
-
initMemory(imports);
|
1128
|
-
|
1129
|
-
const { instance, module } = await load(await input, imports);
|
1130
|
-
|
1131
|
-
return finalizeInit(instance, module);
|
1132
|
-
}
|
1133
|
-
|
1134
|
-
export { initSync }
|
1135
|
-
export default init;
|