create-polygon-kit 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/nextjs/typescript/.env.local.example +2 -0
- package/templates/nextjs/typescript/README.md +20 -1
- package/templates/nextjs/typescript/app/providers.tsx +11 -1
- package/templates/nextjs/typescript/package.json +1 -0
- package/templates/nextjs/typescript/postcss.config.js +1 -1
- package/templates/vite/typescript/.env.example +2 -0
- package/templates/vite/typescript/README.md +20 -1
- package/templates/vite/typescript/src/App.tsx +7 -1
package/package.json
CHANGED
|
@@ -4,7 +4,26 @@ This project was created with [create-polygon-kit](https://github.com/sanketsaag
|
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 1. Set up your Reown Project ID
|
|
8
|
+
|
|
9
|
+
This app uses Reown (formerly WalletConnect) for wallet connections. You'll need a free project ID:
|
|
10
|
+
|
|
11
|
+
1. Go to [cloud.reown.com](https://cloud.reown.com) and create a free account
|
|
12
|
+
2. Create a new project
|
|
13
|
+
3. Copy your Project ID
|
|
14
|
+
4. Create a `.env.local` file in the root directory:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cp .env.local.example .env.local
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
5. Add your project ID to `.env.local`:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
NEXT_PUBLIC_REOWN_PROJECT_ID=your_project_id_here
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Run the development server
|
|
8
27
|
|
|
9
28
|
```bash
|
|
10
29
|
npm run dev
|
|
@@ -3,5 +3,15 @@
|
|
|
3
3
|
import { PolygonKitProvider } from '@sanketsaagar/polygon-kit';
|
|
4
4
|
|
|
5
5
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
6
|
-
|
|
6
|
+
const projectId = process.env.NEXT_PUBLIC_REOWN_PROJECT_ID;
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<PolygonKitProvider
|
|
10
|
+
config={{
|
|
11
|
+
projectId,
|
|
12
|
+
}}
|
|
13
|
+
>
|
|
14
|
+
{children}
|
|
15
|
+
</PolygonKitProvider>
|
|
16
|
+
);
|
|
7
17
|
}
|
|
@@ -4,7 +4,26 @@ This project was created with [create-polygon-kit](https://github.com/sanketsaag
|
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 1. Set up your Reown Project ID
|
|
8
|
+
|
|
9
|
+
This app uses Reown (formerly WalletConnect) for wallet connections. You'll need a free project ID:
|
|
10
|
+
|
|
11
|
+
1. Go to [cloud.reown.com](https://cloud.reown.com) and create a free account
|
|
12
|
+
2. Create a new project
|
|
13
|
+
3. Copy your Project ID
|
|
14
|
+
4. Create a `.env` file in the root directory:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cp .env.example .env
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
5. Add your project ID to `.env`:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
VITE_REOWN_PROJECT_ID=your_project_id_here
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Run the development server
|
|
8
27
|
|
|
9
28
|
```bash
|
|
10
29
|
npm run dev
|
|
@@ -78,8 +78,14 @@ function Dashboard() {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
function App() {
|
|
81
|
+
const projectId = import.meta.env.VITE_REOWN_PROJECT_ID;
|
|
82
|
+
|
|
81
83
|
return (
|
|
82
|
-
<PolygonKitProvider
|
|
84
|
+
<PolygonKitProvider
|
|
85
|
+
config={{
|
|
86
|
+
projectId,
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
83
89
|
<Dashboard />
|
|
84
90
|
</PolygonKitProvider>
|
|
85
91
|
);
|