Skip to content

Commit acca72a

Browse files
committed
Update for 0.4.0
1 parent 83e256c commit acca72a

12 files changed

Lines changed: 81 additions & 18 deletions

File tree

skills/metamask-agent-wallet/SKILL.md

Lines changed: 5 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.2.0"
7+
version: "1.3.0"
88
---
99

1010
# MetaMask Agentic CLI Skill
@@ -23,7 +23,7 @@ Match the user's intent to a command and reference file, then read the reference
2323
| Login in MetaMask Agentic CLI | `mm-dev login` | [auth.md](references/auth.md) |
2424
| Choose a wallet mode and set up policies | `mm-dev init` | [auth.md](references/auth.md) |
2525
| Show current init settings | `mm-dev init show` | [auth.md](references/auth.md) |
26-
| Sign in via QR code | `mm-dev login qr` | [auth.md](references/auth.md) |
26+
| Sign in via QR code (coming soon) | `mm-dev login qr` | [auth.md](references/auth.md) |
2727
| Sign in via Google | `mm-dev login google` | [auth.md](references/auth.md) |
2828
| Sign in via email OTP | `mm-dev login email` | [auth.md](references/auth.md) |
2929
| Sign out | `mm-dev logout` | [auth.md](references/auth.md) |
@@ -77,6 +77,7 @@ Match the user's intent to a command and reference file, then read the reference
7777
| View open prediction orders | `mm-dev predict orders` | [predict.md](references/predict.md) |
7878
| Check Predict deposit wallet balance | `mm-dev predict balance` | [predict.md](references/predict.md) |
7979
| Fund Predict deposit wallet | `mm-dev predict deposit` | [predict.md](references/predict.md) |
80+
| Withdraw pUSD from Predict deposit wallet | `mm-dev predict withdraw` | [predict.md](references/predict.md) |
8081
| Fetch prediction order book | `mm-dev predict book` | [predict.md](references/predict.md) |
8182
| Watch a Predict job | `mm-dev predict watch` | [predict.md](references/predict.md) |
8283
| Get a swap or bridge quote | `mm-dev swap quote` | [swap.md](references/swap.md) |
@@ -168,6 +169,7 @@ Do not pass unvalidated user input into any command.
168169
| Perps deposit/withdraw | Always confirm amount, asset, venue, network, and destination where applicable before executing |
169170
| Predict trading | Always confirm token ID, side, size, price, order type, market, and outcome before executing |
170171
| Predict deposit | Always confirm amount before executing |
172+
| Predict withdraw | Always confirm amount and recipient (`--to` defaults to owner EOA) before executing |
171173
| Cancel-all operations | Always confirm scope and exact destructive effect before executing |
172174
| Auth / wallet management | May execute without confirmation, except `reset` which requires explicit user confirmation |
173175
| Read-only queries | May execute without confirmation |
@@ -197,7 +199,7 @@ In server-wallet mode, signing and transaction commands return a `pollingId` ins
197199
- `mm-dev wallet requests watch --polling-id <id>`
198200
3. In BYOK mode, results are returned immediately. If the mnemonic is password-encrypted, the user must set `MM_PASSWORD` environment variable to unlock it for the operation.
199201

200-
Transfers, swaps, perps, and predict orders attach a human-readable `intent` summary to their wallet request (e.g. `Transfer 0.5 ETH to 0x...`). When surfacing a pending request from `wallet requests list` or `wallet requests watch`, show the `intent` summary so the user can confirm what they are approving.
202+
Transfers, swaps, perps, predict orders, and predict withdraws attach a human-readable `intent` summary to their wallet request (e.g. `Transfer 0.5 ETH to 0x...`, `Withdraw 10 pUSD to 0x...`). When surfacing a pending request from `wallet requests list` or `wallet requests watch`, show the `intent` summary so the user can confirm what they are approving.
201203

