diff --git a/.gitignore b/.gitignore index 36190ec..257deee 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ ssl_keys *.tar.gz config.production*.* .npmrc +**/config/index.ts diff --git a/Dockerfile b/Dockerfile index 3c12780..793c5c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM node:18-bullseye-slim AS builder WORKDIR /app COPY . . -RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \ - apt-get update -y && apt-get install g++ python3 make -y && yarn cache clean && yarn install && yarn build +COPY ./config/config.template.ts ./config/index.ts +RUN apt-get update -y && apt-get install g++ python3 make -y && yarn cache clean && yarn install && yarn build # Production stage FROM node:18-bullseye-slim AS production @@ -16,10 +16,9 @@ COPY --from=builder /app/public ./public -RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \ - apt-get update -y && apt-get install g++ python3 make -y && yarn install --production +RUN apt-get update -y && apt-get install g++ python3 make -y && yarn install --production -ENV NODE_ENV production +ENV NODE_ENV=production EXPOSE 8002 diff --git a/cli/.dockerignore b/cli/.dockerignore deleted file mode 100644 index 1ed8eaf..0000000 --- a/cli/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -npm-debug.log -node_modules -combined.log -error.log -*.gz -./dist diff --git a/cli/Dockerfile b/cli/Dockerfile deleted file mode 100644 index 548ae73..0000000 --- a/cli/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:16-bullseye-slim - -WORKDIR /home/node/app - -COPY . . - -RUN yarn cache clean && yarn install - - -CMD ["tail", "-f", "/dev/null"] diff --git a/cli/configwallet.js b/cli/configwallet.js deleted file mode 100755 index a4f4677..0000000 --- a/cli/configwallet.js +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env node - - -"use strict"; -const yargs = require('yargs'); -require('dotenv').config(); -const knex = require('knex'); -const { NaturalPersonWallet } = require('@wwwallet/ssi-sdk') -const crypto = require('node:crypto'); - -const db = knex({ - client: 'mysql2', - connection: { - // Database connection details - // For example: - host: process.env.DB_HOST, - port: process.env.DB_PORT, - user: process.env.DB_USER, - password: process.env.DB_PASSWORD, - database: process.env.DB_NAME, - } -}); - -yargs - .command('create', '', (createYargs) => { - createYargs - .command('did', 'Create did', (didArgs) => { - didArgs - .option('username', { - description: "Give client id", - type: "string", - demandOption: true, - alias: 'n' - }) - .option('password', { - description: "Give client secret", - type: "string", - demandOption: true, - alias: 'p' - }) - createUser({...didArgs.argv}) - }) - .command('issuer', 'Create issuer', (createIssuerArgs) => { - createIssuerArgs - .option('friendlyName', { - description: "Give friendlyName", - type: "string", - demandOption: true, - }) - .option('url', { - description: "Give url", - type: "string", - demandOption: true, - }) - .option('did', { - description: "Give url", - type: "string", - demandOption: true, - }) - .option('client_id', { - description: "Give client_id", - type: "string", - demandOption: true, - }) - createIssuer({...createIssuerArgs.argv}) - }) - }) - .help() - .argv; - - - -async function createUser({username, password}) { - - const passwordHash = crypto.createHash('sha256').update(password).digest('base64'); - - const w = await new NaturalPersonWallet().createWallet('ES256'); - const did = w.key.did; - const keys = JSON.stringify(w.key); - const fcmToken = ""; - const isAdmin = 1; - db("user") - .insert({username, passwordHash, did, keys, fcmToken, isAdmin}) - .then((result) => { - // Process the insertion result - console.log(`Wallet provider DID:\t${did}`) - return; - }) - .catch((error) => { - db.select("*") - .from("user") - .where('username' , '=', username) - .then(rows => { - const first = rows.length ? rows[0] : null; - if (first) { - console.log(`Wallet provider already exists with DID:\t${first.did}`) - } - }) - .catch(e => { - console.log(e) - }) - .finally(() => { - db.destroy(); - }) - // Handle insertion errors` - console.error('Error inserting new row'); - - }) - .finally(() => { - db.destroy(); - }); - return; -} - -async function createIssuer({friendlyName, url, did, client_id}) { - try { - const rows = await db.select("*") - .from("legal_person") - .where('friendlyName', '=', friendlyName); - if (rows.length > 0) { - console.log(`Legal person already exists with friendlyName:\t${friendlyName}`) - db.destroy(); - return; - } - } catch (e) { - console.log(e); - db.destroy(); - return; - } - - db("legal_person") - .insert({friendlyName, url, did, client_id}) - .then((result) => { - // Process the insertion result - console.log('New legal person inserted successfully'); - db.destroy() - return; - }) - .catch((error) => { - // Handle insertion errors - console.error('Error inserting new row:', error); - db.destroy() - - }); - return; -} \ No newline at end of file diff --git a/cli/package.json b/cli/package.json deleted file mode 100644 index 546b512..0000000 --- a/cli/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "issuer-cli", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "bin": { - "configwallet": "./configwallet" - }, - "scripts": { - "start": "node app.js" - }, - "dependencies": { - "@wwwallet/ssi-sdk": "^1.0.1", - "dotenv": "^16.1.1", - "knex": "^2.4.2", - "mysql2": "^3.3.3", - "yargs": "^17.7.2" - } -} diff --git a/cli/yarn.lock b/cli/yarn.lock deleted file mode 100644 index 7463176..0000000 --- a/cli/yarn.lock +++ /dev/null @@ -1,942 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@cef-ebsi/ebsi-did-resolver@^3.1.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@cef-ebsi/ebsi-did-resolver/-/ebsi-did-resolver-3.2.0.tgz#2e7dadc0f071468bc6fa90c2da4ca28997334e23" - integrity sha512-4wM5TK5l6xRBSkOCEZRP64Xqsd0BqmvjfSpREn8fXbrpMZqOafku77YQSMzqFmOIQ62HSEi5Vf4CSzDHAmalig== - dependencies: - axios "^1.4.0" - did-resolver "^4.1.0" - jose "^4.14.4" - multiformats "^9.9.0" - -"@cef-ebsi/key-did-resolver@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@cef-ebsi/key-did-resolver/-/key-did-resolver-1.1.0.tgz#3523a824c34ac0a52c416d1c91938541e153a05d" - integrity sha512-fx8otCet0vRM/PnndGHHhuWBy5EpX142RsfKT3DTH8/a3Yjkdo8S+C9bGHbDdc6PowPyp4FgF/6XVQUH45iu1A== - dependencies: - did-resolver "^4.1.0" - jose "^4.14.4" - lodash.isplainobject "^4.0.6" - multiformats "^9.9.0" - web-encoding "^1.1.5" - -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@peculiar/asn1-schema@^2.3.6": - version "2.3.6" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" - integrity sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA== - dependencies: - asn1js "^3.0.5" - pvtsutils "^1.3.2" - tslib "^2.4.0" - -"@peculiar/json-schema@^1.1.12": - version "1.1.12" - resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" - integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== - dependencies: - tslib "^2.0.0" - -"@peculiar/webcrypto@^1.1.6": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz#078b3e8f598e847b78683dc3ba65feb5029b93a7" - integrity sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A== - dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - pvtsutils "^1.3.2" - tslib "^2.5.0" - webcrypto-core "^1.7.7" - -"@redis/bloom@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@redis/bloom/-/bloom-1.2.0.tgz#d3fd6d3c0af3ef92f26767b56414a370c7b63b71" - integrity sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg== - -"@redis/client@1.5.11": - version "1.5.11" - resolved "https://registry.yarnpkg.com/@redis/client/-/client-1.5.11.tgz#5ee8620fea56c67cb427228c35d8403518efe622" - integrity sha512-cV7yHcOAtNQ5x/yQl7Yw1xf53kO0FNDTdDU6bFIMbW6ljB7U7ns0YRM+QIkpoqTAt6zK5k9Fq0QWlUbLcq9AvA== - dependencies: - cluster-key-slot "1.1.2" - generic-pool "3.9.0" - yallist "4.0.0" - -"@redis/graph@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@redis/graph/-/graph-1.1.0.tgz#cc2b82e5141a29ada2cce7d267a6b74baa6dd519" - integrity sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg== - -"@redis/json@1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@redis/json/-/json-1.0.6.tgz#b7a7725bbb907765d84c99d55eac3fcf772e180e" - integrity sha512-rcZO3bfQbm2zPRpqo82XbW8zg4G/w4W3tI7X8Mqleq9goQjAGLL7q/1n1ZX4dXEAmORVZ4s1+uKLaUOg7LrUhw== - -"@redis/search@1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@redis/search/-/search-1.1.5.tgz#682b68114049ff28fdf2d82c580044dfb74199fe" - integrity sha512-hPP8w7GfGsbtYEJdn4n7nXa6xt6hVZnnDktKW4ArMaFQ/m/aR7eFvsLQmG/mn1Upq99btPJk+F27IQ2dYpCoUg== - -"@redis/time-series@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.0.5.tgz#a6d70ef7a0e71e083ea09b967df0a0ed742bc6ad" - integrity sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg== - -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" - integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - -"@stablelib/aead@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aead/-/aead-1.0.1.tgz#c4b1106df9c23d1b867eb9b276d8f42d5fc4c0c3" - integrity sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg== - -"@stablelib/aes-kw@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aes-kw/-/aes-kw-1.0.1.tgz#43f25517f719d69bb995909a5b69a2d9172c2a93" - integrity sha512-KrOkiRex1tQTbWk+hFB5fFw4vqKhNnTUtlCRf1bhUEOFp7hadWe49/sLa/P4X4FBQVoh3Z9Lj0zS1OWu/AHA1w== - dependencies: - "@stablelib/aes" "^1.0.1" - "@stablelib/binary" "^1.0.1" - "@stablelib/blockcipher" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/aes@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aes/-/aes-1.0.1.tgz#f2a8aec2cebaf0e69be2b49c7c57b4267867ffa5" - integrity sha512-bMiezJDeFONDHbMEa+Kic26962+bwkZfsHPAmcqTjLaHCAhEQuK3i1H0POPOkcHCdj75oVRIqFCraCA0cyHPvw== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/blockcipher" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/binary@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" - integrity sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q== - dependencies: - "@stablelib/int" "^1.0.1" - -"@stablelib/blockcipher@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/blockcipher/-/blockcipher-1.0.1.tgz#535f067d147ecdc9625ccd2b0d129f6d53d563d2" - integrity sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew== - -"@stablelib/chacha20poly1305@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz#de6b18e283a9cb9b7530d8767f99cde1fec4c2ee" - integrity sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA== - dependencies: - "@stablelib/aead" "^1.0.1" - "@stablelib/binary" "^1.0.1" - "@stablelib/chacha" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/poly1305" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/chacha@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/chacha/-/chacha-1.0.1.tgz#deccfac95083e30600c3f92803a3a1a4fa761371" - integrity sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/constant-time@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/constant-time/-/constant-time-1.0.1.tgz#bde361465e1cf7b9753061b77e376b0ca4c77e35" - integrity sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg== - -"@stablelib/int@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/int/-/int-1.0.1.tgz#75928cc25d59d73d75ae361f02128588c15fd008" - integrity sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w== - -"@stablelib/poly1305@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/poly1305/-/poly1305-1.0.1.tgz#93bfb836c9384685d33d70080718deae4ddef1dc" - integrity sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA== - dependencies: - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/wipe@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" - integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== - -"@stablelib/xchacha20@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/xchacha20/-/xchacha20-1.0.1.tgz#e98808d1f7d8b20e3ff37c71a3062a2a955d9a8c" - integrity sha512-1YkiZnFF4veUwBVhDnDYwo6EHeKzQK4FnLiO7ezCl/zu64uG0bCCAUROJaBkaLH+5BEsO3W7BTXTguMbSLlWSw== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/chacha" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/xchacha20poly1305@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/xchacha20poly1305/-/xchacha20poly1305-1.0.1.tgz#addcaf30b92dd956f76b3357888e2f91b92e7a61" - integrity sha512-B1Abj0sMJ8h3HNmGnJ7vHBrAvxuNka6cJJoZ1ILN7iuacXp7sUYcgOVEOTLWj+rtQMpspY9tXSCRLPmN1mQNWg== - dependencies: - "@stablelib/aead" "^1.0.1" - "@stablelib/chacha20poly1305" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - "@stablelib/xchacha20" "^1.0.1" - -"@transmute/jose-ld@^0.7.0-unstable.81": - version "0.7.0-unstable.81" - resolved "https://registry.yarnpkg.com/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.81.tgz#d8b47c103d832ea4da3c2001b2a267d6b7ba93d5" - integrity sha512-xLwqoweaBjeuK9qvl8WZBPkwn0ubSgiaE0Vf6QuZgUZqwB7LhBI0wopUNFmINnbfuTfUbGuC4kdH1W+1HM445g== - dependencies: - "@peculiar/webcrypto" "^1.1.6" - "@stablelib/aes-kw" "^1.0.0" - "@stablelib/xchacha20poly1305" "^1.0.0" - base64url "^3.0.1" - jose "^4.3.8" - web-streams-polyfill "^3.0.3" - -"@wwwallet/ssi-sdk@^1.0.1": - version "1.0.1" - resolved "https://npm.pkg.github.com/download/@wwwallet/ssi-sdk/1.0.1/5455b692af97b89a338c2939f35da9bbe9ef22c1#5455b692af97b89a338c2939f35da9bbe9ef22c1" - integrity sha512-d0A0WIdVIcUKhPy2aOnm3FW79BeJD5WRdqV2+o6kq/1+Fxm6Er0/V7P5JW3Zy35A4x1hIG0WgTggr+A69mF5vw== - dependencies: - "@cef-ebsi/ebsi-did-resolver" "^3.1.0" - "@cef-ebsi/key-did-resolver" "^1.0.0" - "@transmute/jose-ld" "^0.7.0-unstable.81" - ajv "^8.11.0" - ajv-formats "^2.1.1" - axios "^0.27.2" - base64url "^3.0.1" - did-resolver "^4.1.0" - joi "^17.6.0" - jose "^4.8.1" - jsonpath-plus "^7.2.0" - moment "^2.29.3" - multiformats "^9.6.4" - randomstring "^1.2.3" - redis "^4.6.4" - ts-results "^3.3.0" - tslib "^2.5.3" - uuid "^8.3.2" - zod "3.19.1" - -"@zxing/text-encoding@0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" - integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== - -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv@^8.0.0, ajv@^8.11.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -asn1js@^3.0.1, asn1js@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.5.tgz#5ea36820443dbefb51cc7f88a2ebb5b462114f38" - integrity sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ== - dependencies: - pvtsutils "^1.3.2" - pvutils "^1.1.3" - tslib "^2.4.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== - dependencies: - follow-redirects "^1.14.9" - form-data "^4.0.0" - -axios@^1.4.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.5.1.tgz#11fbaa11fc35f431193a9564109c88c1f27b585f" - integrity sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -base64url@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== - -call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -cluster-key-slot@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" - integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colorette@2.0.19: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^9.1.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -denque@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" - integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== - -did-resolver@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.1.0.tgz#740852083c4fd5bf9729d528eca5d105aff45eb6" - integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA== - -dotenv@^16.1.1: - version "16.1.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.1.1.tgz#9105a6c486ab66076231fbe7cf4ba77131a61d65" - integrity sha512-UGmzIqXU/4b6Vb3R1Vrfd/4vGgVlB+mO+vEixOdfRhLeppkyW2BMhuK7TL8d0el+q9c4lW9qK2wZYhNLFhXYLA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -esm@^3.2.25: - version "3.2.25" - resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" - integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -follow-redirects@^1.14.9, follow-redirects@^1.15.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -generate-function@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" - integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== - dependencies: - is-property "^1.0.2" - -generic-pool@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.9.0.tgz#36f4a678e963f4fdb8707eab050823abc4e8f5e4" - integrity sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.3: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -getopts@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.3.0.tgz#71e5593284807e03e2427449d4f6712a268666f4" - integrity sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA== - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -inherits@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.11.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== - dependencies: - has "^1.0.3" - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== - -is-typed-array@^1.1.3: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== - dependencies: - which-typed-array "^1.1.11" - -joi@^17.6.0: - version "17.11.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" - integrity sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.1" - "@sideway/pinpoint" "^2.0.0" - -jose@^4.14.4, jose@^4.3.8, jose@^4.8.1: - version "4.15.3" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.3.tgz#92fdac3ff0f345aab103211fc90b58f187fcdceb" - integrity sha512-RZJdL9Qjd1sqNdyiVteRGV/bnWtik/+PJh1JP4kT6+x1QQMn+7ryueRys5BEueuayvSVY8CWGCisCDazeRLTuw== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -jsonpath-plus@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" - integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== - -knex@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/knex/-/knex-2.4.2.tgz#a34a289d38406dc19a0447a78eeaf2d16ebedd61" - integrity sha512-tMI1M7a+xwHhPxjbl/H9K1kHX+VncEYcvCx5K00M16bWvpYPKAZd6QrCu68PtHAdIZNQPWZn0GVhqVBEthGWCg== - dependencies: - colorette "2.0.19" - commander "^9.1.0" - debug "4.3.4" - escalade "^3.1.1" - esm "^3.2.25" - get-package-type "^0.1.0" - getopts "2.3.0" - interpret "^2.2.0" - lodash "^4.17.21" - pg-connection-string "2.5.0" - rechoir "^0.8.0" - resolve-from "^5.0.0" - tarn "^3.0.2" - tildify "2.0.0" - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long@^5.2.1: - version "5.2.3" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - -lru-cache@^7.14.1: - version "7.18.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" - integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - -lru-cache@^8.0.0: - version "8.0.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" - integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -moment@^2.29.3: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -multiformats@^9.6.4, multiformats@^9.9.0: - version "9.9.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" - integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== - -mysql2@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-3.3.3.tgz#b1010dffa394edf5c397c52bc340dfd3ada80257" - integrity sha512-MxDQJztArk4JFX1PKVjDhIXRzAmVJfuqZrVU+my6NeYBAA/XZRaDw5q7vga8TNvgyy3Lv3rivBFBBuJFbsdjaw== - dependencies: - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^5.2.1" - lru-cache "^8.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - -named-placeholders@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" - integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== - dependencies: - lru-cache "^7.14.1" - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -pg-connection-string@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.5.0.tgz#538cadd0f7e603fc09a12590f3b8a452c2c0cf34" - integrity sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ== - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -pvtsutils@^1.3.2: - version "1.3.5" - resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.5.tgz#b8705b437b7b134cd7fd858f025a23456f1ce910" - integrity sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA== - dependencies: - tslib "^2.6.1" - -pvutils@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" - integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== - -randombytes@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec" - integrity sha512-lDVjxQQFoCG1jcrP06LNo2lbWp4QTShEXnhActFBwYuHprllQV6VUpwreApsYqCgD+N1mHoqJ/BI/4eV4R2GYg== - -randomstring@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/randomstring/-/randomstring-1.3.0.tgz#1bf9d730066899e70aee3285573f84708278683d" - integrity sha512-gY7aQ4i1BgwZ8I1Op4YseITAyiDiajeZOPQUbIq9TPGPhUm5FX59izIaOpmKbME1nmnEiABf28d9K2VSii6BBg== - dependencies: - randombytes "2.0.3" - -rechoir@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" - integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== - dependencies: - resolve "^1.20.0" - -redis@^4.6.4: - version "4.6.10" - resolved "https://registry.yarnpkg.com/redis/-/redis-4.6.10.tgz#07f6ea2b2c5455b098e76d1e8c9b3376114e9458" - integrity sha512-mmbyhuKgDiJ5TWUhiKhBssz+mjsuSI/lSZNPI9QvZOYzWvYGejtb+W3RlDDf8LD6Bdl5/mZeG8O1feUGhXTxEg== - dependencies: - "@redis/bloom" "1.2.0" - "@redis/client" "1.5.11" - "@redis/graph" "1.1.0" - "@redis/json" "1.0.6" - "@redis/search" "1.1.5" - "@redis/time-series" "1.0.5" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.20.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -seq-queue@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" - integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== - -sqlstring@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c" - integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -tarn@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" - integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== - -tildify@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" - integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== - -ts-results@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ts-results/-/ts-results-3.3.0.tgz#68623a6c18e65556287222dab76498a28154922f" - integrity sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA== - -tslib@^2.0.0, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.5.3, tslib@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util@^0.12.3: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -web-encoding@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.1.5.tgz#fc810cf7667364a6335c939913f5051d3e0c4864" - integrity sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA== - dependencies: - util "^0.12.3" - optionalDependencies: - "@zxing/text-encoding" "0.9.0" - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -webcrypto-core@^1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.7.tgz#06f24b3498463e570fed64d7cab149e5437b162c" - integrity sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g== - dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - asn1js "^3.0.1" - pvtsutils "^1.3.2" - tslib "^2.4.0" - -which-typed-array@^1.1.11, which-typed-array@^1.1.2: - version "1.1.11" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" - integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.7.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -zod@3.19.1: - version "3.19.1" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.19.1.tgz#112f074a97b50bfc4772d4ad1576814bd8ac4473" - integrity sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA== diff --git a/config/config.template.ts b/config/config.template.ts index 393acf0..591ce73 100644 --- a/config/config.template.ts +++ b/config/config.template.ts @@ -1,4 +1,4 @@ -export = { +export const config = { url: "SERVICE_URL", port: "SERVICE_PORT", appSecret: "SERVICE_SECRET", @@ -20,10 +20,6 @@ export = { }, }, alg: "EdDSA", - servicesConfiguration: { - issuanceService: "OpenidForCredentialIssuanceService", // OpenidForCredentialIssuanceService or OpenidForCredentialIssuanceVCEDUService - didKeyService: "EBSI", // W3C or EBSI - }, notifications: { enabled: "NOTIFICATIONS_ENABLED", serviceAccount: "firebaseConfig.json" diff --git a/config/index.ts b/config/index.ts deleted file mode 100644 index 22ac3ed..0000000 --- a/config/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -require('dotenv').config() - -const env = process.env.NODE_ENV || 'development'; -const config: any = require('./config.' + env); -export default config; diff --git a/development.Dockerfile b/development.Dockerfile index 99c1d2a..66e7aa4 100644 --- a/development.Dockerfile +++ b/development.Dockerfile @@ -4,29 +4,16 @@ WORKDIR /dependencies # Install dependencies first so rebuild of these layers is only needed when dependencies change COPY package.json yarn.lock ./ -RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \ - yarn cache clean && yarn install - - -FROM node:16-bullseye-slim as cli-dependencies - -WORKDIR /dependencies - -# Install dependencies first so rebuild of these layers is only needed when dependencies change -COPY cli/package.json cli/yarn.lock ./ -RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \ - yarn cache clean && yarn install --frozen-lockfile +RUN yarn cache clean && yarn install FROM node:16-bullseye-slim as development -COPY --from=cli-dependencies /dependencies/node_modules /cli_node_modules - ENV NODE_PATH=/node_modules COPY --from=dependencies /dependencies/node_modules /node_modules WORKDIR /app -ENV NODE_ENV development +ENV NODE_ENV=development CMD ["yarn", "dev-docker"] # Set user last so everything is readonly by default diff --git a/package.json b/package.json index 44c51ea..158f954 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@sd-jwt/core": "^0.2.1", "@simplewebauthn/server": "^7.4.0", "@transmute/did-key-ed25519": "^0.3.0-unstable.10", - "@wwwallet/ssi-sdk": "^1.0.8", "ajv": "^8.12.0", "apn": "^2.2.0", "axios": "^0.27.2", diff --git a/samples/wallet-mock/development.Dockerfile b/samples/wallet-mock/development.Dockerfile index 3f0a1b7..fd5b53b 100644 --- a/samples/wallet-mock/development.Dockerfile +++ b/samples/wallet-mock/development.Dockerfile @@ -1,7 +1,7 @@ FROM node:16-bullseye-slim WORKDIR /home/node/app -# Copy package.json and yarn.lock and npmrc to the container +# Copy package.json and yarn.lock to the container COPY package.json yarn.lock ./ # RUN apt update -y && apt install python3 -y @@ -12,7 +12,7 @@ RUN yarn cache clean && yarn install # Copy the rest of the application code to the container -ENV NODE_ENV development +ENV NODE_ENV=development RUN chown -R node:node /home/node/app/node_modules diff --git a/src/AppDataSource.ts b/src/AppDataSource.ts index 4a353e2..029273e 100644 --- a/src/AppDataSource.ts +++ b/src/AppDataSource.ts @@ -1,12 +1,12 @@ import { DataSource } from "typeorm"; -import config from "../config"; +import { config } from "../config"; // Initialize DB connection const AppDataSource: DataSource = new DataSource({ type: "mysql", host: config.db.host, - port: config.db.port, + port: parseInt(config.db.port), username: config.db.username, password: config.db.password, database: config.db.dbname, diff --git a/src/app.ts b/src/app.ts index 52ee73e..6b3dddb 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,24 +1,21 @@ -import express, { Express, Request, Response } from 'express'; -import config from '../config'; +import express, { Express } from 'express'; +import { config } from '../config'; import bodyParser from 'body-parser'; import cookieParser from 'cookie-parser'; import cors from 'cors'; import userController from './routers/user.router'; import { AuthMiddleware } from './middlewares/auth.middleware'; import { statusRouter } from './routers/status.router'; -import { communicationHandlerRouter } from './routers/communicationHandler.router'; import { storageRouter } from './routers/storage.router'; -import { legalPersonRouter } from './routers/legal_person.router'; -import verifiersRouter from './routers/verifiers.router'; import { replacerBufferToTaggedBase64Url, reviverTaggedBase64UrlToBuffer } from './util/util'; -import * as WebSocket from 'ws'; import http from 'http'; import { appContainer } from './services/inversify.config'; import { SocketManagerServiceInterface } from './services/interfaces'; import { TYPES } from './services/types'; -import https from 'https'; -import fs from 'fs'; -import path from 'path'; +import { credentialIssuerRouter } from './routers/credential_issuer.router'; +import { proxyRouter } from './routers/proxy.router'; +import { helperRouter } from './routers/helper.router'; +import { verifierRouter } from './routers/verifier.router'; const app: Express = express(); @@ -45,18 +42,14 @@ app.use('/status', statusRouter); app.use('/user', userController); - app.use(AuthMiddleware); // all the following endpoints are guarded by the AuthMiddleware -app.use('/communication', communicationHandlerRouter); app.use('/storage', storageRouter); -app.use('/legal_person', legalPersonRouter); -app.use('/verifiers', verifiersRouter); - - - - +app.use('/issuer', credentialIssuerRouter); +app.use('/proxy', proxyRouter); +app.use('/helper', helperRouter); +app.use('/verifier', verifierRouter); const server = http.createServer(app); appContainer.get(TYPES.SocketManagerService).register(server); diff --git a/src/entities/CredentialIssuer.entity.ts b/src/entities/CredentialIssuer.entity.ts new file mode 100644 index 0000000..5fc9843 --- /dev/null +++ b/src/entities/CredentialIssuer.entity.ts @@ -0,0 +1,47 @@ +import { Err, Ok, Result } from "ts-results"; +import { Column, Entity, PrimaryGeneratedColumn, Repository } from "typeorm"; +import AppDataSource from "../AppDataSource"; + + +@Entity({ name: "credential_issuer" }) +class CredentialIssuerEntity { + @PrimaryGeneratedColumn() + id: number = -1; + + @Column({ type: "varchar", nullable: false }) + credentialIssuerIdentifier: string = ""; + + // Explicit default to workaround a bug in typeorm: https://github.com/typeorm/typeorm/issues/3076#issuecomment-703128687 + @Column({ nullable: true, type: "varchar", default: () => "NULL" }) + clientId?: string; + + + // Explicit default to workaround a bug in typeorm: https://github.com/typeorm/typeorm/issues/3076#issuecomment-703128687 + @Column({ nullable: true, type: "tinyint" }) + visible: boolean; +} + +enum GetLegalPersonErr { + NOT_EXISTS = "NOT_EXISTS", + DB_ERR = "DB_ERR" +} + +const credentialIssuerRepository: Repository = AppDataSource.getRepository(CredentialIssuerEntity); + + +async function getAllCredentialIssuers(): Promise> { + try { + const issuers = await credentialIssuerRepository.createQueryBuilder() + .getMany(); + return Ok(issuers); + } + catch(e) { + console.log(e); + return Err(GetLegalPersonErr.DB_ERR); + } +} + +export { + CredentialIssuerEntity, + getAllCredentialIssuers, +} diff --git a/src/entities/LegalPerson.entity.ts b/src/entities/LegalPerson.entity.ts deleted file mode 100644 index fab1f81..0000000 --- a/src/entities/LegalPerson.entity.ts +++ /dev/null @@ -1,201 +0,0 @@ -import axios from "axios"; -import { Err, Ok, Result } from "ts-results"; -import { Column, Entity, PrimaryGeneratedColumn, Repository } from "typeorm"; -import AppDataSource from "../AppDataSource"; - - -@Entity({ name: "legal_person" }) -class LegalPersonEntity { - @PrimaryGeneratedColumn() - id: number = -1; - - - @Column({ nullable: false }) - friendlyName: string = ""; - - @Column({ nullable: false }) - url: string = ""; - - @Column({ nullable: false }) - did: string = ""; - - - // Explicit default to workaround a bug in typeorm: https://github.com/typeorm/typeorm/issues/3076#issuecomment-703128687 - @Column({ nullable: true, default: () => "NULL" }) - client_id?: string; - - // Explicit default to workaround a bug in typeorm: https://github.com/typeorm/typeorm/issues/3076#issuecomment-703128687 - @Column({ nullable: true, default: () => "NULL" }) - client_secret?: string; -} - -type CreateLegalPerson = { - url: string; - friendlyName: string; - did: string; - client_id: string; - client_secret: string; -} - - -enum CreateLegalPersonErr { - ALREADY_EXISTS = "ALREADY_EXISTS" -} - -enum GetLegalPersonErr { - NOT_EXISTS = "NOT_EXISTS", - DB_ERR = "DB_ERR" -} - -const legalPersonRepository: Repository = AppDataSource.getRepository(LegalPersonEntity); - - - - - -async function createIssuer(createIssuer: CreateLegalPerson) { - try { - console.log("Storing Issuer...") - const res = await AppDataSource - .createQueryBuilder() - .insert() - .into(LegalPersonEntity).values([ - { ...createIssuer } - ]) - .execute(); - return Ok({}); - } - catch(e) { - console.log(e); - return Err(CreateLegalPersonErr.ALREADY_EXISTS); - } -} - - -async function getAllLegalPersons(): Promise> { - try { - const lps = await legalPersonRepository - .createQueryBuilder("legal_person") - .select(["legal_person.id", "legal_person.friendlyName", "legal_person.url", "legal_person.did"]) - .getMany(); - return Ok(lps); - } - catch(e) { - console.log(e); - return Err(GetLegalPersonErr.DB_ERR); - } -} - -async function getAllLegalPersonsDIDs(): Promise> { - try { - const vcList = await legalPersonRepository - .createQueryBuilder("legal_person") - .getMany(); - - // convert all Blobs to actual data - const didList = vcList.map((issuer) => { - return issuer.did - }) - return Ok(didList); - } - catch(e) { - console.log(e); - return Err(GetLegalPersonErr.DB_ERR); - } -} - -async function getLegalPersonsBySearchParams(friendlyNameSubstring: string): Promise> { - try { - const issuersList = await legalPersonRepository - .createQueryBuilder("legal_person") - .select(["legal_person.id", "legal_person.friendlyName", "legal_person.url", "legal_person.did"]) - .where("friendlyName LIKE '%:friendlyNameSubstring%", { friendlyNameSubstring }) - .getMany(); - - // convert all Blobs to actual data - const decodedIssuers = issuersList.map((issuer) => { - return issuer as LegalPersonEntity; - }) - return Ok(decodedIssuers); - } - catch(e) { - console.log(e); - return Err(GetLegalPersonErr.DB_ERR); - } -} - -/** -* Will also update the issuer DB entity with the latest metadata -* @param id -* @returns -*/ -async function getLegalPersonById(id: number): Promise> { - - try { - const issuer = await legalPersonRepository - .createQueryBuilder("legal_person") - .where("id = :id", { id }) - .getOne(); - - return Ok(issuer); - } - catch(e) { - return Err(GetLegalPersonErr.DB_ERR); - } - -} - -/** -* Will also update the issuer DB entity with the latest metadata -* @param id -* @returns -*/ -async function getLegalPersonByDID(did: string): Promise> { - - try { - const issuer = await legalPersonRepository - .createQueryBuilder("legal_person") - .where("did = :did", { did }) - .getOne(); - return Ok(issuer); - } - catch(e) { - return Err(GetLegalPersonErr.DB_ERR); - } - -} - - - -/** -* Will also update the issuer DB entity with the latest metadata -* @param id -* @returns -*/ -async function getLegalPersonByUrl(url: string): Promise> { - - try { - const issuer = await legalPersonRepository - .createQueryBuilder("legal_person") - .where("url = :url", { url }) - .getOne(); - - - return Ok(issuer); - } - catch(e) { - return Err(GetLegalPersonErr.DB_ERR); - } - -} - -export { - LegalPersonEntity, - createIssuer, - getAllLegalPersons, - getLegalPersonsBySearchParams, - getLegalPersonById, - getLegalPersonByDID, - getAllLegalPersonsDIDs, - getLegalPersonByUrl -} diff --git a/src/entities/TrustedRootCertificate.entity.ts b/src/entities/TrustedRootCertificate.entity.ts new file mode 100644 index 0000000..71752ee --- /dev/null +++ b/src/entities/TrustedRootCertificate.entity.ts @@ -0,0 +1,40 @@ +import { Err, Ok, Result } from "ts-results"; +import { Column, Entity, PrimaryGeneratedColumn, Repository } from "typeorm"; +import AppDataSource from "../AppDataSource"; + + +@Entity({ name: "trusted_root_certificate" }) +class TrustedRootCertificateEntity { + @PrimaryGeneratedColumn() + id: number = -1; + + @Column({ type: "blob", nullable: false }) + certificate: string = ""; +} + +enum GetTrustedRootCertErr { + NOT_EXISTS = "NOT_EXISTS", + DB_ERR = "DB_ERR" +} + +const trustedRootCertificateRepository: Repository = AppDataSource.getRepository(TrustedRootCertificateEntity); + + +async function getAllTrustedRootCertificates(): Promise> { + try { + const certs = await trustedRootCertificateRepository.createQueryBuilder() + .getMany(); + + const result = certs.map((cert) => ({ ...cert, certificate: cert.certificate.toString() })); + return Ok(result); + } + catch(e) { + console.log(e); + return Err(GetTrustedRootCertErr.DB_ERR); + } +} + +export { + TrustedRootCertificateEntity, + getAllTrustedRootCertificates, +} diff --git a/src/entities/VerifiableCredential.entity.ts b/src/entities/VerifiableCredential.entity.ts index 6fd9dc9..8615cbc 100644 --- a/src/entities/VerifiableCredential.entity.ts +++ b/src/entities/VerifiableCredential.entity.ts @@ -3,6 +3,7 @@ import { Entity, EntityManager, PrimaryGeneratedColumn, Column, Repository} from import AppDataSource from "../AppDataSource"; import { VerifiableCredentialFormat } from "../types/oid4vci"; import { deletePresentationsByCredentialId } from './VerifiablePresentation.entity'; +import { nullable } from "zod"; @Entity({ name: "verifiable_credential" }) @@ -10,45 +11,17 @@ export class VerifiableCredentialEntity { @PrimaryGeneratedColumn() id: number = -1; - // @Column({ unique: true }) - // identifier: string = ""; - - // @Column({ type: 'blob', nullable: false }) - // jwt: string = ""; - @Column({ nullable: false }) holderDID: string = ""; - - @Column({ nullable: false }) - credentialIdentifier: string = ""; // for JWTs it is the "jti" attribute - - @Column({ nullable:false, type: 'blob' }) - credential: Buffer = Buffer.from(""); - - - @Column({ nullable: false }) - issuerDID: string = "" - - @Column({ nullable: false }) - issuerURL: string = ""; - - @Column() - issuerFriendlyName: string = ""; - - @Column({ nullable: false }) - format: string; // = CredentialTypes.JWT_VC; // 'ldp_vc' or 'jwt_vc' or "vc+sd-jwt" - - @Column({ nullable: false }) - logoURL: string = ""; - - @Column({ nullable: false }) - backgroundColor: string = ""; + credentialIdentifier: string = ""; + @Column({ nullable: false, type: 'blob' }) + credential: string; - @Column({ type: "datetime", nullable: false }) - issuanceDate: Date = new Date(); + @Column({ type: "varchar", nullable: false }) + format: string; } @@ -66,22 +39,9 @@ enum DeleteVerifiableCredentialErr { CREDENTIAL_NOT_FOUND = "CREDENTIAL_NOT_FOUND" } -type VerifiableCredential = { - id?: number; - holderDID: string; - credentialIdentifier: string; - credential: string; - issuerDID: string; - issuerURL: string; - format: VerifiableCredentialFormat; - logoURL: string; - backgroundColor: string; - issuanceDate: Date; - issuerFriendlyName: string; -} -async function createVerifiableCredential(createVc: VerifiableCredential) { +async function createVerifiableCredential(createVc: Partial) { try { console.log("Storing VC...") let vc = { @@ -91,7 +51,7 @@ async function createVerifiableCredential(createVc: VerifiableCredential) { .createQueryBuilder() .insert() .into(VerifiableCredentialEntity).values([ - {...vc, credential: Buffer.from(vc.credential) } + {...vc } ]) .execute(); return Ok({}); @@ -128,7 +88,7 @@ async function deleteVerifiableCredential(holderDID:string, credentialId: string } } -async function getAllVerifiableCredentials(holderDID: string): Promise> { +async function getAllVerifiableCredentials(holderDID: string): Promise> { try { const vcList = await verifiableCredentialRepository .createQueryBuilder("vc") @@ -141,7 +101,7 @@ async function getAllVerifiableCredentials(holderDID: string): Promise> { +async function getVerifiableCredentialByCredentialIdentifier(holderDID: string, credentialId: string): Promise> { try { const vc = await verifiableCredentialRepository .createQueryBuilder("vc") @@ -164,7 +124,7 @@ async function getVerifiableCredentialByCredentialIdentifier(holderDID: string, ...vc, credential: vc.credential.toString(), } - return Ok(transformed as VerifiableCredential); + return Ok(transformed as VerifiableCredentialEntity); } catch(e) { console.log(e); @@ -192,7 +152,6 @@ async function deleteAllCredentialsWithHolderDID(holderDID: string, options?: { export { GetVerifiableCredentialsErr, - VerifiableCredential, CreateVerifiableCredentialErr, DeleteVerifiableCredentialErr, getAllVerifiableCredentials, diff --git a/src/entities/VerifiablePresentation.entity.ts b/src/entities/VerifiablePresentation.entity.ts index 1b29e32..bee34fb 100644 --- a/src/entities/VerifiablePresentation.entity.ts +++ b/src/entities/VerifiablePresentation.entity.ts @@ -2,15 +2,14 @@ import { Err, Ok, Result } from "ts-results"; import { Entity, EntityManager, PrimaryGeneratedColumn, Column, Repository} from "typeorm" import AppDataSource from "../AppDataSource"; -// export enum PresentationTypes { -// JWT_VP = 'jwt_vp', -// LDP_VP = 'ldp_vp' -// } + @Entity({ name: "verifiable_presentation" }) export class VerifiablePresentationEntity { @PrimaryGeneratedColumn() id: number = -1; + @Column({ nullable: false }) + holderDID: string = ""; @Column({ nullable: false }) presentationIdentifier: string = ""; @@ -18,24 +17,14 @@ export class VerifiablePresentationEntity { @Column({ type: 'blob', nullable: false }) presentation: string = ""; - @Column({ nullable: false }) - holderDID: string = ""; - - @Column({ nullable: false, default: "" }) - audience: string = ""; - - @Column({ nullable: false, default: "jwt_vp" }) - format: string = "jwt_vp"; - - @Column({ type: "blob", nullable: false }) - includedVerifiableCredentialIdentifiers: string = "[]"; - - @Column({ type: 'blob', nullable: false }) presentationSubmission: string = "{}"; - // @Column({ enum: PresentationTypes, type: 'enum', nullable: false }) - // format: PresentationTypes | null = null; // = PresentationTypes.JWT_VP; // 'ldp_vp' or 'jwt_vp' + @Column({ type: 'blob', nullable: false }) + includedVerifiableCredentialIdentifiers: string = "[]"; + + @Column({ type: "varchar", nullable: false, default: "" }) + audience: string = ""; @Column({ type: "datetime", nullable: false }) issuanceDate: Date = new Date(); @@ -49,11 +38,10 @@ type VerifiablePresentation = { presentationIdentifier: string; presentation: string; holderDID: string; + presentationSubmission: any; includedVerifiableCredentialIdentifiers: string[]; - issuanceDate: Date; audience: string; - presentationSubmission: any; - format: string; + issuanceDate: Date; } enum GetAllVerifiablePresentationsErr { @@ -76,8 +64,8 @@ async function createVerifiablePresentation(createVp: VerifiablePresentation) { .insert() .into(VerifiablePresentationEntity).values([{ ...createVp, + presentationSubmission: JSON.stringify(createVp.presentationSubmission), includedVerifiableCredentialIdentifiers: JSON.stringify(createVp.includedVerifiableCredentialIdentifiers), - presentationSubmission: JSON.stringify(createVp.presentationSubmission) }]) .execute(); return Ok({}); @@ -141,7 +129,7 @@ async function getAllVerifiablePresentations(holderDID: string): Promise = AppDataSource.getRepository(VerifierEntity); + + +async function getAllVerifiers(): Promise> { + try { + const issuers = await verifierRepository.createQueryBuilder() + .getMany(); + return Ok(issuers); + } + catch(e) { + console.log(e); + return Err(GetVerifierErr.DB_ERR); + } +} + +export { + VerifierEntity, + getAllVerifiers, +} diff --git a/src/lib/firebase.ts b/src/lib/firebase.ts index 074f4e1..926ae10 100644 --- a/src/lib/firebase.ts +++ b/src/lib/firebase.ts @@ -2,7 +2,7 @@ var admin; var serviceAccount; var path = require('path'); -const config = require('../../config').default; +const { config } = require('../../config'); if (config.notifications.enabled) { try { diff --git a/src/middlewares/auth.middleware.ts b/src/middlewares/auth.middleware.ts index 624e163..3161d20 100644 --- a/src/middlewares/auth.middleware.ts +++ b/src/middlewares/auth.middleware.ts @@ -1,7 +1,7 @@ import { Request, Response, NextFunction } from "express"; import { jwtVerify, SignJWT } from 'jose'; -import config from "../../config"; +import { config } from "../../config"; import { getUser, UserEntity, UserId } from "../entities/user.entity"; diff --git a/src/routers/communicationHandler.router.ts b/src/routers/communicationHandler.router.ts deleted file mode 100644 index a356d54..0000000 --- a/src/routers/communicationHandler.router.ts +++ /dev/null @@ -1,167 +0,0 @@ - -import express, { Router } from 'express'; -import { AuthMiddleware } from '../middlewares/auth.middleware'; -import _ from 'lodash'; -import { appContainer } from '../services/inversify.config'; -import { HandleOutboundRequestError, OpenidCredentialReceiving, OutboundCommunication, SendResponseError } from '../services/interfaces'; -import { TYPES } from '../services/types'; -import * as z from 'zod'; - -const openidForCredentialIssuanceService = appContainer.get(TYPES.OpenidForCredentialIssuanceService); -const openidForPresentationService = appContainer.get(TYPES.OpenidForPresentationService); - -const communicationHandlerRouter: Router = express.Router(); -communicationHandlerRouter.use(AuthMiddleware); - -const generateAuthorizationRequestSchema = z.object({ - legal_person_did: z.string() -}); - -const generateAuthorizationRequestSchemaWithOffer = z.object({ - url: z.string() -}); - -const handleAuthorizationResponseSchema = z.object({ - url: z.string() -}); - -const requestCredentialsWithPreAuthorizedSchema = z.object({ - user_pin: z.string() -}); - -const handleSIOPRequestSchema = z.object({ - url: z.string(), - camera_was_used: z.boolean() -}); - -const generateSIOPResponseSchema = z.object({ - verifiable_credentials_map: z.object({}) -}); - -communicationHandlerRouter.post('/handle', async (req, res) => { - - const generateAuthorizationRequestSchemaResult = generateAuthorizationRequestSchema.safeParse(req.body); - if (generateAuthorizationRequestSchemaResult.success) { - try { - const { legal_person_did } = req.body; - const result = await openidForCredentialIssuanceService.generateAuthorizationRequestURL(req.user.id, null, legal_person_did); - console.log("Succesfully handled by generateAuthorizationRequestURL"); - return res.send(result); - } - catch (err) { console.log(err) } - } - - const generateAuthorizationRequestWithOfferResult = generateAuthorizationRequestSchemaWithOffer.safeParse(req.body); - if (generateAuthorizationRequestWithOfferResult.success) { - try { - const { - url, - } = req.body; - const result = await openidForCredentialIssuanceService.generateAuthorizationRequestURL(req.user.id, url, null); - console.log("Successfully handled by generateAuthorizationRequestURL"); - return res.send(result); - } - catch (err) { console.log(JSON.stringify(err)) } - } - - const handleAuthorizationResponseSchemaResult = handleAuthorizationResponseSchema.safeParse(req.body); - if (handleAuthorizationResponseSchemaResult.success) { - try { - const { - url, - } = req.body; - - if (!(new URL(url).searchParams.get("code"))) { - throw new Error("No code was provided"); - } - const result = await openidForCredentialIssuanceService.handleAuthorizationResponse(req.user.id, url); - if (result.ok) { - console.log("Successfully handled by handleAuthorizationResponse"); - return res.send({}); - } - } - catch (err) { console.log(JSON.stringify(err)) } - } - - const requestCredentialsWithPreAuthorizedSchemaResult = requestCredentialsWithPreAuthorizedSchema.safeParse(req.body); - if (requestCredentialsWithPreAuthorizedSchemaResult.success) { - try { - const { - user_pin - } = req.body; - - const response = await openidForCredentialIssuanceService.requestCredentialsWithPreAuthorizedGrant(req.user.id, user_pin); - console.log("Response = ", response) - if (response.error) { - return res.status(401).send({ error: response.error }); - } - console.log("Successfully handled by requestCredentialsWithPreAuthorizedGrant"); - return res.send(response); - } - catch (err) { console.log(JSON.stringify(err)) } - } - - const handleSIOPRequestResult = handleSIOPRequestSchema.safeParse(req.body); - if (handleSIOPRequestResult.success) { - const { url, camera_was_used } = handleSIOPRequestResult.data; - try { - const outboundRequestResult = await openidForPresentationService.handleRequest(req.user.id, url, camera_was_used); - if (!outboundRequestResult.ok) { - if (outboundRequestResult.val == HandleOutboundRequestError.INSUFFICIENT_CREDENTIALS) { - return res.send({ error: HandleOutboundRequestError.INSUFFICIENT_CREDENTIALS }); - } - throw new Error("Failed to handle outbound request") - } - const outboundRequest = outboundRequestResult.val; - console.log("Outbound request = ", outboundRequest) - if (outboundRequest.conformantCredentialsMap && outboundRequest.verifierDomainName) { - const { conformantCredentialsMap, verifierDomainName } = outboundRequest; - // convert from map to JSON - const mapArray = Array.from(conformantCredentialsMap); - const conformantCredentialsMapJSON = Object.fromEntries(mapArray); - console.log("Successfully handled by handleRequest"); - return res.send({ conformantCredentialsMap: conformantCredentialsMapJSON, verifierDomainName }); - } - else if (outboundRequest.redirect_to) { - console.log("Successfully handled by handleRequest"); - return res.send({ redirect_to: outboundRequest.redirect_to }); - } - else { - const errText = `Error parsing authorization request: Outbound request error`; - throw new Error(errText) - } - } - catch (err) { console.log(JSON.stringify(err)) } - } - - const generateSIOPResponseSchemaResult = generateSIOPResponseSchema.safeParse(req.body); - if (generateSIOPResponseSchemaResult.success) { - const { - verifiable_credentials_map, // { "descriptor_id1": "urn:vid:123", "descriptor_id1": "urn:vid:645" } - } = req.body; - - console.log("Credentials map = ", verifiable_credentials_map) - const selection = new Map(Object.entries(verifiable_credentials_map)) as Map; - console.log("Selection = ", verifiable_credentials_map) - try { - const result = await openidForPresentationService.sendResponse(req.user.id, selection); - - if (!result.ok) { - return res.send({ error: SendResponseError.SEND_RESPONSE_ERROR }); - } - - const { redirect_to } = result.val; - console.log("Successfully handled by sendResponse"); - return res.send({ redirect_to }); - } - catch(error) { - const errText = `Error generating authorization response: ${error}`; - console.log(errText); - } - } - return res.status(400).send({ error: "Could not handle" }); -}); - -export { - communicationHandlerRouter -} diff --git a/src/routers/credential_issuer.router.ts b/src/routers/credential_issuer.router.ts new file mode 100644 index 0000000..3f66bc2 --- /dev/null +++ b/src/routers/credential_issuer.router.ts @@ -0,0 +1,21 @@ +import { Router } from "express"; +import { getAllCredentialIssuers } from "../entities/CredentialIssuer.entity"; + + +const credentialIssuerRouter = Router(); + + +credentialIssuerRouter.get('/all', async (req, res) => { + const result = await getAllCredentialIssuers(); + + if (result.err) { + return res.status(400).send({ error: "Error fetching credential issuers"}); + } + + res.send(result.val); +}) + + +export { + credentialIssuerRouter +} diff --git a/src/routers/helper.router.ts b/src/routers/helper.router.ts new file mode 100644 index 0000000..68da566 --- /dev/null +++ b/src/routers/helper.router.ts @@ -0,0 +1,43 @@ +import axios from "axios"; +import { Router } from "express"; +import https from 'https'; + + +const helperRouter = Router() + +const agent = new https.Agent({ + // rejectUnauthorized: false, // Accept self-signed certificates for testing purposes +}); + + +helperRouter.post('/get-cert', async (req, res) => { + axios.get(req.body.url, { httpsAgent: agent }).then((response) => { + const socket = response.request.socket; // Access the underlying socket + const certificate = socket.getPeerCertificate(true); // Get full certificate chain + + if (certificate) { + console.log("parsing cert...") + console.log('Subject:', certificate.subject); + console.log('Issuer:', certificate.issuer); + let cert = certificate; + let certChainPEM = []; + const x5c = []; + while (cert) { + const pemCert = `-----BEGIN CERTIFICATE-----\n${cert.raw.toString('base64').match(/.{1,64}/g).join('\n')}\n-----END CERTIFICATE-----\n`; + certChainPEM.push(pemCert); + x5c.push(cert.raw.toString('base64')); + cert = cert.issuerCertificate === cert ? null : cert.issuerCertificate; + } + return res.status(200).send({ x5c }); + } + return res.status(400).send({ error: "INVALID_CERT" }); + + }).catch((error) => { + console.error('Error fetching certificate:', error); + return res.status(400).send({ error: "INVALID_CERT" }); + }); +}) + +export { + helperRouter +} diff --git a/src/routers/legal_person.router.ts b/src/routers/legal_person.router.ts deleted file mode 100644 index e62dbcb..0000000 --- a/src/routers/legal_person.router.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Router } from "express"; -import { getAllLegalPersons } from "../entities/LegalPerson.entity"; - - - -const legalPersonRouter = Router(); - -legalPersonRouter.get('/issuers/all', async (req, res) => { - try { - const lps = (await getAllLegalPersons()).unwrap(); - return res.send(lps); - } - catch(e) { - return res.status(400).send({ error: "Failed to get legal persons", error_description: e }); - } -}) - -export { legalPersonRouter }; diff --git a/src/routers/proxy.router.ts b/src/routers/proxy.router.ts new file mode 100644 index 0000000..f9ac91d --- /dev/null +++ b/src/routers/proxy.router.ts @@ -0,0 +1,36 @@ +import axios from 'axios'; +import express, { Request, Response, Router } from 'express'; +const proxyRouter: Router = express.Router(); + +proxyRouter.post('/', async (req, res) => { + const { headers, method, url, data } = req.body; + try { + console.log("URL = ", url) + const response = await axios({ + url: url, + headers: headers, + method: method, + data: data, + maxRedirects: 0, + }); + + return res.status(200).send({ + status: response.status, + headers: response.headers, + data: response.data, + }) + } + catch (err) { + if (err.response && err.response.data) { + console.error("Error data = ", err.response.data) + } + if (err.response && err.response.status == 302) { + return res.status(200).send({ status: err.response.status, headers: err.response.headers, data: {} }) + } + return res.status(err.response?.status ?? 104).send({ err: { data: err.response?.data, headers: err.response?.headers } }); + } +}) + +export { + proxyRouter +} diff --git a/src/routers/storage.router.ts b/src/routers/storage.router.ts index 8a1473b..3af8db9 100644 --- a/src/routers/storage.router.ts +++ b/src/routers/storage.router.ts @@ -1,19 +1,47 @@ import express, { Request, Response, Router } from "express"; -import { getAllVerifiableCredentials, getVerifiableCredentialByCredentialIdentifier, deleteVerifiableCredential } from "../entities/VerifiableCredential.entity"; -import { getAllVerifiablePresentations, getPresentationByIdentifier } from "../entities/VerifiablePresentation.entity"; - +import { getAllVerifiableCredentials, getVerifiableCredentialByCredentialIdentifier, deleteVerifiableCredential, createVerifiableCredential } from "../entities/VerifiableCredential.entity"; +import { createVerifiablePresentation, deletePresentationsByCredentialId, getAllVerifiablePresentations, getPresentationByIdentifier } from "../entities/VerifiablePresentation.entity"; +import { sendPushNotification } from "../lib/firebase"; +import { getUser } from "../entities/user.entity"; const storageRouter: Router = express.Router(); - +storageRouter.post('/vc', storeCredential); storageRouter.get('/vc', getAllVerifiableCredentialsController); storageRouter.get('/vc/:credential_identifier', getVerifiableCredentialByCredentialIdentifierController); storageRouter.delete('/vc/:credential_identifier', deleteVerifiableCredentialController); +storageRouter.post('/vp', storeVerifiablePresentation); storageRouter.get('/vp', getAllVerifiablePresentationsController); storageRouter.get('/vp/:presentation_identifier', getPresentationByPresentationIdentifierController); +async function storeCredential(req: Request, res: Response) { + createVerifiableCredential({ + holderDID: req.user.did, + issuanceDate: new Date(), + ...req.body, + }).then(async () => { + // inform all installed instances of the wallet that a credential has been received + + const u = await getUser(req.user.id); + if (u.err) { + return res.send({}); + } + + const user = u.unwrap(); + if (user.fcmTokenList) { + for (const fcmToken of user.fcmTokenList) { + sendPushNotification(fcmToken.value, "New Credential", "A new verifiable credential is in your wallet").catch(err => { + console.log("Failed to send notification") + console.log(err) + }); + } + } + }) + res.send({}); +} + async function getAllVerifiableCredentialsController(req: Request, res: Response) { const holderDID = req.user.did; console.log("Holder did", holderDID) @@ -23,12 +51,11 @@ async function getAllVerifiableCredentialsController(req: Request, res: Response return; } const vc_list = vcListResult.unwrap() - .map((v) => { - return { - ...v, - issuanceDate: Math.floor(v.issuanceDate.getTime() / 1000) - } - }); + .map((v) => { + return { + ...v, + } + }); res.status(200).send({ vc_list: vc_list }) @@ -42,13 +69,13 @@ async function getVerifiableCredentialByCredentialIdentifierController(req: Requ return res.status(500).send({ error: vcFetchResult.val }) } const vc = vcFetchResult.unwrap(); - const changedVC = { ...vc, issuanceDate: Math.floor(vc.issuanceDate.getTime() / 1000)} res.status(200).send(vc); } async function deleteVerifiableCredentialController(req: Request, res: Response) { const holderDID = req.user.did; const { credential_identifier } = req.params; + await deletePresentationsByCredentialId(holderDID, credential_identifier) const deleteResult = await deleteVerifiableCredential(holderDID, credential_identifier); if (deleteResult.err) { return res.status(500).send({ error: deleteResult.val }); @@ -57,6 +84,16 @@ async function deleteVerifiableCredentialController(req: Request, res: Response) } +async function storeVerifiablePresentation(req, res) { + const holderDID = req.user.did; + const storableVerifiablePresentation = req.body; + await createVerifiablePresentation({ + ...storableVerifiablePresentation, + holderDID, + }); + + res.send({}); +} async function getAllVerifiablePresentationsController(req: Request, res: Response) { const holderDID = req.user.did; @@ -66,12 +103,11 @@ async function getAllVerifiablePresentationsController(req: Request, res: Respon return; } const vp_list = vpListResult.unwrap() - .map((v) => { - return { - ...v, - issuanceDate: Math.floor(v.issuanceDate.getTime() / 1000) - } - }); + .map((v) => { + return { + ...v, + } + }); res.status(200).send({ vp_list: vp_list }) } @@ -84,7 +120,6 @@ async function getPresentationByPresentationIdentifierController(req: Request, r return res.status(500).send({ error: vpResult.val }) } const vp = vpResult.unwrap(); - const changedVC = { ...vp, issuanceDate: Math.floor(vp.issuanceDate.getTime() / 1000)} res.status(200).send(vp); } diff --git a/src/routers/user.router.ts b/src/routers/user.router.ts index 82bb1c5..3504ae9 100644 --- a/src/routers/user.router.ts +++ b/src/routers/user.router.ts @@ -5,7 +5,7 @@ import * as SimpleWebauthn from '@simplewebauthn/server'; import base64url from 'base64url'; import { EntityManager } from "typeorm" -import config from '../../config'; +import { config } from '../../config'; import { CreateUser, createUser, deleteUser, deleteWebauthnCredential, getUserByCredentials, getUser, getUserByWebauthnCredential, GetUserErr, newWebauthnCredentialEntity, privateDataEtag, updateUser, UpdateUserErr, updateWebauthnCredential, updateWebauthnCredentialById, UserEntity, UserId } from '../entities/user.entity'; import { checkedUpdate, EtagUpdate, jsonParseTaggedBinary } from '../util/util'; import { AuthMiddleware, createAppToken } from '../middlewares/auth.middleware'; diff --git a/src/routers/verifier.router.ts b/src/routers/verifier.router.ts new file mode 100644 index 0000000..47119df --- /dev/null +++ b/src/routers/verifier.router.ts @@ -0,0 +1,21 @@ +import { Router } from "express"; +import { getAllVerifiers } from "../entities/Verifier.entity"; + + +const verifierRouter = Router(); + + +verifierRouter.get('/all', async (req, res) => { + const result = await getAllVerifiers(); + + if (result.err) { + return res.status(400).send({ error: "Error fetching verifiers"}); + } + + res.send(result.val); +}) + + +export { + verifierRouter +} diff --git a/src/routers/verifiers.router.ts b/src/routers/verifiers.router.ts deleted file mode 100644 index 91662fe..0000000 --- a/src/routers/verifiers.router.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Router } from "express"; -import { appContainer } from "../services/inversify.config"; -import { VerifierRegistryService } from "../services/VerifierRegistryService"; - - - -const verifiersRouter = Router(); -const verifiersRegistryService = appContainer.resolve(VerifierRegistryService) - - -verifiersRouter.get('/all', async (req, res) => { - res.send({ verifiers: await verifiersRegistryService.getAllVerifiers() }); -}); - -export default verifiersRouter; diff --git a/src/services/ClientKeystoreService.ts b/src/services/ClientKeystoreService.ts index bb859f0..d15e00b 100644 --- a/src/services/ClientKeystoreService.ts +++ b/src/services/ClientKeystoreService.ts @@ -5,7 +5,7 @@ import { Err, Ok, Result } from "ts-results"; import { AdditionalKeystoreParameters, SocketManagerServiceInterface, WalletKeystore, WalletKeystoreErr } from "./interfaces"; import { TYPES } from "./types"; -import config from "../../config"; +import { config } from "../../config"; import { SignatureAction, ServerSocketMessage } from "./shared.types"; import { UserId } from "../entities/user.entity"; @@ -14,10 +14,6 @@ import { UserId } from "../entities/user.entity"; @injectable() export class ClientKeystoreService implements WalletKeystore { - private readonly algorithm = config.alg; - - - constructor( @inject(TYPES.SocketManagerService) private socketManagerService: SocketManagerServiceInterface, ) { } diff --git a/src/services/DatabaseKeystoreService.ts b/src/services/DatabaseKeystoreService.ts deleted file mode 100644 index de40efd..0000000 --- a/src/services/DatabaseKeystoreService.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { SignJWT, importJWK } from "jose"; -import { randomUUID } from "crypto"; -import { inject, injectable } from "inversify"; -import "reflect-metadata"; -import { Err, Ok, Result } from "ts-results"; - -import { SignVerifiablePresentationJWT, WalletKey } from "@wwwallet/ssi-sdk"; -import { AdditionalKeystoreParameters, DidKeyUtilityService, RegistrationParams, WalletKeystore, WalletKeystoreErr } from "./interfaces"; -import { verifiablePresentationSchemaURL } from "../util/util"; -import { getUser, UserId } from "../entities/user.entity"; -import { TYPES } from "./types"; -import config from "../../config"; - - -@injectable() -export class DatabaseKeystoreService implements WalletKeystore { - - private readonly algorithm = config.alg; - - constructor( - @inject(TYPES.DidKeyUtilityService) private didKeyUtilityService: DidKeyUtilityService - ) { } - - - async initializeWallet(registrationParams: RegistrationParams): Promise> { - try { - const { did, key } = await this.didKeyUtilityService.generateKeyPair(); - return Ok({ did, key }); - } - catch(e) { - return Err(WalletKeystoreErr.FAILED_TO_GENERATE_KEYS); - } - } - - - async signJwtPresentation(userId: UserId, nonce: string, audience: string, verifiableCredentials: any[], additionalParameters: AdditionalKeystoreParameters): Promise> { - const user = (await getUser(userId)).unwrap(); - const keys = JSON.parse(user.keys.toString()) as WalletKey; - if (!keys.privateKey) { - return Err(WalletKeystoreErr.KEYS_UNAVAILABLE); - } - - const privateKey = await importJWK(keys.privateKey, keys.alg); - const jws = await new SignVerifiablePresentationJWT() - .setProtectedHeader({ - alg: this.algorithm, - typ: "JWT", - kid: keys.verificationMethod, - }) - .setVerifiableCredential(verifiableCredentials) - .setContext(["https://www.w3.org/2018/credentials/v1"]) - .setType(["VerifiablePresentation"]) - .setAudience(audience) - .setCredentialSchema( - verifiablePresentationSchemaURL, - "FullJsonSchemaValidator2021") - .setIssuer(user.did) - .setSubject(user.did) - .setHolder(user.did) - .setJti(`urn:id:${randomUUID()}`) - .setNonce(nonce) - .setIssuedAt() - .setExpirationTime('1m') - .sign(privateKey); - return Ok({ vpjwt: jws }); - } - - async generateOpenid4vciProof(userId: UserId, audience: string, nonce: string, additionalParameters: AdditionalKeystoreParameters): Promise> { - const user = (await getUser(userId)).unwrap(); - const keys = JSON.parse(user.keys.toString()) as WalletKey; - if (!keys.privateKey) { - return Err(WalletKeystoreErr.KEYS_UNAVAILABLE); - } - - const privateKey = await importJWK(keys.privateKey, keys.alg); - const header = { - alg: this.algorithm, - typ: "openid4vci-proof+jwt", - kid: keys.verificationMethod - }; - - const jws = await new SignJWT({ nonce: nonce }) - .setProtectedHeader(header) - .setIssuedAt() - .setIssuer(user.did) - .setAudience(audience) - // .setExpirationTime('1m') - .sign(privateKey); - return Ok({ proof_jwt: jws }); - } - -} diff --git a/src/services/EBSIDidKeyUtilityService.ts b/src/services/EBSIDidKeyUtilityService.ts deleted file mode 100644 index a5f0e9f..0000000 --- a/src/services/EBSIDidKeyUtilityService.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { injectable } from 'inversify'; -import 'reflect-metadata'; -import { DidKeyUtilityService } from './interfaces'; -import { JWK } from 'jose'; -import config from '../../config'; -import { NaturalPersonWallet, WalletKey, getPublicKeyFromDid } from '@wwwallet/ssi-sdk'; - - -@injectable() -export class EBSIDidKeyUtilityService implements DidKeyUtilityService { - - - async getPublicKeyJwk(did: string): Promise { - return await getPublicKeyFromDid(did); - } - - async generateKeyPair(): Promise<{ did: string, key: WalletKey }> { - const naturalPersonWallet: NaturalPersonWallet = await new NaturalPersonWallet().createWallet(config.alg); - return { did: naturalPersonWallet.key.did, key: naturalPersonWallet.key }; - } -} diff --git a/src/services/OpenidForCredentialIssuanceService.ts b/src/services/OpenidForCredentialIssuanceService.ts deleted file mode 100644 index 0f8d3ee..0000000 --- a/src/services/OpenidForCredentialIssuanceService.ts +++ /dev/null @@ -1,441 +0,0 @@ -import axios from "axios"; -import * as _ from 'lodash'; -import base64url from "base64url"; -import { injectable, inject } from "inversify"; -import "reflect-metadata"; -import { Err, Ok, Result } from "ts-results"; - -import { LegalPersonEntity, getLegalPersonByDID, getLegalPersonByUrl } from "../entities/LegalPerson.entity"; -import { CredentialIssuerMetadata, CredentialResponseSchemaType, CredentialSupportedJwtVcJson, GrantType, OpenidConfiguration, TokenResponseSchemaType, VerifiableCredentialFormat } from "../types/oid4vci"; -import config from "../../config"; -import { getUser, UserId } from "../entities/user.entity"; -import { sendPushNotification } from "../lib/firebase"; -import { generateCodeChallengeFromVerifier, generateCodeVerifier } from "../util/util"; -import { createVerifiableCredential } from "../entities/VerifiableCredential.entity"; -import { TYPES } from "./types"; -import { IssuanceErr, OpenidCredentialReceiving, WalletKeystore } from "./interfaces"; -import { randomUUID } from 'node:crypto'; - -type IssuanceState = { - userId: UserId; // Before Authorization Req - legalPerson: LegalPersonEntity; // Before Authorization Req - credentialIssuerMetadata: CredentialIssuerMetadata; // Before Authorization Req - openidConfiguration: OpenidConfiguration; // Before Authorization Req - issuer_state?: string; // parameter from the authorization request - authorization_details: CredentialSupportedJwtVcJson[]; // This is defined before the Authorization Req, and after the Token Response (if available) - code_verifier?: string; - code?: string; // set at Authorization Response - grant_type: GrantType, - tokenResponse?: TokenResponseSchemaType; // set at Token Response - credentialResponses?: CredentialResponseSchemaType[]; // set at Credential Response - user_pin?: string; // for pre-authorize flow only -} - -@injectable() -export class OpenidForCredentialIssuanceService implements OpenidCredentialReceiving { - - // identifierService: IdentifierService = new IdentifierService(); - // legalPersonService: LegalPersonService = new LegalPersonService(); - - - // key: UserEntity.uuid - public states = new Map(); - - constructor( - @inject(TYPES.WalletKeystoreManagerService) private walletKeystoreManagerService: WalletKeystore, - ) { } - - - async generateAuthorizationRequestURL(userId: UserId, credentialOfferURL?: string, legalPersonDID?: string): Promise<{ redirect_to?: string, preauth?: boolean, ask_for_pin?: boolean }> { - console.log("generateAuthorizationRequestURL userId = ", userId); - console.log("LP = ", legalPersonDID); - let issuerUrlString: string | null = null; - let credential_offer = null; - let issuer_state = null; - const client_metadata = { - jwks_uri: config.url + "/jwks", - vp_formats_supported: { - jwt_vp: { - alg: ["ES256"] - } - }, - response_types_supported: [ "vp_token", "id_token" ], - authorization_endpoint: config.walletClientUrl, - }; - - let lp: LegalPersonEntity; - - if (legalPersonDID) { - lp = (await getLegalPersonByDID(legalPersonDID)).unwrap(); - if (!lp) { - throw "No legal person found in the DB" - } - console.log("Selected legal person = ", lp) - issuerUrlString = lp.url; - } - else if (credentialOfferURL) { - console.log("Credential offer url = ", credentialOfferURL) - - credential_offer = new URL(credentialOfferURL).searchParams.get('credential_offer') - let credential_offer_uri = new URL(credentialOfferURL).searchParams.get('credential_offer_uri') - if (credential_offer_uri) { - credential_offer = (await axios.get(credential_offer_uri)).data; - } - else { - credential_offer = JSON.parse(credential_offer) - } - console.log("Credential offer = ", credential_offer) - - const credentialIssuerURL = credential_offer.credential_issuer as string; - lp = (await getLegalPersonByUrl(credentialIssuerURL)).unwrap(); - - if (!lp) { - const user = (await getUser(userId)).unwrap(); - // as client id we are going to use the userDid - lp = { did: null, friendlyName: "Tmp", client_id: user.did, id: -1, url: credentialIssuerURL } - } - - issuerUrlString = lp.url; - issuer_state = credential_offer?.grants.authorization_code?.issuer_state; - } - - if (!issuerUrlString) { - throw new Error("No issuer url is defined"); - } - - - - const credentialIssuerMetadata = (await axios.get(issuerUrlString + "/.well-known/openid-credential-issuer")).data as CredentialIssuerMetadata; - console.log("Credential issuer metadata") - console.dir(credentialIssuerMetadata, { depth: null }) - const authorizationServerConfig = (await axios.get(credentialIssuerMetadata.authorization_server + "/.well-known/openid-configuration")).data; - - // all credential supported will be added into the authorization details by default - const authorizationDetails: CredentialSupportedJwtVcJson[] = (credential_offer ? credential_offer.credentials : credentialIssuerMetadata.credentials_supported) - .map((cred_sup) => { - return { - format: cred_sup.format, - types: cred_sup.types, - type: "openid_credential", - locations: [ credentialIssuerMetadata.credential_issuer ] - }; - }); - - console.log("Credential offer = ", credential_offer) - if (credential_offer && credential_offer.grants["urn:ietf:params:oauth:grant-type:pre-authorized_code"]) { - this.states.set(userId.id, { - userId, - credentialIssuerMetadata: credentialIssuerMetadata, - openidConfiguration: authorizationServerConfig, - legalPerson: lp, - authorization_details: authorizationDetails, - issuer_state: issuer_state, - grant_type: GrantType.PRE_AUTHORIZED_CODE, - code: credential_offer.grants["urn:ietf:params:oauth:grant-type:pre-authorized_code"]["pre-authorized_code"] - }); - const user_pin_required = credential_offer.grants["urn:ietf:params:oauth:grant-type:pre-authorized_code"]["user_pin_required"]; - console.log("Redirecting to ... ", config.walletClientUrl + `?preauth=true&ask_for_pin=${user_pin_required}`) - return { preauth: true, ask_for_pin: user_pin_required } - } - - - - - - - const authorizationRequestURL = new URL(authorizationServerConfig.authorization_endpoint); - authorizationRequestURL.searchParams.append("scope", "openid"); - authorizationRequestURL.searchParams.append("client_id", lp.client_id); - - authorizationRequestURL.searchParams.append("redirect_uri", config.walletClientUrl); - - authorizationRequestURL.searchParams.append("authorization_details", JSON.stringify(authorizationDetails)); - const code_verifier = generateCodeVerifier(); - const code_challenge = await generateCodeChallengeFromVerifier(code_verifier); - authorizationRequestURL.searchParams.append("code_challenge", code_challenge); - authorizationRequestURL.searchParams.append("code_challenge_method", "S256"); - authorizationRequestURL.searchParams.append("response_type", "code"); - authorizationRequestURL.searchParams.append("issuer_state", issuer_state); - - authorizationRequestURL.searchParams.append("client_metadata", JSON.stringify(client_metadata)); - this.states.set(userId.id, { - userId, - authorization_details: authorizationDetails, - credentialIssuerMetadata: credentialIssuerMetadata, - openidConfiguration: authorizationServerConfig, - legalPerson: lp, - code_verifier: code_verifier, - issuer_state: issuer_state, - grant_type: GrantType.AUTHORIZATION_CODE - }) - console.log("generateAuthorizationRequest \n\t", authorizationRequestURL) - return { redirect_to: authorizationRequestURL.toString() }; - } - - - - public async requestCredentialsWithPreAuthorizedGrant(userId: UserId, user_pin: string): Promise<{error?: string}> { - let state = this.states.get(userId.id) - state = { ...state, user_pin: user_pin }; - this.states.set(userId.id, state); // save state with pin - - - return this.tokenRequest(state).then(tokenResponse => { - console.log("Token response on pre authorized = ", tokenResponse) - if (!tokenResponse) { - throw new Error("Token response is undefined"); - } - state = { ...state, tokenResponse } - this.states.set(userId.id, state); - this.credentialRequests(userId, state).catch(e => { - console.error("Credential requests failed with error : ", e) - }); - return {}; - }).catch((err) => { - if (err.response && err.response.data.error == "invalid_request") { - return { error: "invalid_request", ...err.response.data }; - } - else { - return { error: "unkown_error" }; - } - }); - - - } - - /** - * - * @param authorizationResponseURL - * @throws - */ - public async handleAuthorizationResponse(userId: UserId, authorizationResponseURL: string): Promise> { - const currentState = this.states.get(userId.id); - if (!currentState) { - return Err(IssuanceErr.STATE_NOT_FOUND); - } - - - const url = new URL(authorizationResponseURL); - const code = url.searchParams.get('code'); - if (!code) { - throw new Error("Code not received"); - } - if (currentState.code) { // if same code is received, then don't send Token Request again. - return; - } - let newState = { ...currentState, code }; - this.states.set(userId.id, newState); - - const tokenResponse = await this.tokenRequest(newState); - if (!tokenResponse) { - return; - } - newState = { ...newState, tokenResponse } - this.states.set(userId.id, newState); - try { - await this.credentialRequests(userId, newState); - } catch (e) { - console.error("Credential requests failed with error : ", e) - } - } - - - - /** - * @throws - * @param state - * @returns - */ - private async tokenRequest(state: IssuanceState): Promise { - // const basicAuthorizationB64 = Buffer.from(`${state.legalPerson.client_id}:${state.legalPerson.client_secret}`).toString("base64"); - const httpHeader = { - // "authorization": `Basic ${basicAuthorizationB64}`, - "Content-Type": "application/x-www-form-urlencoded" - }; - - const data = new URLSearchParams(); - switch (state.grant_type) { - case GrantType.AUTHORIZATION_CODE: - data.append('grant_type', 'authorization_code'); - data.append('code', state.code); - data.append('redirect_uri', config.walletClientUrl); - data.append('code_verifier', state.code_verifier); - data.append('client_id', state.legalPerson.client_id); - if (state.legalPerson.client_secret) { - data.append('client_secret', state.legalPerson.client_secret); - } - break; - case GrantType.PRE_AUTHORIZED_CODE: - data.append('grant_type', 'urn:ietf:params:oauth:grant-type:pre-authorized_code'); - data.append('pre-authorized_code', state.code); - data.append('user_pin', state.user_pin); - break; - default: - break; - } - - try { - const tokenEndpoint = state.openidConfiguration.token_endpoint; - const httpResponse = await axios.post(tokenEndpoint, data, { headers: httpHeader }); - const httpResponseBody = httpResponse.data as TokenResponseSchemaType; - return httpResponseBody; - } - catch(err) { - if (err.response) { - console.log("HTTP response error body = " + JSON.stringify(err.response.data)); - throw new Error(JSON.stringify(err.response.data)); - } - } - - } - - /** - * @throws - */ - private async credentialRequests(userId: UserId, state: IssuanceState): Promise> { - const c_nonce = state.tokenResponse.c_nonce; - const res = await this.walletKeystoreManagerService.generateOpenid4vciProof(userId, state.credentialIssuerMetadata.credential_issuer, c_nonce); - console.log("Result proof generation = ", res) - if (res.ok) { - const { proof_jwt } = res.val; - return Ok(await this.finishCredentialRequests(userId, state, proof_jwt)); - } - } - - private async finishCredentialRequests(userId: UserId, state: IssuanceState, proof_jwt: string) { - const credentialEndpoint = state.credentialIssuerMetadata.credential_endpoint; - - const httpHeader = { - "authorization": `Bearer ${state.tokenResponse.access_token}`, - }; - - let httpResponsePromises = state.authorization_details.map((authzDetail) => { - const httpBody = { - proof: { - proof_type: "jwt", - jwt: proof_jwt - }, - ...authzDetail - } - return axios.post(credentialEndpoint, httpBody, { headers: httpHeader }); - }) - - const responses = await Promise.allSettled(httpResponsePromises); - responses - .filter(res => res.status == 'rejected') - .map(res => res.status == 'rejected' ? res.reason : null) - .filter(resolvedResponse => resolvedResponse != null) - .map(response => { - console.error(`Failed credential (status, body) : (${response.response.status}, ${JSON.stringify(response.response.data)})`, ); - }); - - let credentialResponses = responses - .filter(res => res.status == 'fulfilled') - .map((res) => - res.status == "fulfilled" ? res.value.data as CredentialResponseSchemaType : null - ); - - // Prevent duplicate credential acceptance - this.states.delete(userId.id); - - for (const cr of credentialResponses) { - if (cr.acceptance_token) - this.checkConstantlyForPendingCredential(state, cr.acceptance_token); - } - - // remove the ones that are for deferred endpoint - credentialResponses = credentialResponses.filter((cres) => !cres.acceptance_token); - - for (const response of credentialResponses) { - console.log("Response = ", response) - this.handleCredentialStorage(state, response); - } - console.log("=====FINISHED OID4VCI") - return; - } - - // Deferred Credential only - private async checkConstantlyForPendingCredential(state: IssuanceState, acceptance_token: string) { - const defferedCredentialReqHeader = { - "authorization": `Bearer ${acceptance_token}`, - }; - - axios.post(state.credentialIssuerMetadata.deferred_credential_endpoint, - {}, - { headers: defferedCredentialReqHeader } ) - .then((res) => { - this.handleCredentialStorage(state, res.data); - }) - .catch(err => { - setTimeout(() => { - this.checkConstantlyForPendingCredential(state, acceptance_token); - }, 2000); - }) - - - } - - private async handleCredentialStorage(state: IssuanceState, credentialResponse: CredentialResponseSchemaType) { - const userRes = await getUser(state.userId); - if (userRes.err) { - return; - } - const user = userRes.unwrap(); - - const { legalPerson } = state; - console.log("Legal person = ", legalPerson) - const credentialPayload = JSON.parse(base64url.decode(credentialResponse.credential.split('.')[1])) - const type = credentialPayload.vc.type as string[]; - const metadata = (await axios.get(legalPerson.url + "/.well-known/openid-credential-issuer")).data as CredentialIssuerMetadata; - - - let logoUrl = config.url + "/alt-vc-logo.png"; - let background_color = "#D3D3D3"; - - const supportedCredential = metadata.credentials_supported.filter(cs => cs.format == credentialResponse.format && _.isEqual(cs.types, type))[0]; - if (supportedCredential) { - if (supportedCredential.display && - supportedCredential.display.length != 0 && - supportedCredential.display[0]?.logo && - supportedCredential.display[0]?.logo?.url) { - - logoUrl = supportedCredential.display[0].logo.url; - - } - - if (supportedCredential.display && supportedCredential.display.length != 0 && supportedCredential.display[0].background_color) { - background_color = supportedCredential.display[0].background_color; - } - } - - - createVerifiableCredential({ - issuerDID: credentialPayload.iss, - credentialIdentifier: randomUUID(), - credential: credentialResponse.credential, - holderDID: user.did, - issuerURL: legalPerson.url, - logoURL: logoUrl, - format: credentialResponse.format as VerifiableCredentialFormat, - backgroundColor: background_color, - issuanceDate: new Date(credentialPayload.iat * 1000), - issuerFriendlyName: legalPerson.friendlyName - }).then(success => { // when credential is stored, then send notification - if (success.err) { - return; - } - - console.log("Fcm token list = ", user.fcmTokenList) - if (user.fcmTokenList) { - for (const fcmToken of user.fcmTokenList) { - sendPushNotification(fcmToken.value, "New Credential", "A new verifiable credential is in your wallet").catch(err => { - console.log("Failed to send notification") - console.log(err) - }); - } - } - - }); - - } -} diff --git a/src/services/OpenidForPresentationService.ts b/src/services/OpenidForPresentationService.ts deleted file mode 100644 index 904ba7d..0000000 --- a/src/services/OpenidForPresentationService.ts +++ /dev/null @@ -1,454 +0,0 @@ -import axios from "axios"; -import { JSONPath } from "jsonpath-plus"; -import base64url from "base64url"; -import qs from "qs"; -import { inject, injectable } from "inversify"; -import "reflect-metadata"; -import { z } from 'zod'; -import { Err, Ok, Result } from "ts-results"; - -import { InputDescriptorType, Verify } from "@wwwallet/ssi-sdk"; -import { HandleOutboundRequestError, OutboundCommunication, SendResponseError, WalletKeystore } from "./interfaces"; -import { TYPES } from "./types"; -import { OutboundRequest } from "./types/OutboundRequest"; -import { getAllVerifiableCredentials } from "../entities/VerifiableCredential.entity"; -import { createVerifiablePresentation } from "../entities/VerifiablePresentation.entity"; -import { getUser, UserId } from "../entities/user.entity"; -import { VerifierRegistryService } from "./VerifierRegistryService"; -import { randomUUID, createHash } from "node:crypto"; -import config from "../../config"; -import { WalletKeystoreRequest, SignatureAction } from "./shared.types"; -import { - HasherAlgorithm, - HasherAndAlgorithm, - SdJwt, -} from '@sd-jwt/core'; - -type PresentationDefinition = { - id: string, - format: any; - input_descriptors: InputDescriptor[] -} - - - -const authorizationRequestSchema = z.object({ - client_id: z.string(), - response_type: z.string(), - scope: z.string(), - redirect_uri: z.string().optional(), - response_uri: z.string().optional(), - request: z.string().optional() -}); - - -type InputDescriptor = { - id: string, - constraints: { - fields: Field[]; - }, - name?: string, - purpose?: string, - format?: any -} - -// type Constraint = { -// fields: Field[], -// limit_disclosure?: "required" | "preferred" -// } - -type Field = { - path: string[], - id?: string, - purpose?: string, - name?: string, - filter?: string, - optional?: boolean -} - -type VerificationState = { - camera_was_used?: boolean; - holder_state?: string; - presentation_definition?: PresentationDefinition; - audience?: string; - nonce?: string; - response_uri?: string; - state?: string; -} - - -@injectable() -export class OpenidForPresentationService implements OutboundCommunication { - - // key: UserEntity.uuid - states = new Map(); - - - constructor( - @inject(TYPES.WalletKeystoreManagerService) private walletKeystoreManagerService: WalletKeystore, - @inject(TYPES.VerifierRegistryService) private verifierRegistryService: VerifierRegistryService, - ) { } - - async initiateVerificationFlow(userId: UserId, verifierId: number, scopeName: string): Promise<{ redirect_to?: string }> { - const verifier = (await this.verifierRegistryService.getAllVerifiers()).filter(ver => ver.id == verifierId)[0]; - console.log("User id = ", userId) - const userFetchRes = await getUser(userId); - if (userFetchRes.err) { - return {}; - } - const holder_state = randomUUID(); - this.states.set(userId.id, { holder_state }); - - const user = userFetchRes.unwrap(); - const url = new URL(verifier.url); - url.searchParams.append("scope", "openid " + scopeName); - url.searchParams.append("redirect_uri", config.walletClientUrl); - url.searchParams.append("client_id", user.did); - url.searchParams.append("response_type", "code"); - url.searchParams.append("state", holder_state); - return { redirect_to: url.toString() }; - } - - async handleRequest(userId: UserId, requestURL: string, camera_was_used: boolean): Promise> { - - try { - const url = new URL(requestURL); - const params = new URLSearchParams(url.search); - const paramEntries = [...params.entries()]; - - const jsonParams = Object.fromEntries(paramEntries); - authorizationRequestSchema.parse(jsonParams); // will throw error if input is not conforming to the schema - this.states.set(userId.id, { camera_was_used: camera_was_used }) - const result = await this.parseAuthorizationRequest(userId, requestURL); - if (result.err) { - return Err(result.val); - } - const { conformantCredentialsMap, verifierDomainName } = result.unwrap(); - console.log("Handle VP Req = " , { conformantCredentialsMap, verifierDomainName }) - return Ok({ - conformantCredentialsMap: conformantCredentialsMap, - verifierDomainName: verifierDomainName - }); - } - catch(err) { - console.error(err); - } - - return Ok({ }); - } - - - async sendResponse(userId: UserId, selection: Map): Promise> { - try { - return await this.generateAuthorizationResponse(userId, selection) - } - catch(err) { - console.error("Failed to generate authorization response.\nError details: ", err); - return Err(SendResponseError.SEND_RESPONSE_ERROR); - } - } - - private async parseAuthorizationRequest(userId: UserId, authorizationRequestURL: string): Promise, verifierDomainName: string}, HandleOutboundRequestError>> { - console.log("parseAuthorizationRequest userId = ", userId) - let client_id: string, - response_uri: string, - nonce: string, - presentation_definition: PresentationDefinition | null, - state: string | null; - try { - console.log("All search params = ", new URL(authorizationRequestURL).searchParams) - const params = new URL(authorizationRequestURL).searchParams; - // const searchParams = await this.authorizationRequestSearchParams(authorizationRequestURL); - client_id = params.get('client_id'); - response_uri = params.get('response_uri') ?? params.get('redirect_uri'); - nonce = params.get('nonce'); - state = params.get('state'); - presentation_definition = JSON.parse(params.get('presentation_definition')); - if (!presentation_definition) { - const url = params.get('presentation_definition_uri'); - try { - presentation_definition = (await axios.get(url)).data; - } - catch(err) { - throw "There is no way to get presentation definition"; - } - - } - } - catch(error) { - throw new Error(`Error fetching authorization request search params: ${error}`); - } - const currentState = this.states.get(userId.id); - this.states.set(userId.id, { - ...currentState, - presentation_definition, - audience: client_id, - nonce, - response_uri, - state - }); - - - console.log("State = ", this.states.get(userId.id)) - - - console.log("Definition = ", presentation_definition) - - let descriptors: InputDescriptorType[]; - try { - descriptors = JSONPath({ - path: "$.input_descriptors[*]", - json: presentation_definition, - }) as InputDescriptorType[]; - } - catch(error) { - throw new Error(`Error fetching input descriptors from presentation_definition: ${error}`); - } - - const user = (await getUser(userId)).unwrap(); - - try { - const verifiableCredentialsRes = await getAllVerifiableCredentials(user.did); - if (verifiableCredentialsRes.err) { - throw "Failed to fetch credentials" - } - const vcList = verifiableCredentialsRes.unwrap(); - console.log("Descriptors = ") - console.dir(descriptors, { depth: null }); - console.log("VC list size = ", vcList.length) - - - const mapping = new Map(); - for (const descriptor of descriptors) { - console.log("Descriptor :") - console.dir(descriptor, { depth: null }) - const conformingVcList = [] - for (const vc of vcList) { - // if this vc format is not supported by the verifier, then skip this vc - if (!Object.keys(presentation_definition.format).includes(vc.format)) { - continue; - } - - if (Verify.verifyVcJwtWithDescriptor(descriptor, vc.credential)) { - conformingVcList.push(vc.credentialIdentifier); - } - } - if (conformingVcList.length == 0) { - return Err(HandleOutboundRequestError.INSUFFICIENT_CREDENTIALS); - } - const requestedFieldNames = descriptor.constraints.fields - .map((field) => field.path) - .reduce((accumulator, currentValue) => [...accumulator, ...currentValue]) - .map((field) => field.split('.')[field.split('.').length - 1]); - mapping.set(descriptor.id, { credentials: [ ...conformingVcList ], requestedFields: requestedFieldNames }); - } - console.log("Mapping1 = ", mapping) - console.log("Redirect uri = ", response_uri) - const verifierDomainName = new URL(response_uri).hostname; - console.log("Verifier domain = ", verifierDomainName) - if (mapping.size == 0) { - console.log("Credentials don't satisfy any descriptor") - throw new Error("Credentials don't satisfy any descriptor"); - } - console.log("Mapping = ", mapping) - return Ok({ conformantCredentialsMap: mapping, verifierDomainName: verifierDomainName }) - } - catch(error) { - throw new Error(`Error verifying credentials meeting requirements from input_descriptors: ${error}`) - } - } - - - /** - * selection: (key: descriptor_id, value: credentialIdentifier from VerifiableCredential DB entity) - */ - private async generateVerifiablePresentation(selection: Map, presentation_definition: PresentationDefinition, userId: UserId): Promise> { - - const hasherAndAlgorithm: HasherAndAlgorithm = { - hasher: (input: string) => createHash('sha256').update(input).digest(), - algorithm: HasherAlgorithm.Sha256 - } - - /** - * - * @param paths example: [ '$.credentialSubject.image', '$.credentialSubject.grade', '$.credentialSubject.val.x' ] - * @returns example: { credentialSubject: { image: true, grade: true, val: { x: true } } } - */ - const generatePresentationFrameForPaths = (paths) => { - const result = {}; - - paths.forEach((path) => { - const keys = path.split(".").slice(1); // Splitting and removing the initial '$' - let nestedObj = result; - - keys.forEach((key, index) => { - if (index === keys.length - 1) { - nestedObj[key] = true; // Setting the innermost key to true - } - else { - nestedObj[key] = nestedObj[key] || {}; // Creating nested object if not exists - nestedObj = nestedObj[key]; // Moving to the next nested object - } - }); - }); - return result; - }; - const user = (await getUser(userId)).unwrap(); - let vcListRes = await getAllVerifiableCredentials(user.did); - if (vcListRes.err) { - throw "Failed to fetch credentials"; - } - const allSelectedCredentialIdentifiers = Array.from(selection.values()); - - const filteredVCEntities = vcListRes - .unwrap() - .filter((vc) => - allSelectedCredentialIdentifiers.includes(vc.credentialIdentifier), - ); - - let selectedVCs = []; - for (const [descriptor_id, credentialIdentifier] of selection) { - const vcEntity = filteredVCEntities.filter((vc) => vc.credentialIdentifier == credentialIdentifier)[0]; - if (vcEntity.format == "vc+sd-jwt") { - const descriptor = presentation_definition.input_descriptors.filter((desc) => desc.id == descriptor_id)[0]; - const allPaths = descriptor.constraints.fields - .map((field) => field.path) - .reduce((accumulator, currentValue) => [...accumulator, ...currentValue]); - let presentationFrame = generatePresentationFrameForPaths(allPaths); - presentationFrame = { vc: presentationFrame } - const sdJwt = SdJwt.fromCompact, any>( - vcEntity.credential - ).withHasher(hasherAndAlgorithm) - console.log(sdJwt); - const presentation = await sdJwt.present(presentationFrame); - selectedVCs.push(presentation); - } - else { - selectedVCs.push(vcEntity.credential); - } - - } - - const fetchedState = this.states.get(userId.id); - console.log(fetchedState); - const { audience, nonce } = fetchedState; - - - const result = await this.walletKeystoreManagerService.signJwtPresentation(userId, nonce, audience, selectedVCs); - if (!result.ok) { - return Err({ - action: SignatureAction.signJwtPresentation, - nonce, - audience, - verifiableCredentials: selectedVCs, - }); - } - - return Ok(result.val.vpjwt); - } - - private async generateAuthorizationResponse(userId: UserId, selection: Map): Promise> { - console.log("generateAuthorizationResponse userId = ", userId) - const allSelectedCredentialIdentifiers = Array.from(selection.values()); - - const { did } = (await getUser(userId)).unwrap(); - console.log("Verifiable credentials map = ", selection) - const user = (await getUser(userId)).unwrap(); - let vcListRes = await getAllVerifiableCredentials(user.did); - if (vcListRes.err) { - throw "Failed to fetch credentials" - } - const filteredVCEntities = vcListRes.unwrap() - .filter((vc) => - allSelectedCredentialIdentifiers.includes(vc.credentialIdentifier) - ); - - try { - const fetchedState = this.states.get(userId.id); - const vp_token_result = await this.generateVerifiablePresentation(selection, fetchedState.presentation_definition, userId); - if (vp_token_result.err) { - return Err(vp_token_result.val); - } - - const vp_token: string = vp_token_result.val as string; - const {presentation_definition, response_uri, state} = this.states.get(userId.id); - // console.log("vp token = ", vp_token) - // console.log("Presentation definition from state is = "); - // console.dir(presentation_definition, { depth: null }); - const matchesPresentationDefinitionRes = await Verify.getMatchesForPresentationDefinition(vp_token, presentation_definition); - if(matchesPresentationDefinitionRes == null) { - throw new Error("Credentials presented do not match presentation definition requested"); - } - - const {presentationSubmission} = matchesPresentationDefinitionRes; - - // let counter = 0 - - // for (let i = 0; i < presentationSubmission.descriptor_map.length; i++) { - // presentationSubmission.descriptor_map[i].path_nested["id"] = `${randomUUID()}` - // } - console.log("Submission: ") - console.dir(presentationSubmission, { depth: null }); - - const directPostPayload = { - vp_token: vp_token, - // presentation_submission: encodeURI(JSON.stringify(presentationSubmission)), - presentation_submission: JSON.stringify(presentationSubmission), - state: state - }; - const { newLocation } = await axios.post(response_uri, qs.stringify(directPostPayload), { - maxRedirects: 0, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - } - }).then(result => { - return { newLocation: null } - }).catch(e => { - if (e.response) { - console.log("Body of response = ", e.response.data) - if (e.response.headers.location) { // if new location is defined - console.log("Loc: ", e.response.headers.location); - const newLocation = e.response.headers.location as string; - console.error("Body of Error = ", e.response.data) - const url = new URL(newLocation) - console.log("Pure url of loc: ", url) - const errorMsg = url.searchParams.get('error'); - const errorDesc = url.searchParams.get('error_description'); - console.log("error description = ", errorDesc) - return { newLocation } - } - else { - return { newLocation: null }; - } - - } - }); - - if (!newLocation) { - throw "Direct post failed"; - } - const vpPayload = JSON.parse(base64url.decode(vp_token.split('.')[1])); - console.log("Credential identifiers = ", filteredVCEntities.map((vc) => vc.credentialIdentifier)) - createVerifiablePresentation({ - holderDID: did, - issuanceDate: vpPayload.vp.issuanceDate, - presentation: vp_token, - includedVerifiableCredentialIdentifiers: filteredVCEntities.map((vc) => vc.credentialIdentifier), - presentationIdentifier: vpPayload.jti, - presentationSubmission: presentationSubmission, - audience: new URL(vpPayload.aud).hostname, - format: "jwt_vp" - }); - - const verificationState = this.states.get(userId.id); - if (verificationState && verificationState.camera_was_used) { - return Ok({ }) - } - return Ok({ redirect_to: newLocation }); - } - catch(error) { - throw new Error(`Error generating Verifiable Presentation: ${error}`); - } - } - -} diff --git a/src/services/SocketManagerService.ts b/src/services/SocketManagerService.ts index 2e017b0..3d73f18 100644 --- a/src/services/SocketManagerService.ts +++ b/src/services/SocketManagerService.ts @@ -5,7 +5,7 @@ import http from 'http'; import { Err, Ok, Result } from "ts-results"; import { ServerSocketMessage, ClientSocketMessage, SignatureAction } from "./shared.types"; import { jwtVerify } from "jose"; -import config from "../../config"; +import { config } from "../../config"; import { UserId } from "../entities/user.entity"; const openSockets = new Map(); diff --git a/src/services/W3CDidKeyUtilityService.ts b/src/services/W3CDidKeyUtilityService.ts deleted file mode 100644 index 27e6d85..0000000 --- a/src/services/W3CDidKeyUtilityService.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { injectable } from 'inversify'; -import 'reflect-metadata'; -import { DidKeyUtilityService } from './interfaces'; -import { JWK } from 'jose'; -import * as ed25519 from "@transmute/did-key-ed25519"; -import * as crypto from "node:crypto"; -import { WalletKey } from '@wwwallet/ssi-sdk'; - - -@injectable() -export class W3CDidKeyUtilityService implements DidKeyUtilityService { - - - async getPublicKeyJwk(did: string): Promise { - const result = await ed25519.resolve(did, { accept: 'application/did+json' }); - const verificationMethod = result.didDocument.verificationMethod[0] as any; - return verificationMethod.publicKeyJwk as JWK; - } - - async generateKeyPair(): Promise<{ did: string, key: WalletKey }> { - const { didDocument, keys } = await ed25519.generate( - { - secureRandom: () => { - return crypto.randomBytes(32); - }, - }, - { accept: 'application/did+json' } - ); - console.log("DID document = ", didDocument) - console.log("Keys = ", keys); - const key: WalletKey = { - privateKey: keys[0].privateKeyJwk, - publicKey: keys[0].publicKeyJwk, - alg: 'EdDSA', - verificationMethod: didDocument.id + '#' + didDocument.id.split(':')[2], - did: didDocument.id - }; - - return { did: didDocument.id, key: key }; - } -} diff --git a/src/services/WalletKeystoreManagerService.ts b/src/services/WalletKeystoreManagerService.ts index 97d26e6..5b774b6 100644 --- a/src/services/WalletKeystoreManagerService.ts +++ b/src/services/WalletKeystoreManagerService.ts @@ -1,9 +1,9 @@ import { inject, injectable } from "inversify"; -import { AdditionalKeystoreParameters, DidKeyUtilityService, RegistrationParams, WalletKeystore, WalletKeystoreErr, WalletKeystoreManager } from "./interfaces"; -import { Err, Ok, Result } from "ts-results"; +import { AdditionalKeystoreParameters, RegistrationParams, WalletKeystore, WalletKeystoreErr, WalletKeystoreManager } from "./interfaces"; +import { Ok, Result } from "ts-results"; import 'reflect-metadata'; import { TYPES } from "./types"; -import { UserId, WalletType, getUser } from "../entities/user.entity"; +import { UserId, WalletType } from "../entities/user.entity"; /** * This class is responsible for deciding which WalletKeystore will be used each time depending on the user @@ -13,63 +13,25 @@ export class WalletKeystoreManagerService implements WalletKeystoreManager { constructor( @inject(TYPES.ClientKeystoreService) private clientWalletKeystoreService: WalletKeystore, - @inject(TYPES.DatabaseKeystoreService) private databaseKeystoreService: WalletKeystore, - @inject(TYPES.DidKeyUtilityService) private didKeyUtilityService: DidKeyUtilityService ) { } async initializeWallet(registrationParams: RegistrationParams): Promise> { const fcmToken = registrationParams.fcm_token ? registrationParams.fcm_token : ""; - - // depending on additionalParameters, decide to use the corresponding keystore service - if (registrationParams.privateData) { - return Ok({ - fcmToken, - keys: Buffer.from(""), - displayName: registrationParams.displayName, - privateData: Buffer.from(registrationParams.privateData), - walletType: WalletType.CLIENT - }); - } - else { - try { - console.log("Regular database") - const { key } = await this.didKeyUtilityService.generateKeyPair(); - return Ok({ - fcmToken, - keys: Buffer.from(JSON.stringify(key)), - displayName: registrationParams.displayName, - privateData: Buffer.from(""), - walletType: WalletType.DB - }); - } - catch(e) { - return Err(WalletKeystoreErr.FAILED_TO_GENERATE_KEYS); - } - } + return Ok({ + fcmToken, + keys: Buffer.from(""), + displayName: registrationParams.displayName, + privateData: Buffer.from(registrationParams.privateData), + walletType: WalletType.CLIENT + }); } async signJwtPresentation(userId: UserId, nonce: string, audience: string, verifiableCredentials: any[], additionalParameters?: AdditionalKeystoreParameters): Promise> { - const userRes = await getUser(userId) - if (userRes.err) { - return Err(WalletKeystoreErr.KEYS_UNAVAILABLE); - } - const user = userRes.unwrap(); - if (user.walletType != WalletType.DB) - return await this.clientWalletKeystoreService.signJwtPresentation(userId, nonce, audience, verifiableCredentials, additionalParameters); - else - return await this.databaseKeystoreService.signJwtPresentation(userId, nonce, audience, verifiableCredentials, additionalParameters); + return await this.clientWalletKeystoreService.signJwtPresentation(userId, nonce, audience, verifiableCredentials, additionalParameters); } async generateOpenid4vciProof(userId: UserId, audience: string, nonce: string, additionalParameters?: AdditionalKeystoreParameters): Promise> { - const userRes = await getUser(userId) - if (userRes.err) { - return Err(WalletKeystoreErr.KEYS_UNAVAILABLE); - } - const user = userRes.unwrap(); - if (user.walletType != WalletType.DB) - return await this.clientWalletKeystoreService.generateOpenid4vciProof(userId, audience, nonce, additionalParameters); - else - return await this.databaseKeystoreService.generateOpenid4vciProof(userId, audience, nonce, additionalParameters); + return await this.clientWalletKeystoreService.generateOpenid4vciProof(userId, audience, nonce, additionalParameters); } } diff --git a/src/services/interfaces.ts b/src/services/interfaces.ts index 65e62cd..0357e08 100644 --- a/src/services/interfaces.ts +++ b/src/services/interfaces.ts @@ -1,10 +1,7 @@ import { JWK } from "jose"; import { Result } from "ts-results"; -import { LegalPersonEntity } from "../entities/LegalPerson.entity"; -import { OutboundRequest } from "./types/OutboundRequest"; import http from 'http'; import { WalletKeystoreRequest, ServerSocketMessage, SignatureAction, ClientSocketMessage } from "./shared.types"; -import { WalletKey } from "@wwwallet/ssi-sdk"; import { UserId, WalletType } from "../entities/user.entity"; export interface OpenidCredentialReceiving { @@ -34,7 +31,7 @@ export type AdditionalKeystoreParameters = { export type RegistrationParams = { fcm_token?: string; - keys?: WalletKey; + keys?: any; privateData?: Buffer; displayName: string; } @@ -61,21 +58,9 @@ export enum WalletKeystoreErr { } - -export interface OutboundCommunication { - initiateVerificationFlow(userId: UserId, verifierId: number, scopeName: string): Promise<{ redirect_to?: string }>; - handleRequest(userId: UserId, requestURL: string, camera_was_used: boolean): Promise>; - sendResponse(userId: UserId, selection: Map): Promise>; -} - - -export interface LegalPersonsRegistry { - getByIdentifier(did: string): Promise; -} - export interface DidKeyUtilityService { getPublicKeyJwk(did: string): Promise; - generateKeyPair(): Promise<{ did: string, key: WalletKey }> + generateKeyPair(): Promise<{ did: string, key: any }> } diff --git a/src/services/inversify.config.ts b/src/services/inversify.config.ts index ef5e049..5062ff2 100644 --- a/src/services/inversify.config.ts +++ b/src/services/inversify.config.ts @@ -1,14 +1,7 @@ import { Container } from "inversify"; import { TYPES } from "./types"; -import { OpenidCredentialReceiving, OutboundCommunication, WalletKeystore, DidKeyUtilityService, SocketManagerServiceInterface, WalletKeystoreManager } from "./interfaces"; -import { OpenidForCredentialIssuanceService } from "./OpenidForCredentialIssuanceService"; -import { OpenidForPresentationService } from "./OpenidForPresentationService"; +import { WalletKeystore, SocketManagerServiceInterface, WalletKeystoreManager } from "./interfaces"; import "reflect-metadata"; -import { DatabaseKeystoreService } from "./DatabaseKeystoreService"; -import config from "../../config"; -import { W3CDidKeyUtilityService } from "./W3CDidKeyUtilityService"; -import { VerifierRegistryService } from "./VerifierRegistryService"; -import { EBSIDidKeyUtilityService } from "./EBSIDidKeyUtilityService"; import { SocketManagerService } from "./SocketManagerService"; import { ClientKeystoreService } from "./ClientKeystoreService"; import { WalletKeystoreManagerService } from "./WalletKeystoreManagerService"; @@ -19,42 +12,10 @@ const appContainer = new Container(); appContainer.bind(TYPES.ClientKeystoreService) .to(ClientKeystoreService) -appContainer.bind(TYPES.DatabaseKeystoreService) - .to(DatabaseKeystoreService) appContainer.bind(TYPES.WalletKeystoreManagerService) .to(WalletKeystoreManagerService) -switch (config.servicesConfiguration.issuanceService) { -case "OpenidForCredentialIssuanceService": - appContainer.bind(TYPES.OpenidForCredentialIssuanceService) - .to(OpenidForCredentialIssuanceService) - break; -} - -appContainer.bind(TYPES.OpenidForPresentationService) - .to(OpenidForPresentationService) - - -if (!config.servicesConfiguration.didKeyService) { - throw new Error("config.servicesConfiguration.didKeyService not set on configuration file"); -} - -switch (config.servicesConfiguration.didKeyService) { -case "W3C": - appContainer.bind(TYPES.DidKeyUtilityService) - .to(W3CDidKeyUtilityService) - break; -case "EBSI": - appContainer.bind(TYPES.DidKeyUtilityService) - .to(EBSIDidKeyUtilityService) - break; -default: - throw new Error("config.servicesConfiguration.didKeyService must have value 'EBSI' or 'W3C'"); -} - -appContainer.bind(TYPES.VerifierRegistryService) - .to(VerifierRegistryService) appContainer.bind(TYPES.SocketManagerService) diff --git a/src/services/types.ts b/src/services/types.ts index d282639..4bc5a6c 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -5,18 +5,6 @@ const TYPES = { DatabaseKeystoreService: Symbol.for("DatabaseKeystoreService"), ClientKeystoreService: Symbol.for("ClientKeystoreService"), WalletKeystoreManagerService: Symbol.for("WalletKeystoreManagerService"), - - - // OpenidCredentialReceiving: Symbol.for("OpenidCredentialReceiving"), - OpenidForCredentialIssuanceService: Symbol.for("OpenidForCredentialIssuanceService"), - - - // OutboundCommunication: Symbol.for("OutboundCommunication"), - OpenidForPresentationService: Symbol.for("OpenidForPresentationService"), - - - DidKeyUtilityService: Symbol.for("DidKeyUtilityService"), - VerifierRegistryService: Symbol.for("VerifierRegistryService"), SocketManagerService: Symbol.for("SocketManagerService") }; diff --git a/src/services/types/OutboundRequest.ts b/src/services/types/OutboundRequest.ts deleted file mode 100644 index 04b3af5..0000000 --- a/src/services/types/OutboundRequest.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type OutboundRequest = { - redirect_to?: string; - conformantCredentialsMap?: Map - verifierDomainName?: string -} diff --git a/src/webauthn.ts b/src/webauthn.ts index 3a8461c..2226af1 100644 --- a/src/webauthn.ts +++ b/src/webauthn.ts @@ -1,4 +1,4 @@ -import config from '../config'; +import { config } from '../config'; import { UserId, WebauthnCredentialEntity } from './entities/user.entity'; diff --git a/yarn.lock b/yarn.lock index b9b0660..224a038 100644 --- a/yarn.lock +++ b/yarn.lock @@ -37,27 +37,6 @@ resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-win32-x64/-/cbor-extract-win32-x64-2.1.1.tgz#21b11a1a3f18c3e7d62fd5f87438b7ed2c64c1f7" integrity sha512-2Niq1C41dCRIDeD8LddiH+mxGlO7HJ612Ll3D/E73ZWBmycued+8ghTr/Ho3CMOWPUEr08XtyBMVXAjqF+TcKw== -"@cef-ebsi/ebsi-did-resolver@^3.1.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@cef-ebsi/ebsi-did-resolver/-/ebsi-did-resolver-3.2.0.tgz#2e7dadc0f071468bc6fa90c2da4ca28997334e23" - integrity sha512-4wM5TK5l6xRBSkOCEZRP64Xqsd0BqmvjfSpREn8fXbrpMZqOafku77YQSMzqFmOIQ62HSEi5Vf4CSzDHAmalig== - dependencies: - axios "^1.4.0" - did-resolver "^4.1.0" - jose "^4.14.4" - multiformats "^9.9.0" - -"@cef-ebsi/key-did-resolver@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@cef-ebsi/key-did-resolver/-/key-did-resolver-1.1.0.tgz#3523a824c34ac0a52c416d1c91938541e153a05d" - integrity sha512-fx8otCet0vRM/PnndGHHhuWBy5EpX142RsfKT3DTH8/a3Yjkdo8S+C9bGHbDdc6PowPyp4FgF/6XVQUH45iu1A== - dependencies: - did-resolver "^4.1.0" - jose "^4.14.4" - lodash.isplainobject "^4.0.6" - multiformats "^9.9.0" - web-encoding "^1.1.5" - "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -363,18 +342,6 @@ protobufjs "^7.0.0" yargs "^16.2.0" -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hexagon/base64@^1.1.25": version "1.1.27" resolved "https://registry.yarnpkg.com/@hexagon/base64/-/base64-1.1.27.tgz#f145fbb6242fe7d997b43dbadfa241567c279f79" @@ -482,24 +449,6 @@ pvtsutils "^1.3.2" tslib "^2.4.0" -"@peculiar/json-schema@^1.1.12": - version "1.1.12" - resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" - integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== - dependencies: - tslib "^2.0.0" - -"@peculiar/webcrypto@^1.1.6": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz#078b3e8f598e847b78683dc3ba65feb5029b93a7" - integrity sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A== - dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - pvtsutils "^1.3.2" - tslib "^2.5.0" - webcrypto-core "^1.7.7" - "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -553,56 +502,44 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== -"@redis/bloom@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@redis/bloom/-/bloom-1.2.0.tgz#d3fd6d3c0af3ef92f26767b56414a370c7b63b71" - integrity sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg== - -"@redis/client@1.5.11": - version "1.5.11" - resolved "https://registry.yarnpkg.com/@redis/client/-/client-1.5.11.tgz#5ee8620fea56c67cb427228c35d8403518efe622" - integrity sha512-cV7yHcOAtNQ5x/yQl7Yw1xf53kO0FNDTdDU6bFIMbW6ljB7U7ns0YRM+QIkpoqTAt6zK5k9Fq0QWlUbLcq9AvA== +"@sd-jwt/core@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.2.1.tgz#75b0b273758e6be050e042a75bd6a0c4a2a7258e" + integrity sha512-8auyt3mfzgAK+IP9mNc3kSONdo5x2Y8ypNj5gHKP7N81nVeyI+DHethoPQv84JVcqYYcNwHwyrc2Z5k7rg2lFQ== dependencies: - cluster-key-slot "1.1.2" - generic-pool "3.9.0" - yallist "4.0.0" + "@sd-jwt/decode" "0.2.1" + "@sd-jwt/present" "0.2.1" + "@sd-jwt/types" "0.2.1" + "@sd-jwt/utils" "0.2.1" -"@redis/graph@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@redis/graph/-/graph-1.1.0.tgz#cc2b82e5141a29ada2cce7d267a6b74baa6dd519" - integrity sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg== - -"@redis/json@1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@redis/json/-/json-1.0.6.tgz#b7a7725bbb907765d84c99d55eac3fcf772e180e" - integrity sha512-rcZO3bfQbm2zPRpqo82XbW8zg4G/w4W3tI7X8Mqleq9goQjAGLL7q/1n1ZX4dXEAmORVZ4s1+uKLaUOg7LrUhw== - -"@redis/search@1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@redis/search/-/search-1.1.5.tgz#682b68114049ff28fdf2d82c580044dfb74199fe" - integrity sha512-hPP8w7GfGsbtYEJdn4n7nXa6xt6hVZnnDktKW4ArMaFQ/m/aR7eFvsLQmG/mn1Upq99btPJk+F27IQ2dYpCoUg== - -"@redis/time-series@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.0.5.tgz#a6d70ef7a0e71e083ea09b967df0a0ed742bc6ad" - integrity sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg== +"@sd-jwt/decode@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.2.1.tgz#e0fb32dd2a95440ad69237e66ea2cd4770ec7e09" + integrity sha512-rs55WB3llrMObxN8jeMl06km/h0WivO9jSWNubO9JUIdlfrVhssU38xoXakvQeSDjAJkUUhfZcvmC2vNo1X6Wg== + dependencies: + "@sd-jwt/types" "0.2.1" + "@sd-jwt/utils" "0.2.1" -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== +"@sd-jwt/present@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.2.1.tgz#ff9958626b271a60d539dd1e601763ff33c024e8" + integrity sha512-yWIAR2C/q1jNUwzAeUlUcf3WCTEcSSGo9pltHW5AXptELjyaWGSmC5p6o9ucDXHvBnicfPONhe5OdUCSpiCntw== dependencies: - "@hapi/hoek" "^9.0.0" + "@sd-jwt/types" "0.2.1" + "@sd-jwt/utils" "0.2.1" -"@sideway/formula@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" - integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== +"@sd-jwt/types@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.2.1.tgz#e1e6b47728dffa90ed244e15e2253bd01793cb96" + integrity sha512-nbNik/cq6UIMsN144FcgPZQzaqIsjEEj307j3ZSFORkQBR4Tsmcj54aswTuNh0Z0z/4aSbfw14vOKBZvRWyVLQ== -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== +"@sd-jwt/utils@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.2.1.tgz#35ad83232eab2de911e765d93222acd871982a5e" + integrity sha512-9eRrge44dhE3fenawR/RZGxP5iuW9DtgdOVANu/JK5PEl80r0fDsMwm/gDjuv8OgLDCmQ6uSaVte1lYaTG71bQ== + dependencies: + "@sd-jwt/types" "0.2.1" + buffer "*" "@simplewebauthn/iso-webcrypto@^7.4.0": version "7.4.0" @@ -641,31 +578,6 @@ resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.3.tgz#1185726610acc37317ddab11c3c7f9066966bd20" integrity sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg== -"@stablelib/aead@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aead/-/aead-1.0.1.tgz#c4b1106df9c23d1b867eb9b276d8f42d5fc4c0c3" - integrity sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg== - -"@stablelib/aes-kw@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aes-kw/-/aes-kw-1.0.1.tgz#43f25517f719d69bb995909a5b69a2d9172c2a93" - integrity sha512-KrOkiRex1tQTbWk+hFB5fFw4vqKhNnTUtlCRf1bhUEOFp7hadWe49/sLa/P4X4FBQVoh3Z9Lj0zS1OWu/AHA1w== - dependencies: - "@stablelib/aes" "^1.0.1" - "@stablelib/binary" "^1.0.1" - "@stablelib/blockcipher" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/aes@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/aes/-/aes-1.0.1.tgz#f2a8aec2cebaf0e69be2b49c7c57b4267867ffa5" - integrity sha512-bMiezJDeFONDHbMEa+Kic26962+bwkZfsHPAmcqTjLaHCAhEQuK3i1H0POPOkcHCdj75oVRIqFCraCA0cyHPvw== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/blockcipher" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - "@stablelib/binary@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f" @@ -673,42 +585,12 @@ dependencies: "@stablelib/int" "^1.0.1" -"@stablelib/blockcipher@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/blockcipher/-/blockcipher-1.0.1.tgz#535f067d147ecdc9625ccd2b0d129f6d53d563d2" - integrity sha512-4bkpV8HUAv0CgI1fUqkPUEEvv3RXQ3qBkuZaSWhshXGAz1JCpriesgiO9Qs4f0KzBJkCtvcho5n7d/RKvnHbew== - "@stablelib/bytes@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@stablelib/bytes/-/bytes-1.0.1.tgz#0f4aa7b03df3080b878c7dea927d01f42d6a20d8" integrity sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ== -"@stablelib/chacha20poly1305@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz#de6b18e283a9cb9b7530d8767f99cde1fec4c2ee" - integrity sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA== - dependencies: - "@stablelib/aead" "^1.0.1" - "@stablelib/binary" "^1.0.1" - "@stablelib/chacha" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/poly1305" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/chacha@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/chacha/-/chacha-1.0.1.tgz#deccfac95083e30600c3f92803a3a1a4fa761371" - integrity sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/constant-time@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/constant-time/-/constant-time-1.0.1.tgz#bde361465e1cf7b9753061b77e376b0ca4c77e35" - integrity sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg== - -"@stablelib/ed25519@^1.0.1", "@stablelib/ed25519@^1.0.2": +"@stablelib/ed25519@^1.0.1": version "1.0.3" resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== @@ -734,14 +616,6 @@ dependencies: "@stablelib/bytes" "^1.0.1" -"@stablelib/poly1305@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/poly1305/-/poly1305-1.0.1.tgz#93bfb836c9384685d33d70080718deae4ddef1dc" - integrity sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA== - dependencies: - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - "@stablelib/random@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" @@ -773,26 +647,6 @@ "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" -"@stablelib/xchacha20@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/xchacha20/-/xchacha20-1.0.1.tgz#e98808d1f7d8b20e3ff37c71a3062a2a955d9a8c" - integrity sha512-1YkiZnFF4veUwBVhDnDYwo6EHeKzQK4FnLiO7ezCl/zu64uG0bCCAUROJaBkaLH+5BEsO3W7BTXTguMbSLlWSw== - dependencies: - "@stablelib/binary" "^1.0.1" - "@stablelib/chacha" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - -"@stablelib/xchacha20poly1305@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/xchacha20poly1305/-/xchacha20poly1305-1.0.1.tgz#addcaf30b92dd956f76b3357888e2f91b92e7a61" - integrity sha512-B1Abj0sMJ8h3HNmGnJ7vHBrAvxuNka6cJJoZ1ILN7iuacXp7sUYcgOVEOTLWj+rtQMpspY9tXSCRLPmN1mQNWg== - dependencies: - "@stablelib/aead" "^1.0.1" - "@stablelib/chacha20poly1305" "^1.0.1" - "@stablelib/constant-time" "^1.0.1" - "@stablelib/wipe" "^1.0.1" - "@stablelib/xchacha20" "^1.0.1" - "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -831,18 +685,6 @@ "@transmute/ld-key-pair" "^0.6.1-unstable.37" "@transmute/x25519-key-pair" "^0.6.1-unstable.37" -"@transmute/jose-ld@^0.7.0-unstable.81": - version "0.7.0-unstable.81" - resolved "https://registry.yarnpkg.com/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.81.tgz#d8b47c103d832ea4da3c2001b2a267d6b7ba93d5" - integrity sha512-xLwqoweaBjeuK9qvl8WZBPkwn0ubSgiaE0Vf6QuZgUZqwB7LhBI0wopUNFmINnbfuTfUbGuC4kdH1W+1HM445g== - dependencies: - "@peculiar/webcrypto" "^1.1.6" - "@stablelib/aes-kw" "^1.0.0" - "@stablelib/xchacha20poly1305" "^1.0.0" - base64url "^3.0.1" - jose "^4.3.8" - web-streams-polyfill "^3.0.3" - "@transmute/ld-key-pair@^0.6.1-unstable.36", "@transmute/ld-key-pair@^0.6.1-unstable.37": version "0.6.1-unstable.37" resolved "https://registry.yarnpkg.com/@transmute/ld-key-pair/-/ld-key-pair-0.6.1-unstable.37.tgz#ffe8af071b4ea991a49c795724b93999f4e6c8af" @@ -1135,37 +977,6 @@ dependencies: "@types/node" "*" -"@wwwallet/ssi-sdk@^1.0.8": - version "1.0.8" - resolved "https://npm.pkg.github.com/download/@wwWallet/ssi-sdk/1.0.8/157b400429bb3f238be9d454fb1526d3dfec07f1#157b400429bb3f238be9d454fb1526d3dfec07f1" - integrity sha512-92cSKHakAtSe0nkd2sjB3QRLG7lbzUJJgHFgpJPtuuujIsvXCsjAdgEr814N/vK+G3y7EAlRds1FeG4GH4G06Q== - dependencies: - "@cef-ebsi/ebsi-did-resolver" "^3.1.0" - "@cef-ebsi/key-did-resolver" "^1.0.0" - "@transmute/jose-ld" "^0.7.0-unstable.81" - ajv "^8.11.0" - ajv-formats "^2.1.1" - axios "^0.27.2" - base64url "^3.0.1" - did-resolver "^4.1.0" - joi "^17.6.0" - jose "^5.1.3" - jsonpath-plus "^7.2.0" - key-did-resolver "^3.0.0" - moment "^2.29.3" - multiformats "^9.6.4" - randomstring "^1.2.3" - redis "^4.6.4" - ts-results "^3.3.0" - tslib "^2.5.3" - uuid "^8.3.2" - zod "3.19.1" - -"@zxing/text-encoding@0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" - integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== - abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1230,13 +1041,6 @@ agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - ajv@^6.12.3: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -1247,7 +1051,7 @@ ajv@^6.12.3: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.11.0, ajv@^8.12.0: +ajv@^8.12.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -1398,7 +1202,7 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -asn1js@^3.0.1, asn1js@^3.0.5: +asn1js@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.5.tgz#5ea36820443dbefb51cc7f88a2ebb5b462114f38" integrity sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ== @@ -1441,11 +1245,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1472,15 +1271,6 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.4.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.5.1.tgz#11fbaa11fc35f431193a9564109c88c1f27b585f" - integrity sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1516,11 +1306,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bigint-mod-arith@^3.1.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.3.1.tgz#8ed33dc9f7886e552a7d47c239e051836e74cfa8" - integrity sha512-pX/cYW3dCa87Jrzv6DAr8ivbbJRzEX5yGhdt8IutnX/PCIXfpx+mabWNK/M8qqh+zQ0J3thftUBHW0ByuUlG0w== - bignumber.js@9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" @@ -1607,7 +1392,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^6.0.3: +buffer@*, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -1792,11 +1577,6 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -cluster-key-slot@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" - integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -2102,11 +1882,6 @@ detect-libc@^2.0.0: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== -did-resolver@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.1.0.tgz#740852083c4fd5bf9729d528eca5d105aff45eb6" - integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA== - diff-match-patch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" @@ -2577,18 +2352,6 @@ follow-redirects@^1.14.9: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== -follow-redirects@^1.15.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -2754,11 +2517,6 @@ generate-function@^2.3.1: dependencies: is-property "^1.0.2" -generic-pool@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.9.0.tgz#36f4a678e963f4fdb8707eab050823abc4e8f5e4" - integrity sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -2782,16 +2540,6 @@ get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-intrinsic@^1.1.3: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2960,13 +2708,6 @@ google-proto-files@^0.16.0, google-proto-files@^0.16.1: power-assert "^1.4.4" protobufjs "^6.8.0" -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -3034,11 +2775,6 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -3274,11 +3010,6 @@ is-buffer@^2.0.2: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-callable@^1.1.3: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3347,13 +3078,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -3415,13 +3139,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-typed-array@^1.1.3: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== - dependencies: - which-typed-array "^1.1.11" - is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -3464,37 +3181,16 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -joi@^17.6.0: - version "17.11.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" - integrity sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.1" - "@sideway/pinpoint" "^2.0.0" - jose@^4.10.4: version "4.13.1" resolved "https://registry.yarnpkg.com/jose/-/jose-4.13.1.tgz#449111bb5ab171db85c03f1bd2cb1647ca06db1c" integrity sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ== -jose@^4.14.4, jose@^4.3.8: - version "4.15.3" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.3.tgz#92fdac3ff0f345aab103211fc90b58f187fcdceb" - integrity sha512-RZJdL9Qjd1sqNdyiVteRGV/bnWtik/+PJh1JP4kT6+x1QQMn+7ryueRys5BEueuayvSVY8CWGCisCDazeRLTuw== - jose@^4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/jose/-/jose-4.9.3.tgz#890abd3f26725fe0f2aa720bc2f7835702b624db" integrity sha512-f8E/z+T3Q0kA9txzH2DKvH/ds2uggcw0m3vVPSB9HrSkrQ7mojjifvS7aR8cw+lQl2Fcmx9npwaHpM/M3GD8UQ== -jose@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/jose/-/jose-5.1.3.tgz#303959d85c51b5cb14725f930270b72be56abdca" - integrity sha512-GPExOkcMsCLBTi1YetY2LmkoY559fss0+0KVa6kOfb2YFe84nAM7Nm/XzuZozah4iHgmBGrCOHL5/cy670SBRw== - js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -3683,18 +3379,6 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" -key-did-resolver@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/key-did-resolver/-/key-did-resolver-3.0.0.tgz#c1cc4ebeb41e7959db5d4f3d90fd96bf89507315" - integrity sha512-IyEq64AdS6lUwtn3YSvGpu7KAGA2x5+fjRCUIa8+ccSLmWrODV/ICM5aa6hHV/19EPWef8/e322r9sQJJ6/3qA== - dependencies: - "@stablelib/ed25519" "^1.0.2" - bigint-mod-arith "^3.1.0" - multiformats "^11.0.1" - nist-weierstrauss "^1.6.1" - uint8arrays "^4.0.3" - varint "^6.0.0" - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -4082,7 +3766,7 @@ moment-timezone@^0.5.35: dependencies: moment "^2.29.4" -moment@^2.29.1, moment@^2.29.3, moment@^2.29.4: +moment@^2.29.1, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -4102,21 +3786,6 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multiformats@^11.0.1: - version "11.0.2" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-11.0.2.tgz#b14735efc42cd8581e73895e66bebb9752151b60" - integrity sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg== - -multiformats@^12.0.1: - version "12.1.3" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-12.1.3.tgz#cbf7a9861e11e74f8228b21376088cb43ba8754e" - integrity sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw== - -multiformats@^9.4.2, multiformats@^9.6.4, multiformats@^9.6.5, multiformats@^9.9.0: - version "9.9.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" - integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== - mysql2@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-3.2.0.tgz#3613a8903bcb7ade0ae35b29945a0378eb67da89" @@ -4184,14 +3853,6 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -nist-weierstrauss@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/nist-weierstrauss/-/nist-weierstrauss-1.6.1.tgz#ce1acd81d09f83289bc5113f14c9790920935176" - integrity sha512-FpjCOnPV/s3ZVIkeldCVSml2K4lruabPbBgoEitpCK1JL0KTVoWb56CFTU6rZn5i6VqAjdwcOp0FDwJACPmeFA== - dependencies: - multiformats "^9.6.5" - uint8arrays "^2.1.4" - node-fetch@2: version "2.6.11" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" @@ -4694,11 +4355,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - pseudomap@^1.0.1, pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -4861,18 +4517,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -redis@^4.6.4: - version "4.6.10" - resolved "https://registry.yarnpkg.com/redis/-/redis-4.6.10.tgz#07f6ea2b2c5455b098e76d1e8c9b3376114e9458" - integrity sha512-mmbyhuKgDiJ5TWUhiKhBssz+mjsuSI/lSZNPI9QvZOYzWvYGejtb+W3RlDDf8LD6Bdl5/mZeG8O1feUGhXTxEg== - dependencies: - "@redis/bloom" "1.2.0" - "@redis/client" "1.5.11" - "@redis/graph" "1.1.0" - "@redis/json" "1.0.6" - "@redis/search" "1.1.5" - "@redis/time-series" "1.0.5" - reflect-metadata@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" @@ -5563,11 +5207,6 @@ tslib@1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== -tslib@^2.0.0, tslib@^2.5.0, tslib@^2.5.3: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - tslib@^2.1.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -5658,20 +5297,6 @@ uglify-js@^3.7.7: resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== -uint8arrays@^2.1.4: - version "2.1.10" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-2.1.10.tgz#34d023c843a327c676e48576295ca373c56e286a" - integrity sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A== - dependencies: - multiformats "^9.4.2" - -uint8arrays@^4.0.3: - version "4.0.10" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-4.0.10.tgz#3ec5cde3348903c140e87532fc53f46b8f2e921f" - integrity sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA== - dependencies: - multiformats "^12.0.1" - undefsafe@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" @@ -5743,17 +5368,6 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.12.3: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -5784,11 +5398,6 @@ validator@^13.7.0: resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== -varint@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" - integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== - vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -5812,31 +5421,6 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -web-encoding@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.1.5.tgz#fc810cf7667364a6335c939913f5051d3e0c4864" - integrity sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA== - dependencies: - util "^0.12.3" - optionalDependencies: - "@zxing/text-encoding" "0.9.0" - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -webcrypto-core@^1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.7.tgz#06f24b3498463e570fed64d7cab149e5437b162c" - integrity sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g== - dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - asn1js "^3.0.1" - pvtsutils "^1.3.2" - tslib "^2.4.0" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -5864,17 +5448,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which-typed-array@^1.1.11, which-typed-array@^1.1.2: - version "1.1.11" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" - integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - wide-align@^1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" @@ -5983,16 +5556,16 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@4.0.0, yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yallist@^2.0.0, yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" @@ -6052,11 +5625,6 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zod@3.19.1: - version "3.19.1" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.19.1.tgz#112f074a97b50bfc4772d4ad1576814bd8ac4473" - integrity sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA== - zod@^3.21.4: version "3.21.4" resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db"