@sei-js/create-sei 0.0.3 → 0.0.4
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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +6 -0
- package/dist/main.js +1 -52
- package/dist/templates/{next-wagmi-template → next-template}/package.json +1 -1
- package/{templates/vite-wagmi-template → dist/templates/vite-template}/package.json +1 -1
- package/package.json +2 -3
- package/src/main.ts +1 -60
- package/templates/{next-wagmi-template → next-template}/package.json +1 -1
- package/{dist/templates/vite-wagmi-template → templates/vite-template}/package.json +1 -1
- package/tsconfig.json +1 -7
- package/dist/templates/next-cosmos-template/README.md +0 -60
- package/dist/templates/next-cosmos-template/next.config.mjs +0 -14
- package/dist/templates/next-cosmos-template/package.json +0 -31
- package/dist/templates/next-cosmos-template/public/next.svg +0 -1
- package/dist/templates/next-cosmos-template/public/vercel.svg +0 -1
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -168
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -154
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -83
- package/dist/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -18
- package/dist/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -35
- package/dist/templates/next-cosmos-template/src/app/components/index.ts +0 -3
- package/dist/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
- package/dist/templates/next-cosmos-template/src/app/layout.tsx +0 -21
- package/dist/templates/next-cosmos-template/src/app/page.tsx +0 -17
- package/dist/templates/next-cosmos-template/yarn.lock +0 -9814
- package/dist/templates/vite-cosmos-template/README.md +0 -72
- package/dist/templates/vite-cosmos-template/index.html +0 -16
- package/dist/templates/vite-cosmos-template/package.json +0 -35
- package/dist/templates/vite-cosmos-template/src/App.tsx +0 -15
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -168
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -154
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -77
- package/dist/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -18
- package/dist/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -41
- package/dist/templates/vite-cosmos-template/src/components/index.ts +0 -4
- package/dist/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
- package/dist/templates/vite-cosmos-template/src/index.css +0 -184
- package/dist/templates/vite-cosmos-template/vite.config.ts +0 -7
- package/dist/templates/vite-cosmos-template/yarn.lock +0 -9323
- package/templates/next-cosmos-template/.eslintrc.json +0 -3
- package/templates/next-cosmos-template/README.md +0 -60
- package/templates/next-cosmos-template/next-env.d.ts +0 -5
- package/templates/next-cosmos-template/next.config.mjs +0 -14
- package/templates/next-cosmos-template/package.json +0 -31
- package/templates/next-cosmos-template/public/next.svg +0 -1
- package/templates/next-cosmos-template/public/sei-logotype.svg +0 -15
- package/templates/next-cosmos-template/public/vercel.svg +0 -1
- package/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -168
- package/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -154
- package/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -83
- package/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -18
- package/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -35
- package/templates/next-cosmos-template/src/app/components/index.ts +0 -3
- package/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
- package/templates/next-cosmos-template/src/app/constants/index.ts +0 -1
- package/templates/next-cosmos-template/src/app/favicon.ico +0 -0
- package/templates/next-cosmos-template/src/app/index.css +0 -184
- package/templates/next-cosmos-template/src/app/layout.tsx +0 -21
- package/templates/next-cosmos-template/src/app/page.tsx +0 -17
- package/templates/next-cosmos-template/tsconfig.json +0 -26
- package/templates/next-cosmos-template/yarn.lock +0 -9814
- package/templates/next-wagmi-template/.eslintrc.json +0 -3
- package/templates/next-wagmi-template/next-env.d.ts +0 -5
- package/templates/next-wagmi-template/public/sei-logotype.svg +0 -15
- package/templates/next-wagmi-template/src/app/constants/index.ts +0 -1
- package/templates/next-wagmi-template/src/app/favicon.ico +0 -0
- package/templates/next-wagmi-template/src/app/index.css +0 -184
- package/templates/next-wagmi-template/tsconfig.json +0 -26
- package/templates/vite-cosmos-template/.eslintrc.cjs +0 -11
- package/templates/vite-cosmos-template/README.md +0 -72
- package/templates/vite-cosmos-template/favicon.ico +0 -0
- package/templates/vite-cosmos-template/index.html +0 -16
- package/templates/vite-cosmos-template/package.json +0 -35
- package/templates/vite-cosmos-template/public/sei-logotype.svg +0 -15
- package/templates/vite-cosmos-template/src/App.tsx +0 -15
- package/templates/vite-cosmos-template/src/assets/react.svg +0 -1
- package/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -168
- package/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -154
- package/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -77
- package/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -18
- package/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -41
- package/templates/vite-cosmos-template/src/components/index.ts +0 -4
- package/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
- package/templates/vite-cosmos-template/src/constants/index.ts +0 -1
- package/templates/vite-cosmos-template/src/index.css +0 -184
- package/templates/vite-cosmos-template/src/main.tsx +0 -12
- package/templates/vite-cosmos-template/src/vite-env.d.ts +0 -1
- package/templates/vite-cosmos-template/tsconfig.app.json +0 -25
- package/templates/vite-cosmos-template/tsconfig.json +0 -11
- package/templates/vite-cosmos-template/tsconfig.node.json +0 -14
- package/templates/vite-cosmos-template/vite.config.ts +0 -7
- package/templates/vite-cosmos-template/yarn.lock +0 -9323
- package/templates/vite-wagmi-template/.eslintrc.cjs +0 -11
- package/templates/vite-wagmi-template/favicon.ico +0 -0
- package/templates/vite-wagmi-template/public/sei-logotype.svg +0 -15
- package/templates/vite-wagmi-template/src/assets/react.svg +0 -1
- package/templates/vite-wagmi-template/src/constants/index.ts +0 -1
- package/templates/vite-wagmi-template/src/main.tsx +0 -12
- package/templates/vite-wagmi-template/src/vite-env.d.ts +0 -1
- package/templates/vite-wagmi-template/tsconfig.app.json +0 -25
- package/templates/vite-wagmi-template/tsconfig.json +0 -11
- package/templates/vite-wagmi-template/tsconfig.node.json +0 -14
- /package/dist/templates/{next-cosmos-template → next-template}/.eslintrc.json +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/README.md +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/next-env.d.ts +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/next.config.mjs +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/public/sei-logotype.svg +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Examples.tsx +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.css +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.tsx +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/components/Web3Provider.tsx +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/components/index.ts +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/constants/chain.ts +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/src/app/constants/index.ts +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/src/app/favicon.ico +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/src/app/index.css +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/layout.tsx +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/src/app/page.tsx +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/tsconfig.json +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/yarn.lock +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/.eslintrc.cjs +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/README.md +0 -0
- /package/dist/templates/{next-wagmi-template/src/app → vite-template}/favicon.ico +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/index.html +0 -0
- /package/dist/templates/{next-wagmi-template → vite-template}/public/sei-logotype.svg +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/App.tsx +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/src/assets/react.svg +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Examples.tsx +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Homepage.css +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Homepage.tsx +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/components/Web3Provider.tsx +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/constants/chain.ts +0 -0
- /package/dist/templates/{next-wagmi-template/src/app → vite-template/src}/constants/index.ts +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/src/index.css +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/src/main.tsx +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/src/vite-env.d.ts +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/tsconfig.app.json +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/tsconfig.json +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/tsconfig.node.json +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/vite.config.ts +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/yarn.lock +0 -0
- /package/{dist/templates/next-wagmi-template → templates/next-template}/.eslintrc.json +0 -0
- /package/templates/{next-wagmi-template → next-template}/README.md +0 -0
- /package/{dist/templates/next-wagmi-template → templates/next-template}/next-env.d.ts +0 -0
- /package/templates/{next-wagmi-template → next-template}/next.config.mjs +0 -0
- /package/{dist/templates/vite-cosmos-template → templates/next-template}/public/sei-logotype.svg +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Examples.tsx +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.css +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.tsx +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/components/Web3Provider.tsx +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/components/index.ts +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/constants/chain.ts +0 -0
- /package/{dist/templates/vite-cosmos-template/src → templates/next-template/src/app}/constants/index.ts +0 -0
- /package/{dist/templates/vite-cosmos-template → templates/next-template/src/app}/favicon.ico +0 -0
- /package/{dist/templates/next-wagmi-template → templates/next-template}/src/app/index.css +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/layout.tsx +0 -0
- /package/templates/{next-wagmi-template → next-template}/src/app/page.tsx +0 -0
- /package/{dist/templates/next-wagmi-template → templates/next-template}/tsconfig.json +0 -0
- /package/templates/{next-wagmi-template → next-template}/yarn.lock +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/.eslintrc.cjs +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/README.md +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/favicon.ico +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/index.html +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/public/sei-logotype.svg +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/App.tsx +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/assets/react.svg +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Examples.tsx +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Homepage.css +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/components/Homepage/Homepage.tsx +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/components/Web3Provider.tsx +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/constants/chain.ts +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/constants/index.ts +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/src/index.css +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/main.tsx +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/vite-env.d.ts +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/tsconfig.app.json +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/tsconfig.json +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/tsconfig.node.json +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/vite.config.ts +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/yarn.lock +0 -0
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
#root {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
min-height: 100vh;
|
|
5
|
-
}
|
|
6
|
-
.app {
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.logo {
|
|
12
|
-
width: 20%;
|
|
13
|
-
align-self: center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.container {
|
|
17
|
-
margin: 0 auto;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: 3rem;
|
|
21
|
-
width: 100%;
|
|
22
|
-
padding: 1rem;
|
|
23
|
-
height: -webkit-fill-available;
|
|
24
|
-
flex-grow: 1;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.grid {
|
|
29
|
-
width: 100%;
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-template-columns: repeat(1, 1fr);
|
|
32
|
-
gap: 1rem;
|
|
33
|
-
}
|
|
34
|
-
.grid.docs {
|
|
35
|
-
grid-template-columns: repeat(1, 1fr);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.card {
|
|
39
|
-
width: 100%;
|
|
40
|
-
padding: 1.5em;
|
|
41
|
-
border-radius: 1rem;
|
|
42
|
-
background: var(--card);
|
|
43
|
-
color: var(--card-foreground);
|
|
44
|
-
box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.09);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.card.secondary {
|
|
48
|
-
background: transparent;
|
|
49
|
-
border: 1px solid var(--border);
|
|
50
|
-
box-shadow: none;
|
|
51
|
-
}
|
|
52
|
-
.card.intro {
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
gap: 1rem;
|
|
56
|
-
justify-content: space-between;
|
|
57
|
-
align-items: flex-start;
|
|
58
|
-
}
|
|
59
|
-
.card-header {
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
justify-content: space-between;
|
|
63
|
-
gap: 0.25rem;
|
|
64
|
-
}
|
|
65
|
-
.card-body {
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
justify-content: space-between;
|
|
69
|
-
margin: 1.5rem 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.card-footer {
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: row;
|
|
75
|
-
gap: 0.5rem;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.card__title {
|
|
79
|
-
font-size: 1.15rem;
|
|
80
|
-
font-weight: 600;
|
|
81
|
-
}
|
|
82
|
-
.content-background {
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
background: #fafaf9;
|
|
85
|
-
border-radius: 4rem;
|
|
86
|
-
padding: 0 1rem;
|
|
87
|
-
height: 3.5rem;
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.wallet-address {
|
|
93
|
-
text-wrap: anywhere;
|
|
94
|
-
line-break: anywhere;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.space-between {
|
|
98
|
-
justify-content: space-between;
|
|
99
|
-
gap: 1rem;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.hide-on-mobile {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.hide-on-desktop {
|
|
107
|
-
display: block;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.external-link {
|
|
111
|
-
display: inline-flex;
|
|
112
|
-
gap: 0.25rem;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.get-started {
|
|
116
|
-
text-align: center;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.wallet-connect {
|
|
120
|
-
display: flex;
|
|
121
|
-
gap: 1rem;
|
|
122
|
-
align-items: center;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
@media (min-width: 768px) {
|
|
126
|
-
.card.intro {
|
|
127
|
-
grid-column: span 2;
|
|
128
|
-
flex-direction: row;
|
|
129
|
-
align-items: center;
|
|
130
|
-
}
|
|
131
|
-
.hide-on-mobile {
|
|
132
|
-
display: block;
|
|
133
|
-
}
|
|
134
|
-
.hide-on-desktop {
|
|
135
|
-
display: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.container {
|
|
139
|
-
max-width: 96rem;
|
|
140
|
-
padding: 2rem;
|
|
141
|
-
}
|
|
142
|
-
.grid {
|
|
143
|
-
grid-template-columns: repeat(3, 1fr);
|
|
144
|
-
}
|
|
145
|
-
.grid.docs {
|
|
146
|
-
grid-template-columns: repeat(3, 1fr);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
@media (min-width: 1024px) {
|
|
151
|
-
.container {
|
|
152
|
-
max-width: 80rem;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import './Homepage.css';
|
|
2
|
-
import Examples from './Examples';
|
|
3
|
-
import { selectedChain } from '../../constants';
|
|
4
|
-
import { WalletConnectButton } from '..';
|
|
5
|
-
|
|
6
|
-
type HelpItem = {
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
link: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const renderHelpItem = ({ title, description, link }: HelpItem) => (
|
|
13
|
-
<div className="card secondary">
|
|
14
|
-
<div className="card-header">
|
|
15
|
-
<p className="card__title">
|
|
16
|
-
<a href={link} target="_blank" rel="noopener noreferrer" className="external-link">
|
|
17
|
-
{title} {externalIcon}
|
|
18
|
-
</a>
|
|
19
|
-
</p>
|
|
20
|
-
<small className="card__description">{description}</small>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const helpItems: HelpItem[] = [
|
|
26
|
-
{
|
|
27
|
-
title: 'Sei Docs',
|
|
28
|
-
description: 'Find in-depth information about Sei.',
|
|
29
|
-
link: 'https://docs.sei.io/'
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: 'CosmosKit',
|
|
33
|
-
description: "Learn about CosmosKit and it's hooks for chain interaction.",
|
|
34
|
-
link: 'https://hyperweb.io/stack/cosmos-kit'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: 'sei-js',
|
|
38
|
-
description: 'Interact with Sei using @sei-js/cosmjs.',
|
|
39
|
-
link: 'https://sei-protocol.github.io/sei-js/modules/cosmjs.html'
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
const externalIcon = (
|
|
44
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
-
<path
|
|
46
|
-
d="M12 8.66667V12.6667C12 13.0203 11.8595 13.3594 11.6095 13.6095C11.3594 13.8595 11.0203 14 10.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H7.33333"
|
|
47
|
-
stroke="#9F1239"
|
|
48
|
-
strokeWidth="1.33333"
|
|
49
|
-
strokeLinecap="round"
|
|
50
|
-
strokeLinejoin="round"
|
|
51
|
-
/>
|
|
52
|
-
<path d="M10 2H14V6" stroke="#9F1239" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round" />
|
|
53
|
-
<path d="M6.66663 9.33333L14 2" stroke="#9F1239" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round" />
|
|
54
|
-
</svg>
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
export function Homepage() {
|
|
58
|
-
return (
|
|
59
|
-
<div className="container">
|
|
60
|
-
<img src="sei-logotype.svg" className="logo" alt="SEI logotype" />
|
|
61
|
-
<div className="card intro">
|
|
62
|
-
<div className="card-header">
|
|
63
|
-
<p className="card__title">Wallet address</p>
|
|
64
|
-
<small className="card__description">Connect wallet to see your address and balance</small>
|
|
65
|
-
</div>
|
|
66
|
-
<WalletConnectButton />
|
|
67
|
-
</div>
|
|
68
|
-
<Examples chainId={selectedChain.chain_id} />
|
|
69
|
-
<div className="get-started">
|
|
70
|
-
Get started by editing <code>src/App.tsx</code>
|
|
71
|
-
</div>
|
|
72
|
-
<div className="grid docs">{helpItems.map((item, _) => renderHelpItem(item))}</div>
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export default Homepage;
|
package/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useChain } from '@cosmos-kit/react';
|
|
2
|
-
|
|
3
|
-
import '@interchain-ui/react/styles';
|
|
4
|
-
|
|
5
|
-
import { truncateSeiAddress } from '@sei-js/cosmjs';
|
|
6
|
-
import { selectedChain } from '../../constants';
|
|
7
|
-
|
|
8
|
-
export function WalletConnectButton() {
|
|
9
|
-
const { isWalletConnected, address, connect, openView } = useChain(selectedChain.chain_name);
|
|
10
|
-
|
|
11
|
-
const truncatedSeiAddr = address ? truncateSeiAddress(address) : '';
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<button className="primary" onClick={isWalletConnected ? openView : connect}>
|
|
15
|
-
{isWalletConnected ? truncateSeiAddress(truncatedSeiAddr) : 'Connect'}
|
|
16
|
-
</button>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import { Buffer } from 'buffer';
|
|
5
|
-
|
|
6
|
-
import { ChainProvider } from '@cosmos-kit/react';
|
|
7
|
-
import { COSMOS_KIT_ASSET_LIST } from '@sei-js/cosmjs';
|
|
8
|
-
import { wallets as finWallets } from '@cosmos-kit/fin';
|
|
9
|
-
import { wallets as keplrWallets } from '@cosmos-kit/keplr';
|
|
10
|
-
import { CompassExtensionWallet, compassExtensionInfo } from '@cosmos-kit/compass-extension';
|
|
11
|
-
import { selectedChain } from '../constants';
|
|
12
|
-
|
|
13
|
-
interface Web3ProviderProps {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const compassWallet = new CompassExtensionWallet({
|
|
18
|
-
...compassExtensionInfo,
|
|
19
|
-
mobileDisabled: false
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
function Web3Provider({ children }: Web3ProviderProps) {
|
|
23
|
-
// Buffer polyfill
|
|
24
|
-
if (typeof window !== 'undefined') {
|
|
25
|
-
window.Buffer = window.Buffer ?? Buffer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Define your supported wallets here
|
|
29
|
-
const wallets = [compassWallet, ...finWallets, ...keplrWallets];
|
|
30
|
-
|
|
31
|
-
// Define the list of sei chain you would like to connect to here.
|
|
32
|
-
const chains = [selectedChain];
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<ChainProvider chains={chains} assetLists={[COSMOS_KIT_ASSET_LIST]} wallets={wallets}>
|
|
36
|
-
{children}
|
|
37
|
-
</ChainProvider>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default Web3Provider;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ARCTIC_1_SEI_COSMOS_KIT_CHAIN, ATLANTIC_2_SEI_COSMOS_KIT_CHAIN, PACIFIC_1_SEI_COSMOS_KIT_CHAIN } from '@sei-js/cosmjs';
|
|
2
|
-
|
|
3
|
-
export type Urls = {
|
|
4
|
-
rpc: string;
|
|
5
|
-
rest: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const defaultUrls: { [chainName: string]: Urls } = {
|
|
9
|
-
[PACIFIC_1_SEI_COSMOS_KIT_CHAIN.chain_id]: { rpc: 'https://rpc.sei-apis.com', rest: 'https://rest-arctic-1.sei-apis.com' },
|
|
10
|
-
[ATLANTIC_2_SEI_COSMOS_KIT_CHAIN.chain_id]: { rpc: 'https://rpc-testnet.sei-apis.com', rest: 'https://rest-testnet.sei-apis.com' },
|
|
11
|
-
[ARCTIC_1_SEI_COSMOS_KIT_CHAIN.chain_id]: { rpc: 'https://rpc-arctic-1.sei-apis.com', rest: 'https://rest-arctic-1.sei-apis.com' }
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// Set your selected chain here
|
|
15
|
-
// To point to mainnet, use PACIFIC_1_SEI_COSMOS_KIT_CHAIN
|
|
16
|
-
export const selectedChain = ARCTIC_1_SEI_COSMOS_KIT_CHAIN;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './chain';
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
1. Use a more-intuitive box-sizing model.
|
|
3
|
-
*/
|
|
4
|
-
*,
|
|
5
|
-
*::before,
|
|
6
|
-
*::after {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
/*
|
|
10
|
-
2. Remove default margin
|
|
11
|
-
*/
|
|
12
|
-
* {
|
|
13
|
-
margin: 0;
|
|
14
|
-
}
|
|
15
|
-
/*
|
|
16
|
-
Typographic tweaks!
|
|
17
|
-
3. Add accessible line-height
|
|
18
|
-
4. Improve text rendering
|
|
19
|
-
*/
|
|
20
|
-
body {
|
|
21
|
-
line-height: 1.5;
|
|
22
|
-
-webkit-font-smoothing: antialiased;
|
|
23
|
-
}
|
|
24
|
-
/*
|
|
25
|
-
5. Improve media defaults
|
|
26
|
-
*/
|
|
27
|
-
img,
|
|
28
|
-
picture,
|
|
29
|
-
video,
|
|
30
|
-
canvas,
|
|
31
|
-
svg {
|
|
32
|
-
display: block;
|
|
33
|
-
max-width: 100%;
|
|
34
|
-
}
|
|
35
|
-
/*
|
|
36
|
-
6. Remove built-in form typography styles
|
|
37
|
-
*/
|
|
38
|
-
input,
|
|
39
|
-
button,
|
|
40
|
-
textarea,
|
|
41
|
-
select {
|
|
42
|
-
font: inherit;
|
|
43
|
-
}
|
|
44
|
-
/*
|
|
45
|
-
7. Avoid text overflows
|
|
46
|
-
*/
|
|
47
|
-
p,
|
|
48
|
-
h1,
|
|
49
|
-
h2,
|
|
50
|
-
h3,
|
|
51
|
-
h4,
|
|
52
|
-
h5,
|
|
53
|
-
h6 {
|
|
54
|
-
overflow-wrap: break-word;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
}
|
|
57
|
-
/*
|
|
58
|
-
8. Create a root stacking context
|
|
59
|
-
*/
|
|
60
|
-
#root,
|
|
61
|
-
#__next {
|
|
62
|
-
isolation: isolate;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:root {
|
|
66
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
67
|
-
line-height: 1.5;
|
|
68
|
-
font-weight: 400;
|
|
69
|
-
|
|
70
|
-
color-scheme: light dark;
|
|
71
|
-
color: #000;
|
|
72
|
-
background: var(--background);
|
|
73
|
-
|
|
74
|
-
font-synthesis: none;
|
|
75
|
-
text-rendering: optimizeLegibility;
|
|
76
|
-
-webkit-font-smoothing: antialiased;
|
|
77
|
-
-moz-osx-font-smoothing: grayscale;
|
|
78
|
-
|
|
79
|
-
--primary-color: #9f1239;
|
|
80
|
-
--primary-color-hover: #7f0a2e;
|
|
81
|
-
--background: linear-gradient(180deg, #f5f5f4 0%, #fff 100%);
|
|
82
|
-
--border: #d6d3d1;
|
|
83
|
-
--card: #fff;
|
|
84
|
-
--card-foreground: #242424;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
a {
|
|
88
|
-
font-weight: 500;
|
|
89
|
-
color: var(--primary-color);
|
|
90
|
-
text-decoration: inherit;
|
|
91
|
-
}
|
|
92
|
-
a:hover {
|
|
93
|
-
color: var(--primary-color-hover);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
body {
|
|
97
|
-
margin: 0;
|
|
98
|
-
padding: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
h1 {
|
|
102
|
-
font-size: 3.2em;
|
|
103
|
-
line-height: 1;
|
|
104
|
-
}
|
|
105
|
-
code {
|
|
106
|
-
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
107
|
-
display: inline-flex;
|
|
108
|
-
border-radius: 4px;
|
|
109
|
-
padding: 0.1rem 0.4rem;
|
|
110
|
-
background-color: #d7cccc;
|
|
111
|
-
color: var(--card-foreground);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
button {
|
|
115
|
-
border-radius: 4rem;
|
|
116
|
-
border: 1px solid transparent;
|
|
117
|
-
padding: 0.6em 1.2em;
|
|
118
|
-
font-size: 1em;
|
|
119
|
-
font-weight: 500;
|
|
120
|
-
font-family: inherit;
|
|
121
|
-
background-color: #cec9c1;
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
transition: all 0.25s ease;
|
|
124
|
-
color: black;
|
|
125
|
-
}
|
|
126
|
-
button:hover {
|
|
127
|
-
background-color: #b5afa7;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
button:disabled {
|
|
131
|
-
filter: grayscale(1) opacity(0.5);
|
|
132
|
-
color: rgb(56, 55, 55);
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
button.primary {
|
|
137
|
-
background-color: var(--primary-color);
|
|
138
|
-
color: #fff;
|
|
139
|
-
}
|
|
140
|
-
button.outline {
|
|
141
|
-
background-color: transparent;
|
|
142
|
-
border: 1px solid var(--border);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
button.primary:hover {
|
|
146
|
-
background-color: var(--primary-color-hover);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
button.secondary {
|
|
150
|
-
background-color: #000;
|
|
151
|
-
color: #fff;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
button.secondary:hover {
|
|
155
|
-
background-color: #2b2b2b;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
button:active {
|
|
159
|
-
transform: translateY(1px);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
button.small {
|
|
163
|
-
padding: 0.4em 0.8em;
|
|
164
|
-
font-size: 0.8em;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
button:focus-visible {
|
|
168
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
169
|
-
outline-offset: 4px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.header {
|
|
173
|
-
width: 100%;
|
|
174
|
-
height: 4rem;
|
|
175
|
-
padding: 0 1%;
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
justify-content: right;
|
|
179
|
-
background-color: transparent;
|
|
180
|
-
border-bottom: 1px solid var(--border);
|
|
181
|
-
position: sticky;
|
|
182
|
-
top: 0;
|
|
183
|
-
background: #f5f5f4;
|
|
184
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import App from './App.tsx';
|
|
4
|
-
import Web3Provider from './components/Web3Provider.tsx';
|
|
5
|
-
|
|
6
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
7
|
-
<React.StrictMode>
|
|
8
|
-
<Web3Provider>
|
|
9
|
-
<App />
|
|
10
|
-
</Web3Provider>
|
|
11
|
-
</React.StrictMode>
|
|
12
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"useDefineForClassFields": true,
|
|
7
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"allowImportingTsExtensions": true,
|
|
13
|
-
"resolveJsonModule": true,
|
|
14
|
-
"isolatedModules": true,
|
|
15
|
-
"moduleDetection": "force",
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"jsx": "react-jsx",
|
|
18
|
-
|
|
19
|
-
"strict": true,
|
|
20
|
-
"noUnusedLocals": true,
|
|
21
|
-
"noUnusedParameters": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true
|
|
23
|
-
},
|
|
24
|
-
"include": ["src"]
|
|
25
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"skipLibCheck": true,
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"allowImportingTsExtensions": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noEmit": true
|
|
12
|
-
},
|
|
13
|
-
"include": ["vite.config.ts"]
|
|
14
|
-
}
|