Skip to content

Commit dd4cb8b

Browse files
alexandratranshahbaz17bgravenorst
authored
SDK / MM Connect new structure (#2337)
* SDK new structure PoC * edits * remove custom reference component * edits * fix links, update redirects, "metamask wallet sdk" * add simplified api reference with two examples * missing files * remove starknet docs * copy over solana docs * Update terminology and restructure EVM docs * fix broken links * fix broken links * Add/update Solana Wallet Adapter docs (#2443) * Update mobile products menu * Update MM Connect EVM JS code samples with potential new usage (#2454) * Update MM Connect EVM JS code samples with potential new usage * remove initialize sdk comment * add provider to code snippets * fix cursor bugs * remove /evm from wagmi install * Remove ParserOpenRPC component and replace usage in Linea services * fix broken link * Add more multichain info (#2479) * Add more multichain info * minor edits * Enhance JS section {WIP} (#2450) * Enhance JS section Add viem, web3, ethers support * Feat EVM Structure changes (#2538) * fix some cursor issues and use mm connect package * fix links, slight file restructure * add wagmi tabs + edits * update redirects * fix link --------- Co-authored-by: Alexandra Carrillo <alexandra.carrillo@consensys.net> * Add view & wagmi options Add view and wagmi code snippets * MM Connect ( EVM + SOL ) fixes (#2619) * MM Connect ( EVM + SOL ) * rename MM to MetaMask * code snippets update * fix broken link * update MM to MetaMask * fix broken links * MM Connect docs updates (#2720) * MM Connect docs updates * MM Connect Overview page updates * Update about page of overview * Redo multichain pages * minor edits * Solana docs edits * MS Style guide fixes * Reword + One more Option * rm connector library page No connector library available for CAIP multichain * connector library link remove * Multichain tutorial {WIP} - will include actual code from github * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/guides/connect-to-multichain.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * link fixes * broken link fixes * Update sdk/multichain/index.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * MM Connect Solana 0.2.0 changes updates * solana fixes * dep terminate and singleton behaviour * Updated based on new changes + revamp react native quickstart along with typo fixes and migration guide * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Update sdk/multichain/connect/tutorials/create-multichain-dapp.md Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> * Solana support via Infura for RPC Fixes #2337 (comment) * Edit Solana and EVM. (#2741) * Edit Solana and EVM. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Fix typo. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Restructure and complete multichain SDK documentation Restructures the multichain SDK docs for consistency, accuracy, and better onboarding. Changes: New pages: Add multichain quickstart, SDK methods reference, and sign messages guide. Quickstart: Modeled after the EVM quickstart — template setup, manual setup, methods-at-a-glance table, and scopes reference. SDK methods reference: Document connect, getSession, invokeMethod, disconnect, on, off, getInfuraRpcUrls, properties, and events sourced from the connect-multichain README. Guides: Rewrite sign-transactions (personal_sign, eth_signTypedData_v4, solana_signMessage) and send-transactions (eth_sendTransaction, gas estimation, full Solana tx building with @solana/web3.js). Tutorial: Fix createMultichainClient to use await, add missing pubkey and base64 encoding to solana_signMessage, update all getClient() call sites. API consistency: Standardize connect() to positional form across all files, add getSession() after connect, standardize Solana RPC URLs to Infura. Introduction page: Add quickstart CTA, update CardList with all entry points, surface SDK method names alongside underlying CAIP API methods. Removed: connect-to-multichain.md guide (consolidated into quickstart). * Add Solana SDK methods page + sidebar changes * EVM fixes * Solana, Multichian fixes + typos * fix broken link * Edits as per feedback https://vercel.com/consensys-ddffed67/metamask-docs/c/hIkDAWO0fhkt?s=1 * reword as per https://vercel.com/consensys-ddffed67/metamask-docs/c/W2tzjVpK_Q0F?s=1 * remove as per feedback as per https://vercel.com/consensys-ddffed67/metamask-docs/c/SWhaF513aFLu?s=1 * Update based on feedback on multichain api page * Feat/ai copy button (#2743) * Enriched Copy Button preview * Replaced the generic svg with brand svg + ui nits * Remove MCP buttons for now We will address MCP (product-specific mcp) feature later in a different PR * Handle long prompts with clipboard fallback Add URL length guard and clipboard fallback for AI tool links. Introduce MAX_URL_LENGTH and make openInAiTool async to copy the page markdown to the clipboard when the full prompt URL would be too long, then open the AI tool with a short prompt. If clipboard write fails, fall back to opening the tool with a shorter prompt. Pass a flashCopied callback to openInAiTool, update the dropdown buttons to use it, extend the UI flash duration for clipboard-copy feedback (3000ms), and show a "Page copied — paste in chat" description when content was copied. This prevents overly long GET URLs and improves UX for large pages. * Hoist ExternalArrow and remove duplicate Move the ExternalArrow SVG component higher in CopyPageButton.jsx so it's declared before the default export, and remove the duplicated definition later in the file. This is a pure refactor to avoid redeclaration and improve code organization; no behavior changes intended. * Pass tool IDs to AI open handler and flash state Add a toolId parameter to openInAiTool and use it when calling the flash callback so each AI tool can show its own "page copied" state. Update the copiedId delay to apply longer timing for any id starting with "ai-". Propagate tool-specific IDs (ai-claude, ai-chatgpt, ai-perplexity) from the AI buttons and adjust the item description checks to use those IDs. * Rename SDK docs to MetaMask Connect (#2749) * Initial Overview edits. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Structural changes. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Add banner. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Fix vercel redirects, remove unused import, bold banner text * Fix vercel. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Rename SDK docs to MetaMask Connect Rename the top-level docs from `sdk` to `metamask-connect` and update related content and config. Updated docusaurus.config.js to point to the new path and sidebar (mm-connect-sidebar.js), added a client-redirects plugin to map existing /metamask-connect paths back to /sdk, and renamed LLMS output patterns and titles. Adjusted internal documentation links (CardList, quickstarts, multichain/method refs) and updated versioned docs to use the new paths. Minor docs formatting tweaks in CONTRIBUTING.md and many doc/asset files were moved/renamed to reflect the new structure. * Updates from #2744 #2744 * Fix broken link * Update vercel.json redirects for SDK and Connect Adjust various routing rules in vercel.json to reflect documentation reorganization. Key changes: - Redirect several /metamask-connect/... sources to /sdk/... and vice versa where appropriate. - Add new /sdk/connect/* mappings to corresponding /metamask-connect/evm/connect/quickstart/ routes (including wagmi, rainbowkit, connectkit, dynamic, web3auth, react-native, etc.). - Consolidate wallet reference redirects to /metamask-connect/evm/connect/reference/json-rpc-api/ and add a wildcard mapping for JSON-RPC paths. - Update destinations for supported-platforms, llm-prompt, and SDK reference pages; change some quickstart/partner destinations to quickstart. - Remove obsolete multichain and duplicate snaps-development-guide redirects and adjust connect-extension destination. These changes mirror a docs restructure to centralize SDK and Connect content under the Metamask Connect/EVm paths. * Revert "Structural changes." This reverts commit 7ca238f. * Re-add scopes documentation. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Surface important note earlier, and other edits. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Revert Vercel.json Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Removed extra connect folder from each Address this feedback #2749 (comment) * rm extra connect * Update JSON-RPC and batch links in connect doc Fix links in src/pages/quickstart/builder/metamask-sdk/react/stepContent/connect.mdx to point to the EVM-specific documentation: update the JSON-RPC methods reference to /metamask-connect/evm/reference/json-rpc-methods and the batch-requests guide to /metamask-connect/evm/guides/metamask-exclusive/batch-requests so provider.request() documentation targets the correct pages. * Fixes as per comment * Move Multichain client to top as per feedback * Included Solana libraries --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> Co-authored-by: bgravenorst <byron.gravenorst@consensys.net> * Fix navbar navigation links * Fix build + link inspector * Throw on broken Markdown links; add wallet redirects Change Docusaurus config to treat broken Markdown links as errors (onBrokenMarkdownLinks: 'throw') to fail fast on broken links. Add a comprehensive set of redirects that map legacy /wallet/* routes to the new /metamask-connect/* structure (including EVM, Solana, reference, guides, and various how-to/tutorial pages) to preserve links, SEO, and user bookmarks after the docs restructuring. * Add arbitrum docs to ignorepattern domain is returning 429 (rate limiting), failing the check always, will revert before merge to main * Update .linkspector.yml domain is returning ERR_CONNECTION_CLOSED, failing the check always, will revert before merge to main * feat. MM Connect documentation (#2754) * feat. MM Connect documentation * Fix broken link * Hide solana integration that aren't ready * Revert for viz * Update quickstart docs to 'MetaMask SDK' for old links * updated platforms & environments Revise and expand the Supported platforms doc: update the frontmatter (expanded description and keywords), rework the intro, and add a Connection methods section that explains how MetaMask Connect routes connections across desktop, mobile, and Node.js (including QR and deeplink flows). Replace the old matrix with a clearer comparison table, add guidance about in-app browser limitations and using reliable RPC providers for relay-based connections, and add a Supported environments matrix linking to EVM, Solana, and Multichain quickstarts and guides. * remove non linked page * Add SEO keywords + updated descriptions * Feat/seo geo (#2765) * Feat SEO/GEO * Fix FAQ indentation just for crawlers * Add Solana FAQ * Add RN examples + troubleshooting pages * Node.js example + polyfill issues intros * Fix (await) * nits + typos fixes * nit * remove redundant crawl as per RFC 9309 https://www.rfc-editor.org/rfc/rfc9309 * nit fixes * Update in-app browser section * nit * Update migration guide to include polyfill issue * minor edits to overview content for style/simplicity * browser polyfill not needed * fix broken anchor * minor edits to multichain content * Update as per newer getInfuraRpcUrls changes * some evm edits * edit pass including EVM+Solana * fix build Need to consult with Alex on Snaps style module removal * clean up redirects * MetaMask Mobile -> The MetaMask mobile app * Add getInfuraRpcUrls for connect-solana + update getInfuraRpcUrls for multichain Add getInfuraRpcUrls for connect-solana + update getInfuraRpcUrls for multichain, along with minor changes in copy + added Supported chains table * Add JSON-RPC methods, and related fixes throughout content TO DO: audit RPC docs (error codes) * Update Global React Quickstart * Fix QS for EVM-REACT * Fix code higlighter and scroll on QS * Fix CodeQL issues + remove broken link for triton one * fix broken link * Ignore /quickstart/ to check for broken link * Hide JS template sections * fix JSON-RPC API missing info and styles * revert qs-file-links * add links to method reference * Fix merge issue and update card. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Add Wagmi Quickstart back to sidebar with updated package (#2778) * Add Wagmi quickstart Migrate from sdk to connect * Add common operations to wagmi quickstart * minor edits for consistency * revert qs-file-links changes * Update wagmi * wagmi@^3.6.0 wagmi/connectors@^8.0.0 updates * wagmi v3 hooks --------- Co-authored-by: Alexandra Carrillo <alexandra.carrillo@consensys.net> * update preview link of mmc evm-react example * minor edits * Update Multichain + Solana Node.js examples * minor edit --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> Co-authored-by: Mohammad Shahbaz Alam <shahbaz17@users.noreply.github.com> Co-authored-by: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> Co-authored-by: bgravenorst <byron.gravenorst@consensys.net>
1 parent 5f35862 commit dd4cb8b

393 files changed

Lines changed: 16387 additions & 17823 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ npm-debug.log*
2323
.envrc
2424
.env
2525
.integrationBuilderCache
26+
.cursor
2627

2728
# Generated Snaps docs
2829
snaps/reference/snaps-api/*.mdx

.linkspector.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ dirs:
22
- ./smart-accounts-kit
33
- ./developer-tools
44
- ./embedded-wallets
5-
- ./sdk
5+
- ./metamask-connect
66
- ./services
77
- ./snaps
8-
- ./wallet
98
excludedDirs:
109
- ./build
1110
- ./.vercel
@@ -28,13 +27,16 @@ ignorePatterns:
2827
- pattern: '^/smart-accounts-kit/'
2928
- pattern: '^/developer-tools/'
3029
- pattern: '^/embedded-wallets/'
31-
- pattern: '^/sdk/'
30+
- pattern: '^/metamask-connect/'
3231
- pattern: '^/services/'
3332
- pattern: '^/snaps/'
3433
- pattern: '^/wallet/'
3534
- pattern: '^/tutorials/'
35+
- pattern: '^/quickstart/'
3636
- pattern: 'https://web3onboard.thirdweb.com'
3737
- pattern: 'https://0xfury.com/privacy'
38+
- pattern: '^https://docs.arbitrum.io'
39+
- pattern: '^https://nodefleet.org'
3840
aliveStatusCodes:
3941
- 200
4042
- 206

CONTRIBUTING.md

Lines changed: 11 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ guide in some places.
1212
- [Style guide](#style-guide)
1313
- [Format links](#format-links)
1414
- [Add images](#add-images)
15-
- [Update the interactive API reference](#update-the-interactive-api-reference)
16-
- [Update `MetaMask/api-specs`](#update-metamaskapi-specs)
17-
- [Update `ethereum/execution-apis`](#update-ethereumexecution-apis)
1815
- [Test analytics](#test-analytics)
1916

2017
## Contribution workflow
@@ -74,7 +71,7 @@ To contribute changes:
7471
>
7572
> - All documentation content is located in the `sdk`, `wallet`, `embedded-wallets`, `smart-accounts-kit`, `services`,
7673
> `developer-tools`, `snaps`, and `src/pages` directories.
77-
> - If you add a new documentation page, edit `sdk-sidebar.js`, `wallet-sidebar.js`, `ew-sidebar.js`, `gator-sidebar.js`,
74+
> - If you add a new documentation page, edit `mm-connect-sidebar.js`, `ew-sidebar.js`, `gator-sidebar.js`,
7875
> `services-sidebar.js`, `dashboard-sidebar.js`, or `snaps-sidebar.js` to add the page to the
7976
> [sidebar](https://docs-template.consensys.io/create/configure-docusaurus#sidebar).
8077
> - If you delete, rename, or move a documentation file, add a
@@ -119,13 +116,13 @@ Refer to the [Consensys documentation style guide](https://docs-template.consens
119116

120117
## Format links
121118

122-
Most links in the Markdown pages use *relative file paths*, for example:
119+
Most links in the Markdown pages use _relative file paths_, for example:
123120

124121
```md
125122
You can enable users to create a [MetaMask smart account](../../concepts/smart-accounts.md) directly in your dapp.
126123
```
127124

128-
However, when linking between different product sections or using the `CardList` component, use *absolute URL paths*. For example:
125+
However, when linking between different product sections or using the `CardList` component, use _absolute URL paths_. For example:
129126

130127
```md
131128
When a dapp requests to submit a batch of transactions atomically, MetaMask may prompt users to upgrade their
@@ -134,14 +131,14 @@ externally owned account (EOA) to a [MetaMask smart account](/smart-accounts-kit
134131

135132
```md
136133
<CardList
137-
items={[
138-
{
139-
href: '/snaps/learn/about-snaps',
140-
title: 'About Snaps',
141-
description: 'See a high-level, technical overview of the Snaps system.',
142-
},
143-
...
144-
]}
134+
items={[
135+
{
136+
href: '/snaps/learn/about-snaps',
137+
title: 'About Snaps',
138+
description: 'See a high-level, technical overview of the Snaps system.',
139+
},
140+
...
141+
]}
145142
/>
146143
```
147144

@@ -154,114 +151,6 @@ When adding a new image, such as a screenshot or diagram, make sure the image ha
154151

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

157-
## Update the interactive API reference
158-
159-
The [Wallet JSON-RPC API reference](https://docs.metamask.io/wallet/reference/json-rpc-api/) uses
160-
an internal plugin to import and parse OpenRPC
161-
specifications from [`MetaMask/api-specs`](https://github.com/MetaMask/api-specs) (MetaMask-specific
162-
methods) and [`ethereum/execution-apis`](https://github.com/ethereum/execution-apis) (standard
163-
Ethereum methods).
164-
The site renders documentation for each method based on the specification, and displays an
165-
interactive module to test the methods in your browser.
166-
167-
### Update `MetaMask/api-specs`
168-
169-
To update documentation for MetaMask-specific JSON-RPC API methods:
170-
171-
1. Fork [`MetaMask/api-specs`](https://github.com/MetaMask/api-specs), clone the forked repository
172-
to your computer, and navigate into it:
173-
174-
```bash
175-
git clone git@github.com:<YOUR-USERNAME>/api-specs.git
176-
cd api-specs
177-
```
178-
179-
2. Follow the repository's [`README.md`](https://github.com/MetaMask/api-specs/blob/main/README.md)
180-
instructions to edit the OpenRPC specification and generate the output file, `openrpc.json`.
181-
182-
3. To test the API updates in the MetaMask doc site's interactive reference:
183-
184-
1. Create and switch to a temporary local branch of the doc site, [`MetaMask/metamask-docs`](https://github.com/MetaMask/metamask-docs).
185-
For example, to create and switch to a branch named `test-api-updates`:
186-
```bash
187-
cd metamask-docs
188-
git checkout -b test-api-updates
189-
```
190-
2. Copy and paste the output file `openrpc.json` into the root directory of `metamask-docs`.
191-
3. Use [`http-server`](https://www.npmjs.com/package/http-server) to serve `openrpc.json` locally.
192-
Install `http-server` if you haven't yet, and start the server:
193-
```bash
194-
npm install --global http-server
195-
http-server
196-
```
197-
The `openrpc.json` file is now served at [`http://127.0.0.1:8080/openrpc.json`](http://127.0.0.1:8080/openrpc.json).
198-
4. In `src/plugins/plugin-json-rpc.ts`, update the following line to point to the locally served `openrpc.json` file:
199-
```diff
200-
- export const MM_RPC_URL = "https://metamask.github.io/api-specs/latest/openrpc.json";
201-
+ export const MM_RPC_URL = "http://127.0.0.1:8080/openrpc.json";
202-
```
203-
5. In a new terminal window, preview the doc site locally:
204-
```bash
205-
cd metamask-docs
206-
npm start
207-
```
208-
6. Navigate to the API reference, and view your updates.
209-
210-
4. Add and commit your changes to `api-specs`, and create a PR.
211-
212-
5. Once your PR is approved and merged, the following must happen to publish the changes to the
213-
MetaMask doc site:
214-
215-
1. A new version of `api-specs` must be released by a user with write access to the repository.
216-
To release, go to the [Create Release Pull Request](https://github.com/MetaMask/api-specs/actions/workflows/create-release-pr.yml)
217-
action, select **Run workflow**, and enter a specific version to bump to in the last text box
218-
(for example, `0.10.6`). This creates a PR releasing a version of `api-specs`.
219-
2. Once the release PR is merged, the [Publish Release](https://github.com/MetaMask/api-specs/actions/workflows/publish-release.yml)
220-
action must be approved by an npm publisher.
221-
You can request an approval in the **#metamask-dev** Slack channel tagging
222-
**@metamask-npm-publishers**.
223-
For example:
224-
> @metamask-npm-publishers `@metamask/api-specs@0.10.6` is awaiting deployment :rocketship:
225-
https://github.com/MetaMask/api-specs/actions/runs/10615788573
226-
227-
### Update `ethereum/execution-apis`
228-
229-
To update documentation for standard Ethereum JSON-RPC API methods:
230-
231-
1. Fork [`ethereum/execution-apis`](https://github.com/ethereum/execution-apis), clone the forked
232-
repository to your computer, and navigate into it:
233-
234-
```bash
235-
git clone git@github.com:<YOUR-USERNAME>/execution-apis.git
236-
cd execution-apis
237-
```
238-
239-
2. Follow the repository's [`README.md`](https://github.com/ethereum/execution-apis/blob/main/README.md)
240-
instructions to edit the OpenRPC specification and generate the output file, `openrpc.json`.
241-
242-
3. To test the API updates in the MetaMask doc site's interactive reference, complete Step 3 in
243-
[Update `MetaMask/api-specs`](#update-metamaskapi-specs).
244-
245-
4. Add and commit your changes to `execution-apis`, and create a PR.
246-
247-
5. Once your PR is approved and merged, the following must happen to publish the changes to the
248-
MetaMask doc site:
249-
250-
1. `api-specs` must import the updated Ethereum API specification.
251-
Go to the [commit history](https://github.com/ethereum/execution-apis/commits/assembled-spec/)
252-
of the `assembled-spec` branch of `execution-apis`.
253-
Copy the full commit hash of the latest commit titled "assemble openrpc.json."
254-
Update the following line in `merge-openrpc.js` of `api-specs` with the updated commit hash,
255-
and create a PR:
256-
```diff
257-
const getFilteredExecutionAPIs = () => {
258-
- return fetch("https://raw.githubusercontent.com/ethereum/execution-apis/ac19b518a2596221cd7cd6421ee3dc654d7ff3b7/refs-openrpc.json")
259-
+ return fetch("https://raw.githubusercontent.com/ethereum/execution-apis/f75d4cc8eeb5d1952bd69f901954686b74c34c9b/refs-openrpc.json")
260-
```
261-
2. Once the change to `merge-openrpc.js` is merged, Step 5 in
262-
[Update `MetaMask/api-specs`](#update-metamaskapi-specs) must be completed to publish the
263-
changes to the MetaMask doc site.
264-
265154
## Test analytics
266155

267156
The [`docusaurus-plugin-segment`](https://github.com/xer0x/docusaurus-plugin-segment) plugin enables

docusaurus.config.js

Lines changed: 49 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ import fs from 'fs'
55
require('dotenv').config()
66
const { themes } = require('prism-react-renderer')
77
const { REF_ALLOW_LOGIN_PATH } = require('./src/lib/constants')
8-
const {
9-
fetchAndGenerateDynamicSidebarItems,
10-
NETWORK_NAMES,
11-
MM_REF_PATH,
12-
MM_RPC_URL,
13-
} = require('./src/plugins/plugin-json-rpc')
148
const codeTheme = themes.dracula
159
const productsDropdown = fs.readFileSync('./src/components/NavDropdown/Products.html', 'utf-8')
1610
const baseUrl = process.env.DEST || '/'
@@ -81,14 +75,36 @@ const config = {
8175
attributes: {
8276
type: 'application/ld+json',
8377
},
84-
innerHTML: `
78+
innerHTML: JSON.stringify({
79+
"@context": "https://schema.org",
80+
"@type": "Organization",
81+
"@id": `${fullUrl}#organization`,
82+
"name": "MetaMask",
83+
"url": fullUrl,
84+
"logo": new URL('img/favicons/favicon-96x96.png', fullUrl).toString(),
85+
"description": "MetaMask is the leading self-custodial cryptocurrency wallet and Web3 gateway, enabling developers to build dapps that connect to MetaMask across EVM and Solana ecosystems.",
86+
"sameAs": [
87+
"https://github.com/MetaMask",
88+
"https://twitter.com/MetaMask",
89+
"https://www.linkedin.com/company/metamask",
90+
"https://metamask.io"
91+
]
92+
}),
93+
},
8594
{
86-
"@context": "https://schema.org",
87-
"@type": "Organization",
88-
"url": "${fullUrl}",
89-
"logo": "${new URL('img/favicons/favicon-96x96.png', fullUrl).toString()}"
90-
}
91-
`,
95+
tagName: 'script',
96+
attributes: {
97+
type: 'application/ld+json',
98+
},
99+
innerHTML: JSON.stringify({
100+
"@context": "https://schema.org",
101+
"@type": "WebSite",
102+
"@id": `${fullUrl}#website`,
103+
"name": "MetaMask Developer Documentation",
104+
"url": fullUrl,
105+
"publisher": { "@id": `${fullUrl}#organization` },
106+
"description": "Official developer documentation for MetaMask Connect, Embedded Wallets, Snaps, and the MetaMask developer platform."
107+
}),
92108
},
93109
],
94110

@@ -265,37 +281,13 @@ const config = {
265281
[
266282
'@docusaurus/plugin-content-docs',
267283
{
268-
id: 'wallet',
269-
path: 'wallet',
270-
routeBasePath: 'wallet',
284+
id: 'metamask-connect',
285+
path: 'metamask-connect',
286+
routeBasePath: 'metamask-connect',
271287
editUrl: 'https://github.com/MetaMask/metamask-docs/edit/main/',
272-
sidebarPath: require.resolve('./wallet-sidebar.js'),
273-
breadcrumbs: false,
274-
remarkPlugins,
275-
rehypePlugins,
276-
sidebarItemsGenerator: async function ({ defaultSidebarItemsGenerator, ...args }) {
277-
const sidebarItems = await defaultSidebarItemsGenerator(args)
278-
const dynamicItems = await fetchAndGenerateDynamicSidebarItems(
279-
MM_RPC_URL,
280-
MM_REF_PATH,
281-
NETWORK_NAMES.metamask
282-
)
283-
if (args.item.dirName === 'reference/json-rpc-methods') {
284-
return [...sidebarItems, ...dynamicItems]
285-
}
286-
return sidebarItems
287-
},
288-
},
289-
],
290-
[
291-
'@docusaurus/plugin-content-docs',
292-
{
293-
id: 'sdk',
294-
path: 'sdk',
295-
routeBasePath: 'sdk',
296-
editUrl: 'https://github.com/MetaMask/metamask-docs/edit/main/',
297-
sidebarPath: require.resolve('./sdk-sidebar.js'),
288+
sidebarPath: require.resolve('./mm-connect-sidebar.js'),
298289
breadcrumbs: false,
290+
showLastUpdateTime: true,
299291
remarkPlugins,
300292
rehypePlugins,
301293
},
@@ -384,18 +376,18 @@ const config = {
384376
description: 'Complete documentation for MetaMask Embedded Wallets',
385377
},
386378
{
387-
filename: 'llms-sdk.txt',
388-
includePatterns: ['sdk/**/*.{md,mdx}'],
379+
filename: 'llms-metamask-connect.txt',
380+
includePatterns: ['metamask-connect/**/*.{md,mdx}'],
389381
fullContent: false,
390-
title: 'MetaMask SDK documentation',
391-
description: 'Documentation links for MetaMask SDK',
382+
title: 'MetaMask Connect documentation',
383+
description: 'Documentation links for MetaMask Connect',
392384
},
393385
{
394-
filename: 'llms-sdk-full.txt',
395-
includePatterns: ['sdk/**/*.{md,mdx}'],
386+
filename: 'llms-metamask-connect-full.txt',
387+
includePatterns: ['metamask-connect/**/*.{md,mdx}'],
396388
fullContent: true,
397-
title: 'MetaMask SDK documentation',
398-
description: 'Complete documentation for MetaMask SDK',
389+
title: 'MetaMask Connect documentation',
390+
description: 'Complete documentation for MetaMask Connect',
399391
},
400392
{
401393
filename: 'llms-smart-accounts-kit.txt',
@@ -493,7 +485,7 @@ const config = {
493485
{
494486
name: 'keywords',
495487
content:
496-
'MetaMask, Embedded Wallets, Quickstart, Web3 Development, SDK, Wallet Integration, API, Dapp Development, Blockchain Development, Ethereum Development, Smart Contract, Account Abstraction, Snaps, Crypto Wallet, DeFi, NFT, Infura, Services, Dashboard',
488+
'MetaMask, Embedded Wallets, Quickstart, Web3 Development, SDK, MetaMask Connect, Wallet Integration, API, Dapp Development, Blockchain Development, Ethereum Development, Smart Contract, Account Abstraction, Snaps, Crypto Wallet, DeFi, NFT, Infura, Services, Dashboard',
497489
},
498490
// Twitter-specific meta tags
499491
{
@@ -612,21 +604,17 @@ const config = {
612604
title: 'Documentation',
613605
items: [
614606
{
615-
label: 'SDK',
616-
to: '/sdk',
607+
label: 'MetaMask Connect',
608+
to: '/metamask-connect',
617609
},
618610
{
619-
label: 'Wallet API',
620-
to: '/wallet',
611+
label: 'Embedded Wallets',
612+
to: '/embedded-wallets',
621613
},
622614
{
623615
label: 'Smart Accounts Kit',
624616
to: '/smart-accounts-kit',
625617
},
626-
{
627-
label: 'Embedded Wallets',
628-
to: '/embedded-wallets',
629-
},
630618
{
631619
label: 'Snaps',
632620
to: '/snaps',
@@ -653,7 +641,7 @@ const config = {
653641
href: 'https://github.com/MetaMask/metamask-extension/',
654642
},
655643
{
656-
label: 'MetaMask SDK GitHub',
644+
label: 'MetaMask Connect GitHub',
657645
href: 'https://github.com/MetaMask/metamask-sdk/',
658646
},
659647
{
@@ -798,7 +786,7 @@ const config = {
798786
},
799787
mermaid: {
800788
options: {
801-
fontFamily: 'arial, verdana, sans-serif;',
789+
fontFamily: 'arial, verdana, sans-serif',
802790
wrap: true,
803791
securityLevel: 'loose',
804792
sequence: {

gator_versioned_docs/version-0.1.0/guides/advanced-permissions/execute-on-metamask-users-behalf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ With MetaMask Flask 13.9.0 or later, Advanced Permissions support automatically
100100
account to a [MetaMask smart account](../../concepts/smart-accounts.md). On earlier versions, upgrade
101101
the user to a smart account before requesting Advanced Permissions.
102102

103-
If the user has not yet been upgraded, you can handle the upgrade [programmatically](/wallet/how-to/send-transactions/send-batch-transactions/#about-atomic-batch-transactions) or ask the
103+
If the user has not yet been upgraded, you can handle the upgrade [programmatically](/metamask-connect/evm/guides/send-transactions/batch-transactions) or ask the
104104
user to [switch to a smart account manually](https://support.metamask.io/configure/accounts/switch-to-or-revert-from-a-smart-account/#how-to-switch-to-a-metamask-smart-account).
105105

106106
:::info Why is a Smart Account upgrade is required?

0 commit comments

Comments
 (0)