@blockcerts/blockcerts-verifier 1.58.0 → 1.59.1

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.
Files changed (49) hide show
  1. package/bundle-stats.html +24 -20
  2. package/dist/EcdsaSecp256k1Signature2019-XwuS-fWx-7dFfMy74.js +4 -0
  3. package/dist/Ed25519Signature2020-IJ4ybcbU--hEL5-Pa.js +52 -0
  4. package/dist/{HashlinkVerifier-40818bdd-tYZmELFg.js → HashlinkVerifier-wyKYZ83G-bzhltPG4.js} +1 -1
  5. package/dist/{MerkleProof2017-MZJbBTpc-NVfw6WgB.js → MerkleProof2017-MZJbBTpc-0GcGcIV-.js} +1 -1
  6. package/dist/{MerkleProof2017-ac8d147b-6wk-NtfB.js → MerkleProof2017-Ub6_JUVj-x8awkeml.js} +1 -1
  7. package/dist/MerkleProof2019-QUwyEIHd-iYt21yPG.js +3 -0
  8. package/dist/base64url-qi3FT6uz-yv4mTXpu.js +4 -0
  9. package/dist/checkRevocationStatusList2021-d1qO1xnj-DH6pO-9Q.js +13 -0
  10. package/dist/controlVerificationMethod-6GJtYmqY-Ivo3O8nb.js +1 -0
  11. package/dist/{did-key-common.esm-2e9ab4e3-X4avzjKx.js → did-key-common.esm-Fyh_U6fK-cOLlHenk.js} +3 -3
  12. package/dist/{did-key-ed25519.esm-54d2cbca-E7NBXv8_.js → did-key-ed25519.esm-1lIlZtof-Grj-JpU9.js} +1 -1
  13. package/dist/did-key-secp256k1.esm-hA8kGTM0-G8ct6CwH.js +1 -0
  14. package/dist/{downloadPDF-5Pw6AlBs.js → downloadPDF--IVgfc2I.js} +8 -8
  15. package/dist/{elliptic-a9d84078-BGmaMzNc.js → elliptic-il_lPAr--VPyWJbY1.js} +1 -1
  16. package/dist/{ensureNotRevoked-2dc26afb-U5ByLE-t.js → ensureNotRevoked-2QGGtBqy-t8Yk4QI-.js} +1 -1
  17. package/dist/ensureNotRevoked-gui-UMnE-kFmYZEJe.js +1 -0
  18. package/dist/{ensureValidIssuingKey-b950fb8b-oM__XftS.js → ensureValidIssuingKey-zZEv5-cH-UoJe_Wnf.js} +1 -1
  19. package/dist/index-CZOUZnn4-Lnb5-WZi.js +5 -0
  20. package/dist/{index-6d4132ca-BtAgIaHS.js → index-MC635rre-_DW5MUyk.js} +2 -2
  21. package/dist/{index-WX6J-tsk.js → index-UlvMASNZ.js} +1 -1
  22. package/dist/index-xsnp_Fid-o1HUYRUQ.js +1 -0
  23. package/dist/index.es-dEKcVerc.js +56 -0
  24. package/dist/{jsonld-6909fb49-vaWL2Y4h.js → jsonld-CXlzLf4P-ioHKtwiZ.js} +6 -6
  25. package/dist/{jsonld-signatures-8ecbbaa2-MztjIc1c.js → jsonld-signatures-ooFWZVS--ThP8ltUY.js} +7 -7
  26. package/dist/main.js +110 -110
  27. package/dist/{purify-xGHUwWlQ.js → purify-GC91XaSq.js} +1 -1
  28. package/dist/{sha256-71400caa-o9J6pXuo.js → sha256-wKeS8_4l-9eo2gOQb.js} +1 -1
  29. package/dist/tslib.es6-M1zqH4el-x9kNW1T_.js +1 -0
  30. package/dist/x25519-NtRELWAG-2RynHlmX.js +1 -0
  31. package/package.json +4 -4
  32. package/scripts/automated-update-blockcerts.org.sh +7 -1
  33. package/dist/EcdsaSecp256k1Signature2019-01e33e56-_kD7OEMM.js +0 -4
  34. package/dist/Ed25519Signature2020-722d8d24-52XGswpx.js +0 -74
  35. package/dist/MerkleProof2019-6596bc5f-AOhD0MU2.js +0 -3
  36. package/dist/checkRevocationStatusList2021-904b13ff-HXtw_2Lc.js +0 -17
  37. package/dist/controlVerificationMethod-80d0e7f0-8ug9g49U.js +0 -1
  38. package/dist/did-key-secp256k1.esm-8a01b23c-iRA0puBs.js +0 -1
  39. package/dist/ensureNotRevoked-gui-UMnE-9nObicUP.js +0 -1
  40. package/dist/index-0469d008-LwXIiw03.js +0 -1
  41. package/dist/index-85f56501-xkysxAxC.js +0 -4
  42. package/dist/index-F1HqK0qm.js +0 -1
  43. package/dist/index-a93e1e88-w6XCMY1g.js +0 -1
  44. package/dist/index.es-YP2tdnLj.js +0 -56
  45. package/dist/tslib.es6-28b6776b-qWIKDnpX.js +0 -1
  46. package/dist/x25519-08f432f1-4TKeGPT6.js +0 -1
  47. /package/dist/{Suite-e65d26ad-e2QgHGhx.js → Suite-Bhitn5l3-e2QgHGhx.js} +0 -0
  48. /package/dist/{_commonjs-dynamic-modules-1e49c0dd-fkA6S-_a.js → _commonjs-dynamic-modules-F7P8sER7-fkA6S-_a.js} +0 -0
  49. /package/dist/{pako.esm-7a9981ef-RAILONW0.js → pako.esm-jjCKMBM4-RAILONW0.js} +0 -0
