crypto-swap 1.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yoyoemily
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # crypto-swap
2
+
3
+ ---
4
+ name: crypto-swap
5
+ description: Lightning-fast crypto swaps. 240+ coins, best rates, done in minutes. Chat, CLI, or web — however you prefer.
6
+ ---
7
+
8
+ # Crypto Swap Skill (LightningEX)
9
+
10
+ A versatile cryptocurrency swap service powered by LightningEX API with three interaction modes:
11
+ - **Chat Mode**: Natural language conversation for swaps and queries
12
+ - **CLI Mode**: Command-line interface for scripting and automation
13
+ - **UI Mode**: Web-based DeFi interface for visual trading
14
+
15
+ ## Quick Start
16
+
17
+ ### Chat Mode (Default)
18
+ Simply talk to perform exchanges:
19
+
20
+ **Exchange & Rates:**
21
+ - "Swap 100 USDT to ETH"
22
+ - "What's the exchange rate for BTC to USDT?"
23
+ - "Exchange rate for 100 USDT (TRC20) to USDT (BEP20)"
24
+
25
+ **Explore:**
26
+ - "Show me supported tokens"
27
+ - "List all currencies"
28
+ - "What networks does USDT support?"
29
+
30
+ **Order Management:**
31
+ - "Check order status I1Y0××××"
32
+ - "Monitor order I1Y0××××"
33
+ - "Where is my order?"
34
+
35
+ **Cross-chain Swaps:**
36
+ - "Swap USDT from Tron to BSC"
37
+ - "Bridge ETH from Ethereum to Arbitrum"
38
+ - "Convert BTC to SOL"
39
+
40
+ ### CLI Mode
41
+
42
+ **Run the CLI:**
43
+ ```bash
44
+ # Navigate to skill directory
45
+ cd /path/to/crypto-swap
46
+
47
+ # Start interactive wizard (default)
48
+ node swap.js
49
+
50
+ # Show all available commands
51
+ node swap.js --help
52
+ ```
53
+
54
+ ### UI Mode
55
+ ```bash
56
+ # Launch web UI (default port 8080, auto-assign if occupied)
57
+ node swap.js ui
58
+ ```
59
+ Then open http://localhost:8080 (or the displayed port) in your browser for the DeFi-style trading interface.
@@ -0,0 +1,397 @@
1
+ :root {
2
+ /* Cyberpunk Neon Dark Theme */
3
+ --bg-primary: #0a0a0f;
4
+ --bg-secondary: #12121a;
5
+ --bg-tertiary: #1a1a25;
6
+ --bg-card: #151520;
7
+
8
+ /* Neon Colors */
9
+ --neon-cyan: #00f5ff;
10
+ --neon-pink: #ff00ff;
11
+ --neon-purple: #b829dd;
12
+ --neon-blue: #0080ff;
13
+ --neon-green: #00ff88;
14
+ --neon-yellow: #ffdd00;
15
+ --neon-orange: #ff6600;
16
+
17
+ /* Text Colors */
18
+ --text-primary: #ffffff;
19
+ --text-secondary: #a0a0b0;
20
+ --text-muted: #606070;
21
+
22
+ /* Gradients */
23
+ --gradient-primary: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
24
+ --gradient-secondary: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-orange) 100%);
25
+ --gradient-glow: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(184, 41, 221, 0.1) 100%);
26
+
27
+ /* Spacing */
28
+ --space-xs: 0.25rem;
29
+ --space-sm: 0.5rem;
30
+ --space-md: 1rem;
31
+ --space-lg: 1.5rem;
32
+ --space-xl: 2rem;
33
+ --space-2xl: 3rem;
34
+ --space-3xl: 4rem;
35
+
36
+ /* Typography */
37
+ --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
38
+ --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
39
+
40
+ /* Border Radius */
41
+ --radius-sm: 4px;
42
+ --radius-md: 8px;
43
+ --radius-lg: 12px;
44
+ --radius-xl: 16px;
45
+ --radius-full: 9999px;
46
+
47
+ /* Shadows */
48
+ --shadow-neon-cyan: 0 0 10px rgba(0, 245, 255, 0.5), 0 0 20px rgba(0, 245, 255, 0.3);
49
+ --shadow-neon-pink: 0 0 10px rgba(255, 0, 255, 0.5), 0 0 20px rgba(255, 0, 255, 0.3);
50
+ --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
51
+
52
+ /* Transitions */
53
+ --transition-fast: 0.15s ease;
54
+ --transition-normal: 0.3s ease;
55
+ --transition-slow: 0.5s ease;
56
+ }
57
+
58
+ * {
59
+ margin: 0;
60
+ padding: 0;
61
+ box-sizing: border-box;
62
+ }
63
+
64
+ html {
65
+ scroll-behavior: smooth;
66
+ }
67
+
68
+ body {
69
+ font-family: var(--font-primary);
70
+ background: var(--bg-primary);
71
+ color: var(--text-primary);
72
+ line-height: 1.6;
73
+ min-height: 100vh;
74
+ overflow-x: hidden;
75
+ }
76
+
77
+ /* Background Grid Effect */
78
+ body::before {
79
+ content: '';
80
+ position: fixed;
81
+ top: 0;
82
+ left: 0;
83
+ width: 100vw;
84
+ height: 100vh;
85
+ background-image:
86
+ linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
87
+ linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
88
+ background-size: 50px 50px;
89
+ pointer-events: none;
90
+ z-index: -1;
91
+ }
92
+
93
+ /* Scrollbar */
94
+ ::-webkit-scrollbar {
95
+ width: 8px;
96
+ }
97
+
98
+ ::-webkit-scrollbar-track {
99
+ background: var(--bg-secondary);
100
+ }
101
+
102
+ ::-webkit-scrollbar-thumb {
103
+ background: var(--neon-cyan);
104
+ border-radius: var(--radius-full);
105
+ }
106
+
107
+ ::-webkit-scrollbar-thumb:hover {
108
+ background: var(--neon-purple);
109
+ }
110
+
111
+ /* Typography */
112
+ h1, h2, h3, h4, h5, h6 {
113
+ font-weight: 700;
114
+ line-height: 1.2;
115
+ }
116
+
117
+ h1 {
118
+ font-size: 3rem;
119
+ background: var(--gradient-primary);
120
+ -webkit-background-clip: text;
121
+ -webkit-text-fill-color: transparent;
122
+ background-clip: text;
123
+ }
124
+
125
+ h2 {
126
+ font-size: 2.25rem;
127
+ color: var(--text-primary);
128
+ }
129
+
130
+ h3 {
131
+ font-size: 1.5rem;
132
+ color: var(--text-primary);
133
+ }
134
+
135
+ p {
136
+ color: var(--text-secondary);
137
+ }
138
+
139
+ a {
140
+ color: var(--neon-cyan);
141
+ text-decoration: none;
142
+ transition: var(--transition-fast);
143
+ }
144
+
145
+ a:hover {
146
+ color: var(--neon-pink);
147
+ text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
148
+ }
149
+
150
+ /* Buttons */
151
+ .btn {
152
+ display: inline-flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+ gap: var(--space-sm);
156
+ padding: var(--space-md) var(--space-xl);
157
+ font-size: 1rem;
158
+ font-weight: 600;
159
+ border: none;
160
+ border-radius: var(--radius-md);
161
+ cursor: pointer;
162
+ transition: var(--transition-normal);
163
+ font-family: var(--font-primary);
164
+ }
165
+
166
+ .btn-primary {
167
+ background: var(--gradient-primary);
168
+ color: var(--bg-primary);
169
+ box-shadow: var(--shadow-neon-cyan);
170
+ }
171
+
172
+ .btn-primary:hover {
173
+ transform: translateY(-2px);
174
+ box-shadow: 0 0 20px rgba(0, 245, 255, 0.7), 0 0 40px rgba(0, 245, 255, 0.4);
175
+ }
176
+
177
+ .btn-secondary {
178
+ background: transparent;
179
+ color: var(--neon-cyan);
180
+ border: 2px solid var(--neon-cyan);
181
+ }
182
+
183
+ .btn-secondary:hover {
184
+ background: rgba(0, 245, 255, 0.1);
185
+ box-shadow: var(--shadow-neon-cyan);
186
+ }
187
+
188
+ .btn-glow {
189
+ position: relative;
190
+ overflow: hidden;
191
+ }
192
+
193
+ .btn-glow::before {
194
+ content: '';
195
+ position: absolute;
196
+ top: 0;
197
+ left: -100%;
198
+ width: 100%;
199
+ height: 100%;
200
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
201
+ transition: var(--transition-slow);
202
+ }
203
+
204
+ .btn-glow:hover::before {
205
+ left: 100%;
206
+ }
207
+
208
+ /* Cards */
209
+ .card {
210
+ background: var(--bg-card);
211
+ border: 1px solid rgba(0, 245, 255, 0.1);
212
+ border-radius: var(--radius-lg);
213
+ padding: var(--space-xl);
214
+ box-shadow: var(--shadow-card);
215
+ transition: var(--transition-normal);
216
+ }
217
+
218
+ .card:hover {
219
+ border-color: rgba(0, 245, 255, 0.3);
220
+ box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 245, 255, 0.1);
221
+ transform: translateY(-4px);
222
+ }
223
+
224
+ /* Form Elements */
225
+ .input {
226
+ width: 100%;
227
+ padding: var(--space-md) var(--space-lg);
228
+ background: var(--bg-secondary);
229
+ border: 1px solid rgba(0, 245, 255, 0.2);
230
+ border-radius: var(--radius-md);
231
+ color: var(--text-primary);
232
+ font-size: 1rem;
233
+ font-family: var(--font-primary);
234
+ transition: var(--transition-fast);
235
+ }
236
+
237
+ .input:focus {
238
+ outline: none;
239
+ border-color: var(--neon-cyan);
240
+ box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
241
+ }
242
+
243
+ .input::placeholder {
244
+ color: var(--text-muted);
245
+ }
246
+
247
+ .select {
248
+ appearance: none;
249
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f5ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
250
+ background-repeat: no-repeat;
251
+ background-position: right 1rem center;
252
+ padding-right: 2.5rem;
253
+ cursor: pointer;
254
+ }
255
+
256
+ /* Neon Text Effects */
257
+ .text-neon-cyan {
258
+ color: var(--neon-cyan);
259
+ text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
260
+ }
261
+
262
+ .text-neon-pink {
263
+ color: var(--neon-pink);
264
+ text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
265
+ }
266
+
267
+ .text-neon-purple {
268
+ color: var(--neon-purple);
269
+ text-shadow: 0 0 10px rgba(184, 41, 221, 0.5);
270
+ }
271
+
272
+ .text-gradient {
273
+ background: var(--gradient-primary);
274
+ -webkit-background-clip: text;
275
+ -webkit-text-fill-color: transparent;
276
+ background-clip: text;
277
+ }
278
+
279
+ /* Animations */
280
+ @keyframes pulse {
281
+ 0%, 100% { opacity: 1; }
282
+ 50% { opacity: 0.5; }
283
+ }
284
+
285
+ @keyframes glow {
286
+ 0%, 100% { box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan); }
287
+ 50% { box-shadow: 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan); }
288
+ }
289
+
290
+ @keyframes float {
291
+ 0%, 100% { transform: translateY(0); }
292
+ 50% { transform: translateY(-10px); }
293
+ }
294
+
295
+ @keyframes slideIn {
296
+ from {
297
+ opacity: 0;
298
+ transform: translateY(20px);
299
+ }
300
+ to {
301
+ opacity: 1;
302
+ transform: translateY(0);
303
+ }
304
+ }
305
+
306
+ .animate-pulse {
307
+ animation: pulse 2s infinite;
308
+ }
309
+
310
+ .animate-glow {
311
+ animation: glow 2s infinite;
312
+ }
313
+
314
+ .animate-float {
315
+ animation: float 3s ease-in-out infinite;
316
+ }
317
+
318
+ .animate-slide-in {
319
+ animation: slideIn 0.5s ease forwards;
320
+ }
321
+
322
+ /* Utility Classes */
323
+ .container {
324
+ max-width: 1200px;
325
+ margin: 0 auto;
326
+ padding: 0 var(--space-lg);
327
+ width: 100%;
328
+ box-sizing: border-box;
329
+ }
330
+
331
+ @media (max-width: 768px) {
332
+ .container {
333
+ padding: 0 var(--space-md);
334
+ }
335
+ }
336
+
337
+ .section {
338
+ padding: var(--space-3xl) 0;
339
+ }
340
+
341
+ .text-center {
342
+ text-align: center;
343
+ }
344
+
345
+ .flex {
346
+ display: flex;
347
+ }
348
+
349
+ .flex-col {
350
+ flex-direction: column;
351
+ }
352
+
353
+ .items-center {
354
+ align-items: center;
355
+ }
356
+
357
+ .justify-center {
358
+ justify-content: center;
359
+ }
360
+
361
+ .justify-between {
362
+ justify-content: space-between;
363
+ }
364
+
365
+ .gap-sm { gap: var(--space-sm); }
366
+ .gap-md { gap: var(--space-md); }
367
+ .gap-lg { gap: var(--space-lg); }
368
+ .gap-xl { gap: var(--space-xl); }
369
+
370
+ .grid {
371
+ display: grid;
372
+ }
373
+
374
+ .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
375
+ .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
376
+ .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
377
+
378
+ .hidden {
379
+ display: none !important;
380
+ }
381
+
382
+ /* Responsive */
383
+ @media (max-width: 768px) {
384
+ h1 { font-size: 2rem; }
385
+ h2 { font-size: 1.75rem; }
386
+ h3 { font-size: 1.25rem; }
387
+
388
+ .grid-cols-2,
389
+ .grid-cols-3,
390
+ .grid-cols-4 {
391
+ grid-template-columns: 1fr;
392
+ }
393
+
394
+ .container {
395
+ padding: 0 var(--space-md);
396
+ }
397
+ }