Skip to content

Commit 40229e2

Browse files
authored
Update to latest CLI updates (#7)
Co-authored-by: Yashovardhan Agrawal <21066442+yashovardhan@users.noreply.github.com>
1 parent 591a304 commit 40229e2

13 files changed

Lines changed: 182 additions & 135 deletions

File tree

skills/metamask-agent-wallet/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use when the user asks anything about blockchain wallets, transacti
44
license: MIT
55
metadata:
66
author: metamask
7-
version: "1.0.0"
7+
version: "1.1.0"
88
---
99

1010
# MetaMask Agentic CLI Skill
@@ -66,8 +66,9 @@ Match the user's intent to a command and reference file, then read the reference
6666
| Create or refresh Predict credentials | `mm-dev predict auth` | [predict.md](references/predict.md) |
6767
| Repair Predict approvals | `mm-dev predict approve` | [predict.md](references/predict.md) |
6868
| Check Predict back-end status | `mm-dev predict status` | [predict.md](references/predict.md) |
69-
| Search prediction markets | `mm-dev predict markets` | [predict.md](references/predict.md) |
70-
| Inspect a prediction market | `mm-dev predict market` | [predict.md](references/predict.md) |
69+
| List prediction markets | `mm-dev predict markets list` | [predict.md](references/predict.md) |
70+
| Search prediction markets | `mm-dev predict markets search` | [predict.md](references/predict.md) |
71+
| Inspect a prediction market | `mm-dev predict markets get` | [predict.md](references/predict.md) |
7172
| Preview a prediction order cost | `mm-dev predict quote` | [predict.md](references/predict.md) |
7273
| Place a prediction market order | `mm-dev predict place` | [predict.md](references/predict.md) |
7374
| Cancel prediction orders | `mm-dev predict cancel` | [predict.md](references/predict.md) |

skills/metamask-agent-wallet/references/auth.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use these commands to initialize wallet mode, sign in, inspect authentication st
44

55
## `init` Command
66

7-
Initialize the project by selecting wallet mode and trading mode.
7+
Initialize the project by selecting wallet mode and trading mode. Requires an authenticated session — run `mm-dev login` first.
88

99
### Syntax
1010

@@ -56,7 +56,7 @@ mm-dev init show
5656

5757
## `login` Command
5858

59-
Sign in to the CLI. Defaults to QR / browser flow.
59+
Sign in to the CLI. On a TTY, bare `mm-dev login` shows a method picker (QR, Google, or email). QR is recommended but not auto-selected.
6060

6161
### Syntax
6262

@@ -84,7 +84,10 @@ mm-dev login --token "cliToken:cliRefreshToken"
8484

8585
### Note
8686

87-
Use `--no-wait` for non-interactive mode except QR flow. It prints the sign-in URL and exits immediately; complete authentication later with `mm-dev login --token`.
87+
- If already authenticated, the CLI returns `ALREADY_AUTHENTICATED`. Run `mm-dev logout` first, then log in again.
88+
- Pairing codes tolerate `-` and whitespace separators (e.g. `608-225` is equivalent to `608225`).
89+
- Use `mm-dev login google --no-wait` or `mm-dev login email --no-wait` for non-interactive/CI flows. Bare `mm-dev login --no-wait` fails without a TTY because no method is selected.
90+
- `--no-wait` is not supported with QR login. Complete authentication later with `mm-dev login --token`.
8891

8992
## `auth status` Command
9093

@@ -109,7 +112,7 @@ mm-dev auth status --toon
109112

110113
## `logout` Command
111114

112-
Sign out and clear auth credentials while keeping settings.
115+
Sign out and clear auth credentials plus local init state, wallet selection, and stored BYOK mnemonic.
113116

114117
### Syntax
115118

skills/metamask-agent-wallet/references/chain.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use `chains` commands to discover supported blockchain networks.
44

55
## `chains list` Command
66

7-
List all supported blockchain networks across all namespaces.
7+
List all supported EVM blockchain networks (EIP-155).
88

99
### Syntax
1010

@@ -28,4 +28,3 @@ mm-dev chains list --toon
2828
| Namespace | Notes |
2929
| --- | --- |
3030
| `eip155` | Major EVM chains, such as Ethereum, Polygon, Arbitrum, Optimism, and BSC |
31-
| `solana` | Solana chains |

skills/metamask-agent-wallet/references/errors.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
# Error Codes
22

3-
This reference lists raw CLI and SDK error codes. Workflows for diagnosing failures live in `../workflows/troubleshooting.md`.
3+
This reference lists error codes the CLI actually emits. SDK-only or remapped codes are noted where relevant. Workflows for diagnosing failures live in `../workflows/troubleshooting.md`.
44

55
## Auth Errors
66

77
| Code | Meaning |
88
| --- | --- |
9-
| `AUTH_FAILED` | Authentication failed |
10-
| `AUTH_ERROR` | Generic authentication error |
11-
| `TOKEN_INVALID` | Invalid CLI token |
9+
| `ALREADY_AUTHENTICATED` | Valid session already exists; run `mm-dev logout` before logging in again |
10+
| `AUTH_FAILED` | Authentication failed (includes missing refresh token cases) |
11+
| `AUTH_ERROR` | Generic authentication error (includes missing auth token cases) |
12+
| `TOKEN_INVALID` | Invalid CLI token, token pair, or project ID |
1213
| `TOKEN_REFRESH_FAILED` | Failed to refresh token |
13-
| `PAIRING_ABORTED` | Login pairing was aborted |
1414
| `PAIRING_TIMEOUT` | Login pairing timed out |
1515
| `PAIRING_EXPIRED` | Pairing session expired |
16-
| `INVALID_CLI_TOKENS` | CLI token pair is invalid |
17-
| `INVALID_CLI_TOKEN` | CLI token is invalid |
18-
| `MISSING_REFRESH_TOKEN` | Refresh token is missing |
19-
| `REFRESH_CLI_TOKEN_FAILED` | CLI token refresh failed |
20-
| `MISSING_TOKEN` | Required auth token is missing |
21-
| `REVOKE_CLI_TOKEN_FAILED` | CLI token revoke failed |
22-
| `INVALID_PROJECT_ID` | Project ID is invalid for the selected environment |
23-
| `MISSING_PROJECT_ID` | Project ID is not configured |
2416
| `INVALID_OTP` | Invalid one-time password |
2517
| `MWP_TIMEOUT` | Mobile Wallet Protocol timeout |
26-
| `MWP_CANCELLED` | Mobile Wallet Protocol cancelled |
27-
| `LOGOUT_FAILED` | Logout operation failed |
18+
| `MWP_CANCELLED` | Mobile Wallet Protocol cancelled (pairing aborted) |
19+
| `LOGOUT_FAILED` | Logout operation failed (includes token revoke failures) |
2820

2921
## Validation Errors
3022

@@ -67,12 +59,13 @@ This reference lists raw CLI and SDK error codes. Workflows for diagnosing failu
6759
| `PASSWORD_MISMATCH` | Password confirmation does not match |
6860
| `EMPTY_PASSWORD` | Empty password provided |
6961
| `WALLET_NOT_FOUND` | Wallet not found |
70-
| `WALLET_ERROR` | Wallet provider or wallet operation error |
62+
| `WALLET_ERROR` | Wallet provider or wallet operation error (includes on-chain reverts and network failures from wallet paths) |
7163
| `WALLET_METADATA` | Wallet metadata error |
7264
| `WRONG_NAMESPACE` | Wrong namespace for wallet |
7365
| `UNSUPPORTED_NAMESPACE` | Unsupported wallet namespace |
7466
| `NO_AUTH_TOKEN` | Missing authentication token for wallet operations |
7567
| `NO_PROJECT_ID` | Project ID not configured for wallet |
68+
| `MISSING_PROJECT_ID` | Project ID is not configured |
7669

7770
## Command Errors
7871

@@ -110,7 +103,7 @@ This reference lists raw CLI and SDK error codes. Workflows for diagnosing failu
110103
| `UNSUPPORTED_NETWORK` | Unsupported network for perps |
111104
| `UNSUPPORTED_ROUTE` | Unsupported deposit or withdraw route |
112105
| `UNSUPPORTED_ASSET` | Unsupported asset |
113-
| `UNSUPPORTED_SOURCE_CHAIN` | Unsupported source chain |
106+
| `UNSUPPORTED_SOURCE_CHAIN` | Unsupported source chain for perps deposit |
114107
| `INVALID_SYMBOL` | Unknown perpetual market symbol |
115108
| `INVALID_AMOUNT` | Invalid amount |
116109
| `INVALID_SIZE` | Invalid position size |
@@ -141,18 +134,17 @@ This reference lists raw CLI and SDK error codes. Workflows for diagnosing failu
141134
| `PREDICT_FUNDING_CHAIN_UNSUPPORTED` | Funding chain not supported |
142135
| `PREDICT_INSUFFICIENT_BALANCE` | Insufficient Predict balance |
143136
| `PREDICT_INSUFFICIENT_ALLOWANCE` | Insufficient Predict allowance |
137+
| `PREDICT_INSUFFICIENT_FUNDING_BALANCE` | Insufficient funding balance for Predict deposit |
144138
| `PREDICT_CANCEL_TARGET_REQUIRED` | Cancel target not specified |
145139
| `PREDICT_WALLET_STATE_REQUIRED` | Wallet state required for Predict |
146140
| `PREDICT_METHOD_UNAVAILABLE` | Predict method not available |
141+
| `PREDICT_DEPOSIT_FAILED` | Predict deposit failed |
142+
| `PREDICT_ERROR` | Generic Predict error |
143+
| `UNSUPPORTED_PREDICT_CHAIN` | Predict chain not supported |
147144

148145
## Network & Filesystem Errors
149146

150147
| Code | Meaning |
151148
| --- | --- |
152149
| `NETWORK_UNREACHABLE` | Network unreachable |
153-
| `NETWORK_TIMEOUT` | Network timeout |
154-
| `NETWORK_ERROR` | Generic network error |
155150
| `RESET_FAILED` | Failed to reset CLI session |
156-
| `MNEMONIC_STORE_FAILED` | Failed to store mnemonic |
157-
| `FILESYSTEM_ERROR` | Generic filesystem error |
158-
| `TX_REVERTED` | Transaction reverted on-chain |

skills/metamask-agent-wallet/references/market-data.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Fetch historical prices for an asset.
3535
### Syntax
3636

3737
```bash
38-
mm-dev price history --chain-id <caip2-chain-id> --asset-type <asset-type> [--time-period <period>] [--interval <interval>] [--from <unix>] [--to <unix>]
38+
mm-dev price history --chain-id <caip2-chain-id> --asset-type <asset-type> [--time-period <period>] [--interval <interval>] [--from <unix>] [--to <unix>] [--vs <currency>]
3939
```
4040

4141
### Supported Flags
@@ -95,16 +95,16 @@ List popular, trending, or top-gainer tokens.
9595
### Syntax
9696

9797
```bash
98-
mm-dev token list popular --chain <chain>
99-
mm-dev token list trending --chain <chain>
100-
mm-dev token list top-gainer --chain <chain>
98+
mm-dev token list popular [--chain <chain>]
99+
mm-dev token list trending [--chain <chain>]
100+
mm-dev token list top-gainer [--chain <chain>]
101101
```
102102

103103
### Supported Flags
104104

105105
| Name | Required | Description |
106106
| --- | --- | --- |
107-
| `--chain` | Yes | Chain id, CAIP-2 id, or configured chain key |
107+
| `--chain` | No | Chain id, CAIP-2 id, or configured chain key. Defaults to the active wallet chain, or `eip155:1` if none is selected |
108108

109109
### Example
110110

@@ -128,9 +128,9 @@ mm-dev token list search --query <query> [--chain <chains>] [--limit <n>] [--aft
128128

129129
| Name | Required | Description |
130130
| --- | --- | --- |
131-
| `--query` | Yes | Search query |
132-
| `--chain` | No | Chain id, CAIP-2 id, or configured chain key |
133-
| `--limit` | No | Maximum results |
131+
| `--query` | Yes | Search query by symbol or name (e.g. USDC, Wrapped Ether) |
132+
| `--chain` | No | Comma-separated chain IDs, CAIP-2 IDs, or configured chain keys. Defaults to the active wallet chain, or `eip155:1` if none is selected |
133+
| `--limit` | No | Maximum results (defaults to 10; 1-500) |
134134
| `--after` | No | Pagination cursor |
135135

136136
### Example

0 commit comments

Comments
 (0)