From 725e022220e0739688a3fe9bce7f102bf5aad085 Mon Sep 17 00:00:00 2001 From: Alain Nicolas Date: Thu, 23 Nov 2023 17:47:09 +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 (#424) --- pnpm-lock.yaml | 513 +++++++------------- 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 | 84 ++-- 12 files changed, 281 insertions(+), 442 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b32c57b7..31841c17 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + overrides: got@<11.8.5: '>=11.8.5' ejs@<3.1.7: '>=3.1.7' @@ -73,7 +77,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) @@ -94,7 +98,7 @@ importers: version: 0.9.14 axios: specifier: ^1.6.1 - version: 1.6.1(debug@4.3.4) + version: 1.6.1 dotenv: specifier: ^16.3.1 version: 16.3.1 @@ -310,7 +314,7 @@ importers: version: 4.0.2 ts-jest: specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.3)(babel-jest@29.7.0)(jest@29.7.0)(typescript@5.2.2) + version: 29.1.1(@babel/core@7.23.3)(jest@29.7.0)(typescript@4.9.5) typescript: specifier: ^4.9.5 version: 4.9.5 @@ -345,11 +349,11 @@ 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: 0.0.15(@babel/core@7.23.3)(@envelop/core@4.0.3)(@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) axios: specifier: ^1.6.1 - version: 1.6.1(debug@4.3.4) + version: 1.6.1 connectkit: specifier: ^1.5.3 version: 1.5.3(@babel/core@7.23.3)(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0)(viem@1.18.9)(wagmi@1.4.7) @@ -5404,25 +5408,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 +5427,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 +5444,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 +5496,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 +5919,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,26 +6067,27 @@ 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==} + /@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: - '@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-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 || ^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/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-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.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/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-tools/wrap': 9.4.2(graphql@16.8.1) graphql: 16.8.1 lodash.get: 4.4.2 tslib: 2.6.2 @@ -6200,10 +6095,14 @@ packages: - '@types/node' - bufferutil - encoding + - graphql-ws + - react + - react-dom + - subscriptions-transport-ws - 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/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): resolution: {integrity: sha512-mEbz2XYSgRTdNidUBWB7FT3QzLliJwxJIoqipSbZNputJqSbUZZ6QD/oI1IrdPXqVl/ELE2CuLiogkOSO24C1Q==} engines: {node: '>=16.0.0'} peerDependencies: @@ -6216,10 +6115,9 @@ 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/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/url-loader': 8.0.0(@types/node@20.9.0)(graphql@16.8.1) @@ -6279,27 +6177,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 +6218,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 +6262,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 +6317,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 +6356,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 +6399,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 +6416,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 +6464,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: @@ -10027,7 +9753,7 @@ packages: react-refresh: 0.14.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /@popperjs/core@2.11.8: @@ -12155,20 +11881,20 @@ 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==} + /@verax-attestation-registry/verax-sdk@0.0.15(@babel/core@7.23.3)(@envelop/core@4.0.3)(@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-O1wgPRh7xoWi4FonP5Oml0HZxROU574f8zDImn/oTLrjM+1RbGRO1AviRPRESXg5yVRpbjrFXa5jajlddASohA==} 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) + '@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.93.2)(@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.93.2)(@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) + '@graphql-mesh/graphql': 0.95.8(@graphql-mesh/cross-helpers@0.4.1)(@graphql-mesh/store@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.93.2)(@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.93.2)(@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.93.2)(@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/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) '@whatwg-node/fetch': 0.9.14 - axios: 1.6.1(debug@4.3.4) + axios: 1.6.1 dotenv: 16.3.1 graphql: 16.8.1 viem: 1.18.9(typescript@5.2.2)(zod@3.22.4) @@ -13843,6 +13569,15 @@ packages: - debug dev: true + /axios@1.6.1: + resolution: {integrity: sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==} + dependencies: + follow-redirects: 1.15.3(debug@3.2.7) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + /axios@1.6.1(debug@4.3.4): resolution: {integrity: sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==} dependencies: @@ -13851,6 +13586,7 @@ packages: proxy-from-env: 1.1.0 transitivePeerDependencies: - debug + dev: true /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -13936,7 +13672,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /babel-plugin-add-module-exports@1.0.4: @@ -15947,7 +15683,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 3.3.0 semver: 7.5.4 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /css-minimizer-webpack-plugin@2.0.0(webpack@5.89.0): @@ -15970,7 +15706,7 @@ packages: schema-utils: 3.3.0 serialize-javascript: 5.0.1 source-map: 0.6.1 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /css-select@4.3.0: @@ -16170,7 +15906,6 @@ packages: optional: true dependencies: ms: 2.1.3 - dev: true /debug@4.3.4(supports-color@5.5.0): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -17576,7 +17311,7 @@ packages: micromatch: 4.0.5 normalize-path: 3.0.0 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /eslint@7.32.0: @@ -17781,7 +17516,7 @@ packages: optional: true dependencies: '@solidity-parser/parser': 0.14.5 - axios: 1.6.1(debug@4.3.4) + axios: 1.6.1 cli-table3: 0.5.1 colors: 1.4.0 ethereum-cryptography: 1.2.0 @@ -18334,7 +18069,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /file-type@16.5.4: @@ -18509,7 +18244,6 @@ packages: optional: true dependencies: debug: 3.2.7 - dev: true /follow-redirects@1.15.3(debug@4.3.4): resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} @@ -18521,6 +18255,7 @@ packages: optional: true dependencies: debug: 4.3.4(supports-color@5.5.0) + dev: true /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -18571,7 +18306,7 @@ packages: semver: 7.5.4 tapable: 1.1.3 typescript: 4.9.5 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /form-data-encoder@2.1.4: @@ -19278,13 +19013,13 @@ packages: string-similarity: 1.2.2 strip-ansi: 6.0.1 style-loader: 2.0.0(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(webpack@5.89.0) tmp: 0.2.1 true-case-path: 2.2.1 type-of: 2.0.1 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) uuid: 8.3.2 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 webpack-dev-middleware: 4.3.0(webpack@5.89.0) webpack-merge: 5.10.0 webpack-stats-plugin: 1.1.3 @@ -23284,7 +23019,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 webpack-sources: 1.4.3 dev: true @@ -23924,7 +23659,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /nullthrows@1.1.1: @@ -24762,7 +24497,7 @@ packages: klona: 2.0.6 postcss: 8.4.31 semver: 7.5.4 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /postcss-merge-longhand@5.1.7(postcss@8.4.31): @@ -25559,7 +25294,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /rc@1.2.8: @@ -25616,7 +25351,7 @@ packages: strip-ansi: 6.0.1 text-table: 0.2.0 typescript: 4.9.5 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 transitivePeerDependencies: - eslint - supports-color @@ -25954,7 +25689,7 @@ packages: loose-envify: 1.4.0 neo-async: 2.6.2 react: 18.2.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /react-shallow-renderer@16.15.0(react@18.2.0): @@ -27589,7 +27324,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /style-to-object@0.3.0: @@ -27926,6 +27661,30 @@ packages: webpack: 5.89.0(@swc/core@1.3.78) dev: true + /terser-webpack-plugin@5.3.9(webpack@5.89.0): + resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + '@jridgewell/trace-mapping': 0.3.20 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.22.0 + webpack: 5.89.0 + dev: true + /terser@5.22.0: resolution: {integrity: sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==} engines: {node: '>=10'} @@ -28200,6 +27959,40 @@ packages: yargs-parser: 21.1.1 dev: true + /ts-jest@29.1.1(@babel/core@7.23.3)(jest@29.7.0)(typescript@4.9.5): + resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + dependencies: + '@babel/core': 7.23.3 + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.5.4 + typescript: 4.9.5 + yargs-parser: 21.1.1 + dev: true + /ts-node@10.9.1(@types/node@20.9.0)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -28838,7 +28631,7 @@ packages: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /url-parse@1.5.10: @@ -29340,7 +29133,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78) + webpack: 5.89.0 dev: true /webpack-merge@5.10.0: @@ -29376,6 +29169,46 @@ packages: - supports-color dev: true + /webpack@5.89.0: + resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + '@types/eslint-scope': 3.7.6 + '@types/estree': 1.0.4 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/wasm-edit': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + acorn: 8.11.2 + acorn-import-assertions: 1.9.0(acorn@8.11.2) + browserslist: 4.22.1 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.15.0 + es-module-lexer: 1.3.1 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.9(webpack@5.89.0) + watchpack: 2.4.0 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: true + /webpack@5.89.0(@swc/core@1.3.78): resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} @@ -29947,7 +29780,3 @@ packages: react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) dev: false - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false diff --git a/sdk/package.json b/sdk/package.json index ce5ca379..e17df9ce 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.16", "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..339620cd 100644 --- a/website/src/pages/SDKDemo.tsx +++ b/website/src/pages/SDKDemo.tsx @@ -1,44 +1,69 @@ -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) { + 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 +78,12 @@ function SDKDemo() {
{attestations.length > 0 && ( -
    + <> {attestations.map((attestation) => ( -
  • {attestation.id}
  • +
    ID = {shortenHexString(attestation.id)} - Subject = {shortenHexString(attestation.subject)}
    ))} -
+ )}
@@ -67,7 +93,7 @@ function SDKDemo() {
- + {txHash !== "" &&

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

} {error !== "" &&

{error}

}