Skip to content

Instantly share code, notes, and snippets.

@ziogaschr
Last active January 13, 2021 13:07
Show Gist options
  • Save ziogaschr/c51916d70ca5304bb3e3abf4dcd518ca to your computer and use it in GitHub Desktop.
Save ziogaschr/c51916d70ca5304bb3e3abf4dcd518ca to your computer and use it in GitHub Desktop.
Core-Geth Discovery JSON (1.11.21-unstable)
{
"openrpc": "1.2.6",
"info": {
"title": "Core-Geth RPC API",
"version": "1.11.21-unstable/generated-at:2021-01-13T15:03:27+02:00"
},
"servers": [{ "url": "http://127.0.0.1:8545", "name": "tcp" }],
"methods": [
{
"name": "admin_addPeer",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn false, ErrNodeStopped\n\t}\n\tnode, err := enode.Parse(enode.ValidSchemes, url)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"invalid enode: %v\", err)\n\t}\n\tserver.AddPeer(node)\n\treturn true, nil\n}\n```",
"summary": "AddPeer requests connecting to a remote node, and also maintaining the new\nconnection at all times, even reconnecting if it is lost.\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L65"
}
},
{
"name": "admin_addTrustedPeer",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn false, ErrNodeStopped\n\t}\n\tnode, err := enode.Parse(enode.ValidSchemes, url)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"invalid enode: %v\", err)\n\t}\n\tserver.AddTrustedPeer(node)\n\treturn true, nil\n}\n```",
"summary": "AddTrustedPeer allows a remote node to always connect, even if slots are full\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L97"
}
},
{
"name": "admin_datadir",
"description": "```go\n{\n\treturn api.node.DataDir()\n}\n```",
"summary": "Datadir retrieves the current data directory the node is using.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L311"
}
},
{
"name": "admin_ecbp1100",
"description": "```go\n{\n\ti := uint64(blockNr.Int64())\n\terr := api.eth.blockchain.Config().SetECBP1100Transition(\u0026i)\n\treturn api.eth.blockchain.IsArtificialFinalityEnabled() \u0026\u0026 api.eth.blockchain.Config().IsEnabled(api.eth.blockchain.Config().GetECBP1100Transition, api.eth.blockchain.CurrentBlock().Number()), err\n}\n```",
"summary": "",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L267"
}
},
{
"name": "admin_exportChain",
"description": "```go\n{\n\tif first == nil \u0026\u0026 last != nil {\n\t\treturn false, errors.New(\"last cannot be specified without first\")\n\t}\n\tif first != nil \u0026\u0026 last == nil {\n\t\thead := api.eth.BlockChain().CurrentHeader().Number.Uint64()\n\t\tlast = \u0026head\n\t}\n\tif _, err := os.Stat(file); err == nil {\n\t\treturn false, errors.New(\"location would overwrite an existing file\")\n\t}\n\tout, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer out.Close()\n\tvar writer io.Writer = out\n\tif strings.HasSuffix(file, \".gz\") {\n\t\twriter = gzip.NewWriter(writer)\n\t\tdefer writer.(*gzip.Writer).Close()\n\t}\n\tif first != nil {\n\t\tif err := api.eth.BlockChain().ExportN(writer, *first, *last); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t} else if err := api.eth.BlockChain().Export(writer); err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}\n```",
"summary": "ExportChain exports the current blockchain into a local file,\nor a range of blocks if first and last are non-nil\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "first",
"description": "*uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "last",
"description": "*uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L171"
}
},
{
"name": "admin_importChain",
"description": "```go\n{\n\tin, err := os.Open(file)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tdefer in.Close()\n\tvar reader io.Reader = in\n\tif strings.HasSuffix(file, \".gz\") {\n\t\tif reader, err = gzip.NewReader(reader); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t}\n\tstream := rlp.NewStream(reader, 0)\n\tblocks, index := make([]*types.Block, 0, 2500), 0\n\tfor batch := 0; ; batch++ {\n\t\tfor len(blocks) \u003c cap(blocks) {\n\t\t\tblock := new(types.Block)\n\t\t\tif err := stream.Decode(block); err == io.EOF {\n\t\t\t\tbreak\n\t\t\t} else if err != nil {\n\t\t\t\treturn false, fmt.Errorf(\"block %d: failed to parse: %v\", index, err)\n\t\t\t}\n\t\t\tblocks = append(blocks, block)\n\t\t\tindex++\n\t\t}\n\t\tif len(blocks) == 0 {\n\t\t\tbreak\n\t\t}\n\t\tif hasAllBlocks(api.eth.BlockChain(), blocks) {\n\t\t\tblocks = blocks[:0]\n\t\t\tcontinue\n\t\t}\n\t\tif _, err := api.eth.BlockChain().InsertChain(blocks); err != nil {\n\t\t\treturn false, fmt.Errorf(\"batch %d: failed to insert: %v\", batch, err)\n\t\t}\n\t\tblocks = blocks[:0]\n\t}\n\treturn true, nil\n}\n```",
"summary": "ImportChain imports a blockchain from a local file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L219"
}
},
{
"name": "admin_maxPeers",
"description": "```go\n{\n\tapi.eth.protocolManager.maxPeers = n\n\tapi.eth.p2pServer.MaxPeers = n\n\tfor i := api.eth.protocolManager.peers.Len(); i \u003e n; i = api.eth.protocolManager.peers.Len() {\n\t\tp := api.eth.protocolManager.peers.WorstPeer()\n\t\tif p == nil {\n\t\t\tbreak\n\t\t}\n\t\tapi.eth.protocolManager.removePeer(p.id)\n\t}\n\treturn true, nil\n}\n```",
"summary": "MaxPeers sets the maximum peer limit for the protocol manager and the p2p server.\n",
"paramStructure": "by-position",
"params": [
{
"name": "n",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L277"
}
},
{
"name": "admin_nodeInfo",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn nil, ErrNodeStopped\n\t}\n\treturn server.NodeInfo(), nil\n}\n```",
"summary": "NodeInfo retrieves all the information we know about the host node at the\nprotocol granularity.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "p2pNodeInfo",
"description": "*p2p.NodeInfo",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"enode": { "type": "string" },
"enr": { "type": "string" },
"id": { "type": "string" },
"ip": { "type": "string" },
"listenAddr": { "type": "string" },
"name": { "type": "string" },
"ports": {
"additionalProperties": false,
"properties": {
"discovery": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"listener": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"protocols": {
"additionalProperties": false,
"properties": {
"discovery": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"listener": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L301"
}
},
{
"name": "admin_peers",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn nil, ErrNodeStopped\n\t}\n\treturn server.PeersInfo(), nil\n}\n```",
"summary": "Peers retrieves all the information we know about each individual peer at the\nprotocol granularity.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "p2pPeerInfo",
"description": "[]*p2p.PeerInfo",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"caps": { "items": { "type": "string" }, "type": "array" },
"enode": { "type": "string" },
"enr": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"network": {
"additionalProperties": false,
"properties": {
"inbound": { "type": "boolean" },
"localAddress": { "type": "string" },
"remoteAddress": { "type": "string" },
"static": { "type": "boolean" },
"trusted": { "type": "boolean" }
},
"type": "object"
},
"protocols": {
"additionalProperties": false,
"properties": {
"inbound": { "type": "boolean" },
"localAddress": { "type": "string" },
"remoteAddress": { "type": "string" },
"static": { "type": "boolean" },
"trusted": { "type": "boolean" }
},
"type": "object"
}
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L291"
}
},
{
"name": "admin_removePeer",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn false, ErrNodeStopped\n\t}\n\tnode, err := enode.Parse(enode.ValidSchemes, url)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"invalid enode: %v\", err)\n\t}\n\tserver.RemovePeer(node)\n\treturn true, nil\n}\n```",
"summary": "RemovePeer disconnects from a remote node if the connection exists\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L81"
}
},
{
"name": "admin_removeTrustedPeer",
"description": "```go\n{\n\tserver := api.node.Server()\n\tif server == nil {\n\t\treturn false, ErrNodeStopped\n\t}\n\tnode, err := enode.Parse(enode.ValidSchemes, url)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"invalid enode: %v\", err)\n\t}\n\tserver.RemoveTrustedPeer(node)\n\treturn true, nil\n}\n```",
"summary": "RemoveTrustedPeer removes a remote node from the trusted peer set, but it\ndoes not disconnect it automatically.\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L113"
}
},
{
"name": "admin_startRPC",
"description": "```go\n{\n\tapi.node.lock.Lock()\n\tdefer api.node.lock.Unlock()\n\tif host == nil {\n\t\th := DefaultHTTPHost\n\t\tif api.node.config.HTTPHost != \"\" {\n\t\t\th = api.node.config.HTTPHost\n\t\t}\n\t\thost = \u0026h\n\t}\n\tif port == nil {\n\t\tport = \u0026api.node.config.HTTPPort\n\t}\n\tconfig := httpConfig{CorsAllowedOrigins: api.node.config.HTTPCors, Vhosts: api.node.config.HTTPVirtualHosts, Modules: api.node.config.HTTPModules}\n\tif cors != nil {\n\t\tconfig.CorsAllowedOrigins = nil\n\t\tfor _, origin := range strings.Split(*cors, \",\") {\n\t\t\tconfig.CorsAllowedOrigins = append(config.CorsAllowedOrigins, strings.TrimSpace(origin))\n\t\t}\n\t}\n\tif vhosts != nil {\n\t\tconfig.Vhosts = nil\n\t\tfor _, vhost := range strings.Split(*host, \",\") {\n\t\t\tconfig.Vhosts = append(config.Vhosts, strings.TrimSpace(vhost))\n\t\t}\n\t}\n\tif apis != nil {\n\t\tconfig.Modules = nil\n\t\tfor _, m := range strings.Split(*apis, \",\") {\n\t\t\tconfig.Modules = append(config.Modules, strings.TrimSpace(m))\n\t\t}\n\t}\n\tif err := api.node.http.setListenAddr(*host, *port); err != nil {\n\t\treturn false, err\n\t}\n\tif err := api.node.http.enableRPC(api.node.rpcAPIs, config); err != nil {\n\t\treturn false, err\n\t}\n\tif err := api.node.http.start(); err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}\n```",
"summary": "StartRPC starts the HTTP RPC API server.\n",
"paramStructure": "by-position",
"params": [
{
"name": "host",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "port",
"description": "*int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "cors",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "apis",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "vhosts",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L166"
}
},
{
"name": "admin_startWS",
"description": "```go\n{\n\tapi.node.lock.Lock()\n\tdefer api.node.lock.Unlock()\n\tif host == nil {\n\t\th := DefaultWSHost\n\t\tif api.node.config.WSHost != \"\" {\n\t\t\th = api.node.config.WSHost\n\t\t}\n\t\thost = \u0026h\n\t}\n\tif port == nil {\n\t\tport = \u0026api.node.config.WSPort\n\t}\n\tconfig := wsConfig{Modules: api.node.config.WSModules, Origins: api.node.config.WSOrigins}\n\tif apis != nil {\n\t\tconfig.Modules = nil\n\t\tfor _, m := range strings.Split(*apis, \",\") {\n\t\t\tconfig.Modules = append(config.Modules, strings.TrimSpace(m))\n\t\t}\n\t}\n\tif allowedOrigins != nil {\n\t\tconfig.Origins = nil\n\t\tfor _, origin := range strings.Split(*allowedOrigins, \",\") {\n\t\t\tconfig.Origins = append(config.Origins, strings.TrimSpace(origin))\n\t\t}\n\t}\n\tserver := api.node.wsServerForPort(*port)\n\tif err := server.setListenAddr(*host, *port); err != nil {\n\t\treturn false, err\n\t}\n\tif err := server.enableWS(api.node.rpcAPIs, config); err != nil {\n\t\treturn false, err\n\t}\n\tif err := server.start(); err != nil {\n\t\treturn false, err\n\t}\n\tapi.node.http.log.Info(\"WebSocket endpoint opened\", \"url\", api.node.WSEndpoint())\n\treturn true, nil\n}\n```",
"summary": "StartWS starts the websocket RPC API server.\n",
"paramStructure": "by-position",
"params": [
{
"name": "host",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "port",
"description": "*int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "allowedOrigins",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "apis",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L226"
}
},
{
"name": "admin_stopRPC",
"description": "```go\n{\n\tapi.node.http.stop()\n\treturn true, nil\n}\n```",
"summary": "StopRPC shuts down the HTTP server.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L220"
}
},
{
"name": "admin_stopWS",
"description": "```go\n{\n\tapi.node.http.stopWS()\n\tapi.node.ws.stop()\n\treturn true, nil\n}\n```",
"summary": "StopWS terminates all WebSocket servers.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L277"
}
},
{
"name": "debug_accountRange",
"description": "```go\n{\n\tvar stateDb *state.StateDB\n\tvar err error\n\tif number, ok := blockNrOrHash.Number(); ok {\n\t\tif number == rpc.PendingBlockNumber {\n\t\t\t_, stateDb = api.eth.miner.Pending()\n\t\t} else {\n\t\t\tvar block *types.Block\n\t\t\tif number == rpc.LatestBlockNumber {\n\t\t\t\tblock = api.eth.blockchain.CurrentBlock()\n\t\t\t} else {\n\t\t\t\tblock = api.eth.blockchain.GetBlockByNumber(uint64(number))\n\t\t\t}\n\t\t\tif block == nil {\n\t\t\t\treturn state.IteratorDump{}, fmt.Errorf(\"block #%d not found\", number)\n\t\t\t}\n\t\t\tstateDb, err = api.eth.BlockChain().StateAt(block.Root())\n\t\t\tif err != nil {\n\t\t\t\treturn state.IteratorDump{}, err\n\t\t\t}\n\t\t}\n\t} else if hash, ok := blockNrOrHash.Hash(); ok {\n\t\tblock := api.eth.blockchain.GetBlockByHash(hash)\n\t\tif block == nil {\n\t\t\treturn state.IteratorDump{}, fmt.Errorf(\"block %s not found\", hash.Hex())\n\t\t}\n\t\tstateDb, err = api.eth.BlockChain().StateAt(block.Root())\n\t\tif err != nil {\n\t\t\treturn state.IteratorDump{}, err\n\t\t}\n\t} else {\n\t\treturn state.IteratorDump{}, errors.New(\"either block number or block hash must be specified\")\n\t}\n\tif maxResults \u003e AccountRangeMaxResults || maxResults \u003c= 0 {\n\t\tmaxResults = AccountRangeMaxResults\n\t}\n\treturn stateDb.IteratorDump(nocode, nostorage, incompletes, start, maxResults), nil\n}\n```",
"summary": "AccountRange enumerates all accounts in the given block and start point in paging request\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "start",
"description": "[]byte",
"summary": "",
"schema": {
"title": "bytes",
"description": "Hex representation of a variable length byte array",
"pattern": "^0x([a-fA-F0-9]?)+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "maxResults",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "nocode",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
{
"name": "nostorage",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
{
"name": "incompletes",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "stateIteratorDump",
"description": "state.IteratorDump",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"accounts": {
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"balance": { "type": "string" },
"code": { "type": "string" },
"codeHash": { "type": "string" },
"key": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"root": { "type": "string" },
"storage": {
"patternProperties": { ".*": { "type": "string" } },
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"next": {
"pattern": "^0x([a-fA-F0-9]?)+$",
"title": "bytes",
"type": "string"
},
"root": { "type": "string" }
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L382"
}
},
{
"name": "debug_backtraceAt",
"description": "```go\n{\n\treturn glogger.BacktraceAt(location)\n}\n```",
"summary": "BacktraceAt sets the log backtrace location. See package log for details on\nthe pattern syntax.\n",
"paramStructure": "by-position",
"params": [
{
"name": "location",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L68"
}
},
{
"name": "debug_blockProfile",
"description": "```go\n{\n\truntime.SetBlockProfileRate(1)\n\ttime.Sleep(time.Duration(nsec) * time.Second)\n\tdefer runtime.SetBlockProfileRate(0)\n\treturn writeProfile(\"block\", file)\n}\n```",
"summary": "BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to\nfile. It uses a profile rate of 1 for most accurate information. If a different rate is\ndesired, set the rate and write the profile manually.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "nsec",
"description": "uint",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L147"
}
},
{
"name": "debug_chaindbCompact",
"description": "```go\n{\n\tfor b := byte(0); b \u003c 255; b++ {\n\t\tlog.Info(\"Compacting chain database\", \"range\", fmt.Sprintf(\"0x%0.2X-0x%0.2X\", b, b+1))\n\t\tif err := api.b.ChainDb().Compact([]byte{b}, []byte{b + 1}); err != nil {\n\t\t\tlog.Error(\"Database compaction failed\", \"err\", err)\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n```",
"summary": "ChaindbCompact flattens the entire key-value database into a single level,\nremoving all unused slots and merging all keys.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L2004"
}
},
{
"name": "debug_chaindbProperty",
"description": "```go\n{\n\tif property == \"\" {\n\t\tproperty = \"leveldb.stats\"\n\t} else if !strings.HasPrefix(property, \"leveldb.\") {\n\t\tproperty = \"leveldb.\" + property\n\t}\n\treturn api.b.ChainDb().Stat(property)\n}\n```",
"summary": "ChaindbProperty returns leveldb properties of the key-value database.\n",
"paramStructure": "by-position",
"params": [
{
"name": "property",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1993"
}
},
{
"name": "debug_cpuProfile",
"description": "```go\n{\n\tif err := h.StartCPUProfile(file); err != nil {\n\t\treturn err\n\t}\n\ttime.Sleep(time.Duration(nsec) * time.Second)\n\th.StopCPUProfile()\n\treturn nil\n}\n```",
"summary": "CpuProfile turns on CPU profiling for nsec seconds and writes\nprofile data to file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "nsec",
"description": "uint",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L88"
}
},
{
"name": "debug_dumpBlock",
"description": "```go\n{\n\tif blockNr == rpc.PendingBlockNumber {\n\t\t_, stateDb := api.eth.miner.Pending()\n\t\treturn stateDb.RawDump(false, false, true), nil\n\t}\n\tvar block *types.Block\n\tif blockNr == rpc.LatestBlockNumber {\n\t\tblock = api.eth.blockchain.CurrentBlock()\n\t} else {\n\t\tblock = api.eth.blockchain.GetBlockByNumber(uint64(blockNr))\n\t}\n\tif block == nil {\n\t\treturn state.Dump{}, fmt.Errorf(\"block #%d not found\", blockNr)\n\t}\n\tstateDb, err := api.eth.BlockChain().StateAt(block.Root())\n\tif err != nil {\n\t\treturn state.Dump{}, err\n\t}\n\treturn stateDb.RawDump(false, false, true), nil\n}\n```",
"summary": "DumpBlock retrieves the entire state of the database at a given block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "stateDump",
"description": "state.Dump",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"accounts": {
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"balance": { "type": "string" },
"code": { "type": "string" },
"codeHash": { "type": "string" },
"key": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"root": { "type": "string" },
"storage": {
"patternProperties": { ".*": { "type": "string" } },
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"root": { "type": "string" }
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L304"
}
},
{
"name": "debug_freeOSMemory",
"description": "```go\n{\n\tdebug.FreeOSMemory()\n}\n```",
"summary": "FreeOSMemory forces a garbage collection.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L200"
}
},
{
"name": "debug_gcStats",
"description": "```go\n{\n\ts := new(debug.GCStats)\n\tdebug.ReadGCStats(s)\n\treturn s\n}\n```",
"summary": "GcStats returns GC statistics.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "debugGCStats",
"description": "*debug.GCStats",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"LastGC": { "format": "date-time", "type": "string" },
"NumGC": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Pause": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"type": "array"
},
"PauseEnd": {
"items": { "format": "date-time", "type": "string" },
"type": "array"
},
"PauseQuantiles": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"type": "array"
},
"PauseTotal": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L80"
}
},
{
"name": "debug_getBadBlocks",
"description": "```go\n{\n\tblocks := api.eth.BlockChain().BadBlocks()\n\tresults := make([]*BadBlockArgs, len(blocks))\n\tvar err error\n\tfor i, block := range blocks {\n\t\tresults[i] = \u0026BadBlockArgs{Hash: block.Hash()}\n\t\tif rlpBytes, err := rlp.EncodeToBytes(block); err != nil {\n\t\t\tresults[i].RLP = err.Error()\n\t\t} else {\n\t\t\tresults[i].RLP = fmt.Sprintf(\"0x%x\", rlpBytes)\n\t\t}\n\t\tif results[i].Block, err = ethapi.RPCMarshalBlock(block, true, true); err != nil {\n\t\t\tresults[i].Block = \u0026ethapi.RPCMarshalBlockT{Error: err.Error()}\n\t\t}\n\t}\n\treturn results, nil\n}\n```",
"summary": "GetBadBlocks returns a list of the last 'bad blocks' that the client has seen on the network\nand returns them as a JSON list of block-hashes\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "BadBlockArgs",
"description": "[]*BadBlockArgs",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"block": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": { "type": "string" },
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": { "additionalProperties": true },
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"rlp": { "type": "string" }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L357"
}
},
{
"name": "debug_getBlockRlp",
"description": "```go\n{\n\tblock, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))\n\tif block == nil {\n\t\treturn \"\", fmt.Errorf(\"block #%d not found\", number)\n\t}\n\tencoded, err := rlp.EncodeToBytes(block)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn fmt.Sprintf(\"%x\", encoded), nil\n}\n```",
"summary": "GetBlockRlp retrieves the RLP encoded for of a single block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1908"
}
},
{
"name": "debug_getModifiedAccountsByHash",
"description": "```go\n{\n\tvar startBlock, endBlock *types.Block\n\tstartBlock = api.eth.blockchain.GetBlockByHash(startHash)\n\tif startBlock == nil {\n\t\treturn nil, fmt.Errorf(\"start block %x not found\", startHash)\n\t}\n\tif endHash == nil {\n\t\tendBlock = startBlock\n\t\tstartBlock = api.eth.blockchain.GetBlockByHash(startBlock.ParentHash())\n\t\tif startBlock == nil {\n\t\t\treturn nil, fmt.Errorf(\"block %x has no parent\", endBlock.Number())\n\t\t}\n\t} else {\n\t\tendBlock = api.eth.blockchain.GetBlockByHash(*endHash)\n\t\tif endBlock == nil {\n\t\t\treturn nil, fmt.Errorf(\"end block %x not found\", *endHash)\n\t\t}\n\t}\n\treturn api.getModifiedAccounts(startBlock, endBlock)\n}\n```",
"summary": "GetModifiedAccountsByHash returns all accounts that have changed between the\ntwo blocks specified. A change is defined as a difference in nonce, balance,\ncode hash, or storage hash.\n\nWith one parameter, returns the list of accounts modified in the specified block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "startHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "endHash",
"description": "*common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "[]common.Address",
"summary": "",
"schema": {
"items": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L513"
}
},
{
"name": "debug_getModifiedAccountsByNumber",
"description": "```go\n{\n\tvar startBlock, endBlock *types.Block\n\tstartBlock = api.eth.blockchain.GetBlockByNumber(startNum)\n\tif startBlock == nil {\n\t\treturn nil, fmt.Errorf(\"start block %x not found\", startNum)\n\t}\n\tif endNum == nil {\n\t\tendBlock = startBlock\n\t\tstartBlock = api.eth.blockchain.GetBlockByHash(startBlock.ParentHash())\n\t\tif startBlock == nil {\n\t\t\treturn nil, fmt.Errorf(\"block %x has no parent\", endBlock.Number())\n\t\t}\n\t} else {\n\t\tendBlock = api.eth.blockchain.GetBlockByNumber(*endNum)\n\t\tif endBlock == nil {\n\t\t\treturn nil, fmt.Errorf(\"end block %d not found\", *endNum)\n\t\t}\n\t}\n\treturn api.getModifiedAccounts(startBlock, endBlock)\n}\n```",
"summary": "GetModifiedAccountsByNumber returns all accounts that have changed between the\ntwo blocks specified. A change is defined as a difference in nonce, balance,\ncode hash, or storage hash.\n\nWith one parameter, returns the list of accounts modified in the specified block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "startNum",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "endNum",
"description": "*uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "[]common.Address",
"summary": "",
"schema": {
"items": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L485"
}
},
{
"name": "debug_goTrace",
"description": "```go\n{\n\tif err := h.StartGoTrace(file); err != nil {\n\t\treturn err\n\t}\n\ttime.Sleep(time.Duration(nsec) * time.Second)\n\th.StopGoTrace()\n\treturn nil\n}\n```",
"summary": "GoTrace turns on tracing for nsec seconds and writes\ntrace data to file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "nsec",
"description": "uint",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L135"
}
},
{
"name": "debug_memStats",
"description": "```go\n{\n\ts := new(runtime.MemStats)\n\truntime.ReadMemStats(s)\n\treturn s\n}\n```",
"summary": "MemStats returns detailed runtime memory statistics.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "runtimeMemStats",
"description": "*runtime.MemStats",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Alloc": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"BuckHashSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"BySize": {
"items": {
"additionalProperties": false,
"properties": {
"Frees": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Mallocs": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Size": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"maxItems": 61,
"minItems": 61,
"type": "array"
},
"DebugGC": { "type": "boolean" },
"EnableGC": { "type": "boolean" },
"Frees": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"GCCPUFraction": { "type": "number" },
"GCSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapAlloc": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapIdle": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapInuse": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapObjects": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapReleased": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"HeapSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"LastGC": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Lookups": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"MCacheInuse": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"MCacheSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"MSpanInuse": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"MSpanSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Mallocs": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"NextGC": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"NumForcedGC": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"NumGC": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"OtherSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"PauseEnd": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"PauseNs": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"PauseTotalNs": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"StackInuse": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"StackSys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Sys": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"TotalAlloc": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L73"
}
},
{
"name": "debug_mutexProfile",
"description": "```go\n{\n\truntime.SetMutexProfileFraction(1)\n\ttime.Sleep(time.Duration(nsec) * time.Second)\n\tdefer runtime.SetMutexProfileFraction(0)\n\treturn writeProfile(\"mutex\", file)\n}\n```",
"summary": "MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file.\nIt uses a profile rate of 1 for most accurate information. If a different rate is\ndesired, set the rate and write the profile manually.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "nsec",
"description": "uint",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L168"
}
},
{
"name": "debug_preimage",
"description": "```go\n{\n\tif preimage := rawdb.ReadPreimage(api.eth.ChainDb(), hash); preimage != nil {\n\t\treturn preimage, nil\n\t}\n\treturn nil, errors.New(\"unknown preimage\")\n}\n```",
"summary": "Preimage is a debug API function that returns the preimage for a sha3 hash, if known.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L341"
}
},
{
"name": "debug_printBlock",
"description": "```go\n{\n\tblock, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))\n\tif block == nil {\n\t\treturn \"\", fmt.Errorf(\"block #%d not found\", number)\n\t}\n\treturn spew.Sdump(block), nil\n}\n```",
"summary": "PrintBlock retrieves a block and returns its pretty printed form.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1960"
}
},
{
"name": "debug_removePendingTransaction",
"description": "```go\n{\n\treturn api.eth.txPool.RemoveTx(hash), nil\n}\n```",
"summary": "RemovePendingTransaction removes a transaction from the txpool.\nIt returns the transaction removed, if any.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "typesTransaction",
"description": "*types.Transaction",
"summary": "",
"schema": { "additionalProperties": false, "type": ["object"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L565"
}
},
{
"name": "debug_seedHash",
"description": "```go\n{\n\tblock, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))\n\tif block == nil {\n\t\treturn \"\", fmt.Errorf(\"block #%d not found\", number)\n\t}\n\tecip1099FBlock := api.b.ChainConfig().GetEthashECIP1099Transition()\n\tepochLength := ethash.CalcEpochLength(number, ecip1099FBlock)\n\tepoch := ethash.CalcEpoch(number, epochLength)\n\treturn fmt.Sprintf(\"0x%x\", ethash.SeedHash(epoch, epochLength)), nil\n}\n```",
"summary": "SeedHash retrieves the seed hash of a block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1969"
}
},
{
"name": "debug_setBlockProfileRate",
"description": "```go\n{\n\truntime.SetBlockProfileRate(rate)\n}\n```",
"summary": "SetBlockProfileRate sets the rate of goroutine block profile data collection.\nrate 0 disables block profiling.\n",
"paramStructure": "by-position",
"params": [
{
"name": "rate",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L156"
}
},
{
"name": "debug_setGCPercent",
"description": "```go\n{\n\treturn debug.SetGCPercent(v)\n}\n```",
"summary": "SetGCPercent sets the garbage collection target percentage. It returns the previous\nsetting. A negative value disables GC.\n",
"paramStructure": "by-position",
"params": [
{
"name": "v",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "int",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L206"
}
},
{
"name": "debug_setHead",
"description": "```go\n{\n\tapi.b.SetHead(uint64(number))\n}\n```",
"summary": "SetHead rewinds the head of the blockchain to a previous block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L2016"
}
},
{
"name": "debug_setMutexProfileFraction",
"description": "```go\n{\n\truntime.SetMutexProfileFraction(rate)\n}\n```",
"summary": "SetMutexProfileFraction sets the rate of mutex profiling.\n",
"paramStructure": "by-position",
"params": [
{
"name": "rate",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L177"
}
},
{
"name": "debug_stacks",
"description": "```go\n{\n\tbuf := new(bytes.Buffer)\n\tpprof.Lookup(\"goroutine\").WriteTo(buf, 2)\n\treturn buf.String()\n}\n```",
"summary": "Stacks returns a printed representation of the stacks of all goroutines.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L193"
}
},
{
"name": "debug_standardTraceBadBlockToFile",
"description": "```go\n{\n\tblocks := api.eth.blockchain.BadBlocks()\n\tfor _, block := range blocks {\n\t\tif block.Hash() == hash {\n\t\t\treturn api.standardTraceBlockToFile(ctx, block, config)\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"bad block %#x not found\", hash)\n}\n```",
"summary": "StandardTraceBadBlockToFile dumps the structured logs created during the\nexecution of EVM against a block pulled from the pool of bad ones to the\nlocal file system and returns a list of files to the caller.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*StdTraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"TxHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "[]string",
"summary": "",
"schema": { "items": [{ "type": ["string"] }], "type": ["array"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L446"
}
},
{
"name": "debug_standardTraceBlockToFile",
"description": "```go\n{\n\tblock := api.eth.blockchain.GetBlockByHash(hash)\n\tif block == nil {\n\t\treturn nil, fmt.Errorf(\"block %#x not found\", hash)\n\t}\n\treturn api.standardTraceBlockToFile(ctx, block, config)\n}\n```",
"summary": "StandardTraceBlockToFile dumps the structured logs created during the\nexecution of EVM to the local file system and returns a list of files\nto the caller.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*StdTraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"TxHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "[]string",
"summary": "",
"schema": { "items": [{ "type": ["string"] }], "type": ["array"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L435"
}
},
{
"name": "debug_startCPUProfile",
"description": "```go\n{\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\tif h.cpuW != nil {\n\t\treturn errors.New(\"CPU profiling already in progress\")\n\t}\n\tf, err := os.Create(expandHome(file))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := pprof.StartCPUProfile(f); err != nil {\n\t\tf.Close()\n\t\treturn err\n\t}\n\th.cpuW = f\n\th.cpuFile = file\n\tlog.Info(\"CPU profiling started\", \"dump\", h.cpuFile)\n\treturn nil\n}\n```",
"summary": "StartCPUProfile turns on CPU profiling, writing to the given file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L98"
}
},
{
"name": "debug_startGoTrace",
"description": "```go\n{\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\tif h.traceW != nil {\n\t\treturn errors.New(\"trace already in progress\")\n\t}\n\tf, err := os.Create(expandHome(file))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := trace.Start(f); err != nil {\n\t\tf.Close()\n\t\treturn err\n\t}\n\th.traceW = f\n\th.traceFile = file\n\tlog.Info(\"Go tracing started\", \"dump\", h.traceFile)\n\treturn nil\n}\n```",
"summary": "StartGoTrace turns on tracing, writing to the given file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/trace.go#L30"
}
},
{
"name": "debug_stopCPUProfile",
"description": "```go\n{\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\tpprof.StopCPUProfile()\n\tif h.cpuW == nil {\n\t\treturn errors.New(\"CPU profiling not in progress\")\n\t}\n\tlog.Info(\"Done writing CPU profile\", \"dump\", h.cpuFile)\n\th.cpuW.Close()\n\th.cpuW = nil\n\th.cpuFile = \"\"\n\treturn nil\n}\n```",
"summary": "StopCPUProfile stops an ongoing CPU profile.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L119"
}
},
{
"name": "debug_stopGoTrace",
"description": "```go\n{\n\th.mu.Lock()\n\tdefer h.mu.Unlock()\n\ttrace.Stop()\n\tif h.traceW == nil {\n\t\treturn errors.New(\"trace not in progress\")\n\t}\n\tlog.Info(\"Done writing Go trace\", \"dump\", h.traceFile)\n\th.traceW.Close()\n\th.traceW = nil\n\th.traceFile = \"\"\n\treturn nil\n}\n```",
"summary": "StopTrace stops an ongoing trace.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/trace.go#L51"
}
},
{
"name": "debug_storageRangeAt",
"description": "```go\n{\n\tblock := api.eth.blockchain.GetBlockByHash(blockHash)\n\tif block == nil {\n\t\treturn StorageRangeResult{}, fmt.Errorf(\"block %#x not found\", blockHash)\n\t}\n\t_, _, statedb, err := api.computeTxEnv(block, txIndex, 0)\n\tif err != nil {\n\t\treturn StorageRangeResult{}, err\n\t}\n\tst := statedb.StorageTrie(contractAddress)\n\tif st == nil {\n\t\treturn StorageRangeResult{}, fmt.Errorf(\"account %x doesn't exist\", contractAddress)\n\t}\n\treturn storageRangeAt(st, keyStart, maxResult)\n}\n```",
"summary": "StorageRangeAt returns the storage at the given block height and transaction index.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "txIndex",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "contractAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "keyStart",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "maxResult",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "StorageRangeResult",
"description": "StorageRangeResult",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"nextKey": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storage": {
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"key": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L440"
}
},
{
"name": "debug_testSignCliqueBlock",
"description": "```go\n{\n\tblock, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))\n\tif block == nil {\n\t\treturn common.Address{}, fmt.Errorf(\"block #%d not found\", number)\n\t}\n\theader := block.Header()\n\theader.Extra = make([]byte, 32+65)\n\tencoded := clique.CliqueRLP(header)\n\taccount := accounts.Account{Address: address}\n\twallet, err := api.b.AccountManager().Find(account)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tsignature, err := wallet.SignData(account, accounts.MimetypeClique, encoded)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tsealHash := clique.SealHash(header).Bytes()\n\tlog.Info(\"test signing of clique block\", \"Sealhash\", fmt.Sprintf(\"%x\", sealHash), \"signature\", fmt.Sprintf(\"%x\", signature))\n\tpubkey, err := crypto.Ecrecover(sealHash, signature)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tvar signer common.Address\n\tcopy(signer[:], crypto.Keccak256(pubkey[1:])[12:])\n\treturn signer, nil\n}\n```",
"summary": "TestSignCliqueBlock fetches the given block number, and attempts to sign it as a clique header with the\ngiven address, returning the address of the recovered signature\n\nThis is a temporary method to debug the externalsigner integration,\nTODO: Remove this method when the integration is mature\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "number",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1925"
}
},
{
"name": "debug_traceBadBlock",
"description": "```go\n{\n\tblocks := api.eth.blockchain.BadBlocks()\n\tfor _, block := range blocks {\n\t\tif block.Hash() == hash {\n\t\t\treturn api.traceBlock(ctx, block, config)\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"bad block %#x not found\", hash)\n}\n```",
"summary": "TraceBadBlock returns the structured logs created during the execution of\nEVM against a block pulled from the pool of bad ones and returns them as a JSON\nobject.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L422"
}
},
{
"name": "debug_traceBlock",
"description": "```go\n{\n\treturn traceBlockRLP(ctx, api.eth, blob, config)\n}\n```",
"summary": "TraceBlock returns the structured logs created during the execution of EVM\nand returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blob",
"description": "[]byte",
"summary": "",
"schema": {
"title": "bytes",
"description": "Hex representation of a variable length byte array",
"pattern": "^0x([a-fA-F0-9]?)+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L405"
}
},
{
"name": "debug_traceBlockByHash",
"description": "```go\n{\n\tblock := api.eth.blockchain.GetBlockByHash(hash)\n\tif block == nil {\n\t\treturn nil, fmt.Errorf(\"block %#x not found\", hash)\n\t}\n\treturn api.traceBlock(ctx, block, config)\n}\n```",
"summary": "TraceBlockByHash returns the structured logs created during the execution of\nEVM and returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L385"
}
},
{
"name": "debug_traceBlockByNumber",
"description": "```go\n{\n\treturn traceBlockByNumber(ctx, api.eth, number, config)\n}\n```",
"summary": "TraceBlockByNumber returns the structured logs created during the execution of\nEVM and returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L379"
}
},
{
"name": "debug_traceBlockFromFile",
"description": "```go\n{\n\tblob, err := ioutil.ReadFile(file)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not read file: %v\", err)\n\t}\n\treturn api.TraceBlock(ctx, blob, config)\n}\n```",
"summary": "TraceBlockFromFile returns the structured logs created during the execution of\nEVM and returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L411"
}
},
{
"name": "debug_traceCall",
"description": "```go\n{\n\tstatedb, header, err := api.eth.APIBackend.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif err != nil {\n\t\tvar block *types.Block\n\t\tif hash, ok := blockNrOrHash.Hash(); ok {\n\t\t\tblock = api.eth.blockchain.GetBlockByHash(hash)\n\t\t} else if number, ok := blockNrOrHash.Number(); ok {\n\t\t\tblock = api.eth.blockchain.GetBlockByNumber(uint64(number))\n\t\t}\n\t\tif block == nil {\n\t\t\treturn nil, fmt.Errorf(\"block %v not found: %v\", blockNrOrHash, err)\n\t\t}\n\t\treexec := defaultTraceReexec\n\t\tif config != nil \u0026\u0026 config.Reexec != nil {\n\t\t\treexec = *config.Reexec\n\t\t}\n\t\t_, _, statedb, err = api.computeTxEnv(block, 0, reexec)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tmsg := args.ToMessage(api.eth.APIBackend.RPCGasCap())\n\tvmctx := core.NewEVMContext(msg, header, api.eth.blockchain, nil)\n\treturn api.traceTx(ctx, msg, vmctx, statedb, config)\n}// Try to retrieve the specified block\n\n```",
"summary": "TraceCall lets you trace a given eth_call. It collects the structured logs created during the execution of EVM\nif the given transaction was added on top of the provided block and returns them as a JSON object.\nYou can provide -2 as a block number to trace on top of the pending block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "ethapi.CallArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "interface",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L808"
}
},
{
"name": "debug_traceTransaction",
"description": "```go\n{\n\treturn traceTransaction(ctx, api.eth, hash, config)\n}\n```",
"summary": "TraceTransaction returns the structured logs created during the execution of EVM\nand returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "interface",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer.go#L801"
}
},
{
"name": "debug_verbosity",
"description": "```go\n{\n\tglogger.Verbosity(log.Lvl(level))\n}\n```",
"summary": "Verbosity sets the log verbosity ceiling. The verbosity of individual packages\nand source files can be raised using Vmodule.\n",
"paramStructure": "by-position",
"params": [
{
"name": "level",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L57"
}
},
{
"name": "debug_vmodule",
"description": "```go\n{\n\treturn glogger.Vmodule(pattern)\n}\n```",
"summary": "Vmodule sets the log verbosity pattern. See package log for details on the\npattern syntax.\n",
"paramStructure": "by-position",
"params": [
{
"name": "pattern",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L62"
}
},
{
"name": "debug_writeBlockProfile",
"description": "```go\n{\n\treturn writeProfile(\"block\", file)\n}\n```",
"summary": "WriteBlockProfile writes a goroutine blocking profile to the given file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L161"
}
},
{
"name": "debug_writeMemProfile",
"description": "```go\n{\n\treturn writeProfile(\"heap\", file)\n}\n```",
"summary": "WriteMemProfile writes an allocation profile to the given file.\nNote that the profiling rate cannot be set through the API,\nit must be set on the command line.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L188"
}
},
{
"name": "debug_writeMutexProfile",
"description": "```go\n{\n\treturn writeProfile(\"mutex\", file)\n}\n```",
"summary": "WriteMutexProfile writes a goroutine blocking profile to the given file.\n",
"paramStructure": "by-position",
"params": [
{
"name": "file",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/debug/api.go#L181"
}
},
{
"name": "eth_accounts",
"description": "```go\n{\n\treturn s.am.Accounts()\n}\n```",
"summary": "Accounts returns the collection of accounts this node manages\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "commonAddress",
"description": "[]common.Address",
"summary": "",
"schema": {
"items": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L190"
}
},
{
"name": "eth_blockNumber",
"description": "```go\n{\n\theader, _ := s.b.HeaderByNumber(context.Background(), rpc.LatestBlockNumber)\n\treturn hexutil.Uint64(header.Number.Uint64())\n}\n```",
"summary": "BlockNumber returns the block number of the chain head.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilUint64",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L545"
}
},
{
"name": "eth_call",
"description": "```go\n{\n\tvar accounts map[common.Address]account\n\tif overrides != nil {\n\t\taccounts = *overrides\n\t}\n\tresult, err := DoCall(ctx, s.b, args, blockNrOrHash, accounts, vm.Config{}, 5*time.Second, s.b.RPCGasCap())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(result.Revert()) \u003e 0 {\n\t\treturn nil, newRevertError(result)\n\t}\n\treturn result.Return(), result.Err\n}\n```",
"summary": "Call executes the given transaction on the state for the given block number.\n\nAdditionally, the caller can specify a batch of contract for fields overriding.\n\nNote, this function doesn't make and changes in the state/blockchain and is\nuseful to execute and retrieve values.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "CallArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "overrides",
"description": "*map[common.Address]account",
"summary": "",
"schema": {
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"balance": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"code": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"state": {
"patternProperties": {
".*": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": "object"
},
"stateDiff": {
"patternProperties": {
".*": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L928"
}
},
{
"name": "eth_chainId",
"description": "```go\n{\n\tchainID := new(big.Int)\n\tif config := api.e.blockchain.Config(); config.IsEnabled(config.GetEIP155Transition, api.e.blockchain.CurrentBlock().Number()) {\n\t\tchainID = config.GetChainID()\n\t}\n\treturn (hexutil.Uint64)(chainID.Uint64())\n}\n```",
"summary": "ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilUint64",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L70"
}
},
{
"name": "eth_chainId",
"description": "```go\n{\n\treturn (*hexutil.Big)(s.b.ChainConfig().GetChainID())\n}\n```",
"summary": "ChainId returns the chainID value for transaction replay protection.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilBig",
"description": "*hexutil.Big",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L540"
}
},
{
"name": "eth_coinbase",
"description": "```go\n{\n\treturn api.Etherbase()\n}\n```",
"summary": "Coinbase is the address that mining rewards will be send to (alias for Etherbase)\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L60"
}
},
{
"name": "eth_estimateGas",
"description": "```go\n{\n\tbNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)\n\tif blockNrOrHash != nil {\n\t\tbNrOrHash = *blockNrOrHash\n\t}\n\treturn DoEstimateGas(ctx, s.b, args, bNrOrHash, s.b.RPCGasCap())\n}\n```",
"summary": "EstimateGas returns an estimate of the amount of gas needed to execute the\ngiven transaction against the current pending block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "CallArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "*rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint64",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1055"
}
},
{
"name": "eth_etherbase",
"description": "```go\n{\n\treturn api.e.Etherbase()\n}\n```",
"summary": "Etherbase is the address that mining rewards will be send to\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L55"
}
},
{
"name": "eth_fillTransaction",
"description": "```go\n{\n\tif err := args.setDefaults(ctx, s.b); err != nil {\n\t\treturn nil, err\n\t}\n\ttx := args.toTransaction()\n\tdata, err := rlp.EncodeToBytes(tx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn \u0026SignTransactionResult{data, tx}, nil\n}\n```",
"summary": "FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned transaction,\nand returns it to the caller for further processing (signing + broadcast)\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "SignTransactionResult",
"description": "*SignTransactionResult",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"raw": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"tx": { "additionalProperties": false, "type": "object" }
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1725"
}
},
{
"name": "eth_gasPrice",
"description": "```go\n{\n\tprice, err := s.b.SuggestPrice(ctx)\n\treturn (*hexutil.Big)(price), err\n}\n```",
"summary": "GasPrice returns a suggestion for a gas price.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilBig",
"description": "*hexutil.Big",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L63"
}
},
{
"name": "eth_getBalance",
"description": "```go\n{\n\tstate, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif state == nil || err != nil {\n\t\treturn nil, err\n\t}\n\treturn (*hexutil.Big)(state.GetBalance(address)), state.Error()\n}\n```",
"summary": "GetBalance returns the amount of wei for the given address in the state of the\ngiven block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta\nblock numbers are also allowed.\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBig",
"description": "*hexutil.Big",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L553"
}
},
{
"name": "eth_getBlockByHash",
"description": "```go\n{\n\tblock, err := s.b.BlockByHash(ctx, hash)\n\tif block != nil {\n\t\treturn s.rpcMarshalBlock(ctx, block, true, fullTx)\n\t}\n\treturn nil, err\n}\n```",
"summary": "GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full\ndetail, otherwise only the transaction hash is returned.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "fullTx",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalBlockT",
"description": "*RPCMarshalBlockT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": { "type": "string" },
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": { "additionalProperties": true },
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L672"
}
},
{
"name": "eth_getBlockByNumber",
"description": "```go\n{\n\tblock, err := s.b.BlockByNumber(ctx, number)\n\tif block != nil \u0026\u0026 err == nil {\n\t\tresponse, err := s.rpcMarshalBlock(ctx, block, true, fullTx)\n\t\tif err == nil \u0026\u0026 number == rpc.PendingBlockNumber {\n\t\t\tresponse.setAsPending()\n\t\t}\n\t\treturn response, err\n\t}\n\treturn nil, err\n}\n```",
"summary": "GetBlockByNumber returns the requested canonical block.\n* When blockNr is -1 the chain head is returned.\n* When blockNr is -2 the pending chain head is returned.\n* When fullTx is true all transactions in the block are returned, otherwise\n only the transaction hash is returned.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "fullTx",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalBlockT",
"description": "*RPCMarshalBlockT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": { "type": "string" },
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": { "additionalProperties": true },
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L657"
}
},
{
"name": "eth_getBlockTransactionCountByHash",
"description": "```go\n{\n\tif block, _ := s.b.BlockByHash(ctx, blockHash); block != nil {\n\t\tn := hexutil.Uint(len(block.Transactions()))\n\t\treturn \u0026n\n\t}\n\treturn nil\n}\n```",
"summary": "GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint",
"description": "*hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1421"
}
},
{
"name": "eth_getBlockTransactionCountByNumber",
"description": "```go\n{\n\tif block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {\n\t\tn := hexutil.Uint(len(block.Transactions()))\n\t\treturn \u0026n\n\t}\n\treturn nil\n}\n```",
"summary": "GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint",
"description": "*hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1412"
}
},
{
"name": "eth_getCode",
"description": "```go\n{\n\tstate, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif state == nil || err != nil {\n\t\treturn nil, err\n\t}\n\tcode := state.GetCode(address)\n\treturn code, state.Error()\n}\n```",
"summary": "GetCode returns the code stored at the given address in the state for the given block number.\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L731"
}
},
{
"name": "eth_getFilterChanges",
"description": "```go\n{\n\tapi.filtersMu.Lock()\n\tdefer api.filtersMu.Unlock()\n\tif f, found := api.filters[id]; found {\n\t\tif !f.deadline.Stop() {\n\t\t\t\u003c-f.deadline.C\n\t\t}\n\t\tf.deadline.Reset(deadline)\n\t\tswitch f.typ {\n\t\tcase PendingTransactionsSubscription, BlocksSubscription:\n\t\t\thashes := f.hashes\n\t\t\tf.hashes = nil\n\t\t\treturn returnHashes(hashes), nil\n\t\tcase LogsSubscription, MinedAndPendingLogsSubscription:\n\t\t\tlogs := f.logs\n\t\t\tf.logs = nil\n\t\t\treturn returnLogs(logs), nil\n\t\t}\n\t}\n\treturn []interface{}{}, fmt.Errorf(\"filter not found\")\n}\n```",
"summary": "GetFilterChanges returns the logs for the filter with the given id since\nlast time it was called. This can be used for polling.\n\nFor pending transaction and block filters the result is []common.Hash.\n(pending)Log filters return []Log.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges\n",
"paramStructure": "by-position",
"params": [
{
"name": "id",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "interface",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L414"
}
},
{
"name": "eth_getFilterLogs",
"description": "```go\n{\n\tapi.filtersMu.Lock()\n\tf, found := api.filters[id]\n\tapi.filtersMu.Unlock()\n\tif !found || f.typ != LogsSubscription {\n\t\treturn nil, fmt.Errorf(\"filter not found\")\n\t}\n\tvar filter *Filter\n\tif f.crit.BlockHash != nil {\n\t\tfilter = NewBlockFilter(api.backend, *f.crit.BlockHash, f.crit.Addresses, f.crit.Topics)\n\t} else {\n\t\tbegin := rpc.LatestBlockNumber.Int64()\n\t\tif f.crit.FromBlock != nil {\n\t\t\tbegin = f.crit.FromBlock.Int64()\n\t\t}\n\t\tend := rpc.LatestBlockNumber.Int64()\n\t\tif f.crit.ToBlock != nil {\n\t\t\tend = f.crit.ToBlock.Int64()\n\t\t}\n\t\tfilter = NewRangeFilter(api.backend, begin, end, f.crit.Addresses, f.crit.Topics)\n\t}\n\tlogs, err := filter.Logs(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn returnLogs(logs), nil\n}\n```",
"summary": "GetFilterLogs returns the logs for the filter with the given id.\nIf the filter could not be found an empty array of logs is returned.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs\n",
"paramStructure": "by-position",
"params": [
{
"name": "id",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "typesLog",
"description": "[]*types.Log",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F0-9]?)+$",
"title": "bytes",
"type": "string"
},
"logIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"removed": { "type": "boolean" },
"topics": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"transactionHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L373"
}
},
{
"name": "eth_getHashrate",
"description": "```go\n{\n\treturn uint64(api.ethash.Hashrate())\n}\n```",
"summary": "GetHashrate returns the current hashrate for local CPU miner and remote miner.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "uint64",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L110"
}
},
{
"name": "eth_getHeaderByHash",
"description": "```go\n{\n\theader, _ := s.b.HeaderByHash(ctx, hash)\n\tif header != nil {\n\t\treturn s.rpcMarshalHeader(ctx, header)\n\t}\n\treturn nil\n}\n```",
"summary": "GetHeaderByHash returns the requested header by hash.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalHeaderT",
"description": "*RPCMarshalHeaderT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L644"
}
},
{
"name": "eth_getHeaderByNumber",
"description": "```go\n{\n\theader, err := s.b.HeaderByNumber(ctx, number)\n\tif header != nil \u0026\u0026 err == nil {\n\t\tresponse := s.rpcMarshalHeader(ctx, header)\n\t\tif number == rpc.PendingBlockNumber {\n\t\t\tresponse.setAsPending()\n\t\t}\n\t\treturn response, err\n\t}\n\treturn nil, err\n}\n```",
"summary": "GetHeaderByNumber returns the requested canonical block header.\n* When blockNr is -1 the chain head is returned.\n* When blockNr is -2 the pending chain head is returned.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalHeaderT",
"description": "*RPCMarshalHeaderT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L630"
}
},
{
"name": "eth_getLogs",
"description": "```go\n{\n\tvar filter *Filter\n\tif crit.BlockHash != nil {\n\t\tfilter = NewBlockFilter(api.backend, *crit.BlockHash, crit.Addresses, crit.Topics)\n\t} else {\n\t\tbegin := rpc.LatestBlockNumber.Int64()\n\t\tif crit.FromBlock != nil {\n\t\t\tbegin = crit.FromBlock.Int64()\n\t\t}\n\t\tend := rpc.LatestBlockNumber.Int64()\n\t\tif crit.ToBlock != nil {\n\t\t\tend = crit.ToBlock.Int64()\n\t\t}\n\t\tfilter = NewRangeFilter(api.backend, begin, end, crit.Addresses, crit.Topics)\n\t}\n\tlogs, err := filter.Logs(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn returnLogs(logs), err\n}\n```",
"summary": "GetLogs returns logs matching the given argument that are stored within the state.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs\n",
"paramStructure": "by-position",
"params": [
{
"name": "crit",
"description": "FilterCriteria",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Addresses": {
"items": {
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"BlockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"FromBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"ToBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Topics": {
"items": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "typesLog",
"description": "[]*types.Log",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"data": {
"pattern": "^0x([a-fA-F0-9]?)+$",
"title": "bytes",
"type": "string"
},
"logIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"removed": { "type": "boolean" },
"topics": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"transactionHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L326"
}
},
{
"name": "eth_getProof",
"description": "```go\n{\n\tstate, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif state == nil || err != nil {\n\t\treturn nil, err\n\t}\n\tstorageTrie := state.StorageTrie(address)\n\tstorageHash := types.EmptyRootHash\n\tcodeHash := state.GetCodeHash(address)\n\tstorageProof := make([]StorageResult, len(storageKeys))\n\tif storageTrie != nil {\n\t\tstorageHash = storageTrie.Hash()\n\t} else {\n\t\tcodeHash = crypto.Keccak256Hash(nil)\n\t}\n\tfor i, key := range storageKeys {\n\t\tif storageTrie != nil {\n\t\t\tproof, storageError := state.GetStorageProof(address, common.HexToHash(key))\n\t\t\tif storageError != nil {\n\t\t\t\treturn nil, storageError\n\t\t\t}\n\t\t\tstorageProof[i] = StorageResult{key, (*hexutil.Big)(state.GetState(address, common.HexToHash(key)).Big()), toHexSlice(proof)}\n\t\t} else {\n\t\t\tstorageProof[i] = StorageResult{key, \u0026hexutil.Big{}, []string{}}\n\t\t}\n\t}\n\taccountProof, proofErr := state.GetProof(address)\n\tif proofErr != nil {\n\t\treturn nil, proofErr\n\t}\n\treturn \u0026AccountResult{Address: address, AccountProof: toHexSlice(accountProof), Balance: (*hexutil.Big)(state.GetBalance(address)), CodeHash: codeHash, Nonce: hexutil.Uint64(state.GetNonce(address)), StorageHash: storageHash, StorageProof: storageProof}, state.Error()\n}\n```",
"summary": "GetProof returns the Merkle-proof for a given account and optionally some storage keys.\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "storageKeys",
"description": "[]string",
"summary": "",
"schema": { "items": [{ "type": ["string"] }], "type": ["array"] },
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "AccountResult",
"description": "*AccountResult",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"accountProof": {
"items": { "type": "string" },
"type": "array"
},
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"balance": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"codeHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"storageHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"storageProof": {
"items": {
"additionalProperties": false,
"properties": {
"key": { "type": "string" },
"proof": { "items": { "type": "string" }, "type": "array" },
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L578"
}
},
{
"name": "eth_getRawTransactionByBlockHashAndIndex",
"description": "```go\n{\n\tif block, _ := s.b.BlockByHash(ctx, blockHash); block != nil {\n\t\treturn newRPCRawTransactionFromBlockIndex(block, uint64(index))\n\t}\n\treturn nil\n}\n```",
"summary": "GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1454"
}
},
{
"name": "eth_getRawTransactionByBlockNumberAndIndex",
"description": "```go\n{\n\tif block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {\n\t\treturn newRPCRawTransactionFromBlockIndex(block, uint64(index))\n\t}\n\treturn nil\n}\n```",
"summary": "GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1446"
}
},
{
"name": "eth_getRawTransactionByHash",
"description": "```go\n{\n\ttx, _, _, _, err := s.b.GetTransaction(ctx, hash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif tx == nil {\n\t\tif tx = s.b.GetPoolTransaction(hash); tx == nil {\n\t\t\treturn nil, nil\n\t\t}\n\t}\n\treturn rlp.EncodeToBytes(tx)\n}\n```",
"summary": "GetRawTransactionByHash returns the bytes of the transaction for the given hash.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1500"
}
},
{
"name": "eth_getStorageAt",
"description": "```go\n{\n\tstate, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif state == nil || err != nil {\n\t\treturn nil, err\n\t}\n\tres := state.GetState(address, common.HexToHash(key))\n\treturn res[:], state.Error()\n}\n```",
"summary": "GetStorageAt returns the storage from the state at the given address, key and\nblock number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block\nnumbers are also allowed.\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "key",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L743"
}
},
{
"name": "eth_getTransactionByBlockHashAndIndex",
"description": "```go\n{\n\tif block, _ := s.b.BlockByHash(ctx, blockHash); block != nil {\n\t\treturn newRPCTransactionFromBlockIndex(block, uint64(index))\n\t}\n\treturn nil\n}\n```",
"summary": "GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCTransaction",
"description": "*RPCTransaction",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1438"
}
},
{
"name": "eth_getTransactionByBlockNumberAndIndex",
"description": "```go\n{\n\tif block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {\n\t\treturn newRPCTransactionFromBlockIndex(block, uint64(index))\n\t}\n\treturn nil\n}\n```",
"summary": "GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCTransaction",
"description": "*RPCTransaction",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1430"
}
},
{
"name": "eth_getTransactionByHash",
"description": "```go\n{\n\ttx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif tx != nil {\n\t\treturn newRPCTransaction(tx, blockHash, blockNumber, index), nil\n\t}\n\tif tx := s.b.GetPoolTransaction(hash); tx != nil {\n\t\treturn newRPCPendingTransaction(tx), nil\n\t}\n\treturn nil, nil\n}\n```",
"summary": "GetTransactionByHash returns the transaction for the given hash\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCTransaction",
"description": "*RPCTransaction",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1481"
}
},
{
"name": "eth_getTransactionCount",
"description": "```go\n{\n\tif blockNr, ok := blockNrOrHash.Number(); ok \u0026\u0026 blockNr == rpc.PendingBlockNumber {\n\t\tnonce, err := s.b.GetPoolNonce(ctx, address)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn (*hexutil.Uint64)(\u0026nonce), nil\n\t}\n\tstate, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash)\n\tif state == nil || err != nil {\n\t\treturn nil, err\n\t}\n\tnonce := state.GetNonce(address)\n\treturn (*hexutil.Uint64)(\u0026nonce), state.Error()\n}\n```",
"summary": "GetTransactionCount returns the number of transactions the given address has sent for the given block number\n",
"paramStructure": "by-position",
"params": [
{
"name": "address",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "blockNrOrHash",
"description": "rpc.BlockNumberOrHash",
"summary": "",
"schema": {
"oneOf": [
{
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
{
"allOf": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
{
"required": ["requireCanonical"],
"additionalProperties": false,
"properties": {
"requireCanonical": { "type": "boolean" }
},
"type": ["object"]
}
]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint64",
"description": "*hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1462"
}
},
{
"name": "eth_getTransactionReceipt",
"description": "```go\n{\n\ttx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash)\n\tif err != nil {\n\t\treturn nil, nil\n\t}\n\treceipts, err := s.b.GetReceipts(ctx, blockHash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(receipts) \u003c= int(index) {\n\t\treturn nil, nil\n\t}\n\treceipt := receipts[index]\n\tvar signer types.Signer = types.FrontierSigner{}\n\tif tx.Protected() {\n\t\tsigner = types.NewEIP155Signer(tx.ChainId())\n\t}\n\tfrom, _ := types.Sender(signer, tx)\n\tfields := map[string]interface{}{\"blockHash\": blockHash, \"blockNumber\": hexutil.Uint64(blockNumber), \"transactionHash\": hash, \"transactionIndex\": hexutil.Uint64(index), \"from\": from, \"to\": tx.To(), \"gasUsed\": hexutil.Uint64(receipt.GasUsed), \"cumulativeGasUsed\": hexutil.Uint64(receipt.CumulativeGasUsed), \"contractAddress\": nil, \"logs\": receipt.Logs, \"logsBloom\": receipt.Bloom}\n\tif len(receipt.PostState) \u003e 0 {\n\t\tfields[\"root\"] = hexutil.Bytes(receipt.PostState)\n\t} else {\n\t\tfields[\"status\"] = hexutil.Uint(receipt.Status)\n\t}\n\tif receipt.Logs == nil {\n\t\tfields[\"logs\"] = [][]*types.Log{}\n\t}\n\tif receipt.ContractAddress != (common.Address{}) {\n\t\tfields[\"contractAddress\"] = receipt.ContractAddress\n\t}\n\treturn fields, nil\n}\n```",
"summary": "GetTransactionReceipt returns the transaction receipt for the given transaction hash.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "mapstringinterface",
"description": "map[string]interface{}",
"summary": "",
"schema": {
"patternProperties": { ".*": { "additionalProperties": true } },
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1517"
}
},
{
"name": "eth_getUncleByBlockHashAndIndex",
"description": "```go\n{\n\tblock, err := s.b.BlockByHash(ctx, blockHash)\n\tif block != nil {\n\t\tuncles := block.Uncles()\n\t\tif index \u003e= hexutil.Uint(len(uncles)) {\n\t\t\tlog.Debug(\"Requested uncle not found\", \"number\", block.Number(), \"hash\", blockHash, \"index\", index)\n\t\t\treturn nil, nil\n\t\t}\n\t\tblock = types.NewBlockWithHeader(uncles[index])\n\t\treturn s.rpcMarshalBlock(ctx, block, false, false)\n\t}\n\treturn nil, err\n}\n```",
"summary": "GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and index. When fullTx is true\nall transactions in the block are returned in full detail, otherwise only the transaction hash is returned.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalBlockT",
"description": "*RPCMarshalBlockT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": { "type": "string" },
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": { "additionalProperties": true },
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L698"
}
},
{
"name": "eth_getUncleByBlockNumberAndIndex",
"description": "```go\n{\n\tblock, err := s.b.BlockByNumber(ctx, blockNr)\n\tif block != nil {\n\t\tuncles := block.Uncles()\n\t\tif index \u003e= hexutil.Uint(len(uncles)) {\n\t\t\tlog.Debug(\"Requested uncle not found\", \"number\", blockNr, \"hash\", block.Hash(), \"index\", index)\n\t\t\treturn nil, nil\n\t\t}\n\t\tblock = types.NewBlockWithHeader(uncles[index])\n\t\treturn s.rpcMarshalBlock(ctx, block, false, false)\n\t}\n\treturn nil, err\n}\n```",
"summary": "GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash and index. When fullTx is true\nall transactions in the block are returned in full detail, otherwise only the transaction hash is returned.\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "index",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "RPCMarshalBlockT",
"description": "*RPCMarshalBlockT",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"difficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"error": { "type": "string" },
"extraData": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"gasLimit": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasUsed": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"logsBloom": {
"items": {
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"maxItems": 256,
"minItems": 256,
"type": "array"
},
"miner": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"mixHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"nonce": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"number": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"parentHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"sha3Uncles": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"size": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"timestamp": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"totalDifficulty": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"transactions": {
"items": { "additionalProperties": true },
"type": "array"
},
"transactionsRoot": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"uncles": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L682"
}
},
{
"name": "eth_getUncleCountByBlockHash",
"description": "```go\n{\n\tif block, _ := s.b.BlockByHash(ctx, blockHash); block != nil {\n\t\tn := hexutil.Uint(len(block.Uncles()))\n\t\treturn \u0026n\n\t}\n\treturn nil\n}\n```",
"summary": "GetUncleCountByBlockHash returns number of uncles in the block for the given block hash\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint",
"description": "*hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L722"
}
},
{
"name": "eth_getUncleCountByBlockNumber",
"description": "```go\n{\n\tif block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {\n\t\tn := hexutil.Uint(len(block.Uncles()))\n\t\treturn \u0026n\n\t}\n\treturn nil\n}\n```",
"summary": "GetUncleCountByBlockNumber returns number of uncles in the block for the given block number\n",
"paramStructure": "by-position",
"params": [
{
"name": "blockNr",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilUint",
"description": "*hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L713"
}
},
{
"name": "eth_getWork",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn [4]string{}, errors.New(\"not supported\")\n\t}\n\tvar (\n\t\tworkCh\t= make(chan [4]string, 1)\n\t\terrc\t= make(chan error, 1)\n\t)\n\tselect {\n\tcase api.ethash.remote.fetchWorkCh \u003c- \u0026sealWork{errc: errc, res: workCh}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn [4]string{}, errEthashStopped\n\t}\n\tselect {\n\tcase work := \u003c-workCh:\n\t\treturn work, nil\n\tcase err := \u003c-errc:\n\t\treturn [4]string{}, err\n\t}\n}\n```",
"summary": "GetWork returns a work package for external miner.\n\nThe work package consists of 3 strings:\n result[0] - 32 bytes hex encoded current block header pow-hash\n result[1] - 32 bytes hex encoded seed hash used for DAG\n result[2] - 32 bytes hex encoded boundary condition (\"target\"), 2^256/difficulty\n result[3] - hex encoded block number\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "num4string",
"description": "[4]string",
"summary": "",
"schema": {
"items": [{ "type": ["string"] }],
"maxItems": 4,
"minItems": 4,
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L41"
}
},
{
"name": "eth_hashrate",
"description": "```go\n{\n\treturn hexutil.Uint64(api.e.Miner().HashRate())\n}\n```",
"summary": "Hashrate returns the POW hashrate\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilUint64",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L65"
}
},
{
"name": "eth_mining",
"description": "```go\n{\n\treturn api.e.IsMining()\n}\n```",
"summary": "Mining returns an indication if this node is currently mining.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L91"
}
},
{
"name": "eth_newBlockFilter",
"description": "```go\n{\n\tvar (\n\t\theaders\t\t= make(chan *types.Header)\n\t\theaderSub\t= api.events.SubscribeNewHeads(headers)\n\t)\n\tapi.filtersMu.Lock()\n\tapi.filters[headerSub.ID] = \u0026filter{typ: BlocksSubscription, deadline: time.NewTimer(deadline), hashes: make([]common.Hash, 0), s: headerSub}\n\tapi.filtersMu.Unlock()\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase h := \u003c-headers:\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tif f, found := api.filters[headerSub.ID]; found {\n\t\t\t\t\tf.hashes = append(f.hashes, h.Hash())\n\t\t\t\t}\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\tcase \u003c-headerSub.Err():\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tdelete(api.filters, headerSub.ID)\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\treturn headerSub.ID\n}\n```",
"summary": "NewBlockFilter creates a filter that fetches blocks that are imported into the chain.\nIt is part of the filter package since polling goes with eth_getFilterChanges.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "rpcID",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L175"
}
},
{
"name": "eth_newFilter",
"description": "```go\n{\n\tlogs := make(chan []*types.Log)\n\tlogsSub, err := api.events.SubscribeLogs(ethereum.FilterQuery(crit), logs)\n\tif err != nil {\n\t\treturn rpc.ID(\"\"), err\n\t}\n\tapi.filtersMu.Lock()\n\tapi.filters[logsSub.ID] = \u0026filter{typ: LogsSubscription, crit: crit, deadline: time.NewTimer(deadline), logs: make([]*types.Log, 0), s: logsSub}\n\tapi.filtersMu.Unlock()\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase l := \u003c-logs:\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tif f, found := api.filters[logsSub.ID]; found {\n\t\t\t\t\tf.logs = append(f.logs, l...)\n\t\t\t\t}\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\tcase \u003c-logsSub.Err():\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tdelete(api.filters, logsSub.ID)\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\treturn logsSub.ID, nil\n}\n```",
"summary": "NewFilter creates a new filter and returns the filter id. It can be\nused to retrieve logs when the state changes. This method cannot be\nused to fetch logs that are already stored in the state.\n\nDefault criteria for the from and to block are \"latest\".\nUsing \"latest\" as block number will return logs for mined blocks.\nUsing \"pending\" as block number returns logs for not yet mined (pending) blocks.\nIn case logs are removed (chain reorg) previously returned logs are returned\nagain but with the removed property set to true.\n\nIn case \"fromBlock\" \u003e \"toBlock\" an error is returned.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter\n",
"paramStructure": "by-position",
"params": [
{
"name": "crit",
"description": "FilterCriteria",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Addresses": {
"items": {
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"BlockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"FromBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"ToBlock": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Topics": {
"items": {
"items": {
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "rpcID",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L291"
}
},
{
"name": "eth_newPendingTransactionFilter",
"description": "```go\n{\n\tvar (\n\t\tpendingTxs\t= make(chan []common.Hash)\n\t\tpendingTxSub\t= api.events.SubscribePendingTxs(pendingTxs)\n\t)\n\tapi.filtersMu.Lock()\n\tapi.filters[pendingTxSub.ID] = \u0026filter{typ: PendingTransactionsSubscription, deadline: time.NewTimer(deadline), hashes: make([]common.Hash, 0), s: pendingTxSub}\n\tapi.filtersMu.Unlock()\n\tgo func() {\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase ph := \u003c-pendingTxs:\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tif f, found := api.filters[pendingTxSub.ID]; found {\n\t\t\t\t\tf.hashes = append(f.hashes, ph...)\n\t\t\t\t}\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\tcase \u003c-pendingTxSub.Err():\n\t\t\t\tapi.filtersMu.Lock()\n\t\t\t\tdelete(api.filters, pendingTxSub.ID)\n\t\t\t\tapi.filtersMu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}()\n\treturn pendingTxSub.ID\n}\n```",
"summary": "NewPendingTransactionFilter creates a filter that fetches pending transaction hashes\nas transactions enter the pending state.\n\nIt is part of the filter package because this filter can be used through the\n`eth_getFilterChanges` polling method that is also used for log filters.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "rpcID",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L105"
}
},
{
"name": "eth_pendingTransactions",
"description": "```go\n{\n\tpending, err := s.b.GetPoolTransactions()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\taccounts := make(map[common.Address]struct{})\n\tfor _, wallet := range s.b.AccountManager().Wallets() {\n\t\tfor _, account := range wallet.Accounts() {\n\t\t\taccounts[account.Address] = struct{}{}\n\t\t}\n\t}\n\ttransactions := make([]*RPCTransaction, 0, len(pending))\n\tfor _, tx := range pending {\n\t\tvar signer types.Signer = types.HomesteadSigner{}\n\t\tif tx.Protected() {\n\t\t\tsigner = types.NewEIP155Signer(tx.ChainId())\n\t\t}\n\t\tfrom, _ := types.Sender(signer, tx)\n\t\tif _, exists := accounts[from]; exists {\n\t\t\ttransactions = append(transactions, newRPCPendingTransaction(tx))\n\t\t}\n\t}\n\treturn transactions, nil\n}\n```",
"summary": "PendingTransactions returns the transactions that are in the transaction pool\nand have a from address that is one of the accounts this node manages.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "RPCTransaction",
"description": "[]*RPCTransaction",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1813"
}
},
{
"name": "eth_protocolVersion",
"description": "```go\n{\n\treturn hexutil.Uint(s.b.ProtocolVersion())\n}\n```",
"summary": "ProtocolVersion returns the current Ethereum protocol version this node supports\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilUint",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L69"
}
},
{
"name": "eth_resend",
"description": "```go\n{\n\tif sendArgs.Nonce == nil {\n\t\treturn common.Hash{}, fmt.Errorf(\"missing transaction nonce in transaction spec\")\n\t}\n\tif err := sendArgs.setDefaults(ctx, s.b); err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\tmatchTx := sendArgs.toTransaction()\n\tvar price = matchTx.GasPrice()\n\tif gasPrice != nil {\n\t\tprice = gasPrice.ToInt()\n\t}\n\tvar gas = matchTx.Gas()\n\tif gasLimit != nil {\n\t\tgas = uint64(*gasLimit)\n\t}\n\tif err := checkTxFee(price, gas, s.b.RPCTxFeeCap()); err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\tpending, err := s.b.GetPoolTransactions()\n\tif err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\tfor _, p := // Before replacing the old transaction, ensure the _new_ transaction fee is reasonable.\n\trange pending {\n\t\tvar signer types.Signer = types.HomesteadSigner{}\n\t\tif p.Protected() {\n\t\t\tsigner = types.NewEIP155Signer(p.ChainId())\n\t\t}\n\t\twantSigHash := signer.Hash(matchTx)\n\t\tif pFrom, err := types.Sender(signer, p); err == nil \u0026\u0026 pFrom == sendArgs.From \u0026\u0026 signer.Hash(p) == wantSigHash {\n\t\t\tif gasPrice != nil \u0026\u0026 (*big.Int)(gasPrice).Sign() != 0 {\n\t\t\t\tsendArgs.GasPrice = gasPrice\n\t\t\t}\n\t\t\tif gasLimit != nil \u0026\u0026 *gasLimit != 0 {\n\t\t\t\tsendArgs.Gas = gasLimit\n\t\t\t}\n\t\t\tsignedTx, err := s.sign(sendArgs.From, sendArgs.toTransaction())\n\t\t\tif err != nil {\n\t\t\t\treturn common.Hash{}, err\n\t\t\t}\n\t\t\tif err = s.b.SendTx(ctx, signedTx); err != nil {\n\t\t\t\treturn common.Hash{}, err\n\t\t\t}\n\t\t\treturn signedTx.Hash(), nil\n\t\t}\n\t}\n\treturn common.Hash{}, fmt.Errorf(\"transaction %#x not found\", matchTx.Hash())\n}\n```",
"summary": "Resend accepts an existing transaction and a new gas price and limit. It will remove\nthe given transaction from the pool and reinsert it with the new gas price and limit.\n",
"paramStructure": "by-position",
"params": [
{
"name": "sendArgs",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "gasPrice",
"description": "*hexutil.Big",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "gasLimit",
"description": "*hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1840"
}
},
{
"name": "eth_sendRawTransaction",
"description": "```go\n{\n\ttx := new(types.Transaction)\n\tif err := rlp.DecodeBytes(encodedTx, tx); err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\treturn SubmitTransaction(ctx, s.b, tx)\n}\n```",
"summary": "SendRawTransaction will add the signed transaction to the transaction pool.\nThe sender is responsible for signing the transaction and using the correct nonce.\n",
"paramStructure": "by-position",
"params": [
{
"name": "encodedTx",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1741"
}
},
{
"name": "eth_sendTransaction",
"description": "```go\n{\n\taccount := accounts.Account{Address: args.From}\n\twallet, err := s.b.AccountManager().Find(account)\n\tif err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\tif args.Nonce == nil {\n\t\ts.nonceLock.LockAddr(args.From)\n\t\tdefer s.nonceLock.UnlockAddr(args.From)\n\t}\n\tif err := args.setDefaults(ctx, s.b); err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\ttx := args.toTransaction()\n\tsigned, err := wallet.SignTx(account, tx, s.b.ChainConfig().GetChainID())\n\tif err != nil {\n\t\treturn common.Hash{}, err\n\t}\n\treturn SubmitTransaction(ctx, s.b, signed)\n}\n```",
"summary": "SendTransaction creates a transaction for the given argument, sign it and submit it to the\ntransaction pool.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1693"
}
},
{
"name": "eth_sign",
"description": "```go\n{\n\taccount := accounts.Account{Address: addr}\n\twallet, err := s.b.AccountManager().Find(account)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsignature, err := wallet.SignText(account, data)\n\tif err == nil {\n\t\tsignature[64] += 27\n\t}\n\treturn signature, err\n}\n```",
"summary": "Sign calculates an ECDSA signature for:\nkeccack256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message).\n\nNote, the produced signature conforms to the secp256k1 curve R, S and V values,\nwhere the V value will be 27 or 28 for legacy reasons.\n\nThe account associated with addr must be unlocked.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n",
"paramStructure": "by-position",
"params": [
{
"name": "addr",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "data",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1758"
}
},
{
"name": "eth_signTransaction",
"description": "```go\n{\n\tif args.Gas == nil {\n\t\treturn nil, fmt.Errorf(\"gas not specified\")\n\t}\n\tif args.GasPrice == nil {\n\t\treturn nil, fmt.Errorf(\"gasPrice not specified\")\n\t}\n\tif args.Nonce == nil {\n\t\treturn nil, fmt.Errorf(\"nonce not specified\")\n\t}\n\tif err := args.setDefaults(ctx, s.b); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := checkTxFee(args.GasPrice.ToInt(), uint64(*args.Gas), s.b.RPCTxFeeCap()); err != nil {\n\t\treturn nil, err\n\t}\n\ttx, err := s.sign(args.From, args.toTransaction())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdata, err := rlp.EncodeToBytes(tx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn \u0026SignTransactionResult{data, tx}, nil\n}\n```",
"summary": "SignTransaction will sign the given transaction with the from account.\nThe node needs to have the private key of the account corresponding with\nthe given from address and it needs to be unlocked.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "SignTransactionResult",
"description": "*SignTransactionResult",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"raw": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"tx": { "additionalProperties": false, "type": "object" }
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1783"
}
},
{
"name": "eth_submitHashRate",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn false\n\t}\n\tvar done = make(chan struct{}, 1)\n\tselect {\n\tcase api.ethash.remote.submitRateCh \u003c- \u0026hashrate{done: done, rate: uint64(rate), id: id}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn false\n\t}\n\t\u003c-done\n\treturn true\n}\n```",
"summary": "SubmitHashrate can be used for remote miners to submit their hash rate.\nThis enables the node to report the combined hash rate of all miners\nwhich submit work through this node.\n\nIt accepts the miner hash rate and an identifier which must be unique\nbetween nodes.\n",
"paramStructure": "by-position",
"params": [
{
"name": "rate",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "id",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L92"
}
},
{
"name": "eth_submitWork",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn false\n\t}\n\tvar errc = make(chan error, 1)\n\tselect {\n\tcase api.ethash.remote.submitWorkCh \u003c- \u0026mineResult{nonce: nonce, mixDigest: digest, hash: hash, errc: errc}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn false\n\t}\n\terr := \u003c-errc\n\treturn err == nil\n}\n```",
"summary": "SubmitWork can be used by external miner to submit their POW solution.\nIt returns an indication if the work was accepted.\nNote either an invalid solution, a stale work a non-existent work will return false.\n",
"paramStructure": "by-position",
"params": [
{
"name": "nonce",
"description": "types.BlockNonce",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "digest",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L66"
}
},
{
"name": "eth_subscribe",
"description": "```go\n{\n\treturn\n}\n```",
"summary": "Subscribe creates a subscription to an event channel.\nSubscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections.\n",
"paramStructure": "by-position",
"params": [
{
"name": "subscriptionName",
"description": "RPCSubscriptionParamsName",
"summary": "",
"schema": {
"oneOf": [
{
"description": "Fires a notification each time a new header is appended to the chain, including chain reorganizations.",
"enum": ["newHeads"],
"type": ["string"]
},
{
"description": "Returns logs that are included in new imported blocks and match the given filter criteria.",
"enum": ["logs"],
"type": ["string"]
},
{
"description": "Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node.",
"enum": ["newPendingTransactions"],
"type": ["string"]
},
{
"description": "Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators.",
"enum": ["syncing"],
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "subscriptionOptions",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": false,
"deprecated": false
}
],
"result": {
"name": "subscriptionID",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/openrpc.go#L211"
}
},
{
"name": "eth_syncing",
"description": "```go\n{\n\tprogress := s.b.Downloader().Progress()\n\tif progress.CurrentBlock \u003e= progress.HighestBlock {\n\t\treturn false, nil\n\t}\n\treturn map[string]interface{}{\"startingBlock\": hexutil.Uint64(progress.StartingBlock), \"currentBlock\": hexutil.Uint64(progress.CurrentBlock), \"highestBlock\": hexutil.Uint64(progress.HighestBlock), \"pulledStates\": hexutil.Uint64(progress.PulledStates), \"knownStates\": hexutil.Uint64(progress.KnownStates)}, nil\n}\n```",
"summary": "Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not\nyet received the latest block headers from its pears. In case it is synchronizing:\n- startingBlock: block number this node started to synchronise from\n- currentBlock: block number this node is currently importing\n- highestBlock: block number of the highest block header this node has received from peers\n- pulledStates: number of state entries processed until now\n- knownStates: number of known state entries that still need to be pulled\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "interface",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L80"
}
},
{
"name": "eth_uninstallFilter",
"description": "```go\n{\n\tapi.filtersMu.Lock()\n\tf, found := api.filters[id]\n\tif found {\n\t\tdelete(api.filters, id)\n\t}\n\tapi.filtersMu.Unlock()\n\tif found {\n\t\tf.s.Unsubscribe()\n\t}\n\treturn found\n}\n```",
"summary": "UninstallFilter removes the filter with the given filter id.\n\nhttps://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter\n",
"paramStructure": "by-position",
"params": [
{
"name": "id",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/filters/api.go#L355"
}
},
{
"name": "eth_unsubscribe",
"description": "```go\n{\n\treturn nil\n}\n```",
"summary": "Unsubscribe terminates an existing subscription by ID.\n",
"paramStructure": "by-position",
"params": [
{
"name": "id",
"description": "rpc.ID",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/openrpc.go#L202"
}
},
{
"name": "ethash_getHashrate",
"description": "```go\n{\n\treturn uint64(api.ethash.Hashrate())\n}\n```",
"summary": "GetHashrate returns the current hashrate for local CPU miner and remote miner.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "uint64",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L110"
}
},
{
"name": "ethash_getWork",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn [4]string{}, errors.New(\"not supported\")\n\t}\n\tvar (\n\t\tworkCh\t= make(chan [4]string, 1)\n\t\terrc\t= make(chan error, 1)\n\t)\n\tselect {\n\tcase api.ethash.remote.fetchWorkCh \u003c- \u0026sealWork{errc: errc, res: workCh}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn [4]string{}, errEthashStopped\n\t}\n\tselect {\n\tcase work := \u003c-workCh:\n\t\treturn work, nil\n\tcase err := \u003c-errc:\n\t\treturn [4]string{}, err\n\t}\n}\n```",
"summary": "GetWork returns a work package for external miner.\n\nThe work package consists of 3 strings:\n result[0] - 32 bytes hex encoded current block header pow-hash\n result[1] - 32 bytes hex encoded seed hash used for DAG\n result[2] - 32 bytes hex encoded boundary condition (\"target\"), 2^256/difficulty\n result[3] - hex encoded block number\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "num4string",
"description": "[4]string",
"summary": "",
"schema": {
"items": [{ "type": ["string"] }],
"maxItems": 4,
"minItems": 4,
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L41"
}
},
{
"name": "ethash_submitHashRate",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn false\n\t}\n\tvar done = make(chan struct{}, 1)\n\tselect {\n\tcase api.ethash.remote.submitRateCh \u003c- \u0026hashrate{done: done, rate: uint64(rate), id: id}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn false\n\t}\n\t\u003c-done\n\treturn true\n}\n```",
"summary": "SubmitHashrate can be used for remote miners to submit their hash rate.\nThis enables the node to report the combined hash rate of all miners\nwhich submit work through this node.\n\nIt accepts the miner hash rate and an identifier which must be unique\nbetween nodes.\n",
"paramStructure": "by-position",
"params": [
{
"name": "rate",
"description": "hexutil.Uint64",
"summary": "",
"schema": {
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "id",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L92"
}
},
{
"name": "ethash_submitWork",
"description": "```go\n{\n\tif api.ethash.remote == nil {\n\t\treturn false\n\t}\n\tvar errc = make(chan error, 1)\n\tselect {\n\tcase api.ethash.remote.submitWorkCh \u003c- \u0026mineResult{nonce: nonce, mixDigest: digest, hash: hash, errc: errc}:\n\tcase \u003c-api.ethash.remote.exitCh:\n\t\treturn false\n\t}\n\terr := \u003c-errc\n\treturn err == nil\n}\n```",
"summary": "SubmitWork can be used by external miner to submit their POW solution.\nIt returns an indication if the work was accepted.\nNote either an invalid solution, a stale work a non-existent work will return false.\n",
"paramStructure": "by-position",
"params": [
{
"name": "nonce",
"description": "types.BlockNonce",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "digest",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/api.go#L66"
}
},
{
"name": "miner_getHashrate",
"description": "```go\n{\n\treturn api.e.miner.HashRate()\n}\n```",
"summary": "GetHashrate returns the current hashrate of the miner.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "uint64",
"description": "uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L153"
}
},
{
"name": "miner_setEtherbase",
"description": "```go\n{\n\tapi.e.SetEtherbase(etherbase)\n\treturn true\n}\n```",
"summary": "SetEtherbase sets the etherbase of the miner\n",
"paramStructure": "by-position",
"params": [
{
"name": "etherbase",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L142"
}
},
{
"name": "miner_setExtra",
"description": "```go\n{\n\tif err := api.e.Miner().SetExtra([]byte(extra)); err != nil {\n\t\treturn false, err\n\t}\n\treturn true, nil\n}\n```",
"summary": "SetExtra sets the extra data string that is included when this miner mines a block.\n",
"paramStructure": "by-position",
"params": [
{
"name": "extra",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L124"
}
},
{
"name": "miner_setGasPrice",
"description": "```go\n{\n\tapi.e.lock.Lock()\n\tapi.e.gasPrice = (*big.Int)(\u0026gasPrice)\n\tapi.e.lock.Unlock()\n\tapi.e.txPool.SetGasPrice((*big.Int)(\u0026gasPrice))\n\treturn true\n}\n```",
"summary": "SetGasPrice sets the minimum accepted gas price for the miner.\n",
"paramStructure": "by-position",
"params": [
{
"name": "gasPrice",
"description": "hexutil.Big",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L132"
}
},
{
"name": "miner_setRecommitInterval",
"description": "```go\n{\n\tapi.e.Miner().SetRecommitInterval(time.Duration(interval) * time.Millisecond)\n}\n```",
"summary": "SetRecommitInterval updates the interval for miner sealing work recommitting.\n",
"paramStructure": "by-position",
"params": [
{
"name": "interval",
"description": "int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L148"
}
},
{
"name": "miner_start",
"description": "```go\n{\n\tif threads == nil {\n\t\treturn api.e.StartMining(runtime.NumCPU())\n\t}\n\treturn api.e.StartMining(*threads)\n}\n```",
"summary": "Start starts the miner with the given number of threads. If threads is nil,\nthe number of workers started is equal to the number of logical CPUs that are\nusable by this process. If mining is already running, this method adjust the\nnumber of threads allowed to use and updates the minimum price required by the\ntransaction pool.\n",
"paramStructure": "by-position",
"params": [
{
"name": "threads",
"description": "*int",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L110"
}
},
{
"name": "miner_stop",
"description": "```go\n{\n\tapi.e.StopMining()\n}\n```",
"summary": "Stop terminates the miner, both at the consensus engine level as well as at\nthe block creation level.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api.go#L119"
}
},
{
"name": "net_listening",
"description": "```go\n{\n\treturn true\n}\n```",
"summary": "Listening returns an indication if the node is listening for network connections.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L2033"
}
},
{
"name": "net_peerCount",
"description": "```go\n{\n\treturn hexutil.Uint(s.net.PeerCount())\n}\n```",
"summary": "PeerCount returns the number of connected peers\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "hexutilUint",
"description": "hexutil.Uint",
"summary": "",
"schema": {
"title": "uint",
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L2037"
}
},
{
"name": "net_version",
"description": "```go\n{\n\treturn fmt.Sprintf(\"%d\", s.networkVersion)\n}\n```",
"summary": "Version returns the current ethereum protocol version.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L2042"
}
},
{
"name": "personal_deriveAccount",
"description": "```go\n{\n\twallet, err := s.am.Wallet(url)\n\tif err != nil {\n\t\treturn accounts.Account{}, err\n\t}\n\tderivPath, err := accounts.ParseDerivationPath(path)\n\tif err != nil {\n\t\treturn accounts.Account{}, err\n\t}\n\tif pin == nil {\n\t\tpin = new(bool)\n\t}\n\treturn wallet.Derive(derivPath, *pin)\n}\n```",
"summary": "DeriveAccount requests a HD wallet to derive a new account, optionally pinning\nit for later reuse.\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "path",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "pin",
"description": "*bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "accountsAccount",
"description": "accounts.Account",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"url": {
"additionalProperties": false,
"properties": {
"Path": { "type": "string" },
"Scheme": { "type": "string" }
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L263"
}
},
{
"name": "personal_ecRecover",
"description": "```go\n{\n\tif len(sig) != crypto.SignatureLength {\n\t\treturn common.Address{}, fmt.Errorf(\"signature must be %d bytes long\", crypto.SignatureLength)\n\t}\n\tif sig[crypto.RecoveryIDOffset] != 27 \u0026\u0026 sig[crypto.RecoveryIDOffset] != 28 {\n\t\treturn common.Address{}, fmt.Errorf(\"invalid Ethereum signature (V is not 27 or 28)\")\n\t}\n\tsig[crypto.RecoveryIDOffset] -= 27\n\trpk, err := crypto.SigToPub(accounts.TextHash(data), sig)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\treturn crypto.PubkeyToAddress(*rpk), nil\n}\n```",
"summary": "EcRecover returns the address for the account that was used to create the signature.\nNote, this function is compatible with eth_sign and personal_sign. As such it recovers\nthe address of:\nhash = keccak256(\"\\x19Ethereum Signed Message:\\n\"${message length}${message})\naddr = ecrecover(hash, signature)\n\nNote, the signature must conform to the secp256k1 curve R, S and V values, where\nthe V value must be 27 or 28 for legacy reasons.\n\nhttps://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecRecover\n",
"paramStructure": "by-position",
"params": [
{
"name": "data",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "sig",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L464"
}
},
{
"name": "personal_importRawKey",
"description": "```go\n{\n\tkey, err := crypto.HexToECDSA(privkey)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tks, err := fetchKeystore(s.am)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tacc, err := ks.ImportECDSA(key, password)\n\treturn acc.Address, err\n}\n```",
"summary": "ImportRawKey stores the given hex encoded ECDSA key into the key directory,\nencrypting it with the passphrase.\n",
"paramStructure": "by-position",
"params": [
{
"name": "privkey",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "password",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L304"
}
},
{
"name": "personal_initializeWallet",
"description": "```go\n{\n\twallet, err := s.am.Wallet(url)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tentropy, err := bip39.NewEntropy(256)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tmnemonic, err := bip39.NewMnemonic(entropy)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tseed := bip39.NewSeed(mnemonic, \"\")\n\tswitch wallet := wallet.(type) {\n\tcase *scwallet.Wallet:\n\t\treturn mnemonic, wallet.Initialize(seed)\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"specified wallet does not support initialization\")\n\t}\n}\n```",
"summary": "InitializeWallet initializes a new wallet at the provided URL, by generating and returning a new private key.\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L487"
}
},
{
"name": "personal_listAccounts",
"description": "```go\n{\n\treturn s.am.Accounts()\n}\n```",
"summary": "listAccounts will return a list of addresses for accounts this node manages.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "commonAddress",
"description": "[]common.Address",
"summary": "",
"schema": {
"items": [
{
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L213"
}
},
{
"name": "personal_listWallets",
"description": "```go\n{\n\twallets := make([]rawWallet, 0)\n\tfor _, wallet := range s.am.Wallets() {\n\t\tstatus, failure := wallet.Status()\n\t\traw := rawWallet{URL: wallet.URL().String(), Status: status, Accounts: wallet.Accounts()}\n\t\tif failure != nil {\n\t\t\traw.Failure = failure.Error()\n\t\t}\n\t\twallets = append(wallets, raw)\n\t}\n\treturn wallets\n}\n```",
"summary": "ListWallets will return a list of wallets this node manages.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "rawWallet",
"description": "[]rawWallet",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"accounts": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"url": {
"additionalProperties": false,
"properties": {
"Path": { "type": "string" },
"Scheme": { "type": "string" }
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"failure": { "type": "string" },
"status": { "type": "string" },
"url": { "type": "string" }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L227"
}
},
{
"name": "personal_lockAccount",
"description": "```go\n{\n\tif ks, err := fetchKeystore(s.am); err == nil {\n\t\treturn ks.Lock(addr) == nil\n\t}\n\treturn false\n}\n```",
"summary": "LockAccount will lock the account associated with the given address when it's unlocked.\n",
"paramStructure": "by-position",
"params": [
{
"name": "addr",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L349"
}
},
{
"name": "personal_newAccount",
"description": "```go\n{\n\tks, err := fetchKeystore(s.am)\n\tif err != nil {\n\t\treturn common.Address{}, err\n\t}\n\tacc, err := ks.NewAccount(password)\n\tif err == nil {\n\t\tlog.Info(\"Your new key was generated\", \"address\", acc.Address)\n\t\tlog.Warn(\"Please backup your key file!\", \"path\", acc.URL.Path)\n\t\tlog.Warn(\"Please remember your password!\")\n\t\treturn acc.Address, nil\n\t}\n\treturn common.Address{}, err\n}\n```",
"summary": "NewAccount will create a new account and returns the address for the new account.\n",
"paramStructure": "by-position",
"params": [
{
"name": "password",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonAddress",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L279"
}
},
{
"name": "personal_openWallet",
"description": "```go\n{\n\twallet, err := s.am.Wallet(url)\n\tif err != nil {\n\t\treturn err\n\t}\n\tpass := \"\"\n\tif passphrase != nil {\n\t\tpass = *passphrase\n\t}\n\treturn wallet.Open(pass)\n}\n```",
"summary": "OpenWallet initiates a hardware wallet opening procedure, establishing a USB\nconnection and attempting to authenticate via the provided passphrase. Note,\nthe method may return an extra challenge requiring a second open (e.g. the\nTrezor PIN matrix challenge).\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "passphrase",
"description": "*string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L249"
}
},
{
"name": "personal_sendTransaction",
"description": "```go\n{\n\tif args.Nonce == nil {\n\t\ts.nonceLock.LockAddr(args.From)\n\t\tdefer s.nonceLock.UnlockAddr(args.From)\n\t}\n\tsigned, err := s.signTransaction(ctx, \u0026args, passwd)\n\tif err != nil {\n\t\tlog.Warn(\"Failed transaction send attempt\", \"from\", args.From, \"to\", args.To, \"value\", args.Value.ToInt(), \"err\", err)\n\t\treturn common.Hash{}, err\n\t}\n\treturn SubmitTransaction(ctx, s.b, signed)\n}\n```",
"summary": "SendTransaction will create a transaction from the given arguments and\ntries to sign it with the key associated with args.To. If the given passwd isn't\nable to decrypt the key it fails.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "passwd",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L379"
}
},
{
"name": "personal_sign",
"description": "```go\n{\n\taccount := accounts.Account{Address: addr}\n\twallet, err := s.b.AccountManager().Find(account)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsignature, err := wallet.SignTextWithPassphrase(account, passwd, data)\n\tif err != nil {\n\t\tlog.Warn(\"Failed data sign attempt\", \"address\", addr, \"err\", err)\n\t\treturn nil, err\n\t}\n\tsignature[crypto.RecoveryIDOffset] += 27\n\treturn signature, nil\n}\n```",
"summary": "Sign calculates an Ethereum ECDSA signature for:\nkeccack256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))\n\nNote, the produced signature conforms to the secp256k1 curve R, S and V values,\nwhere the V value will be 27 or 28 for legacy reasons.\n\nThe key used to calculate the signature is decrypted with the given password.\n\nhttps://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign\n",
"paramStructure": "by-position",
"params": [
{
"name": "data",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "addr",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "passwd",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L436"
}
},
{
"name": "personal_signAndSendTransaction",
"description": "```go\n{\n\treturn s.SendTransaction(ctx, args, passwd)\n}\n```",
"summary": "SignAndSendTransaction was renamed to SendTransaction. This method is deprecated\nand will be removed in the future. It primary goal is to give clients time to update.\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "passwd",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "commonHash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": true,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L482"
}
},
{
"name": "personal_signTransaction",
"description": "```go\n{\n\tif args.Gas == nil {\n\t\treturn nil, fmt.Errorf(\"gas not specified\")\n\t}\n\tif args.GasPrice == nil {\n\t\treturn nil, fmt.Errorf(\"gasPrice not specified\")\n\t}\n\tif args.Nonce == nil {\n\t\treturn nil, fmt.Errorf(\"nonce not specified\")\n\t}\n\tif err := checkTxFee(args.GasPrice.ToInt(), uint64(*args.Gas), s.b.RPCTxFeeCap()); err != nil {\n\t\treturn nil, err\n\t}\n\tsigned, err := s.signTransaction(ctx, \u0026args, passwd)\n\tif err != nil {\n\t\tlog.Warn(\"Failed transaction sign attempt\", \"from\", args.From, \"to\", args.To, \"value\", args.Value.ToInt(), \"err\", err)\n\t\treturn nil, err\n\t}\n\tdata, err := rlp.EncodeToBytes(signed)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn \u0026SignTransactionResult{data, signed}, nil\n}\n```",
"summary": "SignTransaction will create a transaction from the given arguments and\ntries to sign it with the key associated with args.To. If the given passwd isn't\nable to decrypt the key it fails. The transaction is returned in RLP-form, not broadcast\nto other nodes\n",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "SendTxArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "passwd",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "SignTransactionResult",
"description": "*SignTransactionResult",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"raw": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"tx": { "additionalProperties": false, "type": "object" }
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L398"
}
},
{
"name": "personal_unlockAccount",
"description": "```go\n{\n\tif s.b.ExtRPCEnabled() \u0026\u0026 !s.b.AccountManager().Config().InsecureUnlockAllowed {\n\t\treturn false, errors.New(\"account unlock with HTTP access is forbidden\")\n\t}\n\tconst max = uint64(time.Duration(math.MaxInt64) / time.Second)\n\tvar d time.Duration\n\tif duration == nil {\n\t\td = 300 * time.Second\n\t} else if *duration \u003e max {\n\t\treturn false, errors.New(\"unlock duration too large\")\n\t} else {\n\t\td = time.Duration(*duration) * time.Second\n\t}\n\tks, err := fetchKeystore(s.am)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\terr = ks.TimedUnlock(accounts.Account{Address: addr}, password, d)\n\tif err != nil {\n\t\tlog.Warn(\"Failed account unlock attempt\", \"address\", addr, \"err\", err)\n\t}\n\treturn err == nil, err\n}\n```",
"summary": "UnlockAccount will unlock the account associated with the given address with\nthe given password for duration seconds. If duration is nil it will use a\ndefault of 300 seconds. It returns an indication if the account was unlocked.\n",
"paramStructure": "by-position",
"params": [
{
"name": "addr",
"description": "common.Address",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash POINTER",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "password",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "duration",
"description": "*uint64",
"summary": "",
"schema": {
"title": "integer",
"description": "Hex representation of the integer",
"pattern": "^0x[a-fA-F0-9]+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "bool",
"description": "bool",
"summary": "",
"schema": { "type": ["boolean"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L320"
}
},
{
"name": "personal_unpair",
"description": "```go\n{\n\twallet, err := s.am.Wallet(url)\n\tif err != nil {\n\t\treturn err\n\t}\n\tswitch wallet := wallet.(type) {\n\tcase *scwallet.Wallet:\n\t\treturn wallet.Unpair([]byte(pin))\n\tdefault:\n\t\treturn fmt.Errorf(\"specified wallet does not support pairing\")\n\t}\n}\n```",
"summary": "Unpair deletes a pairing between wallet and geth.\n",
"paramStructure": "by-position",
"params": [
{
"name": "url",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
{
"name": "pin",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
}
],
"result": {
"name": "Null",
"description": "Null",
"schema": { "type": ["null"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L514"
}
},
{
"name": "trace_block",
"description": "```go\n{\n\tvar block *types.Block\n\tswitch number {\n\tcase rpc.PendingBlockNumber:\n\t\tblock = api.eth.miner.PendingBlock()\n\tcase rpc.LatestBlockNumber:\n\t\tblock = api.eth.blockchain.CurrentBlock()\n\tdefault:\n\t\tblock = api.eth.blockchain.GetBlockByNumber(uint64(number))\n\t}\n\tif block == nil {\n\t\treturn nil, fmt.Errorf(\"block #%d not found\", number)\n\t}\n\tconfig = setConfigTracerToParity(config)\n\ttraceResults, err := traceBlockByNumber(ctx, api.eth, number, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttraceReward, err := traceBlockReward(ctx, api.eth, block, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttraceUncleRewards, err := traceBlockUncleRewards(ctx, api.eth, block, config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresults := [ // Fetch the block that we want to trace\n\t]interface{}{}\n\tfor _, result := range traceResults {\n\t\tvar tmp []interface{}\n\t\tif err := json.Unmarshal(result.Result.(json.RawMessage), \u0026tmp); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresults = append(results, tmp...)\n\t}\n\tresults = append(results, traceReward)\n\tfor _, uncleReward := range traceUncleRewards {\n\t\tresults = append(results, uncleReward)\n\t}\n\treturn results, nil\n}\n```",
"summary": "Block returns the structured logs created during the execution of\nEVM and returns them as a JSON object.\nThe correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module.\n",
"paramStructure": "by-position",
"params": [
{
"name": "number",
"description": "rpc.BlockNumber",
"summary": "",
"schema": {
"title": "blockNumberIdentifier",
"oneOf": [
{
"title": "blockNumberTag",
"description": "The block height description",
"enum": ["earliest", "latest", "pending"],
"type": ["string"]
},
{
"title": "uint64",
"description": "Hex representation of a uint64",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
}
]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "interface",
"description": "[]interface{}",
"summary": "",
"schema": {
"items": [{ "additionalProperties": true }],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer_parity.go#L114"
}
},
{
"name": "trace_filter",
"description": "```go\n{\n\treturn nil, nil\n}\n```",
"summary": "",
"paramStructure": "by-position",
"params": [
{
"name": "args",
"description": "ethapi.CallArgs",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "txTraceResult",
"description": "[]*txTraceResult",
"summary": "",
"schema": {
"items": [
{
"additionalProperties": false,
"properties": {
"error": { "type": "string" },
"result": { "additionalProperties": true }
},
"type": ["object"]
}
],
"type": ["array"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer_parity.go#L176"
}
},
{
"name": "trace_transaction",
"description": "```go\n{\n\tconfig = setConfigTracerToParity(config)\n\treturn traceTransaction(ctx, api.eth, hash, config)\n}\n```",
"summary": "Transaction returns the structured logs created during the execution of EVM\nand returns them as a JSON object.\n",
"paramStructure": "by-position",
"params": [
{
"name": "hash",
"description": "common.Hash",
"summary": "",
"schema": {
"title": "keccak",
"description": "Hex representation of a Keccak 256 hash",
"pattern": "^0x[a-fA-F\\d]{64}$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
{
"name": "config",
"description": "*TraceConfig",
"summary": "",
"schema": {
"additionalProperties": false,
"properties": {
"Debug": { "type": "boolean" },
"DisableMemory": { "type": "boolean" },
"DisableReturnData": { "type": "boolean" },
"DisableStack": { "type": "boolean" },
"DisableStorage": { "type": "boolean" },
"Limit": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Reexec": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"Timeout": { "type": "string" },
"Tracer": { "type": "string" },
"overrides": { "additionalProperties": true }
},
"type": ["object"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "interface",
"description": "interface{}",
"summary": "",
"schema": { "additionalProperties": true },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/eth/api_tracer_parity.go#L169"
}
},
{
"name": "txpool_content",
"description": "```go\n{\n\tcontent := map[string]map[string]map[string]*RPCTransaction{\"pending\": make(map[string]map[string]*RPCTransaction), \"queued\": make(map[string]map[string]*RPCTransaction)}\n\tpending, queue := s.b.TxPoolContent()\n\tfor account, txs := range pending {\n\t\tdump := make(map[string]*RPCTransaction)\n\t\tfor _, tx := range txs {\n\t\t\tdump[fmt.Sprintf(\"%d\", tx.Nonce())] = newRPCPendingTransaction(tx)\n\t\t}\n\t\tcontent[\"pending\"][account.Hex()] = dump\n\t}\n\tfor account, txs := range queue {\n\t\tdump := make(map[string]*RPCTransaction)\n\t\tfor _, tx := range txs {\n\t\t\tdump[fmt.Sprintf(\"%d\", tx.Nonce())] = newRPCPendingTransaction(tx)\n\t\t}\n\t\tcontent[\"queued\"][account.Hex()] = dump\n\t}\n\treturn content\n}\n```",
"summary": "Content returns the transactions contained within the transaction pool.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "mapstringmapstringmapstringRPCTransaction",
"description": "map[string]map[string]map[string]*RPCTransaction",
"summary": "",
"schema": {
"patternProperties": {
".*": {
"patternProperties": {
".*": {
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"blockHash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"blockNumber": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"from": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"gas": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"gasPrice": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"hash": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"input": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "dataWord",
"type": "string"
},
"nonce": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"r": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"s": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F\\d]{64}$",
"title": "keccak",
"type": "string"
},
"transactionIndex": {
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint64",
"type": "string"
},
"v": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
},
"value": {
"pattern": "^0x[a-fA-F0-9]+$",
"title": "integer",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L108"
}
},
{
"name": "txpool_inspect",
"description": "```go\n{\n\tcontent := map[string]map[string]map[string]string{\"pending\": make(map[string]map[string]string), \"queued\": make(map[string]map[string]string)}\n\tpending, queue := s.b.TxPoolContent()\n\tvar format = func(tx *types.Transaction) string {\n\t\tif to := tx.To(); to != nil {\n\t\t\treturn fmt.Sprintf(\"%s: %v wei + %v gas × %v wei\", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice())\n\t\t}\n\t\treturn fmt.Sprintf(\"contract creation: %v wei + %v gas × %v wei\", tx.Value(), tx.Gas(), tx.GasPrice())\n\t}\n\tfor account, txs := // Define a formatter to flatten a transaction into a string\n\trange pending {\n\t\tdump := make(map[string]string)\n\t\tfor _, tx := range txs {\n\t\t\tdump[fmt.Sprintf(\"%d\", tx.Nonce())] = format(tx)\n\t\t}\n\t\tcontent[\"pending\"][account.Hex()] = dump\n\t}\n\tfor account, txs := range queue {\n\t\tdump := make(map[string]string)\n\t\tfor _, tx := range txs {\n\t\t\tdump[fmt.Sprintf(\"%d\", tx.Nonce())] = format(tx)\n\t\t}\n\t\tcontent[\"queued\"][account.Hex()] = dump\n\t}\n\treturn content\n}\n```",
"summary": "Inspect retrieves the content of the transaction pool and flattens it into an\neasily inspectable list.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "mapstringmapstringmapstringstring",
"description": "map[string]map[string]map[string]string",
"summary": "",
"schema": {
"patternProperties": {
".*": {
"patternProperties": {
".*": {
"patternProperties": { ".*": { "type": "string" } },
"type": "object"
}
},
"type": "object"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L145"
}
},
{
"name": "txpool_status",
"description": "```go\n{\n\tpending, queue := s.b.Stats()\n\treturn map[string]hexutil.Uint{\"pending\": hexutil.Uint(pending), \"queued\": hexutil.Uint(queue)}\n}\n```",
"summary": "Status returns the number of pending and queued transaction in the pool.\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "mapstringhexutilUint",
"description": "map[string]hexutil.Uint",
"summary": "",
"schema": {
"patternProperties": {
".*": {
"description": "Hex representation of a uint",
"pattern": "^0x([a-fA-F\\d])+$",
"title": "uint",
"type": "string"
}
},
"type": ["object"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L135"
}
},
{
"name": "web3_clientVersion",
"description": "```go\n{\n\treturn s.stack.Server().Name\n}\n```",
"summary": "ClientVersion returns the node name\n",
"paramStructure": "by-position",
"params": [],
"result": {
"name": "string",
"description": "string",
"summary": "",
"schema": { "type": ["string"] },
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L320"
}
},
{
"name": "web3_sha3",
"description": "```go\n{\n\treturn crypto.Keccak256(input)\n}\n```",
"summary": "Sha3 applies the ethereum sha3 implementation on the input.\nIt assumes the input is hex encoded.\n",
"paramStructure": "by-position",
"params": [
{
"name": "input",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
}
],
"result": {
"name": "hexutilBytes",
"description": "hexutil.Bytes",
"summary": "",
"schema": {
"title": "dataWord",
"description": "Hex representation of some bytes",
"pattern": "^0x([a-fA-F\\d])+$",
"type": ["string"]
},
"required": true,
"deprecated": false
},
"deprecated": false,
"externalDocs": {
"description": "Github remote link",
"url": "https://github.com/ethereum/go-ethereum/blob/master/node/api.go#L326"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment