Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0b79037
SDK new structure PoC
alexandratran Sep 23, 2025
44a6248
edits
alexandratran Sep 24, 2025
f234baf
remove custom reference component
alexandratran Sep 24, 2025
f331654
edits
alexandratran Sep 25, 2025
e2f4b8b
Merge branch 'main' into sdk-new-structure
alexandratran Sep 30, 2025
ef20ee1
fix links, update redirects, "metamask wallet sdk"
alexandratran Sep 30, 2025
39b9b16
Merge branch 'main' into sdk-new-structure
alexandratran Oct 16, 2025
905d9a8
add simplified api reference with two examples
alexandratran Oct 18, 2025
549887c
missing files
alexandratran Oct 18, 2025
1b97b2c
Merge branch 'main' into sdk-new-structure
alexandratran Oct 20, 2025
bb103fb
remove starknet docs
alexandratran Oct 21, 2025
8216d8b
copy over solana docs
alexandratran Oct 21, 2025
34aed2c
Merge branch 'main' into sdk-new-structure
alexandratran Oct 22, 2025
d64e8a4
Merge branch 'main' into sdk-new-structure
alexandratran Oct 23, 2025
e02092a
Update terminology and restructure EVM docs
alexandratran Oct 23, 2025
956c09a
fix broken links
alexandratran Oct 23, 2025
86d2dfc
Merge branch 'main' into sdk-new-structure
alexandratran Nov 4, 2025
f70f940
fix broken links
alexandratran Nov 4, 2025
e1e0008
Add/update Solana Wallet Adapter docs (#2443)
alexandratran Nov 7, 2025
37a4d06
Merge branch 'main' into sdk-new-structure
alexandratran Nov 10, 2025
30d0439
Update mobile products menu
alexandratran Nov 10, 2025
3db005f
Update MM Connect EVM JS code samples with potential new usage (#2454)
alexandratran Nov 12, 2025
d122361
Merge branch 'main' into sdk-new-structure
alexandratran Nov 13, 2025
360383d
Remove ParserOpenRPC component and replace usage in Linea services
alexandratran Nov 14, 2025
98476fe
Merge branch 'main' into sdk-new-structure
alexandratran Nov 18, 2025
c04fb6d
fix broken link
alexandratran Nov 18, 2025
b034e01
Add more multichain info (#2479)
alexandratran Nov 18, 2025
77bb9a9
Merge branch 'main' into sdk-new-structure
alexandratran Nov 27, 2025
b4716d6
Enhance JS section {WIP} (#2450)
shahbaz17 Nov 27, 2025
2a6e4ab
Add view & wagmi options
shahbaz17 Nov 27, 2025
6cf2880
Merge branch 'main' into sdk-new-structure
alexandratran Nov 28, 2025
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
Prev Previous commit
Next Next commit
Remove ParserOpenRPC component and replace usage in Linea services
  • Loading branch information
alexandratran committed Nov 14, 2025
commit 360383d5092e779453825f27067a2f398a7bb04f
111 changes: 0 additions & 111 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ guide in some places.
- [Preview locally](#preview-locally)
- [Style guide](#style-guide)
- [Add images](#add-images)
- [Update the interactive API reference](#update-the-interactive-api-reference)
- [Update `MetaMask/api-specs`](#update-metamaskapi-specs)
- [Update `ethereum/execution-apis`](#update-ethereumexecution-apis)
- [Test analytics](#test-analytics)

## Contribution workflow
Expand Down Expand Up @@ -125,114 +122,6 @@ When adding a new image, such as a screenshot or diagram, make sure the image ha

Additionally, follow the [Consensys guidelines on adding images](https://docs-template.consensys.net/contribute/add-images).

## Update the interactive API reference

The [Wallet JSON-RPC API reference](https://docs.metamask.io/wallet/reference/json-rpc-api/) uses
an internal plugin to import and parse OpenRPC
specifications from [`MetaMask/api-specs`](https://github.com/MetaMask/api-specs) (MetaMask-specific
methods) and [`ethereum/execution-apis`](https://github.com/ethereum/execution-apis) (standard
Ethereum methods).
The site renders documentation for each method based on the specification, and displays an
interactive module to test the methods in your browser.

### Update `MetaMask/api-specs`

To update documentation for MetaMask-specific JSON-RPC API methods:

1. Fork [`MetaMask/api-specs`](https://github.com/MetaMask/api-specs), clone the forked repository
to your computer, and navigate into it:

```bash
git clone [email protected]:<YOUR-USERNAME>/api-specs.git
cd api-specs
```

2. Follow the repository's [`README.md`](https://github.com/MetaMask/api-specs/blob/main/README.md)
instructions to edit the OpenRPC specification and generate the output file, `openrpc.json`.

3. To test the API updates in the MetaMask doc site's interactive reference:

1. Create and switch to a temporary local branch of the doc site, [`MetaMask/metamask-docs`](https://github.com/MetaMask/metamask-docs).
For example, to create and switch to a branch named `test-api-updates`:
```bash
cd metamask-docs
git checkout -b test-api-updates
```
2. Copy and paste the output file `openrpc.json` into the root directory of `metamask-docs`.
3. Use [`http-server`](https://www.npmjs.com/package/http-server) to serve `openrpc.json` locally.
Install `http-server` if you haven't yet, and start the server:
```bash
npm install --global http-server
http-server
```
The `openrpc.json` file is now served at [`http://127.0.0.1:8080/openrpc.json`](http://127.0.0.1:8080/openrpc.json).
4. In `src/plugins/plugin-json-rpc.ts`, update the following line to point to the locally served `openrpc.json` file:
```diff
- export const MM_RPC_URL = "https://metamask.github.io/api-specs/latest/openrpc.json";
+ export const MM_RPC_URL = "http://127.0.0.1:8080/openrpc.json";
```
5. In a new terminal window, preview the doc site locally:
```bash
cd metamask-docs
npm start
```
6. Navigate to the API reference, and view your updates.

4. Add and commit your changes to `api-specs`, and create a PR.

5. Once your PR is approved and merged, the following must happen to publish the changes to the
MetaMask doc site:

1. A new version of `api-specs` must be released by a user with write access to the repository.
To release, go to the [Create Release Pull Request](https://github.com/MetaMask/api-specs/actions/workflows/create-release-pr.yml)
action, select **Run workflow**, and enter a specific version to bump to in the last text box
(for example, `0.10.6`). This creates a PR releasing a version of `api-specs`.
2. Once the release PR is merged, the [Publish Release](https://github.com/MetaMask/api-specs/actions/workflows/publish-release.yml)
action must be approved by an npm publisher.
You can request an approval in the **#metamask-dev** Slack channel tagging
**@metamask-npm-publishers**.
For example:
> @metamask-npm-publishers `@metamask/[email protected]` is awaiting deployment :rocketship:
https://github.com/MetaMask/api-specs/actions/runs/10615788573

### Update `ethereum/execution-apis`

To update documentation for standard Ethereum JSON-RPC API methods:

1. Fork [`ethereum/execution-apis`](https://github.com/ethereum/execution-apis), clone the forked
repository to your computer, and navigate into it:

```bash
git clone [email protected]:<YOUR-USERNAME>/execution-apis.git
cd execution-apis
```

2. Follow the repository's [`README.md`](https://github.com/ethereum/execution-apis/blob/main/README.md)
instructions to edit the OpenRPC specification and generate the output file, `openrpc.json`.

3. To test the API updates in the MetaMask doc site's interactive reference, complete Step 3 in
[Update `MetaMask/api-specs`](#update-metamaskapi-specs).

4. Add and commit your changes to `execution-apis`, and create a PR.

5. Once your PR is approved and merged, the following must happen to publish the changes to the
MetaMask doc site:

1. `api-specs` must import the updated Ethereum API specification.
Go to the [commit history](https://github.com/ethereum/execution-apis/commits/assembled-spec/)
of the `assembled-spec` branch of `execution-apis`.
Copy the full commit hash of the latest commit titled "assemble openrpc.json."
Update the following line in `merge-openrpc.js` of `api-specs` with the updated commit hash,
and create a PR:
```diff
const getFilteredExecutionAPIs = () => {
- return fetch("https://raw.githubusercontent.com/ethereum/execution-apis/ac19b518a2596221cd7cd6421ee3dc654d7ff3b7/refs-openrpc.json")
+ return fetch("https://raw.githubusercontent.com/ethereum/execution-apis/f75d4cc8eeb5d1952bd69f901954686b74c34c9b/refs-openrpc.json")
```
2. Once the change to `merge-openrpc.js` is merged, Step 5 in
[Update `MetaMask/api-specs`](#update-metamaskapi-specs) must be completed to publish the
changes to the MetaMask doc site.

## Test analytics

The [`docusaurus-plugin-segment`](https://github.com/xer0x/docusaurus-plugin-segment) plugin enables
Expand Down
6 changes: 0 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import fs from 'fs'
require('dotenv').config()
const { themes } = require('prism-react-renderer')
const { REF_ALLOW_LOGIN_PATH } = require('./src/lib/constants')
const {
fetchAndGenerateDynamicSidebarItems,
NETWORK_NAMES,
MM_REF_PATH,
MM_RPC_URL,
} = require('./src/plugins/plugin-json-rpc')
const codeTheme = themes.dracula
const productsDropdown = fs.readFileSync('./src/components/NavDropdown/Products.html', 'utf-8')
const baseUrl = process.env.DEST || '/'
Expand Down
2 changes: 1 addition & 1 deletion services/reference/_partials/_eth_accounts-returns.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
An array of hexadecimals as strings representing the addresses owned by the client.

:::caution Infura will not return any accounts
While this JSON-RPC method is supported by Infura, it will _not_ return any accounts as Infura does not support "unlocking" accounts. Instead, users should send pre-signed raw transactions using [`eth_sendRawTransaction`](../ethereum/json-rpc-methods/eth_sendrawtransaction.mdx).
While this JSON-RPC method is supported by Infura, it will _not_ return any accounts as Infura does not support "unlocking" accounts. Instead, users should send pre-signed raw transactions using `eth_sendRawTransaction`.
:::
4 changes: 2 additions & 2 deletions services/reference/_partials/_eth_call-description.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Executes a new message call immediately without creating a transaction on the bl

:::warning Gas parameter is capped

To prevent API abuse, the `gas` parameter in [`eth_estimateGas`](../ethereum/json-rpc-methods/eth_estimategas.mdx) and
this [`eth_call`](../ethereum/json-rpc-methods/eth_call.mdx) method is capped at 10x (1000%) the current block gas limit.
To prevent API abuse, the `gas` parameter in `eth_estimateGas` and
this `eth_call` method is capped at 10x (1000%) the current block gas limit.

:::
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
- `to`: 20 bytes - Address the transaction is directed to.
- `gas`: Hexadecimal value of the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
- `gasPrice`: Hexadecimal value of the `gasPrice` used for each paid gas.
- `maxPriorityFeePerGas`: Maximum fee, in wei, the sender is willing to pay per gas above the base fee. See [EIP-1559 transactions](../../ethereum/concepts/transaction-types.md#eip-1559-transactions).
- `maxFeePerGas`: Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. See [EIP-1559 transactions](../../ethereum/concepts/transaction-types.md#eip-1559-transactions).
- `maxPriorityFeePerGas`: Maximum fee, in wei, the sender is willing to pay per gas above the base fee. See [EIP-1559 transactions](../../../concepts/transaction-types.md#eip-1559-transactions).
- `maxFeePerGas`: Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. See [EIP-1559 transactions](../../../concepts/transaction-types.md#eip-1559-transactions).
- `value`: Hexadecimal of the value sent with this transaction.
- `data`: Hash of the method signature and encoded parameters. See [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html).
- `blockParameter`: (string) [_required_] A hexadecimal block number, or one of the tags `latest`, `earliest`, `pending` or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block).
Expand Down
43 changes: 35 additions & 8 deletions services/reference/linea/json-rpc-methods/eth_accounts.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
---
title: Linea eth_accounts
sidebar_label: eth_accounts
hide_title: true
hide_table_of_contents: true
description: Returns a null value on Linea.
---

import ParserOpenRPC from "@site/src/components/ParserOpenRPC"
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
# `eth_accounts`

<ParserOpenRPC
network={NETWORK_NAMES.linea}
method="eth_accounts"
/>
import Description from "/services/reference/_partials/_eth_accounts-description.mdx";

<Description />

## Parameters

import Parameters from "/services/reference/_partials/_eth_accounts-parameters.mdx";

<Parameters />

## Returns

import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx";

<Returns />

## Example

import Example from "/services/reference/_partials/_eth_accounts-example.mdx";

<Example />

### Request

import Request from "./_eth_accounts-request.mdx"

<Request />

### Response

import Response from "/services/reference/_partials/_eth_accounts-response.mdx";

<Response />
43 changes: 35 additions & 8 deletions services/reference/linea/json-rpc-methods/eth_blocknumber.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
---
title: Linea eth_blockNumber
sidebar_label: eth_blockNumber
hide_title: true
hide_table_of_contents: true
description: Returns the latest block number on Linea.
---

import ParserOpenRPC from "@site/src/components/ParserOpenRPC"
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
# `eth_blockNumber`

<ParserOpenRPC
network={NETWORK_NAMES.linea}
method="eth_blockNumber"
/>
import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx";

<Description />

## Parameters

import Parameters from "/services/reference/_partials/_eth_blocknumber-parameters.mdx";

<Parameters />

## Returns

import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx";

<Returns />

## Example

import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx";

<Example />

### Request

import Request from "./_eth_blocknumber-request.mdx"

<Request />

### Response

import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx";

<Response />
43 changes: 35 additions & 8 deletions services/reference/linea/json-rpc-methods/eth_call.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
---
title: Linea eth_call
sidebar_label: eth_call
hide_title: true
hide_table_of_contents: true
description: Executes a new message call without creating a transaction on Linea.
---

import ParserOpenRPC from "@site/src/components/ParserOpenRPC"
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
# `eth_call`

<ParserOpenRPC
network={NETWORK_NAMES.linea}
method="eth_call"
/>
import Description from "/services/reference/_partials/_eth_call-description.mdx";

<Description />

## Parameters

import Parameters from "/services/reference/_partials/_eth_call-parameters.mdx";

<Parameters />

## Returns

import Returns from "/services/reference/_partials/_eth_call-returns.mdx";

<Returns />

## Example

import Example from "/services/reference/_partials/_eth_call-example.mdx";

<Example />

### Request

import Request from "./_eth_call-request.mdx"

<Request />

### Response

import Response from "/services/reference/_partials/_eth_call-response.mdx";

<Response />
43 changes: 35 additions & 8 deletions services/reference/linea/json-rpc-methods/eth_chainid.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
---
title: Linea eth_chainId
sidebar_label: eth_chainId
hide_title: true
hide_table_of_contents: true
description: Returns the chainId on Linea.
---

import ParserOpenRPC from "@site/src/components/ParserOpenRPC"
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"
# `eth_chainId`

<ParserOpenRPC
network={NETWORK_NAMES.linea}
method="eth_chainId"
/>
import Description from "/services/reference/_partials/_eth_chainid-description.mdx";

<Description />

## Parameters

import Parameters from "/services/reference/_partials/_eth_chainid-parameters.mdx";

<Parameters />

## Returns

import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx";

<Returns />

## Example

import Example from "/services/reference/_partials/_eth_chainid-example.mdx";

<Example />

### Request

import Request from "./_eth_chainid-request.mdx"

<Request />

### Response

import Response from "/services/reference/_partials/_eth_chainid-response.mdx";

<Response />
Loading
Loading