From 98d3ad4a6aefe54ee49b5d2e3f9ed43b2319a048 Mon Sep 17 00:00:00 2001 From: Sileo Date: Sun, 7 Apr 2024 13:33:32 +0200 Subject: [PATCH 1/2] Added eth_checkMethodSupport --- src/eth/client.yaml | 16 ++++++++++++++++ src/schemas/base-types.yaml | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/src/eth/client.yaml b/src/eth/client.yaml index 0af6f83a..317ccbc7 100644 --- a/src/eth/client.yaml +++ b/src/eth/client.yaml @@ -36,3 +36,19 @@ name: Block number schema: $ref: '#/components/schemas/uint' +- name: eth_checkMethodSupport + summary: Returns an object with data about supported methods + params: + - name: Method names + required: false + schema: + type: array + items : + $ref: '#/components/schemas/methodName' + result: + name: Method support object + schema: + type: object + patternProperties: + '^(eth_|debug_|engine_).*$': boolean + additionalProperties: false diff --git a/src/schemas/base-types.yaml b/src/schemas/base-types.yaml index f598ae1a..ce477a28 100644 --- a/src/schemas/base-types.yaml +++ b/src/schemas/base-types.yaml @@ -43,6 +43,10 @@ bytes65: title: 65 hex encoded bytes type: string pattern: ^0x[0-9a-f]{130}$ +methodName: + title: Name of a ETH JSON-RPC method + type: string + pattern: ^(eth_|debug_|engine_).*$ ratio: title: normalized ratio type: number From 16bc393302b47d3fab6fbaa972b1d4b767efdd88 Mon Sep 17 00:00:00 2001 From: Sileo Date: Sun, 7 Apr 2024 13:41:14 +0200 Subject: [PATCH 2/2] Added example for eth_checkMethodSupport --- src/eth/client.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/eth/client.yaml b/src/eth/client.yaml index 317ccbc7..528efb97 100644 --- a/src/eth/client.yaml +++ b/src/eth/client.yaml @@ -52,3 +52,17 @@ patternProperties: '^(eth_|debug_|engine_).*$': boolean additionalProperties: false + examples: + - name: eth_checkMethodSupport example + params: + - name: Method names + value: + - 'eth_getBalance' + - 'eth_blockNumber' + - 'eth_sendTransaction' + result: + name: Method support object + value: + eth_getBalance: true + eth_blockNumber: true + eth_sendTransaction: false \ No newline at end of file