You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Predict first-time setup and credentials |[predict-setup.md](workflows/predict-setup.md)|
118
+
| Deposit or withdraw pUSD from Predict wallet |[predict-funding.md](workflows/predict-funding.md)|
119
+
| Search and browse prediction markets |[predict-markets.md](workflows/predict-markets.md)|
120
+
| Quote and place a prediction order |[predict-place-order.md](workflows/predict-place-order.md)|
121
+
| View or cancel Predict orders and positions |[predict-manage-orders.md](workflows/predict-manage-orders.md)|
122
+
| View Predict portfolio and redeem winnings |[predict-portfolio.md](workflows/predict-portfolio.md)|
116
123
| Token discovery, prices, and market data |[market-data.md](workflows/market-data.md)|
117
124
118
125
## Global Flags
@@ -187,6 +194,7 @@ Before constructing any command, validate all user-provided values:
187
194
|`--side` (predict) | Must be `buy` or `sell`|
188
195
|`--slippage`| Must be a number between 0 and 100 |
189
196
|`--from-chain`, `--to-chain`| Must be a positive integer EVM chain ID |
197
+
|`--to-address`| Must match `^0x[0-9a-fA-F]{40}$`. Only valid for cross-chain swaps (`--to-chain` differs from `--from-chain`); rejected for same-chain swaps |
190
198
|`--password`| Must be a non-empty string. Never log, display, or store the value. |
191
199
192
200
Do not pass unvalidated user input into any command.
@@ -199,7 +207,7 @@ Do not pass unvalidated user input into any command.
199
207
| Raw transactions | Always confirm transaction payload, chain, recipient, value, and calldata summary before executing |
200
208
| Message signing | Always show exact message and chain before signing |
201
209
| Typed-data signing | Always show domain, primary type, chain, verifying contract, and message summary before signing |
202
-
| Swaps / bridges | Always confirm from/to tokens, amount, source/destination chain, slippage, and quoted output before executing |
210
+
| Swaps / bridges | Always confirm from/to tokens, amount, source/destination chain, slippage, quoted output, and recipient address (if `--to-address` is set) before executing |
203
211
| Perps trading | Always confirm symbol, side, size, leverage, venue, order type, and limit price if present before executing |
204
212
| Perps deposit/withdraw | Always confirm amount, asset, venue, network, and destination where applicable before executing |
205
213
| Predict trading | Always confirm token ID, side, size, price, order type, market, and outcome before executing |
|`--to`| Yes (unless `--quote-id`) | Destination token symbol |
53
55
|`--amount`| Yes (unless `--quote-id`) | Amount to swap |
54
56
|`--from-chain`| Yes (unless `--quote-id`) | Source EVM chain ID |
55
-
|`--to-chain`| No | Destination EVM chain ID; defaults to `--from-chain` for same-chain swaps |
57
+
|`--to-chain`| No | Destination EVM chain ID. Defaults to `--from-chain` for same-chain swaps |
58
+
|`--to-address`| No | Recipient address for bridged output tokens. Only valid for cross-chain swaps. Defaults to the signer's wallet. Persisted quotes retain the recipient for `--quote-id` execution |
56
59
|`--slippage`| No | Maximum slippage as a percentage, 0-100 (defaults to 0.5) |
57
60
|`--password`| No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`]|
58
61
@@ -84,7 +87,7 @@ mm swap status --quote-id <id> [--tx-hash <hash>]
84
87
| Name | Required | Description |
85
88
| --- | --- | --- |
86
89
|`--quote-id`| Yes | Quote ID returned by `mm swap quote`|
87
-
|`--tx-hash`| No | Source transaction hash; overrides the stored hash from execute |
90
+
|`--tx-hash`| No | Source transaction hash. Overrides the stored hash from execute |
|`--trading-mode`| No |Trading mode for server wallets: `guard`(enforces outflow/whitelist policies) or `beast`(skips policy checks). Only applies to server-wallet mode (allowed: `guard`, `beast`) |
21
+
|`--trading-mode`| No |`guard` enforces outflow/whitelist policies and blocks malicious transactions. `beast` skips policy checks but still blocks malicious transactions. Only applies to server-wallet mode (allowed: `guard`, `beast`) |
22
22
|`--password`| No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`]|
23
23
24
24
### Example
@@ -127,6 +127,45 @@ mm wallet address
127
127
mm wallet address --chain-namespace evm
128
128
```
129
129
130
+
## `wallet trading-mode get` Command
131
+
132
+
Show the current trading mode, active server-wallet address, and policies for the selected wallet. Server-wallet mode only.
133
+
134
+
### Syntax
135
+
136
+
```bash
137
+
mm wallet trading-mode get
138
+
```
139
+
140
+
### Example
141
+
142
+
```bash
143
+
mm wallet trading-mode get
144
+
```
145
+
146
+
## `wallet trading-mode set` Command
147
+
148
+
Set the trading mode forthe active server wallet. Prompts for confirmation when switching to Beast mode. Rejects if the mode is already set or the session isn'tin server-wallet mode.
149
+
150
+
### Syntax
151
+
152
+
```bash
153
+
mm wallet trading-mode set<guard|beast>
154
+
```
155
+
156
+
### Supported Flags
157
+
158
+
| Name | Required | Description |
159
+
| --- | --- | --- |
160
+
|`<mode>`| Yes |`guard` enforces outflow/whitelist policies and blocks malicious transactions. `beast` skips policy checks but still blocks malicious transactions |
161
+
162
+
### Example
163
+
164
+
```bash
165
+
mm wallet trading-mode set guard
166
+
mm wallet trading-mode set beast
167
+
```
168
+
130
169
## `wallet balance` Command
131
170
132
171
Show native and token balances for the active wallet.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/onboarding.md
+4-18Lines changed: 4 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,10 @@ Reference command syntax in `references/auth.md` and `references/wallet.md`.
7
7
## Flow
8
8
9
9
1. Check CLI installation.
10
-
2. Configure environment (if not using production).
11
-
3. Login.
12
-
4. Initialize wallet mode.
13
-
5. Verify auth status.
14
-
6. Show wallet address.
10
+
2. Login.
11
+
3. Initialize wallet mode.
12
+
4. Verify auth status.
13
+
5. Show wallet address.
15
14
16
15
## Check CLI Installation
17
16
@@ -23,19 +22,6 @@ If this fails, the CLI is not installed. Guide the user to install it with `npm
23
22
24
23
Then run the version compatibility check from the skill `Preflight` section: compare the installed `major.minor` against the pinned `cliVersion` and the latest published release, and warn the user if they are out of sync.
25
24
26
-
## Configure Environment
27
-
28
-
Production (`prod`) is the default. Set the target environment **before** login if the user needs dev or uat:
29
-
30
-
```bash
31
-
mm config get env
32
-
mm config set env dev
33
-
```
34
-
35
-
For a one-off override without persisting, use `MM_ENV=dev mm login` (or `uat`).
36
-
37
-
To switch environments, run `mm config set env <prod|dev|uat>`.
38
-
39
25
## Login Flow
40
26
41
27
Ask the user which login method they want to use: MetaMask Mobile QR, Google, or Email. QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to Google or email there.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/perps-open-position.md
+43-9Lines changed: 43 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Perps Open Position Workflow
1
+
# Perps open position workflow
2
2
3
3
Use this workflow when the user wants to open a new perpetual position.
4
4
@@ -11,29 +11,63 @@ Reference command syntax in `references/perps.md`.
11
11
3. Dry run.
12
12
4. Confirm with the user and open.
13
13
14
-
## Confirm Symbol
14
+
## Confirm symbol
15
15
16
-
If the user does not mention a token symbol, list available markets and confirm with the user:
16
+
If the user doesn't mention a token symbol, list available markets and confirm with the user:
17
17
18
18
```bash
19
19
mm perps markets
20
20
```
21
21
22
-
## Check Balance
22
+
## Check balance
23
23
24
-
`--venue` defaults to `hyperliquid`. It can be omitted.
24
+
`--venue` defaults to `hyperliquid`. You can omit it.
25
25
26
26
```bash
27
27
mm perps balance
28
28
```
29
29
30
30
If available margin is zero or insufficient, deposit USDC before proceeding. Hyperliquid only supports deposits from Arbitrum mainnet (`eip155:42161`).
31
31
32
+
Check the user's Arbitrum balance for USDC and ETH (for gas).
33
+
34
+
```bash
35
+
mm wallet balance --chain 42161
36
+
```
37
+
38
+
### No ETH and no USDC on Arbitrum
39
+
40
+
Inform the user that ETH on Arbitrum is required for gas. Without ETH, no on-chain transaction is possible. Bridge from another chain.
41
+
42
+
```bash
43
+
mm swap quote --from <TOKEN> --to ETH --amount 0.001 --from-chain <SOURCE_CHAIN_ID> --to-chain 42161
44
+
mm swap execute --quote-id "$QUOTE_ID"# quote ID from the swap quote command
45
+
```
46
+
47
+
Once the user has ETH for gas, swap or bridge to get USDC on Arbitrum.
0 commit comments