From 16aeb059faa91009e810c1c05e765d8572ff1816 Mon Sep 17 00:00:00 2001 From: o-az Date: Mon, 27 Apr 2026 20:40:11 -0700 Subject: [PATCH 1/2] fix: update key manager to accounts WebAuthn routes --- apps/key-manager/README.md | 9 +- apps/key-manager/package.json | 9 +- apps/key-manager/src/index.ts | 8 +- apps/key-manager/test/routes.test.ts | 43 +++++ apps/key-manager/vitest.config.ts | 15 ++ apps/key-manager/wrangler.json | 4 + pnpm-lock.yaml | 264 ++++++++++++++++++++++++++- pnpm-workspace.yaml | 2 + 8 files changed, 337 insertions(+), 17 deletions(-) create mode 100644 apps/key-manager/test/routes.test.ts create mode 100644 apps/key-manager/vitest.config.ts diff --git a/apps/key-manager/README.md b/apps/key-manager/README.md index 11cb9dc31..21293317f 100644 --- a/apps/key-manager/README.md +++ b/apps/key-manager/README.md @@ -1,14 +1,15 @@ # Key Manager -WebAuthn key management service using `Handler.keyManager` from `tempo.ts`. +WebAuthn key management service using `Handler.webAuthn` from `accounts/server`. ## Endpoints | Endpoint | Method | Purpose | |----------|--------|---------| -| `/challenge` | GET | Generate a new WebAuthn challenge | -| `/:id` | GET | Retrieve the public key for a credential | -| `/:id` | POST | Register a new credential with its public key | +| `/register/options` | POST | Generate credential creation options | +| `/register` | POST | Verify registration and store a credential | +| `/login/options` | POST | Generate credential request options | +| `/login` | POST | Verify authentication | ## Development diff --git a/apps/key-manager/package.json b/apps/key-manager/package.json index 1e6f4ed5e..d3da82c55 100644 --- a/apps/key-manager/package.json +++ b/apps/key-manager/package.json @@ -1,5 +1,6 @@ { "name": "key-manager", + "type": "module", "private": true, "scripts": { "build": "echo 'noop'", @@ -8,15 +9,19 @@ "dev": "wrangler dev", "deploy": "wrangler deploy", "postinstall": "pnpm gen:types", - "gen:types": "wrangler types --env-interface='CloudflareBindings'" + "gen:types": "wrangler types --env-interface='CloudflareBindings'", + "test": "vitest --run" }, "dependencies": { - "tempo.ts": "catalog:" + "accounts": "catalog:" }, "devDependencies": { + "@cloudflare/vitest-pool-workers": "catalog:", "@cloudflare/workers-types": "catalog:", "@types/node": "catalog:", "typescript": "catalog:", + "vite": "catalog:", + "vitest": "catalog:", "wrangler": "catalog:" } } diff --git a/apps/key-manager/src/index.ts b/apps/key-manager/src/index.ts index d8be04f76..b797a55d6 100644 --- a/apps/key-manager/src/index.ts +++ b/apps/key-manager/src/index.ts @@ -1,6 +1,10 @@ import { env } from 'cloudflare:workers' -import { Handler, Kv } from 'tempo.ts/server' +import { Handler, Kv } from 'accounts/server' -export default Handler.keyManager({ +const origins = env.ALLOWED_ORIGINS.split(',').map((origin) => origin.trim()) + +export default Handler.webAuthn({ kv: Kv.cloudflare(env.KEY_STORE), + origin: origins.length === 1 ? origins[0] : origins, + rpId: env.RP_ID, }) diff --git a/apps/key-manager/test/routes.test.ts b/apps/key-manager/test/routes.test.ts new file mode 100644 index 000000000..973a91ea3 --- /dev/null +++ b/apps/key-manager/test/routes.test.ts @@ -0,0 +1,43 @@ +import { exports } from 'cloudflare:workers' +import { describe, expect, it } from 'vitest' + +describe('key manager WebAuthn routes', () => { + it('serves register options on the route used by wagmi/tempo', async () => { + const response = await exports.default.fetch( + new Request('https://keys.test/register/options', { + method: 'POST', + headers: { + 'content-type': 'application/json', + origin: 'https://tempo.xyz', + }, + body: JSON.stringify({ name: 'alice' }), + }), + ) + + expect(response.status).toBe(200) + const body = (await response.json()) as { + options?: { + publicKey?: { + challenge?: string + rp?: { id?: string; name?: string } + user?: { name?: string } + } + } + } + + expect(body.options?.publicKey?.challenge).toEqual(expect.any(String)) + expect(body.options?.publicKey?.rp).toEqual({ + id: 'tempo.xyz', + name: 'tempo.xyz', + }) + expect(body.options?.publicKey?.user?.name).toBe('alice') + }) + + it('does not expose the legacy challenge route', async () => { + const response = await exports.default.fetch( + new Request('https://keys.test/challenge'), + ) + + expect(response.status).toBe(404) + }) +}) diff --git a/apps/key-manager/vitest.config.ts b/apps/key-manager/vitest.config.ts new file mode 100644 index 000000000..d75e09d12 --- /dev/null +++ b/apps/key-manager/vitest.config.ts @@ -0,0 +1,15 @@ +import { cloudflareTest } from '@cloudflare/vitest-pool-workers' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + include: ['test/**/*.test.ts'], + }, + plugins: [ + cloudflareTest({ + wrangler: { + configPath: './wrangler.json', + }, + }), + ], +}) diff --git a/apps/key-manager/wrangler.json b/apps/key-manager/wrangler.json index f6af47069..3cd1b875f 100644 --- a/apps/key-manager/wrangler.json +++ b/apps/key-manager/wrangler.json @@ -7,6 +7,10 @@ "workers_dev": true, "preview_urls": true, "keep_vars": true, + "vars": { + "ALLOWED_ORIGINS": "https://tempo.xyz", + "RP_ID": "tempo.xyz" + }, "observability": { "enabled": true, "logs": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc879f8cd..8e4edc5b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,6 +132,9 @@ catalogs: abitype: specifier: ^1.2.4 version: 1.2.4 + accounts: + specifier: ^0.8.2 + version: 0.8.2 animejs: specifier: ^4.3.6 version: 4.3.6 @@ -309,7 +312,7 @@ importers: version: 2.0.4(@logtape/logtape@2.0.4) '@wagmi/core': specifier: 'catalog:' - version: 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + version: 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) cbor-x: specifier: ^1.6.4 version: 1.6.4 @@ -333,7 +336,7 @@ importers: version: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) wagmi: specifier: 'catalog:' - version: 3.6.5(@tanstack/query-core@5.96.2)(@tanstack/react-query@5.96.2(react@19.2.5))(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + version: 3.6.5(@tanstack/query-core@5.96.2)(@tanstack/react-query@5.96.2(react@19.2.5))(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) zod: specifier: 'catalog:' version: 4.3.6 @@ -674,10 +677,13 @@ importers: apps/key-manager: dependencies: - tempo.ts: + accounts: specifier: 'catalog:' - version: 0.14.2(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(zod@4.3.6) + version: 0.8.2(@types/react@19.2.14)(@wagmi/core@3.4.6)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(wagmi@3.6.5) devDependencies: + '@cloudflare/vitest-pool-workers': + specifier: 'catalog:' + version: 0.13.5(@cloudflare/workers-types@4.20260408.1)(@vitest/runner@4.1.0)(@vitest/snapshot@4.1.0)(bufferutil@4.1.0)(utf-8-validate@5.0.10)(vitest@4.1.0) '@cloudflare/workers-types': specifier: 'catalog:' version: 4.20260408.1 @@ -687,6 +693,12 @@ importers: typescript: specifier: 'catalog:' version: 6.0.2 + vite: + specifier: 'catalog:' + version: 8.0.7(@types/node@25.5.2)(esbuild@0.28.0)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + vitest: + specifier: 'catalog:' + version: 4.1.0(@opentelemetry/api@1.9.0)(@types/node@25.5.2)(@vitest/ui@4.1.0)(vite@8.0.7(@types/node@25.5.2)(esbuild@0.28.0)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) wrangler: specifier: 'catalog:' version: 4.79.0(@cloudflare/workers-types@4.20260408.1)(bufferutil@4.1.0)(utf-8-validate@5.0.10) @@ -1082,6 +1094,9 @@ packages: cpu: [x64] os: [win32] + '@cfworker/json-schema@4.1.1': + resolution: {integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==} + '@cloudflare/containers@0.2.4': resolution: {integrity: sha512-G/Wsl0EuLbSgXyr9zv7cetUO90NyinKIMZvXae/C5R5BY3XMl9ZUdplvcofylAwRZjBEUm+aUugWxIiiKQU0ZA==} @@ -2298,6 +2313,15 @@ packages: peerDependencies: '@logtape/logtape': ^2.0.4 + '@modelcontextprotocol/server@2.0.0-alpha.2': + resolution: {integrity: sha512-gmLgdHzlYM8L7Aw/+VE0kxjT25WKamtUSLNhdOgrJq5CrESvqVSoAfWSJJeNPUXNTluQ+dYDGFbKVitdsJtbPA==} + engines: {node: '>=20'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + '@napi-rs/wasm-runtime@1.1.3': resolution: {integrity: sha512-xK9sGVbJWYb08+mTJt3/YV24WxvxpXcXtP6B172paPZ+Ts69Re9dAr7lKwJoeIx8OoeuimEiRZ7umkiUVClmmQ==} peerDependencies: @@ -3295,6 +3319,9 @@ packages: engines: {node: '>=18'} hasBin: true + '@toon-format/toon@2.1.0': + resolution: {integrity: sha512-JwWptdF5eOA0HaQxbKAzkpQtR4wSWTEfDlEy/y3/4okmOAX1qwnpLZMmtEWr+ncAhTTY1raCKH0kteHhSXnQqg==} + '@tootallnate/quickjs-emscripten@0.23.0': resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} @@ -3550,6 +3577,32 @@ packages: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + accounts@0.8.2: + resolution: {integrity: sha512-1sAOJS/sFfgphmE4prfsyx884XCmH42gwhuJ1jK7IjWlfehtS5i2ryVBcxnBE0hqsgu1DHMpIn/NJ2ZP+Q92HA==} + peerDependencies: + '@react-native-async-storage/async-storage': ^3.0.2 + '@wagmi/core': '>=3.4.3' + expo-secure-store: ^55.0.12 + expo-web-browser: ^55.0.13 + react: '>=18' + viem: '>=2.43.3' + wagmi: '>=0.0.0' + peerDependenciesMeta: + '@react-native-async-storage/async-storage': + optional: true + '@wagmi/core': + optional: true + expo-secure-store: + optional: true + expo-web-browser: + optional: true + react: + optional: true + viem: + optional: true + wagmi: + optional: true + acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} @@ -4526,6 +4579,9 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + idb-keyval@6.2.2: + resolution: {integrity: sha512-yjD9nARJ/jb1g+CvD0tlhUHOrJ9Sy0P8T9MF3YaLlHnSRpwPfpTX0XIvpmw3gAJUmEu3FiICLBDPXVwyEvrleg==} + idxs@0.0.6: resolution: {integrity: sha512-CjrtIJQNhABCsa8YFyxLxkVbn5DexSgMxqd31I32PnagUl4cewlm3IZZwo7ARabq3bRlkYXXRFk9b7BZboM0vA==} @@ -4536,6 +4592,11 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} + incur@0.3.25: + resolution: {integrity: sha512-jrSkzauM42ilbQJ6THVkAY6dTulkyVW0sZpVHdA8gfiBwrLrLnLUf8U3bAOegAKBIMSOFgk1idchgu9xm9HMng==} + engines: {node: '>=22'} + hasBin: true + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4891,6 +4952,25 @@ packages: mlly@1.8.2: resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} + mppx@0.5.16: + resolution: {integrity: sha512-qN/6AN1WjS9YpsEXtKo1KkZbIUUP6FWXtKyEgwAr5sHpAak5D1iAconBkHCHzh2bKfxyoOgJDeOgH+WxE8iI8A==} + hasBin: true + peerDependencies: + '@modelcontextprotocol/sdk': '>=1.25.0' + elysia: '>=1' + express: '>=5' + hono: '>=4.12.14' + viem: '>=2.47.5' + peerDependenciesMeta: + '@modelcontextprotocol/sdk': + optional: true + elysia: + optional: true + express: + optional: true + hono: + optional: true + mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -5059,6 +5139,14 @@ packages: resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} engines: {node: '>=20'} + ox@0.14.10: + resolution: {integrity: sha512-PYsqEnSP7CrcxISS3uVBtw9yPy2gATAnWNptTI0pMnlrXLTiw0Xw/IIivJVHDFgGvKuRAtBSafhVjs+jis3CVA==} + peerDependencies: + typescript: '>=5.4.0' + peerDependenciesMeta: + typescript: + optional: true + ox@0.14.20: resolution: {integrity: sha512-rby38C3nDn8eQkf29Zgw4hkCZJ64Qqi0zRPWL8ENUQ7JVuoITqrVtwWQgM/He19SCMUEc7hS/Sjw0jIOSLJhOw==} peerDependencies: @@ -5594,6 +5682,9 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tokenx@1.3.0: + resolution: {integrity: sha512-NLdXTEZkKiO0gZuLtMoZKjCXTREXeZZt8nnnNeyoXtNZAfG/GKGSbQtLU5STspc0rMSwcA+UJfWZkbNU01iKmQ==} + totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -5847,6 +5938,9 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} + webauthx@0.1.1: + resolution: {integrity: sha512-3jiskZl0jiTUoO8r3ySUYItdXNDBpfzxnxPx7XM0giF2dIY7S4KqHVbH04Qglz98nP8RaSV1/+3eDCx1s3WDiQ==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -6046,6 +6140,24 @@ packages: use-sync-external-store: optional: true + zustand@5.0.12: + resolution: {integrity: sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -6264,6 +6376,8 @@ snapshots: '@cbor-extract/cbor-extract-win32-x64@2.2.2': optional: true + '@cfworker/json-schema@4.1.1': {} + '@cloudflare/containers@0.2.4': {} '@cloudflare/kv-asset-handler@0.4.2': {} @@ -7077,6 +7191,12 @@ snapshots: dependencies: '@logtape/logtape': 2.0.4 + '@modelcontextprotocol/server@2.0.0-alpha.2(@cfworker/json-schema@4.1.1)': + dependencies: + zod: 4.3.6 + optionalDependencies: + '@cfworker/json-schema': 4.1.1 + '@napi-rs/wasm-runtime@1.1.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)': dependencies: '@emnapi/core': 1.9.1 @@ -8033,6 +8153,8 @@ snapshots: '@ast-grep/cli': 0.40.5 commander: 12.1.0 + '@toon-format/toon@2.1.0': {} + '@tootallnate/quickjs-emscripten@0.23.0': {} '@total-typescript/ts-reset@0.6.1': {} @@ -8262,14 +8384,22 @@ snapshots: '@vue/shared@3.5.30': optional: true - '@wagmi/connectors@8.0.5(@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': + '@wagmi/connectors@8.0.5(@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: - '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) optionalDependencies: typescript: 6.0.2 - '@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': + '@wagmi/connectors@8.0.5(@wagmi/core@3.4.6)(accounts@0.8.2)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': + dependencies: + '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) + optionalDependencies: + accounts: 0.8.2(@types/react@19.2.14)(@wagmi/core@3.4.6)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(wagmi@3.6.5) + typescript: 6.0.2 + + '@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@6.0.2) @@ -8277,6 +8407,7 @@ snapshots: zustand: 5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.4.0(react@19.2.5)) optionalDependencies: '@tanstack/query-core': 5.96.2 + accounts: 0.8.2(@types/react@19.2.14)(@wagmi/core@3.4.6)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(wagmi@3.6.5) typescript: 6.0.2 transitivePeerDependencies: - '@types/react' @@ -8284,12 +8415,28 @@ snapshots: - react - use-sync-external-store - '@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': + '@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@6.0.2) viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) zustand: 5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.6.0(react@19.2.5)) + optionalDependencies: + '@tanstack/query-core': 5.96.2 + accounts: 0.8.2(@types/react@19.2.14)(@wagmi/core@3.4.6)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(wagmi@3.6.5) + typescript: 6.0.2 + transitivePeerDependencies: + - '@types/react' + - immer + - react + - use-sync-external-store + + '@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))': + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@6.0.2) + viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) + zustand: 5.0.0(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.4.0(react@19.2.5)) optionalDependencies: '@tanstack/query-core': 5.96.2 typescript: 6.0.2 @@ -8313,6 +8460,30 @@ snapshots: dependencies: event-target-shim: 5.0.1 + accounts@0.8.2(@types/react@19.2.14)(@wagmi/core@3.4.6)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6))(wagmi@3.6.5): + dependencies: + hono: 4.12.14 + idb-keyval: 6.2.2 + mipd: 0.0.7(typescript@6.0.2) + mppx: 0.5.16(hono@4.12.14)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + ox: 0.14.20(typescript@6.0.2)(zod@4.3.6) + webauthx: 0.1.1(typescript@6.0.2)(zod@4.3.6) + zod: 4.3.6 + zustand: 5.0.12(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.6.0(react@19.2.5)) + optionalDependencies: + '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + react: 19.2.5 + viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) + wagmi: 3.6.5(@tanstack/query-core@5.96.2)(@tanstack/react-query@5.96.2(react@19.2.5))(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + transitivePeerDependencies: + - '@modelcontextprotocol/sdk' + - '@types/react' + - elysia + - express + - immer + - typescript + - use-sync-external-store + acorn@8.16.0: {} agent-base@6.0.2: @@ -9340,6 +9511,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + idb-keyval@6.2.2: {} + idxs@0.0.6(typescript@6.0.2): dependencies: abitype: 1.2.4(typescript@6.0.2)(zod@4.3.6) @@ -9357,6 +9530,15 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + incur@0.3.25: + dependencies: + '@cfworker/json-schema': 4.1.1 + '@modelcontextprotocol/server': 2.0.0-alpha.2(@cfworker/json-schema@4.1.1) + '@toon-format/toon': 2.1.0 + tokenx: 1.3.0 + yaml: 2.8.3 + zod: 4.3.6 + inherits@2.0.4: {} ip-address@10.1.0: {} @@ -9671,6 +9853,17 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 + mppx@0.5.16(hono@4.12.14)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)): + dependencies: + incur: 0.3.25 + ox: 0.14.10(typescript@6.0.2)(zod@4.3.6) + viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) + zod: 4.3.6 + optionalDependencies: + hono: 4.12.14 + transitivePeerDependencies: + - typescript + mrmime@2.0.1: {} ms@2.1.3: {} @@ -9747,6 +9940,21 @@ snapshots: powershell-utils: 0.1.0 wsl-utils: 0.3.1 + ox@0.14.10(typescript@6.0.2)(zod@4.3.6): + dependencies: + '@adraffy/ens-normalize': 1.11.1 + '@noble/ciphers': 1.3.0 + '@noble/curves': 1.9.1 + '@noble/hashes': 1.8.0 + '@scure/bip32': 1.7.0 + '@scure/bip39': 1.6.0 + abitype: 1.2.4(typescript@6.0.2)(zod@4.3.6) + eventemitter3: 5.0.1 + optionalDependencies: + typescript: 6.0.2 + transitivePeerDependencies: + - zod + ox@0.14.20(typescript@6.0.2)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 @@ -10447,6 +10655,8 @@ snapshots: dependencies: is-number: 7.0.0 + tokenx@1.3.0: {} + totalist@3.0.1: {} tr46@0.0.3: {} @@ -10639,10 +10849,33 @@ snapshots: transitivePeerDependencies: - msw + wagmi@3.6.5(@tanstack/query-core@5.96.2)(@tanstack/react-query@5.96.2(react@19.2.5))(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)): + dependencies: + '@tanstack/react-query': 5.96.2(react@19.2.5) + '@wagmi/connectors': 8.0.5(@wagmi/core@3.4.6)(accounts@0.8.2)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(accounts@0.8.2)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + react: 19.2.5 + use-sync-external-store: 1.4.0(react@19.2.5) + viem: 2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6) + optionalDependencies: + typescript: 6.0.2 + transitivePeerDependencies: + - '@base-org/account' + - '@coinbase/wallet-sdk' + - '@metamask/connect-evm' + - '@safe-global/safe-apps-provider' + - '@safe-global/safe-apps-sdk' + - '@tanstack/query-core' + - '@types/react' + - '@walletconnect/ethereum-provider' + - accounts + - immer + - porto + wagmi@3.6.5(@tanstack/query-core@5.96.2)(@tanstack/react-query@5.96.2(react@19.2.5))(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)): dependencies: '@tanstack/react-query': 5.96.2(react@19.2.5) - '@wagmi/connectors': 8.0.5(@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.6.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) + '@wagmi/connectors': 8.0.5(@wagmi/core@3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(typescript@6.0.2)(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) '@wagmi/core': 3.4.6(@tanstack/query-core@5.96.2)(@types/react@19.2.14)(react@19.2.5)(typescript@6.0.2)(use-sync-external-store@1.4.0(react@19.2.5))(viem@2.48.4(bufferutil@4.1.0)(typescript@6.0.2)(utf-8-validate@5.0.10)(zod@4.3.6)) react: 19.2.5 use-sync-external-store: 1.4.0(react@19.2.5) @@ -10670,6 +10903,13 @@ snapshots: web-streams-polyfill@3.3.3: optional: true + webauthx@0.1.1(typescript@6.0.2)(zod@4.3.6): + dependencies: + ox: 0.14.20(typescript@6.0.2)(zod@4.3.6) + transitivePeerDependencies: + - typescript + - zod + webidl-conversions@3.0.1: {} webpack-virtual-modules@0.6.2: {} @@ -10875,4 +11115,10 @@ snapshots: react: 19.2.5 use-sync-external-store: 1.6.0(react@19.2.5) + zustand@5.0.12(@types/react@19.2.14)(react@19.2.5)(use-sync-external-store@1.6.0(react@19.2.5)): + optionalDependencies: + '@types/react': 19.2.14 + react: 19.2.5 + use-sync-external-store: 1.6.0(react@19.2.5) + zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e63d584dc..d0fe43501 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -46,6 +46,7 @@ catalog: '@vitest/ui': 4.1.0 '@wagmi/core': ^3.4.6 abitype: ^1.2.4 + accounts: ^0.8.2 animejs: ^4.3.6 cva: ^1.0.0-beta.4 dotenv: ^17.3.1 @@ -116,6 +117,7 @@ minimumReleaseAgeExclude: - 'wagmi' - 'tidx.ts' - '@wagmi/core' + - accounts - '@cloudflare/containers' overrides: From dc397fdfd8fe7e1b520bd06f0005866d5c2cd304 Mon Sep 17 00:00:00 2001 From: o-az Date: Mon, 27 Apr 2026 20:43:05 -0700 Subject: [PATCH 2/2] chore: match allowed origins --- apps/key-manager/wrangler.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/key-manager/wrangler.json b/apps/key-manager/wrangler.json index 3cd1b875f..71d5cfdfc 100644 --- a/apps/key-manager/wrangler.json +++ b/apps/key-manager/wrangler.json @@ -8,7 +8,7 @@ "preview_urls": true, "keep_vars": true, "vars": { - "ALLOWED_ORIGINS": "https://tempo.xyz", + "ALLOWED_ORIGINS": "*", "RP_ID": "tempo.xyz" }, "observability": {