diff --git a/package-lock.json b/package-lock.json index 084899f0..dc4d6842 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cheqd/credential-service", - "version": "1.5.0-develop.1", + "version": "1.5.0-develop.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@cheqd/credential-service", - "version": "1.5.0-develop.1", + "version": "1.5.0-develop.2", "license": "Apache-2.0", "dependencies": { "@cheqd/did-provider-cheqd": "^3.0.4", @@ -2620,12 +2620,14 @@ "node_modules/@digitalbazaar/security-context": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@digitalbazaar/security-context/-/security-context-1.0.0.tgz", - "integrity": "sha512-mlj+UmodxTAdMCHGxnGVTRLHcSLyiEOVRiz3J6yiRliJWyrgeXs34wlWjBorDIEMDIjK2JwZrDuFEKO9bS5nKQ==" + "integrity": "sha512-mlj+UmodxTAdMCHGxnGVTRLHcSLyiEOVRiz3J6yiRliJWyrgeXs34wlWjBorDIEMDIjK2JwZrDuFEKO9bS5nKQ==", + "optional": true }, "node_modules/@digitalcredentials/base58-universal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/base58-universal/-/base58-universal-1.0.1.tgz", "integrity": "sha512-1xKdJnfITMvrF/sCgwBx2C4p7qcNAARyIvrAOZGqIHmBaT/hAenpC8bf44qVY+UIMuCYP23kqpIfJQebQDThDQ==", + "optional": true, "engines": { "node": ">=12" } @@ -2634,6 +2636,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-signature-2020/-/ed25519-signature-2020-3.0.2.tgz", "integrity": "sha512-R8IrR21Dh+75CYriQov3nVHKaOVusbxfk9gyi6eCAwLHKn6fllUt+2LQfuUrL7Ts/sGIJqQcev7YvkX9GvyYRA==", + "optional": true, "dependencies": { "@digitalcredentials/base58-universal": "^1.0.1", "@digitalcredentials/ed25519-verification-key-2020": "^3.1.1", @@ -2649,6 +2652,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-verification-key-2020/-/ed25519-verification-key-2020-3.2.2.tgz", "integrity": "sha512-ZfxNFZlA379MZpf+gV2tUYyiZ15eGVgjtCQLWlyu3frWxsumUgv++o0OJlMnrDsWGwzFMRrsXcosd5+752rLOA==", + "optional": true, "dependencies": { "@digitalcredentials/base58-universal": "^1.0.1", "@stablelib/ed25519": "^1.0.1", @@ -2663,6 +2667,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/crypto-ld/-/crypto-ld-6.0.0.tgz", "integrity": "sha512-XWL1LslqggNoaCI/m3I7HcvaSt9b2tYzdrXO+jHLUj9G1BvRfvV7ZTFDVY5nifYuIGAPdAGu7unPxLRustw3VA==", + "optional": true, "engines": { "node": ">=8.3.0" } @@ -2671,6 +2676,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-verification-key-2020/-/ed25519-verification-key-2020-4.0.0.tgz", "integrity": "sha512-GrfITgp1guFbExZckj2q6LOxxm08PFSScr0lBYtDRezJa6CTpA9XQ8yXSSXE3LvpEi5/2uOMFxxIfKAtL1J2ww==", + "optional": true, "dependencies": { "@digitalcredentials/keypair": "^1.0.5", "@noble/ed25519": "^1.7.1", @@ -2684,6 +2690,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/http-client/-/http-client-1.2.2.tgz", "integrity": "sha512-YOwaE+vUDSwiDhZT0BbXSWVg+bvp1HA1eg/gEc8OCwCOj9Bn9FRQdu8P9Y/fnYqyFCioDwwTRzGxgJLl50baEg==", + "optional": true, "dependencies": { "ky": "^0.25.1", "ky-universal": "^0.8.2" @@ -2696,6 +2703,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/jsonld/-/jsonld-5.2.1.tgz", "integrity": "sha512-pDiO1liw8xs+J/43qnMZsxyz0VOWOb7Q2yUlBt/tyjq6SlT9xPo+3716tJPbjGPnou2lQRw3H5/I++z+6oQ07w==", + "optional": true, "dependencies": { "@digitalcredentials/http-client": "^1.0.0", "@digitalcredentials/rdf-canonize": "^1.0.0", @@ -2710,6 +2718,7 @@ "version": "9.3.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-9.3.1.tgz", "integrity": "sha512-YMh1e1GpTeHDqq2a2Kd+pLcHsMiPeKyE2Zs17NSwqckij7UMRVDQ54S5VQhHvoXZ1mlkpVaI2xtj5M5N6rzylw==", + "optional": true, "dependencies": { "@digitalbazaar/security-context": "^1.0.0", "@digitalcredentials/jsonld": "^5.2.1", @@ -2725,6 +2734,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/@digitalcredentials/keypair/-/keypair-1.0.5.tgz", "integrity": "sha512-g0QvhJMTSFCoUkEvSeggwVTJa2jFkQXjf/mpTn9sePkz+5OouMEDfXUWL61juTaxK5JWPEFc0PKlolXzHaHHHQ==", + "optional": true, "engines": { "node": ">=16.0" } @@ -2733,6 +2743,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/rdf-canonize/-/rdf-canonize-1.0.0.tgz", "integrity": "sha512-z8St0Ex2doecsExCFK1uI4gJC+a5EqYYu1xpRH1pKmqSS9l/nxfuVxexNFyaeEum4dUdg1EetIC2rTwLIFhPRA==", + "optional": true, "dependencies": { "fast-text-encoding": "^1.0.3", "isomorphic-webcrypto": "^2.3.8" @@ -2745,6 +2756,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/vc/-/vc-5.0.0.tgz", "integrity": "sha512-87ARRxlAdIuUPArbMYJ8vUY7QqkIvJGFrBwfTH1PcB8Wz1E/M4q3oc/WLrDyJNg4o/irVVB5gkA9iIntTYSpoA==", + "optional": true, "dependencies": { "@digitalcredentials/jsonld": "^5.2.1", "@digitalcredentials/jsonld-signatures": "^9.3.1", @@ -4824,7 +4836,8 @@ "type": "individual", "url": "https://paulmillr.com/funding/" } - ] + ], + "optional": true }, "node_modules/@noble/hashes": { "version": "1.2.0", @@ -5074,6 +5087,7 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "optional": true, "dependencies": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", @@ -5084,6 +5098,7 @@ "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "optional": true, "dependencies": { "tslib": "^2.0.0" }, @@ -5095,6 +5110,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", + "optional": true, "dependencies": { "@peculiar/asn1-schema": "^2.3.0", "@peculiar/json-schema": "^1.1.12", @@ -6979,6 +6995,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aes/-/aes-1.0.1.tgz", "integrity": "sha512-bMiezJDeFONDHbMEa+Kic26962+bwkZfsHPAmcqTjLaHCAhEQuK3i1H0POPOkcHCdj75oVRIqFCraCA0cyHPvw==", + "optional": true, "dependencies": { "@stablelib/binary": "^1.0.1", "@stablelib/blockcipher": "^1.0.1", @@ -6989,6 +7006,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aes-kw/-/aes-kw-1.0.1.tgz", "integrity": "sha512-KrOkiRex1tQTbWk+hFB5fFw4vqKhNnTUtlCRf1bhUEOFp7hadWe49/sLa/P4X4FBQVoh3Z9Lj0zS1OWu/AHA1w==", + "optional": true, "dependencies": { "@stablelib/aes": "^1.0.1", "@stablelib/binary": "^1.0.1", @@ -7008,7 +7026,8 @@ "node_modules/@stablelib/blockcipher": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/blockcipher/-/blockcipher-1.0.1.tgz", - "integrity": "sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew==" + "integrity": "sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew==", + "optional": true }, "node_modules/@stablelib/bytes": { "version": "1.0.1", @@ -7194,7 +7213,8 @@ "node_modules/@transmute/credentials-context": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/credentials-context/-/credentials-context-0.7.0-unstable.80.tgz", - "integrity": "sha512-WhTrnSsIFcWGr3nAVUr1CBBzKKGWs8TJnXPAK+I3QzshennkMNbXpLNpU/sK3cum7eTRPyxFVbH37AxrHStQOw==" + "integrity": "sha512-WhTrnSsIFcWGr3nAVUr1CBBzKKGWs8TJnXPAK+I3QzshennkMNbXpLNpU/sK3cum7eTRPyxFVbH37AxrHStQOw==", + "optional": true }, "node_modules/@transmute/did-context": { "version": "0.6.1-unstable.37", @@ -7296,6 +7316,7 @@ "version": "0.7.0-unstable.2", "resolved": "https://registry.npmjs.org/@transmute/ed25519-key-pair/-/ed25519-key-pair-0.7.0-unstable.2.tgz", "integrity": "sha512-B0jg348Z8F0+lGWQic28xVxBZiXOJYbisWp6EfP4fQdMV3G4sES9YubpdiuoZHjesDZrf6xZ7cEB81mjGJMUkA==", + "optional": true, "dependencies": { "@stablelib/ed25519": "^1.0.1", "@transmute/ld-key-pair": "^0.7.0-unstable.2", @@ -7309,6 +7330,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/ed25519-signature-2018/-/ed25519-signature-2018-0.7.0-unstable.80.tgz", "integrity": "sha512-KYq36yzNyEHMOZmH4/1k1f35LAyX94dFpzn2jJv1m5ha0EENZdJF2zWWZyq3BDeE688yPXNnxnTmV6HfSgawyQ==", + "optional": true, "dependencies": { "@transmute/credentials-context": "^0.7.0-unstable.80", "@transmute/ed25519-key-pair": "0.7.0-unstable.2", @@ -7324,6 +7346,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.80.tgz", "integrity": "sha512-Bdb/+wd/SDaRpAlGmkDrXL6nsHdBO/7Zr+zNEYC7cQTtiTnKQsjAKbQa+AF470PEgNwJIbNK2YjWIwnsv5q69A==", + "optional": true, "dependencies": { "@peculiar/webcrypto": "^1.1.6", "@stablelib/aes-kw": "^1.0.0", @@ -7340,6 +7363,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/json-web-signature/-/json-web-signature-0.7.0-unstable.80.tgz", "integrity": "sha512-vlLgCkn/1onskP/VWa6t3JBtVrvo1yz6NRpJ5b4abwav0/t6E+AGS64mpYiC6ZMQV32ZGXSFHDs6FAoeCrX57A==", + "optional": true, "dependencies": { "@transmute/ed25519-key-pair": "^0.7.0-unstable.80", "@transmute/jose-ld": "^0.7.0-unstable.80", @@ -7356,6 +7380,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/ed25519-key-pair/-/ed25519-key-pair-0.7.0-unstable.80.tgz", "integrity": "sha512-Rl9mdLkUrn299hUEeVlcx4JYg5S0zdK8M4GhuLGpcQozkqPApbDuuotzyNIp4ok3tDwyM0v62H1gZRxWEYcvMg==", + "optional": true, "dependencies": { "@stablelib/ed25519": "^1.0.1", "@transmute/ld-key-pair": "^0.7.0-unstable.80", @@ -7369,6 +7394,7 @@ "version": "0.0.4", "resolved": "https://registry.npmjs.org/@transmute/jsonld/-/jsonld-0.0.4.tgz", "integrity": "sha512-6G++8imMYW9dtTvATPHNfrV3lLeX5E57DOmlgIDfO0A0yjkBCss1usB80NfONS26ynyveb8vTbp4nQDW9Ki4Rw==", + "optional": true, "dependencies": { "json-pointer": "^0.6.2", "jsonld": "5.2.0" @@ -7401,12 +7427,14 @@ "node_modules/@transmute/security-context": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/security-context/-/security-context-0.7.0-unstable.80.tgz", - "integrity": "sha512-8Q1Q37QP1HNdemVNAi35Uaww1trPm7ybl8+vam90+MyI5kV4nLhOZab378vNYShUMgAccUkFXHlZSsuqD7HlCw==" + "integrity": "sha512-8Q1Q37QP1HNdemVNAi35Uaww1trPm7ybl8+vam90+MyI5kV4nLhOZab378vNYShUMgAccUkFXHlZSsuqD7HlCw==", + "optional": true }, "node_modules/@transmute/web-crypto-key-pair": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/web-crypto-key-pair/-/web-crypto-key-pair-0.7.0-unstable.80.tgz", "integrity": "sha512-k7kV3DPZoIoLSItnU9qHOBebMhem2y6Qay8JSgS+QTsEf4sGMNl3Unm560I9aocvdlurMTwQmgCfwPJ8WFQYaQ==", + "optional": true, "dependencies": { "@peculiar/webcrypto": "^1.1.6", "@transmute/ld-key-pair": "^0.7.0-unstable.80", @@ -7432,6 +7460,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@trust/keyto/-/keyto-1.0.1.tgz", "integrity": "sha512-OXTmKkrnkwktCX86XA7eWs1TQ6u64enm0syzAfNhjigbuGLy5aLhbhRYWtjt4zzdG/irWudluheRZ9Ic9pCwsA==", + "optional": true, "dependencies": { "asn1.js": "^5.2.0", "base64url": "^3.0.1", @@ -7974,6 +8003,7 @@ "version": "0.0.8", "resolved": "git+ssh://git@github.com/uport-project/EcdsaSecp256k1RecoverySignature2020.git#ab0db52de6f4e6663ef271a48009ba26e688ef9b", "license": "Apache-2.0", + "optional": true, "dependencies": { "@bitauth/libauth": "^1.19.1", "@digitalcredentials/jsonld": "^5.2.1", @@ -8011,6 +8041,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/@veramo/credential-ld/-/credential-ld-5.1.2.tgz", "integrity": "sha512-cq+UcFIEIAUIT0aQbDWBkbGdg5+utyGgYhmekBTRsbXUuDO0TC25HNK4ceYuL+FRPaYHl24vPUuKd609if2L7w==", + "optional": true, "dependencies": { "@digitalcredentials/ed25519-signature-2020": "^3.0.2", "@digitalcredentials/ed25519-verification-key-2020": "^4.0.0", @@ -8699,12 +8730,14 @@ "node_modules/asmcrypto.js": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz", - "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==" + "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==", + "optional": true }, "node_modules/asn1.js": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "optional": true, "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -8715,12 +8748,14 @@ "node_modules/asn1.js/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "optional": true }, "node_modules/asn1js": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "optional": true, "dependencies": { "pvtsutils": "^1.3.2", "pvutils": "^1.1.3", @@ -8830,6 +8865,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/b64-lite/-/b64-lite-1.4.0.tgz", "integrity": "sha512-aHe97M7DXt+dkpa8fHlCcm1CnskAHrJqEfMI0KN7dwqlzml/aUe1AGt6lk51HzrSfVD67xOso84sOpr+0wIe2w==", + "optional": true, "dependencies": { "base-64": "^0.1.0" } @@ -8838,6 +8874,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/b64u-lite/-/b64u-lite-1.1.0.tgz", "integrity": "sha512-929qWGDVCRph7gQVTC6koHqQIpF4vtVaSbwLltFQo44B1bYUquALswZdBKFfrJCPEnsCOvWkJsPdQYZ/Ukhw8A==", + "optional": true, "dependencies": { "b64-lite": "^1.4.0" } @@ -9114,12 +9151,14 @@ "node_modules/base-64": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", - "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==" + "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==", + "optional": true }, "node_modules/base-x": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", + "optional": true }, "node_modules/base/node_modules/define-property": { "version": "1.0.0", @@ -9157,6 +9196,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "optional": true, "engines": { "node": ">=6.0.0" } @@ -9165,6 +9205,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/base64url-universal/-/base64url-universal-1.1.0.tgz", "integrity": "sha512-WyftvZqye29YQ10ZnuiBeEj0lk8SN8xHU9hOznkLc85wS1cLTp6RpzlMrHxMPD9nH7S55gsBqMqgGyz93rqmkA==", + "optional": true, "dependencies": { "base64url": "^3.0.0" }, @@ -9200,6 +9241,7 @@ "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "optional": true, "engines": { "node": ">=0.6" } @@ -10406,7 +10448,8 @@ "node_modules/credentials-context": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/credentials-context/-/credentials-context-2.0.0.tgz", - "integrity": "sha512-/mFKax6FK26KjgV2KW2D4YqKgoJ5DVJpNt87X2Jc9IxT2HBMy7nEIlc+n7pEi+YFFe721XqrvZPd+jbyyBjsvQ==" + "integrity": "sha512-/mFKax6FK26KjgV2KW2D4YqKgoJ5DVJpNt87X2Jc9IxT2HBMy7nEIlc+n7pEi+YFFe721XqrvZPd+jbyyBjsvQ==", + "optional": true }, "node_modules/cross-fetch": { "version": "3.1.5", @@ -10444,6 +10487,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/crypto-ld/-/crypto-ld-7.0.0.tgz", "integrity": "sha512-RrXy6aB0TOhSiqsgavTQt1G8mKomKIaNLb2JZxj7A/Vi0EwmXguuBQoeiAvePfK6bDR3uQbqYnaLLs4irTWwgw==", + "optional": true, "engines": { "node": ">=14" } @@ -10995,12 +11039,14 @@ "node_modules/ed25519-signature-2018-context": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ed25519-signature-2018-context/-/ed25519-signature-2018-context-1.1.0.tgz", - "integrity": "sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA==" + "integrity": "sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA==", + "optional": true }, "node_modules/ed25519-signature-2020-context": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ed25519-signature-2020-context/-/ed25519-signature-2020-context-1.1.0.tgz", - "integrity": "sha512-dBGSmoUIK6h2vadDctrDnhhTO01PR2hJk0mRNEfrRDPCjaIwrfy4J+eziEQ9Q1m8By4f/CSRgKM1h53ydKfdNg==" + "integrity": "sha512-dBGSmoUIK6h2vadDctrDnhhTO01PR2hJk0mRNEfrRDPCjaIwrfy4J+eziEQ9Q1m8By4f/CSRgKM1h53ydKfdNg==", + "optional": true }, "node_modules/ee-first": { "version": "1.1.1", @@ -12380,7 +12426,8 @@ "node_modules/fast-text-encoding": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", - "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "optional": true }, "node_modules/fast-xml-parser": { "version": "4.1.3", @@ -12863,7 +12910,8 @@ "node_modules/foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", - "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==" + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "optional": true }, "node_modules/form-data": { "version": "3.0.1", @@ -14456,6 +14504,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/isomorphic-webcrypto/-/isomorphic-webcrypto-2.3.8.tgz", "integrity": "sha512-XddQSI0WYlSCjxtm1AI8kWQOulf7hAN3k3DclF1sxDJZqOe0pcsOt675zvWW91cZH9hYs3nlA3Ev8QK5i80SxQ==", + "optional": true, "dependencies": { "@peculiar/webcrypto": "^1.0.22", "asmcrypto.js": "^0.22.0", @@ -15206,6 +15255,7 @@ "version": "4.13.1", "resolved": "https://registry.npmjs.org/jose/-/jose-4.13.1.tgz", "integrity": "sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ==", + "optional": true, "funding": { "url": "https://github.com/sponsors/panva" } @@ -15473,6 +15523,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "optional": true, "dependencies": { "foreach": "^2.0.4" } @@ -15525,6 +15576,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.8.tgz", "integrity": "sha512-rkJID3qeigo3VCrEcxX1333fTBBxW89YrdYcZexMnL/WdB8u0zctyG63e/DpahRJyrWCDhh7IQhiR7u2XEDQ4Q==", + "optional": true, "engines": { "node": ">= 4" } @@ -17402,7 +17454,8 @@ "node_modules/msrcrypto": { "version": "1.5.8", "resolved": "https://registry.npmjs.org/msrcrypto/-/msrcrypto-1.5.8.tgz", - "integrity": "sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q==" + "integrity": "sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q==", + "optional": true }, "node_modules/multibase": { "version": "4.0.6", @@ -21584,6 +21637,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "optional": true, "dependencies": { "tslib": "^2.4.0" } @@ -21592,6 +21646,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "optional": true, "engines": { "node": ">=6.0.0" } @@ -22861,6 +22916,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "optional": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -23730,7 +23786,8 @@ "node_modules/str2buf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/str2buf/-/str2buf-1.3.0.tgz", - "integrity": "sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA==" + "integrity": "sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA==", + "optional": true }, "node_modules/stream-buffers": { "version": "2.2.0", @@ -24541,7 +24598,8 @@ "node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "optional": true }, "node_modules/tsutils": { "version": "3.21.0", @@ -24589,6 +24647,7 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "devOptional": true, "engines": { "node": ">=10" }, @@ -25106,6 +25165,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "optional": true, "engines": { "node": ">= 8" } @@ -25114,6 +25174,7 @@ "version": "1.7.6", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.6.tgz", "integrity": "sha512-TBPiewB4Buw+HI3EQW+Bexm19/W4cP/qZG/02QJCXN+iN+T5sl074vZ3rJcle/ZtDBQSgjkbsQO/1eFcxnSBUA==", + "optional": true, "dependencies": { "@peculiar/asn1-schema": "^2.1.6", "@peculiar/json-schema": "^1.1.12", @@ -25125,7 +25186,8 @@ "node_modules/webcrypto-shim": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/webcrypto-shim/-/webcrypto-shim-0.1.7.tgz", - "integrity": "sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg==" + "integrity": "sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg==", + "optional": true }, "node_modules/webidl-conversions": { "version": "3.0.1", @@ -27416,17 +27478,20 @@ "@digitalbazaar/security-context": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@digitalbazaar/security-context/-/security-context-1.0.0.tgz", - "integrity": "sha512-mlj+UmodxTAdMCHGxnGVTRLHcSLyiEOVRiz3J6yiRliJWyrgeXs34wlWjBorDIEMDIjK2JwZrDuFEKO9bS5nKQ==" + "integrity": "sha512-mlj+UmodxTAdMCHGxnGVTRLHcSLyiEOVRiz3J6yiRliJWyrgeXs34wlWjBorDIEMDIjK2JwZrDuFEKO9bS5nKQ==", + "optional": true }, "@digitalcredentials/base58-universal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/base58-universal/-/base58-universal-1.0.1.tgz", - "integrity": "sha512-1xKdJnfITMvrF/sCgwBx2C4p7qcNAARyIvrAOZGqIHmBaT/hAenpC8bf44qVY+UIMuCYP23kqpIfJQebQDThDQ==" + "integrity": "sha512-1xKdJnfITMvrF/sCgwBx2C4p7qcNAARyIvrAOZGqIHmBaT/hAenpC8bf44qVY+UIMuCYP23kqpIfJQebQDThDQ==", + "optional": true }, "@digitalcredentials/ed25519-signature-2020": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-signature-2020/-/ed25519-signature-2020-3.0.2.tgz", "integrity": "sha512-R8IrR21Dh+75CYriQov3nVHKaOVusbxfk9gyi6eCAwLHKn6fllUt+2LQfuUrL7Ts/sGIJqQcev7YvkX9GvyYRA==", + "optional": true, "requires": { "@digitalcredentials/base58-universal": "^1.0.1", "@digitalcredentials/ed25519-verification-key-2020": "^3.1.1", @@ -27439,6 +27504,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-verification-key-2020/-/ed25519-verification-key-2020-3.2.2.tgz", "integrity": "sha512-ZfxNFZlA379MZpf+gV2tUYyiZ15eGVgjtCQLWlyu3frWxsumUgv++o0OJlMnrDsWGwzFMRrsXcosd5+752rLOA==", + "optional": true, "requires": { "@digitalcredentials/base58-universal": "^1.0.1", "@stablelib/ed25519": "^1.0.1", @@ -27449,7 +27515,8 @@ "crypto-ld": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/crypto-ld/-/crypto-ld-6.0.0.tgz", - "integrity": "sha512-XWL1LslqggNoaCI/m3I7HcvaSt9b2tYzdrXO+jHLUj9G1BvRfvV7ZTFDVY5nifYuIGAPdAGu7unPxLRustw3VA==" + "integrity": "sha512-XWL1LslqggNoaCI/m3I7HcvaSt9b2tYzdrXO+jHLUj9G1BvRfvV7ZTFDVY5nifYuIGAPdAGu7unPxLRustw3VA==", + "optional": true } } }, @@ -27457,6 +27524,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/ed25519-verification-key-2020/-/ed25519-verification-key-2020-4.0.0.tgz", "integrity": "sha512-GrfITgp1guFbExZckj2q6LOxxm08PFSScr0lBYtDRezJa6CTpA9XQ8yXSSXE3LvpEi5/2uOMFxxIfKAtL1J2ww==", + "optional": true, "requires": { "@digitalcredentials/keypair": "^1.0.5", "@noble/ed25519": "^1.7.1", @@ -27467,6 +27535,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@digitalcredentials/http-client/-/http-client-1.2.2.tgz", "integrity": "sha512-YOwaE+vUDSwiDhZT0BbXSWVg+bvp1HA1eg/gEc8OCwCOj9Bn9FRQdu8P9Y/fnYqyFCioDwwTRzGxgJLl50baEg==", + "optional": true, "requires": { "ky": "^0.25.1", "ky-universal": "^0.8.2" @@ -27476,6 +27545,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/jsonld/-/jsonld-5.2.1.tgz", "integrity": "sha512-pDiO1liw8xs+J/43qnMZsxyz0VOWOb7Q2yUlBt/tyjq6SlT9xPo+3716tJPbjGPnou2lQRw3H5/I++z+6oQ07w==", + "optional": true, "requires": { "@digitalcredentials/http-client": "^1.0.0", "@digitalcredentials/rdf-canonize": "^1.0.0", @@ -27487,6 +27557,7 @@ "version": "9.3.1", "resolved": "https://registry.npmjs.org/@digitalcredentials/jsonld-signatures/-/jsonld-signatures-9.3.1.tgz", "integrity": "sha512-YMh1e1GpTeHDqq2a2Kd+pLcHsMiPeKyE2Zs17NSwqckij7UMRVDQ54S5VQhHvoXZ1mlkpVaI2xtj5M5N6rzylw==", + "optional": true, "requires": { "@digitalbazaar/security-context": "^1.0.0", "@digitalcredentials/jsonld": "^5.2.1", @@ -27498,12 +27569,14 @@ "@digitalcredentials/keypair": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@digitalcredentials/keypair/-/keypair-1.0.5.tgz", - "integrity": "sha512-g0QvhJMTSFCoUkEvSeggwVTJa2jFkQXjf/mpTn9sePkz+5OouMEDfXUWL61juTaxK5JWPEFc0PKlolXzHaHHHQ==" + "integrity": "sha512-g0QvhJMTSFCoUkEvSeggwVTJa2jFkQXjf/mpTn9sePkz+5OouMEDfXUWL61juTaxK5JWPEFc0PKlolXzHaHHHQ==", + "optional": true }, "@digitalcredentials/rdf-canonize": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/rdf-canonize/-/rdf-canonize-1.0.0.tgz", "integrity": "sha512-z8St0Ex2doecsExCFK1uI4gJC+a5EqYYu1xpRH1pKmqSS9l/nxfuVxexNFyaeEum4dUdg1EetIC2rTwLIFhPRA==", + "optional": true, "requires": { "fast-text-encoding": "^1.0.3", "isomorphic-webcrypto": "^2.3.8" @@ -27513,6 +27586,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@digitalcredentials/vc/-/vc-5.0.0.tgz", "integrity": "sha512-87ARRxlAdIuUPArbMYJ8vUY7QqkIvJGFrBwfTH1PcB8Wz1E/M4q3oc/WLrDyJNg4o/irVVB5gkA9iIntTYSpoA==", + "optional": true, "requires": { "@digitalcredentials/jsonld": "^5.2.1", "@digitalcredentials/jsonld-signatures": "^9.3.1", @@ -29067,7 +29141,8 @@ "@noble/ed25519": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz", - "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==" + "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==", + "optional": true }, "@noble/hashes": { "version": "1.2.0", @@ -29259,6 +29334,7 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz", "integrity": "sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==", + "optional": true, "requires": { "asn1js": "^3.0.5", "pvtsutils": "^1.3.2", @@ -29269,6 +29345,7 @@ "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==", + "optional": true, "requires": { "tslib": "^2.0.0" } @@ -29277,6 +29354,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz", "integrity": "sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==", + "optional": true, "requires": { "@peculiar/asn1-schema": "^2.3.0", "@peculiar/json-schema": "^1.1.12", @@ -30803,6 +30881,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aes/-/aes-1.0.1.tgz", "integrity": "sha512-bMiezJDeFONDHbMEa+Kic26962+bwkZfsHPAmcqTjLaHCAhEQuK3i1H0POPOkcHCdj75oVRIqFCraCA0cyHPvw==", + "optional": true, "requires": { "@stablelib/binary": "^1.0.1", "@stablelib/blockcipher": "^1.0.1", @@ -30813,6 +30892,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/aes-kw/-/aes-kw-1.0.1.tgz", "integrity": "sha512-KrOkiRex1tQTbWk+hFB5fFw4vqKhNnTUtlCRf1bhUEOFp7hadWe49/sLa/P4X4FBQVoh3Z9Lj0zS1OWu/AHA1w==", + "optional": true, "requires": { "@stablelib/aes": "^1.0.1", "@stablelib/binary": "^1.0.1", @@ -30832,7 +30912,8 @@ "@stablelib/blockcipher": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@stablelib/blockcipher/-/blockcipher-1.0.1.tgz", - "integrity": "sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew==" + "integrity": "sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew==", + "optional": true }, "@stablelib/bytes": { "version": "1.0.1", @@ -31015,7 +31096,8 @@ "@transmute/credentials-context": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/credentials-context/-/credentials-context-0.7.0-unstable.80.tgz", - "integrity": "sha512-WhTrnSsIFcWGr3nAVUr1CBBzKKGWs8TJnXPAK+I3QzshennkMNbXpLNpU/sK3cum7eTRPyxFVbH37AxrHStQOw==" + "integrity": "sha512-WhTrnSsIFcWGr3nAVUr1CBBzKKGWs8TJnXPAK+I3QzshennkMNbXpLNpU/sK3cum7eTRPyxFVbH37AxrHStQOw==", + "optional": true }, "@transmute/did-context": { "version": "0.6.1-unstable.37", @@ -31103,6 +31185,7 @@ "version": "0.7.0-unstable.2", "resolved": "https://registry.npmjs.org/@transmute/ed25519-key-pair/-/ed25519-key-pair-0.7.0-unstable.2.tgz", "integrity": "sha512-B0jg348Z8F0+lGWQic28xVxBZiXOJYbisWp6EfP4fQdMV3G4sES9YubpdiuoZHjesDZrf6xZ7cEB81mjGJMUkA==", + "optional": true, "requires": { "@stablelib/ed25519": "^1.0.1", "@transmute/ld-key-pair": "^0.7.0-unstable.2", @@ -31113,6 +31196,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/ed25519-signature-2018/-/ed25519-signature-2018-0.7.0-unstable.80.tgz", "integrity": "sha512-KYq36yzNyEHMOZmH4/1k1f35LAyX94dFpzn2jJv1m5ha0EENZdJF2zWWZyq3BDeE688yPXNnxnTmV6HfSgawyQ==", + "optional": true, "requires": { "@transmute/credentials-context": "^0.7.0-unstable.80", "@transmute/ed25519-key-pair": "0.7.0-unstable.2", @@ -31125,6 +31209,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.80.tgz", "integrity": "sha512-Bdb/+wd/SDaRpAlGmkDrXL6nsHdBO/7Zr+zNEYC7cQTtiTnKQsjAKbQa+AF470PEgNwJIbNK2YjWIwnsv5q69A==", + "optional": true, "requires": { "@peculiar/webcrypto": "^1.1.6", "@stablelib/aes-kw": "^1.0.0", @@ -31138,6 +31223,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/json-web-signature/-/json-web-signature-0.7.0-unstable.80.tgz", "integrity": "sha512-vlLgCkn/1onskP/VWa6t3JBtVrvo1yz6NRpJ5b4abwav0/t6E+AGS64mpYiC6ZMQV32ZGXSFHDs6FAoeCrX57A==", + "optional": true, "requires": { "@transmute/ed25519-key-pair": "^0.7.0-unstable.80", "@transmute/jose-ld": "^0.7.0-unstable.80", @@ -31151,6 +31237,7 @@ "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/ed25519-key-pair/-/ed25519-key-pair-0.7.0-unstable.80.tgz", "integrity": "sha512-Rl9mdLkUrn299hUEeVlcx4JYg5S0zdK8M4GhuLGpcQozkqPApbDuuotzyNIp4ok3tDwyM0v62H1gZRxWEYcvMg==", + "optional": true, "requires": { "@stablelib/ed25519": "^1.0.1", "@transmute/ld-key-pair": "^0.7.0-unstable.80", @@ -31163,6 +31250,7 @@ "version": "0.0.4", "resolved": "https://registry.npmjs.org/@transmute/jsonld/-/jsonld-0.0.4.tgz", "integrity": "sha512-6G++8imMYW9dtTvATPHNfrV3lLeX5E57DOmlgIDfO0A0yjkBCss1usB80NfONS26ynyveb8vTbp4nQDW9Ki4Rw==", + "optional": true, "requires": { "json-pointer": "^0.6.2", "jsonld": "5.2.0" @@ -31186,12 +31274,14 @@ "@transmute/security-context": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/security-context/-/security-context-0.7.0-unstable.80.tgz", - "integrity": "sha512-8Q1Q37QP1HNdemVNAi35Uaww1trPm7ybl8+vam90+MyI5kV4nLhOZab378vNYShUMgAccUkFXHlZSsuqD7HlCw==" + "integrity": "sha512-8Q1Q37QP1HNdemVNAi35Uaww1trPm7ybl8+vam90+MyI5kV4nLhOZab378vNYShUMgAccUkFXHlZSsuqD7HlCw==", + "optional": true }, "@transmute/web-crypto-key-pair": { "version": "0.7.0-unstable.80", "resolved": "https://registry.npmjs.org/@transmute/web-crypto-key-pair/-/web-crypto-key-pair-0.7.0-unstable.80.tgz", "integrity": "sha512-k7kV3DPZoIoLSItnU9qHOBebMhem2y6Qay8JSgS+QTsEf4sGMNl3Unm560I9aocvdlurMTwQmgCfwPJ8WFQYaQ==", + "optional": true, "requires": { "@peculiar/webcrypto": "^1.1.6", "@transmute/ld-key-pair": "^0.7.0-unstable.80", @@ -31211,6 +31301,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@trust/keyto/-/keyto-1.0.1.tgz", "integrity": "sha512-OXTmKkrnkwktCX86XA7eWs1TQ6u64enm0syzAfNhjigbuGLy5aLhbhRYWtjt4zzdG/irWudluheRZ9Ic9pCwsA==", + "optional": true, "requires": { "asn1.js": "^5.2.0", "base64url": "^3.0.1", @@ -31654,6 +31745,7 @@ "@veramo-community/lds-ecdsa-secp256k1-recovery2020": { "version": "git+ssh://git@github.com/uport-project/EcdsaSecp256k1RecoverySignature2020.git#ab0db52de6f4e6663ef271a48009ba26e688ef9b", "from": "@veramo-community/lds-ecdsa-secp256k1-recovery2020@github:uport-project/EcdsaSecp256k1RecoverySignature2020", + "optional": true, "requires": { "@bitauth/libauth": "^1.19.1", "@digitalcredentials/jsonld": "^5.2.1", @@ -31691,6 +31783,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/@veramo/credential-ld/-/credential-ld-5.1.2.tgz", "integrity": "sha512-cq+UcFIEIAUIT0aQbDWBkbGdg5+utyGgYhmekBTRsbXUuDO0TC25HNK4ceYuL+FRPaYHl24vPUuKd609if2L7w==", + "optional": true, "requires": { "@digitalcredentials/ed25519-signature-2020": "^3.0.2", "@digitalcredentials/ed25519-verification-key-2020": "^4.0.0", @@ -32302,12 +32395,14 @@ "asmcrypto.js": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz", - "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==" + "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==", + "optional": true }, "asn1.js": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "optional": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -32318,7 +32413,8 @@ "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "optional": true } } }, @@ -32326,6 +32422,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "optional": true, "requires": { "pvtsutils": "^1.3.2", "pvutils": "^1.1.3", @@ -32408,6 +32505,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/b64-lite/-/b64-lite-1.4.0.tgz", "integrity": "sha512-aHe97M7DXt+dkpa8fHlCcm1CnskAHrJqEfMI0KN7dwqlzml/aUe1AGt6lk51HzrSfVD67xOso84sOpr+0wIe2w==", + "optional": true, "requires": { "base-64": "^0.1.0" } @@ -32416,6 +32514,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/b64u-lite/-/b64u-lite-1.1.0.tgz", "integrity": "sha512-929qWGDVCRph7gQVTC6koHqQIpF4vtVaSbwLltFQo44B1bYUquALswZdBKFfrJCPEnsCOvWkJsPdQYZ/Ukhw8A==", + "optional": true, "requires": { "b64-lite": "^1.4.0" } @@ -32662,12 +32761,14 @@ "base-64": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", - "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==" + "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==", + "optional": true }, "base-x": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", + "optional": true }, "base64-js": { "version": "1.5.1", @@ -32677,12 +32778,14 @@ "base64url": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "optional": true }, "base64url-universal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/base64url-universal/-/base64url-universal-1.1.0.tgz", "integrity": "sha512-WyftvZqye29YQ10ZnuiBeEj0lk8SN8xHU9hOznkLc85wS1cLTp6RpzlMrHxMPD9nH7S55gsBqMqgGyz93rqmkA==", + "optional": true, "requires": { "base64url": "^3.0.0" } @@ -32711,7 +32814,8 @@ "big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==" + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "optional": true }, "blakejs": { "version": "1.2.1", @@ -33685,7 +33789,8 @@ "credentials-context": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/credentials-context/-/credentials-context-2.0.0.tgz", - "integrity": "sha512-/mFKax6FK26KjgV2KW2D4YqKgoJ5DVJpNt87X2Jc9IxT2HBMy7nEIlc+n7pEi+YFFe721XqrvZPd+jbyyBjsvQ==" + "integrity": "sha512-/mFKax6FK26KjgV2KW2D4YqKgoJ5DVJpNt87X2Jc9IxT2HBMy7nEIlc+n7pEi+YFFe721XqrvZPd+jbyyBjsvQ==", + "optional": true }, "cross-fetch": { "version": "3.1.5", @@ -33716,7 +33821,8 @@ "crypto-ld": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/crypto-ld/-/crypto-ld-7.0.0.tgz", - "integrity": "sha512-RrXy6aB0TOhSiqsgavTQt1G8mKomKIaNLb2JZxj7A/Vi0EwmXguuBQoeiAvePfK6bDR3uQbqYnaLLs4irTWwgw==" + "integrity": "sha512-RrXy6aB0TOhSiqsgavTQt1G8mKomKIaNLb2JZxj7A/Vi0EwmXguuBQoeiAvePfK6bDR3uQbqYnaLLs4irTWwgw==", + "optional": true }, "crypto-random-string": { "version": "2.0.0", @@ -34152,12 +34258,14 @@ "ed25519-signature-2018-context": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ed25519-signature-2018-context/-/ed25519-signature-2018-context-1.1.0.tgz", - "integrity": "sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA==" + "integrity": "sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA==", + "optional": true }, "ed25519-signature-2020-context": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ed25519-signature-2020-context/-/ed25519-signature-2020-context-1.1.0.tgz", - "integrity": "sha512-dBGSmoUIK6h2vadDctrDnhhTO01PR2hJk0mRNEfrRDPCjaIwrfy4J+eziEQ9Q1m8By4f/CSRgKM1h53ydKfdNg==" + "integrity": "sha512-dBGSmoUIK6h2vadDctrDnhhTO01PR2hJk0mRNEfrRDPCjaIwrfy4J+eziEQ9Q1m8By4f/CSRgKM1h53ydKfdNg==", + "optional": true }, "ee-first": { "version": "1.1.1", @@ -35271,7 +35379,8 @@ "fast-text-encoding": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", - "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "optional": true }, "fast-xml-parser": { "version": "4.1.3", @@ -35643,7 +35752,8 @@ "foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", - "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==" + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "optional": true }, "form-data": { "version": "3.0.1", @@ -36807,6 +36917,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/isomorphic-webcrypto/-/isomorphic-webcrypto-2.3.8.tgz", "integrity": "sha512-XddQSI0WYlSCjxtm1AI8kWQOulf7hAN3k3DclF1sxDJZqOe0pcsOt675zvWW91cZH9hYs3nlA3Ev8QK5i80SxQ==", + "optional": true, "requires": { "@peculiar/webcrypto": "^1.0.22", "@unimodules/core": "*", @@ -37399,7 +37510,8 @@ "jose": { "version": "4.13.1", "resolved": "https://registry.npmjs.org/jose/-/jose-4.13.1.tgz", - "integrity": "sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ==" + "integrity": "sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ==", + "optional": true }, "js-sdsl": { "version": "4.1.5", @@ -37624,6 +37736,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "optional": true, "requires": { "foreach": "^2.0.4" } @@ -37674,7 +37787,8 @@ "json-stringify-deterministic": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.8.tgz", - "integrity": "sha512-rkJID3qeigo3VCrEcxX1333fTBBxW89YrdYcZexMnL/WdB8u0zctyG63e/DpahRJyrWCDhh7IQhiR7u2XEDQ4Q==" + "integrity": "sha512-rkJID3qeigo3VCrEcxX1333fTBBxW89YrdYcZexMnL/WdB8u0zctyG63e/DpahRJyrWCDhh7IQhiR7u2XEDQ4Q==", + "optional": true }, "json-stringify-safe": { "version": "5.0.1", @@ -39230,7 +39344,8 @@ "msrcrypto": { "version": "1.5.8", "resolved": "https://registry.npmjs.org/msrcrypto/-/msrcrypto-1.5.8.tgz", - "integrity": "sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q==" + "integrity": "sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q==", + "optional": true }, "multibase": { "version": "4.0.6", @@ -42256,6 +42371,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.2.tgz", "integrity": "sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==", + "optional": true, "requires": { "tslib": "^2.4.0" } @@ -42263,7 +42379,8 @@ "pvutils": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "optional": true }, "q": { "version": "1.5.1", @@ -43257,6 +43374,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "optional": true, "requires": { "type-fest": "^0.20.2" } @@ -43984,7 +44102,8 @@ "str2buf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/str2buf/-/str2buf-1.3.0.tgz", - "integrity": "sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA==" + "integrity": "sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA==", + "optional": true }, "stream-buffers": { "version": "2.2.0", @@ -44588,7 +44707,8 @@ "tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "optional": true }, "tsutils": { "version": "3.21.0", @@ -44625,7 +44745,8 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "devOptional": true }, "type-is": { "version": "1.6.18", @@ -45026,12 +45147,14 @@ "web-streams-polyfill": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "optional": true }, "webcrypto-core": { "version": "1.7.6", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.6.tgz", "integrity": "sha512-TBPiewB4Buw+HI3EQW+Bexm19/W4cP/qZG/02QJCXN+iN+T5sl074vZ3rJcle/ZtDBQSgjkbsQO/1eFcxnSBUA==", + "optional": true, "requires": { "@peculiar/asn1-schema": "^2.1.6", "@peculiar/json-schema": "^1.1.12", @@ -45043,7 +45166,8 @@ "webcrypto-shim": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/webcrypto-shim/-/webcrypto-shim-0.1.7.tgz", - "integrity": "sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg==" + "integrity": "sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg==", + "optional": true }, "webidl-conversions": { "version": "3.0.1", diff --git a/src/app.ts b/src/app.ts index e6bb1110..2bff2283 100644 --- a/src/app.ts +++ b/src/app.ts @@ -40,8 +40,8 @@ class App { app.get('/', (req, res) => res.json({ ping: 'pong' })) // credentials - app.post(`${URL_CREDENTIAL_PREFIX}/issue`, new CredentialController().issue) - app.post(`${URL_CREDENTIAL_PREFIX}/verify`,new CredentialController().verify) + app.post(`${URL_CREDENTIAL_PREFIX}/issue`, CredentialController.issueValidator, new CredentialController().issue) + app.post(`${URL_CREDENTIAL_PREFIX}/verify`, CredentialController.verifyValidator, new CredentialController().verify) // store app.post(`${URL_STORE_PREFIX}/`, new StoreController().set) diff --git a/src/controllers/credentials.ts b/src/controllers/credentials.ts index 822bc00c..90cc40e6 100644 --- a/src/controllers/credentials.ts +++ b/src/controllers/credentials.ts @@ -1,13 +1,26 @@ import type { Request, Response } from 'express' - -import { CredentialRequest, W3CVerifiableCredential } from '../types/types' import { GuardedCredentials } from '../middleware/guard' import { applyMixins } from '../middleware/_' import { Credentials } from '../services/credentials' +import { check, param, validationResult } from 'express-validator' export class CredentialController { + public static issueValidator = [ + check('subjectId').exists().withMessage('subjectId is required').isString().withMessage('subjectId should be a string'), + param('type').optional().isString().withMessage('type should be a string') + ] + + public static verifyValidator = [ + check('credential').exists().withMessage('W3c verifiable credential was not provided') + ] + public async issue(request: Request, response: Response) { + const result = validationResult(request); + if (!result.isEmpty()) { + return response.status(400).json(result.array()[0].msg) + } + switch (request.params.type) { case 'Ticket': const body = request.body @@ -33,11 +46,14 @@ export class CredentialController { if (request?.headers && (!request.headers['content-type'] || request.headers['content-type'] != 'application/json')) { return response.status(405).json({ error: 'Unsupported media type.' }) } - const _body: Record = request.body - const _credential = _body['credential'] - const credential_request = { ...request as Request, credential: _credential as W3CVerifiableCredential } as CredentialRequest - const verified = await Credentials.instance.verify_credentials(credential_request) - return response.json(verified) + + const result = validationResult(request); + if (!result.isEmpty()) { + return response.status(400).json(result.array()[0].msg) + } + + const verificationResult = await Credentials.instance.verify_credentials(request.body.credential) + return response.json(verificationResult) } } diff --git a/src/services/credentials.ts b/src/services/credentials.ts index 9ffea070..e18279df 100644 --- a/src/services/credentials.ts +++ b/src/services/credentials.ts @@ -1,5 +1,5 @@ import { - createAgent, IDataStore, IDIDManager, IKeyManager, IResolver, TAgent + createAgent, IDataStore, IDIDManager, IKeyManager, IResolver, IVerifyResult, TAgent, W3CVerifiableCredential } from '@veramo/core' import { CredentialPlugin } from '@veramo/credential-w3c' import { AbstractIdentifierProvider, DIDManager, MemoryDIDStore } from '@veramo/did-manager' @@ -9,8 +9,8 @@ import { KeyManagementSystem } from '@veramo/kms-local' import { Resolver, ResolverRegistry } from 'did-resolver' import { CheqdDIDProvider, getResolver as CheqdDidResolver } from '@cheqd/did-provider-cheqd' import { NetworkType } from '@cheqd/did-provider-cheqd/src/did-manager/cheqd-did-provider' -import { HEADERS, VC_CONTEXT, VC_EVENTRESERVATION_CONTEXT, VC_PERSON_CONTEXT, VC_PROOF_FORMAT, VC_REMOVE_ORIGINAL_FIELDS, VC_TYPE, } from '../types/constants' -import { CredentialPayload, CredentialRequest, CredentialSubject, GenericAuthUser, VerifiableCredential, WebPage, Credential } from '../types/types' +import { VC_CONTEXT, VC_EVENTRESERVATION_CONTEXT, VC_PERSON_CONTEXT, VC_PROOF_FORMAT, VC_REMOVE_ORIGINAL_FIELDS, VC_TYPE, } from '../types/constants' +import { CredentialPayload, CredentialSubject, GenericAuthUser, VerifiableCredential, WebPage, Credential } from '../types/types' import { Identity } from './identity' require('dotenv').config() @@ -188,18 +188,14 @@ export class Credentials { return verifiable_credential } - async verify_credentials(request: CredentialRequest): Promise { - - const credential = request?.credential - - if (!credential) return new Response(JSON.stringify({ error: 'W3C Verifiable credential is not provided.' }), { status: 400, headers: HEADERS.json }) - - return await this.agent?.execute( + async verify_credentials(credential: W3CVerifiableCredential): Promise { + const result = await this.agent?.execute( 'verifyCredential', { - credential: credential + credential } ) + return result } private get_network_ns_config(issuer_id: string): NetworkType { diff --git a/src/types/types.ts b/src/types/types.ts index 7aa4c585..d5c82378 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1,3 +1,5 @@ +import { W3CVerifiableCredential } from "@veramo/core" + export type ErrorResponse = { name: string message: string @@ -42,8 +44,6 @@ export interface UnsignedCredential { export type VerifiableCredential = UnsignedCredential & { proof: ProofType } -export type W3CVerifiableCredential = VerifiableCredential | CompactJWT - export interface UnsignedPresentation { holder: string verifiableCredential?: W3CVerifiableCredential[] @@ -89,8 +89,6 @@ export interface PresentationPayload { [x: string]: any } -export type CredentialRequest = { credential?: W3CVerifiableCredential } - export type GenericAuthResponse = { authenticated: boolean user: GenericAuthUser,