202204
## Output Rules
203205

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ mm-dev login [qr | google | email] [--token <token>] [--timeout <seconds>] [--no
7676

7777
```bash
7878
mm-dev login --no-wait
79-
mm-dev login qr
8079
mm-dev login google --no-wait
8180
mm-dev login email --no-wait
8281
mm-dev login --token "cliToken:cliRefreshToken"
@@ -85,6 +84,7 @@ mm-dev login --token "cliToken:cliRefreshToken"
8584
### Note
8685

8786
- If already authenticated, the CLI returns `ALREADY_AUTHENTICATED`. Run `mm-dev logout` first, then log in again.
87+
- `mm-dev login qr` returns `COMING_SOON`. Use Google or email sign-in instead.
8888
- Pairing codes tolerate `-` and whitespace separators (e.g. `608-225` is equivalent to `608225`).
8989
- 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.
9090
- `--no-wait` is not supported with QR login. Complete authentication later with `mm-dev login --token`.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ This reference lists error codes the CLI actually emits. SDK-only or remapped co
7878
| `MISSING_ID` | Missing ID parameter |
7979
| `MISSING_QUOTE_ID` | Missing quote ID |
8080
| `MISSING_SWAP_PARAMS` | Missing swap parameters |
81+
| `COMING_SOON` | Feature not yet available (e.g. `mm-dev login qr`) |
8182

8283
## Swap & Bridge Errors
8384

@@ -131,6 +132,8 @@ This reference lists error codes the CLI actually emits. SDK-only or remapped co
131132
| `PREDICT_AUTH_INVALID` | Predict credentials invalid or incomplete |
132133
| `PREDICT_RELAYER_CONFIG_REQUIRED` | Relayer configuration required |
133134
| `PREDICT_INVALID_DEPOSIT_AMOUNT` | Invalid deposit amount |
135+
| `PREDICT_WITHDRAW_ZERO` | Withdraw amount must be greater than zero |
136+
| `PREDICT_WITHDRAW_INSUFFICIENT_BALANCE` | Withdraw amount exceeds deposit wallet pUSD balance |
134137
| `PREDICT_FUNDING_CHAIN_UNSUPPORTED` | Funding chain not supported |
135138
| `PREDICT_INSUFFICIENT_BALANCE` | Insufficient Predict balance |
136139
| `PREDICT_INSUFFICIENT_ALLOWANCE` | Insufficient Predict allowance |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In server wallet mode, signing and transaction commands return a `pollingId` instead of an immediate result. Use these commands to track and wait for results. Both commands are server-wallet mode only.
44

5-
Transfers, swaps, perps, and predict orders attach a human-readable `intent` summary to their request (e.g. `Transfer 0.5 ETH to 0x...`). When listing or watching requests, surface the `intent` so the user can confirm what they are approving.
5+
Transfers, swaps, perps, predict orders, and predict withdraws attach a human-readable `intent` summary to their request (e.g. `Transfer 0.5 ETH to 0x...`, `Withdraw 10 pUSD to 0x...`). When listing or watching requests, surface the `intent` so the user can confirm what they are approving.
66

77
## `wallet requests list` Command
88

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,32 @@ mm-dev predict balance --sync
373373
mm-dev predict balance --token-id <token-id> --sync
374374
```
375375

376+
## `predict withdraw` Command
377+
378+
Withdraw pUSD from your Predict deposit wallet to your owner EOA or another address. Validates the amount against the on-chain deposit wallet balance before signing. Uses the Polymarket Relayer batch mechanism.
379+
380+
### Syntax
381+
382+
```bash
383+
mm-dev predict withdraw --amount <amount> [--to <address>] [--wait] [--password <password>]
384+
```
385+
386+
### Supported Flags
387+
388+
| Name | Required | Description |
389+
| --- | --- | --- |
390+
| `--amount` | Yes | pUSD amount to withdraw, human-readable (e.g. 0.1, 5, 100) |
391+
| `--to` | No | Recipient address. Defaults to your owner EOA |
392+
| `--wait` | No | Block until the job completes |
393+
| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] |
394+
395+
### Example
396+
397+
```bash
398+
mm-dev predict withdraw --amount 10 --wait
399+
mm-dev predict withdraw --amount 5 --to 0xAbc... --wait
400+
```
401+
376402
## `predict deposit` Command
377403

378404
Convert USDC.e from your EOA to pUSD in your Predict deposit wallet.
@@ -422,7 +448,7 @@ mm-dev predict book --token-id <token-id>
422448

423449
## `predict watch` Command
424450

