From ecf0bfe1bae95cc2c74a98840fc364b24807bcdc Mon Sep 17 00:00:00 2001 From: Kames Geraghty Date: Wed, 4 Dec 2024 08:20:08 -0700 Subject: [PATCH 1/6] qa: leaderboard page (#52) --- apps/wallet/app/(site)/leaderboard/page.tsx | 102 +++++++++--------- .../components/tables/leaderboard-table.tsx | 6 ++ 2 files changed, 59 insertions(+), 49 deletions(-) diff --git a/apps/wallet/app/(site)/leaderboard/page.tsx b/apps/wallet/app/(site)/leaderboard/page.tsx index 59577756..33ea40e4 100644 --- a/apps/wallet/app/(site)/leaderboard/page.tsx +++ b/apps/wallet/app/(site)/leaderboard/page.tsx @@ -1,11 +1,10 @@ 'use client'; import { LeaderboardApplyDialog } from '@/components/core/leaderboard-apply-dialog'; -import { LeaderboardMetricsTable } from '@/components/tables/leaderboard-metrics-table'; import { LeaderboardTable } from '@/components/tables/leaderboard-table'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -import { Coins, Info, Medal, Orbit, Trophy } from 'lucide-react'; +import { Coins, EarthLock, Info, Medal, Orbit, Trophy } from 'lucide-react'; export default function LeaderboardPage() { return ( @@ -49,53 +48,58 @@ export default function LeaderboardPage() {
-
-
- - - -
-
- - - - - Get Rewarded for Trust - - - -

- We're rewarding users for building a web of trust. -

-

- Users with the highest verifiable trust score will be - sent a USDC reward every month. -

-

- The reward will be distributed to the top 10 users with - the highest trust score. -

-
-
- - - - - - Trust Score Multiplier - - - -

- Each asset has a unique trust score multiplier. -

-

- Users with the highest peer-to-peer credit scores wil - have a higher universal trust score. -

-
-
-
+
+ + + + + Rewarding Relationships + + + +

+ We're rewarding users for building a web of trust. +

+

+ Users with the highest verifiable trust score will be sent + a USDC reward every month. +

+
+
+ + + + + Universal Network + + + +

+ Users in the UNV Network play to build trust with each. +

+

+ Creating peer-to-peer credit lines that are backed by + people and connections. +

+
+
+ + + + + Web of Trust + + + +

+ The goal is to build a web of trust that is verifiable. +

+

+ Backed by money, relationships and reputation. Trust is + and will always be the most valuable asset. +

+
+
diff --git a/apps/wallet/src/components/tables/leaderboard-table.tsx b/apps/wallet/src/components/tables/leaderboard-table.tsx index 3c6bfa98..23508bc5 100644 --- a/apps/wallet/src/components/tables/leaderboard-table.tsx +++ b/apps/wallet/src/components/tables/leaderboard-table.tsx @@ -132,6 +132,12 @@ const columns = [ tokenList: defaultTokenList, })?.address } + decimals={ + findToken({ + address: DEFAULT_LEADERBOARD_ASSET, + tokenList: defaultTokenList, + })?.decimals + } /> ), From 3a87cfa589c5c8e0eab046143f648b905f0c2113 Mon Sep 17 00:00:00 2001 From: Kames Geraghty Date: Wed, 4 Dec 2024 08:20:36 -0700 Subject: [PATCH 2/6] update:drizzle-orm (#53) --- apps/api-credentials/drizzle.config.ts | 2 +- apps/api-credentials/package.json | 2 +- apps/api-delegations/drizzle.config.ts | 2 +- apps/api-identity/drizzle.config.ts | 2 +- apps/api-identity/package.json | 2 +- apps/api-universal/package.json | 2 +- apps/popup/package.json | 2 +- pnpm-lock.yaml | 154 ++++++++++--------------- 8 files changed, 68 insertions(+), 100 deletions(-) diff --git a/apps/api-credentials/drizzle.config.ts b/apps/api-credentials/drizzle.config.ts index bfbe46fe..7f040f05 100644 --- a/apps/api-credentials/drizzle.config.ts +++ b/apps/api-credentials/drizzle.config.ts @@ -1,5 +1,5 @@ import type { Config } from 'drizzle-kit'; -import { env } from './src/env.js'; +import { env } from './src/env'; export default { schema: './src/lib/db/schema.ts', diff --git a/apps/api-credentials/package.json b/apps/api-credentials/package.json index 2f271b26..6d692d13 100644 --- a/apps/api-credentials/package.json +++ b/apps/api-credentials/package.json @@ -46,7 +46,7 @@ }, "devDependencies": { "dotenv": "^16.4.5", - "drizzle-kit": "^0.26.2", + "drizzle-kit": "0.28.1", "tsx": "^4.7.1", "typescript": "^5.6.3" } diff --git a/apps/api-delegations/drizzle.config.ts b/apps/api-delegations/drizzle.config.ts index 94e3726b..3e2852d2 100644 --- a/apps/api-delegations/drizzle.config.ts +++ b/apps/api-delegations/drizzle.config.ts @@ -1,5 +1,5 @@ import type { Config } from 'drizzle-kit'; -import { env } from './src/env.js'; +import { env } from './src/env'; export default { schema: './src/db/schema.ts', diff --git a/apps/api-identity/drizzle.config.ts b/apps/api-identity/drizzle.config.ts index 534712e0..fe7041eb 100644 --- a/apps/api-identity/drizzle.config.ts +++ b/apps/api-identity/drizzle.config.ts @@ -1,5 +1,5 @@ -import { env } from '@/env.js'; import type { Config } from 'drizzle-kit'; +import { env } from './src/env'; export default { out: './src/lib/db/drizzle', diff --git a/apps/api-identity/package.json b/apps/api-identity/package.json index 3e42d902..0e7d8c0b 100644 --- a/apps/api-identity/package.json +++ b/apps/api-identity/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/pg": "^8.11.10", "dotenv": "^16.4.5", - "drizzle-kit": "^0.26.2", + "drizzle-kit": "0.28.1", "tsx": "^4.19.2", "typescript": "^5.6.3" } diff --git a/apps/api-universal/package.json b/apps/api-universal/package.json index 4447b0c1..0484cfc3 100644 --- a/apps/api-universal/package.json +++ b/apps/api-universal/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@types/pg": "^8.11.10", "dotenv": "^16.4.5", - "drizzle-kit": "^0.26.2", + "drizzle-kit": "0.28.1", "tsx": "^4.19.2", "typescript": "^5.6.3" } diff --git a/apps/popup/package.json b/apps/popup/package.json index d49a486e..e11e9fb1 100644 --- a/apps/popup/package.json +++ b/apps/popup/package.json @@ -35,7 +35,6 @@ "@svgr/webpack": "^8.1.0", "@tanstack/react-query": "^5.59.0", "class-variance-authority": "^0.7.0", - "drizzle-kit": "^0.26.2", "drizzle-orm": "^0.36.4", "lucide-react": "^0.446.0", "luxon": "^3.5.0", @@ -68,6 +67,7 @@ "@types/react-dom": "^18.2.7", "autoprefixer": "^10.4.19", "bufferutil": "^4.0.7", + "drizzle-kit": "0.28.1", "encoding": "^0.1.13", "pino-pretty": "^10.2.0", "postcss": "^8.4.38", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f0ed9d2..550f281f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,8 +100,8 @@ importers: specifier: ^16.4.5 version: 16.4.5 drizzle-kit: - specifier: ^0.26.2 - version: 0.26.2 + specifier: 0.28.1 + version: 0.28.1 tsx: specifier: ^4.7.1 version: 4.19.2 @@ -198,8 +198,8 @@ importers: specifier: ^16.4.5 version: 16.4.5 drizzle-kit: - specifier: ^0.26.2 - version: 0.26.2 + specifier: 0.28.1 + version: 0.28.1 tsx: specifier: ^4.19.2 version: 4.19.2 @@ -259,8 +259,8 @@ importers: specifier: ^16.4.5 version: 16.4.5 drizzle-kit: - specifier: ^0.26.2 - version: 0.26.2 + specifier: 0.28.1 + version: 0.28.1 tsx: specifier: ^4.19.2 version: 4.19.2 @@ -467,9 +467,6 @@ importers: class-variance-authority: specifier: ^0.7.0 version: 0.7.0 - drizzle-kit: - specifier: ^0.26.2 - version: 0.26.2 drizzle-orm: specifier: ^0.36.4 version: 0.36.4(@electric-sql/pglite@0.2.14)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0(bufferutil@4.0.8)(utf-8-validate@6.0.5))(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(kysely@0.26.3)(pg@8.13.1)(postgres@3.4.5)(react@18.3.1) @@ -561,6 +558,9 @@ importers: bufferutil: specifier: ^4.0.7 version: 4.0.8 + drizzle-kit: + specifier: 0.28.1 + version: 0.28.1 encoding: specifier: ^0.1.13 version: 0.1.13 @@ -6186,10 +6186,6 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - drizzle-kit@0.26.2: - resolution: {integrity: sha512-cMq8omEKywjIy5KcqUo6LvEFxkl8/zYHsgYjFVXjmPWWtuW4blcz+YW9+oIhoaALgs2ebRjzXwsJgN9i6P49Dw==} - hasBin: true - drizzle-kit@0.28.1: resolution: {integrity: sha512-JimOV+ystXTWMgZkLHYHf2w3oS28hxiH1FR0dkmJLc7GHzdGJoJAQtQS5DRppnabsRZwE2U1F6CuezVBgmsBBQ==} hasBin: true @@ -11106,7 +11102,7 @@ snapshots: '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -11173,7 +11169,7 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -12015,7 +12011,7 @@ snapshots: '@babel/parser': 7.26.2 '@babel/template': 7.25.9 '@babel/types': 7.26.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -12529,7 +12525,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.2 @@ -12710,7 +12706,7 @@ snapshots: ci-info: 3.9.0 compression: 1.7.5 connect: 3.7.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) env-editor: 0.4.2 fast-glob: 3.3.2 form-data: 3.0.2 @@ -12772,7 +12768,7 @@ snapshots: '@expo/plist': 0.2.0 '@expo/sdk-runtime-versions': 1.0.0 chalk: 4.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) getenv: 1.0.0 glob: 10.4.5 resolve-from: 5.0.0 @@ -12828,7 +12824,7 @@ snapshots: '@expo/env@0.4.0': dependencies: chalk: 4.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) dotenv: 16.4.5 dotenv-expand: 11.0.6 getenv: 1.0.0 @@ -12841,7 +12837,7 @@ snapshots: '@expo/spawn-async': 1.7.2 arg: 5.0.2 chalk: 4.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) find-up: 5.0.0 getenv: 1.0.0 minimatch: 3.1.2 @@ -12884,7 +12880,7 @@ snapshots: '@expo/json-file': 9.0.0 '@expo/spawn-async': 1.7.2 chalk: 4.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) fs-extra: 9.1.0 getenv: 1.0.0 glob: 10.4.5 @@ -12934,7 +12930,7 @@ snapshots: '@expo/image-utils': 0.6.3 '@expo/json-file': 9.0.0 '@react-native/normalize-colors': 0.76.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) fs-extra: 9.1.0 resolve-from: 5.0.0 semver: 7.6.3 @@ -13069,7 +13065,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -13523,7 +13519,7 @@ snapshots: bufferutil: 4.0.8 cross-fetch: 4.0.0(encoding@0.1.13) date-fns: 2.30.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eciesjs: 0.3.21 eventemitter2: 6.4.9 readable-stream: 3.6.2 @@ -13538,7 +13534,7 @@ snapshots: bufferutil: 4.0.8 cross-fetch: 4.0.0(encoding@0.1.13) date-fns: 2.30.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eciesjs: 0.3.21 eventemitter2: 6.4.9 readable-stream: 3.6.2 @@ -13575,7 +13571,7 @@ snapshots: '@types/uuid': 10.0.0 bowser: 2.11.0 cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eciesjs: 0.3.21 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 @@ -13611,7 +13607,7 @@ snapshots: '@types/uuid': 10.0.0 bowser: 2.11.0 cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eciesjs: 0.3.21 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 @@ -13647,7 +13643,7 @@ snapshots: '@types/uuid': 10.0.0 bowser: 2.11.0 cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eciesjs: 0.3.21 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 @@ -13678,7 +13674,7 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) semver: 7.6.3 superstruct: 1.0.4 transitivePeerDependencies: @@ -13691,7 +13687,7 @@ snapshots: '@noble/hashes': 1.5.0 '@scure/base': 1.1.9 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) pony-cause: 2.1.11 semver: 7.6.3 uuid: 9.0.1 @@ -13705,7 +13701,7 @@ snapshots: '@noble/hashes': 1.5.0 '@scure/base': 1.1.9 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) pony-cause: 2.1.11 semver: 7.6.3 uuid: 9.0.1 @@ -14973,7 +14969,7 @@ snapshots: execa: 5.1.1 invariant: 2.2.4 metro: 0.81.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) - metro-config: 0.81.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + metro-config: 0.81.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) metro-core: 0.81.0 node-fetch: 2.7.0(encoding@0.1.13) readline: 1.3.0 @@ -15848,7 +15844,7 @@ snapshots: '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 @@ -15866,7 +15862,7 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.1 optionalDependencies: typescript: 5.6.3 @@ -15882,7 +15878,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.6.3) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.1 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -15896,7 +15892,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -16000,7 +15996,7 @@ snapshots: '@veramo/core-types@6.0.0': dependencies: credential-status: 3.0.4 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt-vc: 4.0.4 did-resolver: 4.1.0 transitivePeerDependencies: @@ -16009,7 +16005,7 @@ snapshots: '@veramo/core@6.0.0': dependencies: '@veramo/core-types': 6.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) events: 3.3.0 z-schema: 6.0.2 transitivePeerDependencies: @@ -16029,7 +16025,7 @@ snapshots: '@veramo/core-types': 6.0.0 '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-resolver: 4.1.0 transitivePeerDependencies: - bufferutil @@ -16052,7 +16048,7 @@ snapshots: '@veramo/message-handler': 6.0.0 '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) canonicalize: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt: 8.0.4 did-jwt-vc: 4.0.4 did-resolver: 4.1.0 @@ -16080,7 +16076,7 @@ snapshots: '@veramo/did-manager': 6.0.0 '@veramo/key-manager': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt-vc: 4.0.4 typeorm: 0.3.20(pg@8.13.1)(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)) uuid: 9.0.1 @@ -16110,7 +16106,7 @@ snapshots: '@veramo/did-discovery@6.0.0': dependencies: '@veramo/core-types': 6.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -16125,7 +16121,7 @@ snapshots: dependencies: '@veramo/core-types': 6.0.0 '@veramo/did-manager': 6.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -16134,7 +16130,7 @@ snapshots: '@veramo/core-types': 6.0.0 '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-resolver: 4.1.0 transitivePeerDependencies: - bufferutil @@ -16147,7 +16143,7 @@ snapshots: '@noble/curves': 1.6.0 '@veramo/core-types': 6.0.0 '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt: 8.0.4 ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) uint8arrays: 4.0.10 @@ -16166,7 +16162,7 @@ snapshots: '@veramo/core-types': 6.0.0 '@veramo/key-manager': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@veramo/utils': 6.0.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt: 8.0.4 ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -16178,7 +16174,7 @@ snapshots: '@veramo/message-handler@6.0.0': dependencies: '@veramo/core-types': 6.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -16189,7 +16185,7 @@ snapshots: '@veramo/core-types': 6.0.0 credential-status: 3.0.4 cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) did-jwt: 8.0.4 did-jwt-vc: 4.0.4 did-resolver: 4.1.0 @@ -17114,7 +17110,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -18132,10 +18128,6 @@ snapshots: ms: 2.1.3 optional: true - debug@4.3.7: - dependencies: - ms: 2.1.3 - debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -18319,15 +18311,6 @@ snapshots: dotenv@16.4.5: {} - drizzle-kit@0.26.2: - dependencies: - '@drizzle-team/brocli': 0.10.2 - '@esbuild-kit/esm-loader': 2.6.5 - esbuild: 0.19.12 - esbuild-register: 3.6.0(esbuild@0.19.12) - transitivePeerDependencies: - - supports-color - drizzle-kit@0.28.1: dependencies: '@drizzle-team/brocli': 0.10.2 @@ -18470,7 +18453,7 @@ snapshots: engine.io-client@6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) xmlhttprequest-ssl: 2.1.2 @@ -18482,7 +18465,7 @@ snapshots: engine.io-client@6.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.5): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-parser: 5.2.3 ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) xmlhttprequest-ssl: 2.1.2 @@ -18608,7 +18591,7 @@ snapshots: esbuild-register@3.6.0(esbuild@0.19.12): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) esbuild: 0.19.12 transitivePeerDependencies: - supports-color @@ -18812,7 +18795,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -19604,7 +19587,7 @@ snapshots: dependencies: '@tootallnate/once': 1.1.2 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -19620,7 +19603,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -19983,7 +19966,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -20798,7 +20781,7 @@ snapshots: dependencies: chalk: 5.3.0 commander: 12.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) execa: 8.0.1 lilconfig: 3.1.2 listr2: 8.2.5 @@ -21018,21 +21001,6 @@ snapshots: - supports-color - utf-8-validate - metro-config@0.81.0(bufferutil@4.0.8)(utf-8-validate@6.0.5): - dependencies: - connect: 3.7.0 - cosmiconfig: 5.2.1 - flow-enums-runtime: 0.0.6 - jest-validate: 29.7.0 - metro: 0.81.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) - metro-cache: 0.81.0 - metro-core: 0.81.0 - metro-runtime: 0.81.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - metro-core@0.81.0: dependencies: flow-enums-runtime: 0.0.6 @@ -21225,7 +21193,7 @@ snapshots: metro-babel-transformer: 0.81.0 metro-cache: 0.81.0 metro-cache-key: 0.81.0 - metro-config: 0.81.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + metro-config: 0.81.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) metro-core: 0.81.0 metro-file-map: 0.81.0 metro-resolver: 0.81.0 @@ -22922,7 +22890,7 @@ snapshots: socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-client: 6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -22933,7 +22901,7 @@ snapshots: socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5): dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) engine.io-client: 6.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.5) socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -22944,7 +22912,7 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -23534,7 +23502,7 @@ snapshots: chalk: 4.1.2 cli-highlight: 2.1.11 dayjs: 1.11.13 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) dotenv: 16.4.5 glob: 10.4.5 mkdirp: 2.1.6 @@ -23804,7 +23772,7 @@ snapshots: vite-node@1.0.2(@types/node@20.17.6)(lightningcss@1.27.0)(sass@1.80.7)(terser@5.36.0): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) pathe: 1.1.2 picocolors: 1.1.1 vite: 5.0.7(@types/node@20.17.6)(lightningcss@1.27.0)(sass@1.80.7)(terser@5.36.0) @@ -23820,7 +23788,7 @@ snapshots: vite-tsconfig-paths@4.3.1(typescript@5.6.3)(vite@5.0.7(@types/node@20.17.6)(lightningcss@1.27.0)(sass@1.80.7)(terser@5.36.0)): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@5.5.0) globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: From 780ecf5fa37e754edf910f142e76a334e48629e7 Mon Sep 17 00:00:00 2001 From: Kames Geraghty Date: Thu, 5 Dec 2024 07:09:07 -0700 Subject: [PATCH 3/6] update: wallet url (#54) --- packages/universal-wallet-sdk/src/core/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/universal-wallet-sdk/src/core/constants.ts b/packages/universal-wallet-sdk/src/core/constants.ts index 19443cf2..6b3e4585 100644 --- a/packages/universal-wallet-sdk/src/core/constants.ts +++ b/packages/universal-wallet-sdk/src/core/constants.ts @@ -1,5 +1,5 @@ // TODO: Move to .env export const WALLET_URL = process.env.NODE_ENV === 'production' - ? 'https://keys.districtlabs.com/connect' + ? 'https://keys.univrsal.co/connect' : 'http://localhost:3000/connect'; From 1ca33fa10fcd2bbfedb592de5fdbad9c057bf153 Mon Sep 17 00:00:00 2001 From: Vitor Marthendal Nunes Date: Thu, 5 Dec 2024 11:30:08 -0300 Subject: [PATCH 4/6] Chore: credentials updates (#55) * chore: add create identifier script * feat: add profile image url to credential --- apps/api-credentials/src/app/verify/discord.ts | 1 + apps/api-credentials/src/app/verify/github.ts | 4 ++-- apps/api-credentials/src/app/verify/x.ts | 1 + .../src/lib/veramo/actions/create-credential.ts | 14 +++++++++++--- .../src/scripts/create-identifier.ts | 11 +++++++++++ 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 apps/api-credentials/src/scripts/create-identifier.ts diff --git a/apps/api-credentials/src/app/verify/discord.ts b/apps/api-credentials/src/app/verify/discord.ts index 40dbef0d..dfcb5034 100644 --- a/apps/api-credentials/src/app/verify/discord.ts +++ b/apps/api-credentials/src/app/verify/discord.ts @@ -49,6 +49,7 @@ verifyDiscordApp.get( handle: user.username, verifiedAt: new Date().toISOString(), platformProfileUrl: `https://discordapp.com/users/${user.id}`, + platformProfileImageUrl: `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}`, }, }); const issuer = diff --git a/apps/api-credentials/src/app/verify/github.ts b/apps/api-credentials/src/app/verify/github.ts index c9895840..9a0721df 100644 --- a/apps/api-credentials/src/app/verify/github.ts +++ b/apps/api-credentials/src/app/verify/github.ts @@ -40,16 +40,16 @@ verifyGithubApp.get( } let credential: VerifiableCredential; - try { credential = await createCredential({ credentialSubject: { id: did, platform: 'github', - platformUserId: user.id, + platformUserId: user.id.toString(), handle: `@${user.login}`, verifiedAt: new Date().toISOString(), platformProfileUrl: `https://github.com/${user.login}`, + platformProfileImageUrl: user.avatar_url, }, }); const issuer = diff --git a/apps/api-credentials/src/app/verify/x.ts b/apps/api-credentials/src/app/verify/x.ts index fa31c004..3ccdadf9 100644 --- a/apps/api-credentials/src/app/verify/x.ts +++ b/apps/api-credentials/src/app/verify/x.ts @@ -50,6 +50,7 @@ verifyXApp.get( handle: `@${user.username}`, verifiedAt: new Date().toISOString(), platformProfileUrl: `https://x.com/${user.username}`, + platformProfileImageUrl: user.profile_image_url, }, }); diff --git a/apps/api-credentials/src/lib/veramo/actions/create-credential.ts b/apps/api-credentials/src/lib/veramo/actions/create-credential.ts index 7d14f462..b4cd2b37 100644 --- a/apps/api-credentials/src/lib/veramo/actions/create-credential.ts +++ b/apps/api-credentials/src/lib/veramo/actions/create-credential.ts @@ -1,9 +1,17 @@ import { alias, veramoAgent } from '../agent.js'; +type Platform = 'x' | 'github' | 'discord'; + type CreateCredentialParams = { - // TODO: Process credential correctly - // biome-ignore lint/suspicious/noExplicitAny: any - credentialSubject: any; + credentialSubject: { + id: string; + platform: Platform; + platformUserId: string; + handle: string; + verifiedAt: string; + platformProfileUrl: string; + platformProfileImageUrl: string | undefined; + }; }; export async function createCredential({ credentialSubject, diff --git a/apps/api-credentials/src/scripts/create-identifier.ts b/apps/api-credentials/src/scripts/create-identifier.ts new file mode 100644 index 00000000..57a4f14f --- /dev/null +++ b/apps/api-credentials/src/scripts/create-identifier.ts @@ -0,0 +1,11 @@ +import { createIdentifier } from '../lib/veramo/actions/create-identifier.js'; + +async function main() { + const identifier = await createIdentifier(); + console.log('New identifier created'); + console.log(JSON.stringify(identifier, null, 2)); +} + +(async () => { + await main(); +})(); From 9902768d7aeaf67dafeb53498073765449adcd29 Mon Sep 17 00:00:00 2001 From: Vitor Marthendal Nunes Date: Thu, 5 Dec 2024 13:33:21 -0300 Subject: [PATCH 5/6] chore: redeploy resolver (#56) --- packages/universal-data/src/deployments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/universal-data/src/deployments.ts b/packages/universal-data/src/deployments.ts index 7c04df35..8c8c7432 100644 --- a/packages/universal-data/src/deployments.ts +++ b/packages/universal-data/src/deployments.ts @@ -2,7 +2,7 @@ export const universalDeployments = { // Test Erc20Mintable: '0x4C8Be898BdE148aE6f9B0AF86e7D2b5a0558A7d0', // Universal Identity - Resolver: '0xd32121B30762fC193141AabBE09E53Af28553be4', + Resolver: '0xc675eE8dA6B4183f977a7e9F1C4589B20982b8C3', // Delegation Framework Core EntryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', DelegationManager: '0x26e1920510E4d8693524e161380Bbf01318E33c9', From 5b10981268bccef99090292bb35ac8d4272bbc86 Mon Sep 17 00:00:00 2001 From: Kames Geraghty Date: Thu, 5 Dec 2024 11:55:01 -0700 Subject: [PATCH 6/6] qa: minor updates (#57) --- apps/api-universal/src/routes/accounts.ts | 2 +- .../components/card-payment-basic.tsx | 3 +-- .../components/did-default-parsed-view.tsx | 1 - .../core/leaderboard-apply-dialog.tsx | 2 +- .../src/hooks/use-universal-message-sign.tsx | 1 - .../components/finance/debit-card.tsx | 4 ++-- .../components/identity/did-card.tsx | 22 +++++++++---------- 7 files changed, 15 insertions(+), 20 deletions(-) diff --git a/apps/api-universal/src/routes/accounts.ts b/apps/api-universal/src/routes/accounts.ts index 9f62616c..a1516b1a 100644 --- a/apps/api-universal/src/routes/accounts.ts +++ b/apps/api-universal/src/routes/accounts.ts @@ -39,7 +39,7 @@ const accountsRouter = new Hono() const isValid = verifyUniversalMessage({ chainId: data.chainId, address: data.address, - content: "I want to discover what's possible in the Universal Network.", + content: 'Applying to the join the UNV beta.', signature: data.signature, }); diff --git a/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/card-payment-basic.tsx b/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/card-payment-basic.tsx index 7145935e..deff5910 100644 --- a/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/card-payment-basic.tsx +++ b/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/card-payment-basic.tsx @@ -50,7 +50,7 @@ export const CardPaymentBasic = ({
-
); diff --git a/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/did-default-parsed-view.tsx b/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/did-default-parsed-view.tsx index fb376df8..57775d62 100644 --- a/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/did-default-parsed-view.tsx +++ b/apps/popup/app/(site)/sign/eth-sign-typed-data-v-4/components/did-default-parsed-view.tsx @@ -36,7 +36,6 @@ export const DIDDefaultParsedView = ({ return (
-
+ {/*
*/}
diff --git a/packages/universal-wallet-ui/components/identity/did-card.tsx b/packages/universal-wallet-ui/components/identity/did-card.tsx index 5614cf5d..0c159b9f 100644 --- a/packages/universal-wallet-ui/components/identity/did-card.tsx +++ b/packages/universal-wallet-ui/components/identity/did-card.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { Fingerprint } from 'lucide-react'; import type { Address } from 'viem'; import { Card } from '../ui/card'; @@ -32,14 +30,14 @@ export function DIDCard({ 'relative h-[250px] w-full min-w-[320px] max-w-[400px] overflow-hidden rounded-2xl border-0 bg-gradient-to-br text-white shadow-lg', )} > -
-
-
-
-
- Universal Identity - -
+ {/*
*/} +
+
+
+
+ Universal Identity + +
{`did:uis:${chainId}:${truncateEthAddress(resolver, 7)}:${truncateEthAddress(account)}`} @@ -50,11 +48,11 @@ export function DIDCard({
-
Resolver
+
Resolver
{resolver}
-
Account
+
Account
{account}