Skip to content

Commit

Permalink
⬆️ Update webauthn related dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Dec 17, 2024
1 parent dc54e82 commit 9365c50
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 20 deletions.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 1 addition & 2 deletions packages/backend-elysia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
6 changes: 4 additions & 2 deletions packages/backend-elysia/src/domain/auth/routes/wallet.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AuthenticatorTransportFuture } from "@simplewebauthn/types";
import type { AuthenticatorTransportFuture } from "@simplewebauthn/browser";
import type { Address } from "viem";

/**
Expand Down
5 changes: 1 addition & 4 deletions packages/wallet/app/context/wallet/action/registerOptions.ts
Original file line number Diff line number Diff line change
@@ -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";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/app/context/wallet/action/signOptions.ts
Original file line number Diff line number Diff line change
@@ -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";

/**
Expand Down
6 changes: 4 additions & 2 deletions packages/wallet/app/context/wallet/smartWallet/webAuthN.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/app/module/common/atoms/webauthn.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
5 changes: 2 additions & 3 deletions packages/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 9365c50

Please sign in to comment.