diff --git a/bun.lockb b/bun.lockb index f5e4f8c0b..00e9a596e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/backend-elysia/package.json b/packages/backend-elysia/package.json index 3231fafbf..e2ac8244f 100644 --- a/packages/backend-elysia/package.json +++ b/packages/backend-elysia/package.json @@ -30,7 +30,7 @@ "@elysiajs/cors": "^1.1.1", "@frak-labs/app-essentials": "workspace:*", "@frak-labs/core-sdk": "workspace:*", - "@simplewebauthn/server": "^11.0.0", + "@simplewebauthn/server": "^13.0.0", "@sinclair/typebox": "0.32.34", "@tusbar/cache-control": "^1.0.2", "async-lz-string": "^1.1.0", @@ -54,7 +54,6 @@ "whatwg-url": "^14.0.0" }, "devDependencies": { - "@simplewebauthn/types": "^11.0.0", "@types/web-push": "^3.6.4", "@types/whatwg-url": "^13.0.0", "bun-types": "latest", diff --git a/packages/backend-elysia/src/domain/auth/models/dto/AuthenticatorDocument.ts b/packages/backend-elysia/src/domain/auth/models/dto/AuthenticatorDocument.ts index 1dd3513f0..c999ab647 100644 --- a/packages/backend-elysia/src/domain/auth/models/dto/AuthenticatorDocument.ts +++ b/packages/backend-elysia/src/domain/auth/models/dto/AuthenticatorDocument.ts @@ -1,7 +1,7 @@ import type { AuthenticatorTransportFuture, CredentialDeviceType, -} from "@simplewebauthn/types"; +} from "@simplewebauthn/server"; import type { Binary } from "mongodb"; import type { Address, Hex } from "viem"; diff --git a/packages/backend-elysia/src/domain/auth/routes/wallet.ts b/packages/backend-elysia/src/domain/auth/routes/wallet.ts index e3c2ed25a..bec74e3c6 100644 --- a/packages/backend-elysia/src/domain/auth/routes/wallet.ts +++ b/packages/backend-elysia/src/domain/auth/routes/wallet.ts @@ -1,8 +1,10 @@ import { blockchainContext, log, sessionContext } from "@backend-common"; import { t } from "@backend-utils"; import { WebAuthN } from "@frak-labs/app-essentials"; -import { verifyRegistrationResponse } from "@simplewebauthn/server"; -import type { RegistrationResponseJSON } from "@simplewebauthn/types"; +import { + type RegistrationResponseJSON, + verifyRegistrationResponse, +} from "@simplewebauthn/server"; import { Elysia } from "elysia"; import { Binary } from "mongodb"; import { WalletAuthResponseDto } from "../models/WalletSessionDto"; diff --git a/packages/backend-elysia/src/domain/auth/services/WebAuthNService.ts b/packages/backend-elysia/src/domain/auth/services/WebAuthNService.ts index d24023c6c..643207631 100644 --- a/packages/backend-elysia/src/domain/auth/services/WebAuthNService.ts +++ b/packages/backend-elysia/src/domain/auth/services/WebAuthNService.ts @@ -4,8 +4,10 @@ import { sessionContext, } from "@backend-common"; import { WebAuthN, kernelAddresses } from "@frak-labs/app-essentials"; -import { verifyAuthenticationResponse } from "@simplewebauthn/server"; -import type { AuthenticationResponseJSON } from "@simplewebauthn/types"; +import { + type AuthenticationResponseJSON, + verifyAuthenticationResponse, +} from "@simplewebauthn/server"; import { Elysia } from "elysia"; import { getSenderAddress } from "permissionless/actions"; import { type Hex, concatHex, keccak256, toHex } from "viem"; diff --git a/packages/wallet/app/context/common/dexie/PreviousAuthenticatorModel.ts b/packages/wallet/app/context/common/dexie/PreviousAuthenticatorModel.ts index c6523ac49..010affe8c 100644 --- a/packages/wallet/app/context/common/dexie/PreviousAuthenticatorModel.ts +++ b/packages/wallet/app/context/common/dexie/PreviousAuthenticatorModel.ts @@ -1,4 +1,4 @@ -import type { AuthenticatorTransportFuture } from "@simplewebauthn/types"; +import type { AuthenticatorTransportFuture } from "@simplewebauthn/browser"; import type { Address } from "viem"; /** diff --git a/packages/wallet/app/context/wallet/action/registerOptions.ts b/packages/wallet/app/context/wallet/action/registerOptions.ts index 97db2f66c..c5c744f9e 100644 --- a/packages/wallet/app/context/wallet/action/registerOptions.ts +++ b/packages/wallet/app/context/wallet/action/registerOptions.ts @@ -1,9 +1,6 @@ import { WebAuthN } from "@frak-labs/app-essentials"; +import type { AuthenticatorTransportFuture } from "@simplewebauthn/browser"; import { generateRegistrationOptions } from "@simplewebauthn/server"; -import type { - AuthenticatorTransportFuture, - Base64URLString, -} from "@simplewebauthn/types"; import { concatHex, fromHex, keccak256, toHex } from "viem"; /** diff --git a/packages/wallet/app/context/wallet/action/signOptions.ts b/packages/wallet/app/context/wallet/action/signOptions.ts index c92d027f2..293d5c56c 100644 --- a/packages/wallet/app/context/wallet/action/signOptions.ts +++ b/packages/wallet/app/context/wallet/action/signOptions.ts @@ -1,6 +1,6 @@ import { WebAuthN } from "@frak-labs/app-essentials"; +import type { AuthenticatorTransportFuture } from "@simplewebauthn/browser"; import { generateAuthenticationOptions } from "@simplewebauthn/server"; -import type { AuthenticatorTransportFuture } from "@simplewebauthn/types"; import { type Hex, hexToBytes } from "viem"; /** diff --git a/packages/wallet/app/context/wallet/smartWallet/webAuthN.ts b/packages/wallet/app/context/wallet/smartWallet/webAuthN.ts index 7ae9a3bd5..dca894886 100644 --- a/packages/wallet/app/context/wallet/smartWallet/webAuthN.ts +++ b/packages/wallet/app/context/wallet/smartWallet/webAuthN.ts @@ -1,8 +1,10 @@ import type { P256Signature, WebAuthNSignature } from "@/types/WebAuthN"; import { ECDSASigValue } from "@peculiar/asn1-ecc"; import { AsnParser } from "@peculiar/asn1-schema"; -import { base64URLStringToBuffer } from "@simplewebauthn/browser"; -import type { AuthenticationResponseJSON } from "@simplewebauthn/types"; +import { + type AuthenticationResponseJSON, + base64URLStringToBuffer, +} from "@simplewebauthn/browser"; import { toHex } from "viem"; import { polygon, polygonMumbai } from "viem/chains"; diff --git a/packages/wallet/app/module/authentication/atoms/lastAuthenticator.ts b/packages/wallet/app/module/authentication/atoms/lastAuthenticator.ts index 34e798a20..0299e97c4 100644 --- a/packages/wallet/app/module/authentication/atoms/lastAuthenticator.ts +++ b/packages/wallet/app/module/authentication/atoms/lastAuthenticator.ts @@ -1,6 +1,6 @@ import { dexieDb } from "@/context/common/dexie/dexieDb"; import type { WebAuthNWallet } from "@/types/WebAuthN"; -import type { AuthenticatorTransportFuture } from "@simplewebauthn/types"; +import type { AuthenticatorTransportFuture } from "@simplewebauthn/browser"; import { atom } from "jotai"; import { atomWithStorage } from "jotai/utils"; diff --git a/packages/wallet/app/module/common/atoms/webauthn.ts b/packages/wallet/app/module/common/atoms/webauthn.ts index 0689f7c6a..aed6f13cc 100644 --- a/packages/wallet/app/module/common/atoms/webauthn.ts +++ b/packages/wallet/app/module/common/atoms/webauthn.ts @@ -1,4 +1,4 @@ -import type { AuthenticationResponseJSON } from "@simplewebauthn/types"; +import type { AuthenticationResponseJSON } from "@simplewebauthn/browser"; import { atomWithStorage } from "jotai/utils"; import type { Address } from "viem"; diff --git a/packages/wallet/package.json b/packages/wallet/package.json index ade796411..0afc3836e 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -31,8 +31,8 @@ "@radix-ui/react-slot": "^1.1.1", "@react-router/node": "^7.0.2", "@react-router/serve": "^7.0.2", - "@simplewebauthn/browser": "^11.0.0", - "@simplewebauthn/server": "^11.0.0", + "@simplewebauthn/browser": "^13.0.0", + "@simplewebauthn/server": "^13.0.0", "@tanstack/query-sync-storage-persister": "^5.62.7", "@tanstack/react-query": "^5.62.7", "@tanstack/react-query-devtools": "^5.62.7", @@ -67,7 +67,6 @@ "devDependencies": { "@frak-labs/backend-elysia": "workspace:*", "@react-router/dev": "^7.0.2", - "@simplewebauthn/types": "^11.0.0", "@types/nprogress": "^0.2.3", "@types/react": "^19", "@types/react-dom": "^19",