diff --git a/skills/metamask-agent-wallet/SKILL.md b/skills/metamask-agent-wallet/SKILL.md index 5cecd3f..681e0fe 100644 --- a/skills/metamask-agent-wallet/SKILL.md +++ b/skills/metamask-agent-wallet/SKILL.md @@ -4,7 +4,7 @@ description: Use when the user asks anything about blockchain wallets, transacti license: MIT metadata: author: metamask - version: "2.0.0" + version: "2.1.0" --- # MetaMask Agentic CLI Skill @@ -23,7 +23,7 @@ Match the user's intent to a command and reference file, then read the reference | Login in MetaMask Agentic CLI | `mm login` | [auth.md](references/auth.md) | | Choose a wallet mode and set up policies | `mm init` | [auth.md](references/auth.md) | | Show current init settings | `mm init show` | [auth.md](references/auth.md) | -| Sign in via QR code (coming soon) | `mm login qr` | [auth.md](references/auth.md) | +| Sign in via QR code with MetaMask Mobile | `mm login qr` | [auth.md](references/auth.md) | | Sign in via Google | `mm login google` | [auth.md](references/auth.md) | | Sign in via email OTP | `mm login email` | [auth.md](references/auth.md) | | Sign out | `mm logout` | [auth.md](references/auth.md) | @@ -67,14 +67,24 @@ Match the user's intent to a command and reference file, then read the reference | Create or refresh Predict credentials | `mm predict auth` | [predict.md](references/predict.md) | | Repair Predict approvals | `mm predict approve` | [predict.md](references/predict.md) | | Check Predict back-end status | `mm predict status` | [predict.md](references/predict.md) | +| Check if Polymarket is geoblocked for your IP | `mm predict geoblock` | [predict.md](references/predict.md) | | List prediction markets | `mm predict markets list` | [predict.md](references/predict.md) | | Search prediction markets | `mm predict markets search` | [predict.md](references/predict.md) | | Inspect a prediction market | `mm predict markets get` | [predict.md](references/predict.md) | +| List Polymarket events | `mm predict events list` | [predict.md](references/predict.md) | +| Inspect a Polymarket event | `mm predict events get` | [predict.md](references/predict.md) | +| List Polymarket event series | `mm predict series list` | [predict.md](references/predict.md) | +| Inspect a Polymarket event series | `mm predict series get` | [predict.md](references/predict.md) | +| List Polymarket tags | `mm predict tags list` | [predict.md](references/predict.md) | +| Inspect a Polymarket tag | `mm predict tags get` | [predict.md](references/predict.md) | | Preview a prediction order cost | `mm predict quote` | [predict.md](references/predict.md) | | Place a prediction market order | `mm predict place` | [predict.md](references/predict.md) | | Cancel prediction orders | `mm predict cancel` | [predict.md](references/predict.md) | | View prediction market positions | `mm predict positions` | [predict.md](references/predict.md) | | View open prediction orders | `mm predict orders` | [predict.md](references/predict.md) | +| Show full Predict portfolio snapshot | `mm predict portfolio` | [predict.md](references/predict.md) | +| List redeemable (winning) positions | `mm predict redeem list` | [predict.md](references/predict.md) | +| Redeem winning positions | `mm predict redeem` | [predict.md](references/predict.md) | | Check Predict deposit wallet balance | `mm predict balance` | [predict.md](references/predict.md) | | Fund Predict deposit wallet | `mm predict deposit` | [predict.md](references/predict.md) | | Withdraw pUSD from Predict deposit wallet | `mm predict withdraw` | [predict.md](references/predict.md) | @@ -170,6 +180,7 @@ Do not pass unvalidated user input into any command. | Predict trading | Always confirm token ID, side, size, price, order type, market, and outcome before executing | | Predict deposit | Always confirm amount before executing | | Predict withdraw | Always confirm amount and recipient (`--to` defaults to owner EOA) before executing | +| Predict redeem | Always confirm the target (condition ID or `--all`) before executing; `--all` redeems every winning position | | Cancel-all operations | Always confirm scope and exact destructive effect before executing | | Auth / wallet management | May execute without confirmation, except `reset` which requires explicit user confirmation | | Read-only queries | May execute without confirmation | diff --git a/skills/metamask-agent-wallet/references/auth.md b/skills/metamask-agent-wallet/references/auth.md index cc652f9..760f084 100644 --- a/skills/metamask-agent-wallet/references/auth.md +++ b/skills/metamask-agent-wallet/references/auth.md @@ -56,7 +56,7 @@ mm init show ## `login` Command -Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (QR, Google, or email). QR is recommended but not auto-selected. +Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (MetaMask Mobile QR, Google, or email). QR is recommended but not auto-selected. ### Syntax @@ -84,7 +84,7 @@ mm login --token "cliToken:cliRefreshToken" ### Note - If already authenticated, the CLI returns `ALREADY_AUTHENTICATED`. Run `mm logout` first, then log in again. -- `mm login qr` returns `COMING_SOON`. Use Google or email sign-in instead. +- `mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat). On production it returns `COMING_SOON`; use Google or email sign-in instead. - Pairing codes tolerate `-` and whitespace separators (e.g. `608-225` is equivalent to `608225`). - Use `mm login google --no-wait` or `mm login email --no-wait` for non-interactive/CI flows. Bare `mm login --no-wait` fails without a TTY because no method is selected. - `--no-wait` is not supported with QR login. Complete authentication later with `mm login --token`. diff --git a/skills/metamask-agent-wallet/references/errors.md b/skills/metamask-agent-wallet/references/errors.md index e4361ae..15696f3 100644 --- a/skills/metamask-agent-wallet/references/errors.md +++ b/skills/metamask-agent-wallet/references/errors.md @@ -143,6 +143,7 @@ This reference lists error codes the CLI actually emits. SDK-only or remapped co | `PREDICT_METHOD_UNAVAILABLE` | Predict method not available | | `PREDICT_DEPOSIT_FAILED` | Predict deposit failed | | `PREDICT_ERROR` | Generic Predict error | +| `PREDICT_GEOBLOCKED` | Polymarket is not available in your region; Predict features cannot be used from this location. Emitted by `mm predict setup` (region guard) and surfaced by `mm predict geoblock` | | `UNSUPPORTED_PREDICT_CHAIN` | Predict chain not supported | ## Network & Filesystem Errors diff --git a/skills/metamask-agent-wallet/references/predict.md b/skills/metamask-agent-wallet/references/predict.md index 59f5816..2c88d16 100644 --- a/skills/metamask-agent-wallet/references/predict.md +++ b/skills/metamask-agent-wallet/references/predict.md @@ -106,6 +106,22 @@ mm predict status mm predict status ``` +## `predict geoblock` Command + +Check whether Polymarket access is geoblocked for your current IP. Returns `blocked`, `ip`, `country`, and `region`. + +### Syntax + +```bash +mm predict geoblock +``` + +### Example + +```bash +mm predict geoblock +``` + ## `predict markets list` Command List tradeable Predict markets with Gamma-style filters. @@ -199,6 +215,160 @@ mm predict markets get will-the-new-york-knicks-win-the-2026-nba-finals mm predict markets get 0x713641f745d71f6ec61f906237ffca3c8583f251e49384429a63ceb0ccdb2d37 ``` +## `predict events list` Command + +List Polymarket events (groupings of related markets) with Gamma-style filters. + +### Syntax + +```bash +mm predict events list [--tag-slug ] [--tag-id ] [--active] [--closed] [--featured] [--order ] [--ascending] [--liquidity-min ] [--start-date-min ] [--start-date-max ] [--end-date-min ] [--end-date-max ] [--limit ] [--offset ] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `--tag-slug` | No | Filter by tag slug (e.g. sports, politics) | +| `--tag-id` | No | Filter by tag ID (from `mm predict tags list`) | +| `--active` | No | Active events only | +| `--closed` | No | Include closed/resolved events | +| `--featured` | No | Only featured/trending events | +| `--order` | No | Sort field: `volume_24hr`, `volume`, `liquidity`, `start_date`, `end_date` | +| `--ascending` | No | Sort ascending (defaults to descending) | +| `--liquidity-min` | No | Minimum event liquidity | +| `--start-date-min` | No | Minimum event start date-time | +| `--start-date-max` | No | Maximum event start date-time | +| `--end-date-min` | No | Minimum event end date-time | +| `--end-date-max` | No | Maximum event end date-time | +| `--limit` | No | Maximum events to return, 1-500 | +| `--offset` | No | Result offset (0-based) | + +### Example + +```bash +mm predict events list --tag-slug sports --limit 10 +mm predict events list --active --featured +``` + +## `predict events get` Command + +Inspect a single Polymarket event by slug or ID. + +### Syntax + +```bash +mm predict events get +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `` | Yes | Event slug or ID (positional) | + +### Example + +```bash +mm predict events get some-event-slug +``` + +## `predict series list` Command + +List Polymarket event series (recurring groupings of events). + +### Syntax + +```bash +mm predict series list [--recurrence ] [--active] [--featured] [--tag-slug ] [--limit ] [--offset ] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `--recurrence` | No | Filter by recurrence: `annual`, `daily`, `weekly`, or `monthly` | +| `--active` | No | Active series only | +| `--featured` | No | Only featured series | +| `--tag-slug` | No | Filter by tag slug | +| `--limit` | No | Maximum series to return, 1-500 | +| `--offset` | No | Result offset (0-based) | + +### Example + +```bash +mm predict series list --recurrence weekly --limit 10 +``` + +## `predict series get` Command + +Inspect a single event series by ID. + +### Syntax + +```bash +mm predict series get +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `` | Yes | Series ID (positional) | + +### Example + +```bash +mm predict series get 12345 +``` + +## `predict tags list` Command + +List Polymarket tags, useful for `--tag-slug` / `--tag-id` filters on events and markets. + +### Syntax + +```bash +mm predict tags list [--limit ] [--offset ] [--is-carousel] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `--limit` | No | Maximum tags to return, 1-500 | +| `--offset` | No | Result offset (0-based) | +| `--is-carousel` | No | Only carousel tags | + +### Example + +```bash +mm predict tags list --limit 50 +``` + +## `predict tags get` Command + +Fetch a single Polymarket tag by numeric ID or slug. + +### Syntax + +```bash +mm predict tags get +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `` | Yes | Tag ID (integer) or slug string (positional) | + +### Example + +```bash +mm predict tags get sports +mm predict tags get 100 +``` + ## `predict quote` Command Preview order cost and fill before placing. @@ -323,6 +493,80 @@ mm predict positions mm predict positions --market ``` +## `predict portfolio` Command + +Full portfolio snapshot: deposit wallet pUSD balance, open positions with estimated value, and outstanding redeemable winnings. + +### Syntax + +```bash +mm predict portfolio [--password ] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] | + +### Example + +```bash +mm predict portfolio +``` + +## `predict redeem list` Command + +List all redeemable (winning) positions in your deposit wallet, with position size and market question. + +### Syntax + +```bash +mm predict redeem list [--password ] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] | + +### Example + +```bash +mm predict redeem list +``` + +## `predict redeem` Command + +Redeem winning tokens after market resolution. Redeem one position by condition ID, or all redeemable positions with `--all`. With `--wait`, polls for the transaction receipt. + +### Syntax + +```bash +mm predict redeem [] [--all] [--wait] [--password ] +``` + +### Supported Flags + +| Name | Required | Description | +| --- | --- | --- | +| `` | Yes (unless `--all`) | Market condition ID to redeem (positional) | +| `--all` | No | Redeem all redeemable positions | +| `--wait` | No | Block until the redemption transaction is confirmed | +| `--password` | No | Password to unlock the BYOK mnemonic (BYOK mode only) [env: `MM_PASSWORD`] | + +### Validation Rules + +- Provide either a `` or `--all`, not both. + +### Example + +```bash +mm predict redeem 0xABC123... --wait +mm predict redeem --all --wait +``` + ## `predict orders` Command View open Predict orders. @@ -475,9 +719,12 @@ mm predict watch --id --wait ## Notes - Before trading, run `mm predict setup --wait` to initialize credentials, deploy the deposit wallet, and set approvals. +- `mm predict setup` aborts early with `PREDICT_GEOBLOCKED` if your IP resolves to a restricted region, before any wallet interaction. Use `mm predict geoblock` to check region status without running setup. - Use `mm predict markets get ` to get outcome token IDs required by `quote`, `place`, `book`, and `balance --token-id`. +- Use `mm predict events`, `mm predict series`, and `mm predict tags` to browse Polymarket content; tag slugs/IDs from `mm predict tags list` feed the `--tag-slug` / `--tag-id` filters on `events` and `markets`. +- After a market resolves, use `mm predict redeem list` to see winnings and `mm predict redeem --wait` (or `--all`) to claim them. `mm predict portfolio` shows balance, open positions, and redeemable winnings in one snapshot. - Prices are per-share and must be in the range [0, 1]. - Side must be `buy` or `sell`. - The `predict mode` command switches between `mainnet` and `testnet`. - If the user does not specify a mode, the CLI uses the previously set mode. -- Setup, approve, deposit, withdraw, and order flows can return job IDs. Track them with `mm predict watch --wait`. +- Setup, approve, deposit, withdraw, redeem, and order flows can return job IDs. Track them with `mm predict watch --wait`. diff --git a/skills/metamask-agent-wallet/workflows/login.md b/skills/metamask-agent-wallet/workflows/login.md index 6cd0e7f..fcf689a 100644 --- a/skills/metamask-agent-wallet/workflows/login.md +++ b/skills/metamask-agent-wallet/workflows/login.md @@ -6,20 +6,22 @@ Reference command syntax in `references/auth.md`. ## Flow -1. Ask the user which login method they want: Google or Email. QR login is coming soon and is not available. +1. Ask the user which login method they want: MetaMask Mobile QR, Google, or Email. 2. Execute login. 3. Verify with token. ## Login -`mm login qr` returns `COMING_SOON`. Use Google or email sign-in. +For non-interactive/CI flows, use Google or email with `--no-wait`: ```bash mm login google --no-wait mm login email --no-wait ``` -Use `--no-wait` for non-interactive environments. The command prints a sign-in URL. +The command prints a sign-in URL. + +`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`. QR login keeps the CLI attached to the relay, so it does not support `--no-wait`. ## Verify diff --git a/skills/metamask-agent-wallet/workflows/onboarding.md b/skills/metamask-agent-wallet/workflows/onboarding.md index f6dee2e..f4453f1 100644 --- a/skills/metamask-agent-wallet/workflows/onboarding.md +++ b/skills/metamask-agent-wallet/workflows/onboarding.md @@ -22,7 +22,7 @@ If this fails, the CLI is not installed. Guide the user to install it before pro ## Login Flow -Ask the user which login method they want to use: Google or Email. QR login is coming soon (`mm login qr` returns `COMING_SOON`). +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. ### Login diff --git a/skills/metamask-agent-wallet/workflows/predict-trading.md b/skills/metamask-agent-wallet/workflows/predict-trading.md index 4dc9690..fd5d5ad 100644 --- a/skills/metamask-agent-wallet/workflows/predict-trading.md +++ b/skills/metamask-agent-wallet/workflows/predict-trading.md @@ -16,6 +16,12 @@ mm predict status `predict setup --wait` blocks until credential, deposit-wallet, and approval jobs complete. Without `--wait`, watch returned jobs with `mm predict watch`. +Polymarket is geoblocked in some regions. `mm predict setup` checks the caller's IP first and aborts with `PREDICT_GEOBLOCKED` before any wallet interaction if the region is restricted. To check region status independently, run: + +```bash +mm predict geoblock +``` + If setup or approvals look stale later: ```bash @@ -76,6 +82,17 @@ If search is noisy, list active markets and filter manually: mm predict markets list --active --limit 50 --json ``` +To browse by topic, use events, series, and tags. Resolve a tag slug or ID first, then filter: + +```bash +mm predict tags list --limit 50 --json +mm predict events list --tag-slug sports --active --limit 10 --json +mm predict events get --json +mm predict series list --recurrence weekly --limit 10 --json +``` + +These browse-only commands do not return outcome token IDs. Drill into a specific market with `mm predict markets get ` before quoting or placing. + ## Quote, Then Place Preview the order cost and fill before placing: @@ -112,13 +129,31 @@ mm predict cancel --all `predict cancel --all` cancels every open order. Require explicit confirmation. +## Portfolio and Redeeming Winnings + +Get a single snapshot of balance, open positions, and redeemable winnings: + +```bash +mm predict portfolio --json +``` + +After a market resolves, list and claim winning positions: + +```bash +mm predict redeem list --json +mm predict redeem --wait +mm predict redeem --all --wait +``` + +`predict redeem --all` redeems every winning position. Confirm the target (condition ID or `--all`) with the user before executing. With `--wait`, the CLI polls for the redemption transaction receipt. + ## Watch Async Jobs ```bash mm predict watch --id --wait ``` -Use this for setup, approve, deposit, withdraw, and order jobs that have not reached a terminal state. +Use this for setup, approve, deposit, withdraw, redeem, and order jobs that have not reached a terminal state. ## Safety Notes diff --git a/skills/metamask-agent-workflows/workflows/login.md b/skills/metamask-agent-workflows/workflows/login.md index 6cd0e7f..fcf689a 100644 --- a/skills/metamask-agent-workflows/workflows/login.md +++ b/skills/metamask-agent-workflows/workflows/login.md @@ -6,20 +6,22 @@ Reference command syntax in `references/auth.md`. ## Flow -1. Ask the user which login method they want: Google or Email. QR login is coming soon and is not available. +1. Ask the user which login method they want: MetaMask Mobile QR, Google, or Email. 2. Execute login. 3. Verify with token. ## Login -`mm login qr` returns `COMING_SOON`. Use Google or email sign-in. +For non-interactive/CI flows, use Google or email with `--no-wait`: ```bash mm login google --no-wait mm login email --no-wait ``` -Use `--no-wait` for non-interactive environments. The command prints a sign-in URL. +The command prints a sign-in URL. + +`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`. QR login keeps the CLI attached to the relay, so it does not support `--no-wait`. ## Verify diff --git a/skills/metamask-agent-workflows/workflows/onboarding.md b/skills/metamask-agent-workflows/workflows/onboarding.md index f6dee2e..f4453f1 100644 --- a/skills/metamask-agent-workflows/workflows/onboarding.md +++ b/skills/metamask-agent-workflows/workflows/onboarding.md @@ -22,7 +22,7 @@ If this fails, the CLI is not installed. Guide the user to install it before pro ## Login Flow -Ask the user which login method they want to use: Google or Email. QR login is coming soon (`mm login qr` returns `COMING_SOON`). +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. ### Login diff --git a/skills/metamask-agent-workflows/workflows/predict-trading.md b/skills/metamask-agent-workflows/workflows/predict-trading.md index 4dc9690..fd5d5ad 100644 --- a/skills/metamask-agent-workflows/workflows/predict-trading.md +++ b/skills/metamask-agent-workflows/workflows/predict-trading.md @@ -16,6 +16,12 @@ mm predict status `predict setup --wait` blocks until credential, deposit-wallet, and approval jobs complete. Without `--wait`, watch returned jobs with `mm predict watch`. +Polymarket is geoblocked in some regions. `mm predict setup` checks the caller's IP first and aborts with `PREDICT_GEOBLOCKED` before any wallet interaction if the region is restricted. To check region status independently, run: + +```bash +mm predict geoblock +``` + If setup or approvals look stale later: ```bash @@ -76,6 +82,17 @@ If search is noisy, list active markets and filter manually: mm predict markets list --active --limit 50 --json ``` +To browse by topic, use events, series, and tags. Resolve a tag slug or ID first, then filter: + +```bash +mm predict tags list --limit 50 --json +mm predict events list --tag-slug sports --active --limit 10 --json +mm predict events get --json +mm predict series list --recurrence weekly --limit 10 --json +``` + +These browse-only commands do not return outcome token IDs. Drill into a specific market with `mm predict markets get ` before quoting or placing. + ## Quote, Then Place Preview the order cost and fill before placing: @@ -112,13 +129,31 @@ mm predict cancel --all `predict cancel --all` cancels every open order. Require explicit confirmation. +## Portfolio and Redeeming Winnings + +Get a single snapshot of balance, open positions, and redeemable winnings: + +```bash +mm predict portfolio --json +``` + +After a market resolves, list and claim winning positions: + +```bash +mm predict redeem list --json +mm predict redeem --wait +mm predict redeem --all --wait +``` + +`predict redeem --all` redeems every winning position. Confirm the target (condition ID or `--all`) with the user before executing. With `--wait`, the CLI polls for the redemption transaction receipt. + ## Watch Async Jobs ```bash mm predict watch --id --wait ``` -Use this for setup, approve, deposit, withdraw, and order jobs that have not reached a terminal state. +Use this for setup, approve, deposit, withdraw, redeem, and order jobs that have not reached a terminal state. ## Safety Notes