("history", {
- mainAccount: [
- { description: "OBA topup from J Doe", amount: "+ £2,000.00", time: "4 Oct, 13:32 - OBAGNSGT3OXBB4433", icon: "add", value: 2000 },
- ],
- cryptoAccount: [],
- });
-
- return history;
-};
diff --git a/examples/bank-demo/eslint.config.js b/examples/bank-demo/eslint.config.js
deleted file mode 100644
index 9ecac4733..000000000
--- a/examples/bank-demo/eslint.config.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// @ts-check
-import withNuxt from "./.nuxt/eslint.config.mjs";
-
-export default withNuxt({
- rules: {
- "no-console": "warn",
- semi: ["error", "always"], // Require semicolons
- quotes: ["error", "double"], // Require double quotes
- "vue/multi-word-component-names": "off", // Allow multi-word component names
- "vue/require-default-prop": "off", // Allow props without default values
- },
-});
diff --git a/examples/bank-demo/index.d.ts b/examples/bank-demo/index.d.ts
deleted file mode 100644
index 82c4a79d7..000000000
--- a/examples/bank-demo/index.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-declare module "nuxt/schema" {
- interface PublicRuntimeConfig {
- aaveAddress: `0x${string}`;
- bankDemoDeployerKey: `0x${string}`;
- network: zksyncInMemoryNode | zksyncSepoliaTestnet;
- accountFactory: `0x${string}`;
- passkey: `0x${string}`;
- session: `0x${string}`;
- explorerUrl: string;
- }
-}
-
-export {};
diff --git a/examples/bank-demo/layouts/default.vue b/examples/bank-demo/layouts/default.vue
deleted file mode 100644
index e403fa414..000000000
--- a/examples/bank-demo/layouts/default.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/local-node.json b/examples/bank-demo/local-node.json
deleted file mode 100644
index 6640dea38..000000000
--- a/examples/bank-demo/local-node.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "session": "0xcc8bD0d99CF35e5F07d5FbbFd8f7B628010E52C2",
- "passkey": "0xDdB1e5ECd29aAC588E0fb0a7eAB1b589fE7D7dcD",
- "accountFactory": "0x940adFE6B30536D22eD78870aA79c9DC0835556C",
- "accountPaymaster": "0x025A31E05306E1Db13D1F54581f6C729BE284Fd4",
- "recovery": "0xE797B5A28B73925250e70e4077568bF3a4CDc240"
-}
diff --git a/examples/bank-demo/nuxt.config.ts b/examples/bank-demo/nuxt.config.ts
deleted file mode 100644
index cd6584328..000000000
--- a/examples/bank-demo/nuxt.config.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { defineNuxtConfig } from "nuxt/config";
-import { zksyncInMemoryNode } from "viem/chains";
-import localChainData from "./local-node.json";
-
-// https://nuxt.com/docs/api/configuration/nuxt-config
-export default defineNuxtConfig({
- compatibilityDate: "2024-04-03",
- devtools: { enabled: true },
- modules: ["@nuxt/icon", "@vueuse/nuxt", "radix-vue/nuxt", "@nuxt/eslint", "@pinia/nuxt", "@nuxtjs/tailwindcss", "@nuxtjs/google-fonts"],
- ssr: false,
- googleFonts: {
- families: {
- Inter: [300, 400, 500, 600, 700],
- },
- },
- app: {
- head: {
- bodyAttrs: {
- class: "bg-khaki",
- },
- },
- },
- runtimeConfig: {
- public: {
- aaveAddress: "0xBC989fDe9e54cAd2aB4392Af6dF60f04873A033A", // Rich Account 0
- bankDemoDeployerKey: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e", // Rich Account 0
- network: zksyncInMemoryNode,
- session: localChainData.session,
- passkey: localChainData.passkey,
- accountFactory: localChainData.accountFactory,
- recovery: localChainData.recovery,
- explorerUrl: "http://localhost:3010/",
- },
- },
- $production: {
- runtimeConfig: {
- public: {
- aaveAddress: "0xBC989fDe9e54cAd2aB4392Af6dF60f04873A033A", // Rich Account 0
- bankDemoDeployerKey: "0x3d3cbc973389cb26f657686445bcc75662b415b656078503592ac8c1abb8810e", // Rich Account 0
- network: {
- ...zksyncInMemoryNode,
- rpcUrls: {
- default: {
- http: ["https://node.nvillanueva.com"],
- },
- },
- },
- session: "0xdCdAC285612841db9Fa732098EAF04A917A71A28",
- passkey: "0xCeC63BD0f35e04F3Bef1128bA3A856A7BB4D88f1",
- accountFactory: "0x23b13d016E973C9915c6252271fF06cCA2098885",
- recovery: "0x6AA83E35439D71F28273Df396BC7768dbaA9849D",
- explorerUrl: "http://34.121.229.57:3010/",
- },
- },
- },
- vite: {
- css: {
- preprocessorOptions: {
- scss: {
- // Fix deprecation warnings with modern API
- api: "modern",
- },
- },
- },
- },
-});
diff --git a/examples/bank-demo/package.json b/examples/bank-demo/package.json
deleted file mode 100644
index c7ed6fbdd..000000000
--- a/examples/bank-demo/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "nuxt-app",
- "private": true,
- "type": "module",
- "scripts": {
- "postinstall": "nuxt prepare"
- },
- "dependencies": {
- "@heroicons/vue": "^2.1.5",
- "@nuxt/eslint": "^0.5.7",
- "@nuxt/icon": "^1.5.5",
- "@nuxtjs/google-fonts": "^3.2.0",
- "@nuxtjs/tailwindcss": "^6.12.0",
- "@pinia/nuxt": "^0.5.5",
- "@simplewebauthn/browser": "^13.1.0",
- "@simplewebauthn/server": "^13.1.1",
- "@vueuse/core": "^11.0.0",
- "@vueuse/nuxt": "^11.1.0",
- "nuxt": "^3.13.0",
- "pinia": "^2.1.7",
- "radix-vue": "^1.9.7",
- "tailwind-merge": "^2.5.3",
- "viem": "^2.30.0",
- "vue": "latest",
- "vue-router": "latest",
- "zksync-sso": "workspace:*"
- }
-}
diff --git a/examples/bank-demo/pages/cards.vue b/examples/bank-demo/pages/cards.vue
deleted file mode 100644
index a5df23c3a..000000000
--- a/examples/bank-demo/pages/cards.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- Home
-
-
-
Accounts
-
Cards
-
Crypto Account
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/pages/checkout.vue b/examples/bank-demo/pages/checkout.vue
deleted file mode 100644
index a81bc5023..000000000
--- a/examples/bank-demo/pages/checkout.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
- Checkout
-
-
-
- Don't invest unless you're prepared to lose all the money you invest. This is a high-risk investment and you should not expect to be protected if something goes wrong. Take 2 minutes to learn more.
-
-
-
Order Summary
-
-
-
Purchasing
-
-
-
-
-
Ethereum
-
{{(cart.amount / cart.priceOfEth).toLocaleString(undefined, {maximumFractionDigits: 4})}} ETH
-
-
-
-
£{{(cart.amount).toLocaleString(undefined, {maximumFractionDigits: 2})}}
-
-
-
-
-
-
-
To
-
-
Wallet
-
- {{ appMeta.cryptoAccountAddress?.slice(0,5) + '...' + appMeta.cryptoAccountAddress?.slice(-3) }}
-
-
-
-
-
-
Price
-
-
ETH 1 = £{{cart.priceOfEth.toLocaleString(undefined, {maximumFractionDigits: 2})}}
-
-
-
-
-
-
-
Total
-
£{{(cart.amount).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}}
-
-
-
-
- By continuing, I confirm I accept the Terms & Conditions and have read the Privacy Notice .
-
-
-
-
-
-
- Pay £{{(cart.amount).toLocaleString(undefined, {maximumFractionDigits: 2})}}
-
-
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/pages/crypto-account.vue b/examples/bank-demo/pages/crypto-account.vue
deleted file mode 100644
index c2e60fd2a..000000000
--- a/examples/bank-demo/pages/crypto-account.vue
+++ /dev/null
@@ -1,376 +0,0 @@
-
-
-
- Home
-
-
-
Accounts
-
Cards
-
Crypto Account
-
-
-
-
-
-
-
Crypto account created.
-
-
-
- Crypto Account Address
-
-
-
-
-
-
-
-
-
{{ (+formatEther(accountBalance)).toFixed(4) }} ETH
-
ZKsync
-
-
-
-
-
-
-
-
-
-
-
- Deposit
-
-
-
-
-
-
- Send
-
-
-
-
-
-
- info
-
-
-
-
-
- Transactions
-
-
-
-
-
- {{ item.amount }}
-
-
-
-
-
-
-
-
-
Applications
-
-
-
-
-
AAVE
-
-
-
-
-
-
-
-
-
-
-
YES
-
Can be collateral
-
-
-
- Supply
-
-
-
-
-
-
- Supply ETH
-
-
-
-
-
Amount
-
Balance: {{ (+formatEther(accountBalance)).toFixed(4) }}
-
-
-
-
£{{(stakeAmount * cart.priceOfEth).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}}
-
-
-
Transaction overview
-
-
- Supply APY
- 0.97%
-
-
- Collateralization
- Enabled
-
-
-
- £0.03
-
-
-
- {{ errorMessage }}
-
-
-
-
-
-
-
-
-
-
-
-
{{history.cryptoAccount.slice(0,-1).reduce((acc, value) => acc + value.valueEth, 0).toLocaleString(undefined, {maximumSignificantDigits: 4})}} ETH
-
£{{(history.cryptoAccount.slice(0,-1).reduce((acc, value) => acc + value.valueEth, 0) * cart.priceOfEth).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}}
-
Balance
-
-
-
-
-
-
- No assets supplied.
-
-
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/pages/index.vue b/examples/bank-demo/pages/index.vue
deleted file mode 100644
index e9a3a962b..000000000
--- a/examples/bank-demo/pages/index.vue
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
- Home
-
-
-
Accounts
-
Cards
-
Crypto Account
-
-
-
-
-
-
-
£ 2,000
-
£{{(history.mainAccount.reduce((acc, cv) => acc + cv.value, 0)).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) }}
-
British Pound
-
-
-
-
-
-
-
-
-
-
-
- Add money
-
-
-
-
-
-
- Send
-
-
-
-
-
-
- Account details
-
-
-
-
-
-
-
-
- Transactions
-
-
-
-
{{ item.description }}
-
{{ item.time }}
-
-
- {{item.amount}}
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/pages/kitchen-sink.vue b/examples/bank-demo/pages/kitchen-sink.vue
deleted file mode 100644
index c8cdb7259..000000000
--- a/examples/bank-demo/pages/kitchen-sink.vue
+++ /dev/null
@@ -1,326 +0,0 @@
-
-
-
- Settings
-
-
-
-
-
- This is a card
-
-
-
-
-
-
-
- Add
-
-
-
- Now that there is the Tec-9, a crappy spray gun from South Miami. This
- gun is advertised as the most popular gun in American crime. Do you
- Google
- believe that shit? It actually says that in the little book that comes
- with it: the most popular gun in American crime. Like they're actually
- proud of that shit.
-
- Google Link
-
-
- Google Link
-
-
- Google Link
-
-
-
-
-
-
Switch
-
A Switch
-
A Disabled Switch
-
-
Icon
-
-
-
-
-
Buttons
-
-
Primary
-
Primary Button
-
Primary Disabled
-
-
Secondary
-
Secondary Button
-
Secondary Disabled
-
-
Danger
-
Danger Button
-
Danger Disabled
-
-
Ghost
-
Ghost Button
-
Ghost Disabled
-
-
With icon
-
-
-
-
- Button with icon
-
-
-
-
-
- Button with icon
-
-
-
Button Icon
-
Default (Ghost)
-
-
-
Primary
-
-
Secondary
-
-
Ghost
-
-
Danger
-
-
-
Copy Button
-
-
-
Dropdown
-
-
-
-
- USDC
-
-
-
-
Dialog
-
- Disconnect your username@zksync.eth account?
-
-
-
-
-
- Disconnect
-
-
-
-
-
Tabs
-
- I am content for Tab1
- I am content for Tab2
- I am content for Tab3
-
-
-
Input
-
-
-
-
-
-
-
-
-
-
-
Table
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
- A link
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
-
-
Panel
-
-
- View All
-
-
-
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
-
-
- Something Something
- sub text underneath
-
-
- 0.50
- $1,500.00
-
-
-
-
- View All
-
-
-
-
-
-
-
-
-
- $
- 12,200
- .25
-
- Card content
-
-
-
-
- Deposit
-
-
-
-
-
- Withdraw
-
-
-
-
-
-
- Bridge
-
-
-
-
-
-
-
-
diff --git a/examples/bank-demo/project.json b/examples/bank-demo/project.json
deleted file mode 100644
index 0ee7d7df0..000000000
--- a/examples/bank-demo/project.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "bank-demo",
- "implicitDependencies": ["sdk"],
- "tags": ["type:app"],
- "targets": {
- "dev": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/bank-demo",
- "command": "PORT=3005 nuxt dev"
- },
- "dependsOn": ["^build"]
- },
- "build": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/bank-demo",
- "command": "nuxt generate"
- },
- "dependsOn": ["^build"]
- },
- "deploy": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/bank-demo",
- "command": "firebase deploy --only hosting:stake-demo-app --project stake-demo-app"
- },
- "dependsOn": ["build"]
- },
- "deploy:preview": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/nft-quest",
- "command": "firebase hosting:channel:deploy --only stake-demo-app --project stake-demo-app"
- },
- "dependsOn": ["build"]
- },
- "preview": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/bank-demo",
- "command": "nuxt preview"
- },
- "dependsOn": ["^build", "build"]
- }
- }
-}
diff --git a/examples/bank-demo/public/aave-logo.png b/examples/bank-demo/public/aave-logo.png
deleted file mode 100644
index 25440c1e3..000000000
Binary files a/examples/bank-demo/public/aave-logo.png and /dev/null differ
diff --git a/examples/bank-demo/public/avatar-uniswap.png b/examples/bank-demo/public/avatar-uniswap.png
deleted file mode 100644
index c24bf5ab6..000000000
Binary files a/examples/bank-demo/public/avatar-uniswap.png and /dev/null differ
diff --git a/examples/bank-demo/public/favicon.ico b/examples/bank-demo/public/favicon.ico
deleted file mode 100644
index 98c8f2a2b..000000000
Binary files a/examples/bank-demo/public/favicon.ico and /dev/null differ
diff --git a/examples/bank-demo/public/frame-thumbnail.png b/examples/bank-demo/public/frame-thumbnail.png
deleted file mode 100644
index 919edf5d3..000000000
Binary files a/examples/bank-demo/public/frame-thumbnail.png and /dev/null differ
diff --git a/examples/bank-demo/public/revolut-logo.png b/examples/bank-demo/public/revolut-logo.png
deleted file mode 100644
index 03763e0b4..000000000
Binary files a/examples/bank-demo/public/revolut-logo.png and /dev/null differ
diff --git a/examples/bank-demo/public/robots.txt b/examples/bank-demo/public/robots.txt
deleted file mode 100644
index 8b1378917..000000000
--- a/examples/bank-demo/public/robots.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/examples/bank-demo/public/square-thumbnail.png b/examples/bank-demo/public/square-thumbnail.png
deleted file mode 100644
index f0bf7c8ea..000000000
Binary files a/examples/bank-demo/public/square-thumbnail.png and /dev/null differ
diff --git a/examples/bank-demo/public/usd-token.svg b/examples/bank-demo/public/usd-token.svg
deleted file mode 100644
index f8e4c26d9..000000000
--- a/examples/bank-demo/public/usd-token.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/examples/bank-demo/tailwind.config.js b/examples/bank-demo/tailwind.config.js
deleted file mode 100644
index 040f70411..000000000
--- a/examples/bank-demo/tailwind.config.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-
-export default {
- darkMode: ["selector", ".dark-mode"],
- content: [],
- theme: {
- fontFamily: {
- sans: ["Inter", "sans-serif"],
- },
- extend: {
- borderRadius: {
- zk: "16px",
- },
- colors: {
- khaki: "#F6F6F6",
- neutral: {
- 50: "#F7F7F7",
- 100: "#EBEBEB",
- 200: "#D1D1D1",
- 300: "#BABABA",
- 400: "#A1A1A1",
- 500: "#878787",
- 600: "#707070",
- 700: "#575757",
- 800: "#3D3D3D",
- 900: "#262626",
- 950: "#1A1A1A",
- },
- primary: {
- 50: "#ECEDFE",
- 100: "#DEDFFC",
- 200: "#B8BAF9",
- 300: "#EAEBFD",
- 400: "#9896FF",
- 500: "#4F55F1",
- 600: "#131AEC",
- 700: "#0E14B4",
- 800: "#090D76",
- 900: "#05073D",
- 950: "#02031C",
- },
- warning: {
- 50: "#FFF9E5",
- 100: "#FFECB2",
- 200: "#FFE080",
- 300: "#FFD44D",
- 400: "#FFC81A",
- 500: "#FFC200",
- 600: "#E5AF00",
- 700: "#CC9B00",
- 800: "#997500",
- 900: "#664E00",
- 950: "#4D3A00",
- },
- error: {
- 50: "#FFCCCC",
- 100: "#FFB2B2",
- 200: "#FF8C8C",
- 300: "#FF6666",
- 400: "#FF3333",
- 500: "#FF0000",
- 600: "#CC0000",
- 700: "#A60000",
- 800: "#800000",
- 900: "#590000",
- 950: "#330000",
- },
- success: {
- 50: "#CCFFE5",
- 100: "#B2FFD9",
- 200: "#8CFFC6",
- 300: "#66FFB2",
- 400: "#33FF99",
- 500: "#00FF80",
- 600: "#00CC66",
- 700: "#00A653",
- 800: "#008040",
- 900: "#00592D",
- 950: "#00331A",
- },
- },
- keyframes: {
- overlayShow: {
- from: { opacity: 0 },
- to: { opacity: 1 },
- },
- contentShow: {
- from: { opacity: 0, transform: "translate(-50%, -48%) scale(0.96)" },
- to: { opacity: 1, transform: "translate(-50%, -50%) scale(1)" },
- },
- slideDownAndFade: {
- from: { opacity: 0, transform: "translateY(-2px)" },
- to: { opacity: 1, transform: "translateY(0)" },
- },
- slideLeftAndFade: {
- from: { opacity: 0, transform: "translateX(2px)" },
- to: { opacity: 1, transform: "translateX(0)" },
- },
- slideUpAndFade: {
- from: { opacity: 0, transform: "translateY(2px)" },
- to: { opacity: 1, transform: "translateY(0)" },
- },
- slideRightAndFade: {
- from: { opacity: 0, transform: "translateX(-2px)" },
- to: { opacity: 1, transform: "translateX(0)" },
- },
- },
- animation: {
- overlayShow: "overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
- contentShow: "contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
- slideDownAndFade:
- "slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
- slideLeftAndFade:
- "slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
- slideUpAndFade: "slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
- slideRightAndFade:
- "slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
- },
- },
- },
-};
diff --git a/examples/bank-demo/tsconfig.json b/examples/bank-demo/tsconfig.json
deleted file mode 100644
index a746f2a70..000000000
--- a/examples/bank-demo/tsconfig.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- // https://nuxt.com/docs/guide/concepts/typescript
- "extends": "./.nuxt/tsconfig.json"
-}
diff --git a/examples/demo-app/components/PasskeyConfig.vue b/examples/demo-app/components/PasskeyConfig.vue
index cf6fe0af6..8c7600bd2 100644
--- a/examples/demo-app/components/PasskeyConfig.vue
+++ b/examples/demo-app/components/PasskeyConfig.vue
@@ -166,15 +166,15 @@ async function handleCreatePasskey() {
const credential = await createWebAuthnCredential({
rpName: "SSO Demo",
rpId: window.location.hostname,
- userName: "Demo User",
- userEmail: "demo-user@zksync-sso.example",
+ displayName: "Demo User",
+ name: "demo-user@zksync-sso.example",
timeout: 60000,
});
// Update the passkey configuration
config.value.credentialId = credential.credentialId;
- config.value.passkeyX = credential.publicKeyX;
- config.value.passkeyY = credential.publicKeyY;
+ config.value.passkeyX = credential.publicKey.x;
+ config.value.passkeyY = credential.publicKey.y;
config.value.originDomain = credential.origin;
// eslint-disable-next-line no-console
diff --git a/examples/demo-app/components/SessionCreator.vue b/examples/demo-app/components/SessionCreator.vue
index d45485ff4..b1560842d 100644
--- a/examples/demo-app/components/SessionCreator.vue
+++ b/examples/demo-app/components/SessionCreator.vue
@@ -73,7 +73,7 @@
import { ref, computed } from "vue";
import { createPublicClient, http, parseEther, type Chain, type Address } from "viem";
import { createBundlerClient } from "viem/account-abstraction";
-import { createSession as createSessionAction, toEcdsaSmartAccount, LimitType } from "zksync-sso-4337/client";
+import { createSession, toEcdsaSmartAccount, LimitType } from "zksync-sso-4337/client";
interface SessionConfig {
enabled: boolean;
@@ -244,7 +244,7 @@ async function createSessionOnChain() {
// Create the session on-chain
let sessionResult;
try {
- sessionResult = await createSessionAction(bundlerClient, {
+ sessionResult = await createSession(bundlerClient, {
sessionSpec,
contracts: {
sessionValidator: props.sessionConfig.validatorAddress as Address,
diff --git a/examples/demo-app/components/SessionTransactionSender.vue b/examples/demo-app/components/SessionTransactionSender.vue
index e441f6003..325a92687 100644
--- a/examples/demo-app/components/SessionTransactionSender.vue
+++ b/examples/demo-app/components/SessionTransactionSender.vue
@@ -159,7 +159,9 @@ async function sendTransaction() {
// Create session client (wraps session smart account)
const sessionClient = createSessionClient({
address: props.accountAddress as Address,
- sessionValidatorAddress: props.sessionConfig.validatorAddress as Address,
+ contracts: {
+ sessionValidator: props.sessionConfig.validatorAddress as Address,
+ },
sessionKeyPrivateKey: props.sessionConfig.sessionPrivateKey as `0x${string}`,
sessionSpec: {
signer: props.sessionConfig.sessionSigner as Address,
diff --git a/examples/demo-app/package.json b/examples/demo-app/package.json
index ac44d89f6..f1bc23e00 100644
--- a/examples/demo-app/package.json
+++ b/examples/demo-app/package.json
@@ -18,9 +18,7 @@
"viem": "2.30.0",
"vue": "^3.4.21",
"wagmi": "^2.12.17",
- "zksync-sso": "workspace:*",
- "zksync-sso-4337": "workspace:*",
- "zksync-sso-wagmi-connector": "workspace:*"
+ "zksync-sso-4337": "workspace:*"
},
"devDependencies": {
"@nuxt/eslint": "^0.5.7",
diff --git a/examples/demo-app/pages/index.vue b/examples/demo-app/pages/index.vue
index e8fe7df7c..52cdac2c3 100644
--- a/examples/demo-app/pages/index.vue
+++ b/examples/demo-app/pages/index.vue
@@ -32,20 +32,12 @@
v-if="address"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mt-3 mr-4 disabled:bg-slate-300"
:disabled="isSendingEth"
- @click="sendTokens(false)"
+ @click="sendTokens()"
>
Send 0.1 ETH
-
- Send 0.1 ETH with Paymaster
-
-
@@ -92,7 +84,7 @@
Typed Data Verification Result: {{ isValidTypedDataSignature ? 'Valid ✓' : 'Invalid ✗' }}
-
+ -->
import { disconnect, getBalance, watchAccount, sendTransaction, createConfig, connect, reconnect, waitForTransactionReceipt, type GetBalanceReturnType, signTypedData, readContract } from "@wagmi/core";
import { createWalletClient, createPublicClient, http, parseEther, type Address, type Hash } from "viem";
-import { zksyncSsoConnector } from "zksync-sso-wagmi-connector";
+import { zksyncSsoConnector } from "zksync-sso-4337/connector";
import { privateKeyToAccount } from "viem/accounts";
-import { getGeneralPaymasterInput, zksyncInMemoryNode } from "viem/zksync";
-import PaymasterContract from "../forge-output-paymaster.json";
+import { localhost } from "viem/chains";
import ERC1271CallerContract from "../forge-output-erc1271.json";
-const chain = zksyncInMemoryNode;
+const chain = localhost;
const testTransferTarget = "0x55bE1B079b53962746B2e86d12f158a41DF294A6";
@@ -152,7 +143,7 @@ const fundAccount = async () => {
if (!address.value) throw new Error("Not connected");
const richClient = createWalletClient({
- account: privateKeyToAccount("0x3eb15da85647edd9a1159a4a13b9e7c56877c4eb33f614546d4db06a51868b1c"),
+ account: privateKeyToAccount("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"), // Rich anvil account
chain: chain,
transport: http(),
});
@@ -223,7 +214,7 @@ const disconnectWallet = async () => {
/* Send ETH */
const isSendingEth = ref(false);
-const sendTokens = async (usePaymaster: boolean) => {
+const sendTokens = async () => {
if (!address.value) return;
errorMessage.value = "";
@@ -231,19 +222,10 @@ const sendTokens = async (usePaymaster: boolean) => {
try {
let transactionHash;
- if (usePaymaster) {
- transactionHash = await sendTransaction(wagmiConfig, {
- to: testTransferTarget,
- value: parseEther("0.1"),
- paymaster: PaymasterContract.deployedTo as Address,
- paymasterInput: getGeneralPaymasterInput({ innerInput: "0x" }),
- });
- } else {
- transactionHash = await sendTransaction(wagmiConfig, {
- to: testTransferTarget,
- value: parseEther("0.1"),
- });
- }
+ transactionHash = await sendTransaction(wagmiConfig, {
+ to: testTransferTarget,
+ value: parseEther("0.1"),
+ });
// FIXME: When not using sessions, sendTransaction returns a map and not a string
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -303,7 +285,7 @@ const typedData = {
},
} as const;
-const signTypedDataHandler = async () => {
+const _signTypedDataHandler = async () => {
if (!address.value) return;
errorMessage.value = "";
diff --git a/examples/demo-app/pages/web-sdk-test.vue b/examples/demo-app/pages/web-sdk-test.vue
index 53f39f12d..69af87e28 100644
--- a/examples/demo-app/pages/web-sdk-test.vue
+++ b/examples/demo-app/pages/web-sdk-test.vue
@@ -76,7 +76,10 @@
Account Address:
- {{ deploymentResult.address }}
+ {{ deploymentResult.address }}
EOA Signer:
@@ -185,7 +188,10 @@
class="mt-2"
data-testid="found-addresses-result"
>
-
+
b.toString(16).padStart(2, "0")).join("")}`;
+ const credential = await getPasskeyCredential();
+ if (!credential) throw new Error("No credential returned from WebAuthn");
// Set the scanned passkey details
- findPasskeyCredentialId.value = credentialIdHex;
+ findPasskeyCredentialId.value = credential.credentialIdHex;
findPasskeyOriginDomain.value = window.location.origin;
findPasskeyScanned.value = true;
// eslint-disable-next-line no-console
console.log("Passkey scanned successfully:");
// eslint-disable-next-line no-console
- console.log(" Credential ID:", credentialIdHex);
+ console.log(" Credential ID:", credential.credentialIdHex);
// eslint-disable-next-line no-console
console.log(" Origin:", window.location.origin);
@@ -989,10 +975,10 @@ async function scanPasskeyForFindAccounts() {
const result = await findAddressesByPasskey({
client: publicClient,
contracts: {
- webauthnValidator: contracts.webauthnValidator as Address,
+ webauthnValidator: contracts.webauthnValidator,
},
passkey: {
- credentialId: credentialIdHex as Hex,
+ credentialId: credential.credentialIdHex,
originDomain: window.location.origin,
},
});
diff --git a/examples/demo-app/project.json b/examples/demo-app/project.json
index 34173d6d4..a7abbf951 100644
--- a/examples/demo-app/project.json
+++ b/examples/demo-app/project.json
@@ -2,24 +2,6 @@
"name": "demo-app",
"tags": ["type:app"],
"targets": {
- "dev": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/demo-app",
- "commands": [
- {
- "command": "pnpm nx dev auth-server",
- "prefix": "Auth-Server:"
- },
-
- {
- "command": "PORT=3004 nuxt dev",
- "prefix": "Demo-App:"
- }
- ]
- },
- "dependsOn": ["deploy-contracts"]
- },
"dev:erc4337": {
"executor": "nx:run-commands",
"options": {
@@ -38,18 +20,6 @@
},
"dependsOn": ["deploy-contracts-erc4337"]
},
- "build": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/demo-app",
- "commands": [
- {
- "command": "pnpm nuxt generate"
- }
- ]
- },
- "dependsOn": ["deploy-contracts"]
- },
"build:erc4337": {
"executor": "nx:run-commands",
"options": {
@@ -76,14 +46,6 @@
"command": "forge build"
}
},
- "deploy-contracts": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/demo-app",
- "command": "forge create smart-contracts/DemoPaymaster.sol:DemoPaymaster --private-key 0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 --rpc-url http://localhost:8011 --root . --chain 260 --zksync --json 2>&1 | sed -n 's/.*\\({.*}\\).*/\\1/p' > forge-output-paymaster.json && ADDRESS=$(sed -n 's/.*\"deployedTo\":\"\\([^\"]*\\)\".*/\\1/p' forge-output-paymaster.json) && echo \"DemoPaymaster deployed to: $ADDRESS\" && cast send --private-key 0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 $ADDRESS --rpc-url http://localhost:8011 --value 0.1ether && forge create smart-contracts/ERC1271Caller.sol:ERC1271Caller --private-key 0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 --rpc-url http://localhost:8011 --root . --chain 260 --zksync --json 2>&1 | sed -n 's/.*\\({.*}\\).*/\\1/p' > forge-output-erc1271.json && ADDRESS=$(sed -n 's/.*\"deployedTo\":\"\\([^\"]*\\)\".*/\\1/p' forge-output-erc1271.json) && echo \"ERC1271Caller deployed to: $ADDRESS\""
- },
- "dependsOn": ["build-contracts"]
- },
"deploy-contracts-erc4337": {
"executor": "nx:run-commands",
"options": {
@@ -125,14 +87,6 @@
},
"dependsOn": ["build:local"]
},
- "e2e:setup": {
- "executor": "nx:run-commands",
- "options": {
- "cwd": "examples/demo-app",
- "command": "pnpm exec playwright install chromium"
- },
- "dependsOn": ["deploy-contracts"]
- },
"e2e:setup:erc4337": {
"executor": "nx:run-commands",
"options": {
diff --git a/firebase.json b/firebase.json
index 5410c6766..6637d29fc 100644
--- a/firebase.json
+++ b/firebase.json
@@ -17,12 +17,6 @@
}
]
},
- {
- "target": "stake-demo-app",
- "trailingSlash": false,
- "public": "examples/bank-demo/.output/public",
- "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
- },
{
"target": "nft-quest-testnet",
"trailingSlash": false,
diff --git a/package.json b/package.json
index e25e33d17..a23066b6e 100644
--- a/package.json
+++ b/package.json
@@ -48,8 +48,7 @@
"typescript-eslint": "8.7.0",
"viem": "^2.30.0",
"zksync-sso": "workspace:*",
- "zksync-sso-4337": "workspace:*",
- "zksync-sso-wagmi-connector": "workspace:*"
+ "zksync-sso-4337": "workspace:*"
},
"nx": {
"includedScripts": []
diff --git a/packages/auth-server/.env.example b/packages/auth-server/.env.example
index 596e51490..66ab5bd54 100644
--- a/packages/auth-server/.env.example
+++ b/packages/auth-server/.env.example
@@ -1,5 +1,5 @@
# Default chain ID (optional)
-NUXT_PUBLIC_DEFAULT_CHAIN_ID=300
+NUXT_PUBLIC_DEFAULT_CHAIN_ID=1337
# AppKit Project ID
NUXT_PUBLIC_APPKIT_PROJECT_ID=your-appkit-project-id
diff --git a/packages/auth-server/components/PrividiumLogin.vue b/packages/auth-server/components/PrividiumLogin.vue
index f22750bfa..577987d86 100644
--- a/packages/auth-server/components/PrividiumLogin.vue
+++ b/packages/auth-server/components/PrividiumLogin.vue
@@ -152,8 +152,8 @@
diff --git a/packages/auth-server/components/account-recovery/AccountSelect.vue b/packages/auth-server/components/account-recovery.disabled/AccountSelect.vue
similarity index 100%
rename from packages/auth-server/components/account-recovery/AccountSelect.vue
rename to packages/auth-server/components/account-recovery.disabled/AccountSelect.vue
diff --git a/packages/auth-server/components/account-recovery/AddRecoveryMethodModal.vue b/packages/auth-server/components/account-recovery.disabled/AddRecoveryMethodModal.vue
similarity index 100%
rename from packages/auth-server/components/account-recovery/AddRecoveryMethodModal.vue
rename to packages/auth-server/components/account-recovery.disabled/AddRecoveryMethodModal.vue
diff --git a/packages/auth-server/components/account-recovery/ConfirmActionCard.vue b/packages/auth-server/components/account-recovery.disabled/ConfirmActionCard.vue
similarity index 100%
rename from packages/auth-server/components/account-recovery/ConfirmActionCard.vue
rename to packages/auth-server/components/account-recovery.disabled/ConfirmActionCard.vue
diff --git a/packages/auth-server/components/account-recovery/ConfirmInfoCard.vue b/packages/auth-server/components/account-recovery.disabled/ConfirmInfoCard.vue
similarity index 100%
rename from packages/auth-server/components/account-recovery/ConfirmInfoCard.vue
rename to packages/auth-server/components/account-recovery.disabled/ConfirmInfoCard.vue
diff --git a/packages/auth-server/components/account-recovery/GoogleRecoveryFlow.vue b/packages/auth-server/components/account-recovery.disabled/GoogleRecoveryFlow.vue
similarity index 100%
rename from packages/auth-server/components/account-recovery/GoogleRecoveryFlow.vue
rename to packages/auth-server/components/account-recovery.disabled/GoogleRecoveryFlow.vue
diff --git a/packages/auth-server/components/account-recovery/PasskeyGenerationFlow.vue b/packages/auth-server/components/account-recovery.disabled/PasskeyGenerationFlow.vue
similarity index 97%
rename from packages/auth-server/components/account-recovery/PasskeyGenerationFlow.vue
rename to packages/auth-server/components/account-recovery.disabled/PasskeyGenerationFlow.vue
index 2b2066192..9a4445b18 100644
--- a/packages/auth-server/components/account-recovery/PasskeyGenerationFlow.vue
+++ b/packages/auth-server/components/account-recovery.disabled/PasskeyGenerationFlow.vue
@@ -70,7 +70,7 @@
diff --git a/packages/auth-server/pages/index.vue b/packages/auth-server/pages/index.vue
index 013120eeb..84aca3124 100644
--- a/packages/auth-server/pages/index.vue
+++ b/packages/auth-server/pages/index.vue
@@ -31,12 +31,13 @@
Log In
-
+
@@ -58,8 +59,6 @@
diff --git a/packages/auth-server/pages/recovery/account-not-ready.vue b/packages/auth-server/pages/recovery.disabled/account-not-ready.vue
similarity index 100%
rename from packages/auth-server/pages/recovery/account-not-ready.vue
rename to packages/auth-server/pages/recovery.disabled/account-not-ready.vue
diff --git a/packages/auth-server/pages/recovery/google/index.vue b/packages/auth-server/pages/recovery.disabled/google/index.vue
similarity index 100%
rename from packages/auth-server/pages/recovery/google/index.vue
rename to packages/auth-server/pages/recovery.disabled/google/index.vue
diff --git a/packages/auth-server/pages/recovery/guardian/(actions)/confirm-guardian.vue b/packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-guardian.vue
similarity index 99%
rename from packages/auth-server/pages/recovery/guardian/(actions)/confirm-guardian.vue
rename to packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-guardian.vue
index a19e72825..00f0c4cac 100644
--- a/packages/auth-server/pages/recovery/guardian/(actions)/confirm-guardian.vue
+++ b/packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-guardian.vue
@@ -192,6 +192,7 @@ const confirmGuardianAction = async () => {
await getGuardians(accountAddress.value);
} catch (err) {
confirmGuardianError.value = "An error occurred while confirming the guardian. Please try again.";
+ // eslint-disable-next-line no-console
console.error(err);
}
};
diff --git a/packages/auth-server/pages/recovery/guardian/(actions)/confirm-recovery.vue b/packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-recovery.vue
similarity index 97%
rename from packages/auth-server/pages/recovery/guardian/(actions)/confirm-recovery.vue
rename to packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-recovery.vue
index a633abe77..d6bed9cb4 100644
--- a/packages/auth-server/pages/recovery/guardian/(actions)/confirm-recovery.vue
+++ b/packages/auth-server/pages/recovery.disabled/guardian/(actions)/confirm-recovery.vue
@@ -106,7 +106,7 @@