@siphoyawe/mina-cli 1.2.2 → 1.2.3
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/README.md +27 -17
- package/dist/index.js +306 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import React12 from "react";
|
|
|
7
7
|
import { render } from "ink";
|
|
8
8
|
|
|
9
9
|
// src/commands/wizard.tsx
|
|
10
|
-
import { useState as useState2, useEffect as useEffect2, useCallback } from "react";
|
|
10
|
+
import React3, { useState as useState2, useEffect as useEffect2, useCallback } from "react";
|
|
11
11
|
import { Box as Box8, Text as Text8, useApp, useInput as useInput2 } from "ink";
|
|
12
12
|
import {
|
|
13
13
|
Mina,
|
|
@@ -21,30 +21,41 @@ import {
|
|
|
21
21
|
|
|
22
22
|
// src/ui/theme.ts
|
|
23
23
|
var theme = {
|
|
24
|
-
// Primary
|
|
24
|
+
// Primary palette - Cyber Luxe
|
|
25
25
|
primary: "#7DD3FC",
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
|
|
26
|
+
// Cyan - main accent, bright and attention-grabbing
|
|
27
|
+
primaryDim: "#38BDF8",
|
|
28
|
+
// Dimmer cyan for subtle accents
|
|
29
|
+
secondary: "#94A3B8",
|
|
30
|
+
// Slate - refined supporting text
|
|
31
|
+
muted: "#64748B",
|
|
32
|
+
// Subtle gray - disabled/placeholder
|
|
33
|
+
// Status colors - Vivid & Clear
|
|
34
|
+
success: "#10B981",
|
|
35
|
+
// Emerald - completed/success
|
|
36
|
+
error: "#EF4444",
|
|
35
37
|
// Red - error/failed
|
|
36
|
-
warning: "#
|
|
37
|
-
//
|
|
38
|
+
warning: "#F59E0B",
|
|
39
|
+
// Amber - warning/pending
|
|
38
40
|
// UI elements
|
|
39
|
-
border: "#
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
41
|
+
border: "#334155",
|
|
42
|
+
// Slate border - more visible
|
|
43
|
+
borderLight: "#475569",
|
|
44
|
+
// Lighter border for emphasis
|
|
45
|
+
background: "#0F172A",
|
|
46
|
+
// Deep navy background
|
|
47
|
+
// Accent colors for visual interest
|
|
48
|
+
accent: "#A78BFA",
|
|
49
|
+
// Violet accent
|
|
50
|
+
accentAlt: "#F472B6",
|
|
51
|
+
// Pink accent
|
|
52
|
+
info: "#38BDF8",
|
|
47
53
|
// Light blue info
|
|
54
|
+
highlight: "#22D3EE",
|
|
55
|
+
// Bright cyan for highlights
|
|
56
|
+
// Gradient-like effects (text colors)
|
|
57
|
+
gradientStart: "#7DD3FC",
|
|
58
|
+
gradientEnd: "#A78BFA"
|
|
48
59
|
};
|
|
49
60
|
var borders = {
|
|
50
61
|
// Single line box
|
|
@@ -66,28 +77,64 @@ var borders = {
|
|
|
66
77
|
doubleTopLeft: "\u2554",
|
|
67
78
|
doubleTopRight: "\u2557",
|
|
68
79
|
doubleBottomLeft: "\u255A",
|
|
69
|
-
doubleBottomRight: "\u255D"
|
|
80
|
+
doubleBottomRight: "\u255D",
|
|
81
|
+
// Round corners (softer look)
|
|
82
|
+
roundTopLeft: "\u256D",
|
|
83
|
+
roundTopRight: "\u256E",
|
|
84
|
+
roundBottomLeft: "\u2570",
|
|
85
|
+
roundBottomRight: "\u256F",
|
|
86
|
+
// Heavy box (bold appearance)
|
|
87
|
+
heavyHorizontal: "\u2501",
|
|
88
|
+
heavyVertical: "\u2503"
|
|
70
89
|
};
|
|
71
90
|
var symbols = {
|
|
91
|
+
// Status indicators
|
|
72
92
|
pending: "\u25CB",
|
|
73
|
-
active: "\
|
|
93
|
+
active: "\u25C6",
|
|
74
94
|
completed: "\u2713",
|
|
75
95
|
failed: "\u2717",
|
|
76
|
-
|
|
96
|
+
// Navigation & UI
|
|
77
97
|
bullet: "\u2022",
|
|
78
98
|
arrow: "\u203A",
|
|
99
|
+
arrowRight: "\u2192",
|
|
100
|
+
arrowLeft: "\u2190",
|
|
101
|
+
arrowUp: "\u2191",
|
|
102
|
+
arrowDown: "\u2193",
|
|
103
|
+
pointer: "\u25B8",
|
|
104
|
+
pointerFilled: "\u25B6",
|
|
105
|
+
// Checks & crosses
|
|
79
106
|
check: "\u2714",
|
|
80
107
|
cross: "\u2718",
|
|
108
|
+
checkCircle: "\u25C9",
|
|
109
|
+
// Misc UI
|
|
81
110
|
search: "\u2315",
|
|
82
|
-
star: "\u2605"
|
|
111
|
+
star: "\u2605",
|
|
112
|
+
starEmpty: "\u2606",
|
|
113
|
+
diamond: "\u25C7",
|
|
114
|
+
diamondFilled: "\u25C6",
|
|
115
|
+
circle: "\u25CF",
|
|
116
|
+
circleEmpty: "\u25CB",
|
|
117
|
+
square: "\u25A0",
|
|
118
|
+
squareEmpty: "\u25A1",
|
|
119
|
+
// Progress
|
|
120
|
+
progressFull: "\u2588",
|
|
121
|
+
progressMid: "\u2593",
|
|
122
|
+
progressLight: "\u2591",
|
|
123
|
+
// Separators
|
|
124
|
+
dot: "\xB7",
|
|
125
|
+
pipe: "\u2502",
|
|
126
|
+
dash: "\u2500"
|
|
83
127
|
};
|
|
84
|
-
var MINA_LOGO =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
128
|
+
var MINA_LOGO = `\u2554\u2566\u2557\u2566\u2554\u2557\u2554\u2554\u2550\u2557
|
|
129
|
+
\u2551\u2551\u2551\u2551\u2551\u2551\u2551\u2560\u2550\u2563
|
|
130
|
+
\u2569 \u2569\u2569\u255D\u255A\u255D\u2569 \u2569`;
|
|
131
|
+
var MINA_LOGO_LARGE = `
|
|
132
|
+
\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557
|
|
133
|
+
\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
|
|
134
|
+
\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551
|
|
135
|
+
\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551
|
|
136
|
+
\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
|
|
137
|
+
\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D`;
|
|
91
138
|
var TAGLINE = "Cross-chain bridge to Hyperliquid";
|
|
92
139
|
|
|
93
140
|
// src/ui/Box.tsx
|
|
@@ -98,9 +145,12 @@ function Box({
|
|
|
98
145
|
borderColor = theme.border,
|
|
99
146
|
bordered = true,
|
|
100
147
|
padding = 1,
|
|
148
|
+
accent = false,
|
|
149
|
+
emphasis = false,
|
|
101
150
|
children,
|
|
102
151
|
...props
|
|
103
152
|
}) {
|
|
153
|
+
const effectiveBorderColor = accent ? theme.primary : borderColor;
|
|
104
154
|
if (!bordered) {
|
|
105
155
|
return /* @__PURE__ */ jsx(InkBox, { padding, ...props, children });
|
|
106
156
|
}
|
|
@@ -108,13 +158,17 @@ function Box({
|
|
|
108
158
|
InkBox,
|
|
109
159
|
{
|
|
110
160
|
flexDirection: "column",
|
|
111
|
-
borderStyle: "round",
|
|
112
|
-
borderColor,
|
|
161
|
+
borderStyle: emphasis ? "double" : "round",
|
|
162
|
+
borderColor: effectiveBorderColor,
|
|
113
163
|
paddingX: padding,
|
|
114
164
|
paddingY: padding > 0 ? 1 : 0,
|
|
115
165
|
...props,
|
|
116
166
|
children: [
|
|
117
|
-
title && /* @__PURE__ */ jsx(InkBox, { marginBottom: 1, children: /* @__PURE__ */
|
|
167
|
+
title && /* @__PURE__ */ jsx(InkBox, { marginBottom: 1, children: /* @__PURE__ */ jsxs(Text, { color: accent ? theme.primary : theme.secondary, bold: true, children: [
|
|
168
|
+
symbols.diamond,
|
|
169
|
+
" ",
|
|
170
|
+
title
|
|
171
|
+
] }) }),
|
|
118
172
|
children
|
|
119
173
|
]
|
|
120
174
|
}
|
|
@@ -123,9 +177,25 @@ function Box({
|
|
|
123
177
|
function Divider({
|
|
124
178
|
width = 40,
|
|
125
179
|
color = theme.border,
|
|
126
|
-
char
|
|
180
|
+
char,
|
|
181
|
+
label,
|
|
182
|
+
heavy = false
|
|
127
183
|
}) {
|
|
128
|
-
|
|
184
|
+
const dividerChar = char || (heavy ? borders.heavyHorizontal : borders.horizontal);
|
|
185
|
+
if (label) {
|
|
186
|
+
const labelLength = label.length + 2;
|
|
187
|
+
const sideWidth = Math.max(3, Math.floor((width - labelLength) / 2));
|
|
188
|
+
return /* @__PURE__ */ jsxs(InkBox, { children: [
|
|
189
|
+
/* @__PURE__ */ jsx(Text, { color, children: dividerChar.repeat(sideWidth) }),
|
|
190
|
+
/* @__PURE__ */ jsxs(Text, { color: theme.muted, children: [
|
|
191
|
+
" ",
|
|
192
|
+
label,
|
|
193
|
+
" "
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ jsx(Text, { color, children: dividerChar.repeat(sideWidth) })
|
|
196
|
+
] });
|
|
197
|
+
}
|
|
198
|
+
return /* @__PURE__ */ jsx(Text, { color, children: dividerChar.repeat(width) });
|
|
129
199
|
}
|
|
130
200
|
|
|
131
201
|
// src/ui/Header.tsx
|
|
@@ -134,24 +204,52 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
134
204
|
function Header({
|
|
135
205
|
showTagline = true,
|
|
136
206
|
tagline = TAGLINE,
|
|
137
|
-
compact = false
|
|
207
|
+
compact = false,
|
|
208
|
+
large = false
|
|
138
209
|
}) {
|
|
139
210
|
if (compact) {
|
|
140
211
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginBottom: 1, children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
212
|
+
/* @__PURE__ */ jsxs2(Box2, { children: [
|
|
213
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.accent, children: symbols.diamond }),
|
|
214
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.primary, bold: true, children: " MINA " }),
|
|
215
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.accent, children: symbols.diamond })
|
|
216
|
+
] }),
|
|
217
|
+
showTagline && /* @__PURE__ */ jsx2(Text2, { color: theme.muted, children: tagline })
|
|
143
218
|
] });
|
|
144
219
|
}
|
|
220
|
+
const logo = large ? MINA_LOGO_LARGE : MINA_LOGO;
|
|
145
221
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginBottom: 1, children: [
|
|
146
|
-
/* @__PURE__ */ jsx2(
|
|
147
|
-
|
|
222
|
+
/* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: logo.split("\n").filter((line) => line.length > 0).map((line, index, arr) => /* @__PURE__ */ jsx2(
|
|
223
|
+
Text2,
|
|
224
|
+
{
|
|
225
|
+
color: index === 0 ? theme.primary : index === arr.length - 1 ? theme.accent : theme.primaryDim,
|
|
226
|
+
bold: true,
|
|
227
|
+
children: line
|
|
228
|
+
},
|
|
229
|
+
index
|
|
230
|
+
)) }),
|
|
231
|
+
showTagline && /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ jsxs2(Box2, { children: [
|
|
232
|
+
/* @__PURE__ */ jsxs2(Text2, { color: theme.border, children: [
|
|
233
|
+
borders.roundTopLeft,
|
|
234
|
+
borders.heavyHorizontal
|
|
235
|
+
] }),
|
|
236
|
+
/* @__PURE__ */ jsxs2(Text2, { color: theme.muted, children: [
|
|
237
|
+
" ",
|
|
238
|
+
tagline,
|
|
239
|
+
" "
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ jsxs2(Text2, { color: theme.border, children: [
|
|
242
|
+
borders.heavyHorizontal,
|
|
243
|
+
borders.roundTopRight
|
|
244
|
+
] })
|
|
245
|
+
] }) })
|
|
148
246
|
] });
|
|
149
247
|
}
|
|
150
248
|
|
|
151
249
|
// src/ui/Select.tsx
|
|
152
250
|
import { Box as Box3, Text as Text3 } from "ink";
|
|
153
251
|
import InkSelectInput from "ink-select-input";
|
|
154
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
252
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
155
253
|
function Select({
|
|
156
254
|
items,
|
|
157
255
|
onSelect,
|
|
@@ -178,27 +276,44 @@ function Select({
|
|
|
178
276
|
const item = items.find((i) => i.label === label2);
|
|
179
277
|
const isDisabled = item?.disabled;
|
|
180
278
|
return /* @__PURE__ */ jsxs3(Box3, { children: [
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
279
|
+
/* @__PURE__ */ jsx3(Text3, { color: isSelected ? theme.primary : theme.border, children: isSelected ? symbols.pointerFilled : " " }),
|
|
280
|
+
/* @__PURE__ */ jsx3(Text3, { children: " " }),
|
|
281
|
+
/* @__PURE__ */ jsx3(
|
|
282
|
+
Text3,
|
|
283
|
+
{
|
|
284
|
+
color: isSelected ? theme.primary : isDisabled ? theme.muted : theme.secondary,
|
|
285
|
+
bold: isSelected,
|
|
286
|
+
children: label2
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
item?.description && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
290
|
+
/* @__PURE__ */ jsxs3(Text3, { color: theme.border, children: [
|
|
291
|
+
" ",
|
|
292
|
+
symbols.dash,
|
|
293
|
+
" "
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.muted, dimColor: true, children: item.description })
|
|
190
296
|
] })
|
|
191
297
|
] });
|
|
192
298
|
};
|
|
193
|
-
const indicatorComponent = (
|
|
299
|
+
const indicatorComponent = () => /* @__PURE__ */ jsx3(Text3, { children: " " });
|
|
194
300
|
if (disabled) {
|
|
195
301
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
196
302
|
label && /* @__PURE__ */ jsx3(Text3, { color: theme.muted, dimColor: true, children: label }),
|
|
197
|
-
/* @__PURE__ */ jsx3(Text3, { color: theme.muted, dimColor: true, children:
|
|
303
|
+
/* @__PURE__ */ jsx3(Box3, { children: /* @__PURE__ */ jsxs3(Text3, { color: theme.muted, dimColor: true, children: [
|
|
304
|
+
symbols.circleEmpty,
|
|
305
|
+
" (disabled)"
|
|
306
|
+
] }) })
|
|
198
307
|
] });
|
|
199
308
|
}
|
|
200
309
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
201
|
-
label && /* @__PURE__ */
|
|
310
|
+
label && /* @__PURE__ */ jsxs3(Box3, { marginBottom: 1, children: [
|
|
311
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.borderLight, children: borders.vertical }),
|
|
312
|
+
/* @__PURE__ */ jsxs3(Text3, { color: theme.secondary, children: [
|
|
313
|
+
" ",
|
|
314
|
+
label
|
|
315
|
+
] })
|
|
316
|
+
] }),
|
|
202
317
|
/* @__PURE__ */ jsx3(
|
|
203
318
|
InkSelectInput,
|
|
204
319
|
{
|
|
@@ -253,13 +368,13 @@ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
253
368
|
function getStatusIndicator(status) {
|
|
254
369
|
switch (status) {
|
|
255
370
|
case "pending":
|
|
256
|
-
return /* @__PURE__ */ jsx4(Text4, { color: theme.muted, children: symbols.
|
|
371
|
+
return /* @__PURE__ */ jsx4(Text4, { color: theme.muted, children: symbols.circleEmpty });
|
|
257
372
|
case "active":
|
|
258
|
-
return /* @__PURE__ */ jsx4(Text4, { color: theme.
|
|
373
|
+
return /* @__PURE__ */ jsx4(Text4, { color: theme.highlight, children: /* @__PURE__ */ jsx4(InkSpinner, { type: "dots" }) });
|
|
259
374
|
case "completed":
|
|
260
|
-
return /* @__PURE__ */ jsx4(Text4, { color: theme.success, children: symbols.
|
|
375
|
+
return /* @__PURE__ */ jsx4(Text4, { color: theme.success, children: symbols.checkCircle });
|
|
261
376
|
case "failed":
|
|
262
|
-
return /* @__PURE__ */ jsx4(Text4, { color: theme.error, children: symbols.
|
|
377
|
+
return /* @__PURE__ */ jsx4(Text4, { color: theme.error, children: symbols.cross });
|
|
263
378
|
}
|
|
264
379
|
}
|
|
265
380
|
function getStatusColor(status) {
|
|
@@ -267,28 +382,36 @@ function getStatusColor(status) {
|
|
|
267
382
|
case "pending":
|
|
268
383
|
return theme.muted;
|
|
269
384
|
case "active":
|
|
270
|
-
return theme.
|
|
385
|
+
return theme.highlight;
|
|
271
386
|
case "completed":
|
|
272
387
|
return theme.success;
|
|
273
388
|
case "failed":
|
|
274
389
|
return theme.error;
|
|
275
390
|
}
|
|
276
391
|
}
|
|
392
|
+
function getConnectorStyle(currentStatus, nextStatus) {
|
|
393
|
+
if (currentStatus === "completed") {
|
|
394
|
+
return { char: borders.vertical, color: theme.success };
|
|
395
|
+
}
|
|
396
|
+
if (currentStatus === "active") {
|
|
397
|
+
return { char: borders.vertical, color: theme.highlight };
|
|
398
|
+
}
|
|
399
|
+
return { char: borders.vertical, color: theme.border };
|
|
400
|
+
}
|
|
277
401
|
function StepItem({
|
|
278
402
|
step,
|
|
279
403
|
index,
|
|
280
404
|
showNumber,
|
|
281
405
|
showTimestamp,
|
|
282
|
-
isLast
|
|
406
|
+
isLast,
|
|
407
|
+
nextStep
|
|
283
408
|
}) {
|
|
284
409
|
const color = getStatusColor(step.status);
|
|
410
|
+
const connector = !isLast ? getConnectorStyle(step.status, nextStep?.status || "pending") : null;
|
|
285
411
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
286
412
|
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
287
413
|
/* @__PURE__ */ jsx4(Box4, { width: 3, children: getStatusIndicator(step.status) }),
|
|
288
|
-
showNumber && /* @__PURE__ */ jsx4(Box4, { width: 4, children: /* @__PURE__ */
|
|
289
|
-
index + 1,
|
|
290
|
-
"."
|
|
291
|
-
] }) }),
|
|
414
|
+
showNumber && /* @__PURE__ */ jsx4(Box4, { width: 4, children: /* @__PURE__ */ jsx4(Text4, { color, dimColor: step.status === "pending", children: String(index + 1).padStart(2, "0") }) }),
|
|
292
415
|
/* @__PURE__ */ jsx4(Box4, { flexGrow: 1, children: /* @__PURE__ */ jsx4(
|
|
293
416
|
Text4,
|
|
294
417
|
{
|
|
@@ -298,10 +421,19 @@ function StepItem({
|
|
|
298
421
|
children: step.label
|
|
299
422
|
}
|
|
300
423
|
) }),
|
|
424
|
+
step.status === "active" && /* @__PURE__ */ jsxs4(Box4, { marginLeft: 1, children: [
|
|
425
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.highlight, children: "[" }),
|
|
426
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.highlight, children: "processing" }),
|
|
427
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.highlight, children: "]" })
|
|
428
|
+
] }),
|
|
301
429
|
showTimestamp && step.timestamp && /* @__PURE__ */ jsx4(Box4, { marginLeft: 2, children: /* @__PURE__ */ jsx4(Text4, { color: theme.muted, dimColor: true, children: step.timestamp }) })
|
|
302
430
|
] }),
|
|
303
|
-
step.description && /* @__PURE__ */ jsx4(Box4, { marginLeft: showNumber ? 7 : 3, children: /* @__PURE__ */
|
|
304
|
-
|
|
431
|
+
step.description && /* @__PURE__ */ jsx4(Box4, { marginLeft: showNumber ? 7 : 3, children: /* @__PURE__ */ jsxs4(Text4, { color: step.status === "failed" ? theme.error : theme.muted, dimColor: step.status !== "failed", children: [
|
|
432
|
+
symbols.pointer,
|
|
433
|
+
" ",
|
|
434
|
+
step.description
|
|
435
|
+
] }) }),
|
|
436
|
+
connector && /* @__PURE__ */ jsx4(Box4, { marginLeft: 1, children: /* @__PURE__ */ jsx4(Text4, { color: connector.color, children: connector.char }) })
|
|
305
437
|
] });
|
|
306
438
|
}
|
|
307
439
|
function ProgressSteps({
|
|
@@ -311,7 +443,13 @@ function ProgressSteps({
|
|
|
311
443
|
title
|
|
312
444
|
}) {
|
|
313
445
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
314
|
-
title && /* @__PURE__ */
|
|
446
|
+
title && /* @__PURE__ */ jsxs4(Box4, { marginBottom: 1, children: [
|
|
447
|
+
/* @__PURE__ */ jsx4(Text4, { color: theme.borderLight, children: borders.vertical }),
|
|
448
|
+
/* @__PURE__ */ jsxs4(Text4, { color: theme.secondary, bold: true, children: [
|
|
449
|
+
" ",
|
|
450
|
+
title
|
|
451
|
+
] })
|
|
452
|
+
] }),
|
|
315
453
|
steps.map((step, index) => /* @__PURE__ */ jsx4(
|
|
316
454
|
StepItem,
|
|
317
455
|
{
|
|
@@ -319,7 +457,8 @@ function ProgressSteps({
|
|
|
319
457
|
index,
|
|
320
458
|
showNumber: showNumbers,
|
|
321
459
|
showTimestamp: showTimestamps,
|
|
322
|
-
isLast: index === steps.length - 1
|
|
460
|
+
isLast: index === steps.length - 1,
|
|
461
|
+
nextStep: steps[index + 1]
|
|
323
462
|
},
|
|
324
463
|
index
|
|
325
464
|
))
|
|
@@ -752,14 +891,23 @@ async function createSigner(privateKey, chainId, rpcUrl) {
|
|
|
752
891
|
8453: base,
|
|
753
892
|
43114: avalanche,
|
|
754
893
|
56: bsc,
|
|
755
|
-
// HyperEVM
|
|
894
|
+
// HyperEVM Mainnet
|
|
756
895
|
999: {
|
|
757
896
|
id: 999,
|
|
758
897
|
name: "HyperEVM",
|
|
759
|
-
nativeCurrency: { name: "
|
|
898
|
+
nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
|
|
760
899
|
rpcUrls: {
|
|
761
900
|
default: { http: ["https://rpc.hyperliquid.xyz/evm"] }
|
|
762
901
|
}
|
|
902
|
+
},
|
|
903
|
+
// HyperEVM Testnet
|
|
904
|
+
998: {
|
|
905
|
+
id: 998,
|
|
906
|
+
name: "HyperEVM Testnet",
|
|
907
|
+
nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
|
|
908
|
+
rpcUrls: {
|
|
909
|
+
default: { http: ["https://rpc.hyperliquid-testnet.xyz/evm"] }
|
|
910
|
+
}
|
|
763
911
|
}
|
|
764
912
|
};
|
|
765
913
|
const chain = chainMap[chainId];
|
|
@@ -795,7 +943,7 @@ async function createSigner(privateKey, chainId, rpcUrl) {
|
|
|
795
943
|
}
|
|
796
944
|
|
|
797
945
|
// src/commands/wizard.tsx
|
|
798
|
-
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
946
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
799
947
|
var initialState = {
|
|
800
948
|
step: "chain",
|
|
801
949
|
chain: null,
|
|
@@ -809,15 +957,60 @@ var initialState = {
|
|
|
809
957
|
executionStatus: ""
|
|
810
958
|
};
|
|
811
959
|
function NavigationHints({ step }) {
|
|
960
|
+
const Key = ({ children }) => /* @__PURE__ */ jsx8(Text8, { color: theme.borderLight, children: "[" });
|
|
961
|
+
const renderHint = (key, action, isLast = false) => /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
962
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.secondary, children: key }),
|
|
963
|
+
/* @__PURE__ */ jsxs8(Text8, { color: theme.muted, children: [
|
|
964
|
+
" ",
|
|
965
|
+
action
|
|
966
|
+
] }),
|
|
967
|
+
!isLast && /* @__PURE__ */ jsxs8(Text8, { color: theme.border, children: [
|
|
968
|
+
" ",
|
|
969
|
+
symbols.dot,
|
|
970
|
+
" "
|
|
971
|
+
] })
|
|
972
|
+
] });
|
|
812
973
|
const hints = {
|
|
813
|
-
chain:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
974
|
+
chain: /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
975
|
+
renderHint("\u2191\u2193", "Navigate"),
|
|
976
|
+
renderHint("Enter", "Select"),
|
|
977
|
+
renderHint("q", "Quit", true)
|
|
978
|
+
] }),
|
|
979
|
+
token: /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
980
|
+
renderHint("\u2191\u2193", "Navigate"),
|
|
981
|
+
renderHint("Enter", "Select"),
|
|
982
|
+
renderHint("b", "Back"),
|
|
983
|
+
renderHint("q", "Quit", true)
|
|
984
|
+
] }),
|
|
985
|
+
amount: /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
986
|
+
renderHint("0-9", "Type amount"),
|
|
987
|
+
renderHint("Enter", "Confirm"),
|
|
988
|
+
renderHint("b", "Back"),
|
|
989
|
+
renderHint("q", "Quit", true)
|
|
990
|
+
] }),
|
|
991
|
+
key: /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
992
|
+
renderHint("Paste", "Private key"),
|
|
993
|
+
renderHint("Enter", "Confirm"),
|
|
994
|
+
renderHint("b", "Back"),
|
|
995
|
+
renderHint("q", "Quit", true)
|
|
996
|
+
] }),
|
|
997
|
+
confirm: /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
998
|
+
renderHint("Enter", "Execute bridge"),
|
|
999
|
+
renderHint("b", "Back"),
|
|
1000
|
+
renderHint("q", "Quit", true)
|
|
1001
|
+
] }),
|
|
1002
|
+
execute: /* @__PURE__ */ jsxs8(Text8, { color: theme.muted, children: [
|
|
1003
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.primary, children: symbols.active }),
|
|
1004
|
+
" Processing transaction..."
|
|
1005
|
+
] })
|
|
819
1006
|
};
|
|
820
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ jsxs8(Box8, { marginTop: 1, paddingTop: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: theme.border, children: [
|
|
1008
|
+
/* @__PURE__ */ jsxs8(Text8, { color: theme.muted, children: [
|
|
1009
|
+
symbols.pointer,
|
|
1010
|
+
" "
|
|
1011
|
+
] }),
|
|
1012
|
+
hints[step]
|
|
1013
|
+
] });
|
|
821
1014
|
}
|
|
822
1015
|
function StepIndicator({ currentStep }) {
|
|
823
1016
|
const steps = ["chain", "token", "amount", "key", "confirm", "execute"];
|
|
@@ -830,27 +1023,41 @@ function StepIndicator({ currentStep }) {
|
|
|
830
1023
|
execute: "Execute"
|
|
831
1024
|
};
|
|
832
1025
|
const currentIndex = steps.indexOf(currentStep);
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
/* @__PURE__ */ jsxs8(
|
|
1026
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", marginBottom: 1, children: [
|
|
1027
|
+
/* @__PURE__ */ jsx8(Box8, { marginBottom: 1, children: steps.map((step, index) => {
|
|
1028
|
+
const isActive = index === currentIndex;
|
|
1029
|
+
const isCompleted = index < currentIndex;
|
|
1030
|
+
const isLast = index === steps.length - 1;
|
|
1031
|
+
return /* @__PURE__ */ jsxs8(React3.Fragment, { children: [
|
|
1032
|
+
/* @__PURE__ */ jsx8(
|
|
1033
|
+
Text8,
|
|
1034
|
+
{
|
|
1035
|
+
color: isCompleted ? theme.success : isActive ? theme.primary : theme.muted,
|
|
1036
|
+
bold: isActive,
|
|
1037
|
+
children: isCompleted ? symbols.checkCircle : isActive ? symbols.diamondFilled : symbols.circleEmpty
|
|
1038
|
+
}
|
|
1039
|
+
),
|
|
1040
|
+
!isLast && /* @__PURE__ */ jsx8(Text8, { color: isCompleted ? theme.success : theme.border, children: isCompleted ? "\u2501\u2501" : "\u2500\u2500" })
|
|
1041
|
+
] }, step);
|
|
1042
|
+
}) }),
|
|
1043
|
+
/* @__PURE__ */ jsx8(Box8, { children: steps.map((step, index) => {
|
|
1044
|
+
const isActive = index === currentIndex;
|
|
1045
|
+
const isCompleted = index < currentIndex;
|
|
1046
|
+
const isLast = index === steps.length - 1;
|
|
1047
|
+
const label = stepLabels[step];
|
|
1048
|
+
const paddedLabel = label.padEnd(isLast ? label.length : 5, " ");
|
|
1049
|
+
return /* @__PURE__ */ jsx8(
|
|
839
1050
|
Text8,
|
|
840
1051
|
{
|
|
841
1052
|
color: isActive ? theme.primary : isCompleted ? theme.success : theme.muted,
|
|
842
1053
|
bold: isActive,
|
|
843
1054
|
dimColor: !isActive && !isCompleted,
|
|
844
|
-
children:
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
),
|
|
851
|
-
/* @__PURE__ */ jsx8(Text8, { color: theme.muted, dimColor: true, children: separator })
|
|
852
|
-
] }, step);
|
|
853
|
-
}) });
|
|
1055
|
+
children: paddedLabel.slice(0, isLast ? void 0 : 5)
|
|
1056
|
+
},
|
|
1057
|
+
step
|
|
1058
|
+
);
|
|
1059
|
+
}) })
|
|
1060
|
+
] });
|
|
854
1061
|
}
|
|
855
1062
|
function ChainSelectionStep({
|
|
856
1063
|
onSelect,
|
|
@@ -2722,7 +2929,7 @@ function getHistory(limit = 10, address) {
|
|
|
2722
2929
|
}
|
|
2723
2930
|
|
|
2724
2931
|
// src/commands/history.tsx
|
|
2725
|
-
import { Fragment, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2932
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2726
2933
|
function formatDate(timestamp) {
|
|
2727
2934
|
return new Date(timestamp).toLocaleString("en-US", {
|
|
2728
2935
|
month: "2-digit",
|
|
@@ -2853,7 +3060,7 @@ function HistoryCommand({
|
|
|
2853
3060
|
entries.length !== 1 ? "s" : ""
|
|
2854
3061
|
] })
|
|
2855
3062
|
] }) }),
|
|
2856
|
-
entries.length === 0 ? /* @__PURE__ */ jsx14(EmptyState, { address }) : /* @__PURE__ */ jsxs14(
|
|
3063
|
+
entries.length === 0 ? /* @__PURE__ */ jsx14(EmptyState, { address }) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
2857
3064
|
/* @__PURE__ */ jsx14(
|
|
2858
3065
|
Table,
|
|
2859
3066
|
{
|
|
@@ -2890,7 +3097,7 @@ import {
|
|
|
2890
3097
|
Mina as Mina5,
|
|
2891
3098
|
getChains as getChains6
|
|
2892
3099
|
} from "@siphoyawe/mina-sdk";
|
|
2893
|
-
import { Fragment as
|
|
3100
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2894
3101
|
function truncateAddress2(address) {
|
|
2895
3102
|
if (address.length <= 14) return address;
|
|
2896
3103
|
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
@@ -3102,7 +3309,7 @@ function BalanceCommand({
|
|
|
3102
3309
|
borders.horizontal.repeat(boxWidth - 2),
|
|
3103
3310
|
borders.rightT
|
|
3104
3311
|
] }) }),
|
|
3105
|
-
!hasAnyBalances ? /* @__PURE__ */ jsx15(
|
|
3312
|
+
!hasAnyBalances ? /* @__PURE__ */ jsx15(Fragment4, { children: /* @__PURE__ */ jsxs15(Box15, { children: [
|
|
3106
3313
|
/* @__PURE__ */ jsx15(Text15, { color: theme.border, children: borders.vertical }),
|
|
3107
3314
|
/* @__PURE__ */ jsx15(Box15, { width: boxWidth - 2, justifyContent: "center", children: /* @__PURE__ */ jsx15(Text15, { color: theme.muted, children: "No balances found" }) }),
|
|
3108
3315
|
/* @__PURE__ */ jsx15(Text15, { color: theme.border, children: borders.vertical })
|