diff --git a/README.md b/README.md index 69f865a..7e54374 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,18 @@ ![jest workflow](https://github.com/GAIA-X4PLC-AAD/ssi-to-oidc-bridge/actions/workflows/node.js.yml/badge.svg) ![playwright workflow](https://github.com/GAIA-X4PLC-AAD/ssi-to-oidc-bridge/actions/workflows/playwright.yml/badge.svg) + > [!WARNING] > This repository is intended for prototyping and as a reference > implementation. At this time, no security guarantees can be given. + > [!NOTE] > A preprint of our paper providing more background information is > available [on arXiv](https://arxiv.org/abs/2401.09488). While it is slightly > outdated now, it provides a good introduction. + > [!NOTE] > This software artifact was originally intended to support only Gaia-X > Participant Credentials. It has since evolved to be fully configurable for @@ -151,6 +154,7 @@ prototyping an OIDC client service you are developing. Note that running a full deployment requires the same steps, but instead of using a tool like `ngrok`, a proper domain has to be set up. + > [!IMPORTANT] > You need to use a tool like ngrok for testing so your smartphone > wallet can access the vclogin backend. However, it can lead to issues with @@ -178,6 +182,7 @@ proper domain has to be set up. To validate the running bridge with a simple OIDC client: + > [!NOTE] > You might run into a "Permisson denied" issue when running the shell > script `./test_client.sh`. You need to mark the file as executable using @@ -196,6 +201,7 @@ To validate the running bridge with a simple OIDC client: 9. end up at `http://localhost:9010/callback` with metadata about the login being displayed + > [!TIP] > If you want to understand what the wallet is doing in the exchange, go > to settings and toggle on "Developer Mode". After scanning a QR code, the diff --git a/vclogin/config/ory.ts b/vclogin/config/ory.ts index 4ce08ce..3adf65d 100644 --- a/vclogin/config/ory.ts +++ b/vclogin/config/ory.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MIT */ -import { Configuration, V0alpha2Api } from "@ory/client"; +import { Configuration, OAuth2ApiFactory } from "@ory/hydra-client"; const baseOptions: any = {}; @@ -17,6 +17,6 @@ const configuration = new Configuration({ baseOptions, }); -const hydraAdmin = new V0alpha2Api(configuration); +const hydraAdmin = OAuth2ApiFactory(configuration); export { hydraAdmin }; diff --git a/vclogin/package-lock.json b/vclogin/package-lock.json index 8744380..2cc38bc 100644 --- a/vclogin/package-lock.json +++ b/vclogin/package-lock.json @@ -9,16 +9,16 @@ "version": "0.1.1", "dependencies": { "@material-tailwind/react": "^2.0.3", - "@ory/client": "^0.2.0-alpha.24", + "@ory/hydra-client": "^2.2.0", "@spruceid/didkit-wasm-node": "^0.2.1", - "@taquito/taquito": "^16.1.2", + "@taquito/taquito": "^20.0.1", "@taquito/utils": "^16.1.2", "axios": "^1.4.0", "ioredis": "^5.3.2", "jose": "^5.1.3", "jsonpath": "^1.1.1", "multer": "^1.4.5-lts.1", - "next": "13.3.0", + "next": "^14.2.4", "next-connect": "^1.0.0", "next-logger": "^4.0.0", "next-qrcode": "^2.5.1", @@ -26,6 +26,7 @@ "pino-http": "^10.1.0", "react": "18.2.0", "react-dom": "18.2.0", + "ua-parser-js": "^1.0.38", "uuid": "^9.0.0" }, "devDependencies": { @@ -37,6 +38,7 @@ "@types/node": "^18.15.13", "@types/react": "18.0.37", "@types/react-dom": "18.0.11", + "@types/ua-parser-js": "^0.7.39", "@types/uuid": "^9.0.1", "@vitest/coverage-v8": "^1.6.0", "@wasm-tool/wasm-pack-plugin": "^1.7.0", @@ -44,7 +46,7 @@ "eslint": "8.38.0", "eslint-config-next": "13.3.0", "eslint-plugin-react-hooks": "^4.6.0", - "postcss": "8.4.23", + "postcss": "^8.4.39", "prettier": "^2.8.8", "tailwindcss": "3.3.1", "typescript": "5.0.4", @@ -995,9 +997,9 @@ } }, "node_modules/@next/env": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.3.0.tgz", - "integrity": "sha512-AjppRV4uG3No7L1plinoTQETH+j2F10TEnrMfzbTUYwze5sBUPveeeBAPZPm8OkJZ1epq9OyYKhZrvbD6/9HCQ==" + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.4.tgz", + "integrity": "sha512-3EtkY5VDkuV2+lNmKlbkibIJxcO4oIHEhBWne6PaAp+76J9KoSsGvNikp6ivzAT8dhhBMYrm6op2pS1ApG0Hzg==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.3.0", @@ -1009,9 +1011,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.3.0.tgz", - "integrity": "sha512-DmIQCNq6JtccLPPBzf0dgh2vzMWt5wjxbP71pCi5EWpWYE3MsP6FcRXi4MlAmFNDQOfcFXR2r7kBeG1LpZUh1w==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.4.tgz", + "integrity": "sha512-AH3mO4JlFUqsYcwFUHb1wAKlebHU/Hv2u2kb1pAuRanDZ7pD/A/KPD98RHZmwsJpdHQwfEc/06mgpSzwrJYnNg==", "cpu": [ "arm64" ], @@ -1024,9 +1026,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.3.0.tgz", - "integrity": "sha512-oQoqFa88OGgwnYlnAGHVct618FRI/749se0N3S8t9Bzdv5CRbscnO0RcX901+YnNK4Q6yeiizfgO3b7kogtsZg==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.4.tgz", + "integrity": "sha512-QVadW73sWIO6E2VroyUjuAxhWLZWEpiFqHdZdoQ/AMpN9YWGuHV8t2rChr0ahy+irKX5mlDU7OY68k3n4tAZTg==", "cpu": [ "x64" ], @@ -1039,9 +1041,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.3.0.tgz", - "integrity": "sha512-Wzz2p/WqAJUqTVoLo6H18WMeAXo3i+9DkPDae4oQG8LMloJ3if4NEZTnOnTUlro6cq+S/W4pTGa97nWTrOjbGw==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.4.tgz", + "integrity": "sha512-KT6GUrb3oyCfcfJ+WliXuJnD6pCpZiosx2X3k66HLR+DMoilRb76LpWPGb4tZprawTtcnyrv75ElD6VncVamUQ==", "cpu": [ "arm64" ], @@ -1054,9 +1056,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.3.0.tgz", - "integrity": "sha512-xPVrIQOQo9WXJYgmoTlMnAD/HlR/1e1ZIWGbwIzEirXBVBqMARUulBEIKdC19zuvoJ477qZJgBDCKtKEykCpyQ==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.4.tgz", + "integrity": "sha512-Alv8/XGSs/ytwQcbCHwze1HmiIkIVhDHYLjczSVrf0Wi2MvKn/blt7+S6FJitj3yTlMwMxII1gIJ9WepI4aZ/A==", "cpu": [ "arm64" ], @@ -1069,9 +1071,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.3.0.tgz", - "integrity": "sha512-jOFlpGuPD7W2tuXVJP4wt9a3cpNxWAPcloq5EfMJRiXsBBOjLVFZA7boXYxEBzSVgUiVVr1V9T0HFM7pULJ1qA==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.4.tgz", + "integrity": "sha512-ze0ShQDBPCqxLImzw4sCdfnB3lRmN3qGMB2GWDRlq5Wqy4G36pxtNOo2usu/Nm9+V2Rh/QQnrRc2l94kYFXO6Q==", "cpu": [ "x64" ], @@ -1084,9 +1086,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.3.0.tgz", - "integrity": "sha512-2OwKlzaBgmuet9XYHc3KwsEilzb04F540rlRXkAcjMHL7eCxB7uZIGtsVvKOnQLvC/elrUegwSw1+5f7WmfyOw==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.4.tgz", + "integrity": "sha512-8dwC0UJoc6fC7PX70csdaznVMNr16hQrTDAMPvLPloazlcaWfdPogq+UpZX6Drqb1OBlwowz8iG7WR0Tzk/diQ==", "cpu": [ "x64" ], @@ -1099,9 +1101,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.3.0.tgz", - "integrity": "sha512-OeHiA6YEvndxT46g+rzFK/MQTfftKxJmzslERMu9LDdC6Kez0bdrgEYed5eXFK2Z1viKZJCGRlhd06rBusyztA==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.4.tgz", + "integrity": "sha512-jxyg67NbEWkDyvM+O8UDbPAyYRZqGLQDTPwvrBBeOSyVWW/jFQkQKQ70JDqDSYg1ZDdl+E3nkbFbq8xM8E9x8A==", "cpu": [ "arm64" ], @@ -1114,9 +1116,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.3.0.tgz", - "integrity": "sha512-4aB7K9mcVK1lYEzpOpqWrXHEZympU3oK65fnNcY1Qc4HLJFLJj8AViuqQd4jjjPNuV4sl8jAwTz3gN5VNGWB7w==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.4.tgz", + "integrity": "sha512-twrmN753hjXRdcrZmZttb/m5xaCBFa48Dt3FbeEItpJArxriYDunWxJn+QFXdJ3hPkm4u7CKxncVvnmgQMY1ag==", "cpu": [ "ia32" ], @@ -1129,9 +1131,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.3.0.tgz", - "integrity": "sha512-Reer6rkLLcoOvB0dd66+Y7WrWVFH7sEEkF/4bJCIfsSKnTStTYaHtwIJAwbqnt9I392Tqvku0KkoqZOryWV9LQ==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.4.tgz", + "integrity": "sha512-tkLrjBzqFTP8DVrAAQmZelEahfR9OxWpFR++vAI9FBhCiIxtwHwBHC23SBHCTURBtwB4kc/x44imVOnkKGNVGg==", "cpu": [ "x64" ], @@ -1143,6 +1145,17 @@ "node": ">= 10" } }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1178,20 +1191,12 @@ "node": ">= 8" } }, - "node_modules/@ory/client": { - "version": "0.2.0-alpha.60", - "resolved": "https://registry.npmjs.org/@ory/client/-/client-0.2.0-alpha.60.tgz", - "integrity": "sha512-fGovJ/xIl7dvJJP9/IL4Xu1yiOCy9pvmkfj2xnHZbPrIbL9c9tqVcC3CSlzBq6zJQZMC3XI7VmZ8uEQ+cF4suw==", - "dependencies": { - "axios": "^0.21.4" - } - }, - "node_modules/@ory/client/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "node_modules/@ory/hydra-client": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ory/hydra-client/-/hydra-client-2.2.0.tgz", + "integrity": "sha512-rSw8JW6tXgC61AzvGKFGTRmEW43xXfsl0y/EHGA9msNP+YiNsxfNNnivvSdkOQRdg4ZG+aO5M/1t0s3+dYg/0w==", "dependencies": { - "follow-redirects": "^1.14.0" + "axios": "^1.6.1" } }, "node_modules/@pkgr/utils": { @@ -1218,7 +1223,7 @@ "version": "1.44.1", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.1.tgz", "integrity": "sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q==", - "dev": true, + "devOptional": true, "dependencies": { "playwright": "1.44.1" }, @@ -1627,106 +1632,282 @@ "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" + }, "node_modules/@swc/helpers": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", - "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz", + "integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==", "dependencies": { + "@swc/counter": "^0.1.3", "tslib": "^2.4.0" } }, - "node_modules/@taquito/http-utils": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-16.1.2.tgz", - "integrity": "sha512-02J9Q744ZEs0wbjBpm6NFzJCtjscuSOeQ3LaWfS1wx7XfMiNMLCOiWZt1RtjlIbcXKEYcOgvjfIy/A/tYl6cqQ==", + "node_modules/@taquito/core": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/core/-/core-20.0.1.tgz", + "integrity": "sha512-/NvTkS8Enz5zxm481h7Ld5+MTa3/q84PMqtQ+HN3Mniv4EshnX5uIGfbdXdCQoaAeVdJOCeNIZDgeP6ZnkomRA==", "dependencies": { - "@taquito/axios-fetch-adapter": "^0.3.1", - "axios": "^0.26.0" + "json-stringify-safe": "^5.0.1" }, "engines": { - "node": ">=16" + "node": ">=18" } }, - "node_modules/@taquito/http-utils/node_modules/@taquito/axios-fetch-adapter": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@taquito/axios-fetch-adapter/-/axios-fetch-adapter-0.3.1.tgz", - "integrity": "sha512-emPSsrYQumiUcZsDcTAP68gLJpKoJmbzwyy2D2h2/Zm3Q1TbAJJS1kbnwvQZfq0FjYyYCWYSITtAS3w0EUAG4g==", - "peerDependencies": { - "axios": ">=0.26.0" + "node_modules/@taquito/http-utils": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/http-utils/-/http-utils-20.0.1.tgz", + "integrity": "sha512-belYNmWoT49IF8o51gEB5je5Wz54+C7Q5hmvh7modl7fG0qE8VD1ulSH+WjuZsFTPJdNEAfCe0O50Vb5tNzw2w==", + "dependencies": { + "@taquito/core": "^20.0.1", + "node-fetch": "^2.7.0" + }, + "engines": { + "node": ">=18" } }, - "node_modules/@taquito/http-utils/node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "node_modules/@taquito/local-forging": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-20.0.1.tgz", + "integrity": "sha512-+XYHnoAYXpOYA4WbUvUO86F6uoUh1anaNQGD544ySaonJW1ZgwhylrGvvTVjQfFSqqP3TRWn69EqINco+hX7gA==", "dependencies": { - "follow-redirects": "^1.14.8" + "@taquito/core": "^20.0.1", + "@taquito/utils": "^20.0.1", + "bignumber.js": "^9.1.2" + }, + "engines": { + "node": ">=18" } }, - "node_modules/@taquito/local-forging": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/local-forging/-/local-forging-16.1.2.tgz", - "integrity": "sha512-KSJMO7xo4mdM7cU2iTCNcWNn/vaABaCMXa2ONvb5TD0o3MHizqCP0M2rEfkP48eajlcBLF1RcOExSVWj+5+v/Q==", + "node_modules/@taquito/local-forging/node_modules/@taquito/utils": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-20.0.1.tgz", + "integrity": "sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==", "dependencies": { - "@taquito/utils": "^16.1.2", - "bignumber.js": "^9.1.0" + "@stablelib/blake2b": "^1.0.1", + "@stablelib/ed25519": "^1.0.3", + "@taquito/core": "^20.0.1", + "@types/bs58check": "^2.1.0", + "bignumber.js": "^9.1.2", + "blakejs": "^1.2.1", + "bs58check": "^3.0.1", + "buffer": "^6.0.3", + "elliptic": "^6.5.4", + "typedarray-to-buffer": "^4.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@taquito/local-forging/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@taquito/local-forging/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@taquito/local-forging/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/@taquito/michel-codec": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-16.1.2.tgz", - "integrity": "sha512-kpVpfFQo96SZhHHUQUq7lNvZM44CTJnBk2sN6pIIxMaQiLXHshkE0KTqSUl3ocp/7ssd/Q7v4MsW/NSt3dthJQ==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/michel-codec/-/michel-codec-20.0.1.tgz", + "integrity": "sha512-TB6fJS4ArW4p1mqR28cjKbYs4cbLz/wnf8bHI/4ubxpiPcARZkja7r4U89D+Lb6Kn1Er+USPIMdbRTkP011e0w==", + "dependencies": { + "@taquito/core": "^20.0.1" + }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@taquito/michelson-encoder": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-16.1.2.tgz", - "integrity": "sha512-9gD4sgLgkuy4cTcp9eZ4DCasic3Ymi5BGCCVGXzNzzimbvdBPrMtDQMgBRu07mlTm9/4OENdDTuMk4QtIYfOqQ==", - "dependencies": { - "@taquito/rpc": "^16.1.2", - "@taquito/utils": "^16.1.2", - "bignumber.js": "^9.1.0", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/michelson-encoder/-/michelson-encoder-20.0.1.tgz", + "integrity": "sha512-YfMLpxDL/Qd9AlIfjlCsXYiE07ReZRAqvj+mI/Q8sPsKpqrkjvhyieNUQDLVqMDRcWLBWUSIqccr7UVRlQ/+BQ==", + "dependencies": { + "@taquito/core": "^20.0.1", + "@taquito/rpc": "^20.0.1", + "@taquito/utils": "^20.0.1", + "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@taquito/michelson-encoder/node_modules/@taquito/utils": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-20.0.1.tgz", + "integrity": "sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==", + "dependencies": { + "@stablelib/blake2b": "^1.0.1", + "@stablelib/ed25519": "^1.0.3", + "@taquito/core": "^20.0.1", + "@types/bs58check": "^2.1.0", + "bignumber.js": "^9.1.2", + "blakejs": "^1.2.1", + "bs58check": "^3.0.1", + "buffer": "^6.0.3", + "elliptic": "^6.5.4", + "typedarray-to-buffer": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@taquito/michelson-encoder/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@taquito/michelson-encoder/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@taquito/michelson-encoder/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/@taquito/rpc": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-16.1.2.tgz", - "integrity": "sha512-r2cwT3tnvofBtytDCP/P8G8i9gw2hgw73hiGhYw4CkYaRyVYcuBMwmr8soy/e3B8U2sHSsiyoUmBC9Z0AfkApQ==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/rpc/-/rpc-20.0.1.tgz", + "integrity": "sha512-Ec6fXoehjLpfILpVAHZ1NJz6cAaguEFs9McK2Ct4RRKmVhModgrVPAGXn17rb7fLXwOLP3MCzqSgFPToY7ZIFA==", "dependencies": { - "@taquito/http-utils": "^16.1.2", - "@taquito/utils": "^16.1.2", - "bignumber.js": "^9.1.0" + "@taquito/core": "^20.0.1", + "@taquito/http-utils": "^20.0.1", + "@taquito/utils": "^20.0.1", + "bignumber.js": "^9.1.2" }, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@taquito/rpc/node_modules/@taquito/utils": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-20.0.1.tgz", + "integrity": "sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==", + "dependencies": { + "@stablelib/blake2b": "^1.0.1", + "@stablelib/ed25519": "^1.0.3", + "@taquito/core": "^20.0.1", + "@types/bs58check": "^2.1.0", + "bignumber.js": "^9.1.2", + "blakejs": "^1.2.1", + "bs58check": "^3.0.1", + "buffer": "^6.0.3", + "elliptic": "^6.5.4", + "typedarray-to-buffer": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@taquito/rpc/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@taquito/rpc/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@taquito/rpc/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/@taquito/taquito": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-16.1.2.tgz", - "integrity": "sha512-0yjQRIjr1ZcVzTQ9QvtwZl4QAH2jM21vXTCOcHLxEuxjk052vr4OuS3WI+lk7hACtJXfwlA9DZ3zyNt9WdKFHA==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/taquito/-/taquito-20.0.1.tgz", + "integrity": "sha512-BcRNWcUGOWfthFPgPf12U1ZIf1xSyy1ZS4xU5TciuxI395LnKTz6I3WfmMggsZzWxqEgi/Lj8GXjji7DCtaZRg==", "hasInstallScript": true, "dependencies": { - "@taquito/http-utils": "^16.1.2", - "@taquito/local-forging": "^16.1.2", - "@taquito/michel-codec": "^16.1.2", - "@taquito/michelson-encoder": "^16.1.2", - "@taquito/rpc": "^16.1.2", - "@taquito/utils": "^16.1.2", - "bignumber.js": "^9.1.0", - "rxjs": "^6.6.3" + "@taquito/core": "^20.0.1", + "@taquito/http-utils": "^20.0.1", + "@taquito/local-forging": "^20.0.1", + "@taquito/michel-codec": "^20.0.1", + "@taquito/michelson-encoder": "^20.0.1", + "@taquito/rpc": "^20.0.1", + "@taquito/utils": "^20.0.1", + "bignumber.js": "^9.1.2", + "rxjs": "^7.8.1" }, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@taquito/taquito/node_modules/@taquito/utils": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@taquito/utils/-/utils-20.0.1.tgz", + "integrity": "sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==", + "dependencies": { + "@stablelib/blake2b": "^1.0.1", + "@stablelib/ed25519": "^1.0.3", + "@taquito/core": "^20.0.1", + "@types/bs58check": "^2.1.0", + "bignumber.js": "^9.1.2", + "blakejs": "^1.2.1", + "bs58check": "^3.0.1", + "buffer": "^6.0.3", + "elliptic": "^6.5.4", + "typedarray-to-buffer": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@taquito/taquito/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/@taquito/taquito/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/@taquito/taquito/node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/@taquito/utils": { @@ -1992,6 +2173,12 @@ "@types/node": "*" } }, + "node_modules/@types/ua-parser-js": { + "version": "0.7.39", + "resolved": "https://registry.npmjs.org/@types/ua-parser-js/-/ua-parser-js-0.7.39.tgz", + "integrity": "sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==", + "dev": true + }, "node_modules/@types/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", @@ -2888,11 +3075,11 @@ } }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3001,9 +3188,9 @@ } }, "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", "engines": { "node": "*" } @@ -3073,12 +3260,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3260,9 +3447,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001565", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", - "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", + "version": "1.0.30001639", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz", + "integrity": "sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==", "funding": [ { "type": "opencollective", @@ -4587,9 +4774,9 @@ } }, "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4626,9 +4813,9 @@ } }, "node_modules/eslint-plugin-jsx-a11y/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4705,9 +4892,9 @@ } }, "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4916,9 +5103,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -4963,9 +5150,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -5295,8 +5482,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/grapheme-splitter": { "version": "1.0.4", @@ -6132,6 +6318,11 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -6620,38 +6811,38 @@ "dev": true }, "node_modules/next": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/next/-/next-13.3.0.tgz", - "integrity": "sha512-OVTw8MpIPa12+DCUkPqRGPS3thlJPcwae2ZL4xti3iBff27goH024xy4q2lhlsdoYiKOi8Kz6uJoLW/GXwgfOA==", + "version": "14.2.4", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.4.tgz", + "integrity": "sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==", "dependencies": { - "@next/env": "13.3.0", - "@swc/helpers": "0.4.14", + "@next/env": "14.2.4", + "@swc/helpers": "0.5.5", "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", + "caniuse-lite": "^1.0.30001579", + "graceful-fs": "^4.2.11", + "postcss": "8.4.31", "styled-jsx": "5.1.1" }, "bin": { "next": "dist/bin/next" }, "engines": { - "node": ">=14.6.0" + "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "13.3.0", - "@next/swc-darwin-x64": "13.3.0", - "@next/swc-linux-arm64-gnu": "13.3.0", - "@next/swc-linux-arm64-musl": "13.3.0", - "@next/swc-linux-x64-gnu": "13.3.0", - "@next/swc-linux-x64-musl": "13.3.0", - "@next/swc-win32-arm64-msvc": "13.3.0", - "@next/swc-win32-ia32-msvc": "13.3.0", - "@next/swc-win32-x64-msvc": "13.3.0" + "@next/swc-darwin-arm64": "14.2.4", + "@next/swc-darwin-x64": "14.2.4", + "@next/swc-linux-arm64-gnu": "14.2.4", + "@next/swc-linux-arm64-musl": "14.2.4", + "@next/swc-linux-x64-gnu": "14.2.4", + "@next/swc-linux-x64-musl": "14.2.4", + "@next/swc-win32-arm64-msvc": "14.2.4", + "@next/swc-win32-ia32-msvc": "14.2.4", + "@next/swc-win32-x64-msvc": "14.2.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", - "fibers": ">= 3.1.0", - "node-sass": "^6.0.0 || ^7.0.0", + "@playwright/test": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" @@ -6660,10 +6851,7 @@ "@opentelemetry/api": { "optional": true }, - "fibers": { - "optional": true - }, - "node-sass": { + "@playwright/test": { "optional": true }, "sass": { @@ -6753,9 +6941,9 @@ } }, "node_modules/next/node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -6764,10 +6952,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -6779,7 +6971,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6798,20 +6989,17 @@ "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -7166,9 +7354,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -7276,7 +7464,7 @@ "version": "1.44.1", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.1.tgz", "integrity": "sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg==", - "dev": true, + "devOptional": true, "dependencies": { "playwright-core": "1.44.1" }, @@ -7294,7 +7482,7 @@ "version": "1.44.1", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.1.tgz", "integrity": "sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA==", - "dev": true, + "devOptional": true, "bin": { "playwright-core": "cli.js" }, @@ -7331,9 +7519,9 @@ } }, "node_modules/postcss": { - "version": "8.4.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", - "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "funding": [ { @@ -7350,9 +7538,9 @@ } ], "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -7931,21 +8119,13 @@ } }, "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" + "tslib": "^2.1.0" } }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -9233,6 +9413,28 @@ "node": ">=12.20" } }, + "node_modules/ua-parser-js": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.38.tgz", + "integrity": "sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, "node_modules/ufo": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", @@ -9466,34 +9668,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/vite/node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "node_modules/vitest": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", @@ -9864,9 +10038,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "engines": { "node": ">=0.10.0" } @@ -9891,9 +10065,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "optional": true, "peer": true, diff --git a/vclogin/package.json b/vclogin/package.json index a522e70..7ae2d27 100644 --- a/vclogin/package.json +++ b/vclogin/package.json @@ -1,6 +1,6 @@ { "name": "ssi-to-oidc-bridge", - "version": "0.1.1", + "version": "1.2.0", "private": true, "type": "module", "scripts": { @@ -13,16 +13,16 @@ }, "dependencies": { "@material-tailwind/react": "^2.0.3", - "@ory/client": "^0.2.0-alpha.24", + "@ory/hydra-client": "^2.2.0", "@spruceid/didkit-wasm-node": "^0.2.1", - "@taquito/taquito": "^16.1.2", + "@taquito/taquito": "^20.0.1", "@taquito/utils": "^16.1.2", "axios": "^1.4.0", "ioredis": "^5.3.2", "jose": "^5.1.3", "jsonpath": "^1.1.1", "multer": "^1.4.5-lts.1", - "next": "13.3.0", + "next": "^14.2.4", "next-connect": "^1.0.0", "next-logger": "^4.0.0", "next-qrcode": "^2.5.1", @@ -30,6 +30,7 @@ "pino-http": "^10.1.0", "react": "18.2.0", "react-dom": "18.2.0", + "ua-parser-js": "^1.0.38", "uuid": "^9.0.0" }, "devDependencies": { @@ -41,6 +42,7 @@ "@types/node": "^18.15.13", "@types/react": "18.0.37", "@types/react-dom": "18.0.11", + "@types/ua-parser-js": "^0.7.39", "@types/uuid": "^9.0.1", "@vitest/coverage-v8": "^1.6.0", "@wasm-tool/wasm-pack-plugin": "^1.7.0", @@ -48,7 +50,7 @@ "eslint": "8.38.0", "eslint-config-next": "13.3.0", "eslint-plugin-react-hooks": "^4.6.0", - "postcss": "8.4.23", + "postcss": "^8.4.39", "prettier": "^2.8.8", "tailwindcss": "3.3.1", "typescript": "5.0.4", diff --git a/vclogin/pages/api/consent.ts b/vclogin/pages/api/consent.ts index 400cba6..cf5d0d2 100644 --- a/vclogin/pages/api/consent.ts +++ b/vclogin/pages/api/consent.ts @@ -14,32 +14,36 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { if (method === "GET") { const challenge = req.query["consent_challenge"] as string; - const { data: body } = - await hydraAdmin.adminGetOAuth2ConsentRequest(challenge); + const { data: body } = await hydraAdmin.getOAuth2ConsentRequest({ + consentChallenge: challenge, + }); // get user identity and fetch user claims from redis const userClaims = JSON.parse((await redisGet("" + body.subject))!); hydraAdmin - .adminAcceptOAuth2ConsentRequest(challenge, { - // We can grant all scopes that have been requested - hydra already checked for us that no additional scopes - // are requested accidentally. - grant_scope: body.requested_scope, - - session: { - access_token: userClaims.tokenAccess, - id_token: userClaims.tokenId, + .acceptOAuth2ConsentRequest({ + consentChallenge: challenge, + acceptOAuth2ConsentRequest: { + // We can grant all scopes that have been requested - hydra already checked for us that no additional scopes + // are requested accidentally. + grant_scope: body.requested_scope, + + session: { + access_token: userClaims.tokenAccess, + id_token: userClaims.tokenId, + }, + + // ORY Hydra checks if requested audiences are allowed by the client, so we can simply echo this. + grant_access_token_audience: body.requested_access_token_audience, + + // This tells hydra to remember this consent request and allow the same client to request the same + // scopes from the same user, without showing the UI, in the future. + remember: Boolean(false), + + // When this "remember" sesion expires, in seconds. Set this to 0 so it will never expire. + remember_for: 3600, }, - - // ORY Hydra checks if requested audiences are allowed by the client, so we can simply echo this. - grant_access_token_audience: body.requested_access_token_audience, - - // This tells hydra to remember this consent request and allow the same client to request the same - // scopes from the same user, without showing the UI, in the future. - remember: Boolean(false), - - // When this "remember" sesion expires, in seconds. Set this to 0 so it will never expire. - remember_for: 3600, }) .then(({ data: body }) => { // All we need to do now is to redirect the user back to hydra! diff --git a/vclogin/pages/api/presentCredential.ts b/vclogin/pages/api/presentCredential.ts index 269d5a1..efd4e49 100644 --- a/vclogin/pages/api/presentCredential.ts +++ b/vclogin/pages/api/presentCredential.ts @@ -93,28 +93,31 @@ async function handler(req: NextApiRequest, res: NextApiResponse) { // hydra login await hydraAdmin - .adminGetOAuth2LoginRequest(challenge) + .getOAuth2LoginRequest({ loginChallenge: challenge }) .then(({}) => hydraAdmin - .adminAcceptOAuth2LoginRequest(challenge, { - // Subject is an alias for user ID. A subject can be a random string, a UUID, an email address, .... - subject, - // This tells hydra to remember the browser and automatically authenticate the user in future requests. This will - // set the "skip" parameter in the other route to true on subsequent requests! - remember: Boolean(false), - // When the session expires, in seconds. Set this to 0 so it will never expire. - remember_for: 3600, - // Sets which "level" (e.g. 2-factor authentication) of authentication the user has. The value is really arbitrary - // and optional. In the context of OpenID Connect, a value of 0 indicates the lowest authorization level. - // acr: '0', - // - // If the environment variable CONFORMITY_FAKE_CLAIMS is set we are assuming that - // the app is built for the automated OpenID Connect Conformity Test Suite. You - // can peak inside the code for some ideas, but be aware that all data is fake - // and this only exists to fake a login system which works in accordance to OpenID Connect. - // - // If that variable is not set, the ACR value will be set to the default passed here ('0') - acr: "0", + .acceptOAuth2LoginRequest({ + loginChallenge: challenge, + acceptOAuth2LoginRequest: { + // Subject is an alias for user ID. A subject can be a random string, a UUID, an email address, .... + subject, + // This tells hydra to remember the browser and automatically authenticate the user in future requests. This will + // set the "skip" parameter in the other route to true on subsequent requests! + remember: Boolean(false), + // When the session expires, in seconds. Set this to 0 so it will never expire. + remember_for: 3600, + // Sets which "level" (e.g. 2-factor authentication) of authentication the user has. The value is really arbitrary + // and optional. In the context of OpenID Connect, a value of 0 indicates the lowest authorization level. + // acr: '0', + // + // If the environment variable CONFORMITY_FAKE_CLAIMS is set we are assuming that + // the app is built for the automated OpenID Connect Conformity Test Suite. You + // can peak inside the code for some ideas, but be aware that all data is fake + // and this only exists to fake a login system which works in accordance to OpenID Connect. + // + // If that variable is not set, the ACR value will be set to the default passed here ('0') + acr: "0", + }, }) .then(({ data: body }) => { const MAX_AGE = 30; // 30 seconds diff --git a/vclogin/pages/login.tsx b/vclogin/pages/login.tsx index 507867c..5326d8f 100644 --- a/vclogin/pages/login.tsx +++ b/vclogin/pages/login.tsx @@ -9,13 +9,17 @@ import { useQRCode } from "next-qrcode"; import { useEffect } from "react"; import { keyToDID } from "@spruceid/didkit-wasm-node"; import { redisGet, redisSet } from "@/config/redis"; +import parser from "ua-parser-js"; export default function Login(props: any) { const router = useRouter(); const { Canvas } = useQRCode(); + const uaparser = new parser.UAParser(); + const agent = uaparser.getDevice(); + const agentIsMobile = agent.type === "mobile" || agent.type === "tablet"; const refreshData = () => { - return router.replace(router.asPath); + return router.replace(router.asPath, undefined, { scroll: false }); }; const getWalletUrl = () => { @@ -37,36 +41,50 @@ export default function Login(props: any) { }); return ( -
+
-
+

You are signing in via the

-

+

SSI-to-OIDC Bridge

-

- Scan the code to sign in! +

+ {!agentIsMobile + ? "Scan the code to sign in!" + : "Click the link to your wallet!"}

-
- +
+ {!agentIsMobile ? ( +
+ +
+ ) : ( + + Authenticate + + )}
@@ -75,8 +93,6 @@ export default function Login(props: any) {
- -
 
); }