@vultisig/cli 0.2.0 → 0.4.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 (4) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/README.md +112 -29
  3. package/dist/index.js +543 -168
  4. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,115 @@
1
1
  # @vultisig/cli
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - Add `vultisig delete` command to remove vaults from local storage without manually deleting files from `~/.vultisig/`. Supports deletion by vault name, ID, or ID prefix, with confirmation prompt (skippable via `--yes` flag).
8
+
9
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - Add discount command to view VULT discount tier for swap fees
10
+ - New `discount` command shows current tier, fee rate, and next tier requirements
11
+ - Support `--refresh` flag to force cache invalidation
12
+ - Swap quotes now display discount tier when affiliate fees are applied
13
+ - Updated README with discount tier documentation
14
+
15
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - Add `--add-all` flag to chains command to add all supported chains at once
16
+
17
+ New vaults start with only 5 default chains, but the SDK supports 36 chains. Users previously had to run `chains --add <chain>` 31 times to enable all chains. Now they can simply run:
18
+
19
+ ```bash
20
+ vultisig chains --add-all
21
+ ```
22
+
23
+ This works in both CLI mode and interactive shell mode.
24
+
25
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - feat: add Phantom wallet Solana derivation path support
26
+
27
+ When importing a seedphrase, the SDK now detects if the mnemonic was originally created in Phantom wallet by checking both the standard Solana BIP44 path and Phantom's non-standard path (`m/44'/501'/0'/0'`).
28
+
29
+ **SDK changes:**
30
+ - `discoverChainsFromSeedphrase()` now returns `ChainDiscoveryAggregate` with `results` and `usePhantomSolanaPath` flag
31
+ - Added `usePhantomSolanaPath` option to `createFastVaultFromSeedphrase()`, `createSecureVaultFromSeedphrase()`, and `joinSecureVault()`
32
+ - Auto-detection during chain discovery: uses Phantom path when it has balance and standard path doesn't
33
+
34
+ **CLI changes:**
35
+ - Added `--use-phantom-solana-path` flag to `create-from-seedphrase fast` and `create-from-seedphrase secure` commands
36
+
37
+ **Examples:**
38
+ - Added Phantom Solana path toggle checkbox in SeedphraseImporter component
39
+
40
+ ### Patch Changes
41
+
42
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - Fix balance display to show human-readable amounts instead of raw values (wei/satoshis). Add `--raw` flag for programmatic use.
43
+
44
+ - [#84](https://github.com/vultisig/vultisig-sdk/pull/84) [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - fix: address code review items across SDK and CLI
45
+
46
+ **CLI improvements:**
47
+ - Fix Phantom path detection message to use effective flag value
48
+ - Add ambiguous vault detection in delete command with descriptive error messages
49
+ - Refactor `findVaultByIdOrName` to use object parameter and throw on ambiguous matches
50
+ - Import tier config from SDK instead of hardcoding values in discount command
51
+
52
+ **SDK improvements:**
53
+ - Export VULT discount tier configuration for CLI consumption
54
+ - Add error handling in SwapService using attempt/withFallback pattern
55
+
56
+ **Documentation fixes:**
57
+ - Add `text` language identifier to code fence in CLI README
58
+ - Remove redundant "originally" word from Phantom wallet descriptions
59
+ - Update "affiliate fee discounts" to "swap fee discounts" terminology
60
+
61
+ - Updated dependencies [[`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160), [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160), [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160), [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160), [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160), [`86cf505`](https://github.com/vultisig/vultisig-sdk/commit/86cf50517a528a0ef43c36b70c477adbec245160)]:
62
+ - @vultisig/sdk@0.4.0
63
+
64
+ ## 0.3.0
65
+
66
+ ### Minor Changes
67
+
68
+ - [#71](https://github.com/vultisig/vultisig-sdk/pull/71) [`cc4e5fd`](https://github.com/vultisig/vultisig-sdk/commit/cc4e5fd2ff83bcce1723435107af869a43ea069f) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - Update CLI to support SDK vault creation API changes
69
+
70
+ **Breaking Changes:**
71
+ - Renamed `import-seedphrase` command to `create-from-seedphrase` to match SDK naming
72
+ - `vultisig import-seedphrase fast` → `vultisig create-from-seedphrase fast`
73
+ - `vultisig import-seedphrase secure` → `vultisig create-from-seedphrase secure`
74
+
75
+ **New Features:**
76
+ - Added `join secure` command to join existing SecureVault creation sessions
77
+ - Supports QR payload via `--qr`, `--qr-file`, or interactive prompt
78
+ - Auto-detects if mnemonic is required based on session type
79
+ - Example: `vultisig join secure --qr "vultisig://..."`
80
+
81
+ **Internal Changes:**
82
+ - Updated SDK API calls to use new method names:
83
+ - `importSeedphraseAsFastVault` → `createFastVaultFromSeedphrase`
84
+ - `importSeedphraseAsSecureVault` → `createSecureVaultFromSeedphrase`
85
+ - Renamed internal functions and types to match SDK naming conventions
86
+
87
+ ### Patch Changes
88
+
89
+ - [#71](https://github.com/vultisig/vultisig-sdk/pull/71) [`fee3f37`](https://github.com/vultisig/vultisig-sdk/commit/fee3f375f85011d14be814f06ff3d7f6684ea2fe) Thanks [@bornslippynuxx](https://github.com/bornslippynuxx)! - fix: address CodeRabbit PR #71 review suggestions
90
+
91
+ **Critical fixes:**
92
+ - JoinSecureVaultService: require `devices` parameter instead of defaulting to 2
93
+ - CLI vault-management: validate `devices` parameter before calling SDK
94
+ - parseKeygenQR: throw error on unknown libType instead of silently defaulting
95
+
96
+ **Code quality:**
97
+ - Replace try-catch with attempt() pattern in JoinSecureVaultService and parseKeygenQR
98
+ - Add abort signal checks in SecureVaultJoiner callbacks
99
+
100
+ **Documentation:**
101
+ - Add onProgress callback to joinSecureVault README documentation
102
+ - Fix markdown heading format in SDK-USERS-GUIDE.md
103
+ - Add language specifier to code block in CLAUDE.md
104
+
105
+ **Tests:**
106
+ - Fix Korean test mnemonic (removed invalid comma)
107
+ - Add Korean language detection test
108
+ - Remove sensitive private key logging in test helpers
109
+
110
+ - Updated dependencies [[`fee3f37`](https://github.com/vultisig/vultisig-sdk/commit/fee3f375f85011d14be814f06ff3d7f6684ea2fe), [`695e664`](https://github.com/vultisig/vultisig-sdk/commit/695e664668082ca55861cf4d8fcc8c323be94c06), [`4edf52d`](https://github.com/vultisig/vultisig-sdk/commit/4edf52d3a2985d2adf772239bf19b8301f360af8), [`d145809`](https://github.com/vultisig/vultisig-sdk/commit/d145809eb68653a3b22921fcb90ebc985de2b16a)]:
111
+ - @vultisig/sdk@0.3.0
112
+
3
113
  ## 0.2.0
4
114
 
5
115
  ### Minor Changes
package/README.md CHANGED
@@ -56,19 +56,16 @@ vultisig completion fish >> ~/.config/fish/completions/vultisig.fish
56
56
  ### Create a Fast Vault
57
57
 
58
58
  ```bash
59
- vultisig create
59
+ vultisig create fast --name "My Wallet" --password "mypassword" --email user@example.com
60
60
  ```
61
61
 
62
62
  You'll be prompted to:
63
- 1. Enter a vault name
64
- 2. Set a password (min 8 characters)
65
- 3. Provide an email for verification
66
- 4. Enter the verification code sent to your email
63
+ 1. Enter the verification code sent to your email
67
64
 
68
65
  ### Create a Secure Vault (Multi-Device)
69
66
 
70
67
  ```bash
71
- vultisig create --secure --name "Team Wallet" --shares 3
68
+ vultisig create secure --name "Team Wallet" --shares 3
72
69
  ```
73
70
 
74
71
  This creates a secure vault with configurable N-of-M threshold:
@@ -78,12 +75,12 @@ This creates a secure vault with configurable N-of-M threshold:
78
75
  4. Vault is created and ready to use
79
76
 
80
77
  **Secure vault options:**
81
- - `--shares <n>` - Number of participating devices (default: 2)
82
- - `--threshold <n>` - Signing threshold (default: ceil((shares+1)/2))
78
+ - `--shares <n>` - Number of participating devices (default: 3)
79
+ - `--threshold <n>` - Signing threshold (default: 2)
83
80
 
84
81
  **Example session:**
85
82
  ```bash
86
- $ vultisig create --secure --name "Team Wallet" --shares 3
83
+ $ vultisig create secure --name "Team Wallet" --shares 3
87
84
 
88
85
  Creating secure vault: Team Wallet (2-of-3)
89
86
 
@@ -111,28 +108,30 @@ Import an existing wallet from a BIP39 recovery phrase (12 or 24 words):
111
108
 
112
109
  ```bash
113
110
  # FastVault import (server-assisted 2-of-2)
114
- vultisig import-seedphrase fast --name "Imported Wallet" --email user@example.com
111
+ vultisig create-from-seedphrase fast --name "Imported Wallet" --email user@example.com
115
112
 
116
113
  # SecureVault import (multi-device MPC)
117
- vultisig import-seedphrase secure --name "Team Wallet" --shares 3
114
+ vultisig create-from-seedphrase secure --name "Team Wallet" --shares 3
118
115
  ```
119
116
 
120
117
  **Import options:**
121
118
  - `--mnemonic <words>` - Recovery phrase (space-separated words)
122
119
  - `--discover-chains` - Scan chains for existing balances before import
123
120
  - `--chains <chains>` - Specific chains to enable (comma-separated)
121
+ - `--use-phantom-solana-path` - Use Phantom wallet derivation path for Solana
124
122
 
125
123
  When `--mnemonic` is not provided, you'll be prompted to enter it securely (masked input).
126
124
 
125
+ > **Note:** Phantom wallet uses a non-standard derivation path for Solana. If your seedphrase was originally created in Phantom and you're importing Solana funds, use `--use-phantom-solana-path`. When using `--discover-chains`, this is auto-detected.
126
+
127
127
  **Example session:**
128
128
  ```bash
129
- $ vultisig import-seedphrase fast --name "My Wallet" --email user@example.com --discover-chains
129
+ $ vultisig create-from-seedphrase fast --name "My Wallet" --email user@example.com --password "mypassword" --discover-chains
130
130
 
131
131
  Enter your 12 or 24-word recovery phrase.
132
132
  Words will be hidden as you type.
133
133
 
134
134
  Seedphrase: ************************
135
- Password: ********
136
135
  ✓ Valid 12-word seedphrase
137
136
 
138
137
  Discovering chains with balances...
@@ -216,11 +215,13 @@ vultisig -i
216
215
 
217
216
  | Command | Description |
218
217
  |---------|-------------|
219
- | `create` | Create a new fast vault (server-assisted) |
220
- | `create --secure` | Create a secure vault (multi-device MPC) |
218
+ | `create fast` | Create a new fast vault (server-assisted 2-of-2) |
219
+ | `create secure` | Create a secure vault (multi-device MPC) |
221
220
  | `import <file>` | Import vault from .vult file |
222
- | `import-seedphrase fast` | Import seedphrase as FastVault (2-of-2) |
223
- | `import-seedphrase secure` | Import seedphrase as SecureVault (N-of-M) |
221
+ | `delete [vault]` | Delete a vault from local storage |
222
+ | `create-from-seedphrase fast` | Import seedphrase as FastVault (2-of-2) |
223
+ | `create-from-seedphrase secure` | Import seedphrase as SecureVault (N-of-M) |
224
+ | `join secure` | Join an existing SecureVault creation session |
224
225
  | `export [path]` | Export vault to file |
225
226
  | `verify <vaultId>` | Verify vault with email code |
226
227
  | `vaults` | List all stored vaults |
@@ -228,28 +229,60 @@ vultisig -i
228
229
  | `rename <newName>` | Rename the active vault |
229
230
  | `info` | Show detailed vault information |
230
231
 
231
- **Create options:**
232
- - `--secure` - Create a secure vault instead of fast vault
233
- - `--name <name>` - Vault name
234
- - `--shares <n>` - Number of devices for secure vault (default: 2)
235
- - `--threshold <n>` - Signing threshold (default: ceil((shares+1)/2))
232
+ **Create fast options:**
233
+ - `--name <name>` - Vault name (required)
234
+ - `--password <password>` - Vault password (required)
235
+ - `--email <email>` - Email for verification (required)
236
+
237
+ **Create secure options:**
238
+ - `--name <name>` - Vault name (required)
239
+ - `--password <password>` - Vault password (optional)
240
+ - `--shares <n>` - Number of devices (default: 3)
241
+ - `--threshold <n>` - Signing threshold (default: 2)
242
+
243
+ **Delete options:**
244
+ - `[vault]` - Vault name or ID to delete (defaults to active vault)
245
+ - `-y, --yes` - Skip confirmation prompt
246
+
247
+ ```bash
248
+ # Delete by vault name
249
+ vultisig delete "My Wallet"
250
+
251
+ # Delete by vault ID (or prefix)
252
+ vultisig delete abc123
253
+
254
+ # Delete active vault
255
+ vultisig delete
256
+
257
+ # Skip confirmation (for scripts)
258
+ vultisig delete "Test Vault" --yes
259
+ ```
260
+
261
+ **Join secure options:**
262
+ - `--qr <payload>` - QR code payload from initiator (vultisig://...)
263
+ - `--qr-file <path>` - Read QR payload from file
264
+ - `--mnemonic <words>` - Seedphrase (required for seedphrase-based sessions)
265
+ - `--password <password>` - Vault password (optional)
266
+ - `--devices <n>` - Total devices in session (default: 2)
236
267
 
237
- **Import seedphrase options (fast):**
268
+ **Create-from-seedphrase fast options:**
238
269
  - `--name <name>` - Vault name (required)
239
270
  - `--email <email>` - Email for verification (required)
240
- - `--password <password>` - Vault password (required, prompted if not provided)
271
+ - `--password <password>` - Vault password (required)
241
272
  - `--mnemonic <words>` - Recovery phrase (prompted securely if not provided)
242
273
  - `--discover-chains` - Auto-enable chains with existing balances
243
274
  - `--chains <chains>` - Specific chains to enable (comma-separated)
275
+ - `--use-phantom-solana-path` - Use Phantom wallet derivation path for Solana
244
276
 
245
- **Import seedphrase options (secure):**
277
+ **Create-from-seedphrase secure options:**
246
278
  - `--name <name>` - Vault name (required)
247
- - `--shares <n>` - Number of devices (default: 2)
279
+ - `--shares <n>` - Number of devices (default: 3)
248
280
  - `--threshold <n>` - Signing threshold (default: ceil((shares+1)/2))
249
281
  - `--password <password>` - Vault password (optional)
250
282
  - `--mnemonic <words>` - Recovery phrase (prompted securely if not provided)
251
283
  - `--discover-chains` - Auto-enable chains with existing balances
252
284
  - `--chains <chains>` - Specific chains to enable (comma-separated)
285
+ - `--use-phantom-solana-path` - Use Phantom wallet derivation path for Solana
253
286
 
254
287
  **Export options:**
255
288
  - `[path]` - Output file or directory (defaults to SDK-generated filename in current directory)
@@ -299,6 +332,9 @@ vultisig export
299
332
  | `swap <from> <to> <amount>` | Execute a swap |
300
333
 
301
334
  ```bash
335
+ # Get a swap quote
336
+ vultisig swap-quote ethereum bitcoin 0.1
337
+
302
338
  # Execute a swap
303
339
  vultisig swap ethereum bitcoin 0.1
304
340
 
@@ -309,6 +345,8 @@ vultisig swap ethereum bitcoin 0.1 --password mypassword
309
345
  vultisig swap ethereum bitcoin 0.1 -y --password mypassword
310
346
  ```
311
347
 
348
+ Swap quotes and previews show your VULT discount tier when affiliate fees are applied. See `vultisig discount` for tier details.
349
+
312
350
  ### Advanced Operations
313
351
 
314
352
  | Command | Description |
@@ -513,8 +551,51 @@ vultisig broadcast --chain sui --raw-tx '{"unsignedTx":"<base64-tx-bytes>","sign
513
551
  |---------|-------------|
514
552
  | `currency [code]` | View or set currency preference |
515
553
  | `server` | Check server connectivity |
554
+ | `discount` | Show your VULT discount tier for swap fees |
516
555
  | `address-book` | Manage saved addresses |
517
556
 
557
+ #### Discount Tiers
558
+
559
+ View your VULT token holdings discount tier for reduced swap fees:
560
+
561
+ ```bash
562
+ # Show current discount tier
563
+ vultisig discount
564
+
565
+ # Force refresh from blockchain
566
+ vultisig discount --refresh
567
+ ```
568
+
569
+ **Output:**
570
+ ```text
571
+ +----------------------------------------+
572
+ | VULT Discount Tier |
573
+ +----------------------------------------+
574
+
575
+ Current Tier: Gold
576
+ Swap Fee: 30 bps (0.30%)
577
+ Discount: 20 bps saved
578
+
579
+ Next Tier:
580
+ Platinum - requires 15,000 VULT
581
+
582
+ Tip: Thorguard NFT holders get +1 tier upgrade (up to gold)
583
+ ```
584
+
585
+ **Tier levels:**
586
+
587
+ | Tier | VULT Required | Swap Fee | Discount |
588
+ |------|---------------|----------|----------|
589
+ | None | 0 | 50 bps | - |
590
+ | Bronze | 1,500 | 45 bps | 5 bps |
591
+ | Silver | 3,000 | 40 bps | 10 bps |
592
+ | Gold | 7,500 | 30 bps | 20 bps |
593
+ | Platinum | 15,000 | 25 bps | 25 bps |
594
+ | Diamond | 100,000 | 15 bps | 35 bps |
595
+ | Ultimate | 1,000,000 | 0 bps | 50 bps |
596
+
597
+ Thorguard NFT holders receive a free tier upgrade (up to gold tier).
598
+
518
599
  ### CLI Management
519
600
 
520
601
  | Command | Description |
@@ -528,8 +609,10 @@ vultisig broadcast --chain sui --raw-tx '{"unsignedTx":"<base64-tx-bytes>","sign
528
609
  | Command | Description |
529
610
  |---------|-------------|
530
611
  | `vault <name>` | Switch to a different vault |
531
- | `create <fast\|secure>` | Create a new vault |
532
- | `import-seedphrase <fast\|secure>` | Import wallet from recovery phrase |
612
+ | `vaults` | List all vaults |
613
+ | `create` | Create a new vault |
614
+ | `import <file>` | Import vault from file |
615
+ | `delete [name]` | Delete a vault |
533
616
  | `lock` | Lock vault (clear cached password) |
534
617
  | `unlock` | Unlock vault (cache password) |
535
618
  | `status` | Show vault status |
@@ -732,7 +815,7 @@ Configuration is stored in `~/.vultisig/`:
732
815
 
733
816
  Create or import a vault first:
734
817
  ```bash
735
- vultisig create
818
+ vultisig create fast --name "My Wallet" --password "mypassword" --email user@example.com
736
819
  # or
737
820
  vultisig import /path/to/vault.vult
738
821
  ```