@@ -1,17 +0,0 @@
1
- import{l as t,J as e,K as n,h as i}from"./main.js";import{g as r,u as o}from"./pako.esm-7a9981ef-RAILONW0.js";
2
- /*!
3
- * Copyright (c) 2020 Digital Bazaar, Inc. All rights reserved.
4
- */function s(t,e){if("number"!=typeof t)throw new TypeError(`"${e}" must be number.`)}function a(t,e){if(!(Number.isInteger(t)&&t>0))throw new TypeError(`"${e}" must be a positive integer.`)}function c(t,e){if("boolean"!=typeof t)throw new TypeError(`"${e}" must be a boolean.`)}function f(t,e){if(!(t instanceof Uint8Array))throw new TypeError(`"${e}" must be a Uint8Array.`)}
5
- /*!
6
- * Copyright (c) 2018-2022 Digital Bazaar, Inc. All rights reserved.
7
- */const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",d=[62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];
8
- /*!
9
- * Copyright (c) 2020-2023 Digital Bazaar, Inc. All rights reserved.
10
- */
11
- class h{constructor({length:t,buffer:e,leftToRightIndexing:n,littleEndianBits:i}={}){if(t&&e)throw new Error('Only one of "length" or "buffer" must be given.');if(void 0!==t?a(t,"length"):f(e,"buffer"),void 0!==i){if(void 0!==n)throw new Error('Using both "littleEndianBits" and "leftToRightIndexing" is not allowed.');c(i,"littleEndianBits"),n=i}void 0===n?n=!0:c(n,"leftToRightIndexing"),t?(this.bits=new Uint8Array(Math.ceil(t/8)),this.length=t):(this.bits=new Uint8Array(e.buffer),this.length=8*e.length),this.leftToRightIndexing=n}set(t,e){s(t,"position"),c(e,"on");const{length:n,leftToRightIndexing:i}=this,{index:r,bit:o}=l(t,n,i);e?this.bits[r]|=o:this.bits[r]&=255^o}get(t){s(t,"position");const{length:e,leftToRightIndexing:n}=this,{index:i,bit:r}=l(t,e,n);return!!(this.bits[i]&r)}async encodeBits(){return function(t){if(!(t instanceof Uint8Array||"string"==typeof t))throw new TypeError('"input" be a string or Uint8Array.');"string"==typeof t&&(t=(new TextEncoder).encode(t));let e,n,i,r="",o=0;for(;o<t.byteLength;)e=t[o++],n=t[o++],i=t[o++],r+=u.charAt(e>>2),r+=u.charAt((3&e)<<4|n>>4),isNaN(n)||(r+=u.charAt((15&n)<<2|i>>6),isNaN(i)||(r+=u.charAt(63&i)));return r}(r(this.bits))}static async decodeBits({encoded:t}){return function(t,e){if("string"!=typeof t)throw new TypeError(`"${e}" must be a string.`)}(t,"encoded"),o(function(t){let e=t.length;const n=e%4;if(1===n)throw new Error("Illegal base64 string.");let i=0;n>0&&(i=4-n,e+=i);const r=new Uint8Array(e/4*3-i);let o,s,a,c,f=0,u=0;for(;f<e;)o=d[t.charCodeAt(f++)-45],s=d[t.charCodeAt(f++)-45],r[u++]=o<<2|s>>4,f<t.length&&(a=d[t.charCodeAt(f++)-45],r[u++]=(15&s)<<4|a>>2,f<t.length&&(c=d[t.charCodeAt(f++)-45],r[u++]=(3&a)<<6|c));return r}(t))}async compressBits(){return r(this.bits)}static async uncompressBits({compressed:t}){return f(t,"compressed"),o(t)}}function l(t,e,n){if(function(t,e){if(!(Number.isInteger(t)&&t>=0))throw new TypeError(`"${e}" must be a non-negative integer.`)}(t,"position"),a(e,"length"),c(n,"leftToRightIndexing"),t>=e)throw new Error(`Position "${t}" is out of range "0-${e-1}".`);const i=t%8;return{index:Math.floor(t/8),bit:1<<(n?7-i:i)}}
12
- /*!
13
- * Copyright (c) 2020-2022 Digital Bazaar, Inc. All rights reserved.
14
- */class g{constructor({length:t,buffer:e}={}){this.bitstring=new h({length:t,buffer:e}),this.length=this.bitstring.length}setRevoked(t,e){if("boolean"!=typeof e)throw new TypeError('"revoked" must be a boolean.');return this.bitstring.set(t,e)}isRevoked(t){return this.bitstring.get(t)}async encode(){return this.bitstring.encodeBits()}static async decode({encodedList:t}){const e=await h.decodeBits({encoded:t});return new g({buffer:e})}}
15
- /*!
16
- * Copyright (c) 2020-2022 Digital Bazaar, Inc. All rights reserved.
17
- */async function w({encodedList:t}){return g.decode({encodedList:t})}async function b(i){const r=await n({url:i});if(r)try{return JSON.parse(r)}catch(n){throw console.error(n),new t(e.checkRevokedStatus,`No status list could be found at the specified URL for 'statusListCredential': ${i}`)}return r}async function y(t){if("Ed25519Signature2020"===t){const{default:t}=await import("./Ed25519Signature2020-722d8d24-52XGswpx.js");return t}if("EcdsaSecp256k1Signature2019"===t){const{default:t}=await import("./EcdsaSecp256k1Signature2019-01e33e56-_kD7OEMM.js");return t}}async function p(n){const r=await i.verifier.getIssuerProfile(n.issuer);let{proof:o}=n;Array.isArray(o)||(o=[o]);let s=[];for(const i of o){const o={issuer:r,document:n,proof:i,executeStep:async(t,e)=>{try{return await e()}catch(e){console.log("step",t,"failed with error:"),console.error(e),s.push(t)}}},a=new(await y(i.type))(o);await a.verifyProof();const c=s.length>0;if(s=[],c)throw new t(e.checkRevokedStatus,"The authenticity of the revocation list could not be verified.")}}async function m(n){Array.isArray(n)||(n=[n]);for(const i of n){const n=parseInt(i.statusListIndex,10),r=await b(i.statusListCredential);if(!r)throw new t(e.checkRevokedStatus,`No status list could be found at the specified URL for 'statusListCredential': ${i.statusListCredential}.`);await p(r);const{encodedList:o}=r.credentialSubject;if((await w({encodedList:o})).isRevoked(n)){const n="revocation"===i.statusPurpose?"revoked":"suspended";throw new t(e.checkRevokedStatus,`Certificate has been ${n}.`)}}}export{m as default};
@@ -1 +0,0 @@
1
- import{l as o,J as t,h as i}from"./main.js";import{b as r}from"./index-0469d008-LwXIiw03.js";function n(n,e=""){const s=function(o){return o.id}(n);if(s!==e.split("#")[0])throw new o(t.controlVerificationMethod,`${r} - ${i.i18n.getText("errors","controlVerificationMethod")}`)}export{n as default};