@learncard/didkit-plugin 1.10.6 → 1.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  "use strict";var T=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var de=Object.prototype.hasOwnProperty;var s=(t,e)=>T(t,"name",{value:e,configurable:!0});var fe=(t,e)=>{for(var n in e)T(t,n,{get:e[n],enumerable:!0})},we=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let _ of ue(e))!de.call(t,_)&&_!==n&&T(t,_,{get:()=>e[_],enumerable:!(r=ge(e,_))||r.enumerable});return t};var pe=t=>we(T({},"__esModule",{value:!0}),t);var Me={};fe(Me,{getContextURIs:()=>se,getDidKitPlugin:()=>Re,getDocumentMap:()=>O});module.exports=pe(Me);var Ne={};var o,C=null;function D(){return(C===null||C.byteLength===0)&&(C=new Uint8Array(o.memory.buffer)),C}s(D,"getUint8ArrayMemory0");var R=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});R.decode();var le=2146435072,E=0;function ye(t,e){return E+=e,E>=le&&(R=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),R.decode(),E=e),R.decode(D().subarray(t,t+e))}s(ye,"decodeText");function m(t,e){return t=t>>>0,ye(t,e)}s(m,"getStringFromWasm0");var S=new Array(128).fill(void 0);S.push(void 0,null,!0,!1);var N=S.length;function b(t){N===S.length&&S.push(S.length+1);let e=N;return N=S[e],S[e]=t,e}s(b,"addHeapObject");function i(t){return S[t]}s(i,"getObject");var u=0,A=new TextEncoder;"encodeInto"in A||(A.encodeInto=function(t,e){let n=A.encode(t);return e.set(n),{read:t.length,written:n.length}});function f(t,e,n){if(n===void 0){let g=A.encode(t),d=e(g.length,1)>>>0;return D().subarray(d,d+g.length).set(g),u=g.length,d}let r=t.length,_=e(r,1)>>>0,c=D(),a=0;for(;a<r;a++){let g=t.charCodeAt(a);if(g>127)break;c[_+a]=g}if(a!==r){a!==0&&(t=t.slice(a)),_=n(_,r,r=a+t.length*3,1)>>>0;let g=D().subarray(_+a,_+r),d=A.encodeInto(t,g);a+=d.written,_=n(_,r,a,1)>>>0}return u=a,_}s(f,"passStringToWasm0");var v=null;function p(){return(v===null||v.buffer.detached===!0||v.buffer.detached===void 0&&v.buffer!==o.memory.buffer)&&(v=new DataView(o.memory.buffer)),v}s(p,"getDataViewMemory0");function x(t,e){try{return t.apply(this,e)}catch(n){o.__wbindgen_export_2(b(n))}}s(x,"handleError");function xe(t){t<132||(S[t]=N,N=t)}s(xe,"dropObject");function l(t){let e=i(t);return xe(t),e}s(l,"takeObject");function k(t,e){return t=t>>>0,D().subarray(t/1,t/1+e)}s(k,"getArrayU8FromWasm0");function h(t){return t==null}s(h,"isLikeNone");function P(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let _=t.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){let _=t.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(t)){let _=t.length,c="[";_>0&&(c+=P(t[0]));for(let a=1;a<_;a++)c+=", "+P(t[a]);return c+="]",c}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}s(P,"debugString");var W=typeof FinalizationRegistry>"u"?{register:s(()=>{},"register"),unregister:s(()=>{},"unregister")}:new FinalizationRegistry(t=>{o.__wbindgen_export_3.get(t.dtor)(t.a,t.b)});function K(t,e,n,r){let _={a:t,b:e,cnt:1,dtor:n},c=s((...a)=>{_.cnt++;let g=_.a;_.a=0;try{return r(g,_.b,...a)}finally{--_.cnt===0?(o.__wbindgen_export_3.get(_.dtor)(g,_.b),W.unregister(_)):_.a=g}},"real");return c.original=_,W.register(c,_,_),c}s(K,"makeMutClosure");function L(t,e,n){let r=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),_=u,c=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u,g=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),d=u,w=o.verifyPresentation(r,_,c,a,g,d);return l(w)}s(L,"verifyPresentation");function B(t){let e=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=u,r=o.contextLoader(e,n);return l(r)}s(B,"contextLoader");function U(){let t=o.clearCache();return l(t)}s(U,"clearCache");function V(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.didResolver(n,r,_,c);return l(a)}s(V,"didResolver");function j(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.resolveDID(n,r,_,c);return l(a)}s(j,"resolveDID");function q(t,e){let n,r;try{let y=o.__wbindgen_add_to_stack_pointer(-16),I=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),J=u,ae=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),be=u;o.keyToDID(y,I,J,ae,be);var _=p().getInt32(y+0,!0),c=p().getInt32(y+4,!0),a=p().getInt32(y+8,!0),g=p().getInt32(y+12,!0),d=_,w=c;if(g)throw d=0,w=0,l(a);return n=d,r=w,m(d,w)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(n,r,1)}}s(q,"keyToDID");function z(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.keyToVerificationMethod(n,r,_,c);return l(a)}s(z,"keyToVerificationMethod");function $(t){let e=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=u,r=o.didToVerificationMethod(e,n);return l(r)}s($,"didToVerificationMethod");function H(t,e,n,r){let _=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),g=u,d=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),w=u,y=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),I=u,J=o.issueCredential(_,c,a,g,d,w,y,I);return l(J)}s(H,"issueCredential");function G(t,e,n){let r=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),_=u,c=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u,g=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),d=u,w=o.verifyCredential(r,_,c,a,g,d);return l(w)}s(G,"verifyCredential");function X(t,e,n,r){let _=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),g=u,d=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),w=u,y=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),I=u,J=o.issuePresentation(_,c,a,g,d,w,y,I);return l(J)}s(X,"issuePresentation");function Y(t,e){let n=e(t.length*1,1)>>>0;return D().set(t,n/1),u=t.length,n}s(Y,"passArray8ToWasm0");function Q(t){let e,n;try{let w=o.__wbindgen_add_to_stack_pointer(-16),y=Y(t,o.__wbindgen_export_0),I=u;o.generateEd25519KeyFromBytes(w,y,I);var r=p().getInt32(w+0,!0),_=p().getInt32(w+4,!0),c=p().getInt32(w+8,!0),a=p().getInt32(w+12,!0),g=r,d=_;if(a)throw g=0,d=0,l(c);return e=g,n=d,m(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(e,n,1)}}s(Q,"generateEd25519KeyFromBytes");function Z(t){let e,n;try{let w=o.__wbindgen_add_to_stack_pointer(-16),y=Y(t,o.__wbindgen_export_0),I=u;o.generateSecp256k1KeyFromBytes(w,y,I);var r=p().getInt32(w+0,!0),_=p().getInt32(w+4,!0),c=p().getInt32(w+8,!0),a=p().getInt32(w+12,!0),g=r,d=_;if(a)throw g=0,d=0,l(c);return e=g,n=d,m(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(e,n,1)}}s(Z,"generateSecp256k1KeyFromBytes");function M(t,e){let n=e(t.length*4,4)>>>0,r=p();for(let _=0;_<t.length;_++)r.setUint32(n+4*_,b(t[_]),!0);return u=t.length,n}s(M,"passArrayJsValueToWasm0");function ee(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.createJwe(n,r,_,c);return l(a)}s(ee,"createJwe");function te(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.decryptJwe(n,r,_,c);return l(a)}s(te,"decryptJwe");function ne(t,e){let n=M(e,o.__wbindgen_export_0),r=u,_=o.createDagJwe(b(t),n,r);return l(_)}s(ne,"createDagJwe");function re(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.decryptDagJwe(n,r,_,c);return l(a)}s(re,"decryptDagJwe");function me(t,e){o.__wbindgen_export_5(t,e)}s(me,"__wbg_adapter_4");function he(t,e,n){o.__wbindgen_export_6(t,e,b(n))}s(he,"__wbg_adapter_17");function Ie(t,e,n,r){o.__wbindgen_export_7(t,e,b(n),b(r))}s(Ie,"__wbg_adapter_107");var Se=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ve=["omit","same-origin","include"],De=["same-origin","no-cors","cors","navigate"],Oe=new Set(["basic","cors","default"]);async function Je(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&Oe.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")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",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}s(Je,"__wbg_load");function ke(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(m(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(i(n)),_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_abort_67e1b49bf6614565=function(e){i(e).abort()},t.wbg.__wbg_abort_d830bf2e9aa6ec5b=function(e,n){i(e).abort(i(n))},t.wbg.__wbg_append_72a3c0addd2bce38=function(){return x(function(e,n,r,_,c){i(e).append(m(n,r),m(_,c))},arguments)},t.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb=function(){return x(function(e){let n=i(e).arrayBuffer();return b(n)},arguments)},t.wbg.__wbg_call_13410aac570ffff7=function(){return x(function(e,n){let r=i(e).call(i(n));return b(r)},arguments)},t.wbg.__wbg_call_a5400b25a865cfd8=function(){return x(function(e,n,r){let _=i(e).call(i(n),i(r));return b(_)},arguments)},t.wbg.__wbg_clearTimeout_42d9ccd50822fd3a=function(e){let n=clearTimeout(l(e));return b(n)},t.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){let n=i(e).crypto;return b(n)},t.wbg.__wbg_done_75ed0ee6dd243d9d=function(e){return i(e).done},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(i(e));return b(n)},t.wbg.__wbg_fetch_6bbc32f991730587=function(e){let n=fetch(i(e));return b(n)},t.wbg.__wbg_fetch_87aed7f306ec6d63=function(e,n){let r=i(e).fetch(i(n));return b(r)},t.wbg.__wbg_from_88bc52ce20ba6318=function(e){let n=Array.from(i(e));return b(n)},t.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return x(function(e,n){globalThis.crypto.getRandomValues(k(e,n))},arguments)},t.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return x(function(e,n){i(e).getRandomValues(i(n))},arguments)},t.wbg.__wbg_getTime_6bb3f64e0f18f817=function(e){return i(e).getTime()},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=i(e)[n>>>0];return b(r)},t.wbg.__wbg_get_458e874b43b18b25=function(){return x(function(e,n){let r=Reflect.get(i(e),i(n));return b(r)},arguments)},t.wbg.__wbg_has_b89e451f638123e3=function(){return x(function(e,n){return Reflect.has(i(e),i(n))},arguments)},t.wbg.__wbg_headers_29fec3c72865cd75=function(e){let n=i(e).headers;return b(n)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=i(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b=function(e){let n;try{n=i(e)instanceof Map}catch{n=!1}return n},t.wbg.__wbg_instanceof_Response_50fde2cd696850bf=function(e){let n;try{n=i(e)instanceof Response}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=i(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_isArray_030cce220591fb41=function(e){return Array.isArray(i(e))},t.wbg.__wbg_isSafeInteger_1c0d1af5542e102a=function(e){return Number.isSafeInteger(i(e))},t.wbg.__wbg_iterator_f370b34483c71a1c=function(){return b(Symbol.iterator)},t.wbg.__wbg_keys_ef52390b2ae0e714=function(e){let n=Object.keys(i(e));return b(n)},t.wbg.__wbg_length_186546c51cd61acd=function(e){return i(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return i(e).length},t.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){let n=i(e).msCrypto;return b(n)},t.wbg.__wbg_new0_b0a0a38c201e6df5=function(){return b(new Date)},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_2e3c58a15f39f5f9=function(e,n){try{var r={a:e,b:n},_=s((a,g)=>{let d=r.a;r.a=0;try{return Ie(d,r.b,a,g)}finally{r.a=d}},"cb0");let c=new Promise(_);return b(c)}finally{r.a=r.b=0}},t.wbg.__wbg_new_2ff1f68f3676ea53=function(){return b(new Map)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(i(e));return b(n)},t.wbg.__wbg_new_66b9434b4e59b63e=function(){return x(function(){let e=new AbortController;return b(e)},arguments)},t.wbg.__wbg_new_f6e53210afea8e45=function(){return x(function(){let e=new Headers;return b(e)},arguments)},t.wbg.__wbg_newfromslice_074c56947bd43469=function(e,n){let r=new Uint8Array(k(e,n));return b(r)},t.wbg.__wbg_newnoargs_254190557c45b4ec=function(e,n){let r=new Function(m(e,n));return b(r)},t.wbg.__wbg_newwithlength_a167dcc7aaa3ba77=function(e){let n=new Uint8Array(e>>>0);return b(n)},t.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f=function(){return x(function(e,n,r){let _=new Request(m(e,n),i(r));return b(_)},arguments)},t.wbg.__wbg_next_5b3530e612fde77d=function(e){let n=i(e).next;return b(n)},t.wbg.__wbg_next_692e82279131b03c=function(){return x(function(e){let n=i(e).next();return b(n)},arguments)},t.wbg.__wbg_node_905d3e251edff8a2=function(e){let n=i(e).node;return b(n)},t.wbg.__wbg_now_886b39d7ec380719=function(e){return i(e).now()},t.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){let n=i(e).process;return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(k(e,n),i(r))},t.wbg.__wbg_push_330b2eb93e4e1212=function(e,n){return i(e).push(i(n))},t.wbg.__wbg_queueMicrotask_25d0739ac89e8c88=function(e){queueMicrotask(i(e))},t.wbg.__wbg_queueMicrotask_4488407636f5bf24=function(e){let n=i(e).queueMicrotask;return b(n)},t.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return x(function(e,n){i(e).randomFillSync(l(n))},arguments)},t.wbg.__wbg_require_60cc747a6bc5215a=function(){return x(function(){let e=module.require;return b(e)},arguments)},t.wbg.__wbg_resolve_4055c623acdd6a1b=function(e){let n=Promise.resolve(i(e));return b(n)},t.wbg.__wbg_setTimeout_4ec014681668a581=function(e,n){let r=setTimeout(i(e),n);return b(r)},t.wbg.__wbg_set_1353b2a5e96bc48c=function(e,n,r){i(e).set(k(n,r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){i(e)[l(n)]=l(r)},t.wbg.__wbg_set_453345bcda80b89a=function(){return x(function(e,n,r){return Reflect.set(i(e),i(n),i(r))},arguments)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){i(e)[n>>>0]=l(r)},t.wbg.__wbg_set_b7f1cf4fae26fe2a=function(e,n,r){let _=i(e).set(i(n),i(r));return b(_)},t.wbg.__wbg_setbody_c8460bdf44147df8=function(e,n){i(e).body=i(n)},t.wbg.__wbg_setcache_90ca4ad8a8ad40d3=function(e,n){i(e).cache=Se[n]},t.wbg.__wbg_setcredentials_9cd60d632c9d5dfc=function(e,n){i(e).credentials=ve[n]},t.wbg.__wbg_setheaders_0052283e2f3503d1=function(e,n){i(e).headers=i(n)},t.wbg.__wbg_setmethod_9b504d5b855b329c=function(e,n,r){i(e).method=m(n,r)},t.wbg.__wbg_setmode_a23e1a2ad8b512f8=function(e,n){i(e).mode=De[n]},t.wbg.__wbg_setsignal_8c45ad1247a74809=function(e,n){i(e).signal=i(n)},t.wbg.__wbg_signal_da4d466ce86118b5=function(e){let n=i(e).signal;return b(n)},t.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){let e=typeof global>"u"?null:global;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){let e=typeof globalThis>"u"?null:globalThis;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){let e=typeof self>"u"?null:self;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){let e=typeof window>"u"?null:window;return h(e)?0:b(e)},t.wbg.__wbg_status_3fea3036088621d6=function(e){return i(e).status},t.wbg.__wbg_stringify_b98c93d0a190446a=function(){return x(function(e){let n=JSON.stringify(i(e));return b(n)},arguments)},t.wbg.__wbg_subarray_70fd07feefe14294=function(e,n,r){let _=i(e).subarray(n>>>0,r>>>0);return b(_)},t.wbg.__wbg_then_b33a773d723afa3e=function(e,n,r){let _=i(e).then(i(n),i(r));return b(_)},t.wbg.__wbg_then_e22500defe16819f=function(e,n){let r=i(e).then(i(n));return b(r)},t.wbg.__wbg_url_e5720dfacf77b05e=function(e,n){let r=i(n).url,_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_value_dd9372230531eade=function(e){let n=i(e).value;return b(n)},t.wbg.__wbg_versions_c01dfd4722a88165=function(e){let n=i(e).versions;return b(n)},t.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1=function(e,n){let r=i(n),_=typeof r=="bigint"?r:void 0;p().setBigInt64(e+8,h(_)?BigInt(0):_,!0),p().setInt32(e+0,!h(_),!0)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=i(e),r=typeof n=="boolean"?n:void 0;return h(r)?16777215:r?1:0},t.wbg.__wbg_wbindgencbdrop_eb10308566512b88=function(e){let n=i(e).original;return n.cnt--==1?(n.a=0,!0):!1},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=P(i(n)),_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return i(e)in i(n)},t.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154=function(e){return typeof i(e)=="bigint"},t.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(e){return typeof i(e)=="function"},t.wbg.__wbg_wbindgenisnull_f3037694abe4d97a=function(e){return i(e)===null},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=i(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof i(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return i(e)===void 0},t.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58=function(e,n){return i(e)===i(n)},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return i(e)==i(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=i(n),_=typeof r=="number"?r:void 0;p().setFloat64(e+8,h(_)?0:_,!0),p().setInt32(e+0,!h(_),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=i(n),_=typeof r=="string"?r:void 0;var c=h(_)?0:f(_,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u;p().setInt32(e+4,a,!0),p().setInt32(e+0,c,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(m(e,n))},t.wbg.__wbindgen_cast_1eaafab1968e741d=function(e,n){let r=K(e,n,639,me);return b(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=m(e,n);return b(r)},t.wbg.__wbindgen_cast_2ddd8a25ff58642a=function(e,n){let r=BigInt.asUintN(64,e)|n<<BigInt(64);return b(r)},t.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){let n=BigInt.asUintN(64,e);return b(n)},t.wbg.__wbindgen_cast_67d14185bb436b4e=function(e,n){let r=K(e,n,726,he);return b(r)},t.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return b(e)},t.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,n){let r=k(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=i(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){l(e)},t}s(ke,"__wbg_get_imports");function Ce(t,e){return o=t.exports,_e.__wbindgen_wasm_module=e,v=null,C=null,o}s(Ce,"__wbg_finalize_init");async function _e(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("didkit_wasm_bg.wasm",Ne.url));let e=ke();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await Je(await t,e);return Ce(n,r)}s(_e,"__wbg_init");var oe=_e;var Ae="https://assets.learncard.ai/didkit/sha256-9b80756b1c5b3470426349c4e91fd617d8d6be2a9992030ae8dbe2de1083768d/didkit_wasm_bg.wasm",ie=!1,F=!1,Te=s(async(t=Ae)=>{for(;F;)await new Promise(e=>setTimeout(e,250));if(!ie)try{F=!0,await oe({module_or_path:t}),F=!1,ie=!0}catch(e){throw F=!1,e}},"init"),ce=Te;var se=s(t=>{let e=[],n=s(r=>{typeof r!="object"||r===null||(r["@context"]&&(Array.isArray(r["@context"])?e.push(...r["@context"]):e.push(r["@context"])),Object.keys(r).forEach(_=>{n(r[_])}))},"traverse");return n(t),e},"getContextURIs"),O=s(async(t,e,n=!1)=>{let r=se(e),_=await Promise.all(r.map(async c=>t.context.resolveDocument(c,n)));return r.reduce((c,a,g)=>{let d=_[g];return d&&(c[a]=JSON.stringify(d)),c},{})},"getDocumentMap");var Re=s(async(t,e=!1)=>{await ce(t);let n={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:s(async(r,_)=>{try{return JSON.parse(await B(_)??"")||void 0}catch(c){r.debug?.(c);return}},"resolveStaticDocument")},methods:{generateEd25519KeyFromBytes:s((r,_)=>JSON.parse(Q(_)),"generateEd25519KeyFromBytes"),generateSecp256k1KeyFromBytes:s((r,_)=>JSON.parse(Z(_)),"generateSecp256k1KeyFromBytes"),keyToDid:s((r,_,c)=>q(_,JSON.stringify(c)),"keyToDid"),keyToVerificationMethod:s(async(r,_,c)=>z(_,JSON.stringify(c)),"keyToVerificationMethod"),didToVerificationMethod:s(async(r,_)=>$(_),"didToVerificationMethod"),issueCredential:s(async(r,_,c,a)=>JSON.parse(await H(JSON.stringify(_),JSON.stringify(c),JSON.stringify(a),JSON.stringify(await O(r,_,e)))),"issueCredential"),verifyCredential:s(async(r,_,c={})=>JSON.parse(await G(JSON.stringify(_),JSON.stringify(c),JSON.stringify(await O(r,_,e)))),"verifyCredential"),issuePresentation:s(async(r,_,c,a)=>{let g=c.proofFormat==="jwt",d=await X(JSON.stringify(_),JSON.stringify(c),JSON.stringify(a),JSON.stringify(await O(r,_,e)));return g?d:JSON.parse(d)},"issuePresentation"),verifyPresentation:s(async(r,_,c={})=>{let a=typeof _=="string";return JSON.parse(await L(a?_:JSON.stringify(_),JSON.stringify(c),a?"{}":JSON.stringify(await O(r,_,e))))},"verifyPresentation"),contextLoader:s(async(r,_)=>{try{return JSON.parse(await B(_)??"")||void 0}catch(c){r.debug?.(c);return}},"contextLoader"),resolveDid:s(async(r,_,c={})=>JSON.parse(await j(_,JSON.stringify(c))),"resolveDid"),didResolver:s(async(r,_,c={})=>JSON.parse(await V(_,JSON.stringify(c))),"didResolver"),createJwe:s(async(r,_,c)=>JSON.parse(await ee(_,c)),"createJwe"),decryptJwe:s(async(r,_,c)=>te(JSON.stringify(_),c.map(a=>JSON.stringify(a))),"decryptJwe"),createDagJwe:s(async(r,_,c)=>JSON.parse(await ne(_,c)),"createDagJwe"),decryptDagJwe:s(async(r,_,c)=>{let a=s(g=>{if(g==null)return g;if(typeof g=="bigint")return Number(g);if(Array.isArray(g))return g.map(a);if(typeof g!="object"||!Object.values(g).some(y=>typeof y=="bigint"||typeof y=="object"&&y!==null))return g;let w={};for(let y in g)w[y]=a(g[y]);return w},"convertBigIntsToNumbers");return a(await re(JSON.stringify(_),c.map(g=>JSON.stringify(g))))},"decryptDagJwe"),clearDidWebCache:s(async()=>{await U()},"clearDidWebCache")}}},"getDidKitPlugin");
2
+ ${t.stack}`:r}s(P,"debugString");var W=typeof FinalizationRegistry>"u"?{register:s(()=>{},"register"),unregister:s(()=>{},"unregister")}:new FinalizationRegistry(t=>{o.__wbindgen_export_3.get(t.dtor)(t.a,t.b)});function K(t,e,n,r){let _={a:t,b:e,cnt:1,dtor:n},c=s((...a)=>{_.cnt++;let g=_.a;_.a=0;try{return r(g,_.b,...a)}finally{--_.cnt===0?(o.__wbindgen_export_3.get(_.dtor)(g,_.b),W.unregister(_)):_.a=g}},"real");return c.original=_,W.register(c,_,_),c}s(K,"makeMutClosure");function L(t,e,n){let r=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),_=u,c=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u,g=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),d=u,w=o.verifyPresentation(r,_,c,a,g,d);return l(w)}s(L,"verifyPresentation");function B(t){let e=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=u,r=o.contextLoader(e,n);return l(r)}s(B,"contextLoader");function U(){let t=o.clearCache();return l(t)}s(U,"clearCache");function V(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.didResolver(n,r,_,c);return l(a)}s(V,"didResolver");function j(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.resolveDID(n,r,_,c);return l(a)}s(j,"resolveDID");function q(t,e){let n,r;try{let y=o.__wbindgen_add_to_stack_pointer(-16),I=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),J=u,ae=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),be=u;o.keyToDID(y,I,J,ae,be);var _=p().getInt32(y+0,!0),c=p().getInt32(y+4,!0),a=p().getInt32(y+8,!0),g=p().getInt32(y+12,!0),d=_,w=c;if(g)throw d=0,w=0,l(a);return n=d,r=w,m(d,w)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(n,r,1)}}s(q,"keyToDID");function z(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=o.keyToVerificationMethod(n,r,_,c);return l(a)}s(z,"keyToVerificationMethod");function $(t){let e=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=u,r=o.didToVerificationMethod(e,n);return l(r)}s($,"didToVerificationMethod");function H(t,e,n,r){let _=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),g=u,d=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),w=u,y=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),I=u,J=o.issueCredential(_,c,a,g,d,w,y,I);return l(J)}s(H,"issueCredential");function G(t,e,n){let r=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),_=u,c=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u,g=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),d=u,w=o.verifyCredential(r,_,c,a,g,d);return l(w)}s(G,"verifyCredential");function X(t,e,n,r){let _=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u,a=f(e,o.__wbindgen_export_0,o.__wbindgen_export_1),g=u,d=f(n,o.__wbindgen_export_0,o.__wbindgen_export_1),w=u,y=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),I=u,J=o.issuePresentation(_,c,a,g,d,w,y,I);return l(J)}s(X,"issuePresentation");function Y(t,e){let n=e(t.length*1,1)>>>0;return D().set(t,n/1),u=t.length,n}s(Y,"passArray8ToWasm0");function Q(t){let e,n;try{let w=o.__wbindgen_add_to_stack_pointer(-16),y=Y(t,o.__wbindgen_export_0),I=u;o.generateEd25519KeyFromBytes(w,y,I);var r=p().getInt32(w+0,!0),_=p().getInt32(w+4,!0),c=p().getInt32(w+8,!0),a=p().getInt32(w+12,!0),g=r,d=_;if(a)throw g=0,d=0,l(c);return e=g,n=d,m(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(e,n,1)}}s(Q,"generateEd25519KeyFromBytes");function Z(t){let e,n;try{let w=o.__wbindgen_add_to_stack_pointer(-16),y=Y(t,o.__wbindgen_export_0),I=u;o.generateSecp256k1KeyFromBytes(w,y,I);var r=p().getInt32(w+0,!0),_=p().getInt32(w+4,!0),c=p().getInt32(w+8,!0),a=p().getInt32(w+12,!0),g=r,d=_;if(a)throw g=0,d=0,l(c);return e=g,n=d,m(g,d)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_4(e,n,1)}}s(Z,"generateSecp256k1KeyFromBytes");function M(t,e){let n=e(t.length*4,4)>>>0,r=p();for(let _=0;_<t.length;_++)r.setUint32(n+4*_,b(t[_]),!0);return u=t.length,n}s(M,"passArrayJsValueToWasm0");function ee(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.createJwe(n,r,_,c);return l(a)}s(ee,"createJwe");function te(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.decryptJwe(n,r,_,c);return l(a)}s(te,"decryptJwe");function ne(t,e){let n=M(e,o.__wbindgen_export_0),r=u,_=o.createDagJwe(b(t),n,r);return l(_)}s(ne,"createDagJwe");function re(t,e){let n=f(t,o.__wbindgen_export_0,o.__wbindgen_export_1),r=u,_=M(e,o.__wbindgen_export_0),c=u,a=o.decryptDagJwe(n,r,_,c);return l(a)}s(re,"decryptDagJwe");function me(t,e,n){o.__wbindgen_export_5(t,e,b(n))}s(me,"__wbg_adapter_6");function he(t,e){o.__wbindgen_export_6(t,e)}s(he,"__wbg_adapter_19");function Ie(t,e,n,r){o.__wbindgen_export_7(t,e,b(n),b(r))}s(Ie,"__wbg_adapter_107");var Se=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ve=["omit","same-origin","include"],De=["same-origin","no-cors","cors","navigate"],Oe=new Set(["basic","cors","default"]);async function Je(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&Oe.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")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",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}s(Je,"__wbg_load");function ke(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(m(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(i(n)),_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_abort_67e1b49bf6614565=function(e){i(e).abort()},t.wbg.__wbg_abort_d830bf2e9aa6ec5b=function(e,n){i(e).abort(i(n))},t.wbg.__wbg_append_72a3c0addd2bce38=function(){return x(function(e,n,r,_,c){i(e).append(m(n,r),m(_,c))},arguments)},t.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb=function(){return x(function(e){let n=i(e).arrayBuffer();return b(n)},arguments)},t.wbg.__wbg_call_13410aac570ffff7=function(){return x(function(e,n){let r=i(e).call(i(n));return b(r)},arguments)},t.wbg.__wbg_call_a5400b25a865cfd8=function(){return x(function(e,n,r){let _=i(e).call(i(n),i(r));return b(_)},arguments)},t.wbg.__wbg_clearTimeout_42d9ccd50822fd3a=function(e){let n=clearTimeout(l(e));return b(n)},t.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){let n=i(e).crypto;return b(n)},t.wbg.__wbg_done_75ed0ee6dd243d9d=function(e){return i(e).done},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(i(e));return b(n)},t.wbg.__wbg_fetch_6bbc32f991730587=function(e){let n=fetch(i(e));return b(n)},t.wbg.__wbg_fetch_87aed7f306ec6d63=function(e,n){let r=i(e).fetch(i(n));return b(r)},t.wbg.__wbg_from_88bc52ce20ba6318=function(e){let n=Array.from(i(e));return b(n)},t.wbg.__wbg_getRandomValues_1c61fac11405ffdc=function(){return x(function(e,n){globalThis.crypto.getRandomValues(k(e,n))},arguments)},t.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return x(function(e,n){i(e).getRandomValues(i(n))},arguments)},t.wbg.__wbg_getTime_6bb3f64e0f18f817=function(e){return i(e).getTime()},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=i(e)[n>>>0];return b(r)},t.wbg.__wbg_get_458e874b43b18b25=function(){return x(function(e,n){let r=Reflect.get(i(e),i(n));return b(r)},arguments)},t.wbg.__wbg_has_b89e451f638123e3=function(){return x(function(e,n){return Reflect.has(i(e),i(n))},arguments)},t.wbg.__wbg_headers_29fec3c72865cd75=function(e){let n=i(e).headers;return b(n)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=i(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b=function(e){let n;try{n=i(e)instanceof Map}catch{n=!1}return n},t.wbg.__wbg_instanceof_Response_50fde2cd696850bf=function(e){let n;try{n=i(e)instanceof Response}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=i(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_isArray_030cce220591fb41=function(e){return Array.isArray(i(e))},t.wbg.__wbg_isSafeInteger_1c0d1af5542e102a=function(e){return Number.isSafeInteger(i(e))},t.wbg.__wbg_iterator_f370b34483c71a1c=function(){return b(Symbol.iterator)},t.wbg.__wbg_keys_ef52390b2ae0e714=function(e){let n=Object.keys(i(e));return b(n)},t.wbg.__wbg_length_186546c51cd61acd=function(e){return i(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return i(e).length},t.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){let n=i(e).msCrypto;return b(n)},t.wbg.__wbg_new0_b0a0a38c201e6df5=function(){return b(new Date)},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_2e3c58a15f39f5f9=function(e,n){try{var r={a:e,b:n},_=s((a,g)=>{let d=r.a;r.a=0;try{return Ie(d,r.b,a,g)}finally{r.a=d}},"cb0");let c=new Promise(_);return b(c)}finally{r.a=r.b=0}},t.wbg.__wbg_new_2ff1f68f3676ea53=function(){return b(new Map)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(i(e));return b(n)},t.wbg.__wbg_new_66b9434b4e59b63e=function(){return x(function(){let e=new AbortController;return b(e)},arguments)},t.wbg.__wbg_new_f6e53210afea8e45=function(){return x(function(){let e=new Headers;return b(e)},arguments)},t.wbg.__wbg_newfromslice_074c56947bd43469=function(e,n){let r=new Uint8Array(k(e,n));return b(r)},t.wbg.__wbg_newnoargs_254190557c45b4ec=function(e,n){let r=new Function(m(e,n));return b(r)},t.wbg.__wbg_newwithlength_a167dcc7aaa3ba77=function(e){let n=new Uint8Array(e>>>0);return b(n)},t.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f=function(){return x(function(e,n,r){let _=new Request(m(e,n),i(r));return b(_)},arguments)},t.wbg.__wbg_next_5b3530e612fde77d=function(e){let n=i(e).next;return b(n)},t.wbg.__wbg_next_692e82279131b03c=function(){return x(function(e){let n=i(e).next();return b(n)},arguments)},t.wbg.__wbg_node_905d3e251edff8a2=function(e){let n=i(e).node;return b(n)},t.wbg.__wbg_now_886b39d7ec380719=function(e){return i(e).now()},t.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){let n=i(e).process;return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(k(e,n),i(r))},t.wbg.__wbg_push_330b2eb93e4e1212=function(e,n){return i(e).push(i(n))},t.wbg.__wbg_queueMicrotask_25d0739ac89e8c88=function(e){queueMicrotask(i(e))},t.wbg.__wbg_queueMicrotask_4488407636f5bf24=function(e){let n=i(e).queueMicrotask;return b(n)},t.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return x(function(e,n){i(e).randomFillSync(l(n))},arguments)},t.wbg.__wbg_require_60cc747a6bc5215a=function(){return x(function(){let e=module.require;return b(e)},arguments)},t.wbg.__wbg_resolve_4055c623acdd6a1b=function(e){let n=Promise.resolve(i(e));return b(n)},t.wbg.__wbg_setTimeout_4ec014681668a581=function(e,n){let r=setTimeout(i(e),n);return b(r)},t.wbg.__wbg_set_1353b2a5e96bc48c=function(e,n,r){i(e).set(k(n,r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){i(e)[l(n)]=l(r)},t.wbg.__wbg_set_453345bcda80b89a=function(){return x(function(e,n,r){return Reflect.set(i(e),i(n),i(r))},arguments)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){i(e)[n>>>0]=l(r)},t.wbg.__wbg_set_b7f1cf4fae26fe2a=function(e,n,r){let _=i(e).set(i(n),i(r));return b(_)},t.wbg.__wbg_setbody_c8460bdf44147df8=function(e,n){i(e).body=i(n)},t.wbg.__wbg_setcache_90ca4ad8a8ad40d3=function(e,n){i(e).cache=Se[n]},t.wbg.__wbg_setcredentials_9cd60d632c9d5dfc=function(e,n){i(e).credentials=ve[n]},t.wbg.__wbg_setheaders_0052283e2f3503d1=function(e,n){i(e).headers=i(n)},t.wbg.__wbg_setmethod_9b504d5b855b329c=function(e,n,r){i(e).method=m(n,r)},t.wbg.__wbg_setmode_a23e1a2ad8b512f8=function(e,n){i(e).mode=De[n]},t.wbg.__wbg_setsignal_8c45ad1247a74809=function(e,n){i(e).signal=i(n)},t.wbg.__wbg_signal_da4d466ce86118b5=function(e){let n=i(e).signal;return b(n)},t.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){let e=typeof global>"u"?null:global;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){let e=typeof globalThis>"u"?null:globalThis;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){let e=typeof self>"u"?null:self;return h(e)?0:b(e)},t.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){let e=typeof window>"u"?null:window;return h(e)?0:b(e)},t.wbg.__wbg_status_3fea3036088621d6=function(e){return i(e).status},t.wbg.__wbg_stringify_b98c93d0a190446a=function(){return x(function(e){let n=JSON.stringify(i(e));return b(n)},arguments)},t.wbg.__wbg_subarray_70fd07feefe14294=function(e,n,r){let _=i(e).subarray(n>>>0,r>>>0);return b(_)},t.wbg.__wbg_then_b33a773d723afa3e=function(e,n,r){let _=i(e).then(i(n),i(r));return b(_)},t.wbg.__wbg_then_e22500defe16819f=function(e,n){let r=i(e).then(i(n));return b(r)},t.wbg.__wbg_url_e5720dfacf77b05e=function(e,n){let r=i(n).url,_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_value_dd9372230531eade=function(e){let n=i(e).value;return b(n)},t.wbg.__wbg_versions_c01dfd4722a88165=function(e){let n=i(e).versions;return b(n)},t.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1=function(e,n){let r=i(n),_=typeof r=="bigint"?r:void 0;p().setBigInt64(e+8,h(_)?BigInt(0):_,!0),p().setInt32(e+0,!h(_),!0)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=i(e),r=typeof n=="boolean"?n:void 0;return h(r)?16777215:r?1:0},t.wbg.__wbg_wbindgencbdrop_eb10308566512b88=function(e){let n=i(e).original;return n.cnt--==1?(n.a=0,!0):!1},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=P(i(n)),_=f(r,o.__wbindgen_export_0,o.__wbindgen_export_1),c=u;p().setInt32(e+4,c,!0),p().setInt32(e+0,_,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return i(e)in i(n)},t.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154=function(e){return typeof i(e)=="bigint"},t.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(e){return typeof i(e)=="function"},t.wbg.__wbg_wbindgenisnull_f3037694abe4d97a=function(e){return i(e)===null},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=i(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof i(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return i(e)===void 0},t.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58=function(e,n){return i(e)===i(n)},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return i(e)==i(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=i(n),_=typeof r=="number"?r:void 0;p().setFloat64(e+8,h(_)?0:_,!0),p().setInt32(e+0,!h(_),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=i(n),_=typeof r=="string"?r:void 0;var c=h(_)?0:f(_,o.__wbindgen_export_0,o.__wbindgen_export_1),a=u;p().setInt32(e+4,a,!0),p().setInt32(e+0,c,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(m(e,n))},t.wbg.__wbindgen_cast_1eaafab1968e741d=function(e,n){let r=K(e,n,639,he);return b(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=m(e,n);return b(r)},t.wbg.__wbindgen_cast_2ddd8a25ff58642a=function(e,n){let r=BigInt.asUintN(64,e)|n<<BigInt(64);return b(r)},t.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){let n=BigInt.asUintN(64,e);return b(n)},t.wbg.__wbindgen_cast_67d14185bb436b4e=function(e,n){let r=K(e,n,726,me);return b(r)},t.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return b(e)},t.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,n){let r=k(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=i(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){l(e)},t}s(ke,"__wbg_get_imports");function Ce(t,e){return o=t.exports,_e.__wbindgen_wasm_module=e,v=null,C=null,o}s(Ce,"__wbg_finalize_init");async function _e(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("didkit_wasm_bg.wasm",Ne.url));let e=ke();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await Je(await t,e);return Ce(n,r)}s(_e,"__wbg_init");var oe=_e;var Ae="https://assets.learncard.ai/didkit/sha256-ba3e2ec2208f6da57d94e47c332b3226f048e11d7a23093d50b184d849b6bc0b/didkit_wasm_bg.wasm",ie=!1,F=!1,Te=s(async(t=Ae)=>{for(;F;)await new Promise(e=>setTimeout(e,250));if(!ie)try{F=!0,await oe({module_or_path:t}),F=!1,ie=!0}catch(e){throw F=!1,e}},"init"),ce=Te;var se=s(t=>{let e=[],n=s(r=>{typeof r!="object"||r===null||(r["@context"]&&(Array.isArray(r["@context"])?e.push(...r["@context"]):e.push(r["@context"])),Object.keys(r).forEach(_=>{n(r[_])}))},"traverse");return n(t),e},"getContextURIs"),O=s(async(t,e,n=!1)=>{let r=se(e),_=await Promise.all(r.map(async c=>t.context.resolveDocument(c,n)));return r.reduce((c,a,g)=>{let d=_[g];return d&&(c[a]=JSON.stringify(d)),c},{})},"getDocumentMap");var Re=s(async(t,e=!1)=>{await ce(t);let n={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:s(async(r,_)=>{try{return JSON.parse(await B(_)??"")||void 0}catch(c){r.debug?.(c);return}},"resolveStaticDocument")},methods:{generateEd25519KeyFromBytes:s((r,_)=>JSON.parse(Q(_)),"generateEd25519KeyFromBytes"),generateSecp256k1KeyFromBytes:s((r,_)=>JSON.parse(Z(_)),"generateSecp256k1KeyFromBytes"),keyToDid:s((r,_,c)=>q(_,JSON.stringify(c)),"keyToDid"),keyToVerificationMethod:s(async(r,_,c)=>z(_,JSON.stringify(c)),"keyToVerificationMethod"),didToVerificationMethod:s(async(r,_)=>$(_),"didToVerificationMethod"),issueCredential:s(async(r,_,c,a)=>JSON.parse(await H(JSON.stringify(_),JSON.stringify(c),JSON.stringify(a),JSON.stringify(await O(r,_,e)))),"issueCredential"),verifyCredential:s(async(r,_,c={})=>JSON.parse(await G(JSON.stringify(_),JSON.stringify(c),JSON.stringify(await O(r,_,e)))),"verifyCredential"),issuePresentation:s(async(r,_,c,a)=>{let g=c.proofFormat==="jwt",d=await X(JSON.stringify(_),JSON.stringify(c),JSON.stringify(a),JSON.stringify(await O(r,_,e)));return g?d:JSON.parse(d)},"issuePresentation"),verifyPresentation:s(async(r,_,c={})=>{let a=typeof _=="string";return JSON.parse(await L(a?_:JSON.stringify(_),JSON.stringify(c),a?"{}":JSON.stringify(await O(r,_,e))))},"verifyPresentation"),contextLoader:s(async(r,_)=>{try{return JSON.parse(await B(_)??"")||void 0}catch(c){r.debug?.(c);return}},"contextLoader"),resolveDid:s(async(r,_,c={})=>JSON.parse(await j(_,JSON.stringify(c))),"resolveDid"),didResolver:s(async(r,_,c={})=>JSON.parse(await V(_,JSON.stringify(c))),"didResolver"),createJwe:s(async(r,_,c)=>JSON.parse(await ee(_,c)),"createJwe"),decryptJwe:s(async(r,_,c)=>te(JSON.stringify(_),c.map(a=>JSON.stringify(a))),"decryptJwe"),createDagJwe:s(async(r,_,c)=>JSON.parse(await ne(_,c)),"createDagJwe"),decryptDagJwe:s(async(r,_,c)=>{let a=s(g=>{if(g==null)return g;if(typeof g=="bigint")return Number(g);if(Array.isArray(g))return g.map(a);if(typeof g!="object"||!Object.values(g).some(y=>typeof y=="bigint"||typeof y=="object"&&y!==null))return g;let w={};for(let y in g)w[y]=a(g[y]);return w},"convertBigIntsToNumbers");return a(await re(JSON.stringify(_),c.map(g=>JSON.stringify(g))))},"decryptDagJwe"),clearDidWebCache:s(async()=>{await U()},"clearDidWebCache")}}},"getDidKitPlugin");
3
3
  //# sourceMappingURL=didkit-plugin.cjs.production.min.cjs.map