@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.
Files changed (152) hide show
  1. package/BUTTON_FIXES.md +59 -0
  2. package/DOCS_INDEX.md +332 -0
  3. package/DOCUMENTATION.md +252 -0
  4. package/DOCUMENTATION_BUILD_SUMMARY.md +376 -0
  5. package/DOCUMENTATION_COMPLETE.md +311 -0
  6. package/FEATURES.md +333 -0
  7. package/Lumina-sdk/src/components/lumina-provider.tsx +46 -0
  8. package/Lumina-sdk/src/components/transaction-confirm.tsx +242 -0
  9. package/Lumina-sdk/src/components/wallet-display.tsx +157 -0
  10. package/Lumina-sdk/src/components/wallet-login.tsx +163 -0
  11. package/Lumina-sdk/src/hooks/use-mobile.ts +19 -0
  12. package/Lumina-sdk/src/hooks/use-toast.ts +191 -0
  13. package/Lumina-sdk/src/index.ts +0 -0
  14. package/Lumina-sdk/src/lib/api.ts +66 -0
  15. package/Lumina-sdk/src/lib/utils.ts +6 -0
  16. package/Lumina-sdk/src/package.json +42 -0
  17. package/Lumina-sdk/src/tsconfig.json +19 -0
  18. package/NEW_FILES_MANIFEST.txt +146 -0
  19. package/README.md +298 -0
  20. package/app/dashboard/analytics/page.tsx +218 -0
  21. package/app/dashboard/api-keys/page.tsx +260 -0
  22. package/app/dashboard/billing/page.tsx +412 -0
  23. package/app/dashboard/integration/page.tsx +185 -0
  24. package/app/dashboard/layout.tsx +18 -0
  25. package/app/dashboard/page.tsx +244 -0
  26. package/app/dashboard/settings/page.tsx +285 -0
  27. package/app/dashboard/users/page.tsx +148 -0
  28. package/app/docs/api/authentication/page.tsx +246 -0
  29. package/app/docs/api/endpoints/page.tsx +397 -0
  30. package/app/docs/api/errors/page.tsx +305 -0
  31. package/app/docs/api/overview/page.tsx +306 -0
  32. package/app/docs/examples/basic-setup/page.tsx +256 -0
  33. package/app/docs/examples/multi-chain/page.tsx +331 -0
  34. package/app/docs/examples/nextjs-full-stack/page.tsx +332 -0
  35. package/app/docs/getting-started/environment-setup/page.tsx +243 -0
  36. package/app/docs/getting-started/installation/page.tsx +187 -0
  37. package/app/docs/getting-started/introduction/page.tsx +178 -0
  38. package/app/docs/getting-started/quick-start/page.tsx +199 -0
  39. package/app/docs/guides/nextjs/page.tsx +358 -0
  40. package/app/docs/guides/react/page.tsx +230 -0
  41. package/app/docs/guides/security/page.tsx +284 -0
  42. package/app/docs/layout.tsx +32 -0
  43. package/app/docs/page.tsx +180 -0
  44. package/app/docs/sdk/lumina-provider/page.tsx +186 -0
  45. package/app/docs/sdk/transaction-confirm/page.tsx +331 -0
  46. package/app/docs/sdk/wallet-display/page.tsx +224 -0
  47. package/app/docs/sdk/wallet-login/page.tsx +207 -0
  48. package/app/docs/troubleshooting/common-issues/page.tsx +301 -0
  49. package/app/docs/troubleshooting/faq/page.tsx +105 -0
  50. package/app/globals.css +125 -0
  51. package/app/invite/[token]/page.tsx +78 -0
  52. package/app/layout.tsx +36 -0
  53. package/app/login/page.tsx +175 -0
  54. package/app/page.tsx +336 -0
  55. package/app/sdk-demo/page.tsx +239 -0
  56. package/components/dashboard-sidebar.tsx +113 -0
  57. package/components/docs/breadcrumb.tsx +51 -0
  58. package/components/docs/callout.tsx +53 -0
  59. package/components/docs/code-block.tsx +77 -0
  60. package/components/docs/docs-sidebar.tsx +214 -0
  61. package/components/docs/table-of-contents.tsx +83 -0
  62. package/components/sdk/lumina-provider.tsx +46 -0
  63. package/components/sdk/transaction-confirm.tsx +242 -0
  64. package/components/sdk/wallet-display.tsx +157 -0
  65. package/components/sdk/wallet-login.tsx +163 -0
  66. package/components/theme-provider.tsx +11 -0
  67. package/components/ui/accordion.tsx +66 -0
  68. package/components/ui/alert-dialog.tsx +157 -0
  69. package/components/ui/alert.tsx +66 -0
  70. package/components/ui/aspect-ratio.tsx +11 -0
  71. package/components/ui/avatar.tsx +53 -0
  72. package/components/ui/badge.tsx +46 -0
  73. package/components/ui/breadcrumb.tsx +109 -0
  74. package/components/ui/button-group.tsx +83 -0
  75. package/components/ui/button.tsx +60 -0
  76. package/components/ui/calendar.tsx +213 -0
  77. package/components/ui/card.tsx +92 -0
  78. package/components/ui/carousel.tsx +241 -0
  79. package/components/ui/chart.tsx +351 -0
  80. package/components/ui/checkbox.tsx +32 -0
  81. package/components/ui/collapsible.tsx +33 -0
  82. package/components/ui/command.tsx +184 -0
  83. package/components/ui/context-menu.tsx +252 -0
  84. package/components/ui/dialog.tsx +143 -0
  85. package/components/ui/drawer.tsx +135 -0
  86. package/components/ui/dropdown-menu.tsx +257 -0
  87. package/components/ui/empty.tsx +104 -0
  88. package/components/ui/field.tsx +244 -0
  89. package/components/ui/form.tsx +167 -0
  90. package/components/ui/hover-card.tsx +44 -0
  91. package/components/ui/input-group.tsx +169 -0
  92. package/components/ui/input-otp.tsx +77 -0
  93. package/components/ui/input.tsx +21 -0
  94. package/components/ui/item.tsx +193 -0
  95. package/components/ui/kbd.tsx +28 -0
  96. package/components/ui/label.tsx +24 -0
  97. package/components/ui/menubar.tsx +276 -0
  98. package/components/ui/navigation-menu.tsx +166 -0
  99. package/components/ui/pagination.tsx +127 -0
  100. package/components/ui/popover.tsx +48 -0
  101. package/components/ui/progress.tsx +31 -0
  102. package/components/ui/radio-group.tsx +45 -0
  103. package/components/ui/resizable.tsx +56 -0
  104. package/components/ui/scroll-area.tsx +58 -0
  105. package/components/ui/select.tsx +185 -0
  106. package/components/ui/separator.tsx +28 -0
  107. package/components/ui/sheet.tsx +139 -0
  108. package/components/ui/sidebar.tsx +726 -0
  109. package/components/ui/skeleton.tsx +13 -0
  110. package/components/ui/slider.tsx +59 -0
  111. package/components/ui/sonner.tsx +25 -0
  112. package/components/ui/spinner.tsx +16 -0
  113. package/components/ui/switch.tsx +29 -0
  114. package/components/ui/table.tsx +116 -0
  115. package/components/ui/tabs.tsx +66 -0
  116. package/components/ui/textarea.tsx +18 -0
  117. package/components/ui/toast.tsx +129 -0
  118. package/components/ui/toaster.tsx +35 -0
  119. package/components/ui/toggle-group.tsx +73 -0
  120. package/components/ui/toggle.tsx +47 -0
  121. package/components/ui/tooltip.tsx +61 -0
  122. package/components/ui/use-mobile.tsx +19 -0
  123. package/components/ui/use-toast.ts +191 -0
  124. package/components.json +21 -0
  125. package/hooks/use-mobile.ts +19 -0
  126. package/hooks/use-toast.ts +191 -0
  127. package/lib/api.ts +66 -0
  128. package/lib/utils.ts +6 -0
  129. package/next-env.d.ts +6 -0
  130. package/next.config.mjs +11 -0
  131. package/package.json +73 -0
  132. package/pnpm-workspace.yaml +5 -0
  133. package/postcss.config.mjs +8 -0
  134. package/public/apple-icon.png +0 -0
  135. package/public/fav.jpeg +0 -0
  136. package/public/fav.png +0 -0
  137. package/public/icon-dark-32x32.png +0 -0
  138. package/public/icon-light-32x32.png +0 -0
  139. package/public/icon.png +0 -0
  140. package/public/icon.svg +26 -0
  141. package/public/logo.jpeg +0 -0
  142. package/public/logo.png +0 -0
  143. package/public/logo2.jpeg +0 -0
  144. package/public/logo2.png +0 -0
  145. package/public/placeholder-logo.png +0 -0
  146. package/public/placeholder-logo.svg +1 -0
  147. package/public/placeholder-user.jpg +0 -0
  148. package/public/placeholder.jpg +0 -0
  149. package/public/placeholder.svg +1 -0
  150. package/styles/globals.css +209 -0
  151. package/tailwind.config.ts +15 -0
  152. package/tsconfig.json +41 -0
