Skip to content

Commit 401b459

Browse files
committed
Merge branch 'main' into 1566-multichain
# Conflicts: # docs/whats-new.md # wallet-sidebar.js
2 parents 6397c3d + 05faf12 commit 401b459

File tree

277 files changed

+24276
-22582
lines changed

Some content is hidden

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

277 files changed

+24276
-22582
lines changed

.github/CODEOWNERS

+1-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,7 @@
22
# so the listed codeowners apply only if there is no later match.
33

44
# Default owner for all other files
5-
* @MetaMask/activation
6-
7-
# Docusaurus configuration
8-
docusaurus.config.js @MetaMask/activation @MetaMask/tech-writers
9-
10-
# GitHub workflows and templates
11-
/.github/ @MetaMask/activation @MetaMask/tech-writers
12-
13-
# Static image and video files
14-
/static/ @MetaMask/activation @MetaMask/tech-writers
15-
16-
# Vercel configuration
17-
vercel.json @MetaMask/activation @MetaMask/tech-writers
18-
19-
# Sidebar files
20-
*-sidebar.js @MetaMask/activation @MetaMask/tech-writers
5+
* @MetaMask/dashboard @MetaMask/tech-writers
216

227
# All other Markdown files
238
*.md @MetaMask/tech-writers

.github/workflows/dependency_review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
case:
11-
name: Check for licences not being allowed
11+
name: Check for licenses not being allowed
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:

.github/workflows/trivy-cache.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: trivy-cache-db
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "0 1 * * *"
11+
12+
jobs:
13+
trivy:
14+
name: Run trivy scanner
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Trivy Cache
19+
uses: ConsenSys/docs-gha/trivy-update-cache@main

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ To contribute changes:
7171

