@jerydam/lumina-sdk 0.1.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/BUTTON_FIXES.md +59 -0
- package/DOCS_INDEX.md +332 -0
- package/DOCUMENTATION.md +252 -0
- package/DOCUMENTATION_BUILD_SUMMARY.md +376 -0
- package/DOCUMENTATION_COMPLETE.md +311 -0
- package/FEATURES.md +333 -0
- package/Lumina-sdk/src/components/lumina-provider.tsx +46 -0
- package/Lumina-sdk/src/components/transaction-confirm.tsx +242 -0
- package/Lumina-sdk/src/components/wallet-display.tsx +157 -0
- package/Lumina-sdk/src/components/wallet-login.tsx +163 -0
- package/Lumina-sdk/src/hooks/use-mobile.ts +19 -0
- package/Lumina-sdk/src/hooks/use-toast.ts +191 -0
- package/Lumina-sdk/src/index.ts +0 -0
- package/Lumina-sdk/src/lib/api.ts +66 -0
- package/Lumina-sdk/src/lib/utils.ts +6 -0
- package/Lumina-sdk/src/package.json +42 -0
- package/Lumina-sdk/src/tsconfig.json +19 -0
- package/NEW_FILES_MANIFEST.txt +146 -0
- package/README.md +298 -0
- package/app/dashboard/analytics/page.tsx +218 -0
- package/app/dashboard/api-keys/page.tsx +260 -0
- package/app/dashboard/billing/page.tsx +412 -0
- package/app/dashboard/integration/page.tsx +185 -0
- package/app/dashboard/layout.tsx +18 -0
- package/app/dashboard/page.tsx +244 -0
- package/app/dashboard/settings/page.tsx +285 -0
- package/app/dashboard/users/page.tsx +148 -0
- package/app/docs/api/authentication/page.tsx +246 -0
- package/app/docs/api/endpoints/page.tsx +397 -0
- package/app/docs/api/errors/page.tsx +305 -0
- package/app/docs/api/overview/page.tsx +306 -0
- package/app/docs/examples/basic-setup/page.tsx +256 -0
- package/app/docs/examples/multi-chain/page.tsx +331 -0
- package/app/docs/examples/nextjs-full-stack/page.tsx +332 -0
- package/app/docs/getting-started/environment-setup/page.tsx +243 -0
- package/app/docs/getting-started/installation/page.tsx +187 -0
- package/app/docs/getting-started/introduction/page.tsx +178 -0
- package/app/docs/getting-started/quick-start/page.tsx +199 -0
- package/app/docs/guides/nextjs/page.tsx +358 -0
- package/app/docs/guides/react/page.tsx +230 -0
- package/app/docs/guides/security/page.tsx +284 -0
- package/app/docs/layout.tsx +32 -0
- package/app/docs/page.tsx +180 -0
- package/app/docs/sdk/lumina-provider/page.tsx +186 -0
- package/app/docs/sdk/transaction-confirm/page.tsx +331 -0
- package/app/docs/sdk/wallet-display/page.tsx +224 -0
- package/app/docs/sdk/wallet-login/page.tsx +207 -0
- package/app/docs/troubleshooting/common-issues/page.tsx +301 -0
- package/app/docs/troubleshooting/faq/page.tsx +105 -0
- package/app/globals.css +125 -0
- package/app/invite/[token]/page.tsx +78 -0
- package/app/layout.tsx +36 -0
- package/app/login/page.tsx +175 -0
- package/app/page.tsx +336 -0
- package/app/sdk-demo/page.tsx +239 -0
- package/components/dashboard-sidebar.tsx +113 -0
- package/components/docs/breadcrumb.tsx +51 -0
- package/components/docs/callout.tsx +53 -0
- package/components/docs/code-block.tsx +77 -0
- package/components/docs/docs-sidebar.tsx +214 -0
- package/components/docs/table-of-contents.tsx +83 -0
- package/components/sdk/lumina-provider.tsx +46 -0
- package/components/sdk/transaction-confirm.tsx +242 -0
- package/components/sdk/wallet-display.tsx +157 -0
- package/components/sdk/wallet-login.tsx +163 -0
- package/components/theme-provider.tsx +11 -0
- package/components/ui/accordion.tsx +66 -0
- package/components/ui/alert-dialog.tsx +157 -0
- package/components/ui/alert.tsx +66 -0
- package/components/ui/aspect-ratio.tsx +11 -0
- package/components/ui/avatar.tsx +53 -0
- package/components/ui/badge.tsx +46 -0
- package/components/ui/breadcrumb.tsx +109 -0
- package/components/ui/button-group.tsx +83 -0
- package/components/ui/button.tsx +60 -0
- package/components/ui/calendar.tsx +213 -0
- package/components/ui/card.tsx +92 -0
- package/components/ui/carousel.tsx +241 -0
- package/components/ui/chart.tsx +351 -0
- package/components/ui/checkbox.tsx +32 -0
- package/components/ui/collapsible.tsx +33 -0
- package/components/ui/command.tsx +184 -0
- package/components/ui/context-menu.tsx +252 -0
- package/components/ui/dialog.tsx +143 -0
- package/components/ui/drawer.tsx +135 -0
- package/components/ui/dropdown-menu.tsx +257 -0
- package/components/ui/empty.tsx +104 -0
- package/components/ui/field.tsx +244 -0
- package/components/ui/form.tsx +167 -0
- package/components/ui/hover-card.tsx +44 -0
- package/components/ui/input-group.tsx +169 -0
- package/components/ui/input-otp.tsx +77 -0
- package/components/ui/input.tsx +21 -0
- package/components/ui/item.tsx +193 -0
- package/components/ui/kbd.tsx +28 -0
- package/components/ui/label.tsx +24 -0
- package/components/ui/menubar.tsx +276 -0
- package/components/ui/navigation-menu.tsx +166 -0
- package/components/ui/pagination.tsx +127 -0
- package/components/ui/popover.tsx +48 -0
- package/components/ui/progress.tsx +31 -0
- package/components/ui/radio-group.tsx +45 -0
- package/components/ui/resizable.tsx +56 -0
- package/components/ui/scroll-area.tsx +58 -0
- package/components/ui/select.tsx +185 -0
- package/components/ui/separator.tsx +28 -0
- package/components/ui/sheet.tsx +139 -0
- package/components/ui/sidebar.tsx +726 -0
- package/components/ui/skeleton.tsx +13 -0
- package/components/ui/slider.tsx +59 -0
- package/components/ui/sonner.tsx +25 -0
- package/components/ui/spinner.tsx +16 -0
- package/components/ui/switch.tsx +29 -0
- package/components/ui/table.tsx +116 -0
- package/components/ui/tabs.tsx +66 -0
- package/components/ui/textarea.tsx +18 -0
- package/components/ui/toast.tsx +129 -0
- package/components/ui/toaster.tsx +35 -0
- package/components/ui/toggle-group.tsx +73 -0
- package/components/ui/toggle.tsx +47 -0
- package/components/ui/tooltip.tsx +61 -0
- package/components/ui/use-mobile.tsx +19 -0
- package/components/ui/use-toast.ts +191 -0
- package/components.json +21 -0
- package/hooks/use-mobile.ts +19 -0
- package/hooks/use-toast.ts +191 -0
- package/lib/api.ts +66 -0
- package/lib/utils.ts +6 -0
- package/next-env.d.ts +6 -0
- package/next.config.mjs +11 -0
- package/package.json +73 -0
- package/pnpm-workspace.yaml +5 -0
- package/postcss.config.mjs +8 -0
- package/public/apple-icon.png +0 -0
- package/public/fav.jpeg +0 -0
- package/public/fav.png +0 -0
- package/public/icon-dark-32x32.png +0 -0
- package/public/icon-light-32x32.png +0 -0
- package/public/icon.png +0 -0
- package/public/icon.svg +26 -0
- package/public/logo.jpeg +0 -0
- package/public/logo.png +0 -0
- package/public/logo2.jpeg +0 -0
- package/public/logo2.png +0 -0
- package/public/placeholder-logo.png +0 -0
- package/public/placeholder-logo.svg +1 -0
- package/public/placeholder-user.jpg +0 -0
- package/public/placeholder.jpg +0 -0
- package/public/placeholder.svg +1 -0
- package/styles/globals.css +209 -0
- package/tailwind.config.ts +15 -0
- package/tsconfig.json +41 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Breadcrumb } from '@/components/docs/breadcrumb'
|
|
4
|
+
import { TableOfContents } from '@/components/docs/table-of-contents'
|
|
5
|
+
import { CodeBlock } from '@/components/docs/code-block'
|
|
6
|
+
import { Callout } from '@/components/docs/callout'
|
|
7
|
+
|
|
8
|
+
export default function EnvironmentSetupPage() {
|
|
9
|
+
const headings = [
|
|
10
|
+
{ id: 'overview', level: 2, text: 'Overview' },
|
|
11
|
+
{ id: 'api-keys', level: 2, text: 'API Keys & Credentials' },
|
|
12
|
+
{ id: 'environment-variables', level: 2, text: 'Environment Variables' },
|
|
13
|
+
{ id: 'testnet-setup', level: 2, text: 'Testnet Configuration' },
|
|
14
|
+
{ id: 'production-setup', level: 2, text: 'Production Setup' },
|
|
15
|
+
{ id: 'verification', level: 2, text: 'Verify Your Setup' },
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="flex gap-8 max-w-7xl mx-auto px-4 py-8">
|
|
20
|
+
<main className="flex-1 min-w-0">
|
|
21
|
+
<Breadcrumb
|
|
22
|
+
items={[
|
|
23
|
+
{ label: 'Docs', href: '/docs' },
|
|
24
|
+
{ label: 'Getting Started', href: '/docs/getting-started/introduction' },
|
|
25
|
+
{ label: 'Environment Setup' },
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<div className="mt-8 prose prose-invert max-w-none">
|
|
30
|
+
<h1>Environment Setup</h1>
|
|
31
|
+
|
|
32
|
+
<p className="text-lg text-foreground/80">
|
|
33
|
+
Learn how to configure your development and production environments for Lumina wallet integration.
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<h2 id="overview">Overview</h2>
|
|
37
|
+
<p>
|
|
38
|
+
Before you start building with Lumina, you need to set up your environment with the necessary API keys and environment variables. This guide covers both development and production configurations.
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<Callout type="info">
|
|
42
|
+
It typically takes 5-10 minutes to complete the environment setup. Have your Lumina dashboard open.
|
|
43
|
+
</Callout>
|
|
44
|
+
|
|
45
|
+
<h2 id="api-keys">API Keys & Credentials</h2>
|
|
46
|
+
|
|
47
|
+
<p>
|
|
48
|
+
You'll need two types of credentials from your Lumina dashboard:
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<h3>1. Public API Key (publishable_key)</h3>
|
|
52
|
+
<p>
|
|
53
|
+
Used on the client-side for initializing the Lumina provider. Safe to expose in frontend code.
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
<CodeBlock
|
|
57
|
+
code={`// Get your public key from the dashboard
|
|
58
|
+
const publicKey = "pk_live_abc123def456..."`}
|
|
59
|
+
language="javascript"
|
|
60
|
+
title="Public Key"
|
|
61
|
+
/>
|
|
62
|
+
|
|
63
|
+
<h3>2. Secret API Key (secret_key)</h3>
|
|
64
|
+
<p>
|
|
65
|
+
Used for server-side operations. <strong>Never expose this in client-side code.</strong>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<CodeBlock
|
|
69
|
+
code={`// Keep this in environment variables only
|
|
70
|
+
const secretKey = "sk_live_xyz789uvw012..."`}
|
|
71
|
+
language="javascript"
|
|
72
|
+
title="Secret Key"
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
<Callout type="warning">
|
|
76
|
+
Your secret API key has full access to your account. Never commit it to version control or expose it in frontend code.
|
|
77
|
+
</Callout>
|
|
78
|
+
|
|
79
|
+
<h2 id="environment-variables">Environment Variables</h2>
|
|
80
|
+
|
|
81
|
+
<p>
|
|
82
|
+
Create a <code>.env.local</code> file in your project root with your credentials:
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
<CodeBlock
|
|
86
|
+
code={`# Public key (safe to expose)
|
|
87
|
+
NEXT_PUBLIC_LUMINA_PUBLIC_KEY=pk_live_abc123def456...
|
|
88
|
+
|
|
89
|
+
# Secret key (server-side only)
|
|
90
|
+
LUMINA_SECRET_KEY=sk_live_xyz789uvw012...
|
|
91
|
+
|
|
92
|
+
# API endpoint
|
|
93
|
+
NEXT_PUBLIC_LUMINA_API_URL=https://api.lumina.dev
|
|
94
|
+
|
|
95
|
+
# Optional: Webhook secret for securing webhook events
|
|
96
|
+
LUMINA_WEBHOOK_SECRET=whsec_abc123...`}
|
|
97
|
+
language="bash"
|
|
98
|
+
title=".env.local"
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
<h3>For Next.js Projects</h3>
|
|
102
|
+
<CodeBlock
|
|
103
|
+
code={`// pages/api/lumina-config.ts
|
|
104
|
+
export default function handler(req, res) {
|
|
105
|
+
// Public key can be safely returned to frontend
|
|
106
|
+
res.status(200).json({
|
|
107
|
+
publicKey: process.env.NEXT_PUBLIC_LUMINA_PUBLIC_KEY,
|
|
108
|
+
})
|
|
109
|
+
}`}
|
|
110
|
+
language="typescript"
|
|
111
|
+
title="Accessing Variables"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
<h3>For React Projects</h3>
|
|
115
|
+
<CodeBlock
|
|
116
|
+
code={`// .env
|
|
117
|
+
REACT_APP_LUMINA_PUBLIC_KEY=pk_live_abc123def456...
|
|
118
|
+
REACT_APP_LUMINA_API_URL=https://api.lumina.dev`}
|
|
119
|
+
language="bash"
|
|
120
|
+
title=".env for React"
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<h2 id="testnet-setup">Testnet Configuration</h2>
|
|
124
|
+
|
|
125
|
+
<p>
|
|
126
|
+
For development and testing, use testnet credentials:
|
|
127
|
+
</p>
|
|
128
|
+
|
|
129
|
+
<CodeBlock
|
|
130
|
+
code={`# Development/Testnet
|
|
131
|
+
NEXT_PUBLIC_LUMINA_PUBLIC_KEY=pk_test_abc123def456...
|
|
132
|
+
LUMINA_SECRET_KEY=sk_test_xyz789uvw012...
|
|
133
|
+
NEXT_PUBLIC_LUMINA_API_URL=https://testnet-api.lumina.dev
|
|
134
|
+
|
|
135
|
+
# Network: Sepolia (Ethereum testnet)
|
|
136
|
+
NEXT_PUBLIC_LUMINA_NETWORK=sepolia`}
|
|
137
|
+
language="bash"
|
|
138
|
+
title=".env.local (Testnet)"
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<Callout type="info">
|
|
142
|
+
Testnet credentials can be shared safely. They only work on testnets and don't affect production data.
|
|
143
|
+
</Callout>
|
|
144
|
+
|
|
145
|
+
<h2 id="production-setup">Production Setup</h2>
|
|
146
|
+
|
|
147
|
+
<p>
|
|
148
|
+
When deploying to production, use your production credentials and configure them in your platform:
|
|
149
|
+
</p>
|
|
150
|
+
|
|
151
|
+
<h3>Vercel</h3>
|
|
152
|
+
<CodeBlock
|
|
153
|
+
code={`# In Vercel dashboard:
|
|
154
|
+
# Project Settings → Environment Variables
|
|
155
|
+
|
|
156
|
+
NEXT_PUBLIC_LUMINA_PUBLIC_KEY=pk_live_abc123def456...
|
|
157
|
+
LUMINA_SECRET_KEY=sk_live_xyz789uvw012...
|
|
158
|
+
NEXT_PUBLIC_LUMINA_API_URL=https://api.lumina.dev`}
|
|
159
|
+
language="bash"
|
|
160
|
+
title="Vercel Environment Variables"
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
<h3>Other Platforms</h3>
|
|
164
|
+
<CodeBlock
|
|
165
|
+
code={`# Environment variable naming varies by platform
|
|
166
|
+
# Key principle:
|
|
167
|
+
# - Public keys can use NEXT_PUBLIC_ prefix (or equivalent)
|
|
168
|
+
# - Secret keys should never be exposed to client
|
|
169
|
+
|
|
170
|
+
# Platform-specific examples:
|
|
171
|
+
# Netlify: Settings → Build & Deploy → Environment
|
|
172
|
+
# Railway: Variables section
|
|
173
|
+
# Render: Environment → Add Environment Variable`}
|
|
174
|
+
language="bash"
|
|
175
|
+
title="Platform Configuration"
|
|
176
|
+
/>
|
|
177
|
+
|
|
178
|
+
<Callout type="warning">
|
|
179
|
+
Always use environment variables for secrets. Never hardcode credentials in your source code.
|
|
180
|
+
</Callout>
|
|
181
|
+
|
|
182
|
+
<h2 id="verification">Verify Your Setup</h2>
|
|
183
|
+
|
|
184
|
+
<p>
|
|
185
|
+
Test that your environment is properly configured:
|
|
186
|
+
</p>
|
|
187
|
+
|
|
188
|
+
<CodeBlock
|
|
189
|
+
code={`// Check environment variables
|
|
190
|
+
import { LuminaProvider } from '@lumina/react'
|
|
191
|
+
|
|
192
|
+
export default function CheckSetup() {
|
|
193
|
+
const publicKey = process.env.NEXT_PUBLIC_LUMINA_PUBLIC_KEY
|
|
194
|
+
|
|
195
|
+
if (!publicKey) {
|
|
196
|
+
console.error('[v0] Missing NEXT_PUBLIC_LUMINA_PUBLIC_KEY environment variable')
|
|
197
|
+
return <div>Environment not configured</div>
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
console.log('[v0] Public key configured:', publicKey.substring(0, 20) + '...')
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<LuminaProvider publicKey={publicKey}>
|
|
204
|
+
<YourApp />
|
|
205
|
+
</LuminaProvider>
|
|
206
|
+
)
|
|
207
|
+
}`}
|
|
208
|
+
language="typescript"
|
|
209
|
+
title="Verify Configuration"
|
|
210
|
+
/>
|
|
211
|
+
|
|
212
|
+
<h3>Checklist</h3>
|
|
213
|
+
<ul>
|
|
214
|
+
<li>✓ API keys obtained from Lumina dashboard</li>
|
|
215
|
+
<li>✓ <code>.env.local</code> file created with credentials</li>
|
|
216
|
+
<li>✓ Public key prefixed with <code>NEXT_PUBLIC_</code></li>
|
|
217
|
+
<li>✓ Secret key in server-side environment variables only</li>
|
|
218
|
+
<li>✓ No hardcoded credentials in source code</li>
|
|
219
|
+
<li>✓ Production credentials configured in deployment platform</li>
|
|
220
|
+
<li>✓ Webhook secret configured (if using webhooks)</li>
|
|
221
|
+
</ul>
|
|
222
|
+
|
|
223
|
+
<Callout type="success">
|
|
224
|
+
Your environment is ready! Continue with the quick start guide to begin building.
|
|
225
|
+
</Callout>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div className="flex justify-between mt-12 pt-8 border-t border-white/10">
|
|
229
|
+
<a href="/docs/getting-started/quick-start" className="text-emerald-400 hover:text-emerald-300">
|
|
230
|
+
← Quick Start
|
|
231
|
+
</a>
|
|
232
|
+
<a href="/docs/sdk/lumina-provider" className="text-emerald-400 hover:text-emerald-300">
|
|
233
|
+
LuminaProvider →
|
|
234
|
+
</a>
|
|
235
|
+
</div>
|
|
236
|
+
</main>
|
|
237
|
+
|
|
238
|
+
<aside className="hidden lg:block w-64 flex-shrink-0">
|
|
239
|
+
<TableOfContents headings={headings} />
|
|
240
|
+
</aside>
|
|
241
|
+
</div>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Breadcrumb } from '@/components/docs/breadcrumb'
|
|
2
|
+
import { CodeBlock } from '@/components/docs/code-block'
|
|
3
|
+
import { Callout } from '@/components/docs/callout'
|
|
4
|
+
|
|
5
|
+
export const metadata = {
|
|
6
|
+
title: 'Installation - Lumina Documentation',
|
|
7
|
+
description: 'Install the Lumina SDK and set up your project.',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function InstallationPage() {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Breadcrumb />
|
|
14
|
+
|
|
15
|
+
<div className="space-y-8">
|
|
16
|
+
<div className="space-y-4">
|
|
17
|
+
<h1 className="text-4xl font-bold text-white">Installation</h1>
|
|
18
|
+
<p className="text-lg text-foreground/80">
|
|
19
|
+
Get Lumina installed in your project in minutes. We support npm, pnpm, and yarn.
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div className="space-y-4">
|
|
24
|
+
<h2 className="text-2xl font-bold">1. Install the Package</h2>
|
|
25
|
+
<p className="text-foreground/80">
|
|
26
|
+
Install the Lumina SDK using your preferred package manager:
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<div className="space-y-3">
|
|
30
|
+
<div>
|
|
31
|
+
<p className="text-sm font-semibold text-foreground/70 mb-2">npm</p>
|
|
32
|
+
<CodeBlock
|
|
33
|
+
code="npm install @lumina/sdk"
|
|
34
|
+
language="bash"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div>
|
|
39
|
+
<p className="text-sm font-semibold text-foreground/70 mb-2">pnpm</p>
|
|
40
|
+
<CodeBlock
|
|
41
|
+
code="pnpm add @lumina/sdk"
|
|
42
|
+
language="bash"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div>
|
|
47
|
+
<p className="text-sm font-semibold text-foreground/70 mb-2">yarn</p>
|
|
48
|
+
<CodeBlock
|
|
49
|
+
code="yarn add @lumina/sdk"
|
|
50
|
+
language="bash"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="space-y-4">
|
|
57
|
+
<h2 className="text-2xl font-bold">2. Set Up Environment Variables</h2>
|
|
58
|
+
<p className="text-foreground/80 mb-4">
|
|
59
|
+
Create a <code className="bg-white/10 px-2 py-1 rounded text-sm">.env.local</code> file in your project root with your Lumina API keys:
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<CodeBlock
|
|
63
|
+
code={`NEXT_PUBLIC_LUMINA_API_KEY=your_public_api_key
|
|
64
|
+
LUMINA_SECRET_KEY=your_secret_key
|
|
65
|
+
NEXT_PUBLIC_LUMINA_NETWORK=mainnet`}
|
|
66
|
+
language="env"
|
|
67
|
+
title=".env.local"
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<Callout type="warning" title="Security Note">
|
|
71
|
+
Never commit your <code className="bg-black/40 px-2 py-1 rounded text-xs">LUMINA_SECRET_KEY</code> to version control. Keep it in your <code className="bg-black/40 px-2 py-1 rounded text-xs">.env.local</code> file.
|
|
72
|
+
</Callout>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div className="space-y-4">
|
|
76
|
+
<h2 className="text-2xl font-bold">3. Initialize Lumina Provider</h2>
|
|
77
|
+
<p className="text-foreground/80 mb-4">
|
|
78
|
+
Wrap your app with the <code className="bg-white/10 px-2 py-1 rounded text-sm">LuminaProvider</code> at the root level:
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
<CodeBlock
|
|
82
|
+
code={`import { LuminaProvider } from '@lumina/sdk'
|
|
83
|
+
|
|
84
|
+
export default function RootLayout({
|
|
85
|
+
children,
|
|
86
|
+
}: {
|
|
87
|
+
children: React.ReactNode
|
|
88
|
+
}) {
|
|
89
|
+
return (
|
|
90
|
+
<html>
|
|
91
|
+
<body>
|
|
92
|
+
<LuminaProvider
|
|
93
|
+
apiKey={process.env.NEXT_PUBLIC_LUMINA_API_KEY}
|
|
94
|
+
network="mainnet"
|
|
95
|
+
>
|
|
96
|
+
{children}
|
|
97
|
+
</LuminaProvider>
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
|
100
|
+
)
|
|
101
|
+
}`}
|
|
102
|
+
language="tsx"
|
|
103
|
+
title="app/layout.tsx"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div className="space-y-4">
|
|
108
|
+
<h2 className="text-2xl font-bold">4. Verify Installation</h2>
|
|
109
|
+
<p className="text-foreground/80 mb-4">
|
|
110
|
+
Create a simple component to verify everything is working:
|
|
111
|
+
</p>
|
|
112
|
+
|
|
113
|
+
<CodeBlock
|
|
114
|
+
code={`'use client'
|
|
115
|
+
|
|
116
|
+
import { useLumina } from '@lumina/sdk'
|
|
117
|
+
|
|
118
|
+
export default function TestComponent() {
|
|
119
|
+
const { isConnected } = useLumina()
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<div>
|
|
123
|
+
{isConnected ? (
|
|
124
|
+
<p>✓ Lumina is ready!</p>
|
|
125
|
+
) : (
|
|
126
|
+
<p>Connecting to Lumina...</p>
|
|
127
|
+
)}
|
|
128
|
+
</div>
|
|
129
|
+
)
|
|
130
|
+
}`}
|
|
131
|
+
language="tsx"
|
|
132
|
+
title="components/test.tsx"
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div className="space-y-4">
|
|
137
|
+
<h2 className="text-2xl font-bold">Requirements</h2>
|
|
138
|
+
<ul className="space-y-2 text-foreground/80 text-sm">
|
|
139
|
+
<li className="flex gap-3">
|
|
140
|
+
<span className="text-emerald-400">✓</span>
|
|
141
|
+
<span><strong>Node.js 16+</strong> - Required for development</span>
|
|
142
|
+
</li>
|
|
143
|
+
<li className="flex gap-3">
|
|
144
|
+
<span className="text-emerald-400">✓</span>
|
|
145
|
+
<span><strong>React 18+</strong> - Core dependency for the SDK</span>
|
|
146
|
+
</li>
|
|
147
|
+
<li className="flex gap-3">
|
|
148
|
+
<span className="text-emerald-400">✓</span>
|
|
149
|
+
<span><strong>Next.js 13+</strong> - Recommended for SSR/SSG support</span>
|
|
150
|
+
</li>
|
|
151
|
+
<li className="flex gap-3">
|
|
152
|
+
<span className="text-emerald-400">✓</span>
|
|
153
|
+
<span><strong>Modern browser</strong> - Chrome, Firefox, Safari, or Edge</span>
|
|
154
|
+
</li>
|
|
155
|
+
</ul>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div className="space-y-4">
|
|
159
|
+
<h2 className="text-2xl font-bold">Troubleshooting</h2>
|
|
160
|
+
<div className="space-y-4">
|
|
161
|
+
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
162
|
+
<p className="font-semibold text-foreground mb-2">Module not found error</p>
|
|
163
|
+
<p className="text-sm text-foreground/80 mb-3">
|
|
164
|
+
If you see a module not found error, make sure you've installed the package:
|
|
165
|
+
</p>
|
|
166
|
+
<CodeBlock
|
|
167
|
+
code="rm -rf node_modules package-lock.json && npm install"
|
|
168
|
+
language="bash"
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
173
|
+
<p className="font-semibold text-foreground mb-2">API key issues</p>
|
|
174
|
+
<p className="text-sm text-foreground/80">
|
|
175
|
+
Make sure your environment variables are correctly set. Restart your dev server after changing <code className="bg-black/40 px-1 rounded text-xs">.env.local</code>.
|
|
176
|
+
</p>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<Callout type="success" title="Installation Complete!">
|
|
182
|
+
Your Lumina SDK is ready to use. Next, check out the <a href="/docs/getting-started/quick-start" className="text-emerald-400 hover:underline">Quick Start</a> guide to build your first feature.
|
|
183
|
+
</Callout>
|
|
184
|
+
</div>
|
|
185
|
+
</>
|
|
186
|
+
)
|
|
187
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Breadcrumb } from '@/components/docs/breadcrumb'
|
|
2
|
+
import { Callout } from '@/components/docs/callout'
|
|
3
|
+
import Link from 'next/link'
|
|
4
|
+
|
|
5
|
+
export const metadata = {
|
|
6
|
+
title: 'Introduction - Lumina Documentation',
|
|
7
|
+
description: 'Welcome to Lumina - the secure, scalable embedded wallet infrastructure for Web3 applications.',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function IntroductionPage() {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Breadcrumb />
|
|
14
|
+
|
|
15
|
+
<div className="space-y-8">
|
|
16
|
+
<div className="space-y-4">
|
|
17
|
+
<h1 className="text-4xl font-bold text-white">Welcome to Lumina</h1>
|
|
18
|
+
<p className="text-lg text-foreground/80">
|
|
19
|
+
Lumina is a comprehensive embedded wallet infrastructure designed to make Web3 integration seamless for developers. Whether you're building a DeFi protocol, NFT marketplace, or gaming platform, Lumina provides the secure, scalable foundation you need.
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<Callout type="info" title="What is Lumina?">
|
|
24
|
+
Lumina is an enterprise-grade embedded wallet solution that enables users to manage their crypto assets securely without leaving your application. Our SDK handles authentication, transaction signing, and network communication so you can focus on building your product.
|
|
25
|
+
</Callout>
|
|
26
|
+
|
|
27
|
+
<div className="space-y-4">
|
|
28
|
+
<h2 className="text-2xl font-bold">Key Features</h2>
|
|
29
|
+
<ul className="space-y-2 text-foreground/80">
|
|
30
|
+
<li className="flex gap-3">
|
|
31
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
32
|
+
<span>
|
|
33
|
+
<strong>Multi-Chain Support</strong> - Seamlessly integrate with Ethereum, Polygon, Arbitrum, Optimism, and more
|
|
34
|
+
</span>
|
|
35
|
+
</li>
|
|
36
|
+
<li className="flex gap-3">
|
|
37
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
38
|
+
<span>
|
|
39
|
+
<strong>Secure Authentication</strong> - Multiple auth methods including email, passkeys, and social logins
|
|
40
|
+
</span>
|
|
41
|
+
</li>
|
|
42
|
+
<li className="flex gap-3">
|
|
43
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
44
|
+
<span>
|
|
45
|
+
<strong>Developer-Friendly SDK</strong> - React, Vue, Svelte support with simple, intuitive APIs
|
|
46
|
+
</span>
|
|
47
|
+
</li>
|
|
48
|
+
<li className="flex gap-3">
|
|
49
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
50
|
+
<span>
|
|
51
|
+
<strong>High Performance</strong> - Optimized transaction processing and network latency
|
|
52
|
+
</span>
|
|
53
|
+
</li>
|
|
54
|
+
<li className="flex gap-3">
|
|
55
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
56
|
+
<span>
|
|
57
|
+
<strong>Enterprise Security</strong> - End-to-end encryption, key management, and compliance
|
|
58
|
+
</span>
|
|
59
|
+
</li>
|
|
60
|
+
<li className="flex gap-3">
|
|
61
|
+
<span className="text-emerald-400 font-bold">✓</span>
|
|
62
|
+
<span>
|
|
63
|
+
<strong>Advanced Analytics</strong> - Track user behavior, transaction patterns, and network health
|
|
64
|
+
</span>
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div className="space-y-4">
|
|
70
|
+
<h2 className="text-2xl font-bold">Quick Start</h2>
|
|
71
|
+
<p className="text-foreground/80">
|
|
72
|
+
Getting started with Lumina takes just a few minutes. Choose your framework and follow our setup guide:
|
|
73
|
+
</p>
|
|
74
|
+
<div className="grid grid-cols-2 gap-4 mt-4">
|
|
75
|
+
<Link
|
|
76
|
+
href="/docs/guides/react"
|
|
77
|
+
className="p-4 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors"
|
|
78
|
+
>
|
|
79
|
+
<div className="font-semibold text-emerald-400 mb-1">React</div>
|
|
80
|
+
<div className="text-sm text-foreground/70">Setup Lumina in your React app</div>
|
|
81
|
+
</Link>
|
|
82
|
+
<Link
|
|
83
|
+
href="/docs/guides/nextjs"
|
|
84
|
+
className="p-4 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors"
|
|
85
|
+
>
|
|
86
|
+
<div className="font-semibold text-emerald-400 mb-1">Next.js</div>
|
|
87
|
+
<div className="text-sm text-foreground/70">Integrate with Next.js 15+</div>
|
|
88
|
+
</Link>
|
|
89
|
+
<Link
|
|
90
|
+
href="/docs/guides/vue"
|
|
91
|
+
className="p-4 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors"
|
|
92
|
+
>
|
|
93
|
+
<div className="font-semibold text-emerald-400 mb-1">Vue.js</div>
|
|
94
|
+
<div className="text-sm text-foreground/70">Integrate with Vue 3</div>
|
|
95
|
+
</Link>
|
|
96
|
+
<Link
|
|
97
|
+
href="/docs/getting-started/installation"
|
|
98
|
+
className="p-4 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors"
|
|
99
|
+
>
|
|
100
|
+
<div className="font-semibold text-emerald-400 mb-1">Core Setup</div>
|
|
101
|
+
<div className="text-sm text-foreground/70">Installation and configuration</div>
|
|
102
|
+
</Link>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div className="space-y-4">
|
|
107
|
+
<h2 className="text-2xl font-bold">Architecture Overview</h2>
|
|
108
|
+
<p className="text-foreground/80 mb-4">
|
|
109
|
+
Lumina is built on a client-server architecture that ensures security and performance:
|
|
110
|
+
</p>
|
|
111
|
+
<ul className="space-y-3 text-foreground/80 text-sm">
|
|
112
|
+
<li className="flex gap-3">
|
|
113
|
+
<span className="text-emerald-400 flex-shrink-0">▸</span>
|
|
114
|
+
<span>
|
|
115
|
+
<strong>Client SDK</strong> - Lightweight React components that handle UI and user interactions
|
|
116
|
+
</span>
|
|
117
|
+
</li>
|
|
118
|
+
<li className="flex gap-3">
|
|
119
|
+
<span className="text-emerald-400 flex-shrink-0">▸</span>
|
|
120
|
+
<span>
|
|
121
|
+
<strong>API Gateway</strong> - RESTful API for backend integration and advanced features
|
|
122
|
+
</span>
|
|
123
|
+
</li>
|
|
124
|
+
<li className="flex gap-3">
|
|
125
|
+
<span className="text-emerald-400 flex-shrink-0">▸</span>
|
|
126
|
+
<span>
|
|
127
|
+
<strong>Key Management Service</strong> - Secure key storage and signing infrastructure
|
|
128
|
+
</span>
|
|
129
|
+
</li>
|
|
130
|
+
<li className="flex gap-3">
|
|
131
|
+
<span className="text-emerald-400 flex-shrink-0">▸</span>
|
|
132
|
+
<span>
|
|
133
|
+
<strong>Network RPC Aggregator</strong> - Optimized communication with blockchain networks
|
|
134
|
+
</span>
|
|
135
|
+
</li>
|
|
136
|
+
</ul>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<Callout type="warning" title="Before You Start">
|
|
140
|
+
Make sure you have Node.js 16+ and npm/pnpm/yarn installed. You'll also need a Lumina API key - get one free by signing up at our <Link href="/dashboard" className="text-emerald-400 hover:underline">dashboard</Link>.
|
|
141
|
+
</Callout>
|
|
142
|
+
|
|
143
|
+
<div className="space-y-4">
|
|
144
|
+
<h2 className="text-2xl font-bold">Next Steps</h2>
|
|
145
|
+
<p className="text-foreground/80 mb-4">
|
|
146
|
+
Ready to dive in? Here's the recommended path:
|
|
147
|
+
</p>
|
|
148
|
+
<ol className="space-y-3 text-foreground/80 text-sm list-decimal list-inside">
|
|
149
|
+
<li>
|
|
150
|
+
<Link href="/docs/getting-started/installation" className="text-emerald-400 hover:underline">
|
|
151
|
+
Install Lumina SDK
|
|
152
|
+
</Link>
|
|
153
|
+
{' '} - Add Lumina to your project
|
|
154
|
+
</li>
|
|
155
|
+
<li>
|
|
156
|
+
<Link href="/docs/getting-started/quick-start" className="text-emerald-400 hover:underline">
|
|
157
|
+
Complete the Quick Start
|
|
158
|
+
</Link>
|
|
159
|
+
{' '} - Build your first wallet integration in 5 minutes
|
|
160
|
+
</li>
|
|
161
|
+
<li>
|
|
162
|
+
<Link href="/docs/sdk/lumina-provider" className="text-emerald-400 hover:underline">
|
|
163
|
+
Learn the SDK Components
|
|
164
|
+
</Link>
|
|
165
|
+
{' '} - Understand the core building blocks
|
|
166
|
+
</li>
|
|
167
|
+
<li>
|
|
168
|
+
<Link href="/docs/guides/security" className="text-emerald-400 hover:underline">
|
|
169
|
+
Review Security Best Practices
|
|
170
|
+
</Link>
|
|
171
|
+
{' '} - Ensure your integration is secure
|
|
172
|
+
</li>
|
|
173
|
+
</ol>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</>
|
|
177
|
+
)
|
|
178
|
+
}
|