@siphoyawe/mina-cli 1.2.4 → 1.2.6

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.
@@ -0,0 +1,331 @@
1
+ <p align="center">
2
+ <img src="mina-cli-logo.svg" alt="Mina CLI" width="400" />
3
+ </p>
4
+
5
+ <h1 align="center">@siphoyawe/mina-cli</h1>
6
+
7
+ <p align="center">
8
+ <strong>Terminal-based cross-chain bridge to Hyperliquid</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ Bridge assets from any chain directly from your command line
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/@siphoyawe/mina-cli">
17
+ <img src="https://img.shields.io/npm/v/@siphoyawe/mina-cli.svg" alt="npm version" />
18
+ </a>
19
+ <a href="https://www.typescriptlang.org/">
20
+ <img src="https://img.shields.io/badge/TypeScript-Ready-blue.svg" alt="TypeScript" />
21
+ </a>
22
+ <a href="https://opensource.org/licenses/MIT">
23
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" />
24
+ </a>
25
+ </p>
26
+
27
+ ---
28
+
29
+ ## Features
30
+
31
+ - **Interactive Wizard** - Step-by-step guided bridging experience
32
+ - **Multi-chain Support** - Bridge from 40+ chains including Ethereum, Arbitrum, Polygon, Base, and more
33
+ - **Auto-deposit** - Automatic deposit to Hyperliquid L1 trading account
34
+ - **Transaction Tracking** - Real-time status monitoring with progress indicators
35
+ - **Local History** - Track all your bridge transactions locally
36
+ - **Beautiful TUI** - Dark luxe terminal theme with elegant UI components
37
+ - **JSON Output** - Machine-readable output for scripting and automation
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ # npm
43
+ npm install -g @siphoyawe/mina-cli
44
+
45
+ # yarn
46
+ yarn global add @siphoyawe/mina-cli
47
+
48
+ # pnpm
49
+ pnpm add -g @siphoyawe/mina-cli
50
+ ```
51
+
52
+ ## Quick Start
53
+
54
+ ### Interactive Wizard (Recommended)
55
+
56
+ Simply run `mina` with no arguments to launch the interactive wizard:
57
+
58
+ ```bash
59
+ mina
60
+ ```
61
+
62
+ The wizard will guide you through:
63
+ 1. Selecting a source chain
64
+ 2. Choosing a token to bridge
65
+ 3. Entering the amount
66
+ 4. Confirming and executing the transaction
67
+
68
+ ### Get a Quote
69
+
70
+ ```bash
71
+ # Get a quote for bridging USDC from Arbitrum
72
+ mina quote --from arbitrum --token USDC --amount 100
73
+
74
+ # Get a quote with JSON output
75
+ mina quote --from ethereum --token ETH --amount 0.5 --json
76
+ ```
77
+
78
+ ### Execute a Bridge
79
+
80
+ ```bash
81
+ # Bridge USDC from Arbitrum (will prompt for private key)
82
+ mina bridge --from arbitrum --token USDC --amount 100
83
+
84
+ # Bridge with a key file
85
+ mina bridge --from arbitrum --token USDC --amount 100 --key ./key.json
86
+
87
+ # Skip confirmation prompt
88
+ mina bridge --from ethereum --token ETH --amount 0.5 --key ./key.json --yes
89
+ ```
90
+
91
+ ## Commands
92
+
93
+ ### `mina` / `mina wizard`
94
+
95
+ Launch the interactive bridge wizard.
96
+
97
+ ```bash
98
+ mina
99
+ mina wizard
100
+ ```
101
+
102
+ ### `mina quote`
103
+
104
+ Get a bridge quote without executing.
105
+
106
+ ```bash
107
+ mina quote --from <chain> --token <symbol> --amount <number> [options]
108
+ ```
109
+
110
+ | Option | Description | Default |
111
+ |--------|-------------|---------|
112
+ | `--from <chain>` | Source chain (required) | - |
113
+ | `--to <chain>` | Destination chain | `hyperliquid` |
114
+ | `--token <symbol>` | Token symbol (required) | - |
115
+ | `--amount <number>` | Amount to bridge (required) | - |
116
+ | `--json` | Output as JSON | `false` |
117
+
118
+ ### `mina bridge`
119
+
120
+ Execute a bridge transaction.
121
+
122
+ ```bash
123
+ mina bridge --from <chain> --token <symbol> --amount <number> [options]
124
+ ```
125
+
126
+ | Option | Description | Default |
127
+ |--------|-------------|---------|
128
+ | `--from <chain>` | Source chain (required) | - |
129
+ | `--token <symbol>` | Token symbol (required) | - |
130
+ | `--amount <number>` | Amount to bridge (required) | - |
131
+ | `--key <path>` | Path to private key file | Prompt |
132
+ | `--yes` | Skip confirmation prompt | `false` |
133
+ | `--auto-deposit` | Auto-deposit to Hyperliquid L1 | `true` |
134
+
135
+ ### `mina status`
136
+
137
+ Check the status of a bridge transaction.
138
+
139
+ ```bash
140
+ mina status <txHash> [options]
141
+ ```
142
+
143
+ | Option | Description | Default |
144
+ |--------|-------------|---------|
145
+ | `--watch` | Poll for real-time updates | `false` |
146
+
147
+ ### `mina chains`
148
+
149
+ List all supported source chains.
150
+
151
+ ```bash
152
+ mina chains [options]
153
+ ```
154
+
155
+ | Option | Description | Default |
156
+ |--------|-------------|---------|
157
+ | `--json` | Output as JSON | `false` |
158
+
159
+ ### `mina tokens`
160
+
161
+ List bridgeable tokens.
162
+
163
+ ```bash
164
+ mina tokens [options]
165
+ ```
166
+
167
+ | Option | Description | Default |
168
+ |--------|-------------|---------|
169
+ | `--chain <chain>` | Filter by chain (name or ID) | All chains |
170
+ | `--json` | Output as JSON | `false` |
171
+
172
+ ### `mina balance`
173
+
174
+ Check wallet token balances.
175
+
176
+ ```bash
177
+ mina balance --address <address> [options]
178
+ ```
179
+
180
+ | Option | Description | Default |
181
+ |--------|-------------|---------|
182
+ | `--address <address>` | Wallet address (required) | - |
183
+ | `--chain <chain>` | Specific chain (name or ID) | All chains |
184
+ | `--all` | Show all tokens including zero balance | `false` |
185
+ | `--json` | Output as JSON | `false` |
186
+
187
+ ### `mina history`
188
+
189
+ View bridge transaction history.
190
+
191
+ ```bash
192
+ mina history [options]
193
+ ```
194
+
195
+ | Option | Description | Default |
196
+ |--------|-------------|---------|
197
+ | `--limit <number>` | Number of entries to show | `10` |
198
+ | `--address <address>` | Filter by wallet address | All |
199
+ | `--json` | Output as JSON | `false` |
200
+
201
+ ### `mina config`
202
+
203
+ Manage CLI configuration.
204
+
205
+ ```bash
206
+ # List all config
207
+ mina config list
208
+
209
+ # Get a specific value
210
+ mina config get <key>
211
+
212
+ # Set a value
213
+ mina config set <key> <value>
214
+ ```
215
+
216
+ **Configuration Options:**
217
+
218
+ | Key | Type | Description | Default |
219
+ |-----|------|-------------|---------|
220
+ | `slippage` | `number` | Slippage tolerance (percentage) | `0.5` |
221
+ | `autoDeposit` | `boolean` | Auto-deposit to Hyperliquid L1 | `true` |
222
+ | `defaultChain` | `string` | Default source chain | `arbitrum` |
223
+ | `rpc.<chain>` | `string` | Custom RPC URL per chain | Default RPC |
224
+
225
+ **Examples:**
226
+
227
+ ```bash
228
+ mina config set slippage 1.0
229
+ mina config set defaultChain ethereum
230
+ mina config set rpc.arbitrum https://arb1.example.com
231
+ ```
232
+
233
+ ## Private Key Handling
234
+
235
+ The CLI supports multiple formats for providing your private key:
236
+
237
+ ### Key File (Recommended)
238
+
239
+ Create a JSON file with your private key:
240
+
241
+ ```json
242
+ {
243
+ "privateKey": "0x..."
244
+ }
245
+ ```
246
+
247
+ Or use plain text format:
248
+
249
+ ```
250
+ 0x1234567890abcdef...
251
+ ```
252
+
253
+ Then pass it to the bridge command:
254
+
255
+ ```bash
256
+ mina bridge --from arbitrum --token USDC --amount 100 --key ./key.json
257
+ ```
258
+
259
+ ### Interactive Prompt
260
+
261
+ If no key file is provided, you'll be prompted to enter your private key:
262
+
263
+ ```bash
264
+ mina bridge --from arbitrum --token USDC --amount 100
265
+ # Enter private key (input will be visible):
266
+ ```
267
+
268
+ **Security Note:** Never share your private key. Store key files securely and add them to `.gitignore`.
269
+
270
+ ## Configuration File
271
+
272
+ CLI settings are stored in `~/.mina/config.json`. Bridge history is stored in `~/.mina/history.json`.
273
+
274
+ ## Supported Chains
275
+
276
+ | Chain | Chain ID |
277
+ |-------|----------|
278
+ | Ethereum | 1 |
279
+ | Arbitrum | 42161 |
280
+ | Optimism | 10 |
281
+ | Base | 8453 |
282
+ | Polygon | 137 |
283
+ | BSC | 56 |
284
+ | Avalanche | 43114 |
285
+ | Fantom | 250 |
286
+ | zkSync Era | 324 |
287
+ | Linea | 59144 |
288
+ | Scroll | 534352 |
289
+ | And 30+ more... | |
290
+
291
+ **Destination:** HyperEVM (Chain ID: 999) with automatic deposit to Hyperliquid L1
292
+
293
+ ## Examples
294
+
295
+ ```bash
296
+ # Launch the interactive wizard
297
+ mina
298
+
299
+ # Get a quote for bridging 100 USDC from Arbitrum
300
+ mina quote --from arbitrum --token USDC --amount 100
301
+
302
+ # Bridge 0.5 ETH from Ethereum
303
+ mina bridge --from ethereum --token ETH --amount 0.5 --key ./key.json
304
+
305
+ # Check transaction status with live updates
306
+ mina status 0x1234...abcd --watch
307
+
308
+ # View supported chains in JSON format
309
+ mina chains --json
310
+
311
+ # List tokens available on Arbitrum
312
+ mina tokens --chain arbitrum
313
+
314
+ # Check wallet balance on all chains
315
+ mina balance --address 0x1234...abcd
316
+
317
+ # View recent bridge history
318
+ mina history --limit 20
319
+
320
+ # Configure default slippage
321
+ mina config set slippage 1.0
322
+ ```
323
+
324
+ ## Related Packages
325
+
326
+ - [@siphoyawe/mina-sdk](https://www.npmjs.com/package/@siphoyawe/mina-sdk) - The underlying SDK with React hooks
327
+ - [Mina Web App](https://www.usemina.co) - Web interface for bridging
328
+
329
+ ## License
330
+
331
+ MIT
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="mina-cli-logo.svg" alt="Mina CLI" width="400" />
2
+ <img src="mina-cli-logo.png" alt="Mina CLI" width="400" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">@siphoyawe/mina-cli</h1>
@@ -324,7 +324,7 @@ mina config set slippage 1.0
324
324
  ## Related Packages
325
325
 
326
326
  - [@siphoyawe/mina-sdk](https://www.npmjs.com/package/@siphoyawe/mina-sdk) - The underlying SDK with React hooks
327
- - [Mina Bridge Web App](https://github.com/siphoyawe/mina-sdk) - Web interface for bridging
327
+ - [Mina Web App](https://www.usemina.co) - Web interface for bridging
328
328
 
329
329
  ## License
330
330
 
package/README.npm.md ADDED
@@ -0,0 +1,331 @@
1
+ <p align="center">
2
+ <img src="mina-cli-logo.png" alt="Mina CLI" width="400" />
3
+ </p>
4
+
5
+ <h1 align="center">@siphoyawe/mina-cli</h1>
6
+
7
+ <p align="center">
8
+ <strong>Terminal-based cross-chain bridge to Hyperliquid</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ Bridge assets from any chain directly from your command line
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/@siphoyawe/mina-cli">
17
+ <img src="https://img.shields.io/npm/v/@siphoyawe/mina-cli.svg" alt="npm version" />
18
+ </a>
19
+ <a href="https://www.typescriptlang.org/">
20
+ <img src="https://img.shields.io/badge/TypeScript-Ready-blue.svg" alt="TypeScript" />
21
+ </a>
22
+ <a href="https://opensource.org/licenses/MIT">
23
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" />
24
+ </a>
25
+ </p>
26
+
27
+ ---
28
+
29
+ ## Features
30
+
31
+ - **Interactive Wizard** - Step-by-step guided bridging experience
32
+ - **Multi-chain Support** - Bridge from 40+ chains including Ethereum, Arbitrum, Polygon, Base, and more
33
+ - **Auto-deposit** - Automatic deposit to Hyperliquid L1 trading account
34
+ - **Transaction Tracking** - Real-time status monitoring with progress indicators
35
+ - **Local History** - Track all your bridge transactions locally
36
+ - **Beautiful TUI** - Dark luxe terminal theme with elegant UI components
37
+ - **JSON Output** - Machine-readable output for scripting and automation
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ # npm
43
+ npm install -g @siphoyawe/mina-cli
44
+
45
+ # yarn
46
+ yarn global add @siphoyawe/mina-cli
47
+
48
+ # pnpm
49
+ pnpm add -g @siphoyawe/mina-cli
50
+ ```
51
+
52
+ ## Quick Start
53
+
54
+ ### Interactive Wizard (Recommended)
55
+
56
+ Simply run `mina` with no arguments to launch the interactive wizard:
57
+
58
+ ```bash
59
+ mina
60
+ ```
61
+
62
+ The wizard will guide you through:
63
+ 1. Selecting a source chain
64
+ 2. Choosing a token to bridge
65
+ 3. Entering the amount
66
+ 4. Confirming and executing the transaction
67
+
68
+ ### Get a Quote
69
+
70
+ ```bash
71
+ # Get a quote for bridging USDC from Arbitrum
72
+ mina quote --from arbitrum --token USDC --amount 100
73
+
74
+ # Get a quote with JSON output
75
+ mina quote --from ethereum --token ETH --amount 0.5 --json
76
+ ```
77
+
78
+ ### Execute a Bridge
79
+
80
+ ```bash
81
+ # Bridge USDC from Arbitrum (will prompt for private key)
82
+ mina bridge --from arbitrum --token USDC --amount 100
83
+
84
+ # Bridge with a key file
85
+ mina bridge --from arbitrum --token USDC --amount 100 --key ./key.json
86
+
87
+ # Skip confirmation prompt
88
+ mina bridge --from ethereum --token ETH --amount 0.5 --key ./key.json --yes
89
+ ```
90
+
91
+ ## Commands
92
+
93
+ ### `mina` / `mina wizard`
94
+
95
+ Launch the interactive bridge wizard.
96
+
97
+ ```bash
98
+ mina
99
+ mina wizard
100
+ ```
101
+
102
+ ### `mina quote`
103
+
104
+ Get a bridge quote without executing.
105
+
106
+ ```bash
107
+ mina quote --from <chain> --token <symbol> --amount <number> [options]
108
+ ```
109
+
110
+ | Option | Description | Default |
111
+ |--------|-------------|---------|
112
+ | `--from <chain>` | Source chain (required) | - |
113
+ | `--to <chain>` | Destination chain | `hyperliquid` |
114
+ | `--token <symbol>` | Token symbol (required) | - |
115
+ | `--amount <number>` | Amount to bridge (required) | - |
116
+ | `--json` | Output as JSON | `false` |
117
+
118
+ ### `mina bridge`
119
+
120
+ Execute a bridge transaction.
121
+
122
+ ```bash
123
+ mina bridge --from <chain> --token <symbol> --amount <number> [options]
124
+ ```
125
+
126
+ | Option | Description | Default |
127
+ |--------|-------------|---------|
128
+ | `--from <chain>` | Source chain (required) | - |
129
+ | `--token <symbol>` | Token symbol (required) | - |
130
+ | `--amount <number>` | Amount to bridge (required) | - |
131
+ | `--key <path>` | Path to private key file | Prompt |
132
+ | `--yes` | Skip confirmation prompt | `false` |
133
+ | `--auto-deposit` | Auto-deposit to Hyperliquid L1 | `true` |
134
+
135
+ ### `mina status`
136
+
137
+ Check the status of a bridge transaction.
138
+
139
+ ```bash
140
+ mina status <txHash> [options]
141
+ ```
142
+
143
+ | Option | Description | Default |
144
+ |--------|-------------|---------|
145
+ | `--watch` | Poll for real-time updates | `false` |
146
+
147
+ ### `mina chains`
148
+
149
+ List all supported source chains.
150
+
151
+ ```bash
152
+ mina chains [options]
153
+ ```
154
+
155
+ | Option | Description | Default |
156
+ |--------|-------------|---------|
157
+ | `--json` | Output as JSON | `false` |
158
+
159
+ ### `mina tokens`
160
+
161
+ List bridgeable tokens.
162
+
163
+ ```bash
164
+ mina tokens [options]
165
+ ```
166
+
167
+ | Option | Description | Default |
168
+ |--------|-------------|---------|
169
+ | `--chain <chain>` | Filter by chain (name or ID) | All chains |
170
+ | `--json` | Output as JSON | `false` |
171
+
172
+ ### `mina balance`
173
+
174
+ Check wallet token balances.
175
+
176
+ ```bash
177
+ mina balance --address <address> [options]
178
+ ```
179
+
180
+ | Option | Description | Default |
181
+ |--------|-------------|---------|
182
+ | `--address <address>` | Wallet address (required) | - |
183
+ | `--chain <chain>` | Specific chain (name or ID) | All chains |
184
+ | `--all` | Show all tokens including zero balance | `false` |
185
+ | `--json` | Output as JSON | `false` |
186
+
187
+ ### `mina history`
188
+
189
+ View bridge transaction history.
190
+
191
+ ```bash
192
+ mina history [options]
193
+ ```
194
+
195
+ | Option | Description | Default |
196
+ |--------|-------------|---------|
197
+ | `--limit <number>` | Number of entries to show | `10` |
198
+ | `--address <address>` | Filter by wallet address | All |
199
+ | `--json` | Output as JSON | `false` |
200
+
201
+ ### `mina config`
202
+
203
+ Manage CLI configuration.
204
+
205
+ ```bash
206
+ # List all config
207
+ mina config list
208
+
209
+ # Get a specific value
210
+ mina config get <key>
211
+
212
+ # Set a value
213
+ mina config set <key> <value>
214
+ ```
215
+
216
+ **Configuration Options:**
217
+
218
+ | Key | Type | Description | Default |
219
+ |-----|------|-------------|---------|
220
+ | `slippage` | `number` | Slippage tolerance (percentage) | `0.5` |
221
+ | `autoDeposit` | `boolean` | Auto-deposit to Hyperliquid L1 | `true` |
222
+ | `defaultChain` | `string` | Default source chain | `arbitrum` |
223
+ | `rpc.<chain>` | `string` | Custom RPC URL per chain | Default RPC |
224
+
225
+ **Examples:**
226
+
227
+ ```bash
228
+ mina config set slippage 1.0
229
+ mina config set defaultChain ethereum
230
+ mina config set rpc.arbitrum https://arb1.example.com
231
+ ```
232
+
233
+ ## Private Key Handling
234
+
235
+ The CLI supports multiple formats for providing your private key:
236
+
237
+ ### Key File (Recommended)
238
+
239
+ Create a JSON file with your private key:
240
+
241
+ ```json
242
+ {
243
+ "privateKey": "0x..."
244
+ }
245
+ ```
246
+
247
+ Or use plain text format:
248
+
249
+ ```
250
+ 0x1234567890abcdef...
251
+ ```
252
+
253
+ Then pass it to the bridge command:
254
+
255
+ ```bash
256
+ mina bridge --from arbitrum --token USDC --amount 100 --key ./key.json
257
+ ```
258
+
259
+ ### Interactive Prompt
260
+
261
+ If no key file is provided, you'll be prompted to enter your private key:
262
+
263
+ ```bash
264
+ mina bridge --from arbitrum --token USDC --amount 100
265
+ # Enter private key (input will be visible):
266
+ ```
267
+
268
+ **Security Note:** Never share your private key. Store key files securely and add them to `.gitignore`.
269
+
270
+ ## Configuration File
271
+
272
+ CLI settings are stored in `~/.mina/config.json`. Bridge history is stored in `~/.mina/history.json`.
273
+
274
+ ## Supported Chains
275
+
276
+ | Chain | Chain ID |
277
+ |-------|----------|
278
+ | Ethereum | 1 |
279
+ | Arbitrum | 42161 |
280
+ | Optimism | 10 |
281
+ | Base | 8453 |
282
+ | Polygon | 137 |
283
+ | BSC | 56 |
284
+ | Avalanche | 43114 |
285
+ | Fantom | 250 |
286
+ | zkSync Era | 324 |
287
+ | Linea | 59144 |
288
+ | Scroll | 534352 |
289
+ | And 30+ more... | |
290
+
291
+ **Destination:** HyperEVM (Chain ID: 999) with automatic deposit to Hyperliquid L1
292
+
293
+ ## Examples
294
+
295
+ ```bash
296
+ # Launch the interactive wizard
297
+ mina
298
+
299
+ # Get a quote for bridging 100 USDC from Arbitrum
300
+ mina quote --from arbitrum --token USDC --amount 100
301
+
302
+ # Bridge 0.5 ETH from Ethereum
303
+ mina bridge --from ethereum --token ETH --amount 0.5 --key ./key.json
304
+
305
+ # Check transaction status with live updates
306
+ mina status 0x1234...abcd --watch
307
+
308
+ # View supported chains in JSON format
309
+ mina chains --json
310
+
311
+ # List tokens available on Arbitrum
312
+ mina tokens --chain arbitrum
313
+
314
+ # Check wallet balance on all chains
315
+ mina balance --address 0x1234...abcd
316
+
317
+ # View recent bridge history
318
+ mina history --limit 20
319
+
320
+ # Configure default slippage
321
+ mina config set slippage 1.0
322
+ ```
323
+
324
+ ## Related Packages
325
+
326
+ - [@siphoyawe/mina-sdk](https://www.npmjs.com/package/@siphoyawe/mina-sdk) - The underlying SDK with React hooks
327
+ - [Mina Web App](https://www.usemina.co) - Web interface for bridging
328
+
329
+ ## License
330
+
331
+ MIT
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siphoyawe/mina-cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "CLI tool for Mina Bridge - Bridge assets from any chain to Hyperliquid",
5
5
  "author": "Mina Bridge Contributors",
6
6
  "license": "MIT",
@@ -11,7 +11,9 @@
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "files": [
14
- "dist"
14
+ "dist",
15
+ "README.md",
16
+ "mina-cli-logo.png"
15
17
  ],
16
18
  "engines": {
17
19
  "node": ">=18"
@@ -23,7 +25,7 @@
23
25
  "commander": "^12.0.0",
24
26
  "chalk": "^5.0.0",
25
27
  "viem": "^2.21.0",
26
- "@siphoyawe/mina-sdk": "1.2.9"
28
+ "@siphoyawe/mina-sdk": "1.3.2"
27
29
  },
28
30
  "devDependencies": {
29
31
  "@types/node": "^20.10.0",