@sei-js/create-sei 0.0.4 → 1.0.1
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/.rsyncignore +11 -0
- package/CHANGELOG.md +23 -0
- package/dist/extensions/precompiles/package.json +44 -0
- package/dist/extensions/precompiles/src/components/default/index.tsx +201 -0
- package/dist/main.js +48 -29
- package/dist/main.test.js +34 -0
- package/dist/templates/next-template/.env.example +8 -0
- package/dist/templates/next-template/.eslintrc.json +1 -3
- package/dist/templates/next-template/.nvmrc +1 -0
- package/dist/templates/next-template/README.md +2 -6
- package/dist/templates/next-template/biome.json +56 -0
- package/dist/templates/next-template/next-env.d.ts +1 -1
- package/dist/templates/next-template/next.config.mjs +14 -1
- package/dist/templates/next-template/package.json +33 -17
- package/dist/templates/next-template/postcss.config.mjs +6 -0
- package/dist/templates/next-template/src/app/development/page.tsx +260 -0
- package/dist/templates/next-template/src/app/globals.css +16 -0
- package/dist/templates/next-template/src/app/layout.tsx +17 -8
- package/dist/templates/next-template/src/app/page.tsx +6 -17
- package/dist/templates/next-template/src/app/resources/page.tsx +175 -0
- package/dist/templates/next-template/src/app/resources/resources.ts +56 -0
- package/dist/templates/next-template/src/components/default/examples.ts +63 -0
- package/dist/templates/next-template/src/components/default/index.tsx +402 -0
- package/dist/templates/next-template/src/components/index.ts +3 -0
- package/dist/templates/next-template/src/components/landing/index.tsx +155 -0
- package/dist/templates/next-template/src/components/providers/index.ts +1 -0
- package/dist/templates/next-template/src/components/providers/providers.tsx +108 -0
- package/dist/templates/next-template/src/components/shell/index.ts +1 -0
- package/dist/templates/next-template/src/components/shell/shell.tsx +88 -0
- package/dist/templates/next-template/tailwind.config.js +5 -0
- package/dist/templates/next-template/tsconfig.json +2 -1
- package/extensions/precompiles/package.json +44 -0
- package/extensions/precompiles/src/components/default/index.tsx +201 -0
- package/jest.config.js +14 -0
- package/package.json +16 -5
- package/src/main.test.ts +38 -0
- package/src/main.ts +54 -34
- package/templates/next-template/.env.example +8 -0
- package/templates/next-template/.eslintrc.json +1 -3
- package/templates/next-template/.nvmrc +1 -0
- package/templates/next-template/README.md +2 -6
- package/templates/next-template/biome.json +56 -0
- package/templates/next-template/next-env.d.ts +1 -1
- package/templates/next-template/next.config.mjs +14 -1
- package/templates/next-template/package.json +33 -17
- package/templates/next-template/postcss.config.mjs +6 -0
- package/templates/next-template/src/app/development/page.tsx +260 -0
- package/templates/next-template/src/app/globals.css +16 -0
- package/templates/next-template/src/app/layout.tsx +17 -8
- package/templates/next-template/src/app/page.tsx +6 -17
- package/templates/next-template/src/app/resources/page.tsx +175 -0
- package/templates/next-template/src/app/resources/resources.ts +56 -0
- package/templates/next-template/src/components/default/examples.ts +63 -0
- package/templates/next-template/src/components/default/index.tsx +402 -0
- package/templates/next-template/src/components/index.ts +3 -0
- package/templates/next-template/src/components/landing/index.tsx +155 -0
- package/templates/next-template/src/components/providers/index.ts +1 -0
- package/templates/next-template/src/components/providers/providers.tsx +108 -0
- package/templates/next-template/src/components/shell/index.ts +1 -0
- package/templates/next-template/src/components/shell/shell.tsx +88 -0
- package/templates/next-template/tailwind.config.js +5 -0
- package/templates/next-template/tsconfig.json +2 -1
- package/.yarn/install-state.gz +0 -0
- package/dist/templates/next-template/public/sei-logotype.svg +0 -15
- package/dist/templates/next-template/src/app/components/Homepage/Examples.tsx +0 -257
- package/dist/templates/next-template/src/app/components/Homepage/Homepage.css +0 -154
- package/dist/templates/next-template/src/app/components/Homepage/Homepage.tsx +0 -87
- package/dist/templates/next-template/src/app/components/Web3Provider.tsx +0 -74
- package/dist/templates/next-template/src/app/components/index.ts +0 -2
- package/dist/templates/next-template/src/app/constants/chain.ts +0 -7
- package/dist/templates/next-template/src/app/constants/index.ts +0 -1
- package/dist/templates/next-template/src/app/index.css +0 -184
- package/dist/templates/next-template/yarn.lock +0 -4809
- package/dist/templates/vite-template/.eslintrc.cjs +0 -11
- package/dist/templates/vite-template/README.md +0 -72
- package/dist/templates/vite-template/index.html +0 -12
- package/dist/templates/vite-template/package.json +0 -33
- package/dist/templates/vite-template/public/sei-logotype.svg +0 -15
- package/dist/templates/vite-template/src/App.tsx +0 -21
- package/dist/templates/vite-template/src/assets/react.svg +0 -1
- package/dist/templates/vite-template/src/components/Homepage/Examples.tsx +0 -255
- package/dist/templates/vite-template/src/components/Homepage/Homepage.css +0 -154
- package/dist/templates/vite-template/src/components/Homepage/Homepage.tsx +0 -81
- package/dist/templates/vite-template/src/components/Web3Provider.tsx +0 -72
- package/dist/templates/vite-template/src/constants/chain.ts +0 -6
- package/dist/templates/vite-template/src/constants/index.ts +0 -1
- package/dist/templates/vite-template/src/index.css +0 -183
- package/dist/templates/vite-template/src/main.tsx +0 -12
- package/dist/templates/vite-template/src/vite-env.d.ts +0 -1
- package/dist/templates/vite-template/tsconfig.app.json +0 -25
- package/dist/templates/vite-template/tsconfig.json +0 -11
- package/dist/templates/vite-template/tsconfig.node.json +0 -14
- package/dist/templates/vite-template/vite.config.ts +0 -10
- package/dist/templates/vite-template/yarn.lock +0 -4603
- package/templates/next-template/public/sei-logotype.svg +0 -15
- package/templates/next-template/src/app/components/Homepage/Examples.tsx +0 -257
- package/templates/next-template/src/app/components/Homepage/Homepage.css +0 -154
- package/templates/next-template/src/app/components/Homepage/Homepage.tsx +0 -87
- package/templates/next-template/src/app/components/Web3Provider.tsx +0 -74
- package/templates/next-template/src/app/components/index.ts +0 -2
- package/templates/next-template/src/app/constants/chain.ts +0 -7
- package/templates/next-template/src/app/constants/index.ts +0 -1
- package/templates/next-template/src/app/favicon.ico +0 -0
- package/templates/next-template/src/app/index.css +0 -184
- package/templates/next-template/yarn.lock +0 -4809
- package/templates/vite-template/.eslintrc.cjs +0 -11
- package/templates/vite-template/README.md +0 -72
- package/templates/vite-template/favicon.ico +0 -0
- package/templates/vite-template/index.html +0 -12
- package/templates/vite-template/package.json +0 -33
- package/templates/vite-template/public/sei-logotype.svg +0 -15
- package/templates/vite-template/src/App.tsx +0 -21
- package/templates/vite-template/src/assets/react.svg +0 -1
- package/templates/vite-template/src/components/Homepage/Examples.tsx +0 -255
- package/templates/vite-template/src/components/Homepage/Homepage.css +0 -154
- package/templates/vite-template/src/components/Homepage/Homepage.tsx +0 -81
- package/templates/vite-template/src/components/Web3Provider.tsx +0 -72
- package/templates/vite-template/src/constants/chain.ts +0 -6
- package/templates/vite-template/src/constants/index.ts +0 -1
- package/templates/vite-template/src/index.css +0 -183
- package/templates/vite-template/src/main.tsx +0 -12
- package/templates/vite-template/src/vite-env.d.ts +0 -1
- package/templates/vite-template/tsconfig.app.json +0 -25
- package/templates/vite-template/tsconfig.json +0 -11
- package/templates/vite-template/tsconfig.node.json +0 -14
- package/templates/vite-template/vite.config.ts +0 -10
- package/templates/vite-template/yarn.lock +0 -4603
- /package/dist/templates/next-template/{src/app → public}/favicon.ico +0 -0
- /package/{dist/templates/vite-template → templates/next-template/public}/favicon.ico +0 -0
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
|
-
const nextConfig = {
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
eslint: {
|
|
4
|
+
// Linting is handled by Biome — skip ESLint during builds.
|
|
5
|
+
ignoreDuringBuilds: true,
|
|
6
|
+
},
|
|
7
|
+
images: {
|
|
8
|
+
remotePatterns: [
|
|
9
|
+
{
|
|
10
|
+
protocol: "https",
|
|
11
|
+
hostname: "cdn.sei.io",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
3
16
|
|
|
4
17
|
export default nextConfig;
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "template-next-sei-app",
|
|
2
|
+
"name": "template-next-create-sei-app",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "next dev",
|
|
7
|
+
"prebuild": "biome check .",
|
|
7
8
|
"build": "next build",
|
|
8
9
|
"start": "next start",
|
|
9
|
-
"lint": "
|
|
10
|
+
"lint": "biome lint .",
|
|
11
|
+
"lint:fix": "biome lint --write .",
|
|
12
|
+
"format": "biome format --write .",
|
|
13
|
+
"format:check": "biome format .",
|
|
14
|
+
"check": "biome check .",
|
|
15
|
+
"check:fix": "biome check --write .",
|
|
16
|
+
"deploy": "vercel --prod"
|
|
10
17
|
},
|
|
11
18
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"react": "^
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"@mantine/code-highlight": "^8.2.5",
|
|
20
|
+
"@mantine/core": "^8.2.5",
|
|
21
|
+
"@mantine/hooks": "^8.2.5",
|
|
22
|
+
"@mantine/notifications": "^8.2.5",
|
|
23
|
+
"@rainbow-me/rainbowkit": "^2.2.8",
|
|
24
|
+
"@sei-js/precompiles": "^2.1.2",
|
|
25
|
+
"@tabler/icons-react": "^3.34.1",
|
|
26
|
+
"@tailwindcss/postcss": "^4.1.12",
|
|
27
|
+
"@tanstack/react-query": "^5.85.3",
|
|
28
|
+
"ethers": "^6.15.0",
|
|
29
|
+
"next": "15.4.7",
|
|
30
|
+
"pino-pretty": "^13.1.1",
|
|
31
|
+
"postcss": "^8.4.45",
|
|
32
|
+
"react": "^19.1.1",
|
|
33
|
+
"react-dom": "^19.1.1",
|
|
34
|
+
"tailwindcss": "^4.1.12",
|
|
35
|
+
"viem": "^2.34.0",
|
|
36
|
+
"wagmi": "^2.16.4"
|
|
22
37
|
},
|
|
23
38
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@types/
|
|
26
|
-
"@types/react
|
|
27
|
-
"
|
|
28
|
-
"
|
|
39
|
+
"@biomejs/biome": "^2.4.5",
|
|
40
|
+
"@types/node": "^24.3.0",
|
|
41
|
+
"@types/react": "^19.1.10",
|
|
42
|
+
"@types/react-dom": "^19.1.7",
|
|
43
|
+
"autoprefixer": "^10.4.21",
|
|
44
|
+
"typescript": "^5.9.2"
|
|
29
45
|
}
|
|
30
46
|
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Shell } from '@/components';
|
|
4
|
+
import { Button, Card, Code, Container, Group, Paper, Stack, Text, ThemeIcon, Title } from '@mantine/core';
|
|
5
|
+
import { IconCode, IconExternalLink } from '@tabler/icons-react';
|
|
6
|
+
|
|
7
|
+
export default function DevelopmentPage() {
|
|
8
|
+
return (
|
|
9
|
+
<Shell>
|
|
10
|
+
<Container size="lg" py="xl">
|
|
11
|
+
<Stack gap="xl">
|
|
12
|
+
{/* Header */}
|
|
13
|
+
<div>
|
|
14
|
+
<Group gap="md" align="center" mb="lg">
|
|
15
|
+
<ThemeIcon size={48} radius="md" c="purple" variant="light">
|
|
16
|
+
<IconCode size={24} />
|
|
17
|
+
</ThemeIcon>
|
|
18
|
+
<div>
|
|
19
|
+
<Title order={1} fw={700} c="gray.9">
|
|
20
|
+
Continue Development
|
|
21
|
+
</Title>
|
|
22
|
+
<Text size="lg" c="gray.6" mt={4}>
|
|
23
|
+
Build amazing dApps with the tools you already have
|
|
24
|
+
</Text>
|
|
25
|
+
</div>
|
|
26
|
+
</Group>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
{/* Development Stack Section */}
|
|
30
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
31
|
+
<Stack gap="lg">
|
|
32
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
33
|
+
🔧 Your Development Stack
|
|
34
|
+
</Title>
|
|
35
|
+
<Text c="gray.7">This template comes pre-configured with powerful tools for blockchain development:</Text>
|
|
36
|
+
<Stack gap="sm">
|
|
37
|
+
<Paper
|
|
38
|
+
p="md"
|
|
39
|
+
radius="md"
|
|
40
|
+
bg="blue.0"
|
|
41
|
+
withBorder
|
|
42
|
+
component="a"
|
|
43
|
+
href="https://wagmi.sh/react/getting-started"
|
|
44
|
+
target="_blank"
|
|
45
|
+
style={{ textDecoration: 'none', cursor: 'pointer' }}
|
|
46
|
+
>
|
|
47
|
+
<Group gap="sm" justify="space-between">
|
|
48
|
+
<Group gap="sm">
|
|
49
|
+
<Text fw={600} c="blue.8">
|
|
50
|
+
Wagmi:
|
|
51
|
+
</Text>
|
|
52
|
+
<Text c="gray.7">React hooks for Ethereum - useAccount, useBalance, useSendTransaction, useContract</Text>
|
|
53
|
+
</Group>
|
|
54
|
+
<IconExternalLink size={16} color="var(--mantine-color-blue-8)" />
|
|
55
|
+
</Group>
|
|
56
|
+
</Paper>
|
|
57
|
+
<Paper
|
|
58
|
+
p="md"
|
|
59
|
+
radius="md"
|
|
60
|
+
bg="green.0"
|
|
61
|
+
withBorder
|
|
62
|
+
component="a"
|
|
63
|
+
href="https://viem.sh/"
|
|
64
|
+
target="_blank"
|
|
65
|
+
style={{ textDecoration: 'none', cursor: 'pointer' }}
|
|
66
|
+
>
|
|
67
|
+
<Group gap="sm" justify="space-between">
|
|
68
|
+
<Group gap="sm">
|
|
69
|
+
<Text fw={600} c="green.8">
|
|
70
|
+
Viem:
|
|
71
|
+
</Text>
|
|
72
|
+
<Text c="gray.7">TypeScript interface for Ethereum - formatEther, parseEther, contract interactions</Text>
|
|
73
|
+
</Group>
|
|
74
|
+
<IconExternalLink size={16} color="var(--mantine-color-green-8)" />
|
|
75
|
+
</Group>
|
|
76
|
+
</Paper>
|
|
77
|
+
<Paper
|
|
78
|
+
p="md"
|
|
79
|
+
radius="md"
|
|
80
|
+
bg="orange.0"
|
|
81
|
+
withBorder
|
|
82
|
+
component="a"
|
|
83
|
+
href="https://www.rainbowkit.com/docs/introduction"
|
|
84
|
+
target="_blank"
|
|
85
|
+
style={{ textDecoration: 'none', cursor: 'pointer' }}
|
|
86
|
+
>
|
|
87
|
+
<Group gap="sm" justify="space-between">
|
|
88
|
+
<Group gap="sm">
|
|
89
|
+
<Text fw={600} c="orange.8">
|
|
90
|
+
RainbowKit:
|
|
91
|
+
</Text>
|
|
92
|
+
<Text c="gray.7">Beautiful wallet connection UI with support for 100+ wallets</Text>
|
|
93
|
+
</Group>
|
|
94
|
+
<IconExternalLink size={16} color="var(--mantine-color-orange-8)" />
|
|
95
|
+
</Group>
|
|
96
|
+
</Paper>
|
|
97
|
+
</Stack>
|
|
98
|
+
</Stack>
|
|
99
|
+
</Card>
|
|
100
|
+
|
|
101
|
+
{/* Environment Variables Section */}
|
|
102
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
103
|
+
<Stack gap="lg">
|
|
104
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
105
|
+
⚙️ Network Configuration
|
|
106
|
+
</Title>
|
|
107
|
+
<Text c="gray.7">Control which Sei network your app connects to using environment variables:</Text>
|
|
108
|
+
<Paper p="md" radius="md" bg="gray.0" withBorder>
|
|
109
|
+
<Code block>
|
|
110
|
+
{`# .env.local
|
|
111
|
+
NEXT_PUBLIC_CHAIN=mainnet # Default: Sei Pacific-1
|
|
112
|
+
# NEXT_PUBLIC_CHAIN=testnet # Sei Atlantic-2
|
|
113
|
+
# NEXT_PUBLIC_CHAIN=devnet # Sei Devnet`}
|
|
114
|
+
</Code>
|
|
115
|
+
</Paper>
|
|
116
|
+
<Text size="sm" c="gray.6">
|
|
117
|
+
The chain selection logic is in <Code>src/components/providers/providers.tsx</Code>
|
|
118
|
+
</Text>
|
|
119
|
+
</Stack>
|
|
120
|
+
</Card>
|
|
121
|
+
|
|
122
|
+
{/* Custom Chain Section */}
|
|
123
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
124
|
+
<Stack gap="lg">
|
|
125
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
126
|
+
🔗 Custom Chain Configuration
|
|
127
|
+
</Title>
|
|
128
|
+
<Text c="gray.7">Need to connect to a custom Sei network or local development chain? Modify the chain configuration in the providers file:</Text>
|
|
129
|
+
<Paper p="md" radius="md" bg="gray.0" withBorder>
|
|
130
|
+
<Code block>
|
|
131
|
+
{`// src/components/providers/providers.tsx
|
|
132
|
+
import { defineChain } from 'viem'
|
|
133
|
+
|
|
134
|
+
const customSeiChain = defineChain({
|
|
135
|
+
id: 1234, // Your chain ID
|
|
136
|
+
name: 'Custom Sei',
|
|
137
|
+
nativeCurrency: { name: 'SEI', symbol: 'SEI', decimals: 18 },
|
|
138
|
+
rpcUrls: {
|
|
139
|
+
default: { http: ['http://localhost:8545'] }
|
|
140
|
+
},
|
|
141
|
+
blockExplorers: {
|
|
142
|
+
default: { name: 'Explorer', url: 'https://explorer.example.com' }
|
|
143
|
+
}
|
|
144
|
+
})`}
|
|
145
|
+
</Code>
|
|
146
|
+
</Paper>
|
|
147
|
+
</Stack>
|
|
148
|
+
</Card>
|
|
149
|
+
|
|
150
|
+
{/* Next Steps Section */}
|
|
151
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
152
|
+
<Stack gap="lg">
|
|
153
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
154
|
+
🚀 What's Next?
|
|
155
|
+
</Title>
|
|
156
|
+
<Text c="gray.7">You're all set to build! Here are some ideas to get you started:</Text>
|
|
157
|
+
<Stack gap="sm">
|
|
158
|
+
<Group gap="sm">
|
|
159
|
+
<Text fw={600} c="purple.7">
|
|
160
|
+
•
|
|
161
|
+
</Text>
|
|
162
|
+
<Text c="gray.7">
|
|
163
|
+
Create smart contract interactions using <Code>useWriteContract</Code>
|
|
164
|
+
</Text>
|
|
165
|
+
</Group>
|
|
166
|
+
<Group gap="sm">
|
|
167
|
+
<Text fw={600} c="purple.7">
|
|
168
|
+
•
|
|
169
|
+
</Text>
|
|
170
|
+
<Text c="gray.7">
|
|
171
|
+
Build token swaps with <Code>useSimulateContract</Code> and <Code>useWaitForTransactionReceipt</Code>
|
|
172
|
+
</Text>
|
|
173
|
+
</Group>
|
|
174
|
+
<Group gap="sm">
|
|
175
|
+
<Text fw={600} c="purple.7">
|
|
176
|
+
•
|
|
177
|
+
</Text>
|
|
178
|
+
<Text c="gray.7">
|
|
179
|
+
Add ENS support with <Code>useEnsName</Code> and <Code>useEnsAvatar</Code>
|
|
180
|
+
</Text>
|
|
181
|
+
</Group>
|
|
182
|
+
<Group gap="sm">
|
|
183
|
+
<Text fw={600} c="purple.7">
|
|
184
|
+
•
|
|
185
|
+
</Text>
|
|
186
|
+
<Text c="gray.7">Implement multi-chain support by extending the chain configuration</Text>
|
|
187
|
+
</Group>
|
|
188
|
+
<Group gap="sm">
|
|
189
|
+
<Text fw={600} c="purple.7">
|
|
190
|
+
•
|
|
191
|
+
</Text>
|
|
192
|
+
<Text c="gray.7">Add more Sei precompiles for advanced blockchain interactions</Text>
|
|
193
|
+
</Group>
|
|
194
|
+
</Stack>
|
|
195
|
+
</Stack>
|
|
196
|
+
</Card>
|
|
197
|
+
|
|
198
|
+
{/* Resources Section */}
|
|
199
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
200
|
+
<Stack gap="lg">
|
|
201
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
202
|
+
📚 Resources & Documentation
|
|
203
|
+
</Title>
|
|
204
|
+
<Group gap="md" wrap="wrap">
|
|
205
|
+
<Button
|
|
206
|
+
component="a"
|
|
207
|
+
href="https://wagmi.sh/react/getting-started"
|
|
208
|
+
target="_blank"
|
|
209
|
+
variant="light"
|
|
210
|
+
c="blue"
|
|
211
|
+
size="sm"
|
|
212
|
+
radius="md"
|
|
213
|
+
leftSection={<IconExternalLink size={14} />}
|
|
214
|
+
>
|
|
215
|
+
Wagmi Docs
|
|
216
|
+
</Button>
|
|
217
|
+
<Button
|
|
218
|
+
component="a"
|
|
219
|
+
href="https://viem.sh/"
|
|
220
|
+
target="_blank"
|
|
221
|
+
variant="light"
|
|
222
|
+
c="green"
|
|
223
|
+
size="sm"
|
|
224
|
+
radius="md"
|
|
225
|
+
leftSection={<IconExternalLink size={14} />}
|
|
226
|
+
>
|
|
227
|
+
Viem Docs
|
|
228
|
+
</Button>
|
|
229
|
+
<Button
|
|
230
|
+
component="a"
|
|
231
|
+
href="https://docs.sei.io/"
|
|
232
|
+
target="_blank"
|
|
233
|
+
variant="light"
|
|
234
|
+
c="orange"
|
|
235
|
+
size="sm"
|
|
236
|
+
radius="md"
|
|
237
|
+
leftSection={<IconExternalLink size={14} />}
|
|
238
|
+
>
|
|
239
|
+
Sei Docs
|
|
240
|
+
</Button>
|
|
241
|
+
<Button
|
|
242
|
+
component="a"
|
|
243
|
+
href="https://www.rainbowkit.com/docs/introduction"
|
|
244
|
+
target="_blank"
|
|
245
|
+
variant="light"
|
|
246
|
+
c="purple"
|
|
247
|
+
size="sm"
|
|
248
|
+
radius="md"
|
|
249
|
+
leftSection={<IconExternalLink size={14} />}
|
|
250
|
+
>
|
|
251
|
+
RainbowKit
|
|
252
|
+
</Button>
|
|
253
|
+
</Group>
|
|
254
|
+
</Stack>
|
|
255
|
+
</Card>
|
|
256
|
+
</Stack>
|
|
257
|
+
</Container>
|
|
258
|
+
</Shell>
|
|
259
|
+
);
|
|
260
|
+
}
|
|
@@ -1,21 +1,30 @@
|
|
|
1
|
+
import { Providers } from '@/components/providers';
|
|
2
|
+
import { ColorSchemeScript } from '@mantine/core';
|
|
1
3
|
import type { Metadata } from 'next';
|
|
2
4
|
import { Inter } from 'next/font/google';
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
import './globals.css';
|
|
8
|
+
import '@mantine/core/styles.css';
|
|
9
|
+
import '@mantine/notifications/styles.css';
|
|
3
10
|
|
|
4
11
|
const inter = Inter({ subsets: ['latin'] });
|
|
5
12
|
|
|
6
13
|
export const metadata: Metadata = {
|
|
7
14
|
title: 'Sei Next App (Wagmi)',
|
|
8
|
-
description: 'Generated by create sei app'
|
|
15
|
+
description: 'Generated by create sei app',
|
|
9
16
|
};
|
|
10
17
|
|
|
11
|
-
export default function RootLayout({
|
|
12
|
-
children
|
|
13
|
-
}: Readonly<{
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}>) {
|
|
18
|
+
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
|
|
16
19
|
return (
|
|
17
|
-
<html lang="en">
|
|
18
|
-
<
|
|
20
|
+
<html lang="en" data-mantine-color-scheme="light">
|
|
21
|
+
<head>
|
|
22
|
+
<title>Sei Next App (Wagmi)</title>
|
|
23
|
+
<ColorSchemeScript defaultColorScheme="light" />
|
|
24
|
+
</head>
|
|
25
|
+
<body className={inter.className}>
|
|
26
|
+
<Providers>{children}</Providers>
|
|
27
|
+
</body>
|
|
19
28
|
</html>
|
|
20
29
|
);
|
|
21
30
|
}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import Web3Provider from './components/Web3Provider';
|
|
3
|
-
import Homepage from './components/Homepage/Homepage';
|
|
1
|
+
'use client';
|
|
4
2
|
|
|
5
|
-
import '
|
|
3
|
+
import { Default, Landing, Shell } from '@/components';
|
|
4
|
+
import { useAccount } from 'wagmi';
|
|
6
5
|
|
|
7
6
|
export default function Home() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<ConnectButton
|
|
12
|
-
showBalance={{
|
|
13
|
-
smallScreen: false,
|
|
14
|
-
largeScreen: true
|
|
15
|
-
}}
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
<Homepage />
|
|
19
|
-
</Web3Provider>
|
|
20
|
-
);
|
|
7
|
+
const { isConnected } = useAccount();
|
|
8
|
+
|
|
9
|
+
return <Shell>{isConnected ? <Default /> : <Landing />}</Shell>;
|
|
21
10
|
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { developerResources, socialLinks } from '@/app/resources/resources';
|
|
2
|
+
import { Shell } from '@/components';
|
|
3
|
+
import { Card, Code, Container, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from '@mantine/core';
|
|
4
|
+
import { IconBook, IconRobot, IconTerminal } from '@tabler/icons-react';
|
|
5
|
+
|
|
6
|
+
export default function ResourcesPage() {
|
|
7
|
+
return (
|
|
8
|
+
<Shell>
|
|
9
|
+
<Container size="lg" py="xl">
|
|
10
|
+
<Stack gap="xl">
|
|
11
|
+
{/* Header */}
|
|
12
|
+
<div>
|
|
13
|
+
<Group gap="md" align="center" mb="lg">
|
|
14
|
+
<ThemeIcon size={48} radius="md" c="grape" variant="light">
|
|
15
|
+
<IconBook size={24} />
|
|
16
|
+
</ThemeIcon>
|
|
17
|
+
<div>
|
|
18
|
+
<Title order={1} fw={700} c="gray.9">
|
|
19
|
+
Developer Resources
|
|
20
|
+
</Title>
|
|
21
|
+
<Text size="lg" c="gray.6" mt={4}>
|
|
22
|
+
Everything you need to build on Sei. Documentation, tools, community links, and development guides.
|
|
23
|
+
</Text>
|
|
24
|
+
</div>
|
|
25
|
+
</Group>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
{/* Documentation & Tools */}
|
|
29
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
30
|
+
<Stack gap="lg">
|
|
31
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
32
|
+
📚 Documentation & Tools
|
|
33
|
+
</Title>
|
|
34
|
+
<SimpleGrid cols={{ base: 1, sm: 2, lg: 2 }} spacing="lg">
|
|
35
|
+
{developerResources.map(({ title, description, href, icon: Icon, color }) => (
|
|
36
|
+
<Card key={title} withBorder radius="lg" p="xl" component="a" href={href} target="_blank" rel="noreferrer" shadow="sm">
|
|
37
|
+
<Group align="flex-start" wrap="nowrap" gap="md">
|
|
38
|
+
<ThemeIcon variant="light" color={color} size={40} radius="md">
|
|
39
|
+
<Icon size={22} />
|
|
40
|
+
</ThemeIcon>
|
|
41
|
+
<Stack gap={6} flex={1}>
|
|
42
|
+
<Text fw={600} size="lg" c="gray.9">
|
|
43
|
+
{title}
|
|
44
|
+
</Text>
|
|
45
|
+
<Text size="sm" c="dimmed" lh={1.5}>
|
|
46
|
+
{description}
|
|
47
|
+
</Text>
|
|
48
|
+
</Stack>
|
|
49
|
+
</Group>
|
|
50
|
+
</Card>
|
|
51
|
+
))}
|
|
52
|
+
</SimpleGrid>
|
|
53
|
+
</Stack>
|
|
54
|
+
</Card>
|
|
55
|
+
|
|
56
|
+
{/* MCP Server */}
|
|
57
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
58
|
+
<Stack gap="lg">
|
|
59
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
60
|
+
🤖 AI Development Tools
|
|
61
|
+
</Title>
|
|
62
|
+
<Card withBorder radius="lg" p="xl" shadow="sm">
|
|
63
|
+
<Stack gap="lg">
|
|
64
|
+
<Stack gap="xs">
|
|
65
|
+
<Group gap="md">
|
|
66
|
+
<ThemeIcon size={40} radius="md" color="orange" variant="light">
|
|
67
|
+
<IconRobot size={20} />
|
|
68
|
+
</ThemeIcon>
|
|
69
|
+
<Title order={4} fw={600} c="gray.9">
|
|
70
|
+
Sei MCP Server
|
|
71
|
+
</Title>
|
|
72
|
+
</Group>
|
|
73
|
+
<Text size="sm" c="dimmed" lh={1.5} maw={500}>
|
|
74
|
+
Teach your IDE or LLM how to be an expert on Sei through the Model Context Protocol (MCP).
|
|
75
|
+
</Text>
|
|
76
|
+
</Stack>
|
|
77
|
+
|
|
78
|
+
<Paper p="md" radius="md" withBorder bg="gray.0">
|
|
79
|
+
<Stack gap="sm">
|
|
80
|
+
<Group gap="xs">
|
|
81
|
+
<IconTerminal size={16} color="var(--mantine-color-gray-6)" />
|
|
82
|
+
<Text size="xs" fw={500} c="dimmed">
|
|
83
|
+
Configuration
|
|
84
|
+
</Text>
|
|
85
|
+
</Group>
|
|
86
|
+
<Code block bg="white" p="md">
|
|
87
|
+
{`{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"sei": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@sei-js/mcp-server"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}`}
|
|
95
|
+
</Code>
|
|
96
|
+
</Stack>
|
|
97
|
+
</Paper>
|
|
98
|
+
|
|
99
|
+
<SimpleGrid cols={{ base: 1, sm: 2 }} spacing="md">
|
|
100
|
+
<Card withBorder radius="md" p="md" component="a" href="https://sei-js.docs.sei.io/mcp-server/quickstart" target="_blank" rel="noreferrer">
|
|
101
|
+
<Group gap="sm">
|
|
102
|
+
<ThemeIcon size={32} radius="md" color="orange" variant="light">
|
|
103
|
+
<IconBook size={16} />
|
|
104
|
+
</ThemeIcon>
|
|
105
|
+
<Stack gap={2} flex={1}>
|
|
106
|
+
<Text fw={600} size="sm" c="gray.9">
|
|
107
|
+
Quickstart Guide
|
|
108
|
+
</Text>
|
|
109
|
+
<Text size="xs" c="dimmed">
|
|
110
|
+
Get started with MCP setup
|
|
111
|
+
</Text>
|
|
112
|
+
</Stack>
|
|
113
|
+
</Group>
|
|
114
|
+
</Card>
|
|
115
|
+
<Card
|
|
116
|
+
withBorder
|
|
117
|
+
radius="md"
|
|
118
|
+
p="md"
|
|
119
|
+
component="a"
|
|
120
|
+
href="https://sei-js.docs.sei.io/mcp-server/environment-variables"
|
|
121
|
+
target="_blank"
|
|
122
|
+
rel="noreferrer"
|
|
123
|
+
>
|
|
124
|
+
<Group gap="sm">
|
|
125
|
+
<ThemeIcon size={32} radius="md" color="orange" variant="light">
|
|
126
|
+
<IconTerminal size={16} />
|
|
127
|
+
</ThemeIcon>
|
|
128
|
+
<Stack gap={2} flex={1}>
|
|
129
|
+
<Text fw={600} size="sm" c="gray.9">
|
|
130
|
+
Environment Variables
|
|
131
|
+
</Text>
|
|
132
|
+
<Text size="xs" c="dimmed">
|
|
133
|
+
Configure your setup
|
|
134
|
+
</Text>
|
|
135
|
+
</Stack>
|
|
136
|
+
</Group>
|
|
137
|
+
</Card>
|
|
138
|
+
</SimpleGrid>
|
|
139
|
+
</Stack>
|
|
140
|
+
</Card>
|
|
141
|
+
</Stack>
|
|
142
|
+
</Card>
|
|
143
|
+
|
|
144
|
+
{/* Community & Social */}
|
|
145
|
+
<Card shadow="sm" padding="xl" radius="lg" withBorder>
|
|
146
|
+
<Stack gap="lg">
|
|
147
|
+
<Title order={2} size="h3" fw={600} c="gray.8">
|
|
148
|
+
🌐 Community & Social
|
|
149
|
+
</Title>
|
|
150
|
+
<SimpleGrid cols={{ base: 1, sm: 2, lg: 3 }} spacing="lg">
|
|
151
|
+
{socialLinks.map(({ title, description, href, icon: Icon, color }) => (
|
|
152
|
+
<Card key={title} withBorder radius="lg" p="lg" component="a" href={href} target="_blank" rel="noreferrer" shadow="sm">
|
|
153
|
+
<Group align="flex-start" wrap="nowrap" gap="md">
|
|
154
|
+
<ThemeIcon variant="light" color={color === 'dark' ? 'gray' : (color as any)} size={36} radius="md">
|
|
155
|
+
<Icon size={20} />
|
|
156
|
+
</ThemeIcon>
|
|
157
|
+
<Stack gap={4} flex={1}>
|
|
158
|
+
<Text fw={600} c="gray.9">
|
|
159
|
+
{title}
|
|
160
|
+
</Text>
|
|
161
|
+
<Text size="sm" c="dimmed" lh={1.4}>
|
|
162
|
+
{description}
|
|
163
|
+
</Text>
|
|
164
|
+
</Stack>
|
|
165
|
+
</Group>
|
|
166
|
+
</Card>
|
|
167
|
+
))}
|
|
168
|
+
</SimpleGrid>
|
|
169
|
+
</Stack>
|
|
170
|
+
</Card>
|
|
171
|
+
</Stack>
|
|
172
|
+
</Container>
|
|
173
|
+
</Shell>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IconBook, IconBrandTelegram, IconBrandX, IconCode, IconPackage } from '@tabler/icons-react';
|
|
2
|
+
|
|
3
|
+
export const developerResources = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Sei Docs',
|
|
6
|
+
description: 'Official protocol docs, guides, and references.',
|
|
7
|
+
href: 'https://docs.sei.io/',
|
|
8
|
+
icon: IconBook,
|
|
9
|
+
color: 'violet',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '@sei-js docs',
|
|
13
|
+
description: 'SDKs, examples, templates, and tooling for Sei.',
|
|
14
|
+
href: 'https://sei-js.docs.sei.io/introduction',
|
|
15
|
+
icon: IconBook,
|
|
16
|
+
color: 'grape',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: 'Wagmi',
|
|
20
|
+
description: 'React hooks for Ethereum development.',
|
|
21
|
+
href: 'https://wagmi.sh/',
|
|
22
|
+
icon: IconCode,
|
|
23
|
+
color: 'blue',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Viem',
|
|
27
|
+
description: 'TypeScript interface for Ethereum.',
|
|
28
|
+
href: 'https://viem.sh/',
|
|
29
|
+
icon: IconPackage,
|
|
30
|
+
color: 'green',
|
|
31
|
+
},
|
|
32
|
+
] as const;
|
|
33
|
+
|
|
34
|
+
export const socialLinks = [
|
|
35
|
+
{
|
|
36
|
+
title: 'Developer Telegram',
|
|
37
|
+
description: 'Chat with the community and get support.',
|
|
38
|
+
href: 'https://t.me/seinetwork',
|
|
39
|
+
icon: IconBrandTelegram,
|
|
40
|
+
color: 'cyan',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: 'Sei on X',
|
|
44
|
+
description: 'Follow Sei Network updates on X (Twitter).',
|
|
45
|
+
href: 'https://x.com/SeiNetwork',
|
|
46
|
+
icon: IconBrandX,
|
|
47
|
+
color: 'dark',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: 'Sei Labs on X',
|
|
51
|
+
description: 'Follow Sei Labs announcements on X (Twitter).',
|
|
52
|
+
href: 'https://x.com/Sei_Labs',
|
|
53
|
+
icon: IconBrandX,
|
|
54
|
+
color: 'dark',
|
|
55
|
+
},
|
|
56
|
+
] as const;
|