425-
Watch a setup, approval, deposit, or order job until it completes.
451+
Watch a setup, approval, deposit, withdraw, or order job until it completes.
426452

427453
### Syntax
428454

@@ -454,4 +480,4 @@ mm-dev predict watch --id <job-id> --wait
454480
- Side must be `buy` or `sell`.
455481
- The `predict mode` command switches between `mainnet` and `testnet`.
456482
- If the user does not specify a mode, the CLI uses the previously set mode.
457-
- Setup, approve, deposit, and order flows can return job IDs. Track them with `mm-dev predict watch <job-id> --wait`.
483+
- Setup, approve, deposit, withdraw, and order flows can return job IDs. Track them with `mm-dev predict watch <job-id> --wait`.

skills/metamask-agent-wallet/workflows/login.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Reference command syntax in `references/auth.md`.
66

77
## Flow
88

9-
1. Ask the user which login method they want: Google, Email, or QR.
9+
1. Ask the user which login method they want: Google or Email. QR login is coming soon and is not available.
1010
2. Execute login.
1111
3. Verify with token.
1212

1313
## Login
1414

15-
QR login (`mm-dev login qr`) does not support `--no-wait`. If the user wants QR, they must complete the login flow themselves.
15+
`mm-dev login qr` returns `COMING_SOON`. Use Google or email sign-in.
1616

1717
```bash
1818
mm-dev login google --no-wait

skills/metamask-agent-wallet/workflows/onboarding.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ If this fails, the CLI is not installed. Guide the user to install it before pro
2222

2323
## Login Flow
2424

25-
Ask the user which login method they want to use: Google, Email, or QR.
26-
QR login (`mm-dev login qr`) does not support `--no-wait`. If the user wants QR, they must complete the onboarding flow themselves.
25+
Ask the user which login method they want to use: Google or Email. QR login is coming soon (`mm-dev login qr` returns `COMING_SOON`).
2726

2827
### Login
2928

skills/metamask-agent-wallet/workflows/predict-trading.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ mm-dev predict deposit --amount 100 --wait --json
4242

4343
`--amount` is in pUSD. The owner EOA needs enough Polygon USDC and POL for gas to complete the deposit transaction.
4444

45+
## Withdraw from the Deposit Wallet
46+
47+
Check balance first:
48+
49+
```bash
50+
mm-dev predict balance --sync
51+
```
52+
53+
Withdraw pUSD to the owner EOA (default) or a specified address:
54+
55+
```bash
56+
mm-dev predict withdraw --amount 50 --wait
57+
mm-dev predict withdraw --amount 10 --to 0xRecipient... --wait
58+
```
59+
60+
The CLI validates the amount against the on-chain deposit wallet balance before signing. Confirm amount and recipient with the user before executing.
61+
4562
## Find the Right Market
4663

4764
Search can return loosely related markets, so inspect the selected market before quoting:
@@ -101,7 +118,7 @@ mm-dev predict cancel --all
101118
mm-dev predict watch --id <job-id> --wait
102119
```
103120

104-
Use this for setup, approve, deposit, and order jobs that have not reached a terminal state.
121+
Use this for setup, approve, deposit, withdraw, and order jobs that have not reached a terminal state.
105122

106123
## Safety Notes
107124

skills/metamask-agent-workflows/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use when the user needs to perform multi-step operations with the M
44
license: MIT
55
metadata:
66
author: metamask
7-
version: "1.1.0"
7+
version: "1.2.0"
88
---
99

1010
# MetaMask Agent Workflows

skills/metamask-agent-workflows/workflows/login.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Reference command syntax in `references/auth.md`.
66

77
## Flow
88

9-
1. Ask the user which login method they want: Google, Email, or QR.
9+
1. Ask the user which login method they want: Google or Email. QR login is coming soon and is not available.
1010
2. Execute login.
1111
3. Verify with token.
1212

1313
## Login
1414

15-
QR login (`mm-dev login qr`) does not support `--no-wait`. If the user wants QR, they must complete the login flow themselves.
15+
`mm-dev login qr` returns `COMING_SOON`. Use Google or email sign-in.
1616

1717
```bash
1818
mm-dev login google --no-wait

0 commit comments

Comments
 (0)