Skip to content

Commit 3f65e6e

Browse files
Add multichain tag (#275)
1 parent 05a94c9 commit 3f65e6e

File tree

2 files changed

+24
-35
lines changed

2 files changed

+24
-35
lines changed

merge-openrpc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ const getFilteredExecutionAPIs = () => {
1616
// fetch, merge and write
1717
getFilteredExecutionAPIs().then((EthereumOpenRPC) => {
1818
EthereumOpenRPC.methods.forEach((method) => {
19-
const tag = {
19+
const ethereumTag = {
2020
name: "Ethereum API",
2121
description: "Ethereum Node JSON-RPC method",
2222
};
23+
const multichainTag = {
24+
name: "Multichain API",
25+
description: "Multichain JSON-RPC method",
26+
};
2327
if (method.tags) {
24-
method.tags.push(tag);
28+
method.tags.push(ethereumTag, multichainTag);
2529
} else {
26-
method.tags = [tag];
30+
method.tags = [ethereumTag, multichainTag];
2731
}
2832
});
2933
fs.writeFileSync(__dirname + "/src/build/openrpc.json",

openrpc.yaml

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,15 @@ info:
33
title: JSON-RPC API
44
version: 1.0.0
55
description: >-
6-
This section provides an interactive reference for the JSON-RPC API of
7-
MetaMask's [Wallet API](/wallet/concepts/wallet-api). The API builds on a
8-
set of standard Ethereum methods with MetaMask-specific enhancements, and is
9-
designed for seamless integration into dapps.
10-
11-
12-
View the JSON-RPC API methods by selecting a method in the left sidebar. You
13-
can test the methods directly in the page using the API playground, with
14-
pre-configured examples or custom parameters. You can also save URLs with
15-
custom parameters using your browser's bookmarks.
16-
17-
18-
Each method may have one or more of the following labels:
19-
20-
21-
- **MetaMask** - The functionalities of these methods are specific to
22-
MetaMask, and may or may not be supported by other wallets.
23-
24-
- **Restricted** - These methods are restricted and require requesting
25-
permission using [`wallet_requestPermissions`](/wallet/reference/wallet_requestpermissions).
26-
27-
- **Mobile** - These methods are only available on MetaMask Mobile.
28-
29-
- **Experimental** - These methods are experimental and may be changed in
30-
the future.
31-
32-
- **Deprecated** - These methods are deprecated and may be removed in the
33-
future.
34-
35-
- **Ethereum API** - These are standard Ethereum JSON-RPC API methods. See
36-
the [Ethereum wiki](https://eth.wiki/json-rpc/API#json-rpc-methods) for more
37-
information about these methods.
6+
This section provides an interactive reference for MetaMask's Wallet
7+
JSON-RPC API. The API builds on a set of standard Ethereum methods with
8+
MetaMask-specific enhancements, and is designed for seamless integration
9+
into dapps.
3810
methods:
3911
- name: wallet_addEthereumChain
4012
tags:
4113
- $ref: '#/components/tags/MetaMask'
14+
- $ref: '#/components/tags/Multichain'
4215
summary: Adds an Ethereum chain to the wallet.
4316
description: >-
4417
Creates a confirmation asking the user to add the specified chain to the
@@ -219,6 +192,7 @@ methods:
219192
tags:
220193
- $ref: '#/components/tags/MetaMask'
221194
- $ref: '#/components/tags/Restricted'
195+
- $ref: '#/components/tags/Multichain'
222196
summary: Presents a plain text signature challenge to the user.
223197
description: >-
224198
Presents a plain text signature challenge to the user and returns the
@@ -264,6 +238,7 @@ methods:
264238
tags:
265239
- $ref: '#/components/tags/MetaMask'
266240
- $ref: '#/components/tags/Restricted'
241+
- $ref: '#/components/tags/Multichain'
267242
summary: Presents a structured data message for the user to sign.
268243
description: >-
269244
Presents a data message for the user to sign in a structured and readable
@@ -335,6 +310,7 @@ methods:
335310
- name: wallet_registerOnboarding
336311
tags:
337312
- $ref: '#/components/tags/MetaMask'
313+
- $ref: '#/components/tags/Multichain'
338314
summary: Redirects the user back to the site after onboarding.
339315
description: >-
340316
Registers the requesting site with MetaMask as the initiator of
@@ -354,6 +330,7 @@ methods:
354330
tags:
355331
- $ref: '#/components/tags/MetaMask'
356332
- $ref: '#/components/tags/Experimental'
333+
- $ref: '#/components/tags/Multichain'
357334
summary: Tracks a token in MetaMask.
358335
description: >-
359336
Requests that the user track the specified token in MetaMask. Returns a
@@ -480,6 +457,7 @@ methods:
480457
tags:
481458
- $ref: '#/components/tags/MetaMask'
482459
- $ref: '#/components/tags/Mobile'
460+
- $ref: '#/components/tags/Multichain'
483461
summary: Requests that the user scan a QR code.
484462
description: >-
485463
Requests that the user scan a QR code using their device camera.
@@ -554,6 +532,7 @@ methods:
554532
tags:
555533
- $ref: '#/components/tags/MetaMask'
556534
- $ref: '#/components/tags/Restricted'
535+
- $ref: '#/components/tags/Multichain'
557536
description: >-
558537
Creates a new wallet confirmation to make an Ethereum transaction from the
559538
user's account. This method requires that the user has granted permission
@@ -715,6 +694,7 @@ methods:
715694
- name: web3_clientVersion
716695
tags:
717696
- $ref: '#/components/tags/Ethereum'
697+
- $ref: '#/components/tags/Multichain'
718698
description: >-
719699
Returns the current MetaMask client version. This differs slightly per
720700
client. For example, the browser extension returns a string like
@@ -746,6 +726,7 @@ methods:
746726
- name: eth_subscribe
747727
tags:
748728
- $ref: '#/components/tags/Ethereum'
729+
- $ref: '#/components/tags/Multichain'
749730
summary: >-
750731
Subscribes to specific Ethereum events, returning a subscription ID used
751732
to receive notifications.
@@ -806,6 +787,7 @@ methods:
806787
- name: eth_unsubscribe
807788
tags:
808789
- $ref: '#/components/tags/Ethereum'
790+
- $ref: '#/components/tags/Multichain'
809791
summary: >-
810792
Unsubscribes from a specific Ethereum event, using the subscription ID
811793
provided by `eth_subscribe`.
@@ -1045,6 +1027,9 @@ components:
10451027
Ethereum:
10461028
name: Ethereum API
10471029
description: Ethereum execution API methods.
1030+
Multichain:
1031+
name: Multichain API
1032+
description: Multichain API methods.
10481033
errors:
10491034
UserRejected:
10501035
code: 4001

0 commit comments

Comments
 (0)