@learncard/didkit-plugin 1.9.0 → 1.9.2

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.
@@ -1201,4 +1201,4 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
1201
1201
  }
1202
1202
  };
1203
1203
  }, "getDidKitPlugin");
1204
- //# sourceMappingURL=didkit-plugin.cjs.development.js.map
1204
+ //# sourceMappingURL=didkit-plugin.cjs.development.cjs.map
@@ -1,3 +1,3 @@
1
1
  "use strict";var D=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var _e=Object.prototype.hasOwnProperty;var i=(n,e)=>D(n,"name",{value:e,configurable:!0});var ie=(n,e)=>{for(var t in e)D(n,t,{get:e[t],enumerable:!0})},se=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ce(e))!_e.call(n,o)&&o!==t&&D(n,o,{get:()=>e[o],enumerable:!(r=oe(e,o))||r.enumerable});return n};var ae=n=>se(D({},"__esModule",{value:!0}),n);var Se={};ie(Se,{getContextURIs:()=>te,getDidKitPlugin:()=>xe,getDocumentMap:()=>S});module.exports=ae(Se);var me={};var c,l=0,I=null;function x(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}i(x,"getUint8ArrayMemory0");var O=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:i(()=>{throw Error("TextEncoder not available")},"encode")},le=typeof O.encodeInto=="function"?function(n,e){return O.encodeInto(n,e)}:function(n,e){let t=O.encode(n);return e.set(t),{read:n.length,written:t.length}};function g(n,e,t){if(t===void 0){let a=O.encode(n),u=e(a.length,1)>>>0;return x().subarray(u,u+a.length).set(a),l=a.length,u}let r=n.length,o=e(r,1)>>>0,_=x(),s=0;for(;s<r;s++){let a=n.charCodeAt(s);if(a>127)break;_[o+s]=a}if(s!==r){s!==0&&(n=n.slice(s)),o=t(o,r,r=s+n.length*3,1)>>>0;let a=x().subarray(o+s,o+r),u=le(n,a);s+=u.written,o=t(o,r,s,1)>>>0}return l=s,o}i(g,"passStringToWasm0");var m=null;function d(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==c.memory.buffer)&&(m=new DataView(c.memory.buffer)),m}i(d,"getDataViewMemory0");var M=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:i(()=>{throw Error("TextDecoder not available")},"decode")};typeof TextDecoder<"u"&&M.decode();function w(n,e){return n=n>>>0,M.decode(x().subarray(n,n+e))}i(w,"getStringFromWasm0");function h(n){let e=c.__externref_table_alloc();return c.__wbindgen_export_4.set(e,n),e}i(h,"addToExternrefTable0");function b(n,e){try{return n.apply(this,e)}catch(t){let r=h(t);c.__wbindgen_exn_store(r)}}i(b,"handleError");function k(n,e){return n=n>>>0,x().subarray(n/1,n/1+e)}i(k,"getArrayU8FromWasm0");function y(n){return n==null}i(y,"isLikeNone");var R=typeof FinalizationRegistry>"u"?{register:i(()=>{},"register"),unregister:i(()=>{},"unregister")}:new FinalizationRegistry(n=>{c.__wbindgen_export_5.get(n.dtor)(n.a,n.b)});function ge(n,e,t,r){let o={a:n,b:e,cnt:1,dtor:t},_=i((...s)=>{o.cnt++;let a=o.a;o.a=0;try{return r(a,o.b,...s)}finally{--o.cnt===0?(c.__wbindgen_export_5.get(o.dtor)(a,o.b),R.unregister(o)):o.a=a}},"real");return _.original=o,R.register(_,o,o),_}i(ge,"makeMutClosure");function N(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,_="[";o>0&&(_+=N(n[0]));for(let s=1;s<o;s++)_+=", "+N(n[s]);return _+="]",_}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t&&t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
