@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.
Files changed (129) hide show
  1. package/.rsyncignore +11 -0
  2. package/CHANGELOG.md +23 -0
  3. package/dist/extensions/precompiles/package.json +44 -0
  4. package/dist/extensions/precompiles/src/components/default/index.tsx +201 -0
  5. package/dist/main.js +48 -29
  6. package/dist/main.test.js +34 -0
  7. package/dist/templates/next-template/.env.example +8 -0
  8. package/dist/templates/next-template/.eslintrc.json +1 -3
  9. package/dist/templates/next-template/.nvmrc +1 -0
  10. package/dist/templates/next-template/README.md +2 -6
  11. package/dist/templates/next-template/biome.json +56 -0
  12. package/dist/templates/next-template/next-env.d.ts +1 -1
  13. package/dist/templates/next-template/next.config.mjs +14 -1
  14. package/dist/templates/next-template/package.json +33 -17
  15. package/dist/templates/next-template/postcss.config.mjs +6 -0
  16. package/dist/templates/next-template/src/app/development/page.tsx +260 -0
  17. package/dist/templates/next-template/src/app/globals.css +16 -0
  18. package/dist/templates/next-template/src/app/layout.tsx +17 -8
  19. package/dist/templates/next-template/src/app/page.tsx +6 -17
  20. package/dist/templates/next-template/src/app/resources/page.tsx +175 -0
  21. package/dist/templates/next-template/src/app/resources/resources.ts +56 -0
  22. package/dist/templates/next-template/src/components/default/examples.ts +63 -0
  23. package/dist/templates/next-template/src/components/default/index.tsx +402 -0
  24. package/dist/templates/next-template/src/components/index.ts +3 -0
  25. package/dist/templates/next-template/src/components/landing/index.tsx +155 -0
  26. package/dist/templates/next-template/src/components/providers/index.ts +1 -0
  27. package/dist/templates/next-template/src/components/providers/providers.tsx +108 -0
  28. package/dist/templates/next-template/src/components/shell/index.ts +1 -0
  29. package/dist/templates/next-template/src/components/shell/shell.tsx +88 -0
  30. package/dist/templates/next-template/tailwind.config.js +5 -0
  31. package/dist/templates/next-template/tsconfig.json +2 -1
  32. package/extensions/precompiles/package.json +44 -0
  33. package/extensions/precompiles/src/components/default/index.tsx +201 -0
  34. package/jest.config.js +14 -0
  35. package/package.json +16 -5
  36. package/src/main.test.ts +38 -0
  37. package/src/main.ts +54 -34
  38. package/templates/next-template/.env.example +8 -0
  39. package/templates/next-template/.eslintrc.json +1 -3
  40. package/templates/next-template/.nvmrc +1 -0
  41. package/templates/next-template/README.md +2 -6
  42. package/templates/next-template/biome.json +56 -0
  43. package/templates/next-template/next-env.d.ts +1 -1
  44. package/templates/next-template/next.config.mjs +14 -1
  45. package/templates/next-template/package.json +33 -17
  46. package/templates/next-template/postcss.config.mjs +6 -0
  47. package/templates/next-template/src/app/development/page.tsx +260 -0
  48. package/templates/next-template/src/app/globals.css +16 -0
  49. package/templates/next-template/src/app/layout.tsx +17 -8
  50. package/templates/next-template/src/app/page.tsx +6 -17
  51. package/templates/next-template/src/app/resources/page.tsx +175 -0
  52. package/templates/next-template/src/app/resources/resources.ts +56 -0
  53. package/templates/next-template/src/components/default/examples.ts +63 -0
  54. package/templates/next-template/src/components/default/index.tsx +402 -0
  55. package/templates/next-template/src/components/index.ts +3 -0
  56. package/templates/next-template/src/components/landing/index.tsx +155 -0
  57. package/templates/next-template/src/components/providers/index.ts +1 -0
  58. package/templates/next-template/src/components/providers/providers.tsx +108 -0
  59. package/templates/next-template/src/components/shell/index.ts +1 -0
  60. package/templates/next-template/src/components/shell/shell.tsx +88 -0
  61. package/templates/next-template/tailwind.config.js +5 -0
  62. package/templates/next-template/tsconfig.json +2 -1
  63. package/.yarn/install-state.gz +0 -0
  64. package/dist/templates/next-template/public/sei-logotype.svg +0 -15
  65. package/dist/templates/next-template/src/app/components/Homepage/Examples.tsx +0 -257
  66. package/dist/templates/next-template/src/app/components/Homepage/Homepage.css +0 -154
  67. package/dist/templates/next-template/src/app/components/Homepage/Homepage.tsx +0 -87
  68. package/dist/templates/next-template/src/app/components/Web3Provider.tsx +0 -74
  69. package/dist/templates/next-template/src/app/components/index.ts +0 -2
  70. package/dist/templates/next-template/src/app/constants/chain.ts +0 -7
  71. package/dist/templates/next-template/src/app/constants/index.ts +0 -1
  72. package/dist/templates/next-template/src/app/index.css +0 -184
  73. package/dist/templates/next-template/yarn.lock +0 -4809
  74. package/dist/templates/vite-template/.eslintrc.cjs +0 -11
  75. package/dist/templates/vite-template/README.md +0 -72
  76. package/dist/templates/vite-template/index.html +0 -12
  77. package/dist/templates/vite-template/package.json +0 -33
  78. package/dist/templates/vite-template/public/sei-logotype.svg +0 -15
  79. package/dist/templates/vite-template/src/App.tsx +0 -21
  80. package/dist/templates/vite-template/src/assets/react.svg +0 -1
  81. package/dist/templates/vite-template/src/components/Homepage/Examples.tsx +0 -255
  82. package/dist/templates/vite-template/src/components/Homepage/Homepage.css +0 -154
  83. package/dist/templates/vite-template/src/components/Homepage/Homepage.tsx +0 -81
  84. package/dist/templates/vite-template/src/components/Web3Provider.tsx +0 -72
  85. package/dist/templates/vite-template/src/constants/chain.ts +0 -6
  86. package/dist/templates/vite-template/src/constants/index.ts +0 -1
  87. package/dist/templates/vite-template/src/index.css +0 -183
  88. package/dist/templates/vite-template/src/main.tsx +0 -12
  89. package/dist/templates/vite-template/src/vite-env.d.ts +0 -1
  90. package/dist/templates/vite-template/tsconfig.app.json +0 -25
  91. package/dist/templates/vite-template/tsconfig.json +0 -11
  92. package/dist/templates/vite-template/tsconfig.node.json +0 -14
  93. package/dist/templates/vite-template/vite.config.ts +0 -10
  94. package/dist/templates/vite-template/yarn.lock +0 -4603
  95. package/templates/next-template/public/sei-logotype.svg +0 -15
  96. package/templates/next-template/src/app/components/Homepage/Examples.tsx +0 -257
  97. package/templates/next-template/src/app/components/Homepage/Homepage.css +0 -154
  98. package/templates/next-template/src/app/components/Homepage/Homepage.tsx +0 -87
  99. package/templates/next-template/src/app/components/Web3Provider.tsx +0 -74
  100. package/templates/next-template/src/app/components/index.ts +0 -2
  101. package/templates/next-template/src/app/constants/chain.ts +0 -7
  102. package/templates/next-template/src/app/constants/index.ts +0 -1
  103. package/templates/next-template/src/app/favicon.ico +0 -0
  104. package/templates/next-template/src/app/index.css +0 -184
  105. package/templates/next-template/yarn.lock +0 -4809
  106. package/templates/vite-template/.eslintrc.cjs +0 -11
  107. package/templates/vite-template/README.md +0 -72
  108. package/templates/vite-template/favicon.ico +0 -0
  109. package/templates/vite-template/index.html +0 -12
  110. package/templates/vite-template/package.json +0 -33
  111. package/templates/vite-template/public/sei-logotype.svg +0 -15
  112. package/templates/vite-template/src/App.tsx +0 -21
  113. package/templates/vite-template/src/assets/react.svg +0 -1
  114. package/templates/vite-template/src/components/Homepage/Examples.tsx +0 -255
  115. package/templates/vite-template/src/components/Homepage/Homepage.css +0 -154
  116. package/templates/vite-template/src/components/Homepage/Homepage.tsx +0 -81
  117. package/templates/vite-template/src/components/Web3Provider.tsx +0 -72
  118. package/templates/vite-template/src/constants/chain.ts +0 -6
  119. package/templates/vite-template/src/constants/index.ts +0 -1
  120. package/templates/vite-template/src/index.css +0 -183
  121. package/templates/vite-template/src/main.tsx +0 -12
  122. package/templates/vite-template/src/vite-env.d.ts +0 -1
  123. package/templates/vite-template/tsconfig.app.json +0 -25
  124. package/templates/vite-template/tsconfig.json +0 -11
  125. package/templates/vite-template/tsconfig.node.json +0 -14
  126. package/templates/vite-template/vite.config.ts +0 -10
  127. package/templates/vite-template/yarn.lock +0 -4603
  128. /package/dist/templates/next-template/{src/app → public}/favicon.ico +0 -0
  129. /package/{dist/templates/vite-template → templates/next-template/public}/favicon.ico +0 -0
