@mint.club/v2-cli 2.0.0 → 2.0.1

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 Mint Club contributors
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 CHANGED
@@ -72,6 +72,26 @@ export MINTCLUB_RPC_BASE_SEPOLIA=https://your-rpc.example
72
72
 
73
73
  The variable format is `MINTCLUB_RPC_<UPPERCASE_CLI_KEY>`, with non-alphanumeric separators replaced by underscores (`base-sepolia` becomes `BASE_SEPOLIA`).
74
74
 
75
+ ## Wallet and private-key safety
76
+
77
+ The CLI writes generated keys with file mode `0600`. Never commit `~/.mintclub/.env`, paste a funded key into an agent conversation, or place a key directly in a command argument.
78
+
79
+ ### Migrating from `wallet --set-private-key <key>`
80
+
81
+ The argv-based import option was removed because shells and process inspectors can retain its value. For automation, inject `PRIVATE_KEY` from your secret manager into the `mc` process environment. To migrate an existing key into the CLI wallet file without putting it in argv or shell history, use a hidden Bash prompt:
82
+
83
+ ```bash
84
+ umask 077
85
+ mkdir -p ~/.mintclub
86
+ chmod 700 ~/.mintclub
87
+ read -rsp 'Private key: ' PRIVATE_KEY; printf '\n'
88
+ printf 'PRIVATE_KEY=%s\n' "$PRIVATE_KEY" > ~/.mintclub/.env
89
+ unset PRIVATE_KEY
90
+ chmod 600 ~/.mintclub/.env
91
+ ```
92
+
93
+ Do not replace `<key>` inline in any command. Existing scripts should read from a protected file descriptor or secret manager, export `PRIVATE_KEY` only for the child process, and unset it immediately afterward.
94
+
75
95
  ## Read operations
76
96
 
77
97
  ```bash
@@ -82,18 +102,22 @@ mc --chain robinhood wallet
82
102
 
83
103
  USD pricing uses chain-specific DefiLlama feeds where available. This is independent of routing; route quotes use RPC calls only.
84
104
 
105
+ ## Confirm write operations
106
+
107
+ `buy`, `sell`, `zap-buy`, `zap-sell`, and `send` refuse to broadcast unless `--yes` is present. Review the chain, assets, exact amounts, and max/min limits before adding it. `create` keeps an interactive confirmation prompt; use `--yes` only after reviewing the complete curve and royalty summary or from an already-confirmed non-interactive adapter.
108
+
85
109
  ## Bond mint and burn
86
110
 
87
111
  Use these commands when paying or receiving the token's configured reserve ERC-20.
88
112
 
89
113
  ```bash
90
114
  # Mint an exact Mint Club token amount
91
- mc --chain base buy SIGNET --amount 100
92
- mc --chain arbitrum buy 0xTOKEN --amount 100 --max-cost 25
115
+ mc --chain base buy SIGNET --amount 100 --yes
116
+ mc --chain arbitrum buy 0xTOKEN --amount 100 --max-cost 25 --yes
93
117
 
94
118
  # Burn an exact Mint Club token amount
95
- mc --chain base sell SIGNET --amount 100
96
- mc --chain arbitrum sell 0xTOKEN --amount 100 --min-refund 20
119
+ mc --chain base sell SIGNET --amount 100 --yes
120
+ mc --chain arbitrum sell 0xTOKEN --amount 100 --min-refund 20 --yes
97
121
  ```
98
122
 
99
123
  `--max-cost` and `--min-refund` are denominated in the reserve token and respect its on-chain decimals. If omitted, the current quote is used as the exact on-chain limit; provide an explicit limit to tolerate price movement before inclusion.
@@ -108,13 +132,15 @@ The Mint Club token may use the ERC-20 or ERC-1155 implementation. ERC-1155 Mint
108
132
  mc --chain arbitrum zap-buy 0xMINT_CLUB_TOKEN \
109
133
  --input-token USDT \
110
134
  --input-amount 10 \
111
- --slippage 1
135
+ --slippage 1 \
136
+ --yes
112
137
 
113
138
  mc --chain base zap-buy SIGNET \
114
139
  --input-token 0xARBITRARY_ERC20 \
115
140
  --input-amount 250 \
116
141
  --min-tokens 100 \
117
- --slippage 0.5
142
+ --slippage 0.5 \
143
+ --yes
118
144
  ```
119
145
 
120
146
  `--input-amount` is exact. If `--min-tokens` is omitted, the CLI performs a read-only `zapMint` preview with zero token minimum, applies the requested slippage to the preview result, and simulates the final protected call before sending.
@@ -127,12 +153,14 @@ Native input is supported with `--input-token NATIVE` (or the native symbol such
127
153
  mc --chain unichain zap-sell 0xMINT_CLUB_TOKEN \
128
154
  --amount 100 \
129
155
  --output-token USDC \
130
- --slippage 1
156
+ --slippage 1 \
157
+ --yes
131
158
 
132
159
  mc --chain robinhood zap-sell 0xMINT_CLUB_TOKEN \
133
160
  --amount 100 \
134
161
  --output-token NATIVE \
135
- --min-output 0.02
162
+ --min-output 0.02 \
163
+ --yes
136
164
  ```
137
165
 
138
166
  `--amount` is the exact Mint Club token amount to burn. The target may be an ERC-20 or ERC-1155 Mint Club token; use whole-number amounts for ERC-1155. The routed output must be native currency or an ERC-20 token. If `--min-output` is omitted, the selected route quote is reduced by the requested slippage. When the reserve token already equals the requested output token, no router command is emitted and the exact burn refund becomes the default minimum.
@@ -198,11 +226,12 @@ Prices are encoded using the reserve token's actual decimals. Non-flat presets r
198
226
  ## Transfer and balances
199
227
 
200
228
  ```bash
201
- mc --chain avalanche send 0xRECIPIENT --amount 0.01
202
- mc --chain robinhood send 0xRECIPIENT --amount 100 --token USDG
229
+ mc --chain avalanche send 0xRECIPIENT --amount 0.01 --yes
230
+ mc --chain robinhood send 0xRECIPIENT --amount 100 --token USDG --yes
203
231
  mc --chain base send 0xRECIPIENT --amount 3 \
204
232
  --token 0xERC1155_CONTRACT \
205
- --token-id 0
233
+ --token-id 0 \
234
+ --yes
206
235
  mc --chain polygon wallet
207
236
  ```
208
237