ethereum / execution-apis

Collection of APIs provided by Ethereum execution layer clients
Creative Commons Zero v1.0 Universal
908 stars 352 forks source link

`net_version` is missing #540

Open shanejonas opened 2 months ago

shanejonas commented 2 months ago

This method is missing from execution-apis

here is a start for what it should look like:

net_version method object
{
  "name": "net_version",
  "params": [],
  "result": {
    "description": "Returns the current network ID.",
    "name": "net_version",
    "schema": {
      "type": "string"
    }
  },
  "description": "Returns the current network ID.",
  "examples": [
    {
      "name": "net_version",
      "description": "Example of a net_version request",
      "params": [],
      "result": {
        "name": "net_version",
        "description": "The current network ID",
        "value": "0x1"
      }
    }
  ]
}