Skip to content

Commit

Permalink
Fixed schema to better render in the docs side + removed createAccess…
Browse files Browse the repository at this point in the history
…List (#156)

* Fixed schema to better render in the docs side + removed createAccessList

* Update openrpc.json

Co-authored-by: Zachary Belford <[email protected]>

---------

Co-authored-by: Zachary Belford <[email protected]>
  • Loading branch information
shanejonas and BelfordZ authored Jun 8, 2023
1 parent 6cbaec6 commit ee092ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 13 additions & 1 deletion merge-openrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ const getFilteredExecutionAPIs = () => {

// fetch, merge and write
getFilteredExecutionAPIs().then((EthereumOpenRPC) => {
EthereumOpenRPC.methods.forEach((method) => {
const tag = {
name: "Ethereum API",
description: "Ethereum Node JSON-RPC method",
};
if (method.tags) {
method.tags.push(tag);
} else {
method.tags = [tag];
}
});
fs.writeFileSync(__dirname + "/src/build/openrpc.json",
JSON.stringify(
mergeOpenRPC(MetaMaskOpenRPC, EthereumOpenRPC),
Expand All @@ -25,7 +36,8 @@ const unneeded = [
/eth_signTransaction/,
/eth_sign/,
/debug_.*/,
/engine_.*/
/engine_.*/,
/eth_createAccessList/
];

const filterExecutionAPIs = (openrpcDocument) => {
Expand Down
12 changes: 10 additions & 2 deletions openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
},
"topics": {
"type": "array",
"description": "An array of topics to filter the logs by. Optional."
"description": "An array of topics to filter the logs by.",
"items": {
"type": "string"
}
}
}
}
Expand Down Expand Up @@ -251,9 +254,14 @@
"schema": {
"title": "requestPermissionObject",
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true
},
"properties": {
"eth_accounts": {
"type": "object"
"type": "object",
"additionalProperties": true
}
}
}
Expand Down

0 comments on commit ee092ab

Please sign in to comment.