@@ -0,0 +1,180 @@
1
+ 'use client'
2
+
3
+ import Link from 'next/link'
4
+ import { DocsSidebar } from '@/components/docs/docs-sidebar'
5
+ import { Button } from '@/components/ui/button'
6
+ import { ArrowRight, BookOpen, Code2, Rocket, Menu } from 'lucide-react'
7
+ import { useState } from 'react'
8
+
9
+ export default function DocsPage() {
10
+ const [sidebarOpen, setSidebarOpen] = useState(false)
11
+
12
+ return (
13
+ <div className="flex h-screen overflow-hidden bg-background">
14
+
15
+ {/* Main Content */}
16
+ <main className="flex-1 overflow-y-auto">
17
+
18
+ {/* Mobile Top Bar */}
19
+ <div className="sticky top-0 z-30 flex items-center gap-3 px-4 py-3 border-b border-white/10 bg-background/80 backdrop-blur-sm md:hidden">
20
+ <button
21
+ onClick={() => setSidebarOpen(true)}
22
+ className="p-2 rounded-md hover:bg-white/10 transition text-foreground/70 hover:text-foreground"
23
+ aria-label="Open sidebar"
24
+ >
25
+ <Menu size={20} />
26
+ </button>
27
+ <span className="text-sm font-semibold text-foreground/80">Documentation</span>
28
+ </div>
29
+
30
+ <div className="max-w-4xl mx-auto px-4 sm:px-6 py-10 sm:py-16">
31
+
32
+ {/* Header */}
33
+ <div className="space-y-4 mb-12 sm:mb-16">
34
+ <h1 className="text-4xl sm:text-5xl font-bold text-white">Documentation</h1>
35
+ <p className="text-lg sm:text-xl text-foreground/80">
36
+ Everything you need to build with Lumina embedded wallet infrastructure
37
+ </p>
38
+ </div>
39
+
40
+ {/* Quick Start Grid */}
41
+ <div className="grid grid-cols-1 sm:grid-cols-3 gap-4 mb-12 sm:mb-16">
42
+ <Link
43
+ href="/docs/getting-started/introduction"
44
+ className="p-6 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors group"
45
+ >
46
+ <div className="flex items-start justify-between mb-3">
47
+ <Rocket size={24} className="text-emerald-400" />
48
+ <ArrowRight size={16} className="text-foreground/30 group-hover:text-emerald-400 transition-colors" />
49
+ </div>
50
+ <h3 className="font-semibold text-lg mb-2">Getting Started</h3>
51
+ <p className="text-sm text-foreground/70">
52
+ Learn what Lumina is and how to get set up in minutes
53
+ </p>
54
+ </Link>
55
+
56
+ <Link
57
+ href="/docs/sdk/lumina-provider"
58
+ className="p-6 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors group"
59
+ >
60
+ <div className="flex items-start justify-between mb-3">
61
+ <Code2 size={24} className="text-emerald-400" />
62
+ <ArrowRight size={16} className="text-foreground/30 group-hover:text-emerald-400 transition-colors" />
63
+ </div>
64
+ <h3 className="font-semibold text-lg mb-2">SDK Reference</h3>
65
+ <p className="text-sm text-foreground/70">
66
+ Comprehensive guide to all SDK components and APIs
67
+ </p>
68
+ </Link>
69
+
70
+ <Link
71
+ href="/docs/api/authentication"
72
+ className="p-6 rounded-lg border border-white/10 hover:border-emerald-600/50 hover:bg-emerald-600/5 transition-colors group"
73
+ >
74
+ <div className="flex items-start justify-between mb-3">
75
+ <BookOpen size={24} className="text-emerald-400" />
76
+ <ArrowRight size={16} className="text-foreground/30 group-hover:text-emerald-400 transition-colors" />
77
+ </div>
78
+ <h3 className="font-semibold text-lg mb-2">API Docs</h3>
79
+ <p className="text-sm text-foreground/70">
80
+ REST API endpoints and integration documentation
81
+ </p>
82
+ </Link>
83
+ </div>
84
+
85
+ {/* Documentation Sections */}
86
+ <div className="space-y-8">
87
+ <section>
88
+ <h2 className="text-2xl font-bold mb-4">Getting Started</h2>
89
+ <div className="space-y-2">
90
+ <Link href="/docs/getting-started/introduction" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
91
+ <div className="font-semibold text-emerald-400 mb-1">Introduction</div>
92
+ <div className="text-sm text-foreground/60">Learn what Lumina offers and its core features</div>
93
+ </Link>
94
+ <Link href="/docs/getting-started/installation" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
95
+ <div className="font-semibold text-emerald-400 mb-1">Installation</div>
96
+ <div className="text-sm text-foreground/60">Install Lumina SDK and configure your project</div>
97
+ </Link>
98
+ <Link href="/docs/getting-started/quick-start" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
99
+ <div className="font-semibold text-emerald-400 mb-1">Quick Start</div>
100
+ <div className="text-sm text-foreground/60">Build your first integration in 5 minutes</div>
101
+ </Link>
102
+ </div>
103
+ </section>
104
+
105
+ <section>
106
+ <h2 className="text-2xl font-bold mb-4">SDK Components</h2>
107
+ <div className="space-y-2">
108
+ <Link href="/docs/sdk/lumina-provider" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
109
+ <div className="font-semibold text-emerald-400 mb-1">LuminaProvider</div>
110
+ <div className="text-sm text-foreground/60">Context provider for your entire application</div>
111
+ </Link>
112
+ <Link href="/docs/sdk/wallet-login" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
113
+ <div className="font-semibold text-emerald-400 mb-1">WalletLogin</div>
114
+ <div className="text-sm text-foreground/60">Complete authentication component with multiple methods</div>
115
+ </Link>
116
+ <Link href="/docs/sdk/wallet-display" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
117
+ <div className="font-semibold text-emerald-400 mb-1">WalletDisplay</div>
118
+ <div className="text-sm text-foreground/60">Show wallet balances, address, and transaction actions</div>
119
+ </Link>
120
+ </div>
121
+ </section>
122
+
123
+ <section>
124
+ <h2 className="text-2xl font-bold mb-4">Guides</h2>
125
+ <div className="space-y-2">
126
+ <Link href="/docs/guides/react" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
127
+ <div className="font-semibold text-emerald-400 mb-1">React Integration</div>
128
+ <div className="text-sm text-foreground/60">Complete guide to using Lumina with React</div>
129
+ </Link>
130
+ <Link href="/docs/guides/nextjs" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
131
+ <div className="font-semibold text-emerald-400 mb-1">Next.js Setup</div>
132
+ <div className="text-sm text-foreground/60">Best practices for Next.js 13+ integration</div>
133
+ </Link>
134
+ <Link href="/docs/guides/security" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
135
+ <div className="font-semibold text-emerald-400 mb-1">Security Best Practices</div>
136
+ <div className="text-sm text-foreground/60">Protect your users and secure your application</div>
137
+ </Link>
138
+ </div>
139
+ </section>
140
+
141
+ <section>
142
+ <h2 className="text-2xl font-bold mb-4">Examples</h2>
143
+ <div className="space-y-2">
144
+ <Link href="/docs/examples/basic-setup" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
145
+ <div className="font-semibold text-emerald-400 mb-1">Basic Setup</div>
146
+ <div className="text-sm text-foreground/60">Complete minimal example with authentication and wallet display</div>
147
+ </Link>
148
+ <Link href="/docs/examples/authentication" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
149
+ <div className="font-semibold text-emerald-400 mb-1">User Authentication</div>
150
+ <div className="text-sm text-foreground/60">Implement custom authentication flows</div>
151
+ </Link>
152
+ <Link href="/docs/examples/send-transaction" className="block p-3 rounded-lg hover:bg-white/5 transition-colors">
153
+ <div className="font-semibold text-emerald-400 mb-1">Send Transaction</div>
154
+ <div className="text-sm text-foreground/60">Enable users to send funds from your app</div>
155
+ </Link>
156
+ </div>
157
+ </section>
158
+ </div>
159
+
160
+ {/* Footer CTA */}
161
+ <div className="mt-16 p-6 sm:p-8 rounded-lg bg-emerald-600/10 border border-emerald-600/30">
162
+ <h3 className="text-xl font-bold mb-2">Need Help?</h3>
163
+ <p className="text-foreground/80 mb-4">
164
+ Check out our FAQ or reach out to our support team for assistance.
165
+ </p>
166
+ <div className="flex flex-col sm:flex-row gap-3">
167
+ <Button asChild>
168
+ <Link href="/docs/troubleshooting/faq">View FAQ</Link>
169
+ </Button>
170
+ <Button asChild variant="outline">
171
+ <Link href="/docs/troubleshooting/support">Contact Support</Link>
172
+ </Button>
173
+ </div>
174
+ </div>
175
+
176
+ </div>
177
+ </main>
178
+ </div>
179
+ )
180
+ }
@@ -0,0 +1,186 @@
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: 'LuminaProvider - SDK Reference',
7
+ description: 'Configure and use the LuminaProvider component for Lumina SDK.',
8
+ }
9
+
10
+ export default function LuminaProviderPage() {
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">LuminaProvider</h1>
18
+ <p className="text-lg text-foreground/80">
19
+ The root context provider for Lumina. Wrap your entire application with this component to enable all Lumina functionality.
20
+ </p>
21
+ </div>
22
+
23
+ <div className="space-y-4">
24
+ <h2 className="text-2xl font-bold">Basic Usage</h2>
25
+ <CodeBlock
26
+ code={`import { LuminaProvider } from '@lumina/sdk'
27
+
28
+ export default function RootLayout({ children }) {
29
+ return (
30
+ <html>
31
+ <body>
32
+ <LuminaProvider
33
+ apiKey={process.env.NEXT_PUBLIC_LUMINA_API_KEY}
34
+ network="mainnet"
35
+ >
36
+ {children}
37
+ </LuminaProvider>
38
+ </body>
39
+ </html>
40
+ )
41
+ }`}
42
+ language="tsx"
43
+ />
44
+ </div>
45
+
46
+ <div className="space-y-4">
47
+ <h2 className="text-2xl font-bold">Props</h2>
48
+ <div className="space-y-4">
49
+ <div className="p-4 rounded-lg bg-white/5 border border-white/10">
50
+ <p className="font-semibold text-emerald-400 mb-2">apiKey</p>
51
+ <p className="text-sm text-foreground/80 mb-2">
52
+ <span className="text-red-400">Required</span> • <span className="text-blue-400">string</span>
53
+ </p>
54
+ <p className="text-sm text-foreground/80">
55
+ Your Lumina public API key. Get one from the dashboard.
56
+ </p>
57
+ </div>
58
+
59
+ <div className="p-4 rounded-lg bg-white/5 border border-white/10">
60
+ <p className="font-semibold text-emerald-400 mb-2">network</p>
61
+ <p className="text-sm text-foreground/80 mb-2">
62
+ <span className="text-red-400">Required</span> • <span className="text-blue-400">'mainnet' | 'testnet'</span>
63
+ </p>
64
+ <p className="text-sm text-foreground/80">
65
+ The blockchain network to use. Use 'testnet' for development.
66
+ </p>
67
+ </div>
68
+
69
+ <div className="p-4 rounded-lg bg-white/5 border border-white/10">
70
+ <p className="font-semibold text-emerald-400 mb-2">chains</p>
71
+ <p className="text-sm text-foreground/80 mb-2">
72
+ <span className="text-green-400">Optional</span> • <span className="text-blue-400">string[]</span>
73
+ </p>
74
+ <p className="text-sm text-foreground/80 mb-3">
75
+ Supported blockchain chains. Defaults to all available chains.
76
+ </p>
77
+ <CodeBlock
78
+ code={`<LuminaProvider
79
+ apiKey="pk_..."
80
+ network="mainnet"
81
+ chains={['ethereum', 'polygon', 'arbitrum']}
82
+ >`}
83
+ language="tsx"
84
+ />
85
+ </div>
86
+
87
+ <div className="p-4 rounded-lg bg-white/5 border border-white/10">
88
+ <p className="font-semibold text-emerald-400 mb-2">theme</p>
89
+ <p className="text-sm text-foreground/80 mb-2">
90
+ <span className="text-green-400">Optional</span> • <span className="text-blue-400">'light' | 'dark'</span>
91
+ </p>
92
+ <p className="text-sm text-foreground/80">
93
+ UI theme. Defaults to 'dark'.
94
+ </p>
95
+ </div>
96
+
97
+ <div className="p-4 rounded-lg bg-white/5 border border-white/10">
98
+ <p className="font-semibold text-emerald-400 mb-2">onError</p>
99
+ <p className="text-sm text-foreground/80 mb-2">
100
+ <span className="text-green-400">Optional</span> • <span className="text-blue-400">(error: Error) =&gt; void</span>
101
+ </p>
102
+ <p className="text-sm text-foreground/80">
103
+ Callback when errors occur in the Lumina SDK.
104
+ </p>
105
+ </div>
106
+ </div>
107
+ </div>
108
+
109
+ <div className="space-y-4">
110
+ <h2 className="text-2xl font-bold">Advanced Configuration</h2>
111
+ <CodeBlock
112
+ code={`<LuminaProvider
113
+ apiKey={process.env.NEXT_PUBLIC_LUMINA_API_KEY}
114
+ network="mainnet"
115
+ chains={['ethereum', 'polygon']}
116
+ theme="dark"
117
+ onError={(error) => {
118
+ console.error('Lumina error:', error)
119
+ // Send to error tracking service
120
+ }}
121
+ >
122
+ {children}
123
+ </LuminaProvider>`}
124
+ language="tsx"
125
+ />
126
+ </div>
127
+
128
+ <Callout type="info" title="Provider Location">
129
+ Always place LuminaProvider at the root of your application, wrapping all components that need access to Lumina functionality. In Next.js, this is typically in your <code className="bg-black/40 px-2 py-1 rounded text-xs">app/layout.tsx</code>.
130
+ </Callout>
131
+
132
+ <div className="space-y-4">
133
+ <h2 className="text-2xl font-bold">Environment Variables</h2>
134
+ <CodeBlock
135
+ code={`# Public API Key (exposed to client)
136
+ NEXT_PUBLIC_LUMINA_API_KEY=pk_test_xxxxx
137
+
138
+ # Secret Key (server-only)
139
+ LUMINA_SECRET_KEY=sk_test_xxxxx
140
+
141
+ # Network
142
+ NEXT_PUBLIC_LUMINA_NETWORK=testnet`}
143
+ language="env"
144
+ title=".env.local"
145
+ />
146
+ </div>
147
+
148
+ <div className="space-y-4">
149
+ <h2 className="text-2xl font-bold">Accessing Lumina Context</h2>
150
+ <p className="text-foreground/80 mb-4">
151
+ Use hooks to access Lumina functionality from any child component:
152
+ </p>
153
+ <CodeBlock
154
+ code={`'use client'
155
+
156
+ import { useLumina } from '@lumina/sdk'
157
+
158
+ export function MyComponent() {
159
+ const {
160
+ user,
161
+ isConnected,
162
+ network,
163
+ logout,
164
+ } = useLumina()
165
+
166
+ return (
167
+ <div>
168
+ {isConnected ? (
169
+ <p>Connected: {user?.email}</p>
170
+ ) : (
171
+ <p>Not connected</p>
172
+ )}
173
+ </div>
174
+ )
175
+ }`}
176
+ language="tsx"
177
+ />
178
+ </div>
179
+
180
+ <Callout type="warning" title="Client Components Only">
181
+ The <code className="bg-black/40 px-2 py-1 rounded text-xs">useLumina</code> hook only works in client components. Mark components that use it with <code className="bg-black/40 px-2 py-1 rounded text-xs">'use client'</code>.
182
+ </Callout>
183
+ </div>
184
+ </>
185
+ )
186
+ }