Skip to content

Commit 6c30e69

Browse files
authored
Merge pull request #1284 from Web3Auth/add-aa-provider-examples
Add aa provider examples
2 parents 104177e + 5df1959 commit 6c30e69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11688
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_KEY=
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Web3Auth Modal Biconomy AA Example
2+
3+
![Web3Auth](https://img.shields.io/badge/Web3Auth-SDK-blue)
4+
[![Web3Auth](https://img.shields.io/badge/Web3Auth-Community-cyan)](https://community.web3auth.io)
5+
6+
[Join our Community Portal](https://community.web3auth.io/) to get support and stay up to date with the latest news and updates.
7+
8+
This example demonstrates how to use Web3Auth [Account abstraction provider](https://www.npmjs.com/package/@web3auth/account-abstraction-provider) with Web3Auth Modal in React.
9+
10+
## Getting Started
11+
12+
1. Download Manually
13+
14+
```bash
15+
npx degit Web3Auth/web3auth-pnp-examples/web-modal-sdk/account-abstraction-examples/biconomy-modal-example w3a-biconomy-example
16+
```
17+
18+
2. Navigate into the project directory
19+
20+
```bash
21+
cd w3a-biconomy-example
22+
```
23+
24+
3. Install dependencies
25+
26+
```bash
27+
npm install
28+
```
29+
30+
## Setup
31+
32+
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.
33+
34+
Here is an example `.env` file template
35+
36+
```
37+
VITE_API_KEY = "YOUR_PIMLICO_API_KEY"
38+
```
39+
40+
<!-- markdown-link-check-disable-next-line -->
41+
42+
Get your pimlico API key from the [Pimlico Dashboard](https://dashboard.pimlico.io/)
43+
44+
## Run
45+
46+
To start the development, run the following command
47+
48+
```bash
49+
npm run dev
50+
```
51+
52+
## Important Links
53+
54+
- [Website](https://web3auth.io)
55+
- [Docs](https://web3auth.io/docs)
56+
- [Guides](https://web3auth.io/docs/guides)
57+
- [SDK / API References](https://web3auth.io/docs/sdk)
58+
- [Pricing](https://web3auth.io/pricing.html)
59+
- [Community Portal](https://community.web3auth.io)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
},
28+
)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
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>Web3Auth Safe Modal Example</title>
14+
</head>
15+
16+
<body>
17+
<div id="root"></div>
18+
<script type="module" src="/src/main.tsx"></script>
19+
</body>
20+
</html>

0 commit comments

Comments
 (0)