@sei-js/create-sei 1.0.0 → 2.0.0
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/LICENSE +21 -0
- package/README.md +5 -4
- package/dist/extensions/precompiles/src/components/default/index.tsx +44 -51
- package/dist/main.js +112 -34
- package/dist/templates/next-template/.env.example +2 -2
- package/dist/templates/next-template/.eslintrc.json +1 -3
- package/dist/templates/next-template/README.md +56 -32
- package/dist/templates/next-template/biome.json +17 -10
- package/dist/templates/next-template/gitignore +41 -0
- package/dist/templates/next-template/next.config.mjs +17 -1
- package/dist/templates/next-template/package.json +37 -26
- package/dist/templates/next-template/public/brand/powered-by-sei-light.png +0 -0
- package/dist/templates/next-template/public/brand/sei-lockup-light.svg +7 -0
- package/dist/templates/next-template/public/brand/sei-mark.png +0 -0
- package/dist/templates/next-template/src/app/development/page.tsx +29 -30
- package/dist/templates/next-template/src/app/favicon.ico/route.ts +3 -0
- package/dist/templates/next-template/src/app/globals.css +49 -10
- package/dist/templates/next-template/src/app/layout.tsx +14 -13
- package/dist/templates/next-template/src/app/page.tsx +3 -3
- package/dist/templates/next-template/src/app/resources/page.tsx +34 -51
- package/dist/templates/next-template/src/app/resources/resources.ts +19 -32
- package/dist/templates/next-template/src/components/default/examples.ts +4 -7
- package/dist/templates/next-template/src/components/default/index.tsx +46 -46
- package/dist/templates/next-template/src/components/index.ts +3 -3
- package/dist/templates/next-template/src/components/landing/index.tsx +19 -49
- package/dist/templates/next-template/src/components/providers/index.ts +1 -1
- package/dist/templates/next-template/src/components/providers/providers.tsx +39 -26
- package/dist/templates/next-template/src/components/shell/index.ts +1 -1
- package/dist/templates/next-template/src/components/shell/shell.tsx +34 -26
- package/dist/templates/next-template/src/theme.ts +1 -0
- package/dist/templates/next-template/tailwind.config.js +4 -16
- package/package.json +25 -9
- package/.rsyncignore +0 -13
- package/CHANGELOG.md +0 -114
- package/biome.json +0 -8
- package/dist/extensions/precompiles/package.json +0 -44
- package/dist/main.test.js +0 -34
- package/dist/templates/next-template/public/favicon.ico +0 -0
- package/extensions/precompiles/package.json +0 -44
- package/extensions/precompiles/src/components/default/index.tsx +0 -201
- package/jest.config.js +0 -14
- package/src/main.test.ts +0 -38
- package/src/main.ts +0 -159
- package/templates/next-template/.env.example +0 -8
- package/templates/next-template/.eslintrc.json +0 -3
- package/templates/next-template/.nvmrc +0 -1
- package/templates/next-template/README.md +0 -58
- package/templates/next-template/biome.json +0 -48
- package/templates/next-template/next-env.d.ts +0 -5
- package/templates/next-template/next.config.mjs +0 -4
- package/templates/next-template/package.json +0 -44
- package/templates/next-template/postcss.config.mjs +0 -6
- package/templates/next-template/public/favicon.ico +0 -0
- package/templates/next-template/src/app/development/page.tsx +0 -260
- package/templates/next-template/src/app/globals.css +0 -14
- package/templates/next-template/src/app/layout.tsx +0 -30
- package/templates/next-template/src/app/page.tsx +0 -10
- package/templates/next-template/src/app/resources/page.tsx +0 -175
- package/templates/next-template/src/app/resources/resources.ts +0 -56
- package/templates/next-template/src/components/default/examples.ts +0 -63
- package/templates/next-template/src/components/default/index.tsx +0 -402
- package/templates/next-template/src/components/index.ts +0 -3
- package/templates/next-template/src/components/landing/index.tsx +0 -107
- package/templates/next-template/src/components/providers/index.ts +0 -1
- package/templates/next-template/src/components/providers/providers.tsx +0 -89
- package/templates/next-template/src/components/shell/index.ts +0 -1
- package/templates/next-template/src/components/shell/shell.tsx +0 -87
- package/templates/next-template/tailwind.config.js +0 -17
- package/templates/next-template/tsconfig.json +0 -27
- package/tsconfig.json +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Card, Code, Container, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from "@mantine/core";
|
|
2
|
+
import { IconBook, IconRobot, IconTerminal } from "@tabler/icons-react";
|
|
3
|
+
import { developerResources, socialLinks } from "@/app/resources/resources";
|
|
4
|
+
import { Shell } from "@/components";
|
|
5
5
|
|
|
6
6
|
export default function ResourcesPage() {
|
|
7
7
|
return (
|
|
@@ -11,11 +11,11 @@ export default function ResourcesPage() {
|
|
|
11
11
|
{/* Header */}
|
|
12
12
|
<div>
|
|
13
13
|
<Group gap="md" align="center" mb="lg">
|
|
14
|
-
<ThemeIcon size={48} radius="md"
|
|
14
|
+
<ThemeIcon size={48} radius="md" variant="outline" color="seiMaroon">
|
|
15
15
|
<IconBook size={24} />
|
|
16
16
|
</ThemeIcon>
|
|
17
17
|
<div>
|
|
18
|
-
<Title order={1} fw={700} c="
|
|
18
|
+
<Title order={1} fw={700} c="seiMaroon.9" className="sei-heading">
|
|
19
19
|
Developer Resources
|
|
20
20
|
</Title>
|
|
21
21
|
<Text size="lg" c="gray.6" mt={4}>
|
|
@@ -32,10 +32,10 @@ export default function ResourcesPage() {
|
|
|
32
32
|
📚 Documentation & Tools
|
|
33
33
|
</Title>
|
|
34
34
|
<SimpleGrid cols={{ base: 1, sm: 2, lg: 2 }} spacing="lg">
|
|
35
|
-
{developerResources.map(({ title, description, href, icon: Icon
|
|
35
|
+
{developerResources.map(({ title, description, href, icon: Icon }) => (
|
|
36
36
|
<Card key={title} withBorder radius="lg" p="xl" component="a" href={href} target="_blank" rel="noreferrer" shadow="sm">
|
|
37
37
|
<Group align="flex-start" wrap="nowrap" gap="md">
|
|
38
|
-
<ThemeIcon variant="
|
|
38
|
+
<ThemeIcon variant="outline" color="gray" size={40} radius="md">
|
|
39
39
|
<Icon size={22} />
|
|
40
40
|
</ThemeIcon>
|
|
41
41
|
<Stack gap={6} flex={1}>
|
|
@@ -63,7 +63,7 @@ export default function ResourcesPage() {
|
|
|
63
63
|
<Stack gap="lg">
|
|
64
64
|
<Stack gap="xs">
|
|
65
65
|
<Group gap="md">
|
|
66
|
-
<ThemeIcon size={40} radius="md"
|
|
66
|
+
<ThemeIcon size={40} radius="md" variant="outline" color="seiMaroon">
|
|
67
67
|
<IconRobot size={20} />
|
|
68
68
|
</ThemeIcon>
|
|
69
69
|
<Title order={4} fw={600} c="gray.9">
|
|
@@ -96,46 +96,29 @@ export default function ResourcesPage() {
|
|
|
96
96
|
</Stack>
|
|
97
97
|
</Paper>
|
|
98
98
|
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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>
|
|
99
|
+
<Card
|
|
100
|
+
withBorder
|
|
101
|
+
radius="md"
|
|
102
|
+
p="md"
|
|
103
|
+
component="a"
|
|
104
|
+
href="https://github.com/sei-protocol/sei-js/tree/main/packages/mcp-server#readme"
|
|
105
|
+
target="_blank"
|
|
106
|
+
rel="noreferrer"
|
|
107
|
+
>
|
|
108
|
+
<Group gap="sm">
|
|
109
|
+
<ThemeIcon size={32} radius="md" variant="outline" color="seiMaroon">
|
|
110
|
+
<IconBook size={16} />
|
|
111
|
+
</ThemeIcon>
|
|
112
|
+
<Stack gap={2} flex={1}>
|
|
113
|
+
<Text fw={600} size="sm" c="gray.9">
|
|
114
|
+
MCP Server Guide
|
|
115
|
+
</Text>
|
|
116
|
+
<Text size="xs" c="dimmed">
|
|
117
|
+
Setup instructions and available tools
|
|
118
|
+
</Text>
|
|
119
|
+
</Stack>
|
|
120
|
+
</Group>
|
|
121
|
+
</Card>
|
|
139
122
|
</Stack>
|
|
140
123
|
</Card>
|
|
141
124
|
</Stack>
|
|
@@ -148,10 +131,10 @@ export default function ResourcesPage() {
|
|
|
148
131
|
🌐 Community & Social
|
|
149
132
|
</Title>
|
|
150
133
|
<SimpleGrid cols={{ base: 1, sm: 2, lg: 3 }} spacing="lg">
|
|
151
|
-
{socialLinks.map(({ title, description, href, icon: Icon
|
|
134
|
+
{socialLinks.map(({ title, description, href, icon: Icon }) => (
|
|
152
135
|
<Card key={title} withBorder radius="lg" p="lg" component="a" href={href} target="_blank" rel="noreferrer" shadow="sm">
|
|
153
136
|
<Group align="flex-start" wrap="nowrap" gap="md">
|
|
154
|
-
<ThemeIcon variant="
|
|
137
|
+
<ThemeIcon variant="outline" color="gray" size={36} radius="md">
|
|
155
138
|
<Icon size={20} />
|
|
156
139
|
</ThemeIcon>
|
|
157
140
|
<Stack gap={4} flex={1}>
|
|
@@ -1,56 +1,43 @@
|
|
|
1
|
-
import { IconBook, IconBrandTelegram, IconBrandX, IconCode, IconPackage } from
|
|
1
|
+
import { IconBook, IconBrandTelegram, IconBrandX, IconCode, IconPackage } from "@tabler/icons-react";
|
|
2
2
|
|
|
3
3
|
export const developerResources = [
|
|
4
4
|
{
|
|
5
|
-
title:
|
|
6
|
-
description:
|
|
7
|
-
href:
|
|
5
|
+
title: "Sei Docs",
|
|
6
|
+
description: "Official protocol docs, guides, and references.",
|
|
7
|
+
href: "https://docs.sei.io/",
|
|
8
8
|
icon: IconBook,
|
|
9
|
-
color: 'violet',
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
14
|
-
href:
|
|
15
|
-
icon: IconBook,
|
|
16
|
-
color: 'grape',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'Wagmi',
|
|
20
|
-
description: 'React hooks for Ethereum development.',
|
|
21
|
-
href: 'https://wagmi.sh/',
|
|
11
|
+
title: "Wagmi",
|
|
12
|
+
description: "React hooks for Ethereum development.",
|
|
13
|
+
href: "https://wagmi.sh/",
|
|
22
14
|
icon: IconCode,
|
|
23
|
-
color: 'blue',
|
|
24
15
|
},
|
|
25
16
|
{
|
|
26
|
-
title:
|
|
27
|
-
description:
|
|
28
|
-
href:
|
|
17
|
+
title: "Viem",
|
|
18
|
+
description: "TypeScript interface for Ethereum.",
|
|
19
|
+
href: "https://viem.sh/",
|
|
29
20
|
icon: IconPackage,
|
|
30
|
-
color: 'green',
|
|
31
21
|
},
|
|
32
22
|
] as const;
|
|
33
23
|
|
|
34
24
|
export const socialLinks = [
|
|
35
25
|
{
|
|
36
|
-
title:
|
|
37
|
-
description:
|
|
38
|
-
href:
|
|
26
|
+
title: "Developer Telegram",
|
|
27
|
+
description: "Chat with the community and get support.",
|
|
28
|
+
href: "https://t.me/seinetwork",
|
|
39
29
|
icon: IconBrandTelegram,
|
|
40
|
-
color: 'cyan',
|
|
41
30
|
},
|
|
42
31
|
{
|
|
43
|
-
title:
|
|
44
|
-
description:
|
|
45
|
-
href:
|
|
32
|
+
title: "Sei on X",
|
|
33
|
+
description: "Follow Sei Network updates on X (Twitter).",
|
|
34
|
+
href: "https://x.com/SeiNetwork",
|
|
46
35
|
icon: IconBrandX,
|
|
47
|
-
color: 'dark',
|
|
48
36
|
},
|
|
49
37
|
{
|
|
50
|
-
title:
|
|
51
|
-
description:
|
|
52
|
-
href:
|
|
38
|
+
title: "Sei Labs on X",
|
|
39
|
+
description: "Follow Sei Labs announcements on X (Twitter).",
|
|
40
|
+
href: "https://x.com/Sei_Labs",
|
|
53
41
|
icon: IconBrandX,
|
|
54
|
-
color: 'dark',
|
|
55
42
|
},
|
|
56
43
|
] as const;
|
|
@@ -26,22 +26,19 @@ const weiBalance = await publicClient.getBalance({ address });
|
|
|
26
26
|
const seiBalance = formatEther(weiBalance);`;
|
|
27
27
|
|
|
28
28
|
export const precompileCodeExample = `// Import Sei precompiles
|
|
29
|
-
import {
|
|
29
|
+
import { BANK_PRECOMPILE_ABI, BANK_PRECOMPILE_ADDRESS } from '@sei-js/precompiles';
|
|
30
30
|
import { usePublicClient } from 'wagmi';
|
|
31
|
-
import { type ReadContractParameters } from 'viem';
|
|
32
31
|
|
|
33
32
|
// Use the hook
|
|
34
33
|
const publicClient = usePublicClient();
|
|
35
34
|
|
|
36
35
|
// Call precompile
|
|
37
|
-
const
|
|
38
|
-
abi:
|
|
36
|
+
const result = await publicClient.readContract({
|
|
37
|
+
abi: BANK_PRECOMPILE_ABI,
|
|
39
38
|
address: BANK_PRECOMPILE_ADDRESS,
|
|
40
39
|
functionName: 'supply',
|
|
41
40
|
args: ['usei']
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const result = await publicClient.readContract(readContractParams);`;
|
|
41
|
+
});`;
|
|
45
42
|
|
|
46
43
|
export const transactionCodeExample = `// Import transaction hooks
|
|
47
44
|
import { useSendTransaction, useWaitForTransactionReceipt } from 'wagmi';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { CodeHighlight } from
|
|
3
|
+
import { CodeHighlight } from "@mantine/code-highlight";
|
|
4
4
|
import {
|
|
5
5
|
ActionIcon,
|
|
6
6
|
Alert,
|
|
@@ -19,18 +19,18 @@ import {
|
|
|
19
19
|
TextInput,
|
|
20
20
|
ThemeIcon,
|
|
21
21
|
Title,
|
|
22
|
-
} from
|
|
23
|
-
import { notifications } from
|
|
24
|
-
import { IconBulb, IconChevronDown, IconChevronUp, IconCoins, IconCopy, IconLogout, IconSend, IconWallet } from
|
|
25
|
-
import { useState } from
|
|
26
|
-
import { formatEther, parseEther } from
|
|
27
|
-
import { useAccount, useDisconnect, usePublicClient, useSendTransaction, useWaitForTransactionReceipt } from
|
|
28
|
-
import { balanceCodeExample, transactionCodeExample, walletCodeExample } from
|
|
22
|
+
} from "@mantine/core";
|
|
23
|
+
import { notifications } from "@mantine/notifications";
|
|
24
|
+
import { IconBulb, IconChevronDown, IconChevronUp, IconCoins, IconCopy, IconLogout, IconSend, IconWallet } from "@tabler/icons-react";
|
|
25
|
+
import { useState } from "react";
|
|
26
|
+
import { formatEther, parseEther } from "viem";
|
|
27
|
+
import { useAccount, useDisconnect, usePublicClient, useSendTransaction, useWaitForTransactionReceipt } from "wagmi";
|
|
28
|
+
import { balanceCodeExample, transactionCodeExample, walletCodeExample } from "./examples";
|
|
29
29
|
|
|
30
30
|
function Examples() {
|
|
31
|
-
const [balance, setBalance] = useState(
|
|
32
|
-
const [recipient, setRecipient] = useState(
|
|
33
|
-
const [amount, setAmount] = useState(
|
|
31
|
+
const [balance, setBalance] = useState("");
|
|
32
|
+
const [recipient, setRecipient] = useState("");
|
|
33
|
+
const [amount, setAmount] = useState("");
|
|
34
34
|
|
|
35
35
|
// Code visibility toggles
|
|
36
36
|
const [showWalletCode, setShowWalletCode] = useState(false);
|
|
@@ -51,17 +51,17 @@ function Examples() {
|
|
|
51
51
|
try {
|
|
52
52
|
navigator.clipboard.writeText(text).then(() => {
|
|
53
53
|
notifications.show({
|
|
54
|
-
title:
|
|
55
|
-
message:
|
|
56
|
-
color:
|
|
54
|
+
title: "Copied!",
|
|
55
|
+
message: "Code copied to clipboard",
|
|
56
|
+
color: "green",
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
} catch (err) {
|
|
60
|
-
console.error(
|
|
60
|
+
console.error("Failed to copy text: ", err);
|
|
61
61
|
notifications.show({
|
|
62
|
-
title:
|
|
63
|
-
message:
|
|
64
|
-
color:
|
|
62
|
+
title: "Error",
|
|
63
|
+
message: "Failed to copy to clipboard",
|
|
64
|
+
color: "red",
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -78,9 +78,9 @@ function Examples() {
|
|
|
78
78
|
const sendSei = async () => {
|
|
79
79
|
if (!recipient || !amount) {
|
|
80
80
|
notifications.show({
|
|
81
|
-
title:
|
|
82
|
-
message:
|
|
83
|
-
color:
|
|
81
|
+
title: "Missing Information",
|
|
82
|
+
message: "Please enter recipient address and amount",
|
|
83
|
+
color: "yellow",
|
|
84
84
|
});
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
@@ -91,11 +91,11 @@ function Examples() {
|
|
|
91
91
|
value: parseEther(amount),
|
|
92
92
|
});
|
|
93
93
|
} catch (error) {
|
|
94
|
-
console.error(
|
|
94
|
+
console.error("Transaction error:", error);
|
|
95
95
|
notifications.show({
|
|
96
|
-
title:
|
|
97
|
-
message:
|
|
98
|
-
color:
|
|
96
|
+
title: "Transaction Error",
|
|
97
|
+
message: "Failed to send transaction",
|
|
98
|
+
color: "red",
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
};
|
|
@@ -106,11 +106,11 @@ function Examples() {
|
|
|
106
106
|
{/* Header */}
|
|
107
107
|
<div>
|
|
108
108
|
<Group gap="md" align="center" mb="lg">
|
|
109
|
-
<ThemeIcon size={48} radius="md"
|
|
109
|
+
<ThemeIcon size={48} radius="md" variant="outline" color="seiMaroon">
|
|
110
110
|
<IconBulb size={24} />
|
|
111
111
|
</ThemeIcon>
|
|
112
112
|
<div>
|
|
113
|
-
<Title order={1} fw={700} c="
|
|
113
|
+
<Title order={1} fw={700} c="seiMaroon.9" className="sei-heading">
|
|
114
114
|
Interactive Examples
|
|
115
115
|
</Title>
|
|
116
116
|
<Text size="lg" c="gray.6" mt={4}>
|
|
@@ -126,7 +126,7 @@ function Examples() {
|
|
|
126
126
|
<Flex justify="space-between" align="flex-start">
|
|
127
127
|
<Stack gap="xs">
|
|
128
128
|
<Group gap="md">
|
|
129
|
-
<ThemeIcon size={40} radius="md"
|
|
129
|
+
<ThemeIcon size={40} radius="md" variant="outline" color="seiMaroon">
|
|
130
130
|
<IconWallet size={20} />
|
|
131
131
|
</ThemeIcon>
|
|
132
132
|
<Title order={4} fw={600} c="gray.9">
|
|
@@ -137,7 +137,7 @@ function Examples() {
|
|
|
137
137
|
Access wallet information using Wagmi's useAccount hook
|
|
138
138
|
</Text>
|
|
139
139
|
</Stack>
|
|
140
|
-
<Badge
|
|
140
|
+
<Badge variant="outline" color="gray" size="md" radius="md">
|
|
141
141
|
address
|
|
142
142
|
</Badge>
|
|
143
143
|
</Flex>
|
|
@@ -147,11 +147,11 @@ function Examples() {
|
|
|
147
147
|
</Text>
|
|
148
148
|
<Flex justify="space-between" align="center">
|
|
149
149
|
<Code bg="white" p="xs">
|
|
150
|
-
{address ||
|
|
150
|
+
{address || "No wallet connected"}
|
|
151
151
|
</Code>
|
|
152
152
|
{isConnected && address && (
|
|
153
153
|
<Group gap="xs">
|
|
154
|
-
<ActionIcon variant="
|
|
154
|
+
<ActionIcon variant="outline" color="dark" size="sm" radius="md" onClick={() => copyToClipboard(address)} aria-label="Copy address">
|
|
155
155
|
<IconCopy size={14} />
|
|
156
156
|
</ActionIcon>
|
|
157
157
|
<ActionIcon variant="light" color="red" size="sm" radius="md" onClick={() => disconnect()} aria-label="Disconnect wallet">
|
|
@@ -171,7 +171,7 @@ function Examples() {
|
|
|
171
171
|
leftSection={showWalletCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
|
|
172
172
|
onClick={() => setShowWalletCode(!showWalletCode)}
|
|
173
173
|
>
|
|
174
|
-
{showWalletCode ?
|
|
174
|
+
{showWalletCode ? "Hide" : "View"} Implementation
|
|
175
175
|
</Button>
|
|
176
176
|
{showWalletCode && (
|
|
177
177
|
<ActionIcon variant="subtle" color="gray" size="sm" radius="md" onClick={() => copyToClipboard(walletCodeExample)}>
|
|
@@ -195,7 +195,7 @@ function Examples() {
|
|
|
195
195
|
<Flex justify="space-between" align="flex-start">
|
|
196
196
|
<Stack gap="xs">
|
|
197
197
|
<Flex align="center" gap="md">
|
|
198
|
-
<ThemeIcon size={40} radius="md"
|
|
198
|
+
<ThemeIcon size={40} radius="md" variant="outline" color="seiGold">
|
|
199
199
|
<IconCoins size={20} />
|
|
200
200
|
</ThemeIcon>
|
|
201
201
|
<Title order={3} size="h3" fw={600}>
|
|
@@ -206,7 +206,7 @@ function Examples() {
|
|
|
206
206
|
Query your wallet's SEI balance using Wagmi's usePublicClient hook
|
|
207
207
|
</Text>
|
|
208
208
|
</Stack>
|
|
209
|
-
<Badge
|
|
209
|
+
<Badge variant="outline" color="gray" size="md" radius="md">
|
|
210
210
|
balance
|
|
211
211
|
</Badge>
|
|
212
212
|
</Flex>
|
|
@@ -218,7 +218,7 @@ function Examples() {
|
|
|
218
218
|
<Flex align="baseline" gap="xs">
|
|
219
219
|
{balance ? (
|
|
220
220
|
<>
|
|
221
|
-
<Text fw={700} size="xl" c="
|
|
221
|
+
<Text fw={700} size="xl" c="seiGold.9" ff="var(--sei-font-mono)">
|
|
222
222
|
{Number.parseFloat(balance).toFixed(4)}
|
|
223
223
|
</Text>
|
|
224
224
|
<Text size="sm" c="gray.6" fw={500}>
|
|
@@ -243,11 +243,11 @@ function Examples() {
|
|
|
243
243
|
disabled={!address}
|
|
244
244
|
size="sm"
|
|
245
245
|
radius="md"
|
|
246
|
-
variant="
|
|
247
|
-
color="
|
|
246
|
+
variant="filled"
|
|
247
|
+
color="seiMaroon"
|
|
248
248
|
leftSection={<IconCoins size={14} />}
|
|
249
249
|
>
|
|
250
|
-
{balance ?
|
|
250
|
+
{balance ? "Refresh" : "Check Balance"}
|
|
251
251
|
</Button>
|
|
252
252
|
</Flex>
|
|
253
253
|
</Paper>
|
|
@@ -261,7 +261,7 @@ function Examples() {
|
|
|
261
261
|
leftSection={showBalanceCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
|
|
262
262
|
onClick={() => setShowBalanceCode(!showBalanceCode)}
|
|
263
263
|
>
|
|
264
|
-
{showBalanceCode ?
|
|
264
|
+
{showBalanceCode ? "Hide" : "View"} Implementation
|
|
265
265
|
</Button>
|
|
266
266
|
{showBalanceCode && (
|
|
267
267
|
<ActionIcon variant="subtle" color="gray" size="sm" radius="md" onClick={() => copyToClipboard(balanceCodeExample)}>
|
|
@@ -284,7 +284,7 @@ function Examples() {
|
|
|
284
284
|
<Flex direction="row" justify="space-between" align="flex-start">
|
|
285
285
|
<Stack gap="xs">
|
|
286
286
|
<Flex direction="row" align="center" gap="md" mb="md">
|
|
287
|
-
<ThemeIcon size={40} radius="md"
|
|
287
|
+
<ThemeIcon size={40} radius="md" variant="outline" color="seiMaroon">
|
|
288
288
|
<IconSend size={20} />
|
|
289
289
|
</ThemeIcon>
|
|
290
290
|
<Title order={3} size="h3" fw={600} c="gray.9">
|
|
@@ -295,7 +295,7 @@ function Examples() {
|
|
|
295
295
|
Send SEI tokens using Wagmi's transaction hooks with real-time status
|
|
296
296
|
</Text>
|
|
297
297
|
</Stack>
|
|
298
|
-
<Badge
|
|
298
|
+
<Badge variant="outline" color="gray" size="md" radius="md">
|
|
299
299
|
transfer
|
|
300
300
|
</Badge>
|
|
301
301
|
</Flex>
|
|
@@ -329,8 +329,8 @@ function Examples() {
|
|
|
329
329
|
disabled={isPending || !address || !recipient || !amount}
|
|
330
330
|
size="md"
|
|
331
331
|
radius="md"
|
|
332
|
-
variant="
|
|
333
|
-
color="
|
|
332
|
+
variant="filled"
|
|
333
|
+
color="seiMaroon"
|
|
334
334
|
px="sm"
|
|
335
335
|
>
|
|
336
336
|
{isPending ? <Loader size={16} /> : <IconSend size={16} />}
|
|
@@ -339,7 +339,7 @@ function Examples() {
|
|
|
339
339
|
</Paper>
|
|
340
340
|
|
|
341
341
|
{hash && (
|
|
342
|
-
<Alert color="
|
|
342
|
+
<Alert color="gray" variant="light" radius="md" py={4}>
|
|
343
343
|
<Stack gap={4}>
|
|
344
344
|
<Text size="xs" fw={600}>
|
|
345
345
|
Transaction Hash
|
|
@@ -377,7 +377,7 @@ function Examples() {
|
|
|
377
377
|
leftSection={showTransactionCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
|
|
378
378
|
onClick={() => setShowTransactionCode(!showTransactionCode)}
|
|
379
379
|
>
|
|
380
|
-
{showTransactionCode ?
|
|
380
|
+
{showTransactionCode ? "Hide" : "View"} Implementation
|
|
381
381
|
</Button>
|
|
382
382
|
{showTransactionCode && (
|
|
383
383
|
<ActionIcon variant="subtle" color="gray" size="sm" radius="xl" onClick={() => copyToClipboard(transactionCodeExample)}>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as Default } from
|
|
2
|
-
export { default as Landing } from
|
|
3
|
-
export { default as Shell } from
|
|
1
|
+
export { default as Default } from "./default";
|
|
2
|
+
export { default as Landing } from "./landing";
|
|
3
|
+
export { default as Shell } from "./shell";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import { Badge, Button, Card, Code, Container, Group, Stack, Text, ThemeIcon, Title } from
|
|
4
|
-
import { ConnectButton } from
|
|
5
|
-
import { IconBook, IconCode, IconRocket } from
|
|
6
|
-
import Link from
|
|
3
|
+
import { Badge, Button, Card, Code, Container, Group, Stack, Text, ThemeIcon, Title } from "@mantine/core";
|
|
4
|
+
import { ConnectButton } from "@rainbow-me/rainbowkit";
|
|
5
|
+
import { IconBook, IconCode, IconRocket } from "@tabler/icons-react";
|
|
6
|
+
import Link from "next/link";
|
|
7
|
+
|
|
8
|
+
const technologyLabels = ["Next.js 15.5", "Mantine UI", "Tailwind CSS", "Biome", "RainbowKit", "Wagmi + Viem"];
|
|
7
9
|
|
|
8
10
|
export default function Landing() {
|
|
9
11
|
return (
|
|
@@ -11,64 +13,32 @@ export default function Landing() {
|
|
|
11
13
|
<Stack gap="xl" align="center">
|
|
12
14
|
{/* Hero Section */}
|
|
13
15
|
<Stack gap="md" align="center" ta="center">
|
|
14
|
-
<Title order={1} size="h1" fw={700} c="
|
|
16
|
+
<Title order={1} size="h1" fw={700} c="seiMaroon.9" className="sei-heading">
|
|
15
17
|
Welcome to Your Sei dApp
|
|
16
18
|
</Title>
|
|
17
19
|
<Text size="lg" c="dimmed" maw={600}>
|
|
18
|
-
A production-ready starter template built with Next.js, Mantine UI, RainbowKit, Tailwind CSS, and Wagmi
|
|
19
|
-
|
|
20
|
+
A production-ready starter template built with Next.js, Mantine UI, RainbowKit, Tailwind CSS, and Wagmi. Everything you need to build and run
|
|
21
|
+
production-grade dApps on Sei.
|
|
20
22
|
</Text>
|
|
21
23
|
|
|
22
24
|
{/* Tech Stack Badges */}
|
|
23
25
|
<Group gap="xs" mt="sm">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color="violet"
|
|
30
|
-
style={{ backgroundColor: 'rgb(250 245 255)', color: 'rgb(109 40 217)', border: '1px solid rgb(196 181 253)' }}
|
|
31
|
-
>
|
|
32
|
-
Mantine UI
|
|
33
|
-
</Badge>
|
|
34
|
-
<Badge variant="light" color="cyan" style={{ backgroundColor: 'rgb(236 254 255)', color: 'rgb(14 116 144)', border: '1px solid rgb(165 243 252)' }}>
|
|
35
|
-
Tailwind CSS
|
|
36
|
-
</Badge>
|
|
37
|
-
<Badge variant="light" color="yellow" style={{ backgroundColor: 'rgb(254 249 195)', color: 'rgb(161 98 7)', border: '1px solid rgb(254 240 138)' }}>
|
|
38
|
-
Biome
|
|
39
|
-
</Badge>
|
|
40
|
-
<Badge
|
|
41
|
-
variant="light"
|
|
42
|
-
color="orange"
|
|
43
|
-
style={{ backgroundColor: 'rgb(255 247 237)', color: 'rgb(194 65 12)', border: '1px solid rgb(254 215 170)' }}
|
|
44
|
-
>
|
|
45
|
-
RainbowKit
|
|
46
|
-
</Badge>
|
|
47
|
-
<Badge variant="light" color="teal" style={{ backgroundColor: 'rgb(240 253 250)', color: 'rgb(15 118 110)', border: '1px solid rgb(153 246 228)' }}>
|
|
48
|
-
Wagmi + Viem
|
|
49
|
-
</Badge>
|
|
50
|
-
<Badge variant="light" color="dark" style={{ backgroundColor: 'rgb(249 250 251)', color: 'rgb(17 24 39)', border: '1px solid rgb(209 213 219)' }}>
|
|
51
|
-
Vercel
|
|
52
|
-
</Badge>
|
|
26
|
+
{technologyLabels.map((label) => (
|
|
27
|
+
<Badge key={label} variant="outline" color="gray">
|
|
28
|
+
{label}
|
|
29
|
+
</Badge>
|
|
30
|
+
))}
|
|
53
31
|
</Group>
|
|
54
32
|
</Stack>
|
|
55
33
|
|
|
56
34
|
{/* Primary Call to Action - Connect Wallet */}
|
|
57
|
-
<Card
|
|
58
|
-
withBorder
|
|
59
|
-
radius="xl"
|
|
60
|
-
p="xl"
|
|
61
|
-
bg="gradient-to-r from-blue-50 to-purple-50"
|
|
62
|
-
w="100%"
|
|
63
|
-
maw={600}
|
|
64
|
-
style={{ border: '2px solid var(--mantine-color-blue-2)' }}
|
|
65
|
-
>
|
|
35
|
+
<Card withBorder radius="xl" p="xl" w="100%" maw={600} bg="white" style={{ border: "2px solid var(--sei-maroon)" }}>
|
|
66
36
|
<Stack gap="lg" align="center" ta="center">
|
|
67
|
-
<ThemeIcon size={64} radius="xl"
|
|
37
|
+
<ThemeIcon size={64} radius="xl" variant="outline" color="seiMaroon">
|
|
68
38
|
<IconRocket size={32} />
|
|
69
39
|
</ThemeIcon>
|
|
70
40
|
<Stack gap="sm" align="center">
|
|
71
|
-
<Text fw={700} size="xl" c="
|
|
41
|
+
<Text fw={700} size="xl" c="seiMaroon.9" className="sei-heading">
|
|
72
42
|
Connect Your Wallet to Get Started
|
|
73
43
|
</Text>
|
|
74
44
|
<Text size="md" c="dimmed" maw={400}>
|
|
@@ -82,7 +52,7 @@ export default function Landing() {
|
|
|
82
52
|
{/* Development Tip */}
|
|
83
53
|
<Card withBorder radius="md" p="md" bg="gray.0" maw={600}>
|
|
84
54
|
<Text size="xs" c="dimmed" ta="center">
|
|
85
|
-
💡 <strong>Development Tip:</strong> Start by exploring the examples in the connected app, then customize{
|
|
55
|
+
💡 <strong>Development Tip:</strong> Start by exploring the examples in the connected app, then customize{" "}
|
|
86
56
|
<Code>src/components/default/index.tsx</Code> to build your unique dApp features.
|
|
87
57
|
</Text>
|
|
88
58
|
</Card>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Providers } from
|
|
1
|
+
export { default as Providers } from "./providers";
|