7272
> **Notes:**
7373
>
74-
> - All documentation content is located in the `wallet`, `snaps`, `services`, and
74+
> - All documentation content is located in the `wallet`, `sdk`, `snaps`, `services`, and
7575
> `developer-tools` directories.
76-
> - If you add a new documentation page, edit `wallet-sidebar.js`, `snaps-sidebar.js`,
76+
> - If you add a new documentation page, edit `wallet-sidebar.js`, `sdk-sidebar.js`, `snaps-sidebar.js`,
7777
> `services-sidebar.js`, or `dashboard-sidebar.js` to add the page to the
7878
> [sidebar](https://docs-template.consensys.io/create/configure-docusaurus#sidebar).
7979
> - If you delete, rename, or move a documentation file, add a
@@ -120,7 +120,7 @@ Refer to the [Consensys documentation style guide](https://docs-template.consens
120120

121121
## Add images
122122

123-
All images are located in the `wallet/assets`, `snaps/assets`, `services/images`, and
123+
All images are located in the `wallet/assets`, `sdk/_assets`, `snaps/assets`, `services/images`, and
124124
`developer-tools/images` directories.
125125
When adding a new image, such as a screenshot or diagram, make sure the image has a white or
126126
`#1b1b1d` color background in order for it to be compatible with the site's light and dark modes.

LICENSE-MIT

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 MetaMask
3+
Copyright (c) 2018-2025 MetaMask
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

developer-tools/dashboard/get-started/create-api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Based on your plan, Infura allows for the following amount of API keys:
1313
- Developer plan - Allows up to five API keys.
1414
- Team plans and higher - No limit on the number of API keys.
1515

16-
For more information, see to the [Infura pricing page](https://www.infura.io/pricing).
16+
For more information, see the [Infura pricing page](https://www.infura.io/pricing).
1717

1818
:::
1919

2020
Infura allows you to enable multiple network endpoints and expansion APIs for your API key. If calls are
2121
made to a disabled network or service, then all requests to that network or service will fail.
2222

23-
To keep your account secure and cost effective, add only the necessary endpoints, as some have usage
23+
To keep your account secure and cost-effective, add only the necessary endpoints, as some have usage
2424
limits or charges based on request volume.
2525

2626
To create an API key:

developer-tools/dashboard/how-to/credit-usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: View your Infura credit usage stats.
55
# View credit usage
66

77
You can view your daily credit usage in relation to your daily credit quota limit. Daily credit usage
8-
counts are reset everyday at 00:00 UTC for all customers.
8+
counts are reset every day at 00:00 UTC for all customers.
99

1010
Select **View Usage** from the **Daily Credit Usage** section on the dashboard, or select
1111
the **Usage** tab from the **Settings** > **Billing** dropdown.

developer-tools/dashboard/how-to/secure-an-api/set-rate-limits.md

+16
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,19 @@ Set rate limiting in the API key's **Settings** tab **Key Credit Limits** sectio
2626
credits per day in integers, for example, 20000. The value `0` means default limits are applied.
2727

2828
When the number of used credits reach this limit, all requests will be rejected until the next day (00:00 UTC).
29+
30+
If you exceed the specified limits, you'll receive a JSON response with an
31+
[HTTP error status code `429`](/services/reference/ethereum/json-rpc-methods#http-errors). For example:
32+
33+
```json
34+
{
35+
"jsonrpc": "2.0",
36+
"id": 1,
37+
"error": {
38+
"code": 429,
39+
"event": -33300,
40+
"message": "Too Many Requests",
41+
"details": "You have surpassed your user-defined key throughput limit setting. To make more requests with this key, review key setting configurations."
42+
}
43+
}
44+
```

docs/whats-new.md

+30-13
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,30 @@ The latest major MetaMask documentation updates are listed by the month they wer
99
For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom
1010
of the [MetaMask developer page](https://metamask.io/developer/).
1111

12-
## November 2024
12+
## January 2025
1313

1414
- Documented Multichain API [guide](/wallet/how-to/manage-networks/use-multichain),
1515
[concept](/wallet/concepts/multichain-api), and [reference](/wallet/reference/multichain-api).
1616
([#1621](https://github.com/MetaMask/metamask-docs/pull/1621))
17+
- Documented [`eth_simulateV1`](/services/reference/ethereum/json-rpc-methods/eth_simulatev1). ([#1798](https://github.com/MetaMask/metamask-docs/pull/1798))
18+
- Added new [MetaMask SDK documentation section](/sdk).
19+
([#1766](https://github.com/MetaMask/metamask-docs/pull/1766))
20+
- Documented Snaps [`Banner`](/snaps/features/custom-ui/#banner), [`Container`](/snaps/features/custom-ui/#container), [`Footer`](/snaps/features/custom-ui/#footer), [`Skeleton`](/snaps/features/custom-ui/#skeleton), and [`Value`](/snaps/features/custom-ui/#value) UI components.
21+
([#1835](https://github.com/MetaMask/metamask-docs/pull/1835))
22+
23+
## December 2024
24+
25+
- Documented [Swellchain](/services/reference/swellchain) support. ([#1776](https://github.com/MetaMask/metamask-docs/pull/1776))
26+
- Documented [Snaps notifications expanded view](/snaps/features/notifications/#expanded-view).
27+
([#1774](https://github.com/MetaMask/metamask-docs/pull/1774))
28+
- Documented [`snap_getInterfaceContext`](/snaps/reference/snaps-api/#snap_getinterfacecontext).
29+
([#1772](https://github.com/MetaMask/metamask-docs/pull/1772))
30+
31+
## November 2024
32+
33+
- Documented [updated error responses](/services/reference/ethereum/json-rpc-methods) when rate-limiting Infura JSON-RPC API calls. ([#1749](https://github.com/MetaMask/metamask-docs/pull/1749))
1734
- Documented [Unichain Sepolia](/services/reference/unichain) support. ([#1725](https://github.com/MetaMask/metamask-docs/pull/1725))
18-
- Updated Snaps [Custom UI documentation](/snaps/features/custom-ui/) for MetaMask Extension version 12.6.
35+
- Updated Snaps [custom UI documentation](/snaps/features/custom-ui/) for MetaMask Extension version 12.6.
1936
([#1715](https://github.com/MetaMask/metamask-docs/pull/1715))
2037
- Added tutorial for
2138
[creating a simple Starknet dapp](/wallet/how-to/use-non-evm-networks/starknet/create-a-simple-starknet-dapp).
@@ -29,7 +46,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
2946
([#1509](https://github.com/MetaMask/metamask-docs/pull/1509))
3047
- Documented [Scroll](/services/reference/scroll) support.
3148
([#1641](https://github.com/MetaMask/metamask-docs/pull/1641))
32-
- Updated [Wallet landing page](/wallet) and added [Connect to MetaMask](/wallet/connect) section
49+
- Updated [Wallet landing page](/wallet) and added [Connect to MetaMask](/wallet/how-to/connect) section
3350
with SDK, third-party libraries, and Wallet API connection options.
3451
([#1494](https://github.com/MetaMask/metamask-docs/pull/1494))
3552
- Documented [`snap_getPreferences`](/snaps/reference/snaps-api/#snap_getpreferences).
@@ -52,7 +69,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
5269
([#1540](https://github.com/MetaMask/metamask-docs/pull/1540))
5370
- Documented [Snaps user-defined components](/snaps/features/custom-ui/user-defined-components).
5471
([#1557](https://github.com/MetaMask/metamask-docs/pull/1557))
55-
- Updated [Android SDK documentation](/wallet/connect/metamask-sdk/mobile/android) with convenience
72+
- Updated [Android SDK documentation](/sdk) with convenience
5673
methods and examples using coroutines.
5774
([#1546](https://github.com/MetaMask/metamask-docs/pull/1546))
5875
- Documented [Infura's credit pricing model](/services/get-started/pricing).
@@ -77,12 +94,12 @@ of the [MetaMask developer page](https://metamask.io/developer/).
7794

7895
## June 2024
7996

80-
- Documented [Snaps custom UI with JSX](/snaps/features/custom-ui/with-jsx).
97+
- Documented [Snaps custom UI with JSX](/snaps/features/custom-ui).
8198
([#1348](https://github.com/MetaMask/metamask-docs/pull/1348))
8299
- Updated [React dapp with global state tutorial](/wallet/tutorials/react-dapp-global-state) with
83100
instructions for EIP-6963.
84101
([#1330](https://github.com/MetaMask/metamask-docs/pull/1330))
85-
- Documented that the Gas API can be [called without an API key secret](/services/gas-api/api-reference). ([#1346](https://github.com/MetaMask/metamask-docs/pull/1346))
102+
- Documented that the Gas API can be [called without an API key secret](/services/reference/gas-api). ([#1346](https://github.com/MetaMask/metamask-docs/pull/1346))
86103
- Updated [Snaps resources](/snaps/learn/resources) and added a new section "Snaps for developers." ([#1329](https://github.com/MetaMask/metamask-docs/pull/1329))
87104
- Documented [how to allow automatic connections to a Snap](/snaps/how-to/allow-automatic-connections).
88105
([#1322](https://github.com/MetaMask/metamask-docs/pull/1322))
@@ -116,7 +133,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
116133
- Documented [Snaps notifications](/snaps/features/notifications).
117134
([#1292](https://github.com/MetaMask/metamask-docs/pull/1292))
118135
- Moved Snaps-specific Wallet API methods from the
119-
[Wallet JSON-RPC API reference](/wallet/reference/json-rpc-api) to the
136+
[Wallet JSON-RPC API reference](/wallet/reference/json-rpc-methods) to the
120137
[Snaps reference](/snaps/reference/wallet-api-for-snaps).
121138
([#1286](https://github.com/MetaMask/metamask-docs/pull/1286))
122139
- Documented [Snaps `onKeyringRequest` entry point](/snaps/reference/entry-points/#onkeyringrequest).
@@ -129,7 +146,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
129146
([#1274](https://github.com/MetaMask/metamask-docs/pull/1274))
130147
- Documented [Snaps cron jobs](/snaps/features/cron-jobs).
131148
([#1271](https://github.com/MetaMask/metamask-docs/pull/1271))
132-
- Updated [how to connect to MetaMask](/wallet/connect/wallet-api) with vanilla TypeScript and React
149+
- Updated [how to connect to MetaMask](/wallet/how-to/connect) with vanilla TypeScript and React
133150
TypeScript instructions.
134151
([#1247](https://github.com/MetaMask/metamask-docs/pull/1247))
135152

@@ -148,7 +165,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
148165
- Documented [Snap-defined timeouts](/snaps/reference/permissions/#snap-defined-timeouts).
149166
([#1224](https://github.com/MetaMask/metamask-docs/pull/1224) and
150167
[#1227](https://github.com/MetaMask/metamask-docs/pull/1227))
151-
- Restructured Wallet documentation to emphasize [connecting using EIP-6963](/wallet/connect/wallet-api).
168+
- Restructured Wallet documentation to emphasize [connecting using EIP-6963](/wallet/how-to/connect).
152169
([#1214](https://github.com/MetaMask/metamask-docs/pull/1214))
153170
- Documented [Snaps custom name resolution](/snaps/features/custom-name-resolution).
154171
([#924](https://github.com/MetaMask/metamask-docs/pull/924))
@@ -160,9 +177,9 @@ of the [MetaMask developer page](https://metamask.io/developer/).
160177
([#1209](https://github.com/MetaMask/metamask-docs/pull/1209) and
161178
[#1225](https://github.com/MetaMask/metamask-docs/pull/1225))
162179
- Removed "Flask" label from [Snaps home pages](/snaps/reference/entry-points/#onhomepage) and
163-
[`snap_getLocale`](/snaps/reference/snaps-api/#snap_getlocale).
180+
[`snap_getLocale`](/snaps/reference/snaps-api/#snap_getlocale-deprecated).
164181
([#1204](https://github.com/MetaMask/metamask-docs/pull/1204))
165-
- Restructured [SDK documentation](/wallet/how-to/use-sdk) to de-emphasize it as a recommended method.
182+
- Restructured [SDK documentation](/sdk) to de-emphasize it as a recommended method.
166183
([#1200](https://github.com/MetaMask/metamask-docs/pull/1200) and
167184
[#1230](https://github.com/MetaMask/metamask-docs/pull/1230))
168185
- Deprecated the following [provider API](/wallet/reference/provider-api) elements:
@@ -177,7 +194,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
177194
([#1178](https://github.com/MetaMask/metamask-docs/pull/1178))
178195
- Improved and restructured the [Snaps Keyring API reference](/snaps/reference/keyring-api).
179196
([#1170](https://github.com/MetaMask/metamask-docs/pull/1170))
180-
- Documented [how to connect and sign using the Unity SDK](/wallet/how-to/use-sdk/gaming/unity/connect-and-sign).
197+
- Documented [how to connect and sign using the Unity SDK](/sdk).
181198
([#1023](https://github.com/MetaMask/metamask-docs/pull/1023))
182199

183200
## February 2024
@@ -199,7 +216,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).
199216
- Restructured and improved [Wallet documentation](/wallet) and introduced "Wallet API" terminology.
200217
([#1114](https://github.com/MetaMask/metamask-docs/pull/1114) and
201218
[#1125](https://github.com/MetaMask/metamask-docs/pull/1125))
202-
- Documented [how to detect multiple wallets using EIP-6963](/wallet/connect/wallet-api).
219+
- Documented [how to detect multiple wallets using EIP-6963](/wallet/how-to/connect).
203220
([#1094](https://github.com/MetaMask/metamask-docs/pull/1094))
204221
- Documented [how to communicate errors in Snaps](/snaps/how-to/communicate-errors).
205222
([#1117](https://github.com/MetaMask/metamask-docs/pull/1117))

docusaurus.config.js

+27-4
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,29 @@ const config = {
153153
},
154154
sidebarItemsGenerator: async function ({ defaultSidebarItemsGenerator, ...args }) {
155155
const sidebarItems = await defaultSidebarItemsGenerator(args);
156-
const dymanicItems = await fetchAndGenerateDynamicSidebarItems(
156+
const dynamicItems = await fetchAndGenerateDynamicSidebarItems(
157157
MM_RPC_URL,
158158
MM_REF_PATH,
159159
NETWORK_NAMES.metamask
160160
)
161161
if (args.item.dirName === "reference/json-rpc-methods") {
162-
return [...sidebarItems, ...dymanicItems]
162+
return [...sidebarItems, ...dynamicItems]
163163
}
164164
return sidebarItems;
165165
}
166166
},
167167
],
168+
[
169+
"@docusaurus/plugin-content-docs",
170+
{
171+
id: "sdk",
172+
path: "sdk",
173+
routeBasePath: "sdk",
174+
editUrl: "https://github.com/MetaMask/metamask-docs/edit/main/",
175+
sidebarPath: require.resolve("./sdk-sidebar.js"),
176+
breadcrumbs: false,
177+
},
178+
],
168179
"./src/plugins/plugin-json-rpc.ts",
169180
isProd
170181
? [
@@ -192,9 +203,13 @@ const config = {
192203
width: 150,
193204
},
194205
items: [
206+
{
207+
to: "sdk",
208+
label: "SDK",
209+
},
195210
{
196211
to: "wallet",
197-
label: "Wallet",
212+
label: "Wallet API",
198213
},
199214
{
200215
to: "snaps",
@@ -258,6 +273,10 @@ const config = {
258273
{
259274
title: "Documentation",
260275
items: [
276+
{
277+
label: "SDK",
278+
to: "/sdk",
279+
},
261280
{
262281
label: "Wallet",
263282
to: "/wallet",
@@ -283,6 +302,10 @@ const config = {
283302
label: "Documentation GitHub",
284303
href: "https://github.com/MetaMask/metamask-docs",
285304
},
305+
{
306+
label: "MetaMask Mobile GitHub",
307+
href: "https://github.com/MetaMask/metamask-mobile",
308+
},
286309
{
287310
label: "MetaMask wallet GitHub",
288311
href: "https://github.com/MetaMask/metamask-extension/",
@@ -350,7 +373,7 @@ const config = {
350373
appId: "AWX4QVM59R",
351374

352375
// Public API key: it is safe to commit it
353-
apiKey: "6095a25a6824bfa909fa0692e6847ec4",
376+
apiKey: "861f327c200a8eab62a28ee1396f90de",
354377

355378
indexName: "mm--v2-staging",
356379

0 commit comments

Comments
 (0)