Skip to content

Commit c144315

Browse files
fix conflicts
1 parent 3c287a8 commit c144315

File tree

15 files changed

+525
-1070
lines changed

15 files changed

+525
-1070
lines changed

web-modal-sdk/account-abstraction-examples/aa-modal-quick-start/README.md

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,54 @@
1-
# Web3Auth Modal AA Quick Start
2-
![Web3Auth](https://img.shields.io/badge/Web3Auth-SDK-blue)
3-
[![Web3Auth](https://img.shields.io/badge/Web3Auth-Community-cyan)](https://community.web3auth.io)
4-
5-
[Join our Community Portal](https://community.web3auth.io/) to get support and stay up to date with the latest news and updates.
6-
7-
This example demonstrates how to use Web3Auth [Account abstraction provider](https://www.npmjs.com/package/@web3auth/account-abstraction-provider) with Web3Auth Modal in React.
8-
9-
## Getting Started
10-
11-
1. Download Manually
12-
13-
```bash
14-
npx degit Web3Auth/web3auth-pnp-examples/web-modal-sdk/account-abstraction/aa-modal-quick-start w3a-aa-example
15-
```
16-
17-
2. Navigate into the project directory
18-
19-
```bash
20-
cd w3a-aa-example
21-
```
22-
23-
3. Install dependencies
24-
```bash
25-
npm install
26-
```
27-
28-
## Setup
29-
Set up the required environment variables by creating a `.env` file in the root of the project. Follow the instructions in the Environment Variables section.
30-
31-
Here is an example `.env` file template
32-
33-
```
34-
VITE_API_KEY = "YOUR_PIMLICO_API_KEY"
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
```js
15+
export default tseslint.config({
16+
extends: [
17+
// Remove ...tseslint.configs.recommended and replace with this
18+
...tseslint.configs.recommendedTypeChecked,
19+
// Alternatively, use this for stricter rules
20+
...tseslint.configs.strictTypeChecked,
21+
// Optionally, add this for stylistic rules
22+
...tseslint.configs.stylisticTypeChecked,
23+
],
24+
languageOptions: {
25+
// other options...
26+
parserOptions: {
27+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
28+
tsconfigRootDir: import.meta.dirname,
29+
},
30+
},
31+
})
3532
```
36-
<!-- markdown-link-check-disable-next-line -->
37-
Get your pimlico API key from the [Pimlico Dashboard](https://dashboard.pimlico.io/)
3833

39-
## Run
40-
To start the development, run the following command
41-
```bash
42-
npm run dev
34+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35+
36+
```js
37+
// eslint.config.js
38+
import reactX from 'eslint-plugin-react-x'
39+
import reactDom from 'eslint-plugin-react-dom'
40+
41+
export default tseslint.config({
42+
plugins: {
43+
// Add the react-x and react-dom plugins
44+
'react-x': reactX,
45+
'react-dom': reactDom,
46+
},
47+
rules: {
48+
// other rules...
49+
// Enable its recommended typescript rules
50+
...reactX.configs['recommended-typescript'].rules,
51+
...reactDom.configs.recommended.rules,
52+
},
53+
})
4354
```
44-
## Important Links
45-
46-
- [Website](https://web3auth.io)
47-
- [Docs](https://web3auth.io/docs)
48-
- [Guides](https://web3auth.io/docs/guides)
49-
- [SDK / API References](https://web3auth.io/docs/sdk)
50-
- [Pricing](https://web3auth.io/pricing.html)
51-
- [Community Portal](https://community.web3auth.io)
Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
<!doctype html>
22
<html lang="en">
3-
4-
<head>
5-
<script type="module">
6-
import { Buffer } from "buffer";
7-
import process from "process";
8-
window.Buffer = Buffer;
9-
window.process = process;
10-
</script>
11-
<meta charset="UTF-8" />
12-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
13-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
14-
<title>Vite + React + TS</title>
15-
</head>
16-
17-
<body>
18-
<div id="root"></div>
19-
<script type="module" src="/src/main.tsx"></script>
20-
</body>
21-
22-
</html>
3+
<head>
4+
<script type="module">
5+
import { Buffer } from "buffer";
6+
import process from "process";
7+
window.Buffer = Buffer;
8+
window.process = process;
9+
</script>
10+
<meta charset="UTF-8" />
11+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13+
<title>Vite + React + TS</title>
14+
</head>
15+
<body>
16+
<div id="root"></div>
17+
<script type="module" src="/src/main.tsx"></script>
18+
</body>
19+
</html>

web-modal-sdk/account-abstraction-examples/aa-modal-quick-start/package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"react": "^19.1.0",
14+
"react-dom": "^19.1.0",
1315
"@web3auth/modal": "10.0.0-beta.9",
14-
"ethers": "^6.13.3",
15-
"react": "^18.3.1",
16-
"react-dom": "^18.3.1"
16+
"@tanstack/react-query": "^5.74.4",
17+
"viem": "^2.28.0",
18+
"wagmi": "^2.15.0"
1719
},
1820
"devDependencies": {
19-
"@eslint/js": "^9.11.1",
20-
"@types/react": "^18.3.10",
21-
"@types/react-dom": "^18.3.0",
22-
"@vitejs/plugin-react": "^4.3.2",
21+
"@eslint/js": "^9.25.0",
22+
"@types/react": "^19.1.2",
23+
"@types/react-dom": "^19.1.2",
24+
"@vitejs/plugin-react": "^4.4.1",
25+
"eslint": "^9.25.0",
26+
"eslint-plugin-react-hooks": "^5.2.0",
27+
"eslint-plugin-react-refresh": "^0.4.19",
28+
"globals": "^16.0.0",
29+
"typescript": "~5.8.3",
30+
"typescript-eslint": "^8.30.1",
31+
"vite": "^6.3.5",
2332
"buffer": "^6.0.3",
24-
"eslint": "^9.11.1",
25-
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
26-
"eslint-plugin-react-refresh": "^0.4.12",
27-
"globals": "^15.9.0",
28-
"process": "^0.11.10",
29-
"typescript": "^5.5.3",
30-
"typescript-eslint": "^8.7.0",
31-
"vite": "^5.4.8"
33+
"process": "^0.11.10"
3234
}
3335
}

0 commit comments

Comments
 (0)