From aa0c72f3f79619dc47a290050f149813cb7e64e3 Mon Sep 17 00:00:00 2001 From: Alain Nicolas Date: Thu, 23 Nov 2023 09:41:03 +0100 Subject: [PATCH] fix: In a frontend setup, the SDK prompts a wallet popup as soon as it is loaded, before the dApp takes over --- .github/workflows/website-deploy.yml | 6 +- pnpm-lock.yaml | 402 +------------------- sdk/package.json | 2 +- sdk/src/VeraxSdk.ts | 55 +-- sdk/src/dataMapper/AttestationDataMapper.ts | 8 +- sdk/src/dataMapper/BaseDataMapper.ts | 4 +- sdk/src/dataMapper/ModuleDataMapper.ts | 10 +- sdk/src/dataMapper/PortalDataMapper.ts | 20 +- sdk/src/dataMapper/SchemaDataMapper.ts | 8 +- sdk/src/utils/transactionSender.ts | 7 +- website/package.json | 4 +- website/src/main.tsx | 8 +- website/src/pages/SDKDemo.tsx | 86 +++-- 13 files changed, 138 insertions(+), 482 deletions(-) diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml index 1f36530c..e7d964fa 100644 --- a/.github/workflows/website-deploy.yml +++ b/.github/workflows/website-deploy.yml @@ -2,7 +2,11 @@ name: Deploy website on: push: - branches: ["dev"] + branches: + [ + "dev", + "fix/in-a-frontend-setup-the-sdk-prompts-a-wallet-popup-as-soon-as-it-is-loaded-before-the-dapp-takes-over", + ] paths: - website/** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b32c57b7..d3364710 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,7 +73,7 @@ importers: version: 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) '@graphql-mesh/graphql': specifier: ^0.95.8 - version: 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(tslib@2.6.2) + version: 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(react@18.2.0)(tslib@2.6.2) '@graphql-mesh/http': specifier: ^0.96.14 version: 0.96.14(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/runtime@0.96.13)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2) @@ -345,8 +345,8 @@ importers: specifier: ^0.2.0 version: 0.2.0(@fortawesome/fontawesome-svg-core@6.4.2)(react@18.2.0) '@verax-attestation-registry/verax-sdk': - specifier: 0.0.14 - version: 0.0.14(@babel/core@7.23.3)(@envelop/core@4.0.3)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/merge@9.0.0)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(@types/node@20.9.0)(graphql-tag@2.12.6)(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0)(tslib@2.6.2)(typescript@5.2.2) + specifier: 0.0.15 + version: link:../sdk axios: specifier: ^1.6.1 version: 1.6.1(debug@4.3.4) @@ -367,7 +367,7 @@ importers: version: 1.18.9(typescript@5.2.2)(zod@3.22.4) wagmi: specifier: ^1.4.6 - version: 1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9) + version: 1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9) devDependencies: '@types/react': specifier: ^18.2.37 @@ -398,7 +398,7 @@ importers: version: 5.2.2 vite: specifier: ^4.5.0 - version: 4.5.0(@types/node@20.9.0) + version: 4.5.0 vite-plugin-radar: specifier: ^0.9.1 version: 0.9.1(vite@4.5.0) @@ -429,7 +429,7 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 - /@apollo/client@3.8.6(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0): + /@apollo/client@3.8.6(graphql@16.8.1)(react@18.2.0): resolution: {integrity: sha512-FnHg3vhQP8tQzgBs6oTJCFFIbovelDGYujj6MK7CJneiHf62TJstCIO0Ot4A1h7XrgFEtgl8a/OgajQWqrTuYw==} requiresBuild: true peerDependencies: @@ -458,7 +458,6 @@ packages: optimism: 0.17.5 prop-types: 15.8.1 react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) response-iterator: 0.2.6 symbol-observable: 4.0.0 ts-invariant: 0.10.3 @@ -5404,25 +5403,6 @@ packages: tslib: 2.6.2 dev: false - /@graphprotocol/client-add-source-name@2.0.0(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(graphql@16.8.1): - resolution: {integrity: sha512-3vX8mVPIEJFwAoRhjTPd9IjQrBuE+Gv+JB7IEf8/9222qiU9EzHVFUekKxVtcxQXD40CfageS41CxOreWQ1enA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/types': ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 - '@graphql-tools/delegate': ^9.0.32 || ^10.0.0 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - '@graphql-tools/wrap': ^9.4.2 || ^10.0.0 - graphql: ^15.2.0 || ^16.0.0 - dependencies: - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@graphql-tools/wrap': 10.0.1(graphql@16.8.1) - graphql: 16.8.1 - lodash: 4.17.21 - tslib: 2.6.2 - dev: false - /@graphprotocol/client-auto-pagination@2.0.0(@graphql-mesh/types@0.93.2)(@graphql-tools/delegate@10.0.3)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(graphql@16.8.1): resolution: {integrity: sha512-TouHgs6rQLpZSgnMoPdes8/ZTtMMEoxWeUUCkfho/xfSi49prb5DcsI83pykln0OEAUnNPnaX0MhP+xA5LtFSg==} engines: {node: '>=16.0.0'} @@ -5442,25 +5422,6 @@ packages: tslib: 2.6.2 dev: false - /@graphprotocol/client-auto-pagination@2.0.0(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(graphql@16.8.1): - resolution: {integrity: sha512-TouHgs6rQLpZSgnMoPdes8/ZTtMMEoxWeUUCkfho/xfSi49prb5DcsI83pykln0OEAUnNPnaX0MhP+xA5LtFSg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/types': ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 - '@graphql-tools/delegate': ^9.0.32 || ^10.0.0 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - '@graphql-tools/wrap': ^9.4.2 || ^10.0.0 - graphql: ^15.2.0 || ^16.0.0 - dependencies: - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@graphql-tools/wrap': 10.0.1(graphql@16.8.1) - graphql: 16.8.1 - lodash: 4.17.21 - tslib: 2.6.2 - dev: false - /@graphprotocol/client-auto-type-merging@2.0.0(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.3)(graphql@16.8.1): resolution: {integrity: sha512-mxqXKHK2lO+k4r02Q44n3qhd5dufo+SSDduD8zGUDBsYcRQAtQD9PwmXRHyUoB9nw4A+NC+CtVh+76fueXCG1w==} engines: {node: '>=16.0.0'} @@ -5478,23 +5439,6 @@ packages: - '@graphql-mesh/utils' dev: false - /@graphprotocol/client-auto-type-merging@2.0.0(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.3)(graphql@16.8.1): - resolution: {integrity: sha512-mxqXKHK2lO+k4r02Q44n3qhd5dufo+SSDduD8zGUDBsYcRQAtQD9PwmXRHyUoB9nw4A+NC+CtVh+76fueXCG1w==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/types': ^0.78.0 || ^0.79.0 || ^0.80.0 || ^0.81.0 || ^0.82.0 || ^0.83.0 || ^0.84.0 || ^0.85.0 || ^0.89.0 || ^0.90.0 || ^0.91.0 || ^0.93.0 - '@graphql-tools/delegate': ^9.0.32 || ^10.0.0 - graphql: ^15.2.0 || ^16.0.0 - dependencies: - '@graphql-mesh/transform-type-merging': 0.93.1(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - transitivePeerDependencies: - - '@graphql-mesh/utils' - dev: false - /@graphprotocol/client-block-tracking@2.0.0(@graphql-tools/delegate@10.0.3)(graphql@16.8.1): resolution: {integrity: sha512-mpr0JAlefFGhxeb25ndeRKZ+t9cDHcUKGfRKIsoDzCclUEh5tBVTiQCDVGt6Eu+pxnrHPF2v/NQWktaB3+6twQ==} engines: {node: '>=16.0.0'} @@ -5547,45 +5491,6 @@ packages: - utf-8-validate dev: false - /@graphprotocol/client-cli@3.0.0(@babel/core@7.23.3)(@envelop/core@4.0.3)(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/merge@9.0.0)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(@types/node@20.9.0)(graphql-tag@2.12.6)(graphql@16.8.1)(react-native@0.72.6): - resolution: {integrity: sha512-hTISbOzKavlDifBNsR6JqQMfdYwY7++hflPy+c3WHRrZ4OMoxFmW7ZuvaP6LvgKdJV77O8w9dnT/uxeHs6a90g==} - engines: {node: '>=16.0.0'} - hasBin: true - peerDependencies: - graphql: ^15.2.0 || ^16.0.0 - dependencies: - '@graphprotocol/client-add-source-name': 2.0.0(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(graphql@16.8.1) - '@graphprotocol/client-auto-pagination': 2.0.0(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(graphql@16.8.1) - '@graphprotocol/client-auto-type-merging': 2.0.0(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.3)(graphql@16.8.1) - '@graphprotocol/client-block-tracking': 2.0.0(@graphql-tools/delegate@10.0.3)(graphql@16.8.1) - '@graphprotocol/client-polling-live': 2.0.0(@envelop/core@4.0.3)(@graphql-tools/merge@9.0.0)(graphql@16.8.1) - '@graphql-mesh/cli': 0.82.35(@babel/core@7.23.3)(@types/node@20.9.0)(graphql-tag@2.12.6)(graphql@16.8.1)(react-native@0.72.6) - '@graphql-mesh/graphql': 0.93.1(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(tslib@2.6.2) - graphql: 16.8.1 - tslib: 2.6.2 - transitivePeerDependencies: - - '@babel/core' - - '@envelop/core' - - '@graphql-mesh/cross-helpers' - - '@graphql-mesh/store' - - '@graphql-mesh/types' - - '@graphql-mesh/utils' - - '@graphql-tools/delegate' - - '@graphql-tools/merge' - - '@graphql-tools/utils' - - '@graphql-tools/wrap' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - bufferutil - - encoding - - graphql-tag - - react-native - - react-native-windows - - supports-color - - utf-8-validate - dev: false - /@graphprotocol/client-polling-live@2.0.0(@envelop/core@4.0.3)(@graphql-tools/merge@9.0.0)(graphql@16.8.1): resolution: {integrity: sha512-JQ0sKiFCX+ErR0fynBNUg/WDiVaaEndlS12fkgrFZrQA2vVpSyow9pW0nKMGVZJa4cN+VDskgwqK5BWXMvdeRA==} engines: {node: '>=16.0.0'} @@ -6009,22 +5914,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/cache-localforage@0.95.8(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-PgCTHh1dLwjmusWEWAMQkglL7gR8VyyT9pzTcYBVFhGYNXysepCrl85QtaqtEMnR/YijgpCWaKGIYK+bosQZsg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - graphql: 16.8.1 - localforage: 1.10.0 - tslib: 2.6.2 - dev: false - /@graphql-mesh/cli@0.82.35(@babel/core@7.23.3)(@types/node@20.9.0)(graphql-tag@2.12.6)(graphql@16.8.1)(react-native@0.72.6): resolution: {integrity: sha512-5IuXpk+Zpg05u6qNPX19VzC5/HCiLdDRF6EPZ3ze57FIRgGA3YsB1CUGga6Ky3inalURYwx0kWqmdjbdKZYx1w==} hasBin: true @@ -6173,37 +6062,7 @@ packages: - utf-8-validate dev: false - /@graphql-mesh/graphql@0.93.1(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-1G2/1jkl1VPWhsZsUBwFQI5d9OxxEc+CMxy5ef0qI2WEXqIocOxMhEY53cc+tCSbuXR99rxos+KD/8Z6ZasaOQ==} - peerDependencies: - '@graphql-mesh/cross-helpers': ^0.3.4 - '@graphql-mesh/store': ^0.93.1 - '@graphql-mesh/types': ^0.93.1 - '@graphql-mesh/utils': ^0.93.1 - '@graphql-tools/utils': ^9.2.1 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/string-interpolation': 0.4.4(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 9.0.35(graphql@16.8.1) - '@graphql-tools/url-loader': 7.17.18(@types/node@20.9.0)(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@graphql-tools/wrap': 9.4.2(graphql@16.8.1) - graphql: 16.8.1 - lodash.get: 4.4.2 - tslib: 2.6.2 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - encoding - - utf-8-validate - dev: false - - /@graphql-mesh/graphql@0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(tslib@2.6.2): + /@graphql-mesh/graphql@0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(react@18.2.0)(tslib@2.6.2): resolution: {integrity: sha512-mEbz2XYSgRTdNidUBWB7FT3QzLliJwxJIoqipSbZNputJqSbUZZ6QD/oI1IrdPXqVl/ELE2CuLiogkOSO24C1Q==} engines: {node: '>=16.0.0'} peerDependencies: @@ -6216,12 +6075,12 @@ packages: tslib: ^2.4.0 dependencies: '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) + '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) '@graphql-mesh/string-interpolation': 0.5.3(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) + '@graphql-mesh/types': 0.93.2(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) + '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/federation': 1.1.10(@types/node@20.9.0)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0) + '@graphql-tools/federation': 1.1.10(@types/node@20.9.0)(graphql@16.8.1)(react@18.2.0) '@graphql-tools/url-loader': 8.0.0(@types/node@20.9.0)(graphql@16.8.1) '@graphql-tools/utils': 9.2.1(graphql@16.8.1) graphql: 16.8.1 @@ -6279,27 +6138,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/http@0.96.14(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/runtime@0.96.13)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-38Mxw2K2RABBBO0IiXKZDu2o+jlM4vcUSEg+9h2Dz67oOJZHpKeId6z1PFb7uYMzAs29yoMcqXIEnews+HVhrQ==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/cross-helpers': ^0.4.1 - '@graphql-mesh/runtime': ^0.96.13 - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/runtime': 0.96.13(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@whatwg-node/server': 0.9.16 - graphql: 16.8.1 - graphql-yoga: 5.0.0(graphql@16.8.1) - tslib: 2.6.2 - dev: false - /@graphql-mesh/merger-bare@0.93.1(@graphql-mesh/store@0.93.1)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-S/G3WSSa4+9YT320iRL/tODK4hTvepkQNUSzmddf3oz10xeyQD7hPJyOAnB6D+2dGVhaOTwmXJIueqevcAcP6Q==} peerDependencies: @@ -6341,27 +6179,6 @@ packages: - '@graphql-mesh/store' dev: false - /@graphql-mesh/merger-bare@0.95.8(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-E5R8Sv5Dkp+eswYKEDHgu8puwSeolPX1j9IHwBVe1npRRCXc3CjMsQJ9+kcTln453vbSBcM1a3fQspIaKA1Tcg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/merger-stitching': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/schema': 10.0.0(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - transitivePeerDependencies: - - '@graphql-mesh/store' - dev: false - /@graphql-mesh/merger-stitching@0.93.1(@graphql-mesh/store@0.93.1)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-8km5UFhKQGd0XY8bTBpHoBhVx/7qCkflPHLoTAguIWN8nJrcXJoqPamodci/U+2hudLAtRqhWosHu/8z7ctZpg==} peerDependencies: @@ -6406,28 +6223,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/merger-stitching@0.95.8(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-eAukU8AsjK8jIT3vFhalGoERh98xZgzKkTCQL7w2wPpFXveSDMn+9fVvCJ1EBKTsLa7SkNXqzAFkfYp21hW0ng==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/store': ^0.95.8 - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/schema': 10.0.0(graphql@16.8.1) - '@graphql-tools/stitch': 9.0.3(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - dev: false - /@graphql-mesh/runtime@0.93.2(@graphql-mesh/cross-helpers@0.3.4)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-8z9ag3jZLmkzawMzF6+i/+P1nQai+HmSZzNeJJen6fRkwprSM1Z7B4lfYBYhdiCbK11HHubDfw4LYwRuBcISMQ==} peerDependencies: @@ -6483,35 +6278,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/runtime@0.96.13(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-eZIW/gdEVLvCLEEae8e3lny7d89CFfDyu0Z0xu4yVEdYeVpG9Ki2mDYFHztusIIkZikecvdsoM9MZX6LYcPOkg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/cross-helpers': ^0.4.1 - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@envelop/core': 5.0.0 - '@envelop/extended-validation': 4.0.0(@envelop/core@5.0.0)(graphql@16.8.1) - '@envelop/graphql-jit': 8.0.1(@envelop/core@5.0.0)(graphql@16.8.1) - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/string-interpolation': 0.5.3(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/batch-delegate': 9.0.0(graphql@16.8.1) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/executor': 1.2.0(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@graphql-tools/wrap': 10.0.1(graphql@16.8.1) - '@whatwg-node/fetch': 0.9.14 - graphql: 16.8.1 - graphql-jit: 0.8.2(graphql@16.8.1) - tslib: 2.6.2 - dev: false - /@graphql-mesh/store@0.93.1(@graphql-mesh/cross-helpers@0.3.4)(@graphql-mesh/types@0.93.2)(@graphql-mesh/utils@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-OEljVuaZn2htU1rt4Yll/aJmynw3/Kvhd6eE8V0/del0u9iuLJqiKkzFJl8HUSMh0IkO10OnficJnTM0tCmxRw==} peerDependencies: @@ -6551,26 +6317,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/store@0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-29lpMcvqS1DM9alUOCyj6he2V7ZzG/DZxkerRefT8Mo5FexwJZI3LeI0YHNSY9Cq0x8KzRoH1TWcTTN/1PDRRw==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/cross-helpers': ^0.4.1 - '@graphql-mesh/types': ^0.95.8 - '@graphql-mesh/utils': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-inspector/core': 5.0.1(graphql@16.8.1) - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - dev: false - /@graphql-mesh/string-interpolation@0.4.4(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-IotswBYZRaPswOebcr2wuOFuzD3dHIJxVEkPiiQubqjUIR8HhQI22XHJv0WNiQZ65z8NR9+GYWwEDIc2JRCNfQ==} peerDependencies: @@ -6614,22 +6360,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/transform-type-merging@0.93.1(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-CUrqCMaEqO1LDusv59UPqmQju3f+LpEGxFu7CydMiIvbfKDDDrf8+dF3OVU7d/ZOMRxB6hR80JsQF0SVeXPCOQ==} - peerDependencies: - '@graphql-mesh/types': ^0.93.1 - '@graphql-mesh/utils': ^0.93.1 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 9.0.35(graphql@16.8.1) - '@graphql-tools/stitching-directives': 2.3.34(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - dev: false - /@graphql-mesh/types@0.93.2(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-113DuJzmR7aj2EMnLPu33ktCe5k7+Mk0BxFfmQViUH+mkr6i4JMsWvPKs9dTODSYuSuwvAZ90Vw2l3QyMrbFVA==} peerDependencies: @@ -6647,24 +6377,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/types@0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-H2xh5KGc3+Ly3VdAPnRdKTibZpW9zEFgUzsozL9MQhCs6WLX+/kOADb0uIDqYFKX5c/2axmcy87BFNOausXYig==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/store': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/batch-delegate': 9.0.0(graphql@16.8.1) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) - graphql: 16.8.1 - tslib: 2.6.2 - dev: false - /@graphql-mesh/utils@0.93.2(@graphql-mesh/cross-helpers@0.3.4)(@graphql-mesh/types@0.93.2)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): resolution: {integrity: sha512-U+VytfSoqPofH/pmYZHFY10SkIFtHKrvE7Isxv1d0DiweVjdH3Qtojw13DWFpu/EKtgJY5bqoVnlcsZJYlKQoA==} peerDependencies: @@ -6713,31 +6425,6 @@ packages: tslib: 2.6.2 dev: false - /@graphql-mesh/utils@0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2): - resolution: {integrity: sha512-gH2/kXvxMHVWMX8DppIIZpFfSUaoKDJ6eQHFoAAsdabGE+vLtVk0OEYqMGVGtD/8ZDFa/P6CmwXc6hBzoLY6Kg==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@graphql-mesh/cross-helpers': ^0.4.1 - '@graphql-mesh/types': ^0.95.8 - '@graphql-tools/utils': ^9.2.1 || ^10.0.0 - graphql: '*' - tslib: ^2.4.0 - dependencies: - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/string-interpolation': 0.5.3(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/types': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) - '@graphql-tools/utils': 9.2.1(graphql@16.8.1) - '@whatwg-node/fetch': 0.9.14 - dset: 3.1.3 - graphql: 16.8.1 - js-yaml: 4.1.0 - lodash.get: 4.4.2 - lodash.topath: 4.5.2 - tiny-lru: 11.2.3 - tslib: 2.6.2 - dev: false - /@graphql-tools/batch-delegate@8.4.27(graphql@16.8.1): resolution: {integrity: sha512-efgDDJhljma9d3Ky/LswIu1xm/if2oS27XA1sOcxcShW+Ze+Qxi0hZZ6iyI4eQxVDX5Lyy/n+NvQEZAK1riqnQ==} peerDependencies: @@ -6997,7 +6684,7 @@ packages: value-or-promise: 1.0.12 dev: false - /@graphql-tools/federation@1.1.10(@types/node@20.9.0)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0): + /@graphql-tools/federation@1.1.10(@types/node@20.9.0)(graphql@16.8.1)(react@18.2.0): resolution: {integrity: sha512-H51qTYwbtfIYBO1uHXlImRWzo9tknSoIGBgJckDh+hdxJx43sZaMjJiLHc2DjRc/A8d2Bf0bi0HbH++HqOos/w==} engines: {node: '>=16.0.0'} peerDependencies: @@ -7014,7 +6701,7 @@ packages: tslib: 2.6.2 value-or-promise: 1.0.12 optionalDependencies: - '@apollo/client': 3.8.6(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0) + '@apollo/client': 3.8.6(graphql@16.8.1)(react@18.2.0) transitivePeerDependencies: - '@types/node' - graphql-ws @@ -11128,10 +10815,10 @@ packages: '@tanstack/react-query': ^4.36.1 dependencies: '@tanstack/query-persist-client-core': 4.36.1 - '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0) + '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) dev: false - /@tanstack/react-query@4.36.1(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0): + /@tanstack/react-query@4.36.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -11146,7 +10833,6 @@ packages: '@tanstack/query-core': 4.36.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-native: 0.72.6(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0) dev: false @@ -12155,51 +11841,6 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@verax-attestation-registry/verax-sdk@0.0.14(@babel/core@7.23.3)(@envelop/core@4.0.3)(@graphql-mesh/types@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/merge@9.0.0)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(@types/node@20.9.0)(graphql-tag@2.12.6)(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0)(tslib@2.6.2)(typescript@5.2.2): - resolution: {integrity: sha512-HVzRszVdCsOa3L1pVXSeAtyjrTJrwoTtH55ct7mV99ilB7DZCzx76bRo7LQlOMKetftuWFS/yFYwGedFhrDT9g==} - dependencies: - '@graphprotocol/client-cli': 3.0.0(@babel/core@7.23.3)(@envelop/core@4.0.3)(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/delegate@10.0.3)(@graphql-tools/merge@9.0.0)(@graphql-tools/utils@9.2.1)(@graphql-tools/wrap@10.0.1)(@types/node@20.9.0)(graphql-tag@2.12.6)(graphql@16.8.1)(react-native@0.72.6) - '@graphql-mesh/cache-localforage': 0.95.8(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/cross-helpers': 0.4.1(@graphql-tools/utils@9.2.1)(graphql@16.8.1) - '@graphql-mesh/graphql': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(@types/node@20.9.0)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(tslib@2.6.2) - '@graphql-mesh/http': 0.96.14(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/runtime@0.96.13)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/merger-bare': 0.95.8(@graphql-mesh/store@0.95.8)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/runtime': 0.96.13(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/store': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-mesh/utils@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@graphql-mesh/utils': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/types@0.95.8)(@graphql-tools/utils@9.2.1)(graphql@16.8.1)(tslib@2.6.2) - '@whatwg-node/fetch': 0.9.14 - axios: 1.6.1(debug@4.3.4) - dotenv: 16.3.1 - graphql: 16.8.1 - viem: 1.18.9(typescript@5.2.2)(zod@3.22.4) - transitivePeerDependencies: - - '@babel/core' - - '@envelop/core' - - '@graphql-mesh/types' - - '@graphql-tools/delegate' - - '@graphql-tools/merge' - - '@graphql-tools/utils' - - '@graphql-tools/wrap' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - bufferutil - - debug - - encoding - - graphql-tag - - graphql-ws - - react - - react-dom - - react-native - - react-native-windows - - subscriptions-transport-ws - - supports-color - - tslib - - typescript - - utf-8-validate - - zod - dev: false - /@vercel/webpack-asset-relocator-loader@1.7.3: resolution: {integrity: sha512-vizrI18v8Lcb1PmNNUBz7yxPxxXoOeuaVEjTG9MjvDrphjiSxFZrRJ5tIghk+qdLFRCXI5HBCshgobftbmrC5g==} dependencies: @@ -12217,7 +11858,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.3) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 4.5.0(@types/node@20.9.0) + vite: 4.5.0 transitivePeerDependencies: - supports-color dev: true @@ -15599,7 +15240,7 @@ packages: resize-observer-polyfill: 1.5.1 styled-components: 5.3.11(@babel/core@7.23.3)(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0) viem: 1.18.9(typescript@5.2.2)(zod@3.22.4) - wagmi: 1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9) + wagmi: 1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9) transitivePeerDependencies: - '@babel/core' - react-is @@ -29068,10 +28709,10 @@ packages: peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 dependencies: - vite: 4.5.0(@types/node@20.9.0) + vite: 4.5.0 dev: true - /vite@4.5.0(@types/node@20.9.0): + /vite@4.5.0: resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -29099,7 +28740,6 @@ packages: terser: optional: true dependencies: - '@types/node': 20.9.0 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -29120,7 +28760,7 @@ packages: hasBin: true dev: true - /wagmi@1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9): + /wagmi@1.4.7(@types/react@18.2.37)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9): resolution: {integrity: sha512-/k8gA9S6RnwU6Qroxs630jAFvRIx+DSKpCP1owgAEGWc7D2bAJHljwRSCRTGENz48HyJ4V3R7KYV1yImxPvM3A==} peerDependencies: react: '>=17.0.0' @@ -29131,7 +28771,7 @@ packages: optional: true dependencies: '@tanstack/query-sync-storage-persister': 4.36.1 - '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react-native@0.72.6)(react@18.2.0) + '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-query-persist-client': 4.36.1(@tanstack/react-query@4.36.1) '@wagmi/core': 1.4.7(@types/react@18.2.37)(react@18.2.0)(typescript@5.2.2)(viem@1.18.9) abitype: 0.8.7(typescript@5.2.2) diff --git a/sdk/package.json b/sdk/package.json index ce5ca379..69db3f66 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@verax-attestation-registry/verax-sdk", - "version": "0.0.14", + "version": "0.0.15", "description": "Verax Attestation Registry SDK to interact with the subgraph and the contracts", "keywords": [ "linea-attestation-registry", diff --git a/sdk/src/VeraxSdk.ts b/sdk/src/VeraxSdk.ts index e78df355..25fe496a 100644 --- a/sdk/src/VeraxSdk.ts +++ b/sdk/src/VeraxSdk.ts @@ -5,26 +5,12 @@ import ModuleDataMapper from "./dataMapper/ModuleDataMapper"; import PortalDataMapper from "./dataMapper/PortalDataMapper"; import { Address, createPublicClient, createWalletClient, custom, Hex, http, PublicClient, WalletClient } from "viem"; import UtilsDataMapper from "./dataMapper/UtilsDataMapper"; -import { PrivateKeyAccount, privateKeyToAccount } from "viem/accounts"; +import { privateKeyToAccount } from "viem/accounts"; import { Conf } from "./types"; import { SDKMode } from "./utils/constants"; export * from "./types"; -let account: PrivateKeyAccount | Address; - -if (typeof window === "undefined") { - // TODO: return to a "module" setup instead of "CommonJS" - // eslint-disable-next-line @typescript-eslint/no-var-requires - const dotenv = require("dotenv"); - dotenv.config({ path: "./.env" }); - account = privateKeyToAccount(process.env.PRIVATE_KEY as Hex); -} else if (typeof window.ethereum !== "undefined") { - window.ethereum.request({ method: "eth_requestAccounts" }).then((result: Address[]) => { - account = result[0]; - }); -} - export class VeraxSdk { static DEFAULT_LINEA_MAINNET: Conf = { chain: linea, @@ -65,33 +51,30 @@ export class VeraxSdk { public portal: PortalDataMapper; public utils: UtilsDataMapper; - constructor(conf: Conf) { + constructor(conf: Conf, publicAddress?: Address, privateKey?: Hex) { this.web3Client = createPublicClient({ chain: conf.chain, transport: http(), }); - if (typeof account === "undefined") { - this.walletClient = undefined; - } else { - this.walletClient = - conf.mode === SDKMode.BACKEND - ? createWalletClient({ - chain: conf.chain, - account, - transport: http(), - }) - : createWalletClient({ - chain: conf.chain, - account, - transport: custom(window.ethereum), - }); + if (conf.mode === SDKMode.BACKEND) { + this.walletClient = createWalletClient({ + chain: conf.chain, + account: privateKey ? privateKeyToAccount(privateKey) : undefined, + transport: http(), + }); + } else if (typeof window.ethereum !== "undefined") { + this.walletClient = createWalletClient({ + chain: conf.chain, + account: publicAddress, + transport: custom(window.ethereum), + }); } - this.attestation = new AttestationDataMapper(conf, this.web3Client, this.walletClient, this); - this.schema = new SchemaDataMapper(conf, this.web3Client, this.walletClient, this); - this.module = new ModuleDataMapper(conf, this.web3Client, this.walletClient, this); - this.portal = new PortalDataMapper(conf, this.web3Client, this.walletClient, this); - this.utils = new UtilsDataMapper(conf, this.web3Client, this.walletClient, this); + this.attestation = new AttestationDataMapper(conf, this.web3Client, this, this.walletClient); + this.schema = new SchemaDataMapper(conf, this.web3Client, this, this.walletClient); + this.module = new ModuleDataMapper(conf, this.web3Client, this, this.walletClient); + this.portal = new PortalDataMapper(conf, this.web3Client, this, this.walletClient); + this.utils = new UtilsDataMapper(conf, this.web3Client, this, this.walletClient); } } diff --git a/sdk/src/dataMapper/AttestationDataMapper.ts b/sdk/src/dataMapper/AttestationDataMapper.ts index 8ec1f95b..f0e9ff17 100644 --- a/sdk/src/dataMapper/AttestationDataMapper.ts +++ b/sdk/src/dataMapper/AttestationDataMapper.ts @@ -75,7 +75,7 @@ export default class AttestationDataMapper extends BaseDataMapper< async updateRouter(routerAddress: Address) { const request = await this.simulateUpdateRouter(routerAddress); - return executeTransaction(this.walletClient, request); + return executeTransaction(request, this.walletClient); } async simulateMassImport(portalAddress: Address, attestationPayloads: AttestationPayload[]) { @@ -101,7 +101,7 @@ export default class AttestationDataMapper extends BaseDataMapper< async massImport(portalAddress: Address, attestationPayloads: AttestationPayload[]) { const request = await this.simulateMassImport(portalAddress, attestationPayloads); - return executeTransaction(this.walletClient, request); + return executeTransaction(request, this.walletClient); } async simulateIncrementVersionNumber() { @@ -110,7 +110,7 @@ export default class AttestationDataMapper extends BaseDataMapper< async incrementVersionNumber() { const request = await this.simulateIncrementVersionNumber(); - return executeTransaction(this.walletClient, request); + return executeTransaction(request, this.walletClient); } async isRegistered(attestationId: string) { @@ -166,7 +166,7 @@ export default class AttestationDataMapper extends BaseDataMapper< } private async simulateContract(functionName: string, args: unknown[]) { - if (!this.walletClient) throw new Error("Account not available"); + if (!this.walletClient) throw new Error("VeraxSDK - Wallet not available"); try { const { request } = await this.web3Client.simulateContract({ address: this.conf.attestationRegistryAddress, diff --git a/sdk/src/dataMapper/BaseDataMapper.ts b/sdk/src/dataMapper/BaseDataMapper.ts index 16e85691..321c5d09 100644 --- a/sdk/src/dataMapper/BaseDataMapper.ts +++ b/sdk/src/dataMapper/BaseDataMapper.ts @@ -13,11 +13,11 @@ export default abstract class BaseDataMapper { protected abstract typeName: string; protected abstract gqlInterface: string; - constructor(_conf: Conf, _web3Client: PublicClient, _walletClient: WalletClient | undefined, _veraxSdk: VeraxSdk) { + constructor(_conf: Conf, _web3Client: PublicClient, _veraxSdk: VeraxSdk, _walletClient?: WalletClient) { this.conf = _conf; this.web3Client = _web3Client; - this.walletClient = _walletClient; this.veraxSdk = _veraxSdk; + this.walletClient = _walletClient; } async findOneById(id: string) { diff --git a/sdk/src/dataMapper/ModuleDataMapper.ts b/sdk/src/dataMapper/ModuleDataMapper.ts index 003d9771..d938dea4 100644 --- a/sdk/src/dataMapper/ModuleDataMapper.ts +++ b/sdk/src/dataMapper/ModuleDataMapper.ts @@ -22,7 +22,7 @@ export default class ModuleDataMapper extends BaseDataMapper { - if (walletClient === undefined) throw new Error("Account not available"); +export async function executeTransaction(request: any, walletClient?: WalletClient): Promise { + if (!walletClient) { + throw new Error("VeraxSDK - Wallet not available"); + } + const hash: Hash = await walletClient.writeContract(request); console.log(`Transaction sent with hash ${hash}`); return hash; diff --git a/website/package.json b/website/package.json index b2fea43a..348c4a14 100644 --- a/website/package.json +++ b/website/package.json @@ -17,7 +17,7 @@ "type": "module", "scripts": { "build": "tsc && vite build", - "dev": "vite", + "dev": "pnpm i && vite --force", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, @@ -26,7 +26,7 @@ "@fortawesome/free-brands-svg-icons": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", - "@verax-attestation-registry/verax-sdk": "0.0.14", + "@verax-attestation-registry/verax-sdk": "0.0.15", "axios": "^1.6.1", "connectkit": "^1.5.3", "react": "^18.2.0", diff --git a/website/src/main.tsx b/website/src/main.tsx index d8b65fe3..d4c808bf 100644 --- a/website/src/main.tsx +++ b/website/src/main.tsx @@ -4,16 +4,14 @@ import App from "./App.tsx"; import "./index.css"; import { createConfig, WagmiConfig } from "wagmi"; import { ConnectKitProvider, getDefaultConfig } from "connectkit"; -import { lineaTestnet } from "wagmi/chains"; - -const chains = [lineaTestnet]; +import { linea, lineaTestnet } from "wagmi/chains"; const config = createConfig( getDefaultConfig({ infuraId: import.meta.env.VITE_INFURA_API_KEY, walletConnectProjectId: import.meta.env.VITE_WALLETCONNECT_PROJECT_ID || "", - appName: "Verax Explorer", - chains, + appName: "Verax Website", + chains: [linea, lineaTestnet], }), ); diff --git a/website/src/pages/SDKDemo.tsx b/website/src/pages/SDKDemo.tsx index 2f043100..840cc33a 100644 --- a/website/src/pages/SDKDemo.tsx +++ b/website/src/pages/SDKDemo.tsx @@ -1,44 +1,71 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import "./SDKDemo.css"; import { ConnectKitButton } from "connectkit"; -import { VeraxSdk } from "@verax-attestation-registry/verax-sdk"; +import { Attestation, VeraxSdk } from "@verax-attestation-registry/verax-sdk"; +import { useAccount, useNetwork } from "wagmi"; function SDKDemo() { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const [attestations, setAttestations] = useState([]); + const [attestations, setAttestations] = useState([]); const [attestationsCounter, setAttestationsCounter] = useState(0); const [txHash, setTxHash] = useState(""); const [error, setError] = useState(""); + const [veraxSdk, setVeraxSdk] = useState(); + + const { address, isConnected } = useAccount(); + const { chain } = useNetwork(); + + useEffect(() => { + if (chain && address) { + console.log("chain", chain); + console.log("address", address); + const sdkConf = chain.id === 59144 ? VeraxSdk.DEFAULT_LINEA_MAINNET_FRONTEND : VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND; + const sdk = new VeraxSdk(sdkConf, address); + setVeraxSdk(sdk); + } + }, [chain, address]); + + const shortenHexString = (longString: string) => { + return `${longString.slice(0, 5)}...${longString.slice(longString.length - 4, longString.length)}`; + }; const getSomeAttestations = async () => { - const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND); - setAttestations(await veraxSdk.attestation.findBy(2)); + if (veraxSdk) { + setAttestations(await veraxSdk.attestation.findBy(2, 1234)); + } else { + console.error("SDK not instantiated"); + } }; const getAttestationCounter = async () => { - const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND); - setAttestationsCounter((await veraxSdk.utils.getAttestationIdCounter()) as number); + if (veraxSdk) { + setAttestationsCounter((await veraxSdk.utils.getAttestationIdCounter()) as number); + } else { + console.error("SDK not instantiated"); + } }; const createAnAttestation = async () => { - const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET_FRONTEND); - try { - const hash = await veraxSdk.portal.attest( - "0xeea25bc2ec56cae601df33b8fc676673285e12cc", - { - schemaId: "0x9ba590dd7fbd5bd1a7d06cdcb4744e20a49b3520560575cd63de17734a408738", - expirationDate: 1693583329, - subject: "0x068579b2398992629df8dDbcB048D26d863f7A70", - attestationData: [{ isBuidler: true }], - }, - [], - ); - setTxHash(hash); - } catch (e) { - console.log(e); - if (e instanceof Error) { - setError(`Oops, something went wrong: ${e.message}`); + if (veraxSdk) { + try { + const hash = await veraxSdk.portal.attest( + "0xeea25bc2ec56cae601df33b8fc676673285e12cc", + { + schemaId: "0x9ba590dd7fbd5bd1a7d06cdcb4744e20a49b3520560575cd63de17734a408738", + expirationDate: 1693583329, + subject: "0x068579b2398992629df8dDbcB048D26d863f7A70", + attestationData: [{ isBuidler: true }], + }, + [], + ); + setTxHash(hash); + } catch (e) { + console.log(e); + if (e instanceof Error) { + setError(`Oops, something went wrong: ${e.message}`); + } } + } else { + console.error("SDK not instantiated"); } }; @@ -53,11 +80,12 @@ function SDKDemo() {
{attestations.length > 0 && ( -
    + <> {attestations.map((attestation) => ( -
  • {attestation.id}
  • +
    ID = {shortenHexString(attestation.id)} - Subject = {shortenHexString(attestation.subject)}
    ))} -
+ )}
@@ -67,7 +95,7 @@ function SDKDemo() {
- + {txHash !== "" &&

{`Transaction with hash ${txHash} sent!`}

} {error !== "" &&

{error}

}