@learncard/didkit-plugin 1.4.23 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/didkit/didkit_wasm.d.ts +47 -198
- package/dist/didkit/didkit_wasm.js +552 -411
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +47 -40
- package/dist/didkit-plugin.cjs.development.js +525 -390
- package/dist/didkit-plugin.cjs.development.js.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.js +2 -2
- package/dist/didkit-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkit-plugin.esm.js +525 -390
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +47 -198
- package/dist/didkit_wasm.js +552 -411
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +47 -40
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +11 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts", "../src/didkit/pkg/didkit_wasm.js", "../src/didkit/index.ts", "../src/helpers.ts", "../src/plugin.ts"],
|
4
|
-
"sourcesContent": ["export * from './types';\nexport * from './plugin';\n", "let wasm;\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\nfunction __wbg_adapter_26(arg0, arg1, arg2) {\n wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbfea49efa319d6a8(arg0, arg1, addHeapObject(arg2));\n}\n\n/**\n * @returns {string}\n */\nexport function getVersion() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.getVersion(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n}\n\n/**\n * @returns {Promise<any>}\n */\nexport function clearCache() {\n const ret = wasm.clearCache();\n return takeObject(ret);\n}\n\n/**\n * @param {string} did\n * @param {string} input_metadata\n * @returns {Promise<any>}\n */\nexport function didResolver(did, input_metadata) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.didResolver(ptr0, len0, ptr1, len1);\n return takeObject(ret);\n}\n\n/**\n * @param {string} did\n * @param {string} input_metadata\n * @returns {Promise<any>}\n */\nexport function resolveDID(did, input_metadata) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);\n return takeObject(ret);\n}\n\n/**\n * @returns {string}\n */\nexport function generateEd25519Key() {\n let deferred2_0;\n let deferred2_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.generateEd25519Key(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n var ptr1 = r0;\n var len1 = r1;\n if (r3) {\n ptr1 = 0; len1 = 0;\n throw takeObject(r2);\n }\n deferred2_0 = ptr1;\n deferred2_1 = len1;\n return getStringFromWasm0(ptr1, len1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);\n }\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function generateEd25519KeyFromBytes(bytes) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.generateEd25519KeyFromBytes(retptr, ptr0, len0);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\n/**\n * @returns {string}\n */\nexport function generateSecp256k1Key() {\n let deferred2_0;\n let deferred2_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.generateSecp256k1Key(retptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n var ptr1 = r0;\n var len1 = r1;\n if (r3) {\n ptr1 = 0; len1 = 0;\n throw takeObject(r2);\n }\n deferred2_0 = ptr1;\n deferred2_1 = len1;\n return getStringFromWasm0(ptr1, len1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);\n }\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function generateSecp256k1KeyFromBytes(bytes) {\n let deferred3_0;\n let deferred3_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.generateSecp256k1KeyFromBytes(retptr, ptr0, len0);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n var ptr2 = r0;\n var len2 = r1;\n if (r3) {\n ptr2 = 0; len2 = 0;\n throw takeObject(r2);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\n/**\n * @param {string} method_pattern\n * @param {string} jwk\n * @returns {string}\n */\nexport function keyToDID(method_pattern, jwk) {\n let deferred4_0;\n let deferred4_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n wasm.keyToDID(retptr, ptr0, len0, ptr1, len1);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);\n var ptr3 = r0;\n var len3 = r1;\n if (r3) {\n ptr3 = 0; len3 = 0;\n throw takeObject(r2);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n}\n\n/**\n * @param {string} method_pattern\n * @param {string} jwk\n * @returns {Promise<any>}\n */\nexport function keyToVerificationMethod(method_pattern, jwk) {\n const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);\n return takeObject(ret);\n}\n\n/**\n * @param {string} did\n * @returns {Promise<any>}\n */\nexport function didToVerificationMethod(did) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.didToVerificationMethod(ptr0, len0);\n return takeObject(ret);\n}\n\n/**\n * @param {string} credential\n * @param {string} proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function issueCredential(credential, proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} credential\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareIssueCredential(credential, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} credential\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeIssueCredential(credential, preparation, signature) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} vc\n * @param {string} proof_options\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function verifyCredential(vc, proof_options, context_map) {\n const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} presentation\n * @param {string} proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function issuePresentation(presentation, proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} presentation\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.prepareIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} presentation\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeIssuePresentation(presentation, preparation, signature) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} vp\n * @param {string} proof_options\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function verifyPresentation(vp, proof_options, context_map) {\n const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} holder\n * @param {string} linked_data_proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function DIDAuth(holder, linked_data_proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} tz\n * @returns {Promise<any>}\n */\nexport function JWKFromTezos(tz) {\n const ptr0 = passStringToWasm0(tz, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.JWKFromTezos(ptr0, len0);\n return takeObject(ret);\n}\n\n/**\n * @param {string} capability\n * @param {string} linked_data_proof_options\n * @param {string} parents\n * @param {string} key\n * @returns {Promise<any>}\n */\nexport function delegateCapability(capability, linked_data_proof_options, parents, key) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.delegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} capability\n * @param {string} linked_data_proof_options\n * @param {string} parents\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} capability\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeDelegateCapability(capability, preparation, signature) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} delegation\n * @returns {Promise<any>}\n */\nexport function verifyDelegation(delegation) {\n const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.verifyDelegation(ptr0, len0);\n return takeObject(ret);\n}\n\n/**\n * @param {string} invocation\n * @param {string} target_id\n * @param {string} linked_data_proof_options\n * @param {string} key\n * @returns {Promise<any>}\n */\nexport function invokeCapability(invocation, target_id, linked_data_proof_options, key) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} invocation\n * @param {string} target_id\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return takeObject(ret);\n}\n\n/**\n * @param {string} invocation\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeInvokeCapability(invocation, preparation, signature) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);\n return takeObject(ret);\n}\n\n/**\n * @param {string} invocation\n * @returns {Promise<any>}\n */\nexport function verifyInvocationSignature(invocation) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.verifyInvocationSignature(ptr0, len0);\n return takeObject(ret);\n}\n\n/**\n * @param {string} invocation\n * @param {string} delegation\n * @returns {Promise<any>}\n */\nexport function verifyInvocation(invocation, delegation) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);\n return takeObject(ret);\n}\n\n/**\n * @param {string} url\n * @returns {Promise<any>}\n */\nexport function contextLoader(url) {\n const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.contextLoader(ptr0, len0);\n return takeObject(ret);\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\nfunction __wbg_adapter_156(arg0, arg1, arg2, arg3) {\n wasm.wasm_bindgen__convert__closures__invoke2_mut__h7f21b3df1bf974ab(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst __wbindgen_enum_RequestCredentials = [\"omit\", \"same-origin\", \"include\"];\n\nconst __wbindgen_enum_RequestMode = [\"same-origin\", \"no-cors\", \"cors\", \"navigate\"];\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n 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);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = takeObject(arg0).original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_848aa4969108a57e = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg_queueMicrotask_c5419c06eab41e73 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_fetch_1fdc4448ed9eec00 = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_setbody_aa8b691bec428bf4 = function(arg0, arg1) {\n getObject(arg0).body = getObject(arg1);\n };\n imports.wbg.__wbg_setcredentials_a4e661320cdb9738 = function(arg0, arg1) {\n getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];\n };\n imports.wbg.__wbg_setheaders_f5205d36e423a544 = function(arg0, arg1) {\n getObject(arg0).headers = getObject(arg1);\n };\n imports.wbg.__wbg_setmethod_ce2da76000b02f6a = function(arg0, arg1, arg2) {\n getObject(arg0).method = getStringFromWasm0(arg1, arg2);\n };\n imports.wbg.__wbg_setmode_4919fd636102c586 = function(arg0, arg1) {\n getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];\n };\n imports.wbg.__wbg_setsignal_812ccb8269a7fd90 = function(arg0, arg1) {\n getObject(arg0).signal = getObject(arg1);\n };\n imports.wbg.__wbg_signal_9acfcec9e7dffc22 = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_75169ae5a9683c55 = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_abort_c57daab47a6c1215 = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_newwithstrandinit_4b92c89af0a8e383 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_new_a9ae04a5200606a5 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_append_8b3e7f74a47ea7d5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_now_d3cbc9581625f686 = function(arg0) {\n const ret = getObject(arg0).now();\n return ret;\n };\n imports.wbg.__wbg_instanceof_Response_3c0e210a57ff751d = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_url_58af972663531d16 = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_status_5f4e900d22140a18 = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_headers_1b9bf90c73fae600 = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_arrayBuffer_144729e09879650e = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).arrayBuffer();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {\n const ret = module;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_7eede1f4488bf346 = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_crypto_c909fb428dcbddb6 = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_msCrypto_511eefefbfc70ae4 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_require_900d5c3984fe7703 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_307049345d0bd88c = function(arg0) {\n const ret = getObject(arg0).getRandomValues;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_cd175915511f705e = function(arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n };\n imports.wbg.__wbg_randomFillSync_85b3f4c52c56c313 = function(arg0, arg1, arg2) {\n getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n };\n imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43 = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) {\n const ret = getObject(arg0).next;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_next_b06e115d1b01e10b = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_done_983b5ffcaec8c583 = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_value_2ab8a198c834c26a = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_iterator_695d699a44d6234c = function() {\n const ret = Symbol.iterator;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_ef828680c64da212 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_call_a9ef466721e824f2 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_e69b5f66fda8f13c = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_bf91bf94d9e04084 = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_52dd9f07d03fd5f8 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_05c129bf37fcf1be = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_3eca19bb09e9c484 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_call_3bfa248576352471 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_getTime_41225036a0393d63 = function(arg0) {\n const ret = getObject(arg0).getTime();\n return ret;\n };\n imports.wbg.__wbg_new0_218ada33b570be35 = function() {\n const ret = new Date();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_1073970097e5a420 = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_156(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbg_resolve_0aad7c1484731c99 = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_748f75edfb032440 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_4866a7d9f55d8f3e = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_newwithlength_76462a666eca145f = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_subarray_975a06f9dbd16995 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_stringify_eead5648c09faaf8 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_has_bd717f25f195f23d = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_closure_wrapper12196 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 3923, __wbg_adapter_26);\n return addHeapObject(ret);\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('didkit_wasm_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n", "import _init, { InitInput } from './pkg/didkit_wasm';\n\nexport * from './pkg/didkit_wasm';\n\nlet initialized = false;\nlet generating = false; // Mutex flag to allow first init call to acquire a lock\n\nexport const init = async (\n arg: InitInput | Promise<InitInput> = 'https://cdn.filestackcontent.com/zt1SuV3nSZGKZDKa8vIv'\n) => {\n // Do not return until we are done generating!\n while (generating) await new Promise(res => setTimeout(res, 250));\n\n // allow calling multiple times without reinitializing\n if (initialized) return;\n\n try {\n generating = true;\n\n await _init(arg);\n\n generating = false;\n initialized = true;\n } catch (error) {\n generating = false;\n\n throw error;\n }\n};\n\nexport default init;\n", "import { LearnCard } from '@learncard/core';\n\nexport const getContextURIs = (jsonld: Record<string, any>) => {\n const contexts: string[] = [];\n\n const traverse = (obj: Record<string, any>) => {\n if (typeof obj !== 'object' || obj === null) return;\n\n if (obj['@context']) {\n if (Array.isArray(obj['@context'])) contexts.push(...obj['@context']);\n else contexts.push(obj['@context']);\n }\n\n Object.keys(obj).forEach(key => {\n traverse(obj[key]);\n });\n };\n\n traverse(jsonld);\n\n return contexts;\n};\n\nexport const getDocumentMap = async (\n learnCard: LearnCard<any, 'context'>,\n obj: Record<string, any>,\n allowRemoteContexts = false\n) => {\n const uris = getContextURIs(obj);\n const resolvedDocs = await Promise.all(\n uris.map(async uri => learnCard.context.resolveDocument(uri, allowRemoteContexts))\n );\n\n return uris.reduce<Record<string, string>>((acc, cur, index) => {\n const resolvedDoc = resolvedDocs[index];\n\n if (resolvedDoc) acc[cur] = JSON.stringify(resolvedDoc);\n\n return acc;\n }, {});\n};\n", "import init, {\n InitInput,\n generateEd25519KeyFromBytes,\n generateSecp256k1KeyFromBytes,\n keyToDID,\n keyToVerificationMethod,\n didToVerificationMethod,\n issueCredential,\n verifyCredential,\n issuePresentation,\n verifyPresentation,\n contextLoader,\n resolveDID,\n didResolver,\n clearCache\n} from './didkit/index';\nimport { getDocumentMap } from './helpers';\n\nimport { DIDKitPlugin, DidMethod } from './types';\n\n/**\n j\n * @group Plugins\n */\nexport const getDidKitPlugin = async (\n input?: InitInput | Promise<InitInput>,\n allowRemoteContexts = false\n): Promise<DIDKitPlugin> => {\n await init(input);\n\n const memoizedDids: Partial<Record<DidMethod, string>> = {};\n\n return {\n name: 'DIDKit',\n displayName: 'DIDKit',\n description:\n 'Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations',\n context: {\n resolveStaticDocument: async (_learnCard, url) => {\n try {\n return JSON.parse((await contextLoader(url)) ?? '') || undefined;\n } catch (error) {\n _learnCard.debug?.(error);\n\n return undefined;\n }\n },\n },\n methods: {\n generateEd25519KeyFromBytes: (_learnCard, bytes) =>\n JSON.parse(generateEd25519KeyFromBytes(bytes)),\n\n generateSecp256k1KeyFromBytes: (_learnCard, bytes) =>\n JSON.parse(generateSecp256k1KeyFromBytes(bytes)),\n\n keyToDid: (_learnCard, type, keypair) => {\n const memoizedDid = memoizedDids[type];\n\n if (!memoizedDid) {\n const did = keyToDID(type, JSON.stringify(keypair));\n\n memoizedDids[type] = did;\n\n return did;\n }\n\n return memoizedDid;\n },\n\n keyToVerificationMethod: async (_learnCard, type, keypair) =>\n keyToVerificationMethod(type, JSON.stringify(keypair)),\n\n didToVerificationMethod: async (_learnCard, did) => didToVerificationMethod(did),\n\n issueCredential: async (_learnCard, credential, options, keypair) => {\n return JSON.parse(\n await issueCredential(\n JSON.stringify(credential),\n JSON.stringify(options),\n JSON.stringify(keypair),\n JSON.stringify(\n await getDocumentMap(_learnCard, credential, allowRemoteContexts)\n )\n )\n );\n },\n\n verifyCredential: async (_learnCard, credential, options = {}) => {\n return JSON.parse(\n await verifyCredential(\n JSON.stringify(credential),\n JSON.stringify(options),\n JSON.stringify(\n await getDocumentMap(_learnCard, credential, allowRemoteContexts)\n )\n )\n );\n },\n\n issuePresentation: async (_learnCard, presentation, options, keypair) => {\n const isJwt = options.proofFormat === 'jwt';\n\n const result = await issuePresentation(\n JSON.stringify(presentation),\n JSON.stringify(options),\n JSON.stringify(keypair),\n JSON.stringify(\n await getDocumentMap(_learnCard, presentation, allowRemoteContexts)\n )\n );\n\n return isJwt ? result : JSON.parse(result);\n },\n\n verifyPresentation: async (_learnCard, presentation, options = {}) => {\n const isJwt = typeof presentation === 'string';\n\n return JSON.parse(\n await verifyPresentation(\n isJwt ? presentation : JSON.stringify(presentation),\n JSON.stringify(options),\n isJwt\n ? '{}'\n : JSON.stringify(\n await getDocumentMap(\n _learnCard,\n presentation,\n allowRemoteContexts\n )\n )\n )\n );\n },\n\n contextLoader: async (_learnCard, url) => {\n try {\n return JSON.parse((await contextLoader(url)) ?? '') || undefined;\n } catch (error) {\n _learnCard.debug?.(error);\n\n return undefined;\n }\n },\n\n resolveDid: async (_learnCard, did, inputMetadata = {}) =>\n JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))),\n\n didResolver: async (_learnCard, did, inputMetadata = {}) =>\n JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))),\n\n clearDidWebCache: async () => {\n await clearCache();\n }\n },\n };\n};\n"],
|
5
|
-
"mappings": "seAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,qBAAAE,KAAA,eAAAC,GAAAH,ICAA,IAAAI,GAAA,GAAA,IAAIC,EAEEC,EAAqB,OAAO,YAAgB,IAAc,IAAI,YAAY,QAAS,CAAE,UAAW,GAAM,MAAO,EAAK,CAAC,EAAI,CAAE,OAAQ,IAAM,CAAE,MAAM,MAAM,2BAA2B,CAAE,CAAE,EAEtL,OAAO,YAAgB,KAAeA,EAAkB,OAAO,EAEnE,IAAIC,EAA0B,KAE9B,SAASC,GAAuB,CAC5B,OAAID,IAA4B,MAAQA,EAAwB,aAAe,KAC3EA,EAA0B,IAAI,WAAWF,EAAK,OAAO,MAAM,GAExDE,C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,EAEA,cAAe,MAAOG,EAAYC,IAAQ,CACtC,GAAI,CACA,OAAO,KAAK,MAAO,MAAMC,EAAcD,CAAG,GAAM,EAAE,GAAK,MAC3D,OAASE,EAAP,CACEH,EAAW,QAAQG,CAAK,EAExB,MACJ,CACJ,EAEA,WAAY,MAAOH,EAAYU,EAAKc,EAAgB,CAAC,IACjD,KAAK,MAAM,MAAMC,EAAWf,EAAK,KAAK,UAAUc,CAAa,CAAC,CAAC,EAEnE,YAAa,MAAOxB,EAAYU,EAAKc,EAAgB,CAAC,IAClD,KAAK,MAAM,MAAME,EAAYhB,EAAK,KAAK,UAAUc,CAAa,CAAC,CAAC,EAEpE,iBAAkB,SAAY,CAC1B,MAAMG,EAAW,CACrB,CACJ,CACJ,CACJ,EAnI+B",
|
6
|
-
"names": ["src_exports", "__export", "getDidKitPlugin", "__toCommonJS", "import_meta", "wasm", "cachedTextDecoder", "cachedUint8ArrayMemory0", "getUint8ArrayMemory0", "__name", "getStringFromWasm0", "ptr", "len", "
|
4
|
+
"sourcesContent": ["export * from './types';\nexport * from './plugin';\n", "let wasm;\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_export_2.set(idx, obj);\n return idx;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => {\n wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)\n});\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n if (--state.cnt === 0) {\n wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);\n CLOSURE_DTORS.unregister(state);\n } else {\n state.a = a;\n }\n }\n };\n real.original = state;\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n/**\n * @returns {string}\n */\nexport function getVersion() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.getVersion();\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n}\n\n/**\n * @returns {Promise<any>}\n */\nexport function clearCache() {\n const ret = wasm.clearCache();\n return ret;\n}\n\n/**\n * @param {string} did\n * @param {string} input_metadata\n * @returns {Promise<any>}\n */\nexport function didResolver(did, input_metadata) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.didResolver(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {string} did\n * @param {string} input_metadata\n * @returns {Promise<any>}\n */\nexport function resolveDID(did, input_metadata) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);\n return ret;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_2.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n/**\n * @returns {string}\n */\nexport function generateEd25519Key() {\n let deferred2_0;\n let deferred2_1;\n try {\n const ret = wasm.generateEd25519Key();\n var ptr1 = ret[0];\n var len1 = ret[1];\n if (ret[3]) {\n ptr1 = 0; len1 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred2_0 = ptr1;\n deferred2_1 = len1;\n return getStringFromWasm0(ptr1, len1);\n } finally {\n wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);\n }\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function generateEd25519KeyFromBytes(bytes) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.generateEd25519KeyFromBytes(ptr0, len0);\n var ptr2 = ret[0];\n var len2 = ret[1];\n if (ret[3]) {\n ptr2 = 0; len2 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\n/**\n * @returns {string}\n */\nexport function generateSecp256k1Key() {\n let deferred2_0;\n let deferred2_1;\n try {\n const ret = wasm.generateSecp256k1Key();\n var ptr1 = ret[0];\n var len1 = ret[1];\n if (ret[3]) {\n ptr1 = 0; len1 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred2_0 = ptr1;\n deferred2_1 = len1;\n return getStringFromWasm0(ptr1, len1);\n } finally {\n wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);\n }\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function generateSecp256k1KeyFromBytes(bytes) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);\n var ptr2 = ret[0];\n var len2 = ret[1];\n if (ret[3]) {\n ptr2 = 0; len2 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n for (let i = 0; i < array.length; i++) {\n const add = addToExternrefTable0(array[i]);\n getDataViewMemory0().setUint32(ptr + 4 * i, add, true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n/**\n * @param {string} cleartext\n * @param {string[]} recipients\n * @returns {Promise<any>}\n */\nexport function createJwe(cleartext, recipients) {\n const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.createJwe(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {string} jwe\n * @param {string[]} jwks\n * @returns {Promise<any>}\n */\nexport function decryptJwe(jwe, jwks) {\n const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {any} cleartext\n * @param {string[]} recipients\n * @returns {Promise<any>}\n */\nexport function createDagJwe(cleartext, recipients) {\n const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.createDagJwe(cleartext, ptr0, len0);\n return ret;\n}\n\n/**\n * @param {string} jwe\n * @param {string[]} jwks\n * @returns {Promise<any>}\n */\nexport function decryptDagJwe(jwe, jwks) {\n const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.decryptDagJwe(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {string} method_pattern\n * @param {string} jwk\n * @returns {string}\n */\nexport function keyToDID(method_pattern, jwk) {\n let deferred4_0;\n let deferred4_1;\n try {\n const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.keyToDID(ptr0, len0, ptr1, len1);\n var ptr3 = ret[0];\n var len3 = ret[1];\n if (ret[3]) {\n ptr3 = 0; len3 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred4_0 = ptr3;\n deferred4_1 = len3;\n return getStringFromWasm0(ptr3, len3);\n } finally {\n wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);\n }\n}\n\n/**\n * @param {string} method_pattern\n * @param {string} jwk\n * @returns {Promise<any>}\n */\nexport function keyToVerificationMethod(method_pattern, jwk) {\n const ptr0 = passStringToWasm0(method_pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.keyToVerificationMethod(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {string} did\n * @returns {Promise<any>}\n */\nexport function didToVerificationMethod(did) {\n const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.didToVerificationMethod(ptr0, len0);\n return ret;\n}\n\n/**\n * @param {string} credential\n * @param {string} proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function issueCredential(credential, proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.issueCredential(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} credential\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareIssueCredential(credential, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.prepareIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} credential\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeIssueCredential(credential, preparation, signature) {\n const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeIssueCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} vc\n * @param {string} proof_options\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function verifyCredential(vc, proof_options, context_map) {\n const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} presentation\n * @param {string} proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function issuePresentation(presentation, proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.issuePresentation(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} presentation\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareIssuePresentation(presentation, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.prepareIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} presentation\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeIssuePresentation(presentation, preparation, signature) {\n const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeIssuePresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} vp\n * @param {string} proof_options\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function verifyPresentation(vp, proof_options, context_map) {\n const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} holder\n * @param {string} linked_data_proof_options\n * @param {string} key\n * @param {string} context_map\n * @returns {Promise<any>}\n */\nexport function DIDAuth(holder, linked_data_proof_options, key, context_map) {\n const ptr0 = passStringToWasm0(holder, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.DIDAuth(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} tz\n * @returns {Promise<any>}\n */\nexport function JWKFromTezos(tz) {\n const ptr0 = passStringToWasm0(tz, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.JWKFromTezos(ptr0, len0);\n return ret;\n}\n\n/**\n * @param {string} capability\n * @param {string} linked_data_proof_options\n * @param {string} parents\n * @param {string} key\n * @returns {Promise<any>}\n */\nexport function delegateCapability(capability, linked_data_proof_options, parents, key) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.delegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} capability\n * @param {string} linked_data_proof_options\n * @param {string} parents\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareDelegateCapability(capability, linked_data_proof_options, parents, public_key) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(parents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.prepareDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} capability\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeDelegateCapability(capability, preparation, signature) {\n const ptr0 = passStringToWasm0(capability, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeDelegateCapability(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} delegation\n * @returns {Promise<any>}\n */\nexport function verifyDelegation(delegation) {\n const ptr0 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.verifyDelegation(ptr0, len0);\n return ret;\n}\n\n/**\n * @param {string} invocation\n * @param {string} target_id\n * @param {string} linked_data_proof_options\n * @param {string} key\n * @returns {Promise<any>}\n */\nexport function invokeCapability(invocation, target_id, linked_data_proof_options, key) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.invokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} invocation\n * @param {string} target_id\n * @param {string} linked_data_proof_options\n * @param {string} public_key\n * @returns {Promise<any>}\n */\nexport function prepareInvokeCapability(invocation, target_id, linked_data_proof_options, public_key) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(target_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(linked_data_proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ptr3 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len3 = WASM_VECTOR_LEN;\n const ret = wasm.prepareInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);\n return ret;\n}\n\n/**\n * @param {string} invocation\n * @param {string} preparation\n * @param {string} signature\n * @returns {Promise<any>}\n */\nexport function completeInvokeCapability(invocation, preparation, signature) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(preparation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ptr2 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len2 = WASM_VECTOR_LEN;\n const ret = wasm.completeInvokeCapability(ptr0, len0, ptr1, len1, ptr2, len2);\n return ret;\n}\n\n/**\n * @param {string} invocation\n * @returns {Promise<any>}\n */\nexport function verifyInvocationSignature(invocation) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.verifyInvocationSignature(ptr0, len0);\n return ret;\n}\n\n/**\n * @param {string} invocation\n * @param {string} delegation\n * @returns {Promise<any>}\n */\nexport function verifyInvocation(invocation, delegation) {\n const ptr0 = passStringToWasm0(invocation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(delegation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.verifyInvocation(ptr0, len0, ptr1, len1);\n return ret;\n}\n\n/**\n * @param {string} url\n * @returns {Promise<any>}\n */\nexport function contextLoader(url) {\n const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.contextLoader(ptr0, len0);\n return ret;\n}\n\nfunction __wbg_adapter_52(arg0, arg1, arg2) {\n wasm.closure4125_externref_shim(arg0, arg1, arg2);\n}\n\nfunction __wbg_adapter_212(arg0, arg1, arg2, arg3) {\n wasm.closure4526_externref_shim(arg0, arg1, arg2, arg3);\n}\n\nconst __wbindgen_enum_RequestCredentials = [\"omit\", \"same-origin\", \"include\"];\n\nconst __wbindgen_enum_RequestMode = [\"same-origin\", \"no-cors\", \"cors\", \"navigate\"];\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n 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);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {\n arg0.abort();\n };\n imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {\n const ret = arg0.arrayBuffer();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {\n const ret = arg0.buffer;\n return ret;\n };\n imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {\n const ret = arg0.call(arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = arg0.call(arg1, arg2);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_crypto_038798f665f985e2 = function(arg0) {\n const ret = arg0.crypto;\n return ret;\n };\n imports.wbg.__wbg_crypto_ed58b8e10a292839 = function(arg0) {\n const ret = arg0.crypto;\n return ret;\n };\n imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {\n const ret = arg0.done;\n return ret;\n };\n imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {\n const ret = Object.entries(arg0);\n return ret;\n };\n imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {\n const ret = arg0.fetch(arg1);\n return ret;\n };\n imports.wbg.__wbg_fetch_f1856afdb49415d1 = function(arg0) {\n const ret = fetch(arg0);\n return ret;\n };\n imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {\n const ret = Array.from(arg0);\n return ret;\n };\n imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {\n arg0.getRandomValues(arg1);\n };\n imports.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {\n const ret = arg0.getRandomValues;\n return ret;\n };\n imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {\n arg0.getRandomValues(arg1);\n }, arguments) };\n imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {\n const ret = arg0.getTime();\n return ret;\n };\n imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(arg0, arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n };\n imports.wbg.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(arg0, arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {\n const ret = arg0.headers;\n return ret;\n };\n imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {\n let result;\n try {\n result = arg0 instanceof ArrayBuffer;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Map;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Uint8Array;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {\n const ret = Array.isArray(arg0);\n return ret;\n };\n imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {\n const ret = Number.isSafeInteger(arg0);\n return ret;\n };\n imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {\n const ret = Symbol.iterator;\n return ret;\n };\n imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {\n const ret = arg0.msCrypto;\n return ret;\n };\n imports.wbg.__wbg_msCrypto_ff35fce085fab2a3 = function(arg0) {\n const ret = arg0.msCrypto;\n return ret;\n };\n imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {\n const ret = new Date();\n return ret;\n };\n imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {\n const ret = new Headers();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wbg_adapter_212(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return ret;\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbg_new_405e22f390576ce2 = function() {\n const ret = new Object();\n return ret;\n };\n imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {\n const ret = new Map();\n return ret;\n };\n imports.wbg.__wbg_new_78feb108b6472713 = function() {\n const ret = new Array();\n return ret;\n };\n imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {\n const ret = new Uint8Array(arg0);\n return ret;\n };\n imports.wbg.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {\n const ret = new AbortController();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return ret;\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);\n return ret;\n };\n imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return ret;\n };\n imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {\n const ret = arg0.next;\n return ret;\n };\n imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {\n const ret = arg0.next();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) {\n const ret = arg0.node;\n return ret;\n };\n imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {\n const ret = arg0.now();\n return ret;\n };\n imports.wbg.__wbg_process_5c1d670bc53614b8 = function(arg0) {\n const ret = arg0.process;\n return ret;\n };\n imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {\n queueMicrotask(arg0);\n };\n imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {\n const ret = arg0.queueMicrotask;\n return ret;\n };\n imports.wbg.__wbg_randomFillSync_994ac6d9ade7a695 = function(arg0, arg1, arg2) {\n arg0.randomFillSync(getArrayU8FromWasm0(arg1, arg2));\n };\n imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) {\n arg0.randomFillSync(arg1);\n }, arguments) };\n imports.wbg.__wbg_require_0d6aeaec3c042c88 = function(arg0, arg1, arg2) {\n const ret = arg0.require(getStringFromWasm0(arg1, arg2));\n return ret;\n };\n imports.wbg.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {\n const ret = module.require;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {\n const ret = Promise.resolve(arg0);\n return ret;\n };\n imports.wbg.__wbg_self_25aabeb5a7b41685 = function() { return handleError(function () {\n const ret = self.self;\n return ret;\n }, arguments) };\n imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {\n arg0[arg1 >>> 0] = arg2;\n };\n imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {\n arg0[arg1] = arg2;\n };\n imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {\n arg0.set(arg1, arg2 >>> 0);\n };\n imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {\n const ret = arg0.set(arg1, arg2);\n return ret;\n };\n imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {\n arg0.body = arg1;\n };\n imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {\n arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];\n };\n imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {\n arg0.headers = arg1;\n };\n imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {\n arg0.method = getStringFromWasm0(arg1, arg2);\n };\n imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {\n arg0.mode = __wbindgen_enum_RequestMode[arg1];\n };\n imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {\n arg0.signal = arg1;\n };\n imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {\n const ret = arg0.signal;\n return ret;\n };\n imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {\n const ret = typeof global === 'undefined' ? null : global;\n return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n };\n imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {\n const ret = typeof globalThis === 'undefined' ? null : globalThis;\n return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n };\n imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {\n const ret = module;\n return ret;\n };\n imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {\n const ret = typeof self === 'undefined' ? null : self;\n return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n };\n imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {\n const ret = typeof window === 'undefined' ? null : window;\n return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);\n };\n imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {\n const ret = arg0.status;\n return ret;\n };\n imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(arg0);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n };\n imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {\n const ret = arg0.then(arg1);\n return ret;\n };\n imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {\n const ret = arg0.then(arg1, arg2);\n return ret;\n };\n imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {\n const ret = arg1.url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {\n const ret = arg0.value;\n return ret;\n };\n imports.wbg.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {\n const ret = arg0.versions;\n return ret;\n };\n imports.wbg.__wbindgen_bigint_from_i128 = function(arg0, arg1) {\n const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {\n const ret = BigInt.asUintN(64, arg0);\n return ret;\n };\n imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {\n const v = arg1;\n const ret = typeof(v) === 'bigint' ? v : undefined;\n getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbindgen_boolean_get = function(arg0) {\n const v = arg0;\n const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;\n return ret;\n };\n imports.wbg.__wbindgen_cb_drop = function(arg0) {\n const obj = arg0.original;\n if (obj.cnt-- == 1) {\n obj.a = 0;\n return true;\n }\n const ret = false;\n return ret;\n };\n imports.wbg.__wbindgen_closure_wrapper12490 = function(arg0, arg1, arg2) {\n const ret = makeMutClosure(arg0, arg1, 4126, __wbg_adapter_52);\n return ret;\n };\n imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbindgen_error_new = function(arg0, arg1) {\n const ret = new Error(getStringFromWasm0(arg0, arg1));\n return ret;\n };\n imports.wbg.__wbindgen_in = function(arg0, arg1) {\n const ret = arg0 in arg1;\n return ret;\n };\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_2;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n };\n imports.wbg.__wbindgen_is_bigint = function(arg0) {\n const ret = typeof(arg0) === 'bigint';\n return ret;\n };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(arg0) === 'function';\n return ret;\n };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = arg0;\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(arg0) === 'string';\n return ret;\n };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n };\n imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {\n const ret = arg0 === arg1;\n return ret;\n };\n imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {\n const ret = arg0 == arg1;\n return ret;\n };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return ret;\n };\n imports.wbg.__wbindgen_number_get = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbindgen_number_new = function(arg0) {\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_string_get = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('didkit_wasm_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n", "import _init, { InitInput } from './pkg/didkit_wasm';\n\nexport * from './pkg/didkit_wasm';\n\nlet initialized = false;\nlet generating = false; // Mutex flag to allow first init call to acquire a lock\n\nexport const init = async (\n arg: InitInput | Promise<InitInput> = 'https://cdn.filestackcontent.com/c22wwy3nTn2wOBk8ZYoT'\n) => {\n // Do not return until we are done generating!\n while (generating) await new Promise(res => setTimeout(res, 250));\n\n // allow calling multiple times without reinitializing\n if (initialized) return;\n\n try {\n generating = true;\n\n await _init(arg);\n\n generating = false;\n initialized = true;\n } catch (error) {\n generating = false;\n\n throw error;\n }\n};\n\nexport default init;\n", "import { LearnCard } from '@learncard/core';\n\nexport const getContextURIs = (jsonld: Record<string, any>) => {\n const contexts: string[] = [];\n\n const traverse = (obj: Record<string, any>) => {\n if (typeof obj !== 'object' || obj === null) return;\n\n if (obj['@context']) {\n if (Array.isArray(obj['@context'])) contexts.push(...obj['@context']);\n else contexts.push(obj['@context']);\n }\n\n Object.keys(obj).forEach(key => {\n traverse(obj[key]);\n });\n };\n\n traverse(jsonld);\n\n return contexts;\n};\n\nexport const getDocumentMap = async (\n learnCard: LearnCard<any, 'context'>,\n obj: Record<string, any>,\n allowRemoteContexts = false\n) => {\n const uris = getContextURIs(obj);\n const resolvedDocs = await Promise.all(\n uris.map(async uri => learnCard.context.resolveDocument(uri, allowRemoteContexts))\n );\n\n return uris.reduce<Record<string, string>>((acc, cur, index) => {\n const resolvedDoc = resolvedDocs[index];\n\n if (resolvedDoc) acc[cur] = JSON.stringify(resolvedDoc);\n\n return acc;\n }, {});\n};\n", "import init, {\n InitInput,\n generateEd25519KeyFromBytes,\n generateSecp256k1KeyFromBytes,\n keyToDID,\n keyToVerificationMethod,\n didToVerificationMethod,\n issueCredential,\n verifyCredential,\n issuePresentation,\n verifyPresentation,\n contextLoader,\n resolveDID,\n didResolver,\n createJwe,\n decryptJwe,\n createDagJwe,\n decryptDagJwe,\n clearCache,\n} from './didkit/index';\nimport { getDocumentMap } from './helpers';\n\nimport { DIDKitPlugin, DidMethod } from './types';\n\n/**\n j\n * @group Plugins\n */\nexport const getDidKitPlugin = async (\n input?: InitInput | Promise<InitInput>,\n allowRemoteContexts = false\n): Promise<DIDKitPlugin> => {\n await init(input);\n\n const memoizedDids: Partial<Record<DidMethod, string>> = {};\n\n return {\n name: 'DIDKit',\n displayName: 'DIDKit',\n description:\n 'Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations',\n context: {\n resolveStaticDocument: async (_learnCard, url) => {\n try {\n return JSON.parse((await contextLoader(url)) ?? '') || undefined;\n } catch (error) {\n _learnCard.debug?.(error);\n\n return undefined;\n }\n },\n },\n methods: {\n generateEd25519KeyFromBytes: (_learnCard, bytes) =>\n JSON.parse(generateEd25519KeyFromBytes(bytes)),\n\n generateSecp256k1KeyFromBytes: (_learnCard, bytes) =>\n JSON.parse(generateSecp256k1KeyFromBytes(bytes)),\n\n keyToDid: (_learnCard, type, keypair) => {\n return keyToDID(type, JSON.stringify(keypair));\n },\n\n keyToVerificationMethod: async (_learnCard, type, keypair) =>\n keyToVerificationMethod(type, JSON.stringify(keypair)),\n\n didToVerificationMethod: async (_learnCard, did) => didToVerificationMethod(did),\n\n issueCredential: async (_learnCard, credential, options, keypair) => {\n return JSON.parse(\n await issueCredential(\n JSON.stringify(credential),\n JSON.stringify(options),\n JSON.stringify(keypair),\n JSON.stringify(\n await getDocumentMap(_learnCard, credential, allowRemoteContexts)\n )\n )\n );\n },\n\n verifyCredential: async (_learnCard, credential, options = {}) => {\n return JSON.parse(\n await verifyCredential(\n JSON.stringify(credential),\n JSON.stringify(options),\n JSON.stringify(\n await getDocumentMap(_learnCard, credential, allowRemoteContexts)\n )\n )\n );\n },\n\n issuePresentation: async (_learnCard, presentation, options, keypair) => {\n const isJwt = options.proofFormat === 'jwt';\n\n const result = await issuePresentation(\n JSON.stringify(presentation),\n JSON.stringify(options),\n JSON.stringify(keypair),\n JSON.stringify(\n await getDocumentMap(_learnCard, presentation, allowRemoteContexts)\n )\n );\n\n return isJwt ? result : JSON.parse(result);\n },\n\n verifyPresentation: async (_learnCard, presentation, options = {}) => {\n const isJwt = typeof presentation === 'string';\n\n return JSON.parse(\n await verifyPresentation(\n isJwt ? presentation : JSON.stringify(presentation),\n JSON.stringify(options),\n isJwt\n ? '{}'\n : JSON.stringify(\n await getDocumentMap(\n _learnCard,\n presentation,\n allowRemoteContexts\n )\n )\n )\n );\n },\n\n contextLoader: async (_learnCard, url) => {\n try {\n return JSON.parse((await contextLoader(url)) ?? '') || undefined;\n } catch (error) {\n _learnCard.debug?.(error);\n\n return undefined;\n }\n },\n\n resolveDid: async (_learnCard, did, inputMetadata = {}) =>\n JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))),\n\n didResolver: async (_learnCard, did, inputMetadata = {}) =>\n JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))),\n\n createJwe: async (_learnCard, cleartext, recipients) =>\n JSON.parse(await createJwe(cleartext, recipients)),\n\n decryptJwe: async (_learnCard, jwe, jwks) =>\n decryptJwe(\n JSON.stringify(jwe),\n jwks.map(jwk => JSON.stringify(jwk))\n ),\n\n createDagJwe: async (_learnCard, cleartext, recipients) =>\n JSON.parse(await createDagJwe(cleartext as any, recipients)),\n\n decryptDagJwe: async (_learnCard, jwe, jwks) =>\n await decryptDagJwe(\n JSON.stringify(jwe),\n jwks.map(jwk => JSON.stringify(jwk))\n ),\n\n clearDidWebCache: async () => {\n await clearCache();\n },\n },\n };\n};\n"],
|
5
|
+
"mappings": "se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AG,CAAC,CACvC,EAEJ,iBAAkB,SAAY,CAC1B,MAAMG,EAAW,CACrB,CACJ,CACJ,CACJ,EA3I+B",
|
6
|
+
"names": ["src_exports", "__export", "getDidKitPlugin", "__toCommonJS", "import_meta", "wasm", "cachedTextDecoder", "cachedUint8ArrayMemory0", "getUint8ArrayMemory0", "__name", "getStringFromWasm0", "ptr", "len", "addToExternrefTable0", "obj", "idx", "handleError", "f", "args", "e", "getArrayU8FromWasm0", "isLikeNone", "x", "WASM_VECTOR_LEN", "cachedTextEncoder", "encodeString", "arg", "view", "buf", "passStringToWasm0", "malloc", "realloc", "mem", "offset", "code", "cachedDataViewMemory0", "getDataViewMemory0", "CLOSURE_DTORS", "state", "makeMutClosure", "arg0", "arg1", "dtor", "real", "a", "debugString", "val", "type", "description", "name", "length", "debug", "builtInMatches", "className", "clearCache", "wasm", "__name", "didResolver", "did", "input_metadata", "ptr0", "passStringToWasm0", "len0", "WASM_VECTOR_LEN", "ptr1", "len1", "resolveDID", "takeFromExternrefTable0", "idx", "value", "passArray8ToWasm0", "arg", "malloc", "ptr", "getUint8ArrayMemory0", "WASM_VECTOR_LEN", "__name", "generateEd25519KeyFromBytes", "bytes", "deferred3_0", "deferred3_1", "ptr0", "wasm", "len0", "ret", "ptr2", "len2", "takeFromExternrefTable0", "getStringFromWasm0", "generateSecp256k1KeyFromBytes", "bytes", "deferred3_0", "deferred3_1", "ptr0", "passArray8ToWasm0", "wasm", "len0", "WASM_VECTOR_LEN", "ret", "ptr2", "len2", "takeFromExternrefTable0", "getStringFromWasm0", "__name", "passArrayJsValueToWasm0", "array", "malloc", "ptr", "i", "add", "addToExternrefTable0", "getDataViewMemory0", "createJwe", "cleartext", "recipients", "passStringToWasm0", "ptr1", "len1", "decryptJwe", "jwe", "jwks", "createDagJwe", "decryptDagJwe", "keyToDID", "method_pattern", "jwk", "deferred4_0", "deferred4_1", "ptr3", "len3", "keyToVerificationMethod", "didToVerificationMethod", "did", "issueCredential", "credential", "proof_options", "key", "context_map", "verifyCredential", "vc", "proof_options", "context_map", "ptr0", "passStringToWasm0", "wasm", "len0", "WASM_VECTOR_LEN", "ptr1", "len1", "ptr2", "len2", "__name", "issuePresentation", "presentation", "key", "ptr3", "len3", "verifyPresentation", "vp", "proof_options", "context_map", "ptr0", "passStringToWasm0", "wasm", "len0", "WASM_VECTOR_LEN", "ptr1", "len1", "ptr2", "len2", "__name", "contextLoader", "url", "ptr0", "passStringToWasm0", "wasm", "len0", "WASM_VECTOR_LEN", "__name", "__wbg_adapter_52", "arg0", "arg1", "arg2", "__wbg_adapter_212", "arg3", "__wbindgen_enum_RequestCredentials", "__wbindgen_enum_RequestMode", "__wbg_load", "module", "imports", "e", "bytes", "instance", "__wbg_get_imports", "handleError", "arg4", "getStringFromWasm0", "result", "state0", "cb0", "a", "getArrayU8FromWasm0", "ret", "isLikeNone", "addToExternrefTable0", "ptr1", "len1", "getDataViewMemory0", "v", "obj", "makeMutClosure", "debugString", "table", "offset", "val", "__wbg_finalize_init", "instance", "module", "wasm", "__wbg_init", "cachedDataViewMemory0", "cachedUint8ArrayMemory0", "__name", "__wbg_init", "module_or_path", "wasm", "import_meta", "imports", "__wbg_get_imports", "instance", "module", "__wbg_load", "__wbg_finalize_init", "__name", "didkit_wasm_default", "__wbg_init", "initialized", "generating", "init", "__name", "arg", "res", "didkit_wasm_default", "error", "didkit_default", "getContextURIs", "__name", "jsonld", "contexts", "traverse", "obj", "key", "getDocumentMap", "learnCard", "allowRemoteContexts", "uris", "resolvedDocs", "uri", "acc", "cur", "index", "resolvedDoc", "getDidKitPlugin", "__name", "input", "allowRemoteContexts", "didkit_default", "memoizedDids", "_learnCard", "url", "contextLoader", "error", "bytes", "generateEd25519KeyFromBytes", "generateSecp256k1KeyFromBytes", "type", "keypair", "keyToDID", "keyToVerificationMethod", "did", "didToVerificationMethod", "credential", "options", "issueCredential", "getDocumentMap", "verifyCredential", "presentation", "isJwt", "result", "issuePresentation", "verifyPresentation", "inputMetadata", "resolveDID", "didResolver", "cleartext", "recipients", "createJwe", "jwe", "jwks", "decryptJwe", "jwk", "createDagJwe", "decryptDagJwe", "clearCache"]
|
7
7
|
}
|