2
2
  ${n.stack}`:r}i(N,"debugString");function A(n){let e=c.__wbindgen_export_4.get(n);return c.__externref_table_dealloc(n),e}i(A,"takeFromExternrefTable0");function F(n,e){let t,r;try{let s=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),a=l,u=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),p=l,f=c.keyToDID(s,a,u,p);var o=f[0],_=f[1];if(f[3])throw o=0,_=0,A(f[2]);return t=o,r=_,w(o,_)}finally{c.__wbindgen_free(t,r,1)}}i(F,"keyToDID");function P(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;return c.keyToVerificationMethod(t,r,o,_)}i(P,"keyToVerificationMethod");function E(n,e){let t=e(n.length*1,1)>>>0;return x().set(n,t/1),l=n.length,t}i(E,"passArray8ToWasm0");function V(n){let e,t;try{let _=E(n,c.__wbindgen_malloc),s=l,a=c.generateSecp256k1KeyFromBytes(_,s);var r=a[0],o=a[1];if(a[3])throw r=0,o=0,A(a[2]);return e=r,t=o,w(r,o)}finally{c.__wbindgen_free(e,t,1)}}i(V,"generateSecp256k1KeyFromBytes");function J(n,e){let t=e(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){let o=h(n[r]);d().setUint32(t+4*r,o,!0)}return l=n.length,t}i(J,"passArrayJsValueToWasm0");function B(n,e){let t=J(e,c.__wbindgen_malloc),r=l;return c.createDagJwe(n,t,r)}i(B,"createDagJwe");function W(n){let e=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),t=l;return c.didToVerificationMethod(e,t)}i(W,"didToVerificationMethod");function K(n,e,t){let r=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=l,_=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),s=l,a=g(t,c.__wbindgen_malloc,c.__wbindgen_realloc),u=l;return c.verifyPresentation(r,o,_,s,a,u)}i(K,"verifyPresentation");function L(n,e,t,r){let o=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l,s=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),a=l,u=g(t,c.__wbindgen_malloc,c.__wbindgen_realloc),p=l,f=g(r,c.__wbindgen_malloc,c.__wbindgen_realloc),C=l;return c.issueCredential(o,_,s,a,u,p,f,C)}i(L,"issueCredential");function U(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;return c.didResolver(t,r,o,_)}i(U,"didResolver");function q(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=J(e,c.__wbindgen_malloc),_=l;return c.createJwe(t,r,o,_)}i(q,"createJwe");function j(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=J(e,c.__wbindgen_malloc),_=l;return c.decryptJwe(t,r,o,_)}i(j,"decryptJwe");function z(n,e,t,r){let o=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l,s=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),a=l,u=g(t,c.__wbindgen_malloc,c.__wbindgen_realloc),p=l,f=g(r,c.__wbindgen_malloc,c.__wbindgen_realloc),C=l;return c.issuePresentation(o,_,s,a,u,p,f,C)}i(z,"issuePresentation");function $(){return c.clearCache()}i($,"clearCache");function G(n,e,t){let r=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=l,_=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),s=l,a=g(t,c.__wbindgen_malloc,c.__wbindgen_realloc),u=l;return c.verifyCredential(r,o,_,s,a,u)}i(G,"verifyCredential");function H(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=g(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;return c.resolveDID(t,r,o,_)}i(H,"resolveDID");function T(n){let e=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),t=l;return c.contextLoader(e,t)}i(T,"contextLoader");function X(n){let e,t;try{let _=E(n,c.__wbindgen_malloc),s=l,a=c.generateEd25519KeyFromBytes(_,s);var r=a[0],o=a[1];if(a[3])throw r=0,o=0,A(a[2]);return e=r,t=o,w(r,o)}finally{c.__wbindgen_free(e,t,1)}}i(X,"generateEd25519KeyFromBytes");function Q(n,e){let t=g(n,c.__wbindgen_malloc,c.__wbindgen_realloc),r=l,o=J(e,c.__wbindgen_malloc),_=l;return c.decryptDagJwe(t,r,o,_)}i(Q,"decryptDagJwe");function ue(n,e,t){c.closure4149_externref_shim(n,e,t)}i(ue,"__wbg_adapter_54");function be(n,e,t,r){c.closure4546_externref_shim(n,e,t,r)}i(be,"__wbg_adapter_172");var fe=["omit","same-origin","include"],de=["same-origin","no-cors","cors","navigate"];async function we(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.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 t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}i(we,"__wbg_load");function pe(){let n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,t){let r=String(t),o=g(r,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;d().setInt32(e+4,_,!0),d().setInt32(e+0,o,!0)},n.wbg.__wbg_abort_775ef1d17fc65868=function(e){e.abort()},n.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return b(function(e,t,r,o,_){e.append(w(t,r),w(o,_))},arguments)},n.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return b(function(e){return e.arrayBuffer()},arguments)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return b(function(e,t){return e.call(t)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return b(function(e,t,r){return e.call(t,r)},arguments)},n.wbg.__wbg_crypto_038798f665f985e2=function(e){return e.crypto},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){return e.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(e){return e.done},n.wbg.__wbg_entries_3265d4158b33e5dc=function(e){return Object.entries(e)},n.wbg.__wbg_fetch_509096533071c657=function(e,t){return e.fetch(t)},n.wbg.__wbg_fetch_f1856afdb49415d1=function(e){return fetch(e)},n.wbg.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)},n.wbg.__wbg_getRandomValues_371e7ade8bd92088=function(e,t){e.getRandomValues(t)},n.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return b(function(e,t){globalThis.crypto.getRandomValues(k(e,t))},arguments)},n.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1=function(e){return e.getRandomValues},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return b(function(e,t){e.getRandomValues(t)},arguments)},n.wbg.__wbg_getTime_46267b1c24877e30=function(e){return e.getTime()},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return b(function(e,t){return Reflect.get(e,t)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]},n.wbg.__wbg_has_a5ea9117f258a0ec=function(){return b(function(e,t){return Reflect.has(e,t)},arguments)},n.wbg.__wbg_headers_9cb51cfd2ac780a4=function(e){return e.headers},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_instanceof_Map_f3469ce2244d2430=function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},n.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(e){return Array.isArray(e)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(e){return Number.isSafeInteger(e)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_keys_5c77a08ddc2fb8a6=function(e){return Object.keys(e)},n.wbg.__wbg_length_a446193dc22c12f8=function(e){return e.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(e){return e.length},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){return e.msCrypto},n.wbg.__wbg_msCrypto_ff35fce085fab2a3=function(e){return e.msCrypto},n.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},n.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return b(function(){return new Headers},arguments)},n.wbg.__wbg_new_23a2665fac83c611=function(e,t){try{var r={a:e,b:t},o=i((s,a)=>{let u=r.a;r.a=0;try{return be(u,r.b,s,a)}finally{r.a=u}},"cb0");return new Promise(o)}finally{r.a=r.b=0}},n.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},n.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},n.wbg.__wbg_new_78feb108b6472713=function(){return new Array},n.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},n.wbg.__wbg_new_e25e5aab09ff45db=function(){return b(function(){return new AbortController},arguments)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(e,t){return new Function(w(e,t))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,r){return new Uint8Array(e,t>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(e){return new Uint8Array(e>>>0)},n.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return b(function(e,t,r){return new Request(w(e,t),r)},arguments)},n.wbg.__wbg_next_25feadfc0913fea9=function(e){return e.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return b(function(e){return e.next()},arguments)},n.wbg.__wbg_node_905d3e251edff8a2=function(e){return e.node},n.wbg.__wbg_now_d18023d54d4e5500=function(e){return e.now()},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){return e.process},n.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},n.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(e){queueMicrotask(e)},n.wbg.__wbg_queueMicrotask_d3219def82552485=function(e){return e.queueMicrotask},n.wbg.__wbg_randomFillSync_994ac6d9ade7a695=function(e,t,r){e.randomFillSync(k(t,r))},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return b(function(e,t){e.randomFillSync(t)},arguments)},n.wbg.__wbg_require_0d6aeaec3c042c88=function(e,t,r){return e.require(w(t,r))},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return b(function(){return module.require},arguments)},n.wbg.__wbg_resolve_4851785c9c5f573d=function(e){return Promise.resolve(e)},n.wbg.__wbg_self_25aabeb5a7b41685=function(){return b(function(){return self.self},arguments)},n.wbg.__wbg_set_37837023f3d740e8=function(e,t,r){e[t>>>0]=r},n.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,r){e[t]=r},n.wbg.__wbg_set_65595bdd868b3009=function(e,t,r){e.set(t,r>>>0)},n.wbg.__wbg_set_8fc6bf8a5b1071d1=function(e,t,r){return e.set(t,r)},n.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return b(function(e,t,r){return Reflect.set(e,t,r)},arguments)},n.wbg.__wbg_setbody_5923b78a95eedf29=function(e,t){e.body=t},n.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(e,t){e.credentials=fe[t]},n.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(e,t){e.headers=t},n.wbg.__wbg_setmethod_3c5280fe5d890842=function(e,t,r){e.method=w(t,r)},n.wbg.__wbg_setmode_5dc300b865044b65=function(e,t){e.mode=de[t]},n.wbg.__wbg_setsignal_75b21ef3a81de905=function(e,t){e.signal=t},n.wbg.__wbg_signal_aaf9ad74119f20a4=function(e){return e.signal},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let e=typeof global>"u"?null:global;return y(e)?0:h(e)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let e=typeof globalThis>"u"?null:globalThis;return y(e)?0:h(e)},n.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5=function(){return module},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let e=typeof self>"u"?null:self;return y(e)?0:h(e)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let e=typeof window>"u"?null:window;return y(e)?0:h(e)},n.wbg.__wbg_status_f6360336ca686bf0=function(e){return e.status},n.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return b(function(e){return JSON.stringify(e)},arguments)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(e,t,r){return e.subarray(t>>>0,r>>>0)},n.wbg.__wbg_then_44b73946d2fb3e7d=function(e,t){return e.then(t)},n.wbg.__wbg_then_48b406749878a531=function(e,t,r){return e.then(t,r)},n.wbg.__wbg_url_ae10c34ca209681d=function(e,t){let r=t.url,o=g(r,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;d().setInt32(e+4,_,!0),d().setInt32(e+0,o,!0)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(e){return e.value},n.wbg.__wbg_versions_c01dfd4722a88165=function(e){return e.versions},n.wbg.__wbindgen_bigint_from_i128=function(e,t){return e<<BigInt(64)|BigInt.asUintN(64,t)},n.wbg.__wbindgen_bigint_from_i64=function(e){return e},n.wbg.__wbindgen_bigint_from_u64=function(e){return BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_get_as_i64=function(e,t){let r=t,o=typeof r=="bigint"?r:void 0;d().setBigInt64(e+8,y(o)?BigInt(0):o,!0),d().setInt32(e+0,!y(o),!0)},n.wbg.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2},n.wbg.__wbindgen_cb_drop=function(e){let t=e.original;return t.cnt--==1?(t.a=0,!0):!1},n.wbg.__wbindgen_closure_wrapper12203=function(e,t,r){return ge(e,t,4150,ue)},n.wbg.__wbindgen_debug_string=function(e,t){let r=N(t),o=g(r,c.__wbindgen_malloc,c.__wbindgen_realloc),_=l;d().setInt32(e+4,_,!0),d().setInt32(e+0,o,!0)},n.wbg.__wbindgen_error_new=function(e,t){return new Error(w(e,t))},n.wbg.__wbindgen_in=function(e,t){return e in t},n.wbg.__wbindgen_init_externref_table=function(){let e=c.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},n.wbg.__wbindgen_is_bigint=function(e){return typeof e=="bigint"},n.wbg.__wbindgen_is_function=function(e){return typeof e=="function"},n.wbg.__wbindgen_is_null=function(e){return e===null},n.wbg.__wbindgen_is_object=function(e){let t=e;return typeof t=="object"&&t!==null},n.wbg.__wbindgen_is_string=function(e){return typeof e=="string"},n.wbg.__wbindgen_is_undefined=function(e){return e===void 0},n.wbg.__wbindgen_jsval_eq=function(e,t){return e===t},n.wbg.__wbindgen_jsval_loose_eq=function(e,t){return e==t},n.wbg.__wbindgen_memory=function(){return c.memory},n.wbg.__wbindgen_number_get=function(e,t){let r=t,o=typeof r=="number"?r:void 0;d().setFloat64(e+8,y(o)?0:o,!0),d().setInt32(e+0,!y(o),!0)},n.wbg.__wbindgen_number_new=function(e){return e},n.wbg.__wbindgen_string_get=function(e,t){let r=t,o=typeof r=="string"?r:void 0;var _=y(o)?0:g(o,c.__wbindgen_malloc,c.__wbindgen_realloc),s=l;d().setInt32(e+4,s,!0),d().setInt32(e+0,_,!0)},n.wbg.__wbindgen_string_new=function(e,t){return w(e,t)},n.wbg.__wbindgen_throw=function(e,t){throw new Error(w(e,t))},n}i(pe,"__wbg_get_imports");function ye(n,e){return c=n.exports,Y.__wbindgen_wasm_module=e,m=null,I=null,c.__wbindgen_start(),c}i(ye,"__wbg_finalize_init");async function Y(n){if(c!==void 0)return c;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("didkit_wasm_bg.wasm",me.url));let e=pe();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:t,module:r}=await we(await n,e);return ye(t,r)}i(Y,"__wbg_init");var Z=Y;var ee=!1,v=!1,he=i(async(n="https://cdn.filestackcontent.com/6v059q3KQlmXd6XoVPyC")=>{for(;v;)await new Promise(e=>setTimeout(e,250));if(!ee)try{v=!0,await Z({module_or_path:n}),v=!1,ee=!0}catch(e){throw v=!1,e}},"init"),ne=he;var te=i(n=>{let e=[],t=i(r=>{typeof r!="object"||r===null||(r["@context"]&&(Array.isArray(r["@context"])?e.push(...r["@context"]):e.push(r["@context"])),Object.keys(r).forEach(o=>{t(r[o])}))},"traverse");return t(n),e},"getContextURIs"),S=i(async(n,e,t=!1)=>{let r=te(e),o=await Promise.all(r.map(async _=>n.context.resolveDocument(_,t)));return r.reduce((_,s,a)=>{let u=o[a];return u&&(_[s]=JSON.stringify(u)),_},{})},"getDocumentMap");var xe=i(async(n,e=!1)=>{await ne(n);let t={};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:i(async(r,o)=>{try{return JSON.parse(await T(o)??"")||void 0}catch(_){r.debug?.(_);return}},"resolveStaticDocument")},methods:{generateEd25519KeyFromBytes:i((r,o)=>JSON.parse(X(o)),"generateEd25519KeyFromBytes"),generateSecp256k1KeyFromBytes:i((r,o)=>JSON.parse(V(o)),"generateSecp256k1KeyFromBytes"),keyToDid:i((r,o,_)=>F(o,JSON.stringify(_)),"keyToDid"),keyToVerificationMethod:i(async(r,o,_)=>P(o,JSON.stringify(_)),"keyToVerificationMethod"),didToVerificationMethod:i(async(r,o)=>W(o),"didToVerificationMethod"),issueCredential:i(async(r,o,_,s)=>JSON.parse(await L(JSON.stringify(o),JSON.stringify(_),JSON.stringify(s),JSON.stringify(await S(r,o,e)))),"issueCredential"),verifyCredential:i(async(r,o,_={})=>JSON.parse(await G(JSON.stringify(o),JSON.stringify(_),JSON.stringify(await S(r,o,e)))),"verifyCredential"),issuePresentation:i(async(r,o,_,s)=>{let a=_.proofFormat==="jwt",u=await z(JSON.stringify(o),JSON.stringify(_),JSON.stringify(s),JSON.stringify(await S(r,o,e)));return a?u:JSON.parse(u)},"issuePresentation"),verifyPresentation:i(async(r,o,_={})=>{let s=typeof o=="string";return JSON.parse(await K(s?o:JSON.stringify(o),JSON.stringify(_),s?"{}":JSON.stringify(await S(r,o,e))))},"verifyPresentation"),contextLoader:i(async(r,o)=>{try{return JSON.parse(await T(o)??"")||void 0}catch(_){r.debug?.(_);return}},"contextLoader"),resolveDid:i(async(r,o,_={})=>JSON.parse(await H(o,JSON.stringify(_))),"resolveDid"),didResolver:i(async(r,o,_={})=>JSON.parse(await U(o,JSON.stringify(_))),"didResolver"),createJwe:i(async(r,o,_)=>JSON.parse(await q(o,_)),"createJwe"),decryptJwe:i(async(r,o,_)=>j(JSON.stringify(o),_.map(s=>JSON.stringify(s))),"decryptJwe"),createDagJwe:i(async(r,o,_)=>JSON.parse(await B(o,_)),"createDagJwe"),decryptDagJwe:i(async(r,o,_)=>{let s=i(a=>{if(a==null)return a;if(typeof a=="bigint")return Number(a);if(Array.isArray(a))return a.map(s);if(typeof a!="object"||!Object.values(a).some(f=>typeof f=="bigint"||typeof f=="object"&&f!==null))return a;let p={};for(let f in a)p[f]=s(a[f]);return p},"convertBigIntsToNumbers");return s(await Q(JSON.stringify(o),_.map(a=>JSON.stringify(a))))},"decryptDagJwe"),clearDidWebCache:i(async()=>{await $()},"clearDidWebCache")}}},"getDidKitPlugin");
3
- //# sourceMappingURL=didkit-plugin.cjs.production.min.js.map
3
+ //# sourceMappingURL=didkit-plugin.cjs.production.min.cjs.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./didkit-plugin.cjs.production.min.js');
4
+ module.exports = require('./didkit-plugin.cjs.production.min.cjs');
5
5
  } else {
6
- module.exports = require('./didkit-plugin.cjs.development.js');
6
+ module.exports = require('./didkit-plugin.cjs.development.cjs');
7
7
  }
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './plugin';
3
+ export * from './helpers';
4
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,9 +1,24 @@
1
1
  {
2
2
  "name": "@learncard/didkit-plugin",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "",
5
- "main": "./dist/index.js",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
6
7
  "module": "./dist/didkit-plugin.esm.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/didkit-plugin.esm.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "./dist/didkit_wasm_bg.wasm": "./dist/didkit_wasm_bg.wasm",
20
+ "./dist/didkit/didkit_wasm_bg.wasm": "./dist/didkit/didkit_wasm_bg.wasm"
21
+ },
7
22
  "files": [
8
23
  "dist"
9
24
  ],
@@ -31,12 +46,12 @@
31
46
  },
32
47
  "types": "./dist/index.d.ts",
33
48
  "dependencies": {
34
- "@learncard/core": "9.4.20",
35
- "@learncard/types": "5.17.0"
49
+ "@learncard/core": "9.4.22",
50
+ "@learncard/types": "5.17.2"
36
51
  },
37
52
  "sideEffects": false,
38
53
  "scripts": {
39
- "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
54
+ "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.cjs && tsc --p tsconfig.json && shx cp ./dist/index.d.ts ./dist/index.d.cts",
40
55
  "test": "jest --passWithNoTests",
41
56
  "test:watch": "jest --watch",
42
57
  "test:coverage": "jest --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\""