@blockcerts/blockcerts-verifier 1.67.0 → 1.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle-stats.html +1 -1
- package/dist/{EcdsaSd2023-pKawgefE-BjAwvHAC.js → EcdsaSd2023-Bf8oG6yE-DXSfendb.js} +6 -6
- package/dist/{EcdsaSecp256k1Signature2019-CRRIiHFR-CvD31J8J.js → EcdsaSecp256k1Signature2019-BALmC57B-DCQW1A4n.js} +1 -1
- package/dist/{Ed25519Signature2020-DjL_FhDh-CA1Qf5Gf.js → Ed25519Signature2020-B6Av-H9i-Bi3NyI0E.js} +7 -7
- package/dist/{MerkleProof2017-DUjdbiQD-cvAJLFQa.js → MerkleProof2017-Dy-NSqLc-DHQ59Wvo.js} +1 -1
- package/dist/{MerkleProof2019-FYgdlZOm-D01-ewqk.js → MerkleProof2019-0fhn8kLR-C2H_q6nV.js} +2 -2
- package/dist/{checkCredentialSchemaConformity-BAaThQfx-B48ozDA8.js → checkCredentialSchemaConformity-D70pJ-aV-ziU-1LIq.js} +1 -1
- package/dist/{controlVerificationMethod-Dup4teK9-DYo4OJRU.js → controlVerificationMethod-suRC0MnA-D4JcJT1N.js} +1 -1
- package/dist/{did-key-common.esm-DBOb9N8j-DNcrFCWj.js → did-key-common.esm-C8HA3Pjo-CSneo-V8.js} +1 -1
- package/dist/{did-key-ed25519.esm-Br9nZmXw-D_gjmUgP.js → did-key-ed25519.esm-DysNS-Zl-DSKpuDIg.js} +1 -1
- package/dist/{did-key-secp256k1.esm-777F8mD3-BaGBNoUc.js → did-key-secp256k1.esm-CLndQyAu-BYDTpSgR.js} +1 -1
- package/dist/{downloadPDF-XZlmMePj.js → downloadPDF-DzV0Jwr0.js} +3 -3
- package/dist/{elliptic-BIvJGowH-BRLTdj5Y.js → elliptic-e2d4_kYF-DQmYEk-8.js} +1 -1
- package/dist/{index-DVormXBF-B-pGO0d3.js → index-BC_5sEeg-CEsb2-mf.js} +1 -1
- package/dist/index-BEHg4rC3-AHOWkvj-.js +78 -0
- package/dist/{index-m_ndwqCF-CkZbwhan.js → index-CKc12B0M-CY2IlTam.js} +7 -7
- package/dist/{index.es-B13oYDrC.js → index.es-D_fMtNlx.js} +1 -1
- package/dist/{jsonld-GvjJx4Wj-C61cS9xX.js → jsonld-Cuz6c95c-CQeQQNYP.js} +13 -10
- package/dist/main.js +116 -116
- package/dist/{purify-hA3K4SAZ.js → purify-mEiDmpQD.js} +1 -1
- package/dist/{retrieveVerificationMethodPublicKey-CqAYJ2Jj-0nfxll3J.js → retrieveVerificationMethodPublicKey-CogYoUma-CqFMEtDL.js} +1 -1
- package/dist/verifyIssuerProfile-2DvLibZC-DDE-mATS.js +1 -0
- package/dist/{webcrypto.es-tAywRHzi-B87Lqr9a.js → webcrypto.es-CGaF2VaX-TCzLuarM.js} +1 -1
- package/package.json +2 -2
- package/dist/index-WJXe0QUW-DmXFAWKQ.js +0 -60
- /package/dist/{HashlinkVerifier-B5AIxwF--dg5WNZnc.js → HashlinkVerifier-CUj0d9D3-dg5WNZnc.js} +0 -0
- /package/dist/{checkRevocationStatusList2021-BhUc-vna-XCu3zkCJ.js → checkRevocationStatusList2021-u7qIPszJ-XCu3zkCJ.js} +0 -0
- /package/dist/{ensureNotRevoked-DtC0S-17-DvMIgM4L.js → ensureNotRevoked-D2jnsCd0-DvMIgM4L.js} +0 -0
- /package/dist/{ensureValidIssuingKey-CST0cCIj-wu9SdYxL.js → ensureValidIssuingKey-LBboe5mO-wu9SdYxL.js} +0 -0
- /package/dist/{index-D6zPgx9c-Dgus2xdV.js → index-DuuEF8T4-Dgus2xdV.js} +0 -0
- /package/dist/{index-CPeLwMJp-C0eXpZGn.js → index-qLsUsSDH-C0eXpZGn.js} +0 -0
- /package/dist/{sha256-BmHSm4R7-C1PUWFZm.js → sha256-mf0I6iCn-C1PUWFZm.js} +0 -0
- /package/dist/{tslib.es6-CNEFicEt-CmLYFWVC.js → tslib.es6--gQC4x5c-CmLYFWVC.js} +0 -0
- /package/dist/{x25519-fnqXrhwD-NSl6svWQ.js → x25519-DrRZ9GHv-NSl6svWQ.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as e,c as t}from"./downloadPDF-
|
|
1
|
+
import{g as e,c as t}from"./downloadPDF-DzV0Jwr0.js";function n(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var r={exports:{}};
|
|
2
2
|
/*! @license DOMPurify 2.5.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.7/LICENSE */r.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},r.apply(null,arguments)}function o(e){return a(e)||i(e)||l(e)||u()}function a(e){if(Array.isArray(e))return c(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s=Object.hasOwnProperty,m=Object.setPrototypeOf,f=Object.isFrozen,p=Object.getPrototypeOf,d=Object.getOwnPropertyDescriptor,h=Object.freeze,g=Object.seal,y=Object.create,b="undefined"!=typeof Reflect&&Reflect,v=b.apply,T=b.construct;v||(v=function(e,t,n){return e.apply(t,n)}),h||(h=function(e){return e}),g||(g=function(e){return e}),T||(T=function(e,t){return r(e,o(t))});var N=D(Array.prototype.forEach),E=D(Array.prototype.pop),A=D(Array.prototype.push),_=D(String.prototype.toLowerCase),S=D(String.prototype.toString),w=D(String.prototype.match),x=D(String.prototype.replace),O=D(String.prototype.indexOf),k=D(String.prototype.trim),L=D(RegExp.prototype.test),C=R(TypeError);function D(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return v(e,t,r)}}function R(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T(e,n)}}function M(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:_,m&&m(e,null);for(var o=t.length;o--;){var a=t[o];if("string"==typeof a){var i=n(a);i!==a&&(f(t)||(t[o]=i),a=i)}e[a]=!0}return e}function I(e){var t,n=y(null);for(t in e)!0===v(s,e,[t])&&(n[t]=e[t]);return n}function F(e,t){for(;null!==e;){var n=d(e,t);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}e=p(e)}function r(e){return console.warn("fallback value for",e),null}return r}var U=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),z=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=h(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),j=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),G=h(["#text"]),W=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),q=h(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),K=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=g(/<%[\w\W]*|[\w\W]*%>/gm),X=g(/\${[\w\W]*}/gm),Z=g(/^data-[\-\w.\u00B7-\uFFFF]/),J=g(/^aria-[\-\w]+$/),Q=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=g(/^(?:\w+script|data):/i),te=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=g(/^html$/i),re=g(/^[a-z][.\w]*(-[.\w]+)+$/i),oe=function(){return"undefined"==typeof window?null:window},ae=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function ie(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe(),n=function(e){return ie(e)};if(n.version="2.5.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,a=t.document,i=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,u=t.Element,s=t.NodeFilter,m=t.NamedNodeMap,f=void 0===m?t.NamedNodeMap||t.MozNamedAttrMap:m,p=t.HTMLFormElement,d=t.DOMParser,g=t.trustedTypes,y=u.prototype,b=F(y,"cloneNode"),v=F(y,"nextSibling"),T=F(y,"childNodes"),D=F(y,"parentNode");if("function"==typeof l){var R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}var le=ae(g,r),ce=le?le.createHTML(""):"",ue=a,se=ue.implementation,me=ue.createNodeIterator,fe=ue.createDocumentFragment,pe=ue.getElementsByTagName,de=r.importNode,he={};try{he=I(a).documentMode?a.documentMode:{}}catch(e){}var ge={};n.isSupported="function"==typeof D&&se&&void 0!==se.createHTMLDocument&&9!==he;var ye,be,ve=K,Te=V,Ne=X,Ee=Z,Ae=J,_e=ee,Se=te,we=re,xe=Q,Oe=null,ke=M({},[].concat(o(U),o(H),o(z),o(j),o(G))),Le=null,Ce=M({},[].concat(o(W),o(q),o(Y),o($))),De=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Me=null,Ie=!0,Fe=!0,Ue=!1,He=!0,ze=!1,Pe=!0,je=!1,Be=!1,Ge=!1,We=!1,qe=!1,Ye=!1,$e=!0,Ke=!1,Ve="user-content-",Xe=!0,Ze=!1,Je={},Qe=null,et=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),tt=null,nt=M({},["audio","video","img","source","image","track"]),rt=null,ot=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),at="http://www.w3.org/1998/Math/MathML",it="http://www.w3.org/2000/svg",lt="http://www.w3.org/1999/xhtml",ct=lt,ut=!1,st=null,mt=M({},[at,it,lt],S),ft=["application/xhtml+xml","text/html"],pt="text/html",dt=null,ht=a.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},yt=function(t){dt&&dt===t||(t&&"object"===e(t)||(t={}),t=I(t),ye=ye=-1===ft.indexOf(t.PARSER_MEDIA_TYPE)?pt:t.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ye?S:_,Oe="ALLOWED_TAGS"in t?M({},t.ALLOWED_TAGS,be):ke,Le="ALLOWED_ATTR"in t?M({},t.ALLOWED_ATTR,be):Ce,st="ALLOWED_NAMESPACES"in t?M({},t.ALLOWED_NAMESPACES,S):mt,rt="ADD_URI_SAFE_ATTR"in t?M(I(ot),t.ADD_URI_SAFE_ATTR,be):ot,tt="ADD_DATA_URI_TAGS"in t?M(I(nt),t.ADD_DATA_URI_TAGS,be):nt,Qe="FORBID_CONTENTS"in t?M({},t.FORBID_CONTENTS,be):et,Re="FORBID_TAGS"in t?M({},t.FORBID_TAGS,be):{},Me="FORBID_ATTR"in t?M({},t.FORBID_ATTR,be):{},Je="USE_PROFILES"in t&&t.USE_PROFILES,Ie=!1!==t.ALLOW_ARIA_ATTR,Fe=!1!==t.ALLOW_DATA_ATTR,Ue=t.ALLOW_UNKNOWN_PROTOCOLS||!1,He=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,ze=t.SAFE_FOR_TEMPLATES||!1,Pe=!1!==t.SAFE_FOR_XML,je=t.WHOLE_DOCUMENT||!1,We=t.RETURN_DOM||!1,qe=t.RETURN_DOM_FRAGMENT||!1,Ye=t.RETURN_TRUSTED_TYPE||!1,Ge=t.FORCE_BODY||!1,$e=!1!==t.SANITIZE_DOM,Ke=t.SANITIZE_NAMED_PROPS||!1,Xe=!1!==t.KEEP_CONTENT,Ze=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,ct=t.NAMESPACE||lt,De=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&>(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&>(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&(Fe=!1),qe&&(We=!0),Je&&(Oe=M({},o(G)),Le=[],!0===Je.html&&(M(Oe,U),M(Le,W)),!0===Je.svg&&(M(Oe,H),M(Le,q),M(Le,$)),!0===Je.svgFilters&&(M(Oe,z),M(Le,q),M(Le,$)),!0===Je.mathMl&&(M(Oe,j),M(Le,Y),M(Le,$))),t.ADD_TAGS&&(Oe===ke&&(Oe=I(Oe)),M(Oe,t.ADD_TAGS,be)),t.ADD_ATTR&&(Le===Ce&&(Le=I(Le)),M(Le,t.ADD_ATTR,be)),t.ADD_URI_SAFE_ATTR&&M(rt,t.ADD_URI_SAFE_ATTR,be),t.FORBID_CONTENTS&&(Qe===et&&(Qe=I(Qe)),M(Qe,t.FORBID_CONTENTS,be)),Xe&&(Oe["#text"]=!0),je&&M(Oe,["html","head","body"]),Oe.table&&(M(Oe,["tbody"]),delete Re.tbody),h&&h(t),dt=t)},bt=M({},["mi","mo","mn","ms","mtext"]),vt=M({},["annotation-xml"]),Tt=M({},["title","style","font","a","script"]),Nt=M({},H);M(Nt,z),M(Nt,P);var Et=M({},j);M(Et,B);var At=function(e){var t=D(e);t&&t.tagName||(t={namespaceURI:ct,tagName:"template"});var n=_(e.tagName),r=_(t.tagName);return!!st[e.namespaceURI]&&(e.namespaceURI===it?t.namespaceURI===lt?"svg"===n:t.namespaceURI===at?"svg"===n&&("annotation-xml"===r||bt[r]):Boolean(Nt[n]):e.namespaceURI===at?t.namespaceURI===lt?"math"===n:t.namespaceURI===it?"math"===n&&vt[r]:Boolean(Et[n]):e.namespaceURI===lt?!(t.namespaceURI===it&&!vt[r])&&!(t.namespaceURI===at&&!bt[r])&&!Et[n]&&(Tt[n]||!Nt[n]):!("application/xhtml+xml"!==ye||!st[e.namespaceURI]))},_t=function(e){A(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ce}catch(t){e.remove()}}},St=function(e,t){try{A(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Le[e])if(We||qe)try{_t(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},wt=function(e){var t,n;if(Ge)e="<remove></remove>"+e;else{var r=w(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ye&&ct===lt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=le?le.createHTML(e):e;if(ct===lt)try{t=(new d).parseFromString(o,ye)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ct,"template",null);try{t.documentElement.innerHTML=ut?ce:o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),ct===lt?pe.call(t,je?"html":"body")[0]:je?t.documentElement:i},xt=function(e){return me.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null,!1)},Ot=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},kt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Lt=function(e,t,r){ge[e]&&N(ge[e],(function(e){e.call(n,t,r,dt)}))},Ct=function(e){var t;if(Lt("beforeSanitizeElements",e,null),Ot(e))return _t(e),!0;if(L(/[\u0080-\uFFFF]/,e.nodeName))return _t(e),!0;var r=be(e.nodeName);if(Lt("uponSanitizeElement",e,{tagName:r,allowedTags:Oe}),e.hasChildNodes()&&!kt(e.firstElementChild)&&(!kt(e.content)||!kt(e.content.firstElementChild))&&L(/<[/\w]/g,e.innerHTML)&&L(/<[/\w]/g,e.textContent))return _t(e),!0;if("select"===r&&L(/<template/i,e.innerHTML))return _t(e),!0;if(7===e.nodeType)return _t(e),!0;if(Pe&&8===e.nodeType&&L(/<[/\w]/g,e.data))return _t(e),!0;if(!Oe[r]||Re[r]){if(!Re[r]&&Rt(r)){if(De.tagNameCheck instanceof RegExp&&L(De.tagNameCheck,r))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(r))return!1}if(Xe&&!Qe[r]){var o=D(e)||e.parentNode,a=T(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i){var l=b(a[i],!0);l.__removalCount=(e.__removalCount||0)+1,o.insertBefore(l,v(e))}}return _t(e),!0}return e instanceof u&&!At(e)?(_t(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!L(/<\/no(script|embed|frames)/i,e.innerHTML)?(ze&&3===e.nodeType&&(t=e.textContent,t=x(t,ve," "),t=x(t,Te," "),t=x(t,Ne," "),e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)),Lt("afterSanitizeElements",e,null),!1):(_t(e),!0)},Dt=function(e,t,n){if($e&&("id"===t||"name"===t)&&(n in a||n in ht))return!1;if(Fe&&!Me[t]&&L(Ee,t));else if(Ie&&L(Ae,t));else if(!Le[t]||Me[t]){if(!(Rt(e)&&(De.tagNameCheck instanceof RegExp&&L(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&L(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&L(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(rt[t]);else if(L(xe,x(n,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!tt[e])if(Ue&&!L(_e,x(n,Se,"")));else if(n)return!1;return!0},Rt=function(e){return"annotation-xml"!==e&&w(e,we)},Mt=function(t){var r,o,a,i;Lt("beforeSanitizeAttributes",t,null);var l=t.attributes;if(l){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};for(i=l.length;i--;){var u=r=l[i],s=u.name,m=u.namespaceURI;if(o="value"===s?r.value:k(r.value),a=be(s),c.attrName=a,c.attrValue=o,c.keepAttr=!0,c.forceKeepAttr=void 0,Lt("uponSanitizeAttribute",t,c),o=c.attrValue,!c.forceKeepAttr&&(St(s,t),c.keepAttr))if(He||!L(/\/>/i,o)){ze&&(o=x(o,ve," "),o=x(o,Te," "),o=x(o,Ne," "));var f=be(t.nodeName);if(Dt(f,a,o))if(!Ke||"id"!==a&&"name"!==a||(St(s,t),o=Ve+o),Pe&&L(/((--!?|])>)|<\/(style|title)/i,o))St(s,t);else{if(le&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(m);else switch(g.getAttributeType(f,a)){case"TrustedHTML":o=le.createHTML(o);break;case"TrustedScriptURL":o=le.createScriptURL(o)}try{m?t.setAttributeNS(m,s,o):t.setAttribute(s,o),Ot(t)?_t(t):E(n.removed)}catch(e){}}}else St(s,t)}Lt("afterSanitizeAttributes",t,null)}},It=function e(t){var n,r=xt(t);for(Lt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Lt("uponSanitizeShadowNode",n,null),Ct(n)||(n.content instanceof i&&e(n.content),Mt(n));Lt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(o){var a,l,u,s,m,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ut=!o)&&(o="\x3c!--\x3e"),"string"!=typeof o&&!kt(o)){if("function"!=typeof o.toString)throw C("toString is not a function");if("string"!=typeof(o=o.toString()))throw C("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(kt(o))return t.toStaticHTML(o.outerHTML)}return o}if(Be||yt(f),n.removed=[],"string"==typeof o&&(Ze=!1),Ze){if(o.nodeName){var p=be(o.nodeName);if(!Oe[p]||Re[p])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof c)1===(l=(a=wt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?a=l:a.appendChild(l);else{if(!We&&!ze&&!je&&-1===o.indexOf("<"))return le&&Ye?le.createHTML(o):o;if(!(a=wt(o)))return We?null:Ye?ce:""}a&&Ge&&_t(a.firstChild);for(var d=xt(Ze?o:a);u=d.nextNode();)3===u.nodeType&&u===s||Ct(u)||(u.content instanceof i&&It(u.content),Mt(u),s=u);if(s=null,Ze)return o;if(We){if(qe)for(m=fe.call(a.ownerDocument);a.firstChild;)m.appendChild(a.firstChild);else m=a;return(Le.shadowroot||Le.shadowrootmod)&&(m=de.call(r,m,!0)),m}var h=je?a.outerHTML:a.innerHTML;return je&&Oe["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&L(ne,a.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+h),ze&&(h=x(h,ve," "),h=x(h,Te," "),h=x(h,Ne," ")),le&&Ye?le.createHTML(h):h},n.setConfig=function(e){yt(e),Be=!0},n.clearConfig=function(){dt=null,Be=!1},n.isValidAttribute=function(e,t,n){dt||yt({});var r=be(e),o=be(t);return Dt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],A(ge[e],t))},n.removeHook=function(e){if(ge[e])return E(ge[e])},n.removeHooks=function(e){ge[e]&&(ge[e]=[])},n.removeAllHooks=function(){ge={}},n}var le=ie();return le}();var o=r.exports,a=n({__proto__:null,default:e(o)},[o]);export{a as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,d as i}from"./main.js";import{b as r}from"./index-
|
|
1
|
+
import{V as e,d as i}from"./main.js";import{b as r}from"./index-DuuEF8T4-Dgus2xdV.js";function t(t,o){if(!t.verificationMethod)return void console.warn("No verification method found in the issuer document. This will likely become a requirement in the near future");const n=o.split("#")[1],d=t.verificationMethod.find((e=>e.id===`#${n}`||e.id===o));if(!d)throw new e("retrieveVerificationMethodPublicKey",`${r} - ${i.i18n.getText("errors","retrieveVerificationMethodPublicKey")}`);return{...d}}export{t as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as r,I as t}from"./main.js";async function o(o){if(!o.proof)return void console.warn("No proof found in the issuer profile.");let e=o.proof.type;"DataIntegrityProof"===e&&(e=r(o.proof.cryptosuite));const i=await async function(r){if(r===t.MerkleProof2019){const{default:r}=await import("./MerkleProof2019-0fhn8kLR-C2H_q6nV.js");return r}if(r===t.Ed25519Signature2020){const{default:r}=await import("./Ed25519Signature2020-B6Av-H9i-Bi3NyI0E.js");return r}if(r===t.EcdsaSecp256k1Signature2019){const{default:r}=await import("./EcdsaSecp256k1Signature2019-BALmC57B-DCQW1A4n.js");return r}if(r===t.EcdsaSd2023){const{default:r}=await import("./EcdsaSd2023-Bf8oG6yE-DXSfendb.js");return r}}(e),a=new i({document:o,proof:o.proof,issuer:o.issuer?o.issuer:o,executeStep:async(r,t,o)=>t()});await a.init();try{await a.verifyProof()}catch(r){throw new Error(`Issuer profile verification failed: ${r.message}`)}}export{o as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as e,c as t,
|
|
1
|
+
import{B as e,c as t,J as r}from"./main.js";import{_ as n}from"./tslib.es6--gQC4x5c-CmLYFWVC.js";var s,i={};var o=function(){if(s)return i;s=1;class t{static isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,r){const n=t.toUint8Array(e),s=t.toUint8Array(r);if(n.length!==s.byteLength)return!1;for(let e=0;e<n.length;e++)if(n[e]!==s[e])return!1;return!0}static concat(...e){let t;t=!Array.isArray(e[0])||e[1]instanceof Function?Array.isArray(e[0])&&e[1]instanceof Function?e[0]:e[e.length-1]instanceof Function?e.slice(0,e.length-1):e:e[0];let r=0;for(const e of t)r+=e.byteLength;const n=new Uint8Array(r);let s=0;for(const e of t){const t=this.toUint8Array(e);n.set(t,s),s+=t.length}return e[e.length-1]instanceof Function?this.toView(n,e[e.length-1]):n.buffer}}const r="string",n=/^[0-9a-f]+$/i,o=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,a=/^[a-zA-Z0-9-_]+$/;class c{static fromString(e){const t=unescape(encodeURIComponent(e)),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer}static toString(e){const r=t.toUint8Array(e);let n="";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);return decodeURIComponent(escape(n))}}class u{static toString(e,r=!1){const n=t.toArrayBuffer(e),s=new DataView(n);let i="";for(let e=0;e<n.byteLength;e+=2){const t=s.getUint16(e,r);i+=String.fromCharCode(t)}return i}static fromString(e,t=!1){const r=new ArrayBuffer(2*e.length),n=new DataView(r);for(let r=0;r<e.length;r++)n.setUint16(2*r,e.charCodeAt(r),t);return r}}class l{static isHex(e){return typeof e===r&&n.test(e)}static isBase64(e){return typeof e===r&&o.test(e)}static isBase64Url(e){return typeof e===r&&a.test(e)}static ToString(e,r="utf8"){const n=t.toUint8Array(e);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return u.toString(n,!0);case"utf16":case"utf16be":return u.toString(n);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return u.fromString(e,!0);case"utf16":case"utf16be":return u.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(r){const n=t.toUint8Array(r);if("undefined"!=typeof btoa){const e=this.ToString(n,"binary");return btoa(e)}return e.from(n).toString("base64")}static FromBase64(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!l.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(e.from(r,"base64")).buffer}static FromBase64Url(e){const t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!l.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=l.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return c.fromString(e);case"utf16":case"utf16be":return u.fromString(e);case"utf16le":case"usc2":return u.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=l.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return c.toString(e);case"utf16":case"utf16be":return u.toString(e);case"utf16le":case"usc2":return u.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){const t=e.length,r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e.charCodeAt(n);return r.buffer}static ToBinary(e){const r=t.toUint8Array(e);let n="";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);return n}static ToHex(e){const r=t.toUint8Array(e);let n="";const s=r.length;for(let e=0;e<s;e++){const t=r[e];t<16&&(n+="0"),n+=t.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!l.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);const r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){const n=t.slice(e,e+2);r[e/2]=parseInt(n,16)}return r.buffer}static ToUtf16String(e,t=!1){return u.toString(e,t)}static FromUtf16String(e,t=!1){return u.fromString(e,t)}static Base64Padding(e){const t=4-e.length%4;if(t<4)for(let r=0;r<t;r++)e+="=";return e}static formatString(e){return(null==e?void 0:e.replace(/[\n\r\t ]/g,""))||""}}return l.DEFAULT_UTF8_ENCODING="utf8",i.BufferSourceConverter=t,i.Convert=l,i.assign=function(e,...t){const r=arguments[0];for(let e=1;e<arguments.length;e++){const t=arguments[e];for(const e in t)r[e]=t[e]}return r},i.combine=function(...e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),r=new Uint8Array(t);let n=0;return e.map((e=>new Uint8Array(e))).forEach((e=>{for(const t of e)r[n++]=t})),r.buffer},i.isEqual=function(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),n=new Uint8Array(t);for(let t=0;t<e.byteLength;t++)if(r[t]!==n[t])return!1;return!0},i}();
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) Peculiar Ventures, LLC
|
|
4
4
|
*/function a(e,t){let r=0;if(1===e.length)return e[0];for(let n=e.length-1;n>=0;n--)r+=e[e.length-1-n]*Math.pow(2,t*n);return r}function c(e,t,r=-1){const n=r;let s=e,i=0,o=Math.pow(2,t);for(let r=1;r<8;r++){if(e<o){let e;if(n<0)e=new ArrayBuffer(r),i=r;else{if(n<r)return new ArrayBuffer(0);e=new ArrayBuffer(n),i=n}const o=new Uint8Array(e);for(let e=r-1;e>=0;e--){const r=Math.pow(2,e*t);o[i-e-1]=Math.floor(s/r),s-=o[i-e-1]*r}return e}o*=Math.pow(2,t)}return new ArrayBuffer(0)}function u(...e){let t=0,r=0;for(const r of e)t+=r.length;const n=new ArrayBuffer(t),s=new Uint8Array(n);for(const t of e)s.set(t,r),r+=t.length;return s}function l(){const e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const t=255===e[0]&&128&e[1],r=0===e[0]&&!(128&e[1]);(t||r)&&this.warnings.push("Needlessly long format")}const t=new ArrayBuffer(this.valueHex.byteLength),r=new Uint8Array(t);for(let e=0;e<this.valueHex.byteLength;e++)r[e]=0;r[0]=128&e[0];const n=a(r,8),s=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(s);for(let t=0;t<this.valueHex.byteLength;t++)i[t]=e[t];i[0]&=127;return a(i,8)-n}function h(e,t){const r=e.toString(10);if(t<r.length)return"";const n=t-r.length,s=new Array(n);for(let e=0;e<n;e++)s[e]="0";return s.join("").concat(r)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockcerts/blockcerts-verifier",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.69.0",
|
|
4
4
|
"description": "A standalone universal viewer and verifier for blockcerts credentials",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"node": ">=18.0.0"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@blockcerts/cert-verifier-js": "^6.
|
|
14
|
+
"@blockcerts/cert-verifier-js": "^6.28.0",
|
|
15
15
|
"@blockcerts/cert-verifier-js-v1-legacy": "^4.0.1",
|
|
16
16
|
"@polymer/lit-element": "0.5.1",
|
|
17
17
|
"@polymer/polymer": "3.5.1",
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{g as e,u as t,B as r,i as o}from"./main.js";import{a as n}from"./jsonld-GvjJx4Wj-C61cS9xX.js";var i,a,s,c,p,u,d,f,l,h,y,m,w,g,v,T,E,x,b,S,L,_,C,M,U,O,R,K,A,D,N,P,V,I,j,k,X=(function(e,t){!function(e,t){for(var r in t)e[r]=t[r]}(t,function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
const o=r(1),n=r(2),i=r(3),{CONTEXT_URL:a,SECURITY_CONTEXT_V1_URL:s,SECURITY_CONTEXT_V2_URL:c}=i,p=new Map;p.set(s,o),p.set(c,n),e.exports={constants:i,contexts:p,SECURITY_CONTEXT_V1_URL:s,SECURITY_CONTEXT_V2_URL:c,CONTEXT_URL:a,CONTEXT:n}},function(e,t,r){
|
|
6
|
-
/*!
|
|
7
|
-
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
|
|
8
|
-
*/
|
|
9
|
-
e.exports={"@context":{id:"@id",type:"@type",dc:"http://purl.org/dc/terms/",sec:"https://w3id.org/security#",xsd:"http://www.w3.org/2001/XMLSchema#",EcdsaKoblitzSignature2016:"sec:EcdsaKoblitzSignature2016",Ed25519Signature2018:"sec:Ed25519Signature2018",EncryptedMessage:"sec:EncryptedMessage",GraphSignature2012:"sec:GraphSignature2012",LinkedDataSignature2015:"sec:LinkedDataSignature2015",LinkedDataSignature2016:"sec:LinkedDataSignature2016",CryptographicKey:"sec:Key",authenticationTag:"sec:authenticationTag",canonicalizationAlgorithm:"sec:canonicalizationAlgorithm",cipherAlgorithm:"sec:cipherAlgorithm",cipherData:"sec:cipherData",cipherKey:"sec:cipherKey",created:{"@id":"dc:created","@type":"xsd:dateTime"},creator:{"@id":"dc:creator","@type":"@id"},digestAlgorithm:"sec:digestAlgorithm",digestValue:"sec:digestValue",domain:"sec:domain",encryptionKey:"sec:encryptionKey",expiration:{"@id":"sec:expiration","@type":"xsd:dateTime"},expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},initializationVector:"sec:initializationVector",iterationCount:"sec:iterationCount",nonce:"sec:nonce",normalizationAlgorithm:"sec:normalizationAlgorithm",owner:{"@id":"sec:owner","@type":"@id"},password:"sec:password",privateKey:{"@id":"sec:privateKey","@type":"@id"},privateKeyPem:"sec:privateKeyPem",publicKey:{"@id":"sec:publicKey","@type":"@id"},publicKeyBase58:"sec:publicKeyBase58",publicKeyPem:"sec:publicKeyPem",publicKeyWif:"sec:publicKeyWif",publicKeyService:{"@id":"sec:publicKeyService","@type":"@id"},revoked:{"@id":"sec:revoked","@type":"xsd:dateTime"},salt:"sec:salt",signature:"sec:signature",signatureAlgorithm:"sec:signingAlgorithm",signatureValue:"sec:signatureValue"}}},function(e,t,r){
|
|
10
|
-
/*!
|
|
11
|
-
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
|
|
12
|
-
*/
|
|
13
|
-
e.exports={"@context":[{"@version":1.1},"https://w3id.org/security/v1",{AesKeyWrappingKey2019:"sec:AesKeyWrappingKey2019",DeleteKeyOperation:"sec:DeleteKeyOperation",DeriveSecretOperation:"sec:DeriveSecretOperation",EcdsaSecp256k1Signature2019:"sec:EcdsaSecp256k1Signature2019",EcdsaSecp256r1Signature2019:"sec:EcdsaSecp256r1Signature2019",EcdsaSecp256k1VerificationKey2019:"sec:EcdsaSecp256k1VerificationKey2019",EcdsaSecp256r1VerificationKey2019:"sec:EcdsaSecp256r1VerificationKey2019",Ed25519Signature2018:"sec:Ed25519Signature2018",Ed25519VerificationKey2018:"sec:Ed25519VerificationKey2018",EquihashProof2018:"sec:EquihashProof2018",ExportKeyOperation:"sec:ExportKeyOperation",GenerateKeyOperation:"sec:GenerateKeyOperation",KmsOperation:"sec:KmsOperation",RevokeKeyOperation:"sec:RevokeKeyOperation",RsaSignature2018:"sec:RsaSignature2018",RsaVerificationKey2018:"sec:RsaVerificationKey2018",Sha256HmacKey2019:"sec:Sha256HmacKey2019",SignOperation:"sec:SignOperation",UnwrapKeyOperation:"sec:UnwrapKeyOperation",VerifyOperation:"sec:VerifyOperation",WrapKeyOperation:"sec:WrapKeyOperation",X25519KeyAgreementKey2019:"sec:X25519KeyAgreementKey2019",allowedAction:"sec:allowedAction",assertionMethod:{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},authentication:{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"},capability:{"@id":"sec:capability","@type":"@id"},capabilityAction:"sec:capabilityAction",capabilityChain:{"@id":"sec:capabilityChain","@type":"@id","@container":"@list"},capabilityDelegation:{"@id":"sec:capabilityDelegationMethod","@type":"@id","@container":"@set"},capabilityInvocation:{"@id":"sec:capabilityInvocationMethod","@type":"@id","@container":"@set"},caveat:{"@id":"sec:caveat","@type":"@id","@container":"@set"},challenge:"sec:challenge",ciphertext:"sec:ciphertext",controller:{"@id":"sec:controller","@type":"@id"},delegator:{"@id":"sec:delegator","@type":"@id"},equihashParameterK:{"@id":"sec:equihashParameterK","@type":"xsd:integer"},equihashParameterN:{"@id":"sec:equihashParameterN","@type":"xsd:integer"},invocationTarget:{"@id":"sec:invocationTarget","@type":"@id"},invoker:{"@id":"sec:invoker","@type":"@id"},jws:"sec:jws",keyAgreement:{"@id":"sec:keyAgreementMethod","@type":"@id","@container":"@set"},kmsModule:{"@id":"sec:kmsModule"},parentCapability:{"@id":"sec:parentCapability","@type":"@id"},plaintext:"sec:plaintext",proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},proofValue:"sec:proofValue",referenceId:"sec:referenceId",unwrappedKey:"sec:unwrappedKey",verificationMethod:{"@id":"sec:verificationMethod","@type":"@id"},verifyData:"sec:verifyData",wrappedKey:"sec:wrappedKey"}]}},function(e,t,r){
|
|
14
|
-
/*!
|
|
15
|
-
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved.
|
|
16
|
-
*/
|
|
17
|
-
e.exports={SECURITY_CONTEXT_V1_URL:"https://w3id.org/security/v1",SECURITY_CONTEXT_V2_URL:"https://w3id.org/security/v2",CONTEXT_URL:"https://w3id.org/security/v2"}}]))}(i={exports:{}},i.exports),i.exports),Y=(a=X)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,z=X.contexts,q=X.constants,$=X.CONTEXT,W=X.CONTEXT_URL,B=X.SECURITY_CONTEXT_V1_URL,G=X.SECURITY_CONTEXT_V2_URL,J=t(Object.freeze({__proto__:null,CONTEXT:$,CONTEXT_URL:W,SECURITY_CONTEXT_V1_URL:B,SECURITY_CONTEXT_V2_URL:G,constants:q,contexts:z,default:Y}));function F(){if(c)return s;c=1;const{constants:e}=J;return s={SECURITY_CONTEXT_URL:e.SECURITY_CONTEXT_V2_URL,SECURITY_CONTEXT_V1_URL:e.SECURITY_CONTEXT_V1_URL,SECURITY_CONTEXT_V2_URL:e.SECURITY_CONTEXT_V2_URL,SECURITY_PROOF_URL:"https://w3id.org/security#proof",SECURITY_SIGNATURE_URL:"https://w3id.org/security#signature"}}
|
|
18
|
-
/*!
|
|
19
|
-
* Copyright (c) 2017-2023 Digital Bazaar, Inc. All rights reserved.
|
|
20
|
-
*/function H(){if(u)return p;u=1;const e=F(),{contexts:t}=J;return p=new Map([[e.SECURITY_CONTEXT_V1_URL,t.get(e.SECURITY_CONTEXT_V1_URL)],[e.SECURITY_CONTEXT_V2_URL,t.get(e.SECURITY_CONTEXT_V2_URL)]])}
|
|
21
|
-
/*!
|
|
22
|
-
* Copyright (c) 2018-2021 Digital Bazaar, Inc. All rights reserved.
|
|
23
|
-
*/function Q(){if(f)return d;f=1;const e=H(),t={};return d=t,t.extendContextLoader=t=>async r=>{const o=e.get(r);return void 0!==o?{contextUrl:null,documentUrl:r,document:o,tag:"static"}:t(r)},t.strictDocumentLoader=t.extendContextLoader((e=>{throw new Error(`${e} not found.`)})),d}function Z(){if(h)return l;h=1;class e extends Error{constructor(t){super(e._prepareSuperMessage(t)),Object.defineProperty(this,"name",{value:"NonError",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,e)}static _prepareSuperMessage(e){try{return JSON.stringify(e)}catch{return String(e)}}}const t=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],n=Symbol(".toJSON called"),i=({from:e,seen:a,to_:s,forceEnumerable:c,maxDepth:p,depth:u})=>{const d=s||(Array.isArray(e)?[]:{});if(a.push(e),u>=p)return d;if("function"==typeof e.toJSON&&!0!==e[n])return(e=>{e[n]=!0;const t=e.toJSON();return delete e[n],t})(e);for(const[t,n]of Object.entries(e))"function"==typeof r&&o(n)?d[t]="[object Buffer]":"function"!=typeof n&&(n&&"object"==typeof n?a.includes(e[t])?d[t]="[Circular]":(u++,d[t]=i({from:e[t],seen:a.slice(),forceEnumerable:c,maxDepth:p,depth:u})):d[t]=n);for(const{property:r,enumerable:o}of t)"string"==typeof e[r]&&Object.defineProperty(d,r,{value:e[r],enumerable:!!c||o,configurable:!0,writable:!0});return d};return l={serializeError:(e,t={})=>{const{maxDepth:r=Number.POSITIVE_INFINITY}=t;return"object"==typeof e&&null!==e?i({from:e,seen:[],forceEnumerable:!0,maxDepth:r,depth:0}):"function"==typeof e?`[Function: ${e.name||"anonymous"}]`:e},deserializeError:(t,r={})=>{const{maxDepth:o=Number.POSITIVE_INFINITY}=r;if(t instanceof Error)return t;if("object"==typeof t&&null!==t&&!Array.isArray(t)){const e=new Error;return i({from:t,seen:[],to_:e,maxDepth:o,depth:0}),e}return new e(t)}}}
|
|
24
|
-
/*!
|
|
25
|
-
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
|
|
26
|
-
*/function ee(){if(m)return y;m=1;const e=F(),t=n(),{extendContextLoader:r,strictDocumentLoader:o}=Q(),{serializeError:i}=Z();function a({document:r}){let o;o=t.getValues(r,"proof");const n=r["@context"]||e.SECURITY_CONTEXT_URL;return o=o.map((e=>({"@context":n,...e}))),o}function s(e){Object.defineProperty(e,"toJSON",{value:function(){return i(this)},configurable:!0,writable:!0})}return y=class{async add(e,{suite:n,purpose:i,documentLoader:s}={}){if(!n)throw new TypeError('"options.suite" is required.');if(!i)throw new TypeError('"options.purpose" is required.');s=s?r(s):o;const c={...e};delete c.proof;const p=a({document:e}),u=await n.createProof({document:c,purpose:i,proofSet:p,documentLoader:s});return t.addValue(e,"proof",u),e}async derive(e,{suite:t,purpose:n,documentLoader:i}={}){if(!t)throw new TypeError('"options.suite" is required.');if(!n)throw new TypeError('"options.purpose" is required.');i=i?r(i):o;const s={...e};delete s.proof;const c=a({document:e});return await t.derive({document:s,purpose:n,proofSet:c,documentLoader:i})}async verify(e,{suite:t,purpose:n,documentLoader:i}={}){if(!t)throw new TypeError('"options.suite" is required.');if(!n)throw new TypeError('"options.purpose" is required.');const c=Array.isArray(t)?t:[t];if(0===c.length)throw new TypeError("At least one suite is required.");i=i?r(i):o;try{const t=a({document:e={...e}});if(0===t.length)throw new Error("No matching proofs found in the given document.");delete e.proof;const r=await async function({document:e,suites:t,proofSet:r,purpose:o,documentLoader:n}){const i=Array.isArray(o)?o:[o],a=new Map,c=new Map,p=new Map;if(await Promise.all(i.map((o=>async function({purposeToProofs:e,proofToSuite:t,purpose:r,proofSet:o,suites:n,suiteMatchQueue:i,document:a,documentLoader:s}){for(const c of o){if(!await r.match(c,{document:a,documentLoader:s}))continue;let o=!1;for(const e of n){let r=i.get(e);r||i.set(e,r=new Map);let n=r.get(c);if(n||(n=e.matchProof({proof:c,document:a,documentLoader:s}),r.set(c,n)),await n){o=!0,t.set(c,e);break}}if(o){const t=e.get(r);t?t.push(c):e.set(r,[c])}}}({purposeToProofs:a,proofToSuite:c,purpose:o,proofSet:r,suites:t,suiteMatchQueue:p,document:e,documentLoader:n})))),a.size<i.length)return[];const u=new Map;return await Promise.all([...c.entries()].map((async([t,o])=>{let i;try{let a;const s={validate:async(e,{verificationMethod:t})=>(a=t,{valid:!0})},{verified:c,verificationMethod:p,error:u}=await o.verifyProof({proof:t,document:e,purpose:s,proofSet:r,documentLoader:n});a||(a=p),i={proof:t,verified:c,verificationMethod:a,error:u}}catch(e){i={proof:t,verified:!1,error:e}}i.error&&s(i.error),u.set(t,i)}))),await Promise.all([...a.entries()].map((async([t,r])=>{for(const o of r){const r=u.get(o);if(!r.verified)continue;const{verificationMethod:i}=r,a=c.get(o);let p;try{p=await t.validate(o,{document:e,suite:a,verificationMethod:i,documentLoader:n})}catch(e){p={valid:!1,error:e}}r.purposeResult?Array.isArray(r.purposeResult)?r.purposeResult.push(p):r.purposeResult=[r.purposeResult,p]:r.purposeResult=p,p.valid||(s(p.error),r.error||(r.verified=!1,r.error=p.error))}}))),[...u.values()]}({document:e,suites:c,proofSet:t,purpose:n,documentLoader:i});if(0===r.length){const e=new Error("Did not verify any proofs; insufficient proofs matched the acceptable suite(s) and required purpose(s).");throw e.name="NotFoundError",e}const o=r.some((e=>e.verified));if(!o){const e=[].concat(...r.filter((e=>e.error)).map((e=>e.error))),t={verified:o,results:r};return e.length>0&&(t.error=e),t}return{verified:o,results:r}}catch(e){return s(e),{verified:!1,error:e}}}},y}
|
|
27
|
-
/*!
|
|
28
|
-
* Copyright (c) 2020 Digital Bazaar, Inc. All rights reserved.
|
|
29
|
-
*/function te(){return T?v:(T=1,v=class{constructor({type:e}={}){if("string"!=typeof e)throw new TypeError('A LinkedDataProof must have a "type".');this.type=e}async createProof({}){throw new Error('"createProof" must be implemented in a derived class.')}async derive({}){throw new Error('"deriveProof" must be implemented in a derived class.')}async verifyProof({}){throw new Error('"verifyProof" must be implemented in a derived class.')}async matchProof({proof:e}){return e.type===this.type}})}function re(){if(x)return E;x=1;const e={};return E=e,e.w3cDate=e=>{null==e?e=new Date:"number"!=typeof e&&"string"!=typeof e||(e=new Date(e));const t=e.toISOString();return t.substr(0,t.length-5)+"Z"},e.concat=(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},E}function oe(){if(_)return L;_=1;const e=F(),t=n(),r=re(),{sha256digest:o}=function(){if(S)return b;S=1;const e=self&&(self.crypto||self.msCrypto);return b={async sha256digest({string:t}){const r=(new TextEncoder).encode(t);return new Uint8Array(await e.subtle.digest("SHA-256",r))}}}
|
|
30
|
-
/*!
|
|
31
|
-
* Copyright (c) 2017-2023 Digital Bazaar, Inc. All rights reserved.
|
|
32
|
-
*/(),i=te();return L=class extends i{constructor({type:e,proof:t,LDKeyClass:r,date:o,key:n,signer:i,verifier:a,useNativeCanonize:s,canonizeOptions:c,contextUrl:p}={}){super({type:e}),this.LDKeyClass=r,this.contextUrl=p,this.proof=t;const u=function({key:e,signer:t,verifier:r}){const o={};if(e){if(o.key=e,o.verificationMethod=e.id,"function"==typeof e.signer&&(o.signer=e.signer()),"function"==typeof e.verifier&&(o.verifier=e.verifier()),!o.signer&&!o.verifier)throw new TypeError('The "key" parameter must contain a "signer" or "verifier" method.')}else o.verificationMethod=t&&t.id||r&&r.id,o.signer=t,o.verifier=r;if(o.signer&&"function"!=typeof o.signer.sign)throw new TypeError("A signer API has not been specified.");if(o.verifier&&"function"!=typeof o.verifier.verify)throw new TypeError("A verifier API has not been specified.");return o}({key:n,signer:i,verifier:a});if(this.verificationMethod=u.verificationMethod,this.key=u.key,this.signer=u.signer,this.verifier=u.verifier,this.canonizeOptions=c,o&&(this.date=new Date(o),isNaN(this.date)))throw TypeError(`"date" "${o}" is not a valid date.`);this.useNativeCanonize=s,this._hashCache=null}async createProof({document:e,purpose:t,proofSet:o,documentLoader:n,expansionMap:i}){if(i)throw new Error('"expansionMap" not supported.');let a;a=this.proof?{...this.proof}:{},a.type=this.type;let s=this.date;void 0===a.created&&void 0===s&&(s=new Date),s&&"string"!=typeof s&&(s=r.w3cDate(s)),s&&(a.created=s),a.verificationMethod=this.verificationMethod,a=await this.updateProof({document:e,proof:a,proofSet:o,purpose:t,documentLoader:n}),a=await t.update(a,{document:e,suite:this,documentLoader:n});const c=await this.createVerifyData({document:e,proof:a,proofSet:o,documentLoader:n});return a=await this.sign({verifyData:c,document:e,proof:a,documentLoader:n}),a}async updateProof({proof:e,expansionMap:t}){if(t)throw new Error('"expansionMap" not supported.');return e}async verifyProof({proof:e,document:t,proofSet:r,documentLoader:o,expansionMap:n}){if(n)throw new Error('"expansionMap" not supported.');try{const i=await this.createVerifyData({document:t,proof:e,proofSet:r,documentLoader:o,expansionMap:n}),a=await this.getVerificationMethod({proof:e,document:t,documentLoader:o,expansionMap:n});if(!await this.verifySignature({verifyData:i,verificationMethod:a,document:t,proof:e,documentLoader:o,expansionMap:n}))throw new Error("Invalid signature.");return{verified:!0,verificationMethod:a}}catch(e){return{verified:!1,error:e}}}async canonize(e,{documentLoader:r,expansionMap:o,skipExpansion:n}){if(o)throw new Error('"expansionMap" not supported.');return t.canonize(e,{algorithm:"URDNA2015",base:null,format:"application/n-quads",documentLoader:r,safe:!0,skipExpansion:n,useNative:this.useNativeCanonize,...this.canonizeOptions})}async canonizeProof(t,{document:r,documentLoader:o,expansionMap:n}){if(n)throw new Error('"expansionMap" not supported.');return delete(t={"@context":r["@context"]||e.SECURITY_CONTEXT_URL,...t}).jws,delete t.signatureValue,delete t.proofValue,this.canonize(t,{documentLoader:o,expansionMap:n,skipExpansion:!1,...this.canonizeOptions})}async createVerifyData({document:e,proof:t,documentLoader:n,expansionMap:i}){if(i)throw new Error('"expansionMap" not supported.');let a;const{_hashCache:s}=this;s&&s.document===e?a=s.hash:this._hashCache={document:e,hash:a=this.canonize(e,{documentLoader:n,expansionMap:i}).then((e=>o({string:e})))};const[c,p]=await Promise.all([this.canonizeProof(t,{document:e,documentLoader:n,expansionMap:i}).then((e=>o({string:e}))),a]);return r.concat(c,p)}async derive(){throw new Error("Must be implemented by a derived class.")}async getVerificationMethod({proof:r,documentLoader:o}){let{verificationMethod:n}=r;if("object"==typeof n&&(n=n.id),!n)throw new Error('No "verificationMethod" found in proof.');const i=await t.frame(n,{"@context":e.SECURITY_CONTEXT_URL,"@embed":"@always",id:n},{documentLoader:o,compactToRelative:!1,safe:!0});if(!i)throw new Error(`Verification method ${n} not found.`);if(void 0!==i.revoked)throw new Error("The verification method has been revoked.");return i}async sign(){throw new Error("Must be implemented by a derived class.")}async verifySignature(){throw new Error("Must be implemented by a derived class.")}ensureSuiteContext({document:e,addSuiteContext:t}){const{contextUrl:r}=this;if(function({document:e,contextUrl:t}){const r=e["@context"];return r===t||Array.isArray(r)&&r.includes(t)}({document:e,contextUrl:r}))return;if(!t)throw new TypeError(`The document to be signed must contain this suite's @context, "${r}".`);const o=e["@context"]||[];e["@context"]=Array.isArray(o)?[...o,r]:[o,r]}},L}
|
|
33
|
-
/*!
|
|
34
|
-
* Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
|
|
35
|
-
*/function ne(){return O?U:(O=1,U=class{constructor({term:e,date:t,maxTimestampDelta:r=1/0}={}){if(void 0===e)throw new Error('"term" is required.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxTimestampDelta" must be a number.');if(this.term=e,void 0!==t&&(this.date=new Date(t),isNaN(this.date)))throw TypeError(`"date" "${t}" is not a valid date.`);this.maxTimestampDelta=r}async validate(e,{expansionMap:t}){if(t)throw new Error('"expansionMap" not supported.');try{if(this.maxTimestampDelta!==1/0){const t=(this.date||new Date).getTime(),r=1e3*this.maxTimestampDelta,o=new Date(e.created).getTime();if(!(o>=t-r&&o<=t+r))throw new Error("The proof's created timestamp is out of range.")}return{valid:!0}}catch(e){return{valid:!1,error:e}}}async update(e,{expansionMap:t}){if(t)throw new Error('"expansionMap" not supported.');return e.proofPurpose=this.term,e}async match(e,{expansionMap:t}){if(t)throw new Error('"expansionMap" not supported.');return e.proofPurpose===this.term}})}
|
|
36
|
-
/*!
|
|
37
|
-
* Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
|
|
38
|
-
*/function ie(){if(K)return R;K=1;const e=F(),t=n(),r=ne(),o="https://www.w3.org/ns/did/v1",i=["assertionMethod","authentication","capabilityInvocation","capabilityDelegation","keyAgreement","verificationMethod"];return R=class extends r{constructor({term:e,controller:t,date:r,maxTimestampDelta:o=1/0}={}){if(super({term:e,date:r,maxTimestampDelta:o}),void 0!==t){if("object"!=typeof t)throw new TypeError('"controller" must be an object.');this.controller=t}this._termDefinedByDIDContext=i.includes(e)}async validate(r,{verificationMethod:n,documentLoader:i,expansionMap:a}){try{const s=await super.validate(r,{verificationMethod:n,documentLoader:i,expansionMap:a});if(!s.valid)throw s.error;const{id:c}=n,{term:p,_termDefinedByDIDContext:u}=this;if(this.controller)s.controller=this.controller;else{const{controller:r}=n;let a;if(r)if("object"==typeof r)a=r.id;else{if("string"!=typeof r)throw new TypeError('"controller" must be a string representing a URL.');a=r}let{document:d}=await i(a);!(u&&d["@context"]===o||Array.isArray(d["@context"])&&d["@context"][0]===o)&&(d=await t.frame(d,{"@context":e.SECURITY_CONTEXT_URL,id:a,[p]:{"@embed":"@never",id:c}},{documentLoader:i,compactToRelative:!1,safe:!0})),s.controller=d}const d=t.getValues(s.controller,p);if(s.valid=d.some((e=>e===c||"object"==typeof e&&e.id===c)),!s.valid)throw new Error(`Verification method "${n.id}" not authorized by controller for proof purpose "${this.term}".`);return s}catch(e){return{valid:!1,error:e}}}},R}
|
|
39
|
-
/*!
|
|
40
|
-
* Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
|
|
41
|
-
*/function ae(){if(D)return A;D=1;const e=ie();return A=class extends e{constructor({term:e="assertionMethod",controller:t,date:r,maxTimestampDelta:o=1/0}={}){super({term:e,controller:t,date:r,maxTimestampDelta:o})}}}
|
|
42
|
-
/*!
|
|
43
|
-
* Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
|
|
44
|
-
*/function se(){if(P)return N;P=1;const e=ie();return N=class extends e{constructor({term:e="authentication",controller:t,challenge:r,date:o,domain:n,maxTimestampDelta:i=1/0}={}){if(super({term:e,controller:t,date:o,maxTimestampDelta:i}),"string"!=typeof r)throw new TypeError('"challenge" must be a string.');if(void 0!==n&&"string"!=typeof n)throw new TypeError('"domain" must be a string.');this.challenge=r,this.domain=n}async validate(e,{verificationMethod:t,documentLoader:r,expansionMap:o}){try{if(e.challenge!==this.challenge)throw new Error(`The challenge is not as expected; challenge="${e.challenge}", expected="${this.challenge}"`);if(void 0!==this.domain&&e.domain!==this.domain)throw new Error(`The domain is not as expected; domain="${e.domain}", expected="${this.domain}"`);return super.validate(e,{verificationMethod:t,documentLoader:r,expansionMap:o})}catch(e){return{valid:!1,error:e}}}async update(e,{document:t,suite:r,documentLoader:o,expansionMap:n}){return(e=await super.update(e,{document:t,suite:r,documentLoader:o,expansionMap:n})).challenge=this.challenge,void 0!==this.domain&&(e.domain=this.domain),e}},N}
|
|
45
|
-
/*!
|
|
46
|
-
* Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
|
|
47
|
-
*/var ce=function(){if(k)return j;k=1;const e={};j=e;const t=F();Object.assign(e,t);const r=ee(),o=function(){if(g)return w;g=1;class e extends Error{constructor(e){super("Verification error(s)."),this.name="VerificationError",this.errors=[].concat(e)}}return w=e}
|
|
48
|
-
/*!
|
|
49
|
-
* Copyright (c) 2018-2023 Digital Bazaar, Inc. All rights reserved.
|
|
50
|
-
*/();return e.derive=async function(e,{suite:t,purpose:o,documentLoader:n,addSuiteContext:i=!0}={}){if("object"!=typeof e)throw new TypeError('The "document" parameter must be an object.');t.ensureSuiteContext({document:e,addSuiteContext:i});try{return await(new r).derive(e,{suite:t,purpose:o,documentLoader:n})}catch(e){if(!n&&"jsonld.InvalidUrl"===e.name){const{details:{url:t}}=e,r=new Error(`A URL "${t}" could not be fetched; you need to pass "documentLoader" or resolve the URL before calling "derive".`);throw r.cause=e,r}throw e}},e.sign=async function(e,{suite:t,purpose:o,documentLoader:n,expansionMap:i,addSuiteContext:a=!0}={}){if(i)throw new Error('"expansionMap" not supported.');if("object"!=typeof e)throw new TypeError('The "document" parameter must be an object.');t.ensureSuiteContext({document:e,addSuiteContext:a});try{return await(new r).add(e,{suite:t,purpose:o,documentLoader:n})}catch(e){if(!n&&"jsonld.InvalidUrl"===e.name){const{details:{url:t}}=e,r=new Error(`A URL "${t}" could not be fetched; you need to pass "documentLoader" or resolve the URL before calling "sign".`);throw r.cause=e,r}throw e}},e.verify=async function(e,{suite:t,purpose:n,documentLoader:i,expansionMap:a}={}){if(a)throw new Error('"expansionMap" not supported.');if("object"!=typeof e)throw new TypeError('The "document" parameter must be an object.');const s=await(new r).verify(e,{suite:t,purpose:n,documentLoader:i}),{error:c}=s;if(c)if(i||"jsonld.InvalidUrl"!==c.name)s.error=new o(c);else{const{details:{url:e}}=c,t=new Error(`A URL "${e}" could not be fetched; you need to pass "documentLoader" or resolve the URL before calling "verify".`);s.error=new o(t)}return s},e.suites=function(){if(M)return C;M=1;const e={};return C=e,e.suites={LinkedDataProof:te(),LinkedDataSignature:oe()},C}
|
|
51
|
-
/*!
|
|
52
|
-
* Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
|
|
53
|
-
*/().suites,e.purposes=function(){if(I)return V;I=1;const e={};return V=e,e.purposes={AssertionProofPurpose:ae(),AuthenticationProofPurpose:se(),ControllerProofPurpose:ie(),ProofPurpose:ne()},V}
|
|
54
|
-
/*!
|
|
55
|
-
* Copyright (c) 2010-2023 Digital Bazaar, Inc. All rights reserved.
|
|
56
|
-
*/().purposes,Object.assign(e,Q()),j}(),pe=e(ce);const ue={};
|
|
57
|
-
/*!
|
|
58
|
-
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
|
|
59
|
-
*/
|
|
60
|
-
const de="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function fe(e,t){return function(e,t){if(!(e instanceof Uint8Array))throw new TypeError('"input" must be a Uint8Array.');if(0===e.length)return"";let r="",o=0;const n=t.length,i=t.charAt(0),a=[0];for(o=0;o<e.length;++o){let t=e[o];for(let e=0;e<a.length;++e)t+=a[e]<<8,a[e]=t%n,t=t/n|0;for(;t>0;)a.push(t%n),t=t/n|0}for(o=0;0===e[o]&&o<e.length-1;++o)r+=i;for(o=a.length-1;o>=0;--o)r+=t[a[o]];return r}(e,de)}function le(e){return function(e,t){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if(0===e.length)return new Uint8Array;let r=ue[t];if(!r){r=ue[t]=[];for(let e=0;e<t.length;++e)r[t.charCodeAt(e)]=e}e=e.replace(/\s/g,"");const o=t.length,n=t.charAt(0),i=[0];for(let t=0;t<e.length;t++){const n=r[e.charCodeAt(t)];if(void 0===n)return;let a=n;for(let e=0;e<i.length;++e)a+=i[e]*o,i[e]=255&a,a>>=8;for(;a>0;)i.push(255&a),a>>=8}for(let t=0;e[t]===n&&t<e.length-1;++t)i.push(0);return new Uint8Array(i.reverse())}(e,de)}export{le as d,fe as e,pe as j};
|
/package/dist/{HashlinkVerifier-B5AIxwF--dg5WNZnc.js → HashlinkVerifier-CUj0d9D3-dg5WNZnc.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{ensureNotRevoked-DtC0S-17-DvMIgM4L.js → ensureNotRevoked-D2jnsCd0-DvMIgM4L.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|