@blockcerts/blockcerts-verifier 1.67.0 → 1.68.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-CJsktwwK-COovFO-E.js} +8 -8
- package/dist/{EcdsaSecp256k1Signature2019-CRRIiHFR-CvD31J8J.js → EcdsaSecp256k1Signature2019-hg62McNW-DMCKToe3.js} +1 -1
- package/dist/{Ed25519Signature2020-DjL_FhDh-CA1Qf5Gf.js → Ed25519Signature2020-D3owGts_-BB1fBq0Z.js} +7 -7
- package/dist/{MerkleProof2017-DUjdbiQD-cvAJLFQa.js → MerkleProof2017-BrDGNMx2-Ct7-Dmh5.js} +1 -1
- package/dist/{MerkleProof2019-FYgdlZOm-D01-ewqk.js → MerkleProof2019-D70TTI_--BhNFm4-a.js} +2 -2
- package/dist/{checkCredentialSchemaConformity-BAaThQfx-B48ozDA8.js → checkCredentialSchemaConformity-D7h9tZ1Y-B0tA00kY.js} +1 -1
- package/dist/controlVerificationMethod-DPnoI09o-D_Ktjb-C.js +1 -0
- package/dist/{did-key-common.esm-DBOb9N8j-DNcrFCWj.js → did-key-common.esm-D_08iodm-FY3lD1HA.js} +3 -3
- package/dist/{did-key-ed25519.esm-Br9nZmXw-D_gjmUgP.js → did-key-ed25519.esm-Cah33z_9-CXstsY-H.js} +1 -1
- package/dist/{did-key-secp256k1.esm-777F8mD3-BaGBNoUc.js → did-key-secp256k1.esm-C27OwLgS-C9mjnb5S.js} +1 -1
- package/dist/{elliptic-BIvJGowH-BRLTdj5Y.js → elliptic-D7vAoLbk-DQmYEk-8.js} +1 -1
- package/dist/{index-DVormXBF-B-pGO0d3.js → index-Br-3L8ut-BI4gpx_q.js} +1 -1
- package/dist/index-Bxtpkwnp-BkEvuYc3.js +78 -0
- package/dist/{index-m_ndwqCF-CkZbwhan.js → index-PZL1xHXK-CH1Nkb1O.js} +7 -7
- package/dist/{jsonld-GvjJx4Wj-C61cS9xX.js → jsonld-D-rUqx_B-CQeQQNYP.js} +13 -10
- package/dist/main.js +113 -113
- package/dist/{retrieveVerificationMethodPublicKey-CqAYJ2Jj-0nfxll3J.js → retrieveVerificationMethodPublicKey-DMLSSemm-uQidviAv.js} +1 -1
- package/dist/{webcrypto.es-tAywRHzi-B87Lqr9a.js → webcrypto.es-CjDwtULr-D7dA51Yn.js} +1 -1
- package/package.json +2 -2
- package/dist/controlVerificationMethod-Dup4teK9-DYo4OJRU.js +0 -1
- package/dist/index-WJXe0QUW-DmXFAWKQ.js +0 -60
- /package/dist/{HashlinkVerifier-B5AIxwF--dg5WNZnc.js → HashlinkVerifier-BE8mYTIj-dg5WNZnc.js} +0 -0
- /package/dist/{checkRevocationStatusList2021-BhUc-vna-XCu3zkCJ.js → checkRevocationStatusList2021-CtVHNZ7k-XCu3zkCJ.js} +0 -0
- /package/dist/{ensureNotRevoked-DtC0S-17-DvMIgM4L.js → ensureNotRevoked-BEtBmERU-DvMIgM4L.js} +0 -0
- /package/dist/{ensureValidIssuingKey-CST0cCIj-wu9SdYxL.js → ensureValidIssuingKey-BrJmJb4L-wu9SdYxL.js} +0 -0
- /package/dist/{index-CPeLwMJp-C0eXpZGn.js → index-BeIcTgye-C0eXpZGn.js} +0 -0
- /package/dist/{index-D6zPgx9c-Dgus2xdV.js → index-CQB1Suna-Dgus2xdV.js} +0 -0
- /package/dist/{sha256-BmHSm4R7-C1PUWFZm.js → sha256-BIbQVOZh-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-C5Qlh_Lh-NSl6svWQ.js} +0 -0
|
@@ -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-CQB1Suna-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],a=t.verificationMethod.find((e=>e.id===`#${n}`||e.id===o));if(!a)throw new e("retrieveVerificationMethodPublicKey",`${r} - ${i.i18n.getText("errors","retrieveVerificationMethodPublicKey")}`);return a}export{t as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as e,c as t,H as r}from"./main.js";import{_ as n}from"./tslib.es6-
|
|
1
|
+
import{B as e,c as t,H 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.68.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.27.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 +0,0 @@
|
|
|
1
|
-
import{V as o,A as t,d as i}from"./main.js";import{b as r}from"./index-D6zPgx9c-Dgus2xdV.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};
|
|
@@ -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-BE8mYTIj-dg5WNZnc.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{ensureNotRevoked-DtC0S-17-DvMIgM4L.js → ensureNotRevoked-BEtBmERU-DvMIgM4L.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|