Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent-wallet/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each step tells you what you are doing, why it matters, and what to do next.

## Before you start

- **Node.js** 22.x or later
- **Node.js** 22.18 or later
- An AI agent that supports skills (Claude Code, Codex, Cursor, OpenClaw, Hermes Agent, or similar)

## Step 1: Install the CLI
Expand Down
9 changes: 7 additions & 2 deletions agent-wallet/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,15 +679,20 @@ preserved on that row. Pending jobs that never reached the chain are excluded;
use `mm wallet requests list` to see stranded or expired requests.

```bash
mm tx history [--addresses <addrs>] [--chain-ids <chains>] [--type <filter>] [--limit <n>]
mm tx history [--addresses <addrs>] [--chain-ids <chains>] [--type <filter>] [--limit <n>] [--after <cursor>]
```

| Flag | Required | Description |
| ------------- | -------- | -------------------------------------------------------------------------- |
| `--addresses` | No | Comma-separated EVM addresses. Defaults to all EVM wallets on your account |
| `--chain-ids` | No | Comma-separated chain filters, such as `1,137` or `eip155:1` |
| `--type` | No | Filter by direction (`in`, `out`, or `self`) or by transaction category |
| `--limit` | No | Number of transactions to return, 1–500. The default is 50 |
| `--limit` | No | Number of transactions to return, 1–50. The default is 50 |
| `--after` | No | Pagination cursor from a previous response (`endCursor` value) |

When more results are available, JSON and toon output include `hasNextPage: true` and an `endCursor`
value. Pass that cursor as `--after <endCursor>` to fetch the next page. The REPL also displays a
ready-to-run next-page command in a footer when `hasNextPage` is true.

### `mm tx`

Expand Down
53 changes: 30 additions & 23 deletions agent-wallet/reference/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,30 @@ Run `mm <command> --help` for command-specific validation rules.

## Validation errors (`ValidationError`)

| Code | Meaning |
| ----------------------------- | ----------------------------------------------------------- |
| `MISSING_FLAG` | Required flag missing in headless mode |
| `MISSING_INPUT` | Required input is missing |
| `MISSING_CHAIN` | Chain value is missing |
| `MISSING_CHAIN_ID` | `--chain-id` is missing |
| `INVALID_CHAIN` | Chain value is invalid |
| `INVALID_INPUT` | Invalid user input |
| `INVALID_TO` | Recipient address is invalid |
| `INVALID_TYPED_DATA` | EIP-712 payload is invalid |
| `INVALID_TRANSACTION_PAYLOAD` | Transaction payload is invalid |
| `CHAIN_ID_MISMATCH` | Typed-data domain chain ID differs from `--chain-id` |
| `INVALID_MNEMONIC` | Bring your own wallet mnemonic is invalid |
| `NOT_INITIALIZED` | Project not initialized; run `mm init` |
| `INVALID_LIMIT` | Invalid `--limit` value for `mm tx history` (must be 1–500) |
| `INVALID_CONFIG_KEY` | Unknown CLI config key |
| `INVALID_NETWORK` | Unsupported or unknown network |
| `UNKNOWN_FLAG` | Unrecognized CLI flag |
| `MISSING_WALLET_REF` | Missing wallet address for `mm wallet select` |
| `INVALID_EVM_ADDRESS` | Malformed EVM address input |
| `INVALID_SORT_BY` | Invalid `--sort-by` field |
| `INVALID_SORT_DIRECTION` | Invalid `--sort-direction` value; use `asc` or `desc` |
| `INVALID_HISTORY_TYPE` | Invalid `--type`; use `closed`, `trade`, or `redeem` |
| Code | Meaning |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MISSING_FLAG` | Required flag missing in headless mode |
| `MISSING_INPUT` | Required input is missing |
| `MISSING_CHAIN` | Chain value is missing |
| `MISSING_CHAIN_ID` | `--chain-id` is missing |
| `INVALID_CHAIN` | Chain value is invalid |
| `INVALID_INPUT` | Invalid user input |
| `INVALID_TO` | Recipient address is invalid |
| `INVALID_TYPED_DATA` | EIP-712 payload is invalid |
| `INVALID_TRANSACTION_PAYLOAD` | Transaction payload is invalid |
| `CHAIN_ID_MISMATCH` | Typed-data domain chain ID differs from `--chain-id` |
| `INVALID_MNEMONIC` | Bring your own wallet mnemonic is invalid |
| `NOT_INITIALIZED` | Project not initialized; run `mm init` |
| `INVALID_LIMIT` | Invalid `--limit` value for `mm tx history` (must be 1–50) |
| `INVALID_POLICY_YAML` | Policy YAML passed to `mm wallet policy set` is not a valid policy object; use `mm wallet policy get` or `mm wallet policy template` as a starting point |
| `INVALID_CONFIG_KEY` | Unknown CLI config key |
| `INVALID_NETWORK` | Unsupported or unknown network |
| `UNKNOWN_FLAG` | Unrecognized CLI flag |
| `MISSING_WALLET_REF` | Missing wallet address for `mm wallet select` |
| `INVALID_EVM_ADDRESS` | Malformed EVM address input |
| `INVALID_SORT_BY` | Invalid `--sort-by` field |
| `INVALID_SORT_DIRECTION` | Invalid `--sort-direction` value; use `asc` or `desc` |
| `INVALID_HISTORY_TYPE` | Invalid `--type`; use `closed`, `trade`, or `redeem` |

## Wallet errors (`WalletError`)

Expand Down Expand Up @@ -165,6 +166,12 @@ All expected predict failures return actionable per-code hints. Inspect the `hin
| `RELAY_ABORTED` | Gasless relay aborted |
| `REQUEST_NOT_FOUND` | Server-wallet request not found |

## Runtime errors

| Code | Meaning |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
| `UNSUPPORTED_NODE` | Node.js version is below the minimum required (22.18). Upgrade Node.js from https://nodejs.org/ or use nvm/fnm/volta |

## Network errors

| Code | Meaning |
Expand Down
42 changes: 42 additions & 0 deletions agent-wallet/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ keywords: [MetaMask, Agent Wallet, troubleshooting, mm doctor, mm]

Symptom-first fixes for common `mm` CLI issues.

## `UNSUPPORTED_NODE` at startup

The CLI checks the Node.js version before loading. If the active runtime is below Node.js 22.18, it
exits immediately:

```
Error: Node.js <current> is not supported. MetaMask Agent Wallet (mm) requires Node.js 22.18 or later.
Upgrade Node.js from https://nodejs.org/ or use a version manager (nvm, fnm, volta).
```

With `--json`, the exit payload is:

```json
{ "ok": false, "error": { "code": "UNSUPPORTED_NODE", "message": "...", "hint": "..." } }
```

Upgrade Node.js to 22.18 or later, then verify:

```bash
node --version
mm doctor
```

## Start with `mm doctor`

Run `mm doctor` first to inspect CLI version, skill compatibility, authentication, and
Expand Down Expand Up @@ -132,6 +155,25 @@ mm init
mm doctor
```

### `INVALID_POLICY_YAML` on `mm wallet policy set`

The YAML you passed is not a valid policy object (for example, it is an empty document, a plain
string, or a list). Start from a known-good baseline:

```bash
# Start from your current live policy:
mm wallet policy get

# Or start from the project template:
mm wallet policy template
```

Edit the output, then pass it back:

```bash
mm wallet policy set --policy "$(mm wallet policy get)"
```

### Reset local session

```bash
Expand Down
Loading