@@ -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
+ }
@@ -0,0 +1,16 @@
1
+ @import "tailwindcss";
2
+
3
+ @theme {
4
+ --color-sei-red: #9e1f19;
5
+ --color-sei-dark: #1a1a1a;
6
+ }
7
+
8
+ @layer base {
9
+ html {
10
+ @apply h-full;
11
+ }
12
+
13
+ body {
14
+ @apply h-full bg-gray-50 text-gray-900 antialiased;
15
+ }
16
+ }
@@ -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
- <body className={inter.className}>{children}</body>
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
- import { ConnectButton } from '@rainbow-me/rainbowkit';
2
- import Web3Provider from './components/Web3Provider';
3
- import Homepage from './components/Homepage/Homepage';
1
+ 'use client';
4
2
 
5
- import './index.css';
3
+ import { Default, Landing, Shell } from '@/components';
4
+ import { useAccount } from 'wagmi';
6
5
 
7
6
  export default function Home() {
8
- return (
9
- <Web3Provider>
10
- <div className="header">
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;
@@ -0,0 +1,63 @@
1
+ // Code examples for display
2
+ export const walletCodeExample = `// Import wallet hooks
3
+ import { useAccount, useDisconnect } from 'wagmi';
4
+
5
+ // Use the hooks
6
+ const { address, isConnected } = useAccount();
7
+ const { disconnect } = useDisconnect();
8
+
9
+ // Access wallet info
10
+ console.log('Connected:', isConnected);
11
+ console.log('Address:', address);
12
+
13
+ // Disconnect wallet
14
+ disconnect();`;
15
+
16
+ export const balanceCodeExample = `// Import hooks and utilities
17
+ import { useAccount, usePublicClient } from 'wagmi';
18
+ import { formatEther } from 'viem';
19
+
20
+ // Use the hooks
21
+ const { address } = useAccount();
22
+ const publicClient = usePublicClient();
23
+
24
+ // Get balance
25
+ const weiBalance = await publicClient.getBalance({ address });
26
+ const seiBalance = formatEther(weiBalance);`;
27
+
28
+ export const precompileCodeExample = `// Import Sei precompiles
29
+ import { VIEM_BANK_PRECOMPILE_ABI, BANK_PRECOMPILE_ADDRESS } from '@sei-js/precompiles';
30
+ import { usePublicClient } from 'wagmi';
31
+ import { type ReadContractParameters } from 'viem';
32
+
33
+ // Use the hook
34
+ const publicClient = usePublicClient();
35
+
36
+ // Call precompile
37
+ const readContractParams: ReadContractParameters = {
38
+ abi: VIEM_BANK_PRECOMPILE_ABI,
39
+ address: BANK_PRECOMPILE_ADDRESS,
40
+ functionName: 'supply',
41
+ args: ['usei']
42
+ };
43
+
44
+ const result = await publicClient.readContract(readContractParams);`;
45
+
46
+ export const transactionCodeExample = `// Import transaction hooks
47
+ import { useSendTransaction, useWaitForTransactionReceipt } from 'wagmi';
48
+ import { parseEther } from 'viem';
49
+
50
+ // Use the hooks
51
+ const { data: hash, sendTransaction, isPending } = useSendTransaction();
52
+ const { isLoading: isConfirming, isSuccess: isConfirmed } = useWaitForTransactionReceipt({ hash });
53
+
54
+ // Example recipient address for demonstration
55
+ const exampleRecipient = '0x742d35cc6634C0532925a3b8D8C9C6c0C6c0C6c0';
56
+
57
+ // Send transaction
58
+ sendTransaction({
59
+ to: exampleRecipient,
60
+ value: parseEther(amount),
61
+ });
62
+
63
+ // Transaction states: isPending → isConfirming → isConfirmed`;