From 75b4b1d29a4d33a07f1f3586d2b420b3b5b87b8c Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 15 Jan 2021 06:43:58 -0600 Subject: [PATCH 01/12] docs,mkdocs.yml,Makefile: improve docs - Creates generated markdown docs for API methods ./docs/JSON-RPC-API/modules - 'make docs-generate' (re)creates these files - ./docs/core/index.md is added including some hopefully useful information about what makes core-geth core-geth Date: 2021-01-15 06:43:58-06:00 Signed-off-by: meows --- .gitignore | 3 +- Makefile | 3 + .../jsonrpc-apis.md => JSON-RPC-API/index.md} | 2 +- docs/JSON-RPC-API/modules/admin.md | 1650 +++ docs/JSON-RPC-API/modules/debug.md | 6659 +++++++++++ docs/JSON-RPC-API/modules/eth.md | 9692 +++++++++++++++++ docs/JSON-RPC-API/modules/ethash.md | 519 + docs/JSON-RPC-API/modules/miner.md | 556 + docs/JSON-RPC-API/modules/net.md | 196 + docs/JSON-RPC-API/modules/personal.md | 2133 ++++ docs/JSON-RPC-API/modules/trace.md | 791 ++ docs/JSON-RPC-API/modules/txpool.md | 489 + docs/JSON-RPC-API/modules/web3.md | 182 + docs/{apis => JSON-RPC-API}/openrpc.md | 4 + docs/core/alltools.md | 1 + docs/core/index.md | 164 + docs/developers/build-from-source.md | 8 +- docs/developers/create-new-release.md | 3 +- docs/getting-started/installation.md | 7 + docs/getting-started/run-cli.md | 6 +- docs/index.md | 1 + ethclient/ethclient_test.go | 287 + mkdocs.yml | 21 +- params/version.go | 2 +- 24 files changed, 23352 insertions(+), 27 deletions(-) rename docs/{apis/jsonrpc-apis.md => JSON-RPC-API/index.md} (99%) create mode 100755 docs/JSON-RPC-API/modules/admin.md create mode 100755 docs/JSON-RPC-API/modules/debug.md create mode 100755 docs/JSON-RPC-API/modules/eth.md create mode 100755 docs/JSON-RPC-API/modules/ethash.md create mode 100755 docs/JSON-RPC-API/modules/miner.md create mode 100755 docs/JSON-RPC-API/modules/net.md create mode 100755 docs/JSON-RPC-API/modules/personal.md create mode 100755 docs/JSON-RPC-API/modules/trace.md create mode 100755 docs/JSON-RPC-API/modules/txpool.md create mode 100755 docs/JSON-RPC-API/modules/web3.md rename docs/{apis => JSON-RPC-API}/openrpc.md (90%) create mode 100644 docs/core/index.md diff --git a/.gitignore b/.gitignore index 12c734dec0..4af39b13a5 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ build/_vendor/pkg /build/_workspace/ /build/cache/ /build/bin/ +/build/static/ /geth*.zip # travis @@ -54,4 +55,4 @@ les/transactions.rlp # Files generated by docs build /MANIFEST /manifest.json -/site \ No newline at end of file +/site diff --git a/Makefile b/Makefile index c83ec21ac0..843525476c 100644 --- a/Makefile +++ b/Makefile @@ -131,6 +131,9 @@ clean: clean-evmc mkdocs-serve: ## Serve generated documentation (during development) @build/mkdocs-serve.sh +docs-generate: ## Generate JSON RPC API documentation from the OpenRPC service discovery document. + env COREGETH_GEN_OPENRPC_DOCS=on go test -count=1 -run BuildStatic ./ethclient + # The devtools target installs tools required for 'go generate'. # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'. diff --git a/docs/apis/jsonrpc-apis.md b/docs/JSON-RPC-API/index.md similarity index 99% rename from docs/apis/jsonrpc-apis.md rename to docs/JSON-RPC-API/index.md index 771b8652e3..3a04e01f10 100644 --- a/docs/apis/jsonrpc-apis.md +++ b/docs/JSON-RPC-API/index.md @@ -3,7 +3,7 @@ hide: - toc # Hide table of contents --- -# JSON-RPC APIs +# Using JSON-RPC APIs ## Programmatically interfacing `geth` nodes diff --git a/docs/JSON-RPC-API/modules/admin.md b/docs/JSON-RPC-API/modules/admin.md new file mode 100755 index 0000000000..be7cab4ac2 --- /dev/null +++ b/docs/JSON-RPC-API/modules/admin.md @@ -0,0 +1,1650 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### admin_addPeer + +AddPeer requests connecting to a remote node, and also maintaining the new +connection at all times, even reconnecting if it is lost. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addPeer", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.addPeer(url); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) AddPeer(url string) (bool, error) { + server := api.node.Server() + if server == nil { + return false, ErrNodeStopped + } + node, err := enode.Parse(enode.ValidSchemes, url) + if err != nil { + return false, fmt.Errorf("invalid enode: %v", err) + } + server.AddPeer(node) + return true, nil +}// AddPeer requests connecting to a remote node, and also maintaining the new +// connection at all times, even reconnecting if it is lost. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_addTrustedPeer + +AddTrustedPeer allows a remote node to always connect, even if slots are full + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addTrustedPeer", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.addTrustedPeer(url); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) AddTrustedPeer(url string) (bool, error) { + server := api.node.Server() + if server == nil { + return false, ErrNodeStopped + } + node, err := enode.Parse(enode.ValidSchemes, url) + if err != nil { + return false, fmt.Errorf("invalid enode: %v", err) + } + server.AddTrustedPeer(node) + return true, nil +}// AddTrustedPeer allows a remote node to always connect, even if slots are full + +``` +View on GitHub → +

+
+ +--- + + + +### admin_datadir + +Datadir retrieves the current data directory the node is using. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_datadir", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.datadir(); + ``` + + +
Source code +

+```go +func (api *publicAdminAPI) Datadir() string { + return api.node.DataDir() +}// Datadir retrieves the current data directory the node is using. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_ecbp1100 + + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `blockNumberIdentifier` + - oneOf: + + - title: `blockNumberTag` + - description: `The block height description` + - enum: earliest, latest, pending + - type: string + + + - type: string + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_ecbp1100", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.ecbp1100(blockNr); + ``` + + +
Source code +

+```go +func (api *PrivateAdminAPI) Ecbp1100(blockNr rpc.BlockNumber) (bool, error) { + i := uint64(blockNr.Int64()) + err := api.eth.blockchain.Config().SetECBP1100Transition(&i) + return api.eth.blockchain.IsArtificialFinalityEnabled() && api.eth.blockchain.Config().IsEnabled(api.eth.blockchain.Config().GetECBP1100Transition, api.eth.blockchain.CurrentBlock().Number()), err +} +``` +View on GitHub → +

+
+ +--- + + + +### admin_exportChain + +ExportChain exports the current blockchain into a local file, +or a range of blocks if first and last are non-nil + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +first *uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +last *uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_exportChain", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.exportChain(file,first,last); + ``` + + +
Source code +

+```go +func (api *PrivateAdminAPI) ExportChain(file string, first *uint64, last *uint64) (bool, error) { + if first == nil && last != nil { + return false, errors.New("last cannot be specified without first") + } + if first != nil && last == nil { + head := api.eth.BlockChain().CurrentHeader().Number.Uint64() + last = &head + } + if _, err := os.Stat(file); err == nil { + return false, errors.New("location would overwrite an existing file") + } + out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm) + if err != nil { + return false, err + } + defer out.Close() + var writer io.Writer = out + if strings.HasSuffix(file, ".gz") { + writer = gzip.NewWriter(writer) + defer writer.(*gzip.Writer).Close() + } + if first != nil { + if err := api.eth.BlockChain().ExportN(writer, *first, *last); err != nil { + return false, err + } + } else if err := api.eth.BlockChain().Export(writer); err != nil { + return false, err + } + return true, nil +}// ExportChain exports the current blockchain into a local file, +// or a range of blocks if first and last are non-nil + +``` +View on GitHub → +

+
+ +--- + + + +### admin_importChain + +ImportChain imports a blockchain from a local file. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_importChain", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.importChain(file); + ``` + + +
Source code +

+```go +func (api *PrivateAdminAPI) ImportChain(file string) (bool, error) { + in, err := os.Open(file) + if err != nil { + return false, err + } + defer in.Close() + var reader io.Reader = in + if strings.HasSuffix(file, ".gz") { + if reader, err = gzip.NewReader(reader); err != nil { + return false, err + } + } + stream := rlp.NewStream(reader, 0) + blocks, index := make([ // ImportChain imports a blockchain from a local file. + ]*types.Block, 0, 2500), 0 + for batch := 0; ; batch++ { + for len(blocks) < cap(blocks) { + block := new(types.Block) + if err := stream.Decode(block); err == io.EOF { + break + } else if err != nil { + return false, fmt.Errorf("block %d: failed to parse: %v", index, err) + } + blocks = append(blocks, block) + index++ + } + if len(blocks) == 0 { + break + } + if hasAllBlocks(api.eth.BlockChain(), blocks) { + blocks = blocks[:0] + continue + } + if _, err := api.eth.BlockChain().InsertChain(blocks); err != nil { + return false, fmt.Errorf("batch %d: failed to insert: %v", batch, err) + } + blocks = blocks[:0] + } + return true, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### admin_maxPeers + +MaxPeers sets the maximum peer limit for the protocol manager and the p2p server. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +n int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + - description: `Hex representation of the integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_maxPeers", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.maxPeers(n); + ``` + + +
Source code +

+```go +func (api *PrivateAdminAPI) MaxPeers(n int) (bool, error) { + api.eth.protocolManager.maxPeers = n + api.eth.p2pServer.MaxPeers = n + for i := api.eth.protocolManager.peers.Len(); i > n; i = api.eth.protocolManager.peers.Len() { + p := api.eth.protocolManager.peers.WorstPeer() + if p == nil { + break + } + api.eth.protocolManager.removePeer(p.id) + } + return true, nil +}// MaxPeers sets the maximum peer limit for the protocol manager and the p2p server. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_nodeInfo + +NodeInfo retrieves all the information we know about the host node at the +protocol granularity. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +*p2p.NodeInfo + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - protocols: + - additionalProperties: `false` + - properties: + - discovery: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - listener: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + + - type: `object` + + - 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: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_nodeInfo", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.nodeInfo(); + ``` + + +
Source code +

+```go +func (api *publicAdminAPI) NodeInfo() (*p2p.NodeInfo, error) { + server := api.node.Server() + if server == nil { + return nil, ErrNodeStopped + } + return server.NodeInfo(), nil +}// NodeInfo retrieves all the information we know about the host node at the +// protocol granularity. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_peers + +Peers retrieves all the information we know about each individual peer at the +protocol granularity. + + +__Params (0)__ + +_None_ + +__Result__ + + + +p2pPeerInfo []*p2p.PeerInfo + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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: + - static: + - type: `boolean` + + - trusted: + - type: `boolean` + + - inbound: + - type: `boolean` + + - localAddress: + - type: `string` + + - remoteAddress: + - type: `string` + + + - type: `object` + + - protocols: + - type: `object` + - additionalProperties: `false` + - properties: + - inbound: + - type: `boolean` + + - localAddress: + - type: `string` + + - remoteAddress: + - type: `string` + + - static: + - type: `boolean` + + - trusted: + - type: `boolean` + + + + + - type: object + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_peers", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.peers(); + ``` + + +
Source code +

+```go +func (api *publicAdminAPI) Peers() ([ // Peers retrieves all the information we know about each individual peer at the +// protocol granularity. +]*p2p.PeerInfo, error) { + server := api.node.Server() + if server == nil { + return nil, ErrNodeStopped + } + return server.PeersInfo(), nil +} +``` +View on GitHub → +

+
+ +--- + + + +### admin_removePeer + +RemovePeer disconnects from a remote node if the connection exists + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removePeer", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.removePeer(url); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) RemovePeer(url string) (bool, error) { + server := api.node.Server() + if server == nil { + return false, ErrNodeStopped + } + node, err := enode.Parse(enode.ValidSchemes, url) + if err != nil { + return false, fmt.Errorf("invalid enode: %v", err) + } + server.RemovePeer(node) + return true, nil +}// RemovePeer disconnects from a remote node if the connection exists + +``` +View on GitHub → +

+
+ +--- + + + +### admin_removeTrustedPeer + +RemoveTrustedPeer removes a remote node from the trusted peer set, but it +does not disconnect it automatically. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removeTrustedPeer", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.removeTrustedPeer(url); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) RemoveTrustedPeer(url string) (bool, error) { + server := api.node.Server() + if server == nil { + return false, ErrNodeStopped + } + node, err := enode.Parse(enode.ValidSchemes, url) + if err != nil { + return false, fmt.Errorf("invalid enode: %v", err) + } + server.RemoveTrustedPeer(node) + return true, nil +}// RemoveTrustedPeer removes a remote node from the trusted peer set, but it +// does not disconnect it automatically. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_startRPC + +StartRPC starts the HTTP RPC API server. + + +__Params (5)__ + +Parameters must be given _by position_. + + +__1:__ +host *string + + + Required: ✓ Yes + + + + + +__2:__ +port *int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +cors *string + + + Required: ✓ Yes + + + + + +__4:__ +apis *string + + + Required: ✓ Yes + + + + + +__5:__ +vhosts *string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startRPC", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.startRPC(host,port,cors,apis,vhosts); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) StartRPC(host *string, port *int, cors *string, apis *string, vhosts *string) (bool, error) { + api.node.lock.Lock() + defer api.node.lock.Unlock() + if host == nil { + h := DefaultHTTPHost + if api.node.config.HTTPHost != "" { + h = api.node.config.HTTPHost + } + host = &h + } + if port == nil { + port = &api.node.config.HTTPPort + } + config := httpConfig{CorsAllowedOrigins: api.node.config.HTTPCors, Vhosts: api.node.config.HTTPVirtualHosts, Modules: api.node.config.HTTPModules} + if cors != nil { + config.CorsAllowedOrigins = nil + for _, origin := // StartRPC starts the HTTP RPC API server. + range strings.Split(*cors, ",") { + config.CorsAllowedOrigins = append(config.CorsAllowedOrigins, strings.TrimSpace(origin)) + } + } + if vhosts != nil { + config.Vhosts = nil + for _, vhost := range strings.Split(*host, ",") { + config.Vhosts = append(config.Vhosts, strings.TrimSpace(vhost)) + } + } + if apis != nil { + config.Modules = nil + for _, m := range strings.Split(*apis, ",") { + config.Modules = append(config.Modules, strings.TrimSpace(m)) + } + } + if err := api.node.http.setListenAddr(*host, *port); err != nil { + return false, err + } + if err := api.node.http.enableRPC(api.node.rpcAPIs, config); err != nil { + return false, err + } + if err := api.node.http.start(); err != nil { + return false, err + } + return true, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### admin_startWS + +StartWS starts the websocket RPC API server. + + +__Params (4)__ + +Parameters must be given _by position_. + + +__1:__ +host *string + + + Required: ✓ Yes + + + + + +__2:__ +port *int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +allowedOrigins *string + + + Required: ✓ Yes + + + + + +__4:__ +apis *string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startWS", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.startWS(host,port,allowedOrigins,apis); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) StartWS(host *string, port *int, allowedOrigins *string, apis *string) (bool, error) { + api.node.lock.Lock() + defer api.node.lock.Unlock() + if host == nil { + h := DefaultWSHost + if api.node.config.WSHost != "" { + h = api.node.config.WSHost + } + host = &h + } + if port == nil { + port = &api.node.config.WSPort + } + config := wsConfig{Modules: api.node.config.WSModules, Origins: api.node.config.WSOrigins} + if apis != nil { + config.Modules = nil + for _, m := // StartWS starts the websocket RPC API server. + range strings.Split(*apis, ",") { + config.Modules = append(config.Modules, strings.TrimSpace(m)) + } + } + if allowedOrigins != nil { + config.Origins = nil + for _, origin := range strings.Split(*allowedOrigins, ",") { + config.Origins = append(config.Origins, strings.TrimSpace(origin)) + } + } + server := api.node.wsServerForPort(*port) + if err := server.setListenAddr(*host, *port); err != nil { + return false, err + } + if err := server.enableWS(api.node.rpcAPIs, config); err != nil { + return false, err + } + if err := server.start(); err != nil { + return false, err + } + api.node.http.log.Info("WebSocket endpoint opened", "url", api.node.WSEndpoint()) + return true, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### admin_stopRPC + +StopRPC shuts down the HTTP server. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_stopRPC", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.stopRPC(); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) StopRPC() (bool, error) { + api.node.http.stop() + return true, nil +}// StopRPC shuts down the HTTP server. + +``` +View on GitHub → +

+
+ +--- + + + +### admin_stopWS + +StopWS terminates all WebSocket servers. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_stopWS", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + admin.stopWS(); + ``` + + +
Source code +

+```go +func (api *privateAdminAPI) StopWS() (bool, error) { + api.node.http.stopWS() + api.node.ws.stop() + return true, nil +}// StopWS terminates all WebSocket servers. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/debug.md b/docs/JSON-RPC-API/modules/debug.md new file mode 100755 index 0000000000..02da9a3868 --- /dev/null +++ b/docs/JSON-RPC-API/modules/debug.md @@ -0,0 +1,6659 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### debug_accountRange + +AccountRange enumerates all accounts in the given block and start point in paging request + + +__Params (6)__ + +Parameters must be given _by position_. + + +__1:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + +__2:__ +start []byte + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a variable length byte array` + - pattern: `^0x([a-fA-F0-9]?)+$` + - type: string + - title: `bytes` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a variable length byte array", + "pattern": "^0x([a-fA-F0-9]?)+$", + "title": "bytes", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +maxResults int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__4:__ +nocode bool + + + Required: ✓ Yes + + + + + +__5:__ +nostorage bool + + + Required: ✓ Yes + + + + + +__6:__ +incompletes bool + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +state.IteratorDump + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - accounts: + - patternProperties: + - .*: + - type: `object` + - additionalProperties: `false` + - properties: + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - root: + - type: `string` + + - storage: + - type: `object` + - patternProperties: + - .*: + - type: `string` + + + + - 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` + + + + + - type: `object` + + - next: + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: `string` + + - root: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_accountRange", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.accountRange(blockNrOrHash,start,maxResults,nocode,nostorage,incompletes); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, start [ // AccountRange enumerates all accounts in the given block and start point in paging request +]byte, maxResults int, nocode, nostorage, incompletes bool) (state.IteratorDump, error) { + var stateDb *state.StateDB + var err error + if number, ok := blockNrOrHash.Number(); ok { + if number == rpc.PendingBlockNumber { + _, stateDb = api.eth.miner.Pending() + } else { + var block *types.Block + if number == rpc.LatestBlockNumber { + block = api.eth.blockchain.CurrentBlock() + } else { + block = api.eth.blockchain.GetBlockByNumber(uint64(number)) + } + if block == nil { + return state.IteratorDump{}, fmt.Errorf("block #%d not found", number) + } + stateDb, err = api.eth.BlockChain().StateAt(block.Root()) + if err != nil { + return state.IteratorDump{}, err + } + } + } else if hash, ok := blockNrOrHash.Hash(); ok { + block := api.eth.blockchain.GetBlockByHash(hash) + if block == nil { + return state.IteratorDump{}, fmt.Errorf("block %s not found", hash.Hex()) + } + stateDb, err = api.eth.BlockChain().StateAt(block.Root()) + if err != nil { + return state.IteratorDump{}, err + } + } else { + return state.IteratorDump{}, errors.New("either block number or block hash must be specified") + } + if maxResults > AccountRangeMaxResults || maxResults <= 0 { + maxResults = AccountRangeMaxResults + } + return stateDb.IteratorDump(nocode, nostorage, incompletes, start, maxResults), nil +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_backtraceAt + +BacktraceAt sets the log backtrace location. See package log for details on +the pattern syntax. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +location string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_backtraceAt", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.backtraceAt(location); + ``` + + +
Source code +

+```go +func (*HandlerT) BacktraceAt(location string) error { + return glogger.BacktraceAt(location) +}// BacktraceAt sets the log backtrace location. See package log for details on +// the pattern syntax. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_blockProfile + +BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to +file. It uses a profile rate of 1 for most accurate information. If a different rate is +desired, set the rate and write the profile manually. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +nsec uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_blockProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.blockProfile(file,nsec); + ``` + + +
Source code +

+```go +func (*HandlerT) BlockProfile(file string, nsec uint) error { + runtime.SetBlockProfileRate(1) + time.Sleep(time.Duration(nsec) * time.Second) + defer runtime.SetBlockProfileRate(0) + return writeProfile("block", file) +}// BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to +// file. It uses a profile rate of 1 for most accurate information. If a different rate is +// desired, set the rate and write the profile manually. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_chaindbCompact + +ChaindbCompact flattens the entire key-value database into a single level, +removing all unused slots and merging all keys. + + +__Params (0)__ + +_None_ + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_chaindbCompact", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.chaindbCompact(); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) ChaindbCompact() error { + for b := byte(0); b < 255; b++ { + log.Info("Compacting chain database", "range", fmt.Sprintf("0x%0.2X-0x%0.2X", b, b+1)) + if err := api.b.ChainDb().Compact([ // ChaindbCompact flattens the entire key-value database into a single level, + // removing all unused slots and merging all keys. + ]byte{b}, []byte{b + 1}); err != nil { + log.Error("Database compaction failed", "err", err) + return err + } + } + return nil +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_chaindbProperty + +ChaindbProperty returns leveldb properties of the key-value database. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +property string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_chaindbProperty", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.chaindbProperty(property); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) ChaindbProperty(property string) (string, error) { + if property == "" { + property = "leveldb.stats" + } else if !strings.HasPrefix(property, "leveldb.") { + property = "leveldb." + property + } + return api.b.ChainDb().Stat(property) +}// ChaindbProperty returns leveldb properties of the key-value database. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_cpuProfile + +CpuProfile turns on CPU profiling for nsec seconds and writes +profile data to file. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +nsec uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_cpuProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.cpuProfile(file,nsec); + ``` + + +
Source code +

+```go +func (h *HandlerT) CpuProfile(file string, nsec uint) error { + if err := h.StartCPUProfile(file); err != nil { + return err + } + time.Sleep(time.Duration(nsec) * time.Second) + h.StopCPUProfile() + return nil +}// CpuProfile turns on CPU profiling for nsec seconds and writes +// profile data to file. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_dumpBlock + +DumpBlock retrieves the entire state of the database at a given block. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `blockNumberIdentifier` + - oneOf: + + - title: `blockNumberTag` + - description: `The block height description` + - enum: earliest, latest, pending + - type: string + + + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint64` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + + +__Result__ + + + + +state.Dump + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - accounts: + - patternProperties: + - .*: + - properties: + - nonce: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - root: + - type: `string` + + - storage: + - patternProperties: + - .*: + - type: `string` + + + - type: `object` + + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - balance: + - type: `string` + + - code: + - type: `string` + + - codeHash: + - type: `string` + + - key: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + + - type: `object` + - additionalProperties: `false` + + + - type: `object` + + - root: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_dumpBlock", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.dumpBlock(blockNr); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error) { + if blockNr == rpc.PendingBlockNumber { + _, stateDb := api.eth.miner.Pending() + return stateDb.RawDump(false, false, true), nil + } + var block *types.Block + if blockNr == rpc.LatestBlockNumber { + block = api.eth.blockchain.CurrentBlock() + } else { + block = api.eth.blockchain.GetBlockByNumber(uint64(blockNr)) + } + if block == nil { + return state.Dump{}, fmt.Errorf("block #%d not found", blockNr) + } + stateDb, err := api.eth.BlockChain().StateAt(block.Root()) + if err != nil { + return state.Dump{}, err + } + return stateDb.RawDump(false, false, true), nil +}// DumpBlock retrieves the entire state of the database at a given block. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_freeOSMemory + +FreeOSMemory forces a garbage collection. + + +__Params (0)__ + +_None_ + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_freeOSMemory", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.freeOSMemory(); + ``` + + +
Source code +

+```go +func (*HandlerT) FreeOSMemory() { + debug.FreeOSMemory() +}// FreeOSMemory forces a garbage collection. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_gcStats + +GcStats returns GC statistics. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +*debug.GCStats + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - PauseTotal: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - LastGC: + - type: `string` + - format: `date-time` + + - NumGC: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Pause: + - items: + - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - type: `array` + + - PauseEnd: + - items: + - format: `date-time` + - type: `string` + + - type: `array` + + - PauseQuantiles: + - type: `array` + - items: + - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_gcStats", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.gcStats(); + ``` + + +
Source code +

+```go +func (*HandlerT) GcStats() *debug.GCStats { + s := new(debug.GCStats) + debug.ReadGCStats(s) + return s +}// GcStats returns GC statistics. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_getBadBlocks + +GetBadBlocks returns a list of the last 'bad blocks' that the client has seen on the network +and returns them as a JSON list of block-hashes + + +__Params (0)__ + +_None_ + +__Result__ + + + +BadBlockArgs []*BadBlockArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - additionalProperties: `false` + - properties: + - block: + - additionalProperties: `false` + - properties: + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - gasLimit: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - timestamp: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - 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` + + - error: + - type: `string` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - 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` + + - parentHash: + - 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` + + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - logsBloom: + - maxItems: `256` + - minItems: `256` + - type: `array` + - items: + - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: `object` + + - hash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - rlp: + - type: `string` + + + - type: object + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getBadBlocks", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.getBadBlocks(); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([ // GetBadBlocks returns a list of the last 'bad blocks' that the client has seen on the network +// and returns them as a JSON list of block-hashes +]*BadBlockArgs, error) { + blocks := api.eth.BlockChain().BadBlocks() + results := make([]*BadBlockArgs, len(blocks)) + var err error + for i, block := range blocks { + results[i] = &BadBlockArgs{Hash: block.Hash()} + if rlpBytes, err := rlp.EncodeToBytes(block); err != nil { + results[i].RLP = err.Error() + } else { + results[i].RLP = fmt.Sprintf("0x%x", rlpBytes) + } + if results[i].Block, err = ethapi.RPCMarshalBlock(block, true, true); err != nil { + results[i].Block = ðapi.RPCMarshalBlockT{Error: err.Error()} + } + } + return results, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_getBlockRlp + +GetBlockRlp retrieves the RLP encoded for of a single block. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +number uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getBlockRlp", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.getBlockRlp(number); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) GetBlockRlp(ctx context.Context, number uint64) (string, error) { + block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number)) + if block == nil { + return "", fmt.Errorf("block #%d not found", number) + } + encoded, err := rlp.EncodeToBytes(block) + if err != nil { + return "", err + } + return fmt.Sprintf("%x", encoded), nil +}// GetBlockRlp retrieves the RLP encoded for of a single block. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_getModifiedAccountsByHash + +GetModifiedAccountsByHash returns all accounts that have changed between the +two blocks specified. A change is defined as a difference in nonce, balance, +code hash, or storage hash. + +With one parameter, returns the list of accounts modified in the specified block. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +startHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +endHash *common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + +commonAddress []common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.getModifiedAccountsByHash(startHash,endHash); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([ // GetModifiedAccountsByHash returns all accounts that have changed between the +// two blocks specified. A change is defined as a difference in nonce, balance, +// code hash, or storage hash. +// +// With one parameter, returns the list of accounts modified in the specified block. +]common.Address, error) { + var startBlock, endBlock *types.Block + startBlock = api.eth.blockchain.GetBlockByHash(startHash) + if startBlock == nil { + return nil, fmt.Errorf("start block %x not found", startHash) + } + if endHash == nil { + endBlock = startBlock + startBlock = api.eth.blockchain.GetBlockByHash(startBlock.ParentHash()) + if startBlock == nil { + return nil, fmt.Errorf("block %x has no parent", endBlock.Number()) + } + } else { + endBlock = api.eth.blockchain.GetBlockByHash(*endHash) + if endBlock == nil { + return nil, fmt.Errorf("end block %x not found", *endHash) + } + } + return api.getModifiedAccounts(startBlock, endBlock) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_getModifiedAccountsByNumber + +GetModifiedAccountsByNumber returns all accounts that have changed between the +two blocks specified. A change is defined as a difference in nonce, balance, +code hash, or storage hash. + +With one parameter, returns the list of accounts modified in the specified block. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +startNum uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +endNum *uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + +commonAddress []common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.getModifiedAccountsByNumber(startNum,endNum); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([ // GetModifiedAccountsByNumber returns all accounts that have changed between the +// two blocks specified. A change is defined as a difference in nonce, balance, +// code hash, or storage hash. +// +// With one parameter, returns the list of accounts modified in the specified block. +]common.Address, error) { + var startBlock, endBlock *types.Block + startBlock = api.eth.blockchain.GetBlockByNumber(startNum) + if startBlock == nil { + return nil, fmt.Errorf("start block %x not found", startNum) + } + if endNum == nil { + endBlock = startBlock + startBlock = api.eth.blockchain.GetBlockByHash(startBlock.ParentHash()) + if startBlock == nil { + return nil, fmt.Errorf("block %x has no parent", endBlock.Number()) + } + } else { + endBlock = api.eth.blockchain.GetBlockByNumber(*endNum) + if endBlock == nil { + return nil, fmt.Errorf("end block %d not found", *endNum) + } + } + return api.getModifiedAccounts(startBlock, endBlock) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_goTrace + +GoTrace turns on tracing for nsec seconds and writes +trace data to file. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +nsec uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_goTrace", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.goTrace(file,nsec); + ``` + + +
Source code +

+```go +func (h *HandlerT) GoTrace(file string, nsec uint) error { + if err := h.StartGoTrace(file); err != nil { + return err + } + time.Sleep(time.Duration(nsec) * time.Second) + h.StopGoTrace() + return nil +}// GoTrace turns on tracing for nsec seconds and writes +// trace data to file. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_memStats + +MemStats returns detailed runtime memory statistics. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +*runtime.MemStats + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - HeapInuse: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - MSpanInuse: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - NumForcedGC: + - 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` + + - TotalAlloc: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - BuckHashSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Lookups: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - OtherSys: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Frees: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - HeapAlloc: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - LastGC: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - NextGC: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - PauseNs: + - minItems: `256` + - type: `array` + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - maxItems: `256` + + - StackInuse: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - BySize: + - minItems: `61` + - type: `array` + - items: + - additionalProperties: `false` + - properties: + - Frees: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Mallocs: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Size: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - type: `object` + + - maxItems: `61` + + - Sys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - StackSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - HeapIdle: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - HeapReleased: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - NumGC: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - PauseTotalNs: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - DebugGC: + - type: `boolean` + + - HeapSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - EnableGC: + - type: `boolean` + + - GCSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - HeapObjects: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - MCacheInuse: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - MSpanSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Mallocs: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - GCCPUFraction: + - type: `number` + + - MCacheSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Alloc: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_memStats", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.memStats(); + ``` + + +
Source code +

+```go +func (*HandlerT) MemStats() *runtime.MemStats { + s := new(runtime.MemStats) + runtime.ReadMemStats(s) + return s +}// MemStats returns detailed runtime memory statistics. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_mutexProfile + +MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. +It uses a profile rate of 1 for most accurate information. If a different rate is +desired, set the rate and write the profile manually. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +nsec uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_mutexProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.mutexProfile(file,nsec); + ``` + + +
Source code +

+```go +func (*HandlerT) MutexProfile(file string, nsec uint) error { + runtime.SetMutexProfileFraction(1) + time.Sleep(time.Duration(nsec) * time.Second) + defer runtime.SetMutexProfileFraction(0) + return writeProfile("mutex", file) +}// MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. +// It uses a profile rate of 1 for most accurate information. If a different rate is +// desired, set the rate and write the profile manually. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_preimage + +Preimage is a debug API function that returns the preimage for a sha3 hash, if known. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_preimage", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.preimage(hash); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) Preimage(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) { + if preimage := rawdb.ReadPreimage(api.eth.ChainDb(), hash); preimage != nil { + return preimage, nil + } + return nil, errors.New("unknown preimage") +}// Preimage is a debug API function that returns the preimage for a sha3 hash, if known. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_printBlock + +PrintBlock retrieves a block and returns its pretty printed form. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +number uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_printBlock", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.printBlock(number); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (string, error) { + block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number)) + if block == nil { + return "", fmt.Errorf("block #%d not found", number) + } + return spew.Sdump(block), nil +}// PrintBlock retrieves a block and returns its pretty printed form. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_removePendingTransaction + +RemovePendingTransaction removes a transaction from the txpool. +It returns the transaction removed, if any. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*types.Transaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "additionalProperties": false, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_removePendingTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.removePendingTransaction(hash); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) RemovePendingTransaction(hash common.Hash) (*types.Transaction, error) { + return api.eth.txPool.RemoveTx(hash), nil +}// RemovePendingTransaction removes a transaction from the txpool. +// It returns the transaction removed, if any. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_seedHash + +SeedHash retrieves the seed hash of a block. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +number uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_seedHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.seedHash(number); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) SeedHash(ctx context.Context, number uint64) (string, error) { + block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number)) + if block == nil { + return "", fmt.Errorf("block #%d not found", number) + } + ecip1099FBlock := api.b.ChainConfig().GetEthashECIP1099Transition() + epochLength := ethash.CalcEpochLength(number, ecip1099FBlock) + epoch := ethash.CalcEpoch(number, epochLength) + return fmt.Sprintf("0x%x", ethash.SeedHash(epoch, epochLength)), nil +}// SeedHash retrieves the seed hash of a block. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_setBlockProfileRate + +SetBlockProfileRate sets the rate of goroutine block profile data collection. +rate 0 disables block profiling. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +rate int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setBlockProfileRate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.setBlockProfileRate(rate); + ``` + + +
Source code +

+```go +func (*HandlerT) SetBlockProfileRate(rate int) { + runtime.SetBlockProfileRate(rate) +}// SetBlockProfileRate sets the rate of goroutine block profile data collection. +// rate 0 disables block profiling. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_setGCPercent + +SetGCPercent sets the garbage collection target percentage. It returns the previous +setting. A negative value disables GC. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +v int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + - description: `Hex representation of the integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setGCPercent", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.setGCPercent(v); + ``` + + +
Source code +

+```go +func (*HandlerT) SetGCPercent(v int) int { + return debug.SetGCPercent(v) +}// SetGCPercent sets the garbage collection target percentage. It returns the previous +// setting. A negative value disables GC. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_setHead + +SetHead rewinds the head of the blockchain to a previous block. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +number hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setHead", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.setHead(number); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) SetHead(number hexutil.Uint64) { + api.b.SetHead(uint64(number)) +}// SetHead rewinds the head of the blockchain to a previous block. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_setMutexProfileFraction + +SetMutexProfileFraction sets the rate of mutex profiling. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +rate int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setMutexProfileFraction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.setMutexProfileFraction(rate); + ``` + + +
Source code +

+```go +func (*HandlerT) SetMutexProfileFraction(rate int) { + runtime.SetMutexProfileFraction(rate) +}// SetMutexProfileFraction sets the rate of mutex profiling. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_stacks + +Stacks returns a printed representation of the stacks of all goroutines. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_stacks", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.stacks(); + ``` + + +
Source code +

+```go +func (*HandlerT) Stacks() string { + buf := new(bytes.Buffer) + pprof.Lookup("goroutine").WriteTo(buf, 2) + return buf.String() +}// Stacks returns a printed representation of the stacks of all goroutines. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_standardTraceBadBlockToFile + +StandardTraceBadBlockToFile dumps the structured logs created during the +execution of EVM against a block pulled from the pool of bad ones to the +local file system and returns a list of files to the caller. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *StdTraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - 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` + + - DisableStack: + - type: `boolean` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +string []string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: array + - items: + + - type: string + + + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBadBlockToFile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.standardTraceBadBlockToFile(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) StandardTraceBadBlockToFile(ctx context.Context, hash common.Hash, config *StdTraceConfig) ([ // StandardTraceBadBlockToFile dumps the structured logs created during the +// execution of EVM against a block pulled from the pool of bad ones to the +// local file system and returns a list of files to the caller. +]string, error) { + blocks := api.eth.blockchain.BadBlocks() + for _, block := range blocks { + if block.Hash() == hash { + return api.standardTraceBlockToFile(ctx, block, config) + } + } + return nil, fmt.Errorf("bad block %#x not found", hash) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_standardTraceBlockToFile + +StandardTraceBlockToFile dumps the structured logs created during the +execution of EVM to the local file system and returns a list of files +to the caller. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *StdTraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - Debug: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - 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` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +string []string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - type: string + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBlockToFile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.standardTraceBlockToFile(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) StandardTraceBlockToFile(ctx context.Context, hash common.Hash, config *StdTraceConfig) ([ // StandardTraceBlockToFile dumps the structured logs created during the +// execution of EVM to the local file system and returns a list of files +// to the caller. +]string, error) { + block := api.eth.blockchain.GetBlockByHash(hash) + if block == nil { + return nil, fmt.Errorf("block %#x not found", hash) + } + return api.standardTraceBlockToFile(ctx, block, config) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_startCPUProfile + +StartCPUProfile turns on CPU profiling, writing to the given file. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startCPUProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.startCPUProfile(file); + ``` + + +
Source code +

+```go +func (h *HandlerT) StartCPUProfile(file string) error { + h.mu.Lock() + defer h.mu.Unlock() + if h.cpuW != nil { + return errors.New("CPU profiling already in progress") + } + f, err := os.Create(expandHome(file)) + if err != nil { + return err + } + if err := pprof.StartCPUProfile(f); err != nil { + f.Close() + return err + } + h.cpuW = f + h.cpuFile = file + log.Info("CPU profiling started", "dump", h.cpuFile) + return nil +}// StartCPUProfile turns on CPU profiling, writing to the given file. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_startGoTrace + +StartGoTrace turns on tracing, writing to the given file. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startGoTrace", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.startGoTrace(file); + ``` + + +
Source code +

+```go +func (h *HandlerT) StartGoTrace(file string) error { + h.mu.Lock() + defer h.mu.Unlock() + if h.traceW != nil { + return errors.New("trace already in progress") + } + f, err := os.Create(expandHome(file)) + if err != nil { + return err + } + if err := trace.Start(f); err != nil { + f.Close() + return err + } + h.traceW = f + h.traceFile = file + log.Info("Go tracing started", "dump", h.traceFile) + return nil +}// StartGoTrace turns on tracing, writing to the given file. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_stopCPUProfile + +StopCPUProfile stops an ongoing CPU profile. + + +__Params (0)__ + +_None_ + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_stopCPUProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.stopCPUProfile(); + ``` + + +
Source code +

+```go +func (h *HandlerT) StopCPUProfile() error { + h.mu.Lock() + defer h.mu.Unlock() + pprof.StopCPUProfile() + if h.cpuW == nil { + return errors.New("CPU profiling not in progress") + } + log.Info("Done writing CPU profile", "dump", h.cpuFile) + h.cpuW.Close() + h.cpuW = nil + h.cpuFile = "" + return nil +}// StopCPUProfile stops an ongoing CPU profile. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_stopGoTrace + +StopTrace stops an ongoing trace. + + +__Params (0)__ + +_None_ + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_stopGoTrace", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.stopGoTrace(); + ``` + + +
Source code +

+```go +func (h *HandlerT) StopGoTrace() error { + h.mu.Lock() + defer h.mu.Unlock() + trace.Stop() + if h.traceW == nil { + return errors.New("trace not in progress") + } + log.Info("Done writing Go trace", "dump", h.traceFile) + h.traceW.Close() + h.traceW = nil + h.traceFile = "" + return nil +}// StopTrace stops an ongoing trace. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_storageRangeAt + +StorageRangeAt returns the storage at the given block height and transaction index. + + +__Params (5)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +txIndex int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +contractAddress common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__4:__ +keyStart hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + +__5:__ +maxResult int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +StorageRangeResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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 + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_storageRangeAt", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.storageRangeAt(blockHash,txIndex,contractAddress,keyStart,maxResult); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) StorageRangeAt(blockHash common.Hash, txIndex int, contractAddress common.Address, keyStart hexutil.Bytes, maxResult int) (StorageRangeResult, error) { + block := api.eth.blockchain.GetBlockByHash(blockHash) + if block == nil { + return StorageRangeResult{}, fmt.Errorf("block %#x not found", blockHash) + } + _, _, statedb, err := api.computeTxEnv(block, txIndex, 0) + if err != nil { + return StorageRangeResult{}, err + } + st := statedb.StorageTrie(contractAddress) + if st == nil { + return StorageRangeResult{}, fmt.Errorf("account %x doesn't exist", contractAddress) + } + return storageRangeAt(st, keyStart, maxResult) +}// StorageRangeAt returns the storage at the given block height and transaction index. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_testSignCliqueBlock + +TestSignCliqueBlock fetches the given block number, and attempts to sign it as a clique header with the +given address, returning the address of the recovered signature + +This is a temporary method to debug the externalsigner integration, +TODO: Remove this method when the integration is mature + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +number uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_testSignCliqueBlock", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.testSignCliqueBlock(address,number); + ``` + + +
Source code +

+```go +func (api *PublicDebugAPI) TestSignCliqueBlock(ctx context.Context, address common.Address, number uint64) (common.Address, error) { + block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number)) + if block == nil { + return common.Address{}, fmt.Errorf("block #%d not found", number) + } + header := block.Header() + header.Extra = make([ // TestSignCliqueBlock fetches the given block number, and attempts to sign it as a clique header with the + // given address, returning the address of the recovered signature + // + // This is a temporary method to debug the externalsigner integration, + // TODO: Remove this method when the integration is mature + ]byte, 32+65) + encoded := clique.CliqueRLP(header) + account := accounts.Account{Address: address} + wallet, err := api.b.AccountManager().Find(account) + if err != nil { + return common.Address{}, err + } + signature, err := wallet.SignData(account, accounts.MimetypeClique, encoded) + if err != nil { + return common.Address{}, err + } + sealHash := clique.SealHash(header).Bytes() + log.Info("test signing of clique block", "Sealhash", fmt.Sprintf("%x", sealHash), "signature", fmt.Sprintf("%x", signature)) + pubkey, err := crypto.Ecrecover(sealHash, signature) + if err != nil { + return common.Address{}, err + } + var signer common.Address + copy(signer[:], crypto.Keccak256(pubkey[1:])[12:]) + return signer, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceBadBlock + +TraceBadBlock returns the structured logs created during the execution of +EVM against a block pulled from the pool of bad ones and returns them as a JSON +object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Tracer: + - type: `string` + + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Timeout: + - type: `string` + + - overrides: + - additionalProperties: `true` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - additionalProperties: `false` + - properties: + - result: + - additionalProperties: `true` + + - error: + - type: `string` + + + - type: object + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBadBlock", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceBadBlock(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceBadBlock(ctx context.Context, hash common.Hash, config *TraceConfig) ([ // TraceBadBlock returns the structured logs created during the execution of +// EVM against a block pulled from the pool of bad ones and returns them as a JSON +// object. +]*txTraceResult, error) { + blocks := api.eth.blockchain.BadBlocks() + for _, block := range blocks { + if block.Hash() == hash { + return api.traceBlock(ctx, block, config) + } + } + return nil, fmt.Errorf("bad block %#x not found", hash) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceBlock + +TraceBlock returns the structured logs created during the execution of EVM +and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blob []byte + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `bytes` + - description: `Hex representation of a variable length byte array` + - pattern: `^0x([a-fA-F0-9]?)+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a variable length byte array", + "pattern": "^0x([a-fA-F0-9]?)+$", + "title": "bytes", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - properties: + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Timeout: + - type: `string` + + - Tracer: + - type: `string` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + + + - type: object + - additionalProperties: `false` + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - properties: + - error: + - type: `string` + + - result: + - additionalProperties: `true` + + + - type: object + - additionalProperties: `false` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlock", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceBlock(blob,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob [ // TraceBlock returns the structured logs created during the execution of EVM +// and returns them as a JSON object. +]byte, config *TraceConfig) ([]*txTraceResult, error) { + return traceBlockRLP(ctx, api.eth, blob, config) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceBlockByHash + +TraceBlockByHash returns the structured logs created during the execution of +EVM and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - Debug: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - DisableMemory: + - type: `boolean` + + - Reexec: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Timeout: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - properties: + - error: + - type: `string` + + - result: + - additionalProperties: `true` + + + - type: object + - additionalProperties: `false` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceBlockByHash(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, config *TraceConfig) ([ // TraceBlockByHash returns the structured logs created during the execution of +// EVM and returns them as a JSON object. +]*txTraceResult, error) { + block := api.eth.blockchain.GetBlockByHash(hash) + if block == nil { + return nil, fmt.Errorf("block %#x not found", hash) + } + return api.traceBlock(ctx, block, config) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceBlockByNumber + +TraceBlockByNumber returns the structured logs created during the execution of +EVM and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +number rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - oneOf: + + - title: `blockNumberTag` + - description: `The block height description` + - enum: earliest, latest, pending + - type: string + + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint64` + - description: `Hex representation of a uint64` + + + - title: `blockNumberIdentifier` + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - DisableStack: + - type: `boolean` + + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Tracer: + - type: `string` + + - DisableReturnData: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Timeout: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - properties: + - error: + - type: `string` + + - result: + - additionalProperties: `true` + + + - type: object + - additionalProperties: `false` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceBlockByNumber(number,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([ // TraceBlockByNumber returns the structured logs created during the execution of +// EVM and returns them as a JSON object. +]*txTraceResult, error) { + return traceBlockByNumber(ctx, api.eth, number, config) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceBlockFromFile + +TraceBlockFromFile returns the structured logs created during the execution of +EVM and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - Debug: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Reexec: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Timeout: + - type: `string` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: array + - items: + + - additionalProperties: `false` + - properties: + - error: + - type: `string` + + - result: + - additionalProperties: `true` + + + - type: object + + + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockFromFile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceBlockFromFile(file,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([ // TraceBlockFromFile returns the structured logs created during the execution of +// EVM and returns them as a JSON object. +]*txTraceResult, error) { + blob, err := ioutil.ReadFile(file) + if err != nil { + return nil, fmt.Errorf("could not read file: %v", err) + } + return api.TraceBlock(ctx, blob, config) +} +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceCall + +TraceCall lets you trace a given eth_call. It collects the structured logs created during the execution of EVM +if the given transaction was added on top of the provided block and returns them as a JSON object. +You can provide -2 as a block number to trace on top of the pending block. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +args ethapi.CallArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - value: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - data: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasPrice: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + +__3:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Timeout: + - type: `string` + + - DisableMemory: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Tracer: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +interface interface{} + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceCall", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceCall(args,blockNrOrHash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceConfig) (interface{}, error) { + statedb, header, err := api.eth.APIBackend.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if err != nil { + var block *types.Block + if hash, ok := blockNrOrHash.Hash(); ok { + block = api.eth.blockchain.GetBlockByHash(hash) + } else if number, ok := blockNrOrHash.Number(); ok { + block = api.eth.blockchain.GetBlockByNumber(uint64(number)) + } + if block == nil { + return nil, fmt.Errorf("block %v not found: %v", blockNrOrHash, err) + } + reexec := defaultTraceReexec + if config != nil && config.Reexec != nil { + reexec = *config.Reexec + } + _, _, statedb, err = api.computeTxEnv(block, 0, reexec) + if err != nil { + return nil, err + } + } + msg := args.ToMessage(api.eth.APIBackend.RPCGasCap()) + vmctx := core.NewEVMContext(msg, header, api.eth.blockchain, nil) + return api.traceTx(ctx, msg, vmctx, statedb, config) +}// TraceCall lets you trace a given eth_call. It collects the structured logs created during the execution of EVM +// if the given transaction was added on top of the provided block and returns them as a JSON object. +// You can provide -2 as a block number to trace on top of the pending block. +// Try to retrieve the specified block + +``` +View on GitHub → +

+
+ +--- + + + +### debug_traceTransaction + +TraceTransaction returns the structured logs created during the execution of EVM +and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - properties: + - DisableStorage: + - type: `boolean` + + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - DisableReturnData: + - type: `boolean` + + - Reexec: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Timeout: + - type: `string` + + + - type: object + - additionalProperties: `false` + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +interface interface{} + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.traceTransaction(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) { + return traceTransaction(ctx, api.eth, hash, config) +}// TraceTransaction returns the structured logs created during the execution of EVM +// and returns them as a JSON object. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_verbosity + +Verbosity sets the log verbosity ceiling. The verbosity of individual packages +and source files can be raised using Vmodule. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +level int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_verbosity", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.verbosity(level); + ``` + + +
Source code +

+```go +func (*HandlerT) Verbosity(level int) { + glogger.Verbosity(log.Lvl(level)) +}// Verbosity sets the log verbosity ceiling. The verbosity of individual packages +// and source files can be raised using Vmodule. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_vmodule + +Vmodule sets the log verbosity pattern. See package log for details on the +pattern syntax. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +pattern string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_vmodule", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.vmodule(pattern); + ``` + + +
Source code +

+```go +func (*HandlerT) Vmodule(pattern string) error { + return glogger.Vmodule(pattern) +}// Vmodule sets the log verbosity pattern. See package log for details on the +// pattern syntax. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_writeBlockProfile + +WriteBlockProfile writes a goroutine blocking profile to the given file. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeBlockProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.writeBlockProfile(file); + ``` + + +
Source code +

+```go +func (*HandlerT) WriteBlockProfile(file string) error { + return writeProfile("block", file) +}// WriteBlockProfile writes a goroutine blocking profile to the given file. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_writeMemProfile + +WriteMemProfile writes an allocation profile to the given file. +Note that the profiling rate cannot be set through the API, +it must be set on the command line. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMemProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.writeMemProfile(file); + ``` + + +
Source code +

+```go +func (*HandlerT) WriteMemProfile(file string) error { + return writeProfile("heap", file) +}// WriteMemProfile writes an allocation profile to the given file. +// Note that the profiling rate cannot be set through the API, +// it must be set on the command line. + +``` +View on GitHub → +

+
+ +--- + + + +### debug_writeMutexProfile + +WriteMutexProfile writes a goroutine blocking profile to the given file. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +file string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMutexProfile", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + debug.writeMutexProfile(file); + ``` + + +
Source code +

+```go +func (*HandlerT) WriteMutexProfile(file string) error { + return writeProfile("mutex", file) +}// WriteMutexProfile writes a goroutine blocking profile to the given file. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/eth.md b/docs/JSON-RPC-API/modules/eth.md new file mode 100755 index 0000000000..d4b183594f --- /dev/null +++ b/docs/JSON-RPC-API/modules/eth.md @@ -0,0 +1,9692 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### eth_accounts + +Accounts returns the collection of accounts this node manages + + +__Params (0)__ + +_None_ + +__Result__ + + + +commonAddress []common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_accounts", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.accounts(); + ``` + + +
Source code +

+```go +func (s *PublicAccountAPI) Accounts() [ // Accounts returns the collection of accounts this node manages +]common.Address { + return s.am.Accounts() +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_blockNumber + +BlockNumber returns the block number of the chain head. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint64` + - description: `Hex representation of a uint64` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_blockNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.blockNumber(); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) BlockNumber() hexutil.Uint64 { + header, _ := s.b.HeaderByNumber(context.Background(), rpc.LatestBlockNumber) + return hexutil.Uint64(header.Number.Uint64()) +}// BlockNumber returns the block number of the chain head. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_call + +Call executes the given transaction on the state for the given block number. + +Additionally, the caller can specify a batch of contract for fields overriding. + +Note, this function doesn't make and changes in the state/blockchain and is +useful to execute and retrieve values. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +args CallArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + +__3:__ +overrides *map[common.Address]account + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - patternProperties: + - .*: + - additionalProperties: `false` + - properties: + - 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` + + - balance: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_call", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.call(args,blockNrOrHash,overrides); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *map // Call executes the given transaction on the state for the given block number. +// +// Additionally, the caller can specify a batch of contract for fields overriding. +// +// Note, this function doesn't make and changes in the state/blockchain and is +// useful to execute and retrieve values. +[common.Address]account) (hexutil.Bytes, error) { + var accounts map[common.Address]account + if overrides != nil { + accounts = *overrides + } + result, err := DoCall(ctx, s.b, args, blockNrOrHash, accounts, vm.Config{}, 5*time.Second, s.b.RPCGasCap()) + if err != nil { + return nil, err + } + if len(result.Revert()) > 0 { + return nil, newRevertError(result) + } + return result.Return(), result.Err +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_chainId + +ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_chainId", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.chainId(); + ``` + + +
Source code +

+```go +func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 { + chainID := new(big.Int) + if config := api.e.blockchain.Config(); config.IsEnabled(config.GetEIP155Transition, api.e.blockchain.CurrentBlock().Number()) { + chainID = config.GetChainID() + } + return (hexutil.Uint64)(chainID.Uint64()) +}// ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_chainId + +ChainId returns the chainID value for transaction replay protection. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +*hexutil.Big + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_chainId", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.chainId(); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) ChainId() *hexutil.Big { + return (*hexutil.Big)(s.b.ChainConfig().GetChainID()) +}// ChainId returns the chainID value for transaction replay protection. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_coinbase + +Coinbase is the address that mining rewards will be send to (alias for Etherbase) + + +__Params (0)__ + +_None_ + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_coinbase", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.coinbase(); + ``` + + +
Source code +

+```go +func (api *PublicEthereumAPI) Coinbase() (common.Address, error) { + return api.Etherbase() +}// Coinbase is the address that mining rewards will be send to (alias for Etherbase) + +``` +View on GitHub → +

+
+ +--- + + + +### eth_estimateGas + +EstimateGas returns an estimate of the amount of gas needed to execute the +given transaction against the current pending block. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +args CallArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasPrice: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - data: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + - from: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +blockNrOrHash *rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint64` + - description: `Hex representation of a uint64` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_estimateGas", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.estimateGas(args,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs, blockNrOrHash *rpc.BlockNumberOrHash) (hexutil.Uint64, error) { + bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) + if blockNrOrHash != nil { + bNrOrHash = *blockNrOrHash + } + return DoEstimateGas(ctx, s.b, args, bNrOrHash, s.b.RPCGasCap()) +}// EstimateGas returns an estimate of the amount of gas needed to execute the +// given transaction against the current pending block. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_etherbase + +Etherbase is the address that mining rewards will be send to + + +__Params (0)__ + +_None_ + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_etherbase", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.etherbase(); + ``` + + +
Source code +

+```go +func (api *PublicEthereumAPI) Etherbase() (common.Address, error) { + return api.e.Etherbase() +}// Etherbase is the address that mining rewards will be send to + +``` +View on GitHub → +

+
+ +--- + + + +### eth_fillTransaction + +FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned transaction, +and returns it to the caller for further processing (signing + broadcast) + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - to: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - 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: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + + +*SignTransactionResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - raw: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + - tx: + - additionalProperties: `false` + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "additionalProperties": false, + "properties": { + "raw": { + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": "string" + }, + "tx": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_fillTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.fillTransaction(args); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) FillTransaction(ctx context.Context, args SendTxArgs) (*SignTransactionResult, error) { + if err := args.setDefaults(ctx, s.b); err != nil { + return nil, err + } + tx := args.toTransaction() + data, err := rlp.EncodeToBytes(tx) + if err != nil { + return nil, err + } + return &SignTransactionResult{data, tx}, nil +}// FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned transaction, +// and returns it to the caller for further processing (signing + broadcast) + +``` +View on GitHub → +

+
+ +--- + + + +### eth_gasPrice + +GasPrice returns a suggestion for a gas price. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +*hexutil.Big + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_gasPrice", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.gasPrice(); + ``` + + +
Source code +

+```go +func (s *PublicEthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) { + price, err := s.b.SuggestPrice(ctx) + return (*hexutil.Big)(price), err +}// GasPrice returns a suggestion for a gas price. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getBalance + +GetBalance returns the amount of wei for the given address in the state of the +given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta +block numbers are also allowed. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*hexutil.Big + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBalance", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getBalance(address,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetBalance(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error) { + state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if state == nil || err != nil { + return nil, err + } + return (*hexutil.Big)(state.GetBalance(address)), state.Error() +}// GetBalance returns the amount of wei for the given address in the state of the +// given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta +// block numbers are also allowed. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getBlockByHash + +GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full +detail, otherwise only the transaction hash is returned. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +fullTx bool + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*RPCMarshalBlockT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - hash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - parentHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - 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` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - uncles: + - items: + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - type: `array` + + - error: + - type: `string` + + - timestamp: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getBlockByHash(hash,fullTx); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, hash common.Hash, fullTx bool) (*RPCMarshalBlockT, error) { + block, err := s.b.BlockByHash(ctx, hash) + if block != nil { + return s.rpcMarshalBlock(ctx, block, true, fullTx) + } + return nil, err +}// GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full +// detail, otherwise only the transaction hash is returned. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getBlockByNumber + +GetBlockByNumber returns the requested canonical block. +* When blockNr is -1 the chain head is returned. +* When blockNr is -2 the pending chain head is returned. +* When fullTx is true all transactions in the block are returned, otherwise + only the transaction hash is returned. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +number rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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 + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +fullTx bool + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*RPCMarshalBlockT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - properties: + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - extraData: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - receiptsRoot: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - error: + - type: `string` + + - gasLimit: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - 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` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - uncles: + - items: + - title: `keccak` + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + - type: `array` + + + - type: object + - additionalProperties: `false` + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getBlockByNumber(number,fullTx); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (*RPCMarshalBlockT, error) { + block, err := s.b.BlockByNumber(ctx, number) + if block != nil && err == nil { + response, err := s.rpcMarshalBlock(ctx, block, true, fullTx) + if err == nil && number == rpc.PendingBlockNumber { + response.setAsPending() + } + return response, err + } + return nil, err +}// GetBlockByNumber returns the requested canonical block. +// * When blockNr is -1 the chain head is returned. +// * When blockNr is -2 the pending chain head is returned. +// * When fullTx is true all transactions in the block are returned, otherwise +// only the transaction hash is returned. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getBlockTransactionCountByHash + +GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getBlockTransactionCountByHash(blockHash); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint { + if block, _ := s.b.BlockByHash(ctx, blockHash); block != nil { + n := hexutil.Uint(len(block.Transactions())) + return &n + } + return nil +}// GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getBlockTransactionCountByNumber + +GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `blockNumberIdentifier` + - oneOf: + + - type: string + - title: `blockNumberTag` + - description: `The block height description` + - enum: earliest, latest, pending + + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + + +__Result__ + + + + +*hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getBlockTransactionCountByNumber(blockNr); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint { + if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil { + n := hexutil.Uint(len(block.Transactions())) + return &n + } + return nil +}// GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getCode + +GetCode returns the code stored at the given address in the state for the given block number. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getCode", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getCode(address,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error) { + state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if state == nil || err != nil { + return nil, err + } + code := state.GetCode(address) + return code, state.Error() +}// GetCode returns the code stored at the given address in the state for the given block number. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getFilterChanges + +GetFilterChanges returns the logs for the filter with the given id since +last time it was called. This can be used for polling. + +For pending transaction and block filters the result is []common.Hash. +(pending)Log filters return []Log. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +id rpc.ID + + + Required: ✓ Yes + + + + + + +__Result__ + + + +interface interface{} + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterChanges", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getFilterChanges(id); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) GetFilterChanges(id rpc.ID) (interface{}, error) { + api.filtersMu.Lock() + defer api.filtersMu.Unlock() + if f, found := api.filters[id]; found { + if !f.deadline.Stop() { + <-f.deadline.C + } + f.deadline.Reset(deadline) + switch f.typ { + case PendingTransactionsSubscription, BlocksSubscription, SideBlocksSubscription: + hashes := f.hashes + f.hashes = nil + return returnHashes(hashes), nil + case LogsSubscription, MinedAndPendingLogsSubscription: + logs := f.logs + f.logs = nil + return returnLogs(logs), nil + } + } + return [ // GetFilterChanges returns the logs for the filter with the given id since + // last time it was called. This can be used for polling. + // + // For pending transaction and block filters the result is []common.Hash. + // (pending)Log filters return []Log. + // + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges + ]interface{}{}, fmt.Errorf("filter not found") +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getFilterLogs + +GetFilterLogs returns the logs for the filter with the given id. +If the filter could not be found an empty array of logs is returned. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +id rpc.ID + + + Required: ✓ Yes + + + + + + +__Result__ + + + +typesLog []*types.Log + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - type: object + - additionalProperties: `false` + - properties: + - blockNumber: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - data: + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: `string` + + - topics: + - items: + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - type: `array` + + - removed: + - type: `boolean` + + - transactionHash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - transactionIndex: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - address: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logIndex: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterLogs", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getFilterLogs(id); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([ // GetFilterLogs returns the logs for the filter with the given id. +// If the filter could not be found an empty array of logs is returned. +// +// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs +]*types.Log, error) { + api.filtersMu.Lock() + f, found := api.filters[id] + api.filtersMu.Unlock() + if !found || f.typ != LogsSubscription { + return nil, fmt.Errorf("filter not found") + } + var filter *Filter + if f.crit.BlockHash != nil { + filter = NewBlockFilter(api.backend, *f.crit.BlockHash, f.crit.Addresses, f.crit.Topics) + } else { + begin := rpc.LatestBlockNumber.Int64() + if f.crit.FromBlock != nil { + begin = f.crit.FromBlock.Int64() + } + end := rpc.LatestBlockNumber.Int64() + if f.crit.ToBlock != nil { + end = f.crit.ToBlock.Int64() + } + filter = NewRangeFilter(api.backend, begin, end, f.crit.Addresses, f.crit.Topics) + } + logs, err := filter.Logs(ctx) + if err != nil { + return nil, err + } + return returnLogs(logs), nil +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getHashrate + +GetHashrate returns the current hashrate for local CPU miner and remote miner. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHashrate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getHashrate(); + ``` + + +
Source code +

+```go +func (api *API) GetHashrate() uint64 { + return uint64(api.ethash.Hashrate()) +}// GetHashrate returns the current hashrate for local CPU miner and remote miner. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getHeaderByHash + +GetHeaderByHash returns the requested header by hash. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCMarshalHeaderT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - 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` + + - logsBloom: + - type: `array` + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - maxItems: `256` + - minItems: `256` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getHeaderByHash(hash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetHeaderByHash(ctx context.Context, hash common.Hash) *RPCMarshalHeaderT { + header, _ := s.b.HeaderByHash(ctx, hash) + if header != nil { + return s.rpcMarshalHeader(ctx, header) + } + return nil +}// GetHeaderByHash returns the requested header by hash. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getHeaderByNumber + +GetHeaderByNumber returns the requested canonical block header. +* When blockNr is -1 the chain head is returned. +* When blockNr is -2 the pending chain head is returned. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +number rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - 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 + + + - title: `blockNumberIdentifier` + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + + +__Result__ + + + + +*RPCMarshalHeaderT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - size: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasLimit: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - totalDifficulty: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - difficulty: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - 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` + + - parentHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getHeaderByNumber(number); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*RPCMarshalHeaderT, error) { + header, err := s.b.HeaderByNumber(ctx, number) + if header != nil && err == nil { + response := s.rpcMarshalHeader(ctx, header) + if number == rpc.PendingBlockNumber { + response.setAsPending() + } + return response, err + } + return nil, err +}// GetHeaderByNumber returns the requested canonical block header. +// * When blockNr is -1 the chain head is returned. +// * When blockNr is -2 the pending chain head is returned. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getLogs + +GetLogs returns logs matching the given argument that are stored within the state. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +crit FilterCriteria + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - 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 + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +typesLog []*types.Log + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - properties: + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logIndex: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - removed: + - type: `boolean` + + - topics: + - items: + - title: `keccak` + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + - type: `array` + + - transactionIndex: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - blockHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - data: + - type: `string` + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + + - transactionHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: object + - additionalProperties: `false` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getLogs", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getLogs(crit); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([ // GetLogs returns logs matching the given argument that are stored within the state. +// +// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs +]*types.Log, error) { + var filter *Filter + if crit.BlockHash != nil { + filter = NewBlockFilter(api.backend, *crit.BlockHash, crit.Addresses, crit.Topics) + } else { + begin := rpc.LatestBlockNumber.Int64() + if crit.FromBlock != nil { + begin = crit.FromBlock.Int64() + } + end := rpc.LatestBlockNumber.Int64() + if crit.ToBlock != nil { + end = crit.ToBlock.Int64() + } + filter = NewRangeFilter(api.backend, begin, end, crit.Addresses, crit.Topics) + } + logs, err := filter.Logs(ctx) + if err != nil { + return nil, err + } + return returnLogs(logs), err +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getProof + +GetProof returns the Merkle-proof for a given account and optionally some storage keys. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +storageKeys []string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - type: string + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + + +__3:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*AccountResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - balance: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - codeHash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - 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` + + - accountProof: + - items: + - type: `string` + + - type: `array` + + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getProof", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getProof(address,storageKeys,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetProof(ctx context.Context, address common.Address, storageKeys [ // GetProof returns the Merkle-proof for a given account and optionally some storage keys. +]string, blockNrOrHash rpc.BlockNumberOrHash) (*AccountResult, error) { + state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if state == nil || err != nil { + return nil, err + } + storageTrie := state.StorageTrie(address) + storageHash := types.EmptyRootHash + codeHash := state.GetCodeHash(address) + storageProof := make([]StorageResult, len(storageKeys)) + if storageTrie != nil { + storageHash = storageTrie.Hash() + } else { + codeHash = crypto.Keccak256Hash(nil) + } + for i, key := range storageKeys { + if storageTrie != nil { + proof, storageError := state.GetStorageProof(address, common.HexToHash(key)) + if storageError != nil { + return nil, storageError + } + storageProof[i] = StorageResult{key, (*hexutil.Big)(state.GetState(address, common.HexToHash(key)).Big()), toHexSlice(proof)} + } else { + storageProof[i] = StorageResult{key, &hexutil.Big{}, []string{}} + } + } + accountProof, proofErr := state.GetProof(address) + if proofErr != nil { + return nil, proofErr + } + return &AccountResult{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() +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getRawTransactionByBlockHashAndIndex + +GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getRawTransactionByBlockHashAndIndex(blockHash,index); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) hexutil.Bytes { + if block, _ := s.b.BlockByHash(ctx, blockHash); block != nil { + return newRPCRawTransactionFromBlockIndex(block, uint64(index)) + } + return nil +}// GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getRawTransactionByBlockNumberAndIndex + +GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - 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 + + + - title: `blockNumberIdentifier` + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockNumberAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getRawTransactionByBlockNumberAndIndex(blockNr,index); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) hexutil.Bytes { + if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil { + return newRPCRawTransactionFromBlockIndex(block, uint64(index)) + } + return nil +}// GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getRawTransactionByHash + +GetRawTransactionByHash returns the bytes of the transaction for the given hash. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getRawTransactionByHash(hash); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) { + tx, _, _, _, err := s.b.GetTransaction(ctx, hash) + if err != nil { + return nil, err + } + if tx == nil { + if tx = s.b.GetPoolTransaction(hash); tx == nil { + return nil, nil + } + } + return rlp.EncodeToBytes(tx) +}// GetRawTransactionByHash returns the bytes of the transaction for the given hash. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getStorageAt + +GetStorageAt returns the storage from the state at the given address, key and +block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block +numbers are also allowed. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +key string + + + Required: ✓ Yes + + + + + +__3:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getStorageAt", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getStorageAt(address,key,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, key string, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error) { + state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if state == nil || err != nil { + return nil, err + } + res := state.GetState(address, common.HexToHash(key)) + return res[ // GetStorageAt returns the storage from the state at the given address, key and + // block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block + // numbers are also allowed. + :], state.Error() +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getTransactionByBlockHashAndIndex + +GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` + - description: `Hex representation of a uint` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCTransaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - from: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - r: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - transactionIndex: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - value: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - hash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - s: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - nonce: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockHashAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getTransactionByBlockHashAndIndex(blockHash,index); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) *RPCTransaction { + if block, _ := s.b.BlockByHash(ctx, blockHash); block != nil { + return newRPCTransactionFromBlockIndex(block, uint64(index)) + } + return nil +}// GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getTransactionByBlockNumberAndIndex + +GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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 + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCTransaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - value: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - from: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - gas: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - blockHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - input: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - transactionIndex: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - nonce: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - s: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockNumberAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getTransactionByBlockNumberAndIndex(blockNr,index); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) *RPCTransaction { + if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil { + return newRPCTransactionFromBlockIndex(block, uint64(index)) + } + return nil +}// GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getTransactionByHash + +GetTransactionByHash returns the transaction for the given hash + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCTransaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - hash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - transactionIndex: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gas: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - v: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - blockNumber: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - from: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - s: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getTransactionByHash(hash); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) { + tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash) + if err != nil { + return nil, err + } + if tx != nil { + return newRPCTransaction(tx, blockHash, blockNumber, index), nil + } + if tx := s.b.GetPoolTransaction(hash); tx != nil { + return newRPCPendingTransaction(tx), nil + } + return nil, nil +}// GetTransactionByHash returns the transaction for the given hash + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getTransactionCount + +GetTransactionCount returns the number of transactions the given address has sent for the given block number + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +address common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +blockNrOrHash rpc.BlockNumberOrHash + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionCount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getTransactionCount(address,blockNrOrHash); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error) { + if blockNr, ok := blockNrOrHash.Number(); ok && blockNr == rpc.PendingBlockNumber { + nonce, err := s.b.GetPoolNonce(ctx, address) + if err != nil { + return nil, err + } + return (*hexutil.Uint64)(&nonce), nil + } + state, _, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) + if state == nil || err != nil { + return nil, err + } + nonce := state.GetNonce(address) + return (*hexutil.Uint64)(&nonce), state.Error() +}// GetTransactionCount returns the number of transactions the given address has sent for the given block number + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getTransactionReceipt + +GetTransactionReceipt returns the transaction receipt for the given transaction hash. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + +mapstringinterface map[string]interface{} + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - patternProperties: + - .*: + - additionalProperties: `true` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "patternProperties": { + ".*": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionReceipt", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getTransactionReceipt(hash); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map // GetTransactionReceipt returns the transaction receipt for the given transaction hash. +[string]interface{}, error) { + tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash) + if err != nil { + return nil, nil + } + receipts, err := s.b.GetReceipts(ctx, blockHash) + if err != nil { + return nil, err + } + if len(receipts) <= int(index) { + return nil, nil + } + receipt := receipts[index] + var signer types.Signer = types.FrontierSigner{} + if tx.Protected() { + signer = types.NewEIP155Signer(tx.ChainId()) + } + from, _ := types.Sender(signer, tx) + fields := 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} + if len(receipt.PostState) > 0 { + fields["root"] = hexutil.Bytes(receipt.PostState) + } else { + fields["status"] = hexutil.Uint(receipt.Status) + } + if receipt.Logs == nil { + fields["logs"] = [][]*types.Log{} + } + if receipt.ContractAddress != (common.Address{}) { + fields["contractAddress"] = receipt.ContractAddress + } + return fields, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_getUncleByBlockHashAndIndex + +GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and index. When fullTx is true +all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCMarshalBlockT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - uncles: + - items: + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - type: `array` + + - difficulty: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - gasUsed: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - size: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasLimit: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - 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` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - error: + - type: `string` + + - extraData: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockHashAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getUncleByBlockHashAndIndex(blockHash,index); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetUncleByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (*RPCMarshalBlockT, error) { + block, err := s.b.BlockByHash(ctx, blockHash) + if block != nil { + uncles := block.Uncles() + if index >= hexutil.Uint(len(uncles)) { + log.Debug("Requested uncle not found", "number", block.Number(), "hash", blockHash, "index", index) + return nil, nil + } + block = types.NewBlockWithHeader(uncles[index]) + return s.rpcMarshalBlock(ctx, block, false, false) + } + return nil, err +}// GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and index. When fullTx is true +// all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getUncleByBlockNumberAndIndex + +GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash and index. When fullTx is true +all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` 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 + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +index hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*RPCMarshalBlockT + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - mixHash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - difficulty: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logsBloom: + - minItems: `256` + - type: `array` + - items: + - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - maxItems: `256` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - totalDifficulty: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - stateRoot: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - uncles: + - items: + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - type: `array` + + - error: + - type: `string` + + - receiptsRoot: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - parentHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - gasLimit: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockNumberAndIndex", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getUncleByBlockNumberAndIndex(blockNr,index); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (*RPCMarshalBlockT, error) { + block, err := s.b.BlockByNumber(ctx, blockNr) + if block != nil { + uncles := block.Uncles() + if index >= hexutil.Uint(len(uncles)) { + log.Debug("Requested uncle not found", "number", blockNr, "hash", block.Hash(), "index", index) + return nil, nil + } + block = types.NewBlockWithHeader(uncles[index]) + return s.rpcMarshalBlock(ctx, block, false, false) + } + return nil, err +}// GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash and index. When fullTx is true +// all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getUncleCountByBlockHash + +GetUncleCountByBlockHash returns number of uncles in the block for the given block hash + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockHash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +*hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` + - description: `Hex representation of a uint` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockHash", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getUncleCountByBlockHash(blockHash); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetUncleCountByBlockHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint { + if block, _ := s.b.BlockByHash(ctx, blockHash); block != nil { + n := hexutil.Uint(len(block.Uncles())) + return &n + } + return nil +}// GetUncleCountByBlockHash returns number of uncles in the block for the given block hash + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getUncleCountByBlockNumber + +GetUncleCountByBlockNumber returns number of uncles in the block for the given block number + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +blockNr rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `blockNumberIdentifier` + - oneOf: + + - description: `The block height description` + - enum: earliest, latest, pending + - type: string + - title: `blockNumberTag` + + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + + +__Result__ + + + + +*hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockNumber", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getUncleCountByBlockNumber(blockNr); + ``` + + +
Source code +

+```go +func (s *PublicBlockChainAPI) GetUncleCountByBlockNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint { + if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil { + n := hexutil.Uint(len(block.Uncles())) + return &n + } + return nil +}// GetUncleCountByBlockNumber returns number of uncles in the block for the given block number + +``` +View on GitHub → +

+
+ +--- + + + +### eth_getWork + +GetWork returns a work package for external miner. + +The work package consists of 3 strings: + result[0] - 32 bytes hex encoded current block header pow-hash + result[1] - 32 bytes hex encoded seed hash used for DAG + result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty + result[3] - hex encoded block number + + +__Params (0)__ + +_None_ + +__Result__ + + + +num4string [4]string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - type: string + + + - maxItems: `4` + - minItems: `4` + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "type": [ + "string" + ] + } + ], + "maxItems": 4, + "minItems": 4, + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getWork", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.getWork(); + ``` + + +
Source code +

+```go +func (api *API) GetWork() ([4]string, error) { + if api.ethash.remote == nil { + return [4]string{}, errors.New("not supported") + } + var ( + workCh = make(chan [4]string, 1) + errc = make(chan error, 1) + ) + select { + case api.ethash.remote.fetchWorkCh <- &sealWork{errc: errc, res: workCh}: + case <-api.ethash.remote.exitCh: + return [4]string{}, errEthashStopped + } + select { + case work := <-workCh: + return work, nil + case err := <-errc: + return [4]string{}, err + } +}// GetWork returns a work package for external miner. +// +// The work package consists of 3 strings: +// result[0] - 32 bytes hex encoded current block header pow-hash +// result[1] - 32 bytes hex encoded seed hash used for DAG +// result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty +// result[3] - hex encoded block number + +``` +View on GitHub → +

+
+ +--- + + + +### eth_hashrate + +Hashrate returns the POW hashrate + + +__Params (0)__ + +_None_ + +__Result__ + + + + +hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint64` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_hashrate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.hashrate(); + ``` + + +
Source code +

+```go +func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 { + return hexutil.Uint64(api.e.Miner().HashRate()) +}// Hashrate returns the POW hashrate + +``` +View on GitHub → +

+
+ +--- + + + +### eth_mining + +Mining returns an indication if this node is currently mining. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_mining", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.mining(); + ``` + + +
Source code +

+```go +func (api *PublicMinerAPI) Mining() bool { + return api.e.IsMining() +}// Mining returns an indication if this node is currently mining. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_newBlockFilter + +NewBlockFilter creates a filter that fetches blocks that are imported into the chain. +It is part of the filter package since polling goes with eth_getFilterChanges. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter + + +__Params (0)__ + +_None_ + +__Result__ + + + + +rpc.ID + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newBlockFilter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.newBlockFilter(); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) NewBlockFilter() rpc.ID { + var ( + headers = make(chan *types.Header) + headerSub = api.events.SubscribeNewHeads(headers) + ) + api.filtersMu.Lock() + api.filters[headerSub.ID] = &filter{typ: BlocksSubscription, deadline: time.NewTimer(deadline), hashes: make([ // NewBlockFilter creates a filter that fetches blocks that are imported into the chain. + // It is part of the filter package since polling goes with eth_getFilterChanges. + // + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter + ]common.Hash, 0), s: headerSub} + api.filtersMu.Unlock() + go func() { + for { + select { + case h := <-headers: + api.filtersMu.Lock() + if f, found := api.filters[headerSub.ID]; found { + f.hashes = append(f.hashes, h.Hash()) + } + api.filtersMu.Unlock() + case <-headerSub.Err(): + api.filtersMu.Lock() + delete(api.filters, headerSub.ID) + api.filtersMu.Unlock() + return + } + } + }() + return headerSub.ID +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_newFilter + +NewFilter creates a new filter and returns the filter id. It can be +used to retrieve logs when the state changes. This method cannot be +used to fetch logs that are already stored in the state. + +Default criteria for the from and to block are "latest". +Using "latest" as block number will return logs for mined blocks. +Using "pending" as block number returns logs for not yet mined (pending) blocks. +In case logs are removed (chain reorg) previously returned logs are returned +again but with the removed property set to true. + +In case "fromBlock" > "toBlock" an error is returned. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +crit FilterCriteria + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - Topics: + - items: + - items: + - title: `keccak` + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + - type: `array` + + - type: `array` + + - 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: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - ToBlock: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + + +rpc.ID + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newFilter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.newFilter(crit); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) NewFilter(crit FilterCriteria) (rpc.ID, error) { + logs := make(chan [ // NewFilter creates a new filter and returns the filter id. It can be + // used to retrieve logs when the state changes. This method cannot be + // used to fetch logs that are already stored in the state. + // + // Default criteria for the from and to block are "latest". + // Using "latest" as block number will return logs for mined blocks. + // Using "pending" as block number returns logs for not yet mined (pending) blocks. + // In case logs are removed (chain reorg) previously returned logs are returned + // again but with the removed property set to true. + // + // In case "fromBlock" > "toBlock" an error is returned. + // + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter + ]*types.Log) + logsSub, err := api.events.SubscribeLogs(ethereum.FilterQuery(crit), logs) + if err != nil { + return rpc.ID(""), err + } + api.filtersMu.Lock() + api.filters[logsSub.ID] = &filter{typ: LogsSubscription, crit: crit, deadline: time.NewTimer(deadline), logs: make([]*types.Log, 0), s: logsSub} + api.filtersMu.Unlock() + go func() { + for { + select { + case l := <-logs: + api.filtersMu.Lock() + if f, found := api.filters[logsSub.ID]; found { + f.logs = append(f.logs, l...) + } + api.filtersMu.Unlock() + case <-logsSub.Err(): + api.filtersMu.Lock() + delete(api.filters, logsSub.ID) + api.filtersMu.Unlock() + return + } + } + }() + return logsSub.ID, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_newPendingTransactionFilter + +NewPendingTransactionFilter creates a filter that fetches pending transaction hashes +as transactions enter the pending state. + +It is part of the filter package because this filter can be used through the +`eth_getFilterChanges` polling method that is also used for log filters. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter + + +__Params (0)__ + +_None_ + +__Result__ + + + + +rpc.ID + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newPendingTransactionFilter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.newPendingTransactionFilter(); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) NewPendingTransactionFilter() rpc.ID { + var ( + pendingTxs = make(chan [ // NewPendingTransactionFilter creates a filter that fetches pending transaction hashes + // as transactions enter the pending state. + // + // It is part of the filter package because this filter can be used through the + // `eth_getFilterChanges` polling method that is also used for log filters. + // + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter + ]common.Hash) + pendingTxSub = api.events.SubscribePendingTxs(pendingTxs) + ) + api.filtersMu.Lock() + api.filters[pendingTxSub.ID] = &filter{typ: PendingTransactionsSubscription, deadline: time.NewTimer(deadline), hashes: make([]common.Hash, 0), s: pendingTxSub} + api.filtersMu.Unlock() + go func() { + for { + select { + case ph := <-pendingTxs: + api.filtersMu.Lock() + if f, found := api.filters[pendingTxSub.ID]; found { + f.hashes = append(f.hashes, ph...) + } + api.filtersMu.Unlock() + case <-pendingTxSub.Err(): + api.filtersMu.Lock() + delete(api.filters, pendingTxSub.ID) + api.filtersMu.Unlock() + return + } + } + }() + return pendingTxSub.ID +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_newSideBlockFilter + +NewSideBlockFilter creates a filter that fetches blocks that are imported into the chain with a non-canonical status. +It is part of the filter package since polling goes with eth_getFilterChanges. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +rpc.ID + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newSideBlockFilter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.newSideBlockFilter(); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) NewSideBlockFilter() rpc.ID { + var ( + headers = make(chan *types.Header) + headerSub = api.events.SubscribeNewSideHeads(headers) + ) + api.filtersMu.Lock() + api.filters[headerSub.ID] = &filter{typ: SideBlocksSubscription, deadline: time.NewTimer(deadline), hashes: make([ // NewSideBlockFilter creates a filter that fetches blocks that are imported into the chain with a non-canonical status. + // It is part of the filter package since polling goes with eth_getFilterChanges. + ]common.Hash, 0), s: headerSub} + api.filtersMu.Unlock() + go func() { + for { + select { + case h := <-headers: + api.filtersMu.Lock() + if f, found := api.filters[headerSub.ID]; found { + f.hashes = append(f.hashes, h.Hash()) + } + api.filtersMu.Unlock() + case <-headerSub.Err(): + api.filtersMu.Lock() + delete(api.filters, headerSub.ID) + api.filtersMu.Unlock() + return + } + } + }() + return headerSub.ID +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_pendingTransactions + +PendingTransactions returns the transactions that are in the transaction pool +and have a from address that is one of the accounts this node manages. + + +__Params (0)__ + +_None_ + +__Result__ + + + +RPCTransaction []*RPCTransaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: array + - 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` + + - 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` + + - gasPrice: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - to: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - transactionIndex: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + + - type: object + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_pendingTransactions", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.pendingTransactions(); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) PendingTransactions() ([ // PendingTransactions returns the transactions that are in the transaction pool +// and have a from address that is one of the accounts this node manages. +]*RPCTransaction, error) { + pending, err := s.b.GetPoolTransactions() + if err != nil { + return nil, err + } + accounts := make(map[common.Address]struct{}) + for _, wallet := range s.b.AccountManager().Wallets() { + for _, account := range wallet.Accounts() { + accounts[account.Address] = struct{}{} + } + } + transactions := make([]*RPCTransaction, 0, len(pending)) + for _, tx := range pending { + var signer types.Signer = types.HomesteadSigner{} + if tx.Protected() { + signer = types.NewEIP155Signer(tx.ChainId()) + } + from, _ := types.Sender(signer, tx) + if _, exists := accounts[from]; exists { + transactions = append(transactions, newRPCPendingTransaction(tx)) + } + } + return transactions, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_protocolVersion + +ProtocolVersion returns the current Ethereum protocol version this node supports + + +__Params (0)__ + +_None_ + +__Result__ + + + + +hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_protocolVersion", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.protocolVersion(); + ``` + + +
Source code +

+```go +func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint { + return hexutil.Uint(s.b.ProtocolVersion()) +}// ProtocolVersion returns the current Ethereum protocol version this node supports + +``` +View on GitHub → +

+
+ +--- + + + +### eth_resend + +Resend accepts an existing transaction and a new gas price and limit. It will remove +the given transaction from the pool and reinsert it with the new gas price and limit. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +sendArgs SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - properties: + - from: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - 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: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + + - type: object + - additionalProperties: `false` + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +gasPrice *hexutil.Big + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + - title: `integer` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +gasLimit *hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_resend", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.resend(sendArgs,gasPrice,gasLimit); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxArgs, gasPrice *hexutil.Big, gasLimit *hexutil.Uint64) (common.Hash, error) { + if sendArgs.Nonce == nil { + return common.Hash{}, fmt.Errorf("missing transaction nonce in transaction spec") + } + if err := sendArgs.setDefaults(ctx, s.b); err != nil { + return common.Hash{}, err + } + matchTx := sendArgs.toTransaction() + var price = matchTx.GasPrice() + if gasPrice != nil { + price = gasPrice.ToInt() + } + var gas = matchTx.Gas() + if gasLimit != nil { + gas = uint64(*gasLimit) + } + if err := checkTxFee(price, gas, s.b.RPCTxFeeCap()); err != nil { + return common.Hash{}, err + } + pending, err := s.b.GetPoolTransactions() + if err != nil { + return common.Hash{}, err + } + for _, p := // Resend accepts an existing transaction and a new gas price and limit. It will remove + // the given transaction from the pool and reinsert it with the new gas price and limit. + // Before replacing the old transaction, ensure the _new_ transaction fee is reasonable. + range pending { + var signer types.Signer = types.HomesteadSigner{} + if p.Protected() { + signer = types.NewEIP155Signer(p.ChainId()) + } + wantSigHash := signer.Hash(matchTx) + if pFrom, err := types.Sender(signer, p); err == nil && pFrom == sendArgs.From && signer.Hash(p) == wantSigHash { + if gasPrice != nil && (*big.Int)(gasPrice).Sign() != 0 { + sendArgs.GasPrice = gasPrice + } + if gasLimit != nil && *gasLimit != 0 { + sendArgs.Gas = gasLimit + } + signedTx, err := s.sign(sendArgs.From, sendArgs.toTransaction()) + if err != nil { + return common.Hash{}, err + } + if err = s.b.SendTx(ctx, signedTx); err != nil { + return common.Hash{}, err + } + return signedTx.Hash(), nil + } + } + return common.Hash{}, fmt.Errorf("transaction %#x not found", matchTx.Hash()) +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_sendRawTransaction + +SendRawTransaction will add the signed transaction to the transaction pool. +The sender is responsible for signing the transaction and using the correct nonce. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +encodedTx hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendRawTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.sendRawTransaction(encodedTx); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) { + tx := new(types.Transaction) + if err := rlp.DecodeBytes(encodedTx, tx); err != nil { + return common.Hash{}, err + } + return SubmitTransaction(ctx, s.b, tx) +}// SendRawTransaction will add the signed transaction to the transaction pool. +// The sender is responsible for signing the transaction and using the correct nonce. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_sendTransaction + +SendTransaction creates a transaction for the given argument, sign it and submit it to the +transaction pool. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - 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: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - to: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + + +common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.sendTransaction(args); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args SendTxArgs) (common.Hash, error) { + account := accounts.Account{Address: args.From} + wallet, err := s.b.AccountManager().Find(account) + if err != nil { + return common.Hash{}, err + } + if args.Nonce == nil { + s.nonceLock.LockAddr(args.From) + defer s.nonceLock.UnlockAddr(args.From) + } + if err := args.setDefaults(ctx, s.b); err != nil { + return common.Hash{}, err + } + tx := args.toTransaction() + signed, err := wallet.SignTx(account, tx, s.b.ChainConfig().GetChainID()) + if err != nil { + return common.Hash{}, err + } + return SubmitTransaction(ctx, s.b, signed) +}// SendTransaction creates a transaction for the given argument, sign it and submit it to the +// transaction pool. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_sign + +Sign calculates an ECDSA signature for: +keccack256("\x19Ethereum Signed Message:\n" + len(message) + message). + +Note, the produced signature conforms to the secp256k1 curve R, S and V values, +where the V value will be 27 or 28 for legacy reasons. + +The account associated with addr must be unlocked. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +addr common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +data hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sign", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.sign(addr,data); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) Sign(addr common.Address, data hexutil.Bytes) (hexutil.Bytes, error) { + account := accounts.Account{Address: addr} + wallet, err := s.b.AccountManager().Find(account) + if err != nil { + return nil, err + } + signature, err := wallet.SignText(account, data) + if err == nil { + signature[64] += 27 + } + return signature, err +}// Sign calculates an ECDSA signature for: +// keccack256("\x19Ethereum Signed Message:\n" + len(message) + message). +// +// Note, the produced signature conforms to the secp256k1 curve R, S and V values, +// where the V value will be 27 or 28 for legacy reasons. +// +// The account associated with addr must be unlocked. +// +// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + +``` +View on GitHub → +

+
+ +--- + + + +### eth_signTransaction + +SignTransaction will sign the given transaction with the from account. +The node needs to have the private key of the account corresponding with +the given from address and it needs to be unlocked. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - 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: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gas: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + + +*SignTransactionResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - tx: + - additionalProperties: `false` + - type: `object` + + - raw: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "additionalProperties": false, + "properties": { + "raw": { + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": "string" + }, + "tx": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_signTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.signTransaction(args); + ``` + + +
Source code +

+```go +func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args SendTxArgs) (*SignTransactionResult, error) { + if args.Gas == nil { + return nil, fmt.Errorf("gas not specified") + } + if args.GasPrice == nil { + return nil, fmt.Errorf("gasPrice not specified") + } + if args.Nonce == nil { + return nil, fmt.Errorf("nonce not specified") + } + if err := args.setDefaults(ctx, s.b); err != nil { + return nil, err + } + if err := checkTxFee(args.GasPrice.ToInt(), uint64(*args.Gas), s.b.RPCTxFeeCap()); err != nil { + return nil, err + } + tx, err := s.sign(args.From, args.toTransaction()) + if err != nil { + return nil, err + } + data, err := rlp.EncodeToBytes(tx) + if err != nil { + return nil, err + } + return &SignTransactionResult{data, tx}, nil +}// SignTransaction will sign the given transaction with the from account. +// The node needs to have the private key of the account corresponding with +// the given from address and it needs to be unlocked. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_submitHashRate + +SubmitHashrate can be used for remote miners to submit their hash rate. +This enables the node to report the combined hash rate of all miners +which submit work through this node. + +It accepts the miner hash rate and an identifier which must be unique +between nodes. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +rate hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +id common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitHashRate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.submitHashRate(rate,id); + ``` + + +
Source code +

+```go +func (api *API) SubmitHashRate(rate hexutil.Uint64, id common.Hash) bool { + if api.ethash.remote == nil { + return false + } + var done = make(chan struct{}, 1) + select { + case api.ethash.remote.submitRateCh <- &hashrate{done: done, rate: uint64(rate), id: id}: + case <-api.ethash.remote.exitCh: + return false + } + <-done + return true +}// SubmitHashrate can be used for remote miners to submit their hash rate. +// This enables the node to report the combined hash rate of all miners +// which submit work through this node. +// +// It accepts the miner hash rate and an identifier which must be unique +// between nodes. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_submitWork + +SubmitWork can be used by external miner to submit their POW solution. +It returns an indication if the work was accepted. +Note either an invalid solution, a stale work a non-existent work will return false. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +nonce types.BlockNonce + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +digest common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitWork", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.submitWork(nonce,hash,digest); + ``` + + +
Source code +

+```go +func (api *API) SubmitWork(nonce types.BlockNonce, hash, digest common.Hash) bool { + if api.ethash.remote == nil { + return false + } + var errc = make(chan error, 1) + select { + case api.ethash.remote.submitWorkCh <- &mineResult{nonce: nonce, mixDigest: digest, hash: hash, errc: errc}: + case <-api.ethash.remote.exitCh: + return false + } + err := <-errc + return err == nil +}// SubmitWork can be used by external miner to submit their POW solution. +// It returns an indication if the work was accepted. +// Note either an invalid solution, a stale work a non-existent work will return false. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_subscribe + +Subscribe creates a subscription to an event channel. +Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +subscriptionName RPCSubscriptionParamsName + + + Required: ✓ Yes + + + + + +__2:__ +subscriptionOptions interface{} + + + Required: No + + + + + + +__Result__ + + + +subscriptionID rpc.ID + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_subscribe", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.subscribe(subscriptionName,subscriptionOptions); + ``` + + +
Source code +

+```go +func (sub *RPCSubscription) Subscribe(subscriptionName RPCSubscriptionParamsName, subscriptionOptions interface{}) (subscriptionID rpc.ID, err error) { + return +}// Subscribe creates a subscription to an event channel. +// Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections. + +``` +View on GitHub → +

+
+ +--- + + + +### eth_syncing + +Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not +yet received the latest block headers from its pears. In case it is synchronizing: +- startingBlock: block number this node started to synchronise from +- currentBlock: block number this node is currently importing +- highestBlock: block number of the highest block header this node has received from peers +- pulledStates: number of state entries processed until now +- knownStates: number of known state entries that still need to be pulled + + +__Params (0)__ + +_None_ + +__Result__ + + + +interface interface{} + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_syncing", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.syncing(); + ``` + + +
Source code +

+```go +func (s *PublicEthereumAPI) Syncing() (interface{}, error) { + progress := s.b.Downloader().Progress() + if progress.CurrentBlock >= progress.HighestBlock { + return false, nil + } + return map // Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not + // yet received the latest block headers from its pears. In case it is synchronizing: + // - startingBlock: block number this node started to synchronise from + // - currentBlock: block number this node is currently importing + // - highestBlock: block number of the highest block header this node has received from peers + // - pulledStates: number of state entries processed until now + // - knownStates: number of known state entries that still need to be pulled + [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 +} +``` +View on GitHub → +

+
+ +--- + + + +### eth_uninstallFilter + +UninstallFilter removes the filter with the given filter id. + +https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +id rpc.ID + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_uninstallFilter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.uninstallFilter(id); + ``` + + +
Source code +

+```go +func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool { + api.filtersMu.Lock() + f, found := api.filters[id] + if found { + delete(api.filters, id) + } + api.filtersMu.Unlock() + if found { + f.s.Unsubscribe() + } + return found +}// UninstallFilter removes the filter with the given filter id. +// +// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter + +``` +View on GitHub → +

+
+ +--- + + + +### eth_unsubscribe + +Unsubscribe terminates an existing subscription by ID. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +id rpc.ID + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_unsubscribe", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + eth.unsubscribe(id); + ``` + + +
Source code +

+```go +func (sub *RPCSubscription) Unsubscribe(id rpc.ID) error { + return nil +}// Unsubscribe terminates an existing subscription by ID. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/ethash.md b/docs/JSON-RPC-API/modules/ethash.md new file mode 100755 index 0000000000..0d5158c400 --- /dev/null +++ b/docs/JSON-RPC-API/modules/ethash.md @@ -0,0 +1,519 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### ethash_getHashrate + +GetHashrate returns the current hashrate for local CPU miner and remote miner. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_getHashrate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + ethash.getHashrate(); + ``` + + +
Source code +

+```go +func (api *API) GetHashrate() uint64 { + return uint64(api.ethash.Hashrate()) +}// GetHashrate returns the current hashrate for local CPU miner and remote miner. + +``` +View on GitHub → +

+
+ +--- + + + +### ethash_getWork + +GetWork returns a work package for external miner. + +The work package consists of 3 strings: + result[0] - 32 bytes hex encoded current block header pow-hash + result[1] - 32 bytes hex encoded seed hash used for DAG + result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty + result[3] - hex encoded block number + + +__Params (0)__ + +_None_ + +__Result__ + + + +num4string [4]string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - minItems: `4` + - type: array + - items: + + - type: string + + + - maxItems: `4` + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "type": [ + "string" + ] + } + ], + "maxItems": 4, + "minItems": 4, + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_getWork", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + ethash.getWork(); + ``` + + +
Source code +

+```go +func (api *API) GetWork() ([4]string, error) { + if api.ethash.remote == nil { + return [4]string{}, errors.New("not supported") + } + var ( + workCh = make(chan [4]string, 1) + errc = make(chan error, 1) + ) + select { + case api.ethash.remote.fetchWorkCh <- &sealWork{errc: errc, res: workCh}: + case <-api.ethash.remote.exitCh: + return [4]string{}, errEthashStopped + } + select { + case work := <-workCh: + return work, nil + case err := <-errc: + return [4]string{}, err + } +}// GetWork returns a work package for external miner. +// +// The work package consists of 3 strings: +// result[0] - 32 bytes hex encoded current block header pow-hash +// result[1] - 32 bytes hex encoded seed hash used for DAG +// result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty +// result[3] - hex encoded block number + +``` +View on GitHub → +

+
+ +--- + + + +### ethash_submitHashRate + +SubmitHashrate can be used for remote miners to submit their hash rate. +This enables the node to report the combined hash rate of all miners +which submit work through this node. + +It accepts the miner hash rate and an identifier which must be unique +between nodes. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +rate hexutil.Uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +id common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitHashRate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + ethash.submitHashRate(rate,id); + ``` + + +
Source code +

+```go +func (api *API) SubmitHashRate(rate hexutil.Uint64, id common.Hash) bool { + if api.ethash.remote == nil { + return false + } + var done = make(chan struct{}, 1) + select { + case api.ethash.remote.submitRateCh <- &hashrate{done: done, rate: uint64(rate), id: id}: + case <-api.ethash.remote.exitCh: + return false + } + <-done + return true +}// SubmitHashrate can be used for remote miners to submit their hash rate. +// This enables the node to report the combined hash rate of all miners +// which submit work through this node. +// +// It accepts the miner hash rate and an identifier which must be unique +// between nodes. + +``` +View on GitHub → +

+
+ +--- + + + +### ethash_submitWork + +SubmitWork can be used by external miner to submit their POW solution. +It returns an indication if the work was accepted. +Note either an invalid solution, a stale work a non-existent work will return false. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +nonce types.BlockNonce + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +digest common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitWork", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + ethash.submitWork(nonce,hash,digest); + ``` + + +
Source code +

+```go +func (api *API) SubmitWork(nonce types.BlockNonce, hash, digest common.Hash) bool { + if api.ethash.remote == nil { + return false + } + var errc = make(chan error, 1) + select { + case api.ethash.remote.submitWorkCh <- &mineResult{nonce: nonce, mixDigest: digest, hash: hash, errc: errc}: + case <-api.ethash.remote.exitCh: + return false + } + err := <-errc + return err == nil +}// SubmitWork can be used by external miner to submit their POW solution. +// It returns an indication if the work was accepted. +// Note either an invalid solution, a stale work a non-existent work will return false. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/miner.md b/docs/JSON-RPC-API/modules/miner.md new file mode 100755 index 0000000000..62e64d2867 --- /dev/null +++ b/docs/JSON-RPC-API/modules/miner.md @@ -0,0 +1,556 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### miner_getHashrate + +GetHashrate returns the current hashrate of the miner. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_getHashrate", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.getHashrate(); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) GetHashrate() uint64 { + return api.e.miner.HashRate() +}// GetHashrate returns the current hashrate of the miner. + +``` +View on GitHub → +

+
+ +--- + + + +### miner_setEtherbase + +SetEtherbase sets the etherbase of the miner + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +etherbase common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setEtherbase", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.setEtherbase(etherbase); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool { + api.e.SetEtherbase(etherbase) + return true +}// SetEtherbase sets the etherbase of the miner + +``` +View on GitHub → +

+
+ +--- + + + +### miner_setExtra + +SetExtra sets the extra data string that is included when this miner mines a block. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +extra string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setExtra", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.setExtra(extra); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) SetExtra(extra string) (bool, error) { + if err := api.e.Miner().SetExtra([ // SetExtra sets the extra data string that is included when this miner mines a block. + ]byte(extra)); err != nil { + return false, err + } + return true, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### miner_setGasPrice + +SetGasPrice sets the minimum accepted gas price for the miner. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +gasPrice hexutil.Big + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setGasPrice", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.setGasPrice(gasPrice); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool { + api.e.lock.Lock() + api.e.gasPrice = (*big.Int)(&gasPrice) + api.e.lock.Unlock() + api.e.txPool.SetGasPrice((*big.Int)(&gasPrice)) + return true +}// SetGasPrice sets the minimum accepted gas price for the miner. + +``` +View on GitHub → +

+
+ +--- + + + +### miner_setRecommitInterval + +SetRecommitInterval updates the interval for miner sealing work recommitting. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +interval int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setRecommitInterval", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.setRecommitInterval(interval); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) SetRecommitInterval(interval int) { + api.e.Miner().SetRecommitInterval(time.Duration(interval) * time.Millisecond) +}// SetRecommitInterval updates the interval for miner sealing work recommitting. + +``` +View on GitHub → +

+
+ +--- + + + +### miner_start + +Start starts the miner with the given number of threads. If threads is nil, +the number of workers started is equal to the number of logical CPUs that are +usable by this process. If mining is already running, this method adjust the +number of threads allowed to use and updates the minimum price required by the +transaction pool. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +threads *int + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_start", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.start(threads); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) Start(threads *int) error { + if threads == nil { + return api.e.StartMining(runtime.NumCPU()) + } + return api.e.StartMining(*threads) +}// Start starts the miner with the given number of threads. If threads is nil, +// the number of workers started is equal to the number of logical CPUs that are +// usable by this process. If mining is already running, this method adjust the +// number of threads allowed to use and updates the minimum price required by the +// transaction pool. + +``` +View on GitHub → +

+
+ +--- + + + +### miner_stop + +Stop terminates the miner, both at the consensus engine level as well as at +the block creation level. + + +__Params (0)__ + +_None_ + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_stop", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + miner.stop(); + ``` + + +
Source code +

+```go +func (api *PrivateMinerAPI) Stop() { + api.e.StopMining() +}// Stop terminates the miner, both at the consensus engine level as well as at +// the block creation level. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/net.md b/docs/JSON-RPC-API/modules/net.md new file mode 100755 index 0000000000..155a9f4ada --- /dev/null +++ b/docs/JSON-RPC-API/modules/net.md @@ -0,0 +1,196 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### net_listening + +Listening returns an indication if the node is listening for network connections. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "net_listening", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + net.listening(); + ``` + + +
Source code +

+```go +func (s *PublicNetAPI) Listening() bool { + return true +}// Listening returns an indication if the node is listening for network connections. + +``` +View on GitHub → +

+
+ +--- + + + +### net_peerCount + +PeerCount returns the number of connected peers + + +__Params (0)__ + +_None_ + +__Result__ + + + + +hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "net_peerCount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + net.peerCount(); + ``` + + +
Source code +

+```go +func (s *PublicNetAPI) PeerCount() hexutil.Uint { + return hexutil.Uint(s.net.PeerCount()) +}// PeerCount returns the number of connected peers + +``` +View on GitHub → +

+
+ +--- + + + +### net_version + +Version returns the current ethereum protocol version. + + +__Params (0)__ + +_None_ + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "net_version", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + net.version(); + ``` + + +
Source code +

+```go +func (s *PublicNetAPI) Version() string { + return fmt.Sprintf("%d", s.networkVersion) +}// Version returns the current ethereum protocol version. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/personal.md b/docs/JSON-RPC-API/modules/personal.md new file mode 100755 index 0000000000..cb10dad412 --- /dev/null +++ b/docs/JSON-RPC-API/modules/personal.md @@ -0,0 +1,2133 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### personal_deriveAccount + +DeriveAccount requests a HD wallet to derive a new account, optionally pinning +it for later reuse. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + +__2:__ +path string + + + Required: ✓ Yes + + + + + +__3:__ +pin *bool + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +accounts.Account + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - url: + - type: `object` + - additionalProperties: `false` + - properties: + - Path: + - type: `string` + + - Scheme: + - type: `string` + + + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_deriveAccount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.deriveAccount(url,path,pin); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) { + wallet, err := s.am.Wallet(url) + if err != nil { + return accounts.Account{}, err + } + derivPath, err := accounts.ParseDerivationPath(path) + if err != nil { + return accounts.Account{}, err + } + if pin == nil { + pin = new(bool) + } + return wallet.Derive(derivPath, *pin) +}// DeriveAccount requests a HD wallet to derive a new account, optionally pinning +// it for later reuse. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_ecRecover + +EcRecover returns the address for the account that was used to create the signature. +Note, this function is compatible with eth_sign and personal_sign. As such it recovers +the address of: +hash = keccak256("\x19Ethereum Signed Message:\n"${message length}${message}) +addr = ecrecover(hash, signature) + +Note, the signature must conform to the secp256k1 curve R, S and V values, where +the V value must be 27 or 28 for legacy reasons. + +https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecRecover + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +data hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +sig hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_ecRecover", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.ecRecover(data,sig); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) EcRecover(ctx context.Context, data, sig hexutil.Bytes) (common.Address, error) { + if len(sig) != crypto.SignatureLength { + return common.Address{}, fmt.Errorf("signature must be %d bytes long", crypto.SignatureLength) + } + if sig[crypto.RecoveryIDOffset] != 27 && sig[crypto.RecoveryIDOffset] != 28 { + return common.Address{}, fmt.Errorf("invalid Ethereum signature (V is not 27 or 28)") + } + sig[crypto.RecoveryIDOffset] -= 27 + rpk, err := crypto.SigToPub(accounts.TextHash(data), sig) + if err != nil { + return common.Address{}, err + } + return crypto.PubkeyToAddress(*rpk), nil +}// EcRecover returns the address for the account that was used to create the signature. +// Note, this function is compatible with eth_sign and personal_sign. As such it recovers +// the address of: +// hash = keccak256("\x19Ethereum Signed Message:\n"${message length}${message}) +// addr = ecrecover(hash, signature) +// +// Note, the signature must conform to the secp256k1 curve R, S and V values, where +// the V value must be 27 or 28 for legacy reasons. +// +// https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecRecover + +``` +View on GitHub → +

+
+ +--- + + + +### personal_importRawKey + +ImportRawKey stores the given hex encoded ECDSA key into the key directory, +encrypting it with the passphrase. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +privkey string + + + Required: ✓ Yes + + + + + +__2:__ +password string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_importRawKey", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.importRawKey(privkey,password); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) ImportRawKey(privkey string, password string) (common.Address, error) { + key, err := crypto.HexToECDSA(privkey) + if err != nil { + return common.Address{}, err + } + ks, err := fetchKeystore(s.am) + if err != nil { + return common.Address{}, err + } + acc, err := ks.ImportECDSA(key, password) + return acc.Address, err +}// ImportRawKey stores the given hex encoded ECDSA key into the key directory, +// encrypting it with the passphrase. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_initializeWallet + +InitializeWallet initializes a new wallet at the provided URL, by generating and returning a new private key. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_initializeWallet", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.initializeWallet(url); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) InitializeWallet(ctx context.Context, url string) (string, error) { + wallet, err := s.am.Wallet(url) + if err != nil { + return "", err + } + entropy, err := bip39.NewEntropy(256) + if err != nil { + return "", err + } + mnemonic, err := bip39.NewMnemonic(entropy) + if err != nil { + return "", err + } + seed := bip39.NewSeed(mnemonic, "") + switch wallet := wallet.( // InitializeWallet initializes a new wallet at the provided URL, by generating and returning a new private key. + type) { + case *scwallet.Wallet: + return mnemonic, wallet.Initialize(seed) + default: + return "", fmt.Errorf("specified wallet does not support initialization") + } +} +``` +View on GitHub → +

+
+ +--- + + + +### personal_listAccounts + +listAccounts will return a list of addresses for accounts this node manages. + + +__Params (0)__ + +_None_ + +__Result__ + + + +commonAddress []common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_listAccounts", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.listAccounts(); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) ListAccounts() [ // listAccounts will return a list of addresses for accounts this node manages. +]common.Address { + return s.am.Accounts() +} +``` +View on GitHub → +

+
+ +--- + + + +### personal_listWallets + +ListWallets will return a list of wallets this node manages. + + +__Params (0)__ + +_None_ + +__Result__ + + + +rawWallet []rawWallet + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - additionalProperties: `false` + - properties: + - accounts: + - items: + - type: `object` + - additionalProperties: `false` + - properties: + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - url: + - properties: + - Path: + - type: `string` + + - Scheme: + - type: `string` + + + - type: `object` + - additionalProperties: `false` + + + + - type: `array` + + - failure: + - type: `string` + + - status: + - type: `string` + + - url: + - type: `string` + + + - type: object + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_listWallets", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.listWallets(); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) ListWallets() [ // ListWallets will return a list of wallets this node manages. +]rawWallet { + wallets := make([]rawWallet, 0) + for _, wallet := range s.am.Wallets() { + status, failure := wallet.Status() + raw := rawWallet{URL: wallet.URL().String(), Status: status, Accounts: wallet.Accounts()} + if failure != nil { + raw.Failure = failure.Error() + } + wallets = append(wallets, raw) + } + return wallets +} +``` +View on GitHub → +

+
+ +--- + + + +### personal_lockAccount + +LockAccount will lock the account associated with the given address when it's unlocked. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +addr common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_lockAccount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.lockAccount(addr); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool { + if ks, err := fetchKeystore(s.am); err == nil { + return ks.Lock(addr) == nil + } + return false +}// LockAccount will lock the account associated with the given address when it's unlocked. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_newAccount + +NewAccount will create a new account and returns the address for the new account. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +password string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_newAccount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.newAccount(password); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) { + ks, err := fetchKeystore(s.am) + if err != nil { + return common.Address{}, err + } + acc, err := ks.NewAccount(password) + if err == nil { + log.Info("Your new key was generated", "address", acc.Address) + log.Warn("Please backup your key file!", "path", acc.URL.Path) + log.Warn("Please remember your password!") + return acc.Address, nil + } + return common.Address{}, err +}// NewAccount will create a new account and returns the address for the new account. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_openWallet + +OpenWallet initiates a hardware wallet opening procedure, establishing a USB +connection and attempting to authenticate via the provided passphrase. Note, +the method may return an extra challenge requiring a second open (e.g. the +Trezor PIN matrix challenge). + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + +__2:__ +passphrase *string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_openWallet", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.openWallet(url,passphrase); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) OpenWallet(url string, passphrase *string) error { + wallet, err := s.am.Wallet(url) + if err != nil { + return err + } + pass := "" + if passphrase != nil { + pass = *passphrase + } + return wallet.Open(pass) +}// OpenWallet initiates a hardware wallet opening procedure, establishing a USB +// connection and attempting to authenticate via the provided passphrase. Note, +// the method may return an extra challenge requiring a second open (e.g. the +// Trezor PIN matrix challenge). + +``` +View on GitHub → +

+
+ +--- + + + +### personal_sendTransaction + +SendTransaction will create a transaction from the given arguments and +tries to sign it with the key associated with args.To. If the given passwd isn't +able to decrypt the key it fails. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - 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: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - 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` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +passwd string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sendTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.sendTransaction(args,passwd); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) { + if args.Nonce == nil { + s.nonceLock.LockAddr(args.From) + defer s.nonceLock.UnlockAddr(args.From) + } + signed, err := s.signTransaction(ctx, &args, passwd) + if err != nil { + log.Warn("Failed transaction send attempt", "from", args.From, "to", args.To, "value", args.Value.ToInt(), "err", err) + return common.Hash{}, err + } + return SubmitTransaction(ctx, s.b, signed) +}// SendTransaction will create a transaction from the given arguments and +// tries to sign it with the key associated with args.To. If the given passwd isn't +// able to decrypt the key it fails. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_sign + +Sign calculates an Ethereum ECDSA signature for: +keccack256("\x19Ethereum Signed Message:\n" + len(message) + message)) + +Note, the produced signature conforms to the secp256k1 curve R, S and V values, +where the V value will be 27 or 28 for legacy reasons. + +The key used to calculate the signature is decrypted with the given password. + +https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +data hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +addr common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__3:__ +passwd string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sign", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.sign(data,addr,passwd); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) Sign(ctx context.Context, data hexutil.Bytes, addr common.Address, passwd string) (hexutil.Bytes, error) { + account := accounts.Account{Address: addr} + wallet, err := s.b.AccountManager().Find(account) + if err != nil { + return nil, err + } + signature, err := wallet.SignTextWithPassphrase(account, passwd, data) + if err != nil { + log.Warn("Failed data sign attempt", "address", addr, "err", err) + return nil, err + } + signature[crypto.RecoveryIDOffset] += 27 + return signature, nil +}// Sign calculates an Ethereum ECDSA signature for: +// keccack256("\x19Ethereum Signed Message:\n" + len(message) + message)) +// +// Note, the produced signature conforms to the secp256k1 curve R, S and V values, +// where the V value will be 27 or 28 for legacy reasons. +// +// The key used to calculate the signature is decrypted with the given password. +// +// https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign + +``` +View on GitHub → +

+
+ +--- + + + +### personal_signAndSendTransaction + +SignAndSendTransaction was renamed to SendTransaction. This method is deprecated +and will be removed in the future. It primary goal is to give clients time to update. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - 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: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - value: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +passwd string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signAndSendTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.signAndSendTransaction(args,passwd); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) SignAndSendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) { + return s.SendTransaction(ctx, args, passwd) +}// SignAndSendTransaction was renamed to SendTransaction. This method is deprecated +// and will be removed in the future. It primary goal is to give clients time to update. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_signTransaction + +SignTransaction will create a transaction from the given arguments and +tries to sign it with the key associated with args.To. If the given passwd isn't +able to decrypt the key it fails. The transaction is returned in RLP-form, not broadcast +to other nodes + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +args SendTxArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - 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` + + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - from: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - gas: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +passwd string + + + Required: ✓ Yes + + + + + + +__Result__ + + + + +*SignTransactionResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - raw: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - tx: + - additionalProperties: `false` + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "additionalProperties": false, + "properties": { + "raw": { + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": "string" + }, + "tx": { + "additionalProperties": false, + "type": "object" + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signTransaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.signTransaction(args,passwd); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) SignTransaction(ctx context.Context, args SendTxArgs, passwd string) (*SignTransactionResult, error) { + if args.Gas == nil { + return nil, fmt.Errorf("gas not specified") + } + if args.GasPrice == nil { + return nil, fmt.Errorf("gasPrice not specified") + } + if args.Nonce == nil { + return nil, fmt.Errorf("nonce not specified") + } + if err := checkTxFee(args.GasPrice.ToInt(), uint64(*args.Gas), s.b.RPCTxFeeCap()); err != nil { + return nil, err + } + signed, err := s.signTransaction(ctx, &args, passwd) + if err != nil { + log.Warn("Failed transaction sign attempt", "from", args.From, "to", args.To, "value", args.Value.ToInt(), "err", err) + return nil, err + } + data, err := rlp.EncodeToBytes(signed) + if err != nil { + return nil, err + } + return &SignTransactionResult{data, signed}, nil +}// SignTransaction will create a transaction from the given arguments and +// tries to sign it with the key associated with args.To. If the given passwd isn't +// able to decrypt the key it fails. The transaction is returned in RLP-form, not broadcast +// to other nodes + +``` +View on GitHub → +

+
+ +--- + + + +### personal_unlockAccount + +UnlockAccount will unlock the account associated with the given address with +the given password for duration seconds. If duration is nil it will use a +default of 300 seconds. It returns an indication if the account was unlocked. + + +__Params (3)__ + +Parameters must be given _by position_. + + +__1:__ +addr common.Address + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash POINTER", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +password string + + + Required: ✓ Yes + + + + + +__3:__ +duration *uint64 + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of the integer", + "pattern": "^0x[a-fA-F0-9]+$", + "title": "integer", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +bool + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unlockAccount", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.unlockAccount(addr,password,duration); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) UnlockAccount(ctx context.Context, addr common.Address, password string, duration *uint64) (bool, error) { + if s.b.ExtRPCEnabled() && !s.b.AccountManager().Config().InsecureUnlockAllowed { + return false, errors.New("account unlock with HTTP access is forbidden") + } + const max = uint64(time.Duration(math.MaxInt64) / time.Second) + var d time.Duration + if duration == nil { + d = 300 * time.Second + } else if *duration > max { + return false, errors.New("unlock duration too large") + } else { + d = time.Duration(*duration) * time.Second + } + ks, err := fetchKeystore(s.am) + if err != nil { + return false, err + } + err = ks.TimedUnlock(accounts.Account{Address: addr}, password, d) + if err != nil { + log.Warn("Failed account unlock attempt", "address", addr, "err", err) + } + return err == nil, err +}// UnlockAccount will unlock the account associated with the given address with +// the given password for duration seconds. If duration is nil it will use a +// default of 300 seconds. It returns an indication if the account was unlocked. + +``` +View on GitHub → +

+
+ +--- + + + +### personal_unpair + +Unpair deletes a pairing between wallet and geth. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +url string + + + Required: ✓ Yes + + + + + +__2:__ +pin string + + + Required: ✓ Yes + + + + + + +__Result__ + +_None_ + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unpair", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + personal.unpair(url,pin); + ``` + + +
Source code +

+```go +func (s *PrivateAccountAPI) Unpair(ctx context.Context, url string, pin string) error { + wallet, err := s.am.Wallet(url) + if err != nil { + return err + } + switch wallet := wallet.( // Unpair deletes a pairing between wallet and geth. + type) { + case *scwallet.Wallet: + return wallet.Unpair([]byte(pin)) + default: + return fmt.Errorf("specified wallet does not support pairing") + } +} +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/trace.md b/docs/JSON-RPC-API/modules/trace.md new file mode 100755 index 0000000000..8b77ba80bf --- /dev/null +++ b/docs/JSON-RPC-API/modules/trace.md @@ -0,0 +1,791 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### trace_block + +Block returns the structured logs created during the execution of +EVM and returns them as a JSON object. +The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +number rpc.BlockNumber + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - oneOf: + + - type: string + - title: `blockNumberTag` + - description: `The block height description` + - enum: earliest, latest, pending + + + - title: `uint64` + - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + - title: `blockNumberIdentifier` + + + ``` + +=== "Raw" + + ``` Raw + { + "oneOf": [ + { + "description": "The block height description", + "enum": [ + "earliest", + "latest", + "pending" + ], + "title": "blockNumberTag", + "type": [ + "string" + ] + }, + { + "description": "Hex representation of a uint64", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint64", + "type": [ + "string" + ] + } + ], + "title": "blockNumberIdentifier" + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - overrides: + - additionalProperties: `true` + + - DisableMemory: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Timeout: + - type: `string` + + - Debug: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - Tracer: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +interface []interface{} + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - additionalProperties: `true` + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": true + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_block", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + trace.block(number,config); + ``` + + +
Source code +

+```go +func (api *PrivateTraceAPI) Block(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([ // Block returns the structured logs created during the execution of +// EVM and returns them as a JSON object. +// The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module. +]interface{}, error) { + var block *types.Block + switch number { + case rpc.PendingBlockNumber: + block = api.eth.miner.PendingBlock() + case rpc.LatestBlockNumber: + block = api.eth.blockchain.CurrentBlock() + default: + block = api.eth.blockchain.GetBlockByNumber(uint64(number)) + } + if block == nil { + return nil, fmt.Errorf("block #%d not found", number) + } + config = setConfigTracerToParity(config) + traceResults, err := traceBlockByNumber(ctx, api.eth, number, config) + if err != nil { + return nil, err + } + traceReward, err := traceBlockReward(ctx, api.eth, block, config) + if err != nil { + return nil, err + } + traceUncleRewards, err := traceBlockUncleRewards(ctx, api.eth, block, config) + if err != nil { + return nil, err + } + results := [ // Fetch the block that we want to trace + ]interface{}{} + for _, result := range traceResults { + var tmp []interface{} + if err := json.Unmarshal(result.Result.(json.RawMessage), &tmp); err != nil { + return nil, err + } + results = append(results, tmp...) + } + results = append(results, traceReward) + for _, uncleReward := range traceUncleRewards { + results = append(results, uncleReward) + } + return results, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### trace_filter + + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +args ethapi.CallArgs + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - 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` + + - 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` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - type: object + - additionalProperties: `false` + - properties: + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Tracer: + - type: `string` + + - DisableStack: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Timeout: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +txTraceResult []*txTraceResult + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - items: + + - additionalProperties: `false` + - properties: + - error: + - type: `string` + + - result: + - additionalProperties: `true` + + + - type: object + + + - type: array + + + ``` + +=== "Raw" + + ``` Raw + { + "items": [ + { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "result": { + "additionalProperties": true + } + }, + "type": [ + "object" + ] + } + ], + "type": [ + "array" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_filter", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + trace.filter(args,config); + ``` + + +
Source code +

+```go +func (api *PrivateTraceAPI) Filter(ctx context.Context, args ethapi.CallArgs, config *TraceConfig) ([]*txTraceResult, error) { + return nil, nil +} +``` +View on GitHub → +

+
+ +--- + + + +### trace_transaction + +Transaction returns the structured logs created during the execution of EVM +and returns them as a JSON object. + + +__Params (2)__ + +Parameters must be given _by position_. + + +__1:__ +hash common.Hash + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of a Keccak 256 hash", + "pattern": "^0x[a-fA-F\\d]{64}$", + "title": "keccak", + "type": [ + "string" + ] + } + ``` + + + + +__2:__ +config *TraceConfig + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - additionalProperties: `false` + - properties: + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - Timeout: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - DisableReturnData: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Tracer: + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + + + +__Result__ + + + +interface interface{} + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_transaction", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + trace.transaction(hash,config); + ``` + + +
Source code +

+```go +func (api *PrivateTraceAPI) Transaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) { + config = setConfigTracerToParity(config) + return traceTransaction(ctx, api.eth, hash, config) +}// Transaction returns the structured logs created during the execution of EVM +// and returns them as a JSON object. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/txpool.md b/docs/JSON-RPC-API/modules/txpool.md new file mode 100755 index 0000000000..3e8af73d51 --- /dev/null +++ b/docs/JSON-RPC-API/modules/txpool.md @@ -0,0 +1,489 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### txpool_content + +Content returns the transactions contained within the transaction pool. + + +__Params (0)__ + +_None_ + +__Result__ + + + +mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string]*RPCTransaction + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - patternProperties: + - .*: + - patternProperties: + - .*: + - patternProperties: + - .*: + - additionalProperties: `false` + - properties: + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - s: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - to: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - gas: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - nonce: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + + - transactionIndex: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - value: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - input: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + + - type: `object` + + + - type: `object` + + + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "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" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "txpool_content", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + txpool.content(); + ``` + + +
Source code +

+```go +func (s *PublicTxPoolAPI) Content() map // Content returns the transactions contained within the transaction pool. +[string]map[string]map[string]*RPCTransaction { + content := map[string]map[string]map[string]*RPCTransaction{"pending": make(map[string]map[string]*RPCTransaction), "queued": make(map[string]map[string]*RPCTransaction)} + pending, queue := s.b.TxPoolContent() + for account, txs := range pending { + dump := make(map[string]*RPCTransaction) + for _, tx := range txs { + dump[fmt.Sprintf("%d", tx.Nonce())] = newRPCPendingTransaction(tx) + } + content["pending"][account.Hex()] = dump + } + for account, txs := range queue { + dump := make(map[string]*RPCTransaction) + for _, tx := range txs { + dump[fmt.Sprintf("%d", tx.Nonce())] = newRPCPendingTransaction(tx) + } + content["queued"][account.Hex()] = dump + } + return content +} +``` +View on GitHub → +

+
+ +--- + + + +### txpool_inspect + +Inspect retrieves the content of the transaction pool and flattens it into an +easily inspectable list. + + +__Params (0)__ + +_None_ + +__Result__ + + + +mapstringmapstringmapstringstring map[string]map[string]map[string]string + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - patternProperties: + - .*: + - patternProperties: + - .*: + - type: `object` + - patternProperties: + - .*: + - type: `string` + + + + + - type: `object` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "patternProperties": { + ".*": { + "patternProperties": { + ".*": { + "patternProperties": { + ".*": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "txpool_inspect", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + txpool.inspect(); + ``` + + +
Source code +

+```go +func (s *PublicTxPoolAPI) Inspect() map // Inspect retrieves the content of the transaction pool and flattens it into an +// easily inspectable list. +[string]map[string]map[string]string { + content := map[string]map[string]map[string]string{"pending": make(map[string]map[string]string), "queued": make(map[string]map[string]string)} + pending, queue := s.b.TxPoolContent() + var format = func(tx *types.Transaction) string { + if to := tx.To(); to != nil { + return fmt.Sprintf("%s: %v wei + %v gas × %v wei", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice()) + } + return fmt.Sprintf("contract creation: %v wei + %v gas × %v wei", tx.Value(), tx.Gas(), tx.GasPrice()) + } + for account, txs := // Define a formatter to flatten a transaction into a string + range pending { + dump := make(map[string]string) + for _, tx := range txs { + dump[fmt.Sprintf("%d", tx.Nonce())] = format(tx) + } + content["pending"][account.Hex()] = dump + } + for account, txs := range queue { + dump := make(map[string]string) + for _, tx := range txs { + dump[fmt.Sprintf("%d", tx.Nonce())] = format(tx) + } + content["queued"][account.Hex()] = dump + } + return content +} +``` +View on GitHub → +

+
+ +--- + + + +### txpool_status + +Status returns the number of pending and queued transaction in the pool. + + +__Params (0)__ + +_None_ + +__Result__ + + + +mapstringhexutilUint map[string]hexutil.Uint + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - patternProperties: + - .*: + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` + - type: `string` + + + - type: object + + + ``` + +=== "Raw" + + ``` Raw + { + "patternProperties": { + ".*": { + "description": "Hex representation of a uint", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "uint", + "type": "string" + } + }, + "type": [ + "object" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "txpool_status", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + txpool.status(); + ``` + + +
Source code +

+```go +func (s *PublicTxPoolAPI) Status() map // Status returns the number of pending and queued transaction in the pool. +[string]hexutil.Uint { + pending, queue := s.b.Stats() + return map[string]hexutil.Uint{"pending": hexutil.Uint(pending), "queued": hexutil.Uint(queue)} +} +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/JSON-RPC-API/modules/web3.md b/docs/JSON-RPC-API/modules/web3.md new file mode 100755 index 0000000000..3e753e63da --- /dev/null +++ b/docs/JSON-RPC-API/modules/web3.md @@ -0,0 +1,182 @@ + + + + + + + +| Entity | Version | +| --- | --- | +| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| OpenRPC | 1.2.6 | + +--- + + + + +### web3_clientVersion + +ClientVersion returns the node name + + +__Params (0)__ + +_None_ + +__Result__ + + + + +string + + + Required: ✓ Yes + + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "web3_clientVersion", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + web3.clientVersion(); + ``` + + +
Source code +

+```go +func (s *publicWeb3API) ClientVersion() string { + return s.stack.Server().Name +}// ClientVersion returns the node name + +``` +View on GitHub → +

+
+ +--- + + + +### web3_sha3 + +Sha3 applies the ethereum sha3 implementation on the input. +It assumes the input is hex encoded. + + +__Params (1)__ + +Parameters must be given _by position_. + + +__1:__ +input hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - title: `dataWord` + - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + + + +__Result__ + + + + +hexutil.Bytes + + + Required: ✓ Yes + + +=== "Schema" + + ``` Schema + + - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `dataWord` + - description: `Hex representation of some bytes` + + + ``` + +=== "Raw" + + ``` Raw + { + "description": "Hex representation of some bytes", + "pattern": "^0x([a-fA-F\\d])+$", + "title": "dataWord", + "type": [ + "string" + ] + } + ``` + + + +__Client Method Invocation Examples__ + +=== "Shell" + + ``` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "web3_sha3", "params": []}' + ``` + +=== "Javascript Console" + + ``` js + web3.sha3(input); + ``` + + +
Source code +

+```go +func (s *publicWeb3API) Sha3(input hexutil.Bytes) hexutil.Bytes { + return crypto.Keccak256(input) +}// Sha3 applies the ethereum sha3 implementation on the input. +// It assumes the input is hex encoded. + +``` +View on GitHub → +

+
+ +--- + diff --git a/docs/apis/openrpc.md b/docs/JSON-RPC-API/openrpc.md similarity index 90% rename from docs/apis/openrpc.md rename to docs/JSON-RPC-API/openrpc.md index de85f79b7a..db0be057ae 100644 --- a/docs/apis/openrpc.md +++ b/docs/JSON-RPC-API/openrpc.md @@ -1,10 +1,14 @@ --- +title: OpenRPC Discovery hide: - toc # Hide table of contents --- # OpenRPC +!!! tldr "TLDR" + The `rpc.discover` returns an API service description structured per the [OpenRPC specification](https://github.com/open-rpc/spec/blob/master/spec.md). + ## Discovery CoreGeth supports [OpenRPC's Service Discovery method](https://spec.open-rpc.org/#service-discovery-method), enabling efficient and well-spec'd JSON RPC interfacing and tooling. This method follows the established JSON RPC patterns, and is accessible via HTTP, WebSocket, IPC, and console servers. To use this method: diff --git a/docs/core/alltools.md b/docs/core/alltools.md index 21d6726e80..d75c6b5439 100644 --- a/docs/core/alltools.md +++ b/docs/core/alltools.md @@ -1,6 +1,7 @@ --- hide: - toc # Hide table of contents +title: Included Tools --- ## Executables diff --git a/docs/core/index.md b/docs/core/index.md new file mode 100644 index 0000000000..82e0c47bb5 --- /dev/null +++ b/docs/core/index.md @@ -0,0 +1,164 @@ +--- +title: About +--- + +# Core-Geth + +CoreGeth is sponsored by and maintained with the leadership of [ETC Labs](https://etclabs.org) with an obvious core intention of stewarding +the Ethereum Classic opinion that the reversion of transactions in inconvenient situations shouldn't be permissible. + +But the spirit of the project intends to reach beyond Ethereum and Ethereum Classic, and indeed to reimagine an EVM node software that +approaches the EVM-based protocols as technology that can -- and should -- be generalizable. + +While CoreGeth inherits from and exposes complete feature parity with Ethereum Foundation's :registered: [ethereum/go-ethereum](https://github.com/ethereum/go-ethereum), +there are quite few things that make CoreGeth unique. + +## Additional Features + +CoreGeth maintainers are [regular](https://github.com/ethereum/go-ethereum/pulls?q=author%3Ameowsbits) [contributors](https://github.com/ethereum/go-ethereum/pulls?q=author%3Aziogaschr+) [upstream](https://github.com/ethereum/go-ethereum/pulls?q=author%3Aiquidus+), but not all CoreGeth features are practicable or accepted there. The following categories document features specific to CoreGeth that ethereum/go-ethereum can't, or won't, implement. + +### Extended RPC API + +#### Comprehensive RPC API Service Discovery + +CoreGeth features a synthetic build/+runtime service discovery API, allowing you to get a [well structured](https://open-rpc.org/) +description of _all_ available methods, their parameters, and results. + +!!! tip "RPC Service Documentation" + For complete documentation of the available JSON RPC APIs, please see the [JSON RPC API page](/JSON-RPC-API/). + +#### Additional methods and options + +- Available `trace_block` and `trace_transaction` RPC API congruent to the OpenEthereum API (including a 1000x performance improvement vs. go-ethereum's `trace_transaction` in some cases). + + _TODO:_ Talk more about this! And examples! +- Added `debug_removePendingTransaction` API method ([#203](https://github.com/etclabscore/core-geth/pull/203/files)) +- Comprehensive service discovery with OpenRPC through method `rpc.discover`. + +### Extended CLI + +- `--eth.protocols` configures `eth/x` protocol prioritization, eg. `65,64,63`. + +### EVMCv6 Support + +- EVMCv6 support allows use with external EVMs (including EWASM). +- See [Running Geth with an External VM](./core/evmc) for more information. + +### Remote Store for Ancient Chaindata + +- Remote freezer, store your `ancient` data on Amazon S3 or Storj. + - _TODO_: Talk more about this, provide examples. + +### Developer Features: Tools + +- A developer mode `--dev.pow` able to mock Proof-of-Work block schemas and production at representative Poisson intervals. + + `--dev.poisson` configures Poisson intervals for block emission +- Chain configuration acceptance of OpenEthereum and go-ethereum chain configuration files (and the extensibility to support _any_ chain configuration schema). +- At the code level, a 1:1 EIP/ECIP specification to implementation pattern; disentangling Ethereum Foundation :registered: hard fork opinions from code. This yields more readable code, more precise naming and conceptual representation, more testable code, and a massive step toward Ethereum as a generalizeable technology. +- `copydb` will default to a sane fallback value if no parameter is passed for the second `` argument. +- The `faucet` command supports an `--attach` option allowing the program to reference an already-running node instance + (assuming it has an available RPC API) instead of restricting the faucet to a dedicated light client. Likewise, a `--syncmode=[full|fast|light]` option is provided for networks where _LES_ support may be lacking. + +### Risk Management + +- [Public](https://ci.etccore.in/blue/organizations/jenkins/core-geth-regression/activity) chaindata [regression testing](https://github.com/etclabscore/core-geth/blob/master/Jenkinsfile) run at each push to `master`. + +### Extended _Improvement Proposal_ Support (EIP, ECIP, *IP) + +- Myriad additional ECIP support: + + ECBP1100 (aka MESS, an "artificial finality" gadget) + + ECIP1099 (DAG growth limit) + + ECIP1014 (defuse difficulty bomb), etc. :wink: + +- Out-of-the-box support for Ethereum Classic, EtherSocial, Social, and MIX networks. + Chain configs are selected as `./build/bin/geth --`. For a list of supported networks and their CLI options, use `./build/bin/geth --help`. + +## Divergent Design + +How CoreGeth is built differently than ethereum/go-ethereum. + +### Developer Features: Code + +One of CoreGeth's most significant divergences from ethereum/go-ethereum at the code level is a reimagining (read: _massive overhaul_) of the `ChainConfig` data type and its methods. + +At _ethereum/go-ethereum_ the `ChainConfig` makes protocol-facing feature activation decisions as follows: + +```go +blockNumber := big.NewInt(0) +config := params.MainnetChainConfig +if config.IsByzantium(blockNumber) { + // do a special thing for post-Byzantium chains +} +``` + +This, for the uninitiated developer, raises some questions: +- What's Byzantium? +- Which of the nine distinct Byzantium upgrades is this implementing? +- Does feature `Byzantium.X` depend on also having `Byzantium.Y` activated? + +The developers of ethereum/go-ethereum have made this architectural decision because ethereum/go-ethereum is _only designed +and intended_ to support one chain: _Ethereum_. From this perspective, configurability presents a risk rather than a desirable feature. + +While a hardcoded feature-group pattern (ie _hardfork upgrades_) in some ways mitigates a risk of "movable parts," and undesirable or unintended feature interactions, +it also presents a massive hurdle for extensibility. + +!!! seealso "A metaphor" + Consider the metaphor of the wiring the electrical circuits of a house. + + With ethereum/go-ethereum's design, the television, the kitchen lights, the garbage disposal, and the garage door are all controlled by the same switch. If you want to watch TV, + you also have to have the kitchen lights on, the garbage disposal running, and the garage door open. + + For an electrician whose _only concern_ is meeting the arbitrary specifications of an eccentric customer who _demands_ that their + house work in this very strange way (forever), hard-installing these devices on the same circuit makes sense. The electrician commits to only + serving one customer with this house, and the customer commits to their wiring preference. + + But, for anyone _else_ looking at this house, the design is absurd. Another home-owner may want to use a TV + and a garage door in their own designs, but maybe don't want them to be codependent. Building the feature of a garbage disposal as being inextricable from a TV -- + from the perspective of a technologist (or consumer products designer, or anyone interested in these technologies as generalizeable things, rather than details of an eccentric house) -- + this arbitrary feature-bundling is patently absurd. + + This is an Ethereum-as-technology perspective versus an Ethereum-as-network perspective, and reimagining a home where you can have the kitchen lights on + without also turning the TV on is one of the things CoreGeth does. + +This same code as above, in CoreGeth, would look as follows: + +```go +blockNumber := big.NewInt(0) +config := params.MainnetChainConfig +if config.IsEnabled(config.EIP658Transition, blockNumber) { + // do a special thing for post-EIP658 chains +} +``` + +!!! example "Interface Reference" + The complete interface pattern for supported feature methods + can be found here: https://github.com/etclabscore/core-geth/blob/master/params/types/ctypes/configurator_iface.go + +The implicit feature-group `Byzantium` is deconstructed into its composite features, using EIPs and ECIP specifications as conceptual delineations as well as naming patterns. + +This makes the implementation of Improvement Proposal specifications referencable and readily testable. You can look up the implementation of EIP658 and see directly how it modifies transaction encoding, without having to disambiguate its implementation from state trie cleaning, gas repricing, opcode additions, block reward changes, or difficulty adjustments. + You can test block reward modifications without _also_ having to test difficulty adjustments (... and state root differences, and ...). + +!!! hint "Configuration Data Types" + Not only does CoreGeth's interface pattern provide descriptive, articulate code; it also + allows for the support of _arbitrary configuration data types_; CoreGeth supports configuration via + ethereum/go-ethereum's `genesis` data structure (eg. `geth dumpgenesis genesis.json`) as well as OpenEthereum's JSON configuration schema. + Extending support for any other configuration schema is likewise possible. + +As should be obvious by now, this also allows selective feature adoption for configurations that don't want to bundle changes exactly like the Ethereum Foundation has. + For example, without this decomposition, Ethereum Classic would have had to accept and (re)implement the Difficulty Bomb _and_ reduce block rewards in order to adopt a change to the RLP encoding of transaction receipts change :exploding_head: + + +## Limitations + +Things ethereum/go-ethereum can or will do that CoreGeth won't, or doesn't by default. + +- A huge and diverse number of default pipeline-delivered build targets. + This is a defaults and configuration sanity challenge for CoreGeth. We're vastly outnumbered by ethereum/go-ethereum maintainers + and contributors, and ensuring proper delivery of a whole bunch of diverse artifacts is beyond our capacity. + With that said, just because CoreGeth doesn't provide artifacts for a given architecture or OS doesn't mean it can't. + If ethereum/go-ethereum can build and package for it, then with some elbow grease, CoreGeth can too. +- The `puppeth` CLI program has been [removed](https://github.com/etclabscore/core-geth/pull/270). This is a "wizard"-style interactive program that helps beginners + configure chain and network settings. +- Trim absolute file paths during build. As of a [somewhat-recent](TODO) Go version, `go build` provides a `-trim` flag + which reduces the size of the binaries and anonymizes the build environment. This was removed because stripping file paths + caused automatic service discovery features to break (they depend, in part, on source file path availability for build-time AST and runtime reflection). diff --git a/docs/developers/build-from-source.md b/docs/developers/build-from-source.md index 3de2f75917..b07fced4b4 100644 --- a/docs/developers/build-from-source.md +++ b/docs/developers/build-from-source.md @@ -1,6 +1,10 @@ +--- +title: Build from Source +--- + ## Dependencies -- Make sure your system has __Go__ installed. Version 1.15+ is recommended. https://golang.org/doc/install +- Make sure your system has __Go__ installed. Version __1.15.5+__ is recommended. https://golang.org/doc/install - Make sure your system has a C compiler installed. For example, with Linux Ubuntu: ```shell @@ -32,4 +36,4 @@ Or with all tools: ```shell $ docker build -t core-geth-alltools -f Dockerfile.alltools . -``` \ No newline at end of file +``` diff --git a/docs/developers/create-new-release.md b/docs/developers/create-new-release.md index c481732373..514c884c3d 100644 --- a/docs/developers/create-new-release.md +++ b/docs/developers/create-new-release.md @@ -1,9 +1,10 @@ --- hide: - toc # Hide table of contents +title: Publishing a Release --- -# Developers: How to make a release +# Developers: How to Make a Release - [ ] Decide what the new version should be. In this example, __`v1.11.16[-stable]`__ will be used. - [ ] `git checkout master` diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index e75fb7d987..d86eeef4dc 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -1,3 +1,10 @@ +--- +title: Installation +--- + +!!! tip "Build from Source" + Instructions to build from source can be found [here](/developers/build-from-source/). + ## Pre-built executable If you just want to download and run `geth` or any of the other tools here, this is the quickest and simplest way. diff --git a/docs/getting-started/run-cli.md b/docs/getting-started/run-cli.md index c4e53d3184..029622ea7a 100644 --- a/docs/getting-started/run-cli.md +++ b/docs/getting-started/run-cli.md @@ -1,3 +1,7 @@ +--- +title: Command Line Interface (CLI) +--- + ## Running `geth` !!! tip "Use for Ethereum mainnet" @@ -329,4 +333,4 @@ MISC OPTIONS: COPYRIGHT: Copyright 2013-2020 The core-geth and go-ethereum Authors -``` \ No newline at end of file +``` diff --git a/docs/index.md b/docs/index.md index 2dc496f845..6de355e7a5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,7 @@ --- hide: - navigation # Hide navigation +title: CoreGeth --- # CoreGeth: An Ethereum Protocol Provider diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index 89afd906b2..a8c042476c 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -18,11 +18,16 @@ package ethclient import ( "context" + "encoding/json" "errors" "fmt" + "io/ioutil" "math/big" + "os" "reflect" + "strings" "testing" + "text/template" "time" "github.com/ethereum/go-ethereum" @@ -419,6 +424,288 @@ func TestRPCDiscover(t *testing.T) { } } +func printBullet(any interface{}, depth int) (out string) { + defer func() { + out += "\n" + }() + switch any.(type) { + case map[string]interface{}: + out += "\n" + for k, v := range any.(map[string]interface{}) { + out += fmt.Sprintf("%s- %s: %s", strings.Repeat("\t", depth), k, printBullet(v, depth+1)) + } + case []interface{}: + + // Don't know why this isn't working. Doesn't fire. + // if c, ok := any.([]string); ok { + // return strings.Join(c, ",") + // } + + stringSet := []string{} + for _, vv := range any.([]interface{}) { + if s, ok := vv.(string); ok { + stringSet = append(stringSet, s) + } + } + if len(stringSet) == len(any.([]interface{})) { + return strings.Join(stringSet, ", ") + } + + out += "\n" + for _, vv := range any.([]interface{}) { + out += printBullet(vv, depth+1) + } + default: + return fmt.Sprintf("`%v`", any) + } + return +} + +// TestRPCDiscover_BuildStatic puts the OpenRPC document in build/static/openrpc.json. +// This is intended to be run as a documentation development tool (as opposed to an actual _test_). +// NOTE that Go maps don't guarantee order, so the diff between runs can be noisy. +func TestRPCDiscover_BuildStatic(t *testing.T) { + if os.Getenv("COREGETH_GEN_OPENRPC_DOCS") == "" { + return + } + err := os.MkdirAll("../build/static", os.ModePerm) + if err != nil { + t.Fatal(err) + } + + backend, _ := newTestBackend(t) + client, _ := backend.Attach() + defer backend.Close() + defer client.Close() + + // Current workaround for https://github.com/open-rpc/meta-schema/issues/356. + res, err := backend.InprocDiscovery().Discover() + if err != nil { + t.Fatal(err) + } + + // Should do it this way. + // res := &meta_schema.OpenrpcDocument{} + // err = client.Call(res, "rpc.discover") + // if err != nil { + // t.Fatal(err) + // } + + data, err := json.MarshalIndent(res, "", " ") + if err != nil { + t.Fatal(err) + } + err = ioutil.WriteFile("../build/static/openrpc.json", data, os.ModePerm) + if err != nil { + t.Fatal(err) + } + + if res.Methods == nil { + return + } + + tpl := template.New("openrpc_doc") + + tpl.Funcs(template.FuncMap{ + // tomap gives a plain map from a JSON representation of a given value. + // This is useful because the meta_schema data types, being generated, and conforming to a pretty + // complex data type in the first place, are not super fun to interact with directly. + "tomap": func(any interface{}) map[string]interface{} { + out := make(map[string]interface{}) + data, _ := json.Marshal(any) + json.Unmarshal(data, &out) + return out + }, + // asjson returns indented JSON. + "asjson": func(any interface{}, prefix, indent int) string { + by, _ := json.MarshalIndent(any, strings.Repeat(" ", prefix), strings.Repeat(" ", indent)) + return string(by) + }, + // bulletJSON handles transforming a JSON JSON schema into bullet points, which I think are more legible. + "bulletJSON": printBullet, + "sum": func(a, b int) int { return a + b }, + // trimNameSpecialChars removes characters that the app-specific content descriptor naming + // method will also remove, eg '*hexutil.Uint64' -> 'hexutilUint64'. + // These "special" characters were removed because of concerns about by-name arguments + // and the use of titles for keys. + "trimNameSpecialChars": func(s string) string { + remove := []string{".", "*"} + for _, r := range remove { + s = strings.ReplaceAll(s, r, "") + } + return s + }, + // methodFormatJSConsole is a pretty-printer that returns the JS console use example for a method. + "methodFormatJSConsole": func(m *meta_schema.MethodObject) string { + name := string(*m.Name) + formattedName := strings.Replace(name, "_", ".", 1) + getParamName := func(cd *meta_schema.ContentDescriptorObject) string { + if cd.Name != nil { + return string(*cd.Name) + } + return string(*cd.Description) + } + paramNames := func() (paramNames []string) { + if m.Params == nil { + return nil + } + for _, n := range *m.Params { + if n.ContentDescriptorObject == nil { + continue // Should never happen in our implementation; never uses refs. + } + paramNames = append(paramNames, getParamName(n.ContentDescriptorObject)) + } + return + }() + return fmt.Sprintf("%s(%s);", formattedName, strings.Join(paramNames, ",")) + }, + }) + + tpl, err = tpl.Parse(` +{{ define "schemaTpl" }} + ` + "```" + ` +{{ bulletJSON . 1 }} + ` + "```" + ` + +
View Raw + ` + "```" + ` + {{ asjson . 1 1 }} + ` + "```" + ` +
+{{ end }} + +{{ define "contentDescTpl" -}} +{{ $nameyDescription := trimNameSpecialChars .description }} +{{ if eq .name $nameyDescription }} +{{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} +{{- else -}} +{{ .name }} {{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} +{{- end }} + + + Required: {{ if .required }}✓ Yes{{ else }}No{{- end}} +{{ if .deprecated }} + Deprecated: :warning: Yes{{- end}} +{{ if (or (gt (len .schema) 1) .schema.properties) }} +=== "Schema" + + ` + "```" + ` Schema + {{ bulletJSON .schema 1 }} + ` + "```" + ` + +=== "Raw" + + ` + "```" + ` Raw + {{ asjson .schema 1 1 }} + ` + "```" + ` +{{ end }} +{{ end }} + +{{ define "methodTpl" }} +{{ $methodmap := tomap . }} +### {{ .Name }} + +{{ .Summary }} + +__Params ({{ .Params | len }})__ +{{ if gt (.Params | len) 0 }} +{{ if eq $methodmap.paramStructure "by-position" }}Parameters must be given _by position_.{{ else if eq $methodmap.paramStructure "by-name" }}Parameters must be given _by name_.{{ end }} +{{ range $index, $param := .Params }} +{{ $parammap := . | tomap }} +__{{ sum $index 1 }}:__ {{ template "contentDescTpl" $parammap }} +{{ end }} +{{ else }} +_None_ +{{- end}} + +__Result__ + +{{ if .Result -}} +{{ $result := .Result | tomap }} +{{- if ne $result.name "Null" }} +{{ template "contentDescTpl" $result }} +{{- else -}} +_None_ +{{- end }} +{{- end }} + +__Client Method Invocation Examples__ + +=== "Shell" + + ` + "```" + ` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "{{ .Name }}", "params": []}' + ` + "```" + ` + +=== "Javascript Console" + + ` + "```" + ` js + {{ methodFormatJSConsole . }} + ` + "```" + ` + +{{ $docs := .ExternalDocs | tomap }} +
Source code +

+{{ .Description }} +View on GitHub → +

+
+ +--- +{{- end }} + +| Entity | Version | +| --- | --- | +| Source | {{ .Info.Version }} | +| OpenRPC | {{ .Openrpc }} | + +--- + +{{ range .Methods }} +{{ template "methodTpl" . }} +{{ end }} +`) + if err != nil { + t.Fatal(err) + } + + moduleMethods := func() (grouped map[string][]meta_schema.MethodObject) { + if res.Methods == nil { + return + } + grouped = make(map[string][]meta_schema.MethodObject) + for _, m := range *res.Methods { + moduleName := strings.Split(string(*m.Name), "_")[0] + group, ok := grouped[moduleName] + if !ok { + group = []meta_schema.MethodObject{} + } + group = append(group, m) + grouped[moduleName] = group + } + return + }() + + _ = os.MkdirAll("../docs/JSON-RPC-API/modules", os.ModePerm) + + for module, group := range moduleMethods { + fname := fmt.Sprintf("../docs/JSON-RPC-API/modules/%s.md", module) + fi, err := os.OpenFile(fname, os.O_CREATE|os.O_RDWR, os.ModePerm) + if err != nil { + t.Fatal(err) + } + fi.Truncate(0) + + nDoc := &meta_schema.OpenrpcDocument{} + *nDoc = *res + nDoc.Methods = (*meta_schema.Methods)(&group) + err = tpl.Execute(fi, nDoc) + if err != nil { + t.Fatal(err) + } + fi.Sync() + fi.Close() + } +} + func subscriptionTestSetup(t *testing.T) (genesisBlock *genesisT.Genesis, backend *node.Node) { // Generate test chain. // Code largely taken from generateTestChain() diff --git a/mkdocs.yml b/mkdocs.yml index 133ac5082f..7d2d47e8c6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,29 +62,10 @@ markdown_extensions: - pymdownx.emoji - pymdownx.superfences - pymdownx.details + - pymdownx.tabbed - pymdownx.magiclink: repo_url_shortener: true repo_url_shorthand: true social_url_shorthand: true - pymdownx.tasklist: custom_checkbox: true - -# Page tree -nav: - - Home: index.md - - Getting Started: - - Installation: getting-started/installation.md - - CLI: getting-started/run-cli.md - - Core: - - All tools: core/alltools.md - - EVMC: core/evmc.md - - APIs: - - JSON-RPC: apis/jsonrpc-apis.md - - OpenRPC: apis/openrpc.md - - Developers: - - Build from source: developers/build-from-source.md - - Documentation: developers/documentation.md - - Versioning: developers/versioning.md - - New release: developers/create-new-release.md - - Tutorials: - - Setup private network: tutorials/private-network.md diff --git a/params/version.go b/params/version.go index 0d5d4e3a75..e758e55c3c 100644 --- a/params/version.go +++ b/params/version.go @@ -23,7 +23,7 @@ import ( const ( VersionMajor = 1 // Major version component of the current release VersionMinor = 11 // Minor version component of the current release - VersionPatch = 21 // Patch version component of the current release + VersionPatch = 22 // Patch version component of the current release VersionMeta = "unstable" // Version metadata to append to the version string VersionName = "CoreGeth" ) From b6b1f4e5a147181a12141d4bbfe9e467a401743b Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 21 Jan 2021 14:04:37 -0600 Subject: [PATCH 02/12] ethclient,node: refactors docs-gen code to own test file - also fixup the accidentally-removed workaround for the cited open-rpc/meta-schema issue; see changes in node/node.go Date: 2021-01-21 14:04:37-06:00 Signed-off-by: meows --- ethclient/docsgen_test.go | 298 ++++++++++++++++++++++++++++++++++++ ethclient/ethclient_test.go | 287 ---------------------------------- node/node.go | 7 + 3 files changed, 305 insertions(+), 287 deletions(-) create mode 100644 ethclient/docsgen_test.go diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go new file mode 100644 index 0000000000..855a2402e2 --- /dev/null +++ b/ethclient/docsgen_test.go @@ -0,0 +1,298 @@ +package ethclient + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "strings" + "testing" + "text/template" + + meta_schema "github.com/open-rpc/meta-schema" +) + +// The test in this file is only for use as a development tool. + +// TestRPCDiscover_BuildStatic puts the OpenRPC document in build/static/openrpc.json. +// This is intended to be run as a documentation development tool (as opposed to an actual _test_). +// NOTE that Go maps don't guarantee order, so the diff between runs can be noisy. +func TestRPCDiscover_BuildStatic(t *testing.T) { + if os.Getenv("COREGETH_GEN_OPENRPC_DOCS") == "" { + return + } + err := os.MkdirAll("../build/static", os.ModePerm) + if err != nil { + t.Fatal(err) + } + + backend, _ := newTestBackend(t) + client, _ := backend.Attach() + defer backend.Close() + defer client.Close() + + // Current workaround for https://github.com/open-rpc/meta-schema/issues/356. + res, err := backend.InprocDiscovery_DEVELOPMENTONLY().Discover() + if err != nil { + t.Fatal(err) + } + + // Should do it this way. + // res := &meta_schema.OpenrpcDocument{} + // err = client.Call(res, "rpc.discover") + // if err != nil { + // t.Fatal(err) + // } + + data, err := json.MarshalIndent(res, "", " ") + if err != nil { + t.Fatal(err) + } + err = ioutil.WriteFile("../build/static/openrpc.json", data, os.ModePerm) + if err != nil { + t.Fatal(err) + } + + if res.Methods == nil { + return + } + + tpl := template.New("openrpc_doc") + + tpl.Funcs(template.FuncMap{ + // tomap gives a plain map from a JSON representation of a given value. + // This is useful because the meta_schema data types, being generated, and conforming to a pretty + // complex data type in the first place, are not super fun to interact with directly. + "tomap": func(any interface{}) map[string]interface{} { + out := make(map[string]interface{}) + data, _ := json.Marshal(any) + json.Unmarshal(data, &out) + return out + }, + // asjson returns indented JSON. + "asjson": func(any interface{}, prefix, indent int) string { + by, _ := json.MarshalIndent(any, strings.Repeat(" ", prefix), strings.Repeat(" ", indent)) + return string(by) + }, + // bulletJSON handles transforming a JSON JSON schema into bullet points, which I think are more legible. + "bulletJSON": printBullet, + "sum": func(a, b int) int { return a + b }, + // trimNameSpecialChars removes characters that the app-specific content descriptor naming + // method will also remove, eg '*hexutil.Uint64' -> 'hexutilUint64'. + // These "special" characters were removed because of concerns about by-name arguments + // and the use of titles for keys. + "trimNameSpecialChars": func(s string) string { + remove := []string{".", "*"} + for _, r := range remove { + s = strings.ReplaceAll(s, r, "") + } + return s + }, + // methodFormatJSConsole is a pretty-printer that returns the JS console use example for a method. + "methodFormatJSConsole": func(m *meta_schema.MethodObject) string { + name := string(*m.Name) + formattedName := strings.Replace(name, "_", ".", 1) + getParamName := func(cd *meta_schema.ContentDescriptorObject) string { + if cd.Name != nil { + return string(*cd.Name) + } + return string(*cd.Description) + } + paramNames := func() (paramNames []string) { + if m.Params == nil { + return nil + } + for _, n := range *m.Params { + if n.ContentDescriptorObject == nil { + continue // Should never happen in our implementation; never uses refs. + } + paramNames = append(paramNames, getParamName(n.ContentDescriptorObject)) + } + return + }() + return fmt.Sprintf("%s(%s);", formattedName, strings.Join(paramNames, ",")) + }, + }) + + tpl, err = tpl.Parse(` +{{ define "schemaTpl" }} + ` + "```" + ` +{{ bulletJSON . 1 }} + ` + "```" + ` + +
View Raw + ` + "```" + ` + {{ asjson . 1 1 }} + ` + "```" + ` +
+{{ end }} + +{{ define "contentDescTpl" -}} +{{ $nameyDescription := trimNameSpecialChars .description }} +{{ if eq .name $nameyDescription }} +{{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} +{{- else -}} +{{ .name }} {{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} +{{- end }} + + + Required: {{ if .required }}✓ Yes{{ else }}No{{- end}} +{{ if .deprecated }} + Deprecated: :warning: Yes{{- end}} +{{ if (or (gt (len .schema) 1) .schema.properties) }} +=== "Schema" + + ` + "```" + ` Schema + {{ bulletJSON .schema 1 }} + ` + "```" + ` + +=== "Raw" + + ` + "```" + ` Raw + {{ asjson .schema 1 1 }} + ` + "```" + ` +{{ end }} +{{ end }} + +{{ define "methodTpl" }} +{{ $methodmap := tomap . }} +### {{ .Name }} + +{{ .Summary }} + +__Params ({{ .Params | len }})__ +{{ if gt (.Params | len) 0 }} +{{ if eq $methodmap.paramStructure "by-position" }}Parameters must be given _by position_.{{ else if eq $methodmap.paramStructure "by-name" }}Parameters must be given _by name_.{{ end }} +{{ range $index, $param := .Params }} +{{ $parammap := . | tomap }} +__{{ sum $index 1 }}:__ {{ template "contentDescTpl" $parammap }} +{{ end }} +{{ else }} +_None_ +{{- end}} + +__Result__ + +{{ if .Result -}} +{{ $result := .Result | tomap }} +{{- if ne $result.name "Null" }} +{{ template "contentDescTpl" $result }} +{{- else -}} +_None_ +{{- end }} +{{- end }} + +__Client Method Invocation Examples__ + +=== "Shell" + + ` + "```" + ` shell + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "{{ .Name }}", "params": []}' + ` + "```" + ` + +=== "Javascript Console" + + ` + "```" + ` js + {{ methodFormatJSConsole . }} + ` + "```" + ` + +{{ $docs := .ExternalDocs | tomap }} +
Source code +

+{{ .Description }} +View on GitHub → +

+
+ +--- +{{- end }} + +| Entity | Version | +| --- | --- | +| Source | {{ .Info.Version }} | +| OpenRPC | {{ .Openrpc }} | + +--- + +{{ range .Methods }} +{{ template "methodTpl" . }} +{{ end }} +`) + if err != nil { + t.Fatal(err) + } + + moduleMethods := func() (grouped map[string][]meta_schema.MethodObject) { + if res.Methods == nil { + return + } + grouped = make(map[string][]meta_schema.MethodObject) + for _, m := range *res.Methods { + moduleName := strings.Split(string(*m.Name), "_")[0] + group, ok := grouped[moduleName] + if !ok { + group = []meta_schema.MethodObject{} + } + group = append(group, m) + grouped[moduleName] = group + } + return + }() + + _ = os.MkdirAll("../docs/JSON-RPC-API/modules", os.ModePerm) + + for module, group := range moduleMethods { + fname := fmt.Sprintf("../docs/JSON-RPC-API/modules/%s.md", module) + fi, err := os.OpenFile(fname, os.O_CREATE|os.O_RDWR, os.ModePerm) + if err != nil { + t.Fatal(err) + } + fi.Truncate(0) + + nDoc := &meta_schema.OpenrpcDocument{} + *nDoc = *res + nDoc.Methods = (*meta_schema.Methods)(&group) + err = tpl.Execute(fi, nDoc) + if err != nil { + t.Fatal(err) + } + fi.Sync() + fi.Close() + } +} + +// printBullet handles transforming a JSON JSON schema into bullet points, which I think are more legible. +func printBullet(any interface{}, depth int) (out string) { + defer func() { + out += "\n" + }() + switch typ := any.(type) { + case map[string]interface{}: + out += "\n" + for k, v := range typ { + out += fmt.Sprintf("%s- %s: %s", strings.Repeat("\t", depth), k, printBullet(v, depth+1)) + } + case []interface{}: + + // Don't know why this isn't working. Doesn't fire. + // if c, ok := any.([]string); ok { + // return strings.Join(c, ",") + // } + + stringSet := []string{} + for _, vv := range typ { + if s, ok := vv.(string); ok { + stringSet = append(stringSet, s) + } + } + if len(stringSet) == len(typ) { + return strings.Join(stringSet, ", ") + } + + out += "\n" + for _, vv := range typ { + out += printBullet(vv, depth+1) + } + default: + return fmt.Sprintf("`%v`", any) + } + return +} diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index a8c042476c..89afd906b2 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -18,16 +18,11 @@ package ethclient import ( "context" - "encoding/json" "errors" "fmt" - "io/ioutil" "math/big" - "os" "reflect" - "strings" "testing" - "text/template" "time" "github.com/ethereum/go-ethereum" @@ -424,288 +419,6 @@ func TestRPCDiscover(t *testing.T) { } } -func printBullet(any interface{}, depth int) (out string) { - defer func() { - out += "\n" - }() - switch any.(type) { - case map[string]interface{}: - out += "\n" - for k, v := range any.(map[string]interface{}) { - out += fmt.Sprintf("%s- %s: %s", strings.Repeat("\t", depth), k, printBullet(v, depth+1)) - } - case []interface{}: - - // Don't know why this isn't working. Doesn't fire. - // if c, ok := any.([]string); ok { - // return strings.Join(c, ",") - // } - - stringSet := []string{} - for _, vv := range any.([]interface{}) { - if s, ok := vv.(string); ok { - stringSet = append(stringSet, s) - } - } - if len(stringSet) == len(any.([]interface{})) { - return strings.Join(stringSet, ", ") - } - - out += "\n" - for _, vv := range any.([]interface{}) { - out += printBullet(vv, depth+1) - } - default: - return fmt.Sprintf("`%v`", any) - } - return -} - -// TestRPCDiscover_BuildStatic puts the OpenRPC document in build/static/openrpc.json. -// This is intended to be run as a documentation development tool (as opposed to an actual _test_). -// NOTE that Go maps don't guarantee order, so the diff between runs can be noisy. -func TestRPCDiscover_BuildStatic(t *testing.T) { - if os.Getenv("COREGETH_GEN_OPENRPC_DOCS") == "" { - return - } - err := os.MkdirAll("../build/static", os.ModePerm) - if err != nil { - t.Fatal(err) - } - - backend, _ := newTestBackend(t) - client, _ := backend.Attach() - defer backend.Close() - defer client.Close() - - // Current workaround for https://github.com/open-rpc/meta-schema/issues/356. - res, err := backend.InprocDiscovery().Discover() - if err != nil { - t.Fatal(err) - } - - // Should do it this way. - // res := &meta_schema.OpenrpcDocument{} - // err = client.Call(res, "rpc.discover") - // if err != nil { - // t.Fatal(err) - // } - - data, err := json.MarshalIndent(res, "", " ") - if err != nil { - t.Fatal(err) - } - err = ioutil.WriteFile("../build/static/openrpc.json", data, os.ModePerm) - if err != nil { - t.Fatal(err) - } - - if res.Methods == nil { - return - } - - tpl := template.New("openrpc_doc") - - tpl.Funcs(template.FuncMap{ - // tomap gives a plain map from a JSON representation of a given value. - // This is useful because the meta_schema data types, being generated, and conforming to a pretty - // complex data type in the first place, are not super fun to interact with directly. - "tomap": func(any interface{}) map[string]interface{} { - out := make(map[string]interface{}) - data, _ := json.Marshal(any) - json.Unmarshal(data, &out) - return out - }, - // asjson returns indented JSON. - "asjson": func(any interface{}, prefix, indent int) string { - by, _ := json.MarshalIndent(any, strings.Repeat(" ", prefix), strings.Repeat(" ", indent)) - return string(by) - }, - // bulletJSON handles transforming a JSON JSON schema into bullet points, which I think are more legible. - "bulletJSON": printBullet, - "sum": func(a, b int) int { return a + b }, - // trimNameSpecialChars removes characters that the app-specific content descriptor naming - // method will also remove, eg '*hexutil.Uint64' -> 'hexutilUint64'. - // These "special" characters were removed because of concerns about by-name arguments - // and the use of titles for keys. - "trimNameSpecialChars": func(s string) string { - remove := []string{".", "*"} - for _, r := range remove { - s = strings.ReplaceAll(s, r, "") - } - return s - }, - // methodFormatJSConsole is a pretty-printer that returns the JS console use example for a method. - "methodFormatJSConsole": func(m *meta_schema.MethodObject) string { - name := string(*m.Name) - formattedName := strings.Replace(name, "_", ".", 1) - getParamName := func(cd *meta_schema.ContentDescriptorObject) string { - if cd.Name != nil { - return string(*cd.Name) - } - return string(*cd.Description) - } - paramNames := func() (paramNames []string) { - if m.Params == nil { - return nil - } - for _, n := range *m.Params { - if n.ContentDescriptorObject == nil { - continue // Should never happen in our implementation; never uses refs. - } - paramNames = append(paramNames, getParamName(n.ContentDescriptorObject)) - } - return - }() - return fmt.Sprintf("%s(%s);", formattedName, strings.Join(paramNames, ",")) - }, - }) - - tpl, err = tpl.Parse(` -{{ define "schemaTpl" }} - ` + "```" + ` -{{ bulletJSON . 1 }} - ` + "```" + ` - -
View Raw - ` + "```" + ` - {{ asjson . 1 1 }} - ` + "```" + ` -
-{{ end }} - -{{ define "contentDescTpl" -}} -{{ $nameyDescription := trimNameSpecialChars .description }} -{{ if eq .name $nameyDescription }} -{{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} -{{- else -}} -{{ .name }} {{ .description }} {{ if .summary }}_{{ .summary }}_{{- end }} -{{- end }} - - + Required: {{ if .required }}✓ Yes{{ else }}No{{- end}} -{{ if .deprecated }} + Deprecated: :warning: Yes{{- end}} -{{ if (or (gt (len .schema) 1) .schema.properties) }} -=== "Schema" - - ` + "```" + ` Schema - {{ bulletJSON .schema 1 }} - ` + "```" + ` - -=== "Raw" - - ` + "```" + ` Raw - {{ asjson .schema 1 1 }} - ` + "```" + ` -{{ end }} -{{ end }} - -{{ define "methodTpl" }} -{{ $methodmap := tomap . }} -### {{ .Name }} - -{{ .Summary }} - -__Params ({{ .Params | len }})__ -{{ if gt (.Params | len) 0 }} -{{ if eq $methodmap.paramStructure "by-position" }}Parameters must be given _by position_.{{ else if eq $methodmap.paramStructure "by-name" }}Parameters must be given _by name_.{{ end }} -{{ range $index, $param := .Params }} -{{ $parammap := . | tomap }} -__{{ sum $index 1 }}:__ {{ template "contentDescTpl" $parammap }} -{{ end }} -{{ else }} -_None_ -{{- end}} - -__Result__ - -{{ if .Result -}} -{{ $result := .Result | tomap }} -{{- if ne $result.name "Null" }} -{{ template "contentDescTpl" $result }} -{{- else -}} -_None_ -{{- end }} -{{- end }} - -__Client Method Invocation Examples__ - -=== "Shell" - - ` + "```" + ` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "{{ .Name }}", "params": []}' - ` + "```" + ` - -=== "Javascript Console" - - ` + "```" + ` js - {{ methodFormatJSConsole . }} - ` + "```" + ` - -{{ $docs := .ExternalDocs | tomap }} -
Source code -

-{{ .Description }} -View on GitHub → -

-
- ---- -{{- end }} - -| Entity | Version | -| --- | --- | -| Source | {{ .Info.Version }} | -| OpenRPC | {{ .Openrpc }} | - ---- - -{{ range .Methods }} -{{ template "methodTpl" . }} -{{ end }} -`) - if err != nil { - t.Fatal(err) - } - - moduleMethods := func() (grouped map[string][]meta_schema.MethodObject) { - if res.Methods == nil { - return - } - grouped = make(map[string][]meta_schema.MethodObject) - for _, m := range *res.Methods { - moduleName := strings.Split(string(*m.Name), "_")[0] - group, ok := grouped[moduleName] - if !ok { - group = []meta_schema.MethodObject{} - } - group = append(group, m) - grouped[moduleName] = group - } - return - }() - - _ = os.MkdirAll("../docs/JSON-RPC-API/modules", os.ModePerm) - - for module, group := range moduleMethods { - fname := fmt.Sprintf("../docs/JSON-RPC-API/modules/%s.md", module) - fi, err := os.OpenFile(fname, os.O_CREATE|os.O_RDWR, os.ModePerm) - if err != nil { - t.Fatal(err) - } - fi.Truncate(0) - - nDoc := &meta_schema.OpenrpcDocument{} - *nDoc = *res - nDoc.Methods = (*meta_schema.Methods)(&group) - err = tpl.Execute(fi, nDoc) - if err != nil { - t.Fatal(err) - } - fi.Sync() - fi.Close() - } -} - func subscriptionTestSetup(t *testing.T) (genesisBlock *genesisT.Genesis, backend *node.Node) { // Generate test chain. // Code largely taken from generateTestChain() diff --git a/node/node.go b/node/node.go index ec68ffb3b4..26267fabf6 100644 --- a/node/node.go +++ b/node/node.go @@ -718,3 +718,10 @@ func GetAPIsByWhitelist(apis []rpc.API, modules []string, exposeAll bool) (regis } return registeredApis } + +// InprocDiscovery_DEVELOPMENTONLY is a development workaround method +// only, and should not be considered a stable part of the public interface for this receiver. +// Current workaround for https://github.com/open-rpc/meta-schema/issues/356. +func (n *Node) InprocDiscovery_DEVELOPMENTONLY() *go_openrpc_reflect.Document { + return n.inprocOpenRPC +} From b11ef02710568392f7552f295ced1f1c79c9735a Mon Sep 17 00:00:00 2001 From: Chris Ziogas Date: Thu, 21 Jan 2021 22:21:28 +0200 Subject: [PATCH 03/12] docs: add CSS that hides > 3rd level menus from TOC (markdown: `####`) --- docs/assets/css/extra.css | 3 +++ mkdocs.yml | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 docs/assets/css/extra.css diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css new file mode 100644 index 0000000000..c01fe4a37a --- /dev/null +++ b/docs/assets/css/extra.css @@ -0,0 +1,3 @@ +.md-nav.md-nav--secondary > ul ul ul { + display: none; +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 7d2d47e8c6..61860d4660 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -38,6 +38,9 @@ theme: - navigation.sections # - navigation.instant +extra_css: + - assets/css/extra.css + use_directory_urls: true plugins: From 8e230e353922f9bac99054ff6ea2a32d2c22f29e Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 21 Jan 2021 17:37:47 -0600 Subject: [PATCH 04/12] docs/assets/css/extra.css,ethclient: use h4 for param+result sections This allows more precise deep (anchor) linking. Fixes the extra css which remove the too-much-information ul's from the right secondary nav. Date: 2021-01-21 17:37:47-06:00 Signed-off-by: meows --- docs/assets/css/extra.css | 4 ++-- ethclient/docsgen_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css index c01fe4a37a..04b92b5cf1 100644 --- a/docs/assets/css/extra.css +++ b/docs/assets/css/extra.css @@ -1,3 +1,3 @@ -.md-nav.md-nav--secondary > ul ul ul { +nav.md-nav.md-nav--secondary > ul ul { display: none; -} \ No newline at end of file +} diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go index 855a2402e2..4361a51f2c 100644 --- a/ethclient/docsgen_test.go +++ b/ethclient/docsgen_test.go @@ -158,7 +158,7 @@ func TestRPCDiscover_BuildStatic(t *testing.T) { {{ .Summary }} -__Params ({{ .Params | len }})__ +#### Params ({{ .Params | len }}) {{ if gt (.Params | len) 0 }} {{ if eq $methodmap.paramStructure "by-position" }}Parameters must be given _by position_.{{ else if eq $methodmap.paramStructure "by-name" }}Parameters must be given _by name_.{{ end }} {{ range $index, $param := .Params }} @@ -169,7 +169,7 @@ __{{ sum $index 1 }}:__ {{ template "contentDescTpl" $parammap }} _None_ {{- end}} -__Result__ +#### Result {{ if .Result -}} {{ $result := .Result | tomap }} From b7500a6bb1d1be438a04c363f5fb0898f2a11ba1 Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 21 Jan 2021 17:39:31 -0600 Subject: [PATCH 05/12] docs/JSON-RPC-API: regenerate for 8e230e35 Signed-off-by: meows --- docs/JSON-RPC-API/modules/admin.md | 138 +-- docs/JSON-RPC-API/modules/debug.md | 914 +++++++-------- docs/JSON-RPC-API/modules/eth.md | 1494 ++++++++++++------------- docs/JSON-RPC-API/modules/ethash.md | 26 +- docs/JSON-RPC-API/modules/miner.md | 30 +- docs/JSON-RPC-API/modules/net.md | 14 +- docs/JSON-RPC-API/modules/personal.md | 144 +-- docs/JSON-RPC-API/modules/trace.md | 130 +-- docs/JSON-RPC-API/modules/txpool.md | 72 +- docs/JSON-RPC-API/modules/web3.md | 14 +- 10 files changed, 1488 insertions(+), 1488 deletions(-) diff --git a/docs/JSON-RPC-API/modules/admin.md b/docs/JSON-RPC-API/modules/admin.md index be7cab4ac2..3417db9ed8 100755 --- a/docs/JSON-RPC-API/modules/admin.md +++ b/docs/JSON-RPC-API/modules/admin.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -21,7 +21,7 @@ AddPeer requests connecting to a remote node, and also maintaining the new connection at all times, even reconnecting if it is lost. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -36,7 +36,7 @@ url string -__Result__ +#### Result @@ -94,7 +94,7 @@ func (api *privateAdminAPI) AddPeer(url string) (bool, error) { AddTrustedPeer allows a remote node to always connect, even if slots are full -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -109,7 +109,7 @@ url string -__Result__ +#### Result @@ -166,11 +166,11 @@ func (api *privateAdminAPI) AddTrustedPeer(url string) (bool, error) { Datadir retrieves the current data directory the node is using. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -217,7 +217,7 @@ func (api *publicAdminAPI) Datadir() string { -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -241,10 +241,10 @@ blockNr rpc.BlockNumber - type: string - - type: string - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - type: string @@ -285,7 +285,7 @@ blockNr rpc.BlockNumber -__Result__ +#### Result @@ -335,7 +335,7 @@ ExportChain exports the current blockchain into a local file, or a range of blocks if first and last are non-nil -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -359,10 +359,10 @@ first *uint64 ``` Schema - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - type: string - title: `integer` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` ``` @@ -393,10 +393,10 @@ last *uint64 ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -418,7 +418,7 @@ last *uint64 -__Result__ +#### Result @@ -494,7 +494,7 @@ func (api *PrivateAdminAPI) ExportChain(file string, first *uint64, last *uint64 ImportChain imports a blockchain from a local file. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -509,7 +509,7 @@ file string -__Result__ +#### Result @@ -593,7 +593,7 @@ func (api *PrivateAdminAPI) ImportChain(file string) (bool, error) { MaxPeers sets the maximum peer limit for the protocol manager and the p2p server. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -608,10 +608,10 @@ n int ``` Schema - - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -633,7 +633,7 @@ n int -__Result__ +#### Result @@ -691,11 +691,11 @@ NodeInfo retrieves all the information we know about the host node at the protocol granularity. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -711,41 +711,29 @@ __Result__ - additionalProperties: `false` - properties: - - protocols: + - listenAddr: + - type: `string` + + - name: + - type: `string` + + - ports: - additionalProperties: `false` - properties: - discovery: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - listener: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - type: `object` - - enode: - - type: `string` - - - enr: - - type: `string` - - - id: - - type: `string` - - - ip: - - type: `string` - - - listenAddr: - - type: `string` - - - name: - - type: `string` - - - ports: + - protocols: - additionalProperties: `false` - properties: - discovery: @@ -754,13 +742,25 @@ __Result__ - type: `string` - listener: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - type: `object` + - enode: + - type: `string` + + - enr: + - type: `string` + + - id: + - type: `string` + + - ip: + - type: `string` + - type: object @@ -874,11 +874,11 @@ Peers retrieves all the information we know about each individual peer at the protocol granularity. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -916,9 +916,6 @@ p2pPeerInfo []*p2p.PeerInfo - network: - additionalProperties: `false` - properties: - - static: - - type: `boolean` - - trusted: - type: `boolean` @@ -931,16 +928,15 @@ p2pPeerInfo []*p2p.PeerInfo - remoteAddress: - type: `string` + - static: + - type: `boolean` + - type: `object` - protocols: - - type: `object` - additionalProperties: `false` - properties: - - inbound: - - type: `boolean` - - localAddress: - type: `string` @@ -953,8 +949,12 @@ p2pPeerInfo []*p2p.PeerInfo - trusted: - type: `boolean` + - inbound: + - type: `boolean` + - type: `object` + - type: object @@ -1087,7 +1087,7 @@ func (api *publicAdminAPI) Peers() ([ // Peers retrieves all the information we RemovePeer disconnects from a remote node if the connection exists -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -1102,7 +1102,7 @@ url string -__Result__ +#### Result @@ -1160,7 +1160,7 @@ RemoveTrustedPeer removes a remote node from the trusted peer set, but it does not disconnect it automatically. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -1175,7 +1175,7 @@ url string -__Result__ +#### Result @@ -1233,7 +1233,7 @@ func (api *privateAdminAPI) RemoveTrustedPeer(url string) (bool, error) { StartRPC starts the HTTP RPC API server. -__Params (5)__ +#### Params (5) Parameters must be given _by position_. @@ -1257,10 +1257,10 @@ port *int ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -1309,7 +1309,7 @@ vhosts *string -__Result__ +#### Result @@ -1397,7 +1397,7 @@ func (api *privateAdminAPI) StartRPC(host *string, port *int, cors *string, apis StartWS starts the websocket RPC API server. -__Params (4)__ +#### Params (4) Parameters must be given _by position_. @@ -1464,7 +1464,7 @@ apis *string -__Result__ +#### Result @@ -1548,11 +1548,11 @@ func (api *privateAdminAPI) StartWS(host *string, port *int, allowedOrigins *str StopRPC shuts down the HTTP server. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -1601,11 +1601,11 @@ func (api *privateAdminAPI) StopRPC() (bool, error) { StopWS terminates all WebSocket servers. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result diff --git a/docs/JSON-RPC-API/modules/debug.md b/docs/JSON-RPC-API/modules/debug.md index 02da9a3868..9abb742bce 100755 --- a/docs/JSON-RPC-API/modules/debug.md +++ b/docs/JSON-RPC-API/modules/debug.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,7 +20,7 @@ AccountRange enumerates all accounts in the given block and start point in paging request -__Params (6)__ +#### Params (6) Parameters must be given _by position_. @@ -44,10 +44,10 @@ start []byte ``` Schema + - title: `bytes` - description: `Hex representation of a variable length byte array` - pattern: `^0x([a-fA-F0-9]?)+$` - type: string - - title: `bytes` ``` @@ -78,10 +78,10 @@ maxResults int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -130,7 +130,7 @@ incompletes bool -__Result__ +#### Result @@ -149,9 +149,19 @@ __Result__ - accounts: - patternProperties: - .*: - - type: `object` - additionalProperties: `false` - properties: + - 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` @@ -161,12 +171,12 @@ __Result__ - type: `string` - storage: - - type: `object` - patternProperties: - .*: - type: `string` + - type: `object` - address: - pattern: `^0x[a-fA-F\d]{64}$` @@ -176,18 +186,8 @@ __Result__ - balance: - type: `string` - - code: - - type: `string` - - - codeHash: - - type: `string` - - - key: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - + - type: `object` - type: `object` @@ -347,7 +347,7 @@ BacktraceAt sets the log backtrace location. See package log for details on the pattern syntax. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -362,7 +362,7 @@ location string -__Result__ +#### Result _None_ @@ -405,7 +405,7 @@ file. It uses a profile rate of 1 for most accurate information. If a different desired, set the rate and write the profile manually. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -454,7 +454,7 @@ nsec uint -__Result__ +#### Result _None_ @@ -500,11 +500,11 @@ ChaindbCompact flattens the entire key-value database into a single level, removing all unused slots and merging all keys. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result _None_ @@ -552,7 +552,7 @@ func (api *PrivateDebugAPI) ChaindbCompact() error { ChaindbProperty returns leveldb properties of the key-value database. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -567,7 +567,7 @@ property string -__Result__ +#### Result @@ -621,7 +621,7 @@ CpuProfile turns on CPU profiling for nsec seconds and writes profile data to file. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -645,10 +645,10 @@ nsec uint ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -670,7 +670,7 @@ nsec uint -__Result__ +#### Result _None_ @@ -716,7 +716,7 @@ func (h *HandlerT) CpuProfile(file string, nsec uint) error { DumpBlock retrieves the entire state of the database at a given block. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -740,10 +740,10 @@ blockNr rpc.BlockNumber - type: string + - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint64` @@ -784,7 +784,7 @@ blockNr rpc.BlockNumber -__Result__ +#### Result @@ -803,11 +803,17 @@ __Result__ - accounts: - patternProperties: - .*: + - additionalProperties: `false` - properties: - - nonce: + - 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` @@ -834,14 +840,8 @@ __Result__ - codeHash: - type: `string` - - key: - - title: `dataWord` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - type: `object` - - additionalProperties: `false` - type: `object` @@ -972,11 +972,11 @@ func (api *PublicDebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error FreeOSMemory forces a garbage collection. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result _None_ @@ -1016,11 +1016,11 @@ func (*HandlerT) FreeOSMemory() { GcStats returns GC statistics. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -1036,45 +1036,45 @@ __Result__ - additionalProperties: `false` - properties: + - 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: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - LastGC: - - type: `string` - format: `date-time` + - type: `string` - NumGC: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - Pause: - items: - - type: `string` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - type: `array` - - - PauseEnd: - - items: - - format: `date-time` - type: `string` - type: `array` - - PauseQuantiles: - - type: `array` - - items: - - type: `string` - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - type: object @@ -1174,11 +1174,11 @@ GetBadBlocks returns a list of the last 'bad blocks' that the client has seen on and returns them as a JSON list of block-hashes -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -1191,96 +1191,95 @@ BadBlockArgs []*BadBlockArgs ``` Schema + - type: array - items: + - type: object - additionalProperties: `false` - properties: - block: - additionalProperties: `false` - properties: - - difficulty: + - mixHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - gasLimit: + - error: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - extraData: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - title: `uint64` - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - size: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - - miner: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - number: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - receiptsRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - timestamp: - - title: `uint64` + - miner: + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` + - pattern: `^0x[a-fA-F\d]{64}$` - - transactionsRoot: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - uncles: + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - transactions: - items: - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - additionalProperties: `true` - type: `array` - - error: + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` + - gasLimit: - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - mixHash: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - nonce: + - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - parentHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - stateRoot: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -1290,44 +1289,45 @@ BadBlockArgs []*BadBlockArgs - title: `integer` - type: `string` - - transactions: + - uncles: - items: - - additionalProperties: `true` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - type: `array` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + - logsBloom: - - maxItems: `256` - - minItems: `256` - - type: `array` - items: - - type: `string` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - - sha3Uncles: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - maxItems: `256` + - minItems: `256` + - type: `array` - type: `object` - hash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - rlp: - type: `string` - - type: object - - type: array ``` @@ -1533,7 +1533,7 @@ func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([ // GetBadBlocks GetBlockRlp retrieves the RLP encoded for of a single block. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -1548,10 +1548,10 @@ number uint64 ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -1573,7 +1573,7 @@ number uint64 -__Result__ +#### Result @@ -1633,7 +1633,7 @@ code hash, or storage hash. With one parameter, returns the list of accounts modified in the specified block. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1648,10 +1648,10 @@ startHash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1707,7 +1707,7 @@ endHash *common.Hash -__Result__ +#### Result @@ -1722,10 +1722,10 @@ commonAddress []common.Address - items: - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` - type: array @@ -1816,7 +1816,7 @@ code hash, or storage hash. With one parameter, returns the list of accounts modified in the specified block. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1831,10 +1831,10 @@ startNum uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -1890,7 +1890,7 @@ endNum *uint64 -__Result__ +#### Result @@ -1996,7 +1996,7 @@ GoTrace turns on tracing for nsec seconds and writes trace data to file. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -2020,10 +2020,10 @@ nsec uint ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -2045,7 +2045,7 @@ nsec uint -__Result__ +#### Result _None_ @@ -2091,11 +2091,11 @@ func (h *HandlerT) GoTrace(file string, nsec uint) error { MemStats returns detailed runtime memory statistics. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -2109,117 +2109,84 @@ __Result__ ``` Schema - - additionalProperties: `false` - properties: - - HeapInuse: + - HeapObjects: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - MSpanInuse: + - PauseTotalNs: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - OtherSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - NumForcedGC: + - StackInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - PauseEnd: + - BySize: + - type: `array` - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - additionalProperties: `false` + - properties: + - Mallocs: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - maxItems: `256` - - minItems: `256` - - type: `array` + - Size: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - TotalAlloc: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - Frees: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - BuckHashSys: + + - type: `object` + + - maxItems: `61` + - minItems: `61` + + - GCSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Lookups: + - LastGC: - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - OtherSys: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - Frees: + - MSpanInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - HeapAlloc: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - LastGC: + - BuckHashSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - NextGC: + - HeapIdle: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - PauseNs: - - minItems: `256` - - type: `array` - - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - maxItems: `256` - - - StackInuse: - - pattern: `^0x[a-fA-F0-9]+$` + - HeapReleased: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - BySize: - - minItems: `61` - - type: `array` - - items: - - additionalProperties: `false` - - properties: - - Frees: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Mallocs: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - Size: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - - type: `object` - - - maxItems: `61` - - - Sys: + - NumForcedGC: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2229,12 +2196,18 @@ __Result__ - title: `integer` - type: `string` - - HeapIdle: - - type: `string` + - TotalAlloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - HeapReleased: + - EnableGC: + - type: `boolean` + + - GCCPUFraction: + - type: `number` + + - HeapInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2244,28 +2217,30 @@ __Result__ - title: `integer` - type: `string` - - PauseTotalNs: + - NextGC: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - DebugGC: - type: `boolean` - - HeapSys: + - HeapAlloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - EnableGC: - - type: `boolean` + - HeapSys: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - GCSys: + - MCacheSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - HeapObjects: + - Frees: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2275,31 +2250,56 @@ __Result__ - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - PauseEnd: + - minItems: `256` + - type: `array` + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - maxItems: `256` + + - PauseNs: + - type: `array` + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - maxItems: `256` + - minItems: `256` + + - Alloc: + - 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` - - pattern: `^0x[a-fA-F0-9]+$` - - GCCPUFraction: - - type: `number` - - - MCacheSys: + - Lookups: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Alloc: + - Sys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - type: object + - additionalProperties: `false` ``` @@ -2546,7 +2546,7 @@ It uses a profile rate of 1 for most accurate information. If a different rate i desired, set the rate and write the profile manually. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -2595,7 +2595,7 @@ nsec uint -__Result__ +#### Result _None_ @@ -2640,7 +2640,7 @@ func (*HandlerT) MutexProfile(file string, nsec uint) error { Preimage is a debug API function that returns the preimage for a sha3 hash, if known. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2655,10 +2655,10 @@ hash common.Hash ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -2680,7 +2680,7 @@ hash common.Hash -__Result__ +#### Result @@ -2756,7 +2756,7 @@ func (api *PrivateDebugAPI) Preimage(ctx context.Context, hash common.Hash) (hex PrintBlock retrieves a block and returns its pretty printed form. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2796,7 +2796,7 @@ number uint64 -__Result__ +#### Result @@ -2849,7 +2849,7 @@ RemovePendingTransaction removes a transaction from the txpool. It returns the transaction removed, if any. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2889,7 +2889,7 @@ hash common.Hash -__Result__ +#### Result @@ -2959,7 +2959,7 @@ func (api *PrivateDebugAPI) RemovePendingTransaction(hash common.Hash) (*types.T SeedHash retrieves the seed hash of a block. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2974,10 +2974,10 @@ number uint64 ``` Schema + - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string ``` @@ -2999,7 +2999,7 @@ number uint64 -__Result__ +#### Result @@ -3055,7 +3055,7 @@ SetBlockProfileRate sets the rate of goroutine block profile data collection. rate 0 disables block profiling. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3070,10 +3070,10 @@ rate int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -3095,7 +3095,7 @@ rate int -__Result__ +#### Result _None_ @@ -3137,7 +3137,7 @@ SetGCPercent sets the garbage collection target percentage. It returns the previ setting. A negative value disables GC. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3152,10 +3152,10 @@ v int ``` Schema - - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -3177,7 +3177,7 @@ v int -__Result__ +#### Result @@ -3251,7 +3251,7 @@ func (*HandlerT) SetGCPercent(v int) int { SetHead rewinds the head of the blockchain to a previous block. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3266,10 +3266,10 @@ number hexutil.Uint64 ``` Schema - - title: `uint64` - - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint64` + - description: `Hex representation of a uint64` ``` @@ -3291,7 +3291,7 @@ number hexutil.Uint64 -__Result__ +#### Result _None_ @@ -3331,7 +3331,7 @@ func (api *PrivateDebugAPI) SetHead(number hexutil.Uint64) { SetMutexProfileFraction sets the rate of mutex profiling. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3371,7 +3371,7 @@ rate int -__Result__ +#### Result _None_ @@ -3411,11 +3411,11 @@ func (*HandlerT) SetMutexProfileFraction(rate int) { Stacks returns a printed representation of the stacks of all goroutines. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -3467,7 +3467,7 @@ execution of EVM against a block pulled from the pool of bad ones to the local file system and returns a list of files to the caller. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -3482,10 +3482,10 @@ hash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -3518,39 +3518,39 @@ config *StdTraceConfig - additionalProperties: `false` - properties: - - Debug: + - DisableMemory: - type: `boolean` - - DisableMemory: + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - TxHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - Debug: - type: `boolean` - DisableReturnData: - type: `boolean` - - DisableStorage: + - DisableStack: - type: `boolean` - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - DisableStorage: + - type: `boolean` - 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` - - DisableStack: - - type: `boolean` - - type: object @@ -3607,7 +3607,7 @@ config *StdTraceConfig -__Result__ +#### Result @@ -3620,12 +3620,12 @@ string []string ``` Schema - - type: array - items: - type: string + - type: array ``` @@ -3695,7 +3695,7 @@ execution of EVM to the local file system and returns a list of files to the caller. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -3744,43 +3744,43 @@ config *StdTraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: - - Debug: - - type: `boolean` - - - DisableStorage: - - type: `boolean` - - DisableMemory: - type: `boolean` - - DisableReturnData: - - type: `boolean` - - DisableStack: - type: `boolean` - - Limit: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` + - DisableStorage: + - type: `boolean` - Reexec: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - TxHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - Debug: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - overrides: - additionalProperties: `true` + - type: object ``` @@ -3835,7 +3835,7 @@ config *StdTraceConfig -__Result__ +#### Result @@ -3919,7 +3919,7 @@ func (api *PrivateDebugAPI) StandardTraceBlockToFile(ctx context.Context, hash c StartCPUProfile turns on CPU profiling, writing to the given file. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3934,7 +3934,7 @@ file string -__Result__ +#### Result _None_ @@ -3990,7 +3990,7 @@ func (h *HandlerT) StartCPUProfile(file string) error { StartGoTrace turns on tracing, writing to the given file. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -4005,7 +4005,7 @@ file string -__Result__ +#### Result _None_ @@ -4061,11 +4061,11 @@ func (h *HandlerT) StartGoTrace(file string) error { StopCPUProfile stops an ongoing CPU profile. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result _None_ @@ -4115,11 +4115,11 @@ func (h *HandlerT) StopCPUProfile() error { StopTrace stops an ongoing trace. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result _None_ @@ -4169,7 +4169,7 @@ func (h *HandlerT) StopGoTrace() error { StorageRangeAt returns the storage at the given block height and transaction index. -__Params (5)__ +#### Params (5) Parameters must be given _by position_. @@ -4184,10 +4184,10 @@ blockHash common.Hash ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -4218,10 +4218,10 @@ txIndex int ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -4252,10 +4252,10 @@ contractAddress common.Address ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string + - title: `keccak` ``` @@ -4320,10 +4320,10 @@ maxResult int ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -4345,7 +4345,7 @@ maxResult int -__Result__ +#### Result @@ -4377,9 +4377,9 @@ __Result__ - type: `string` - value: - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - type: `object` @@ -4486,7 +4486,7 @@ This is a temporary method to debug the externalsigner integration, TODO: Remove this method when the integration is mature -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4501,10 +4501,10 @@ address common.Address ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -4535,10 +4535,10 @@ number uint64 ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -4560,7 +4560,7 @@ number uint64 -__Result__ +#### Result @@ -4574,10 +4574,10 @@ __Result__ ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` ``` @@ -4663,7 +4663,7 @@ EVM against a block pulled from the pool of bad ones and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4715,40 +4715,40 @@ config *TraceConfig - type: object - additionalProperties: `false` - properties: - - DisableReturnData: + - DisableMemory: - type: `boolean` - - DisableStack: + - DisableReturnData: - type: `boolean` - - Limit: + - Timeout: - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - Tracer: - type: `string` + - overrides: + - additionalProperties: `true` + - Debug: - type: `boolean` - - DisableMemory: + - DisableStack: - type: `boolean` - DisableStorage: - type: `boolean` - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` + - Limit: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - Timeout: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - overrides: - - additionalProperties: `true` - @@ -4805,7 +4805,7 @@ config *TraceConfig -__Result__ +#### Result @@ -4822,12 +4822,12 @@ txTraceResult []*txTraceResult - additionalProperties: `false` - properties: - - result: - - additionalProperties: `true` - - error: - type: `string` + - result: + - additionalProperties: `true` + - type: object @@ -4910,7 +4910,7 @@ TraceBlock returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4959,44 +4959,44 @@ config *TraceConfig ``` Schema + - type: object + - additionalProperties: `false` - properties: - - Limit: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Timeout: - type: `string` - Tracer: - type: `string` + - Debug: + - type: `boolean` + - DisableMemory: - type: `boolean` - DisableReturnData: - type: `boolean` - - DisableStack: + - DisableStorage: - type: `boolean` - - DisableStorage: + - DisableStack: - type: `boolean` + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Reexec: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - overrides: - additionalProperties: `true` - - Debug: - - type: `boolean` - - - type: object - - additionalProperties: `false` ``` @@ -5052,7 +5052,7 @@ config *TraceConfig -__Result__ +#### Result @@ -5065,8 +5065,10 @@ txTraceResult []*txTraceResult ``` Schema + - type: array - items: + - additionalProperties: `false` - properties: - error: - type: `string` @@ -5076,10 +5078,8 @@ txTraceResult []*txTraceResult - type: object - - additionalProperties: `false` - - type: array ``` @@ -5150,7 +5150,7 @@ TraceBlockByHash returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -5165,10 +5165,10 @@ hash common.Hash ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -5204,16 +5204,13 @@ config *TraceConfig - Debug: - type: `boolean` - - DisableReturnData: - - type: `boolean` - - - DisableStack: + - DisableMemory: - type: `boolean` - DisableStorage: - type: `boolean` - - Limit: + - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -5224,13 +5221,16 @@ config *TraceConfig - overrides: - additionalProperties: `true` - - DisableMemory: + - DisableReturnData: - type: `boolean` - - Reexec: - - type: `string` + - DisableStack: + - type: `boolean` + + - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - Timeout: - type: `string` @@ -5292,7 +5292,7 @@ config *TraceConfig -__Result__ +#### Result @@ -5307,6 +5307,8 @@ txTraceResult []*txTraceResult - items: + - type: object + - additionalProperties: `false` - properties: - error: - type: `string` @@ -5315,8 +5317,6 @@ txTraceResult []*txTraceResult - additionalProperties: `true` - - type: object - - additionalProperties: `false` - type: array @@ -5394,7 +5394,7 @@ TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -5409,21 +5409,21 @@ number rpc.BlockNumber ``` Schema + - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` + - description: `The block height description` - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string - - title: `blockNumberIdentifier` ``` @@ -5471,44 +5471,44 @@ config *TraceConfig ``` Schema - - additionalProperties: `false` - properties: - - DisableStack: + - DisableReturnData: - type: `boolean` - - Limit: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Tracer: - type: `string` - - DisableReturnData: + - Debug: - type: `boolean` - - DisableMemory: + - 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` - overrides: - additionalProperties: `true` - - Debug: + - DisableMemory: - type: `boolean` - type: object + - additionalProperties: `false` ``` @@ -5564,7 +5564,7 @@ config *TraceConfig -__Result__ +#### Result @@ -5579,16 +5579,16 @@ txTraceResult []*txTraceResult - items: + - additionalProperties: `false` - properties: - - error: - - type: `string` - - result: - additionalProperties: `true` + - error: + - type: `string` + - type: object - - additionalProperties: `false` - type: array @@ -5662,7 +5662,7 @@ TraceBlockFromFile returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -5686,44 +5686,44 @@ config *TraceConfig ``` Schema + - type: object - additionalProperties: `false` - properties: - - Debug: + - DisableMemory: - type: `boolean` - - DisableStorage: + - DisableReturnData: - type: `boolean` - - Reexec: - - title: `integer` + - Limit: - type: `string` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - Timeout: - type: `string` - - DisableMemory: - - type: `boolean` + - Tracer: + - type: `string` - - DisableReturnData: + - overrides: + - additionalProperties: `true` + + - Debug: - type: `boolean` - DisableStack: - type: `boolean` - - Limit: + - DisableStorage: + - type: `boolean` + + - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Tracer: - - type: `string` - - - overrides: - - additionalProperties: `true` - - - type: object ``` @@ -5779,7 +5779,7 @@ config *TraceConfig -__Result__ +#### Result @@ -5792,9 +5792,9 @@ txTraceResult []*txTraceResult ``` Schema - - type: array - items: + - type: object - additionalProperties: `false` - properties: - error: @@ -5804,9 +5804,9 @@ txTraceResult []*txTraceResult - additionalProperties: `true` - - type: object + - type: array ``` @@ -5882,7 +5882,7 @@ if the given transaction was added on top of the provided block and returns them You can provide -2 as a block number to trace on top of the pending block. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -5899,35 +5899,35 @@ args ethapi.CallArgs - additionalProperties: `false` - properties: - - to: + - from: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - - value: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` + + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - data: - - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - from: - - pattern: `^0x[a-fA-F\d]{64}$` + - to: - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - gasPrice: - - title: `integer` + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - type: object @@ -6000,17 +6000,12 @@ config *TraceConfig ``` Schema + - type: object - additionalProperties: `false` - properties: - - overrides: - - additionalProperties: `true` - - Debug: - type: `boolean` - - DisableReturnData: - - type: `boolean` - - DisableStorage: - type: `boolean` @@ -6019,12 +6014,15 @@ config *TraceConfig - title: `integer` - type: `string` - - Timeout: + - Tracer: - type: `string` - DisableMemory: - type: `boolean` + - DisableReturnData: + - type: `boolean` + - DisableStack: - type: `boolean` @@ -6033,11 +6031,13 @@ config *TraceConfig - title: `integer` - type: `string` - - Tracer: + - Timeout: - type: `string` + - overrides: + - additionalProperties: `true` + - - type: object ``` @@ -6093,7 +6093,7 @@ config *TraceConfig -__Result__ +#### Result @@ -6166,7 +6166,7 @@ TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -6181,10 +6181,10 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` ``` @@ -6215,23 +6215,15 @@ config *TraceConfig ``` Schema + - additionalProperties: `false` - properties: - - DisableStorage: - - type: `boolean` - - - Limit: + - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Debug: - - type: `boolean` - - - DisableMemory: - - type: `boolean` - - - DisableStack: - - type: `boolean` + - Timeout: + - type: `string` - Tracer: - type: `string` @@ -6242,17 +6234,25 @@ config *TraceConfig - DisableReturnData: - type: `boolean` - - Reexec: + - DisableStorage: + - type: `boolean` + + - Limit: - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - Timeout: - - type: `string` + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableStack: + - type: `boolean` - type: object - - additionalProperties: `false` ``` @@ -6308,7 +6308,7 @@ config *TraceConfig -__Result__ +#### Result @@ -6357,7 +6357,7 @@ Verbosity sets the log verbosity ceiling. The verbosity of individual packages and source files can be raised using Vmodule. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6397,7 +6397,7 @@ level int -__Result__ +#### Result _None_ @@ -6439,7 +6439,7 @@ Vmodule sets the log verbosity pattern. See package log for details on the pattern syntax. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6454,7 +6454,7 @@ pattern string -__Result__ +#### Result _None_ @@ -6495,7 +6495,7 @@ func (*HandlerT) Vmodule(pattern string) error { WriteBlockProfile writes a goroutine blocking profile to the given file. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6510,7 +6510,7 @@ file string -__Result__ +#### Result _None_ @@ -6552,7 +6552,7 @@ Note that the profiling rate cannot be set through the API, it must be set on the command line. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6567,7 +6567,7 @@ file string -__Result__ +#### Result _None_ @@ -6609,7 +6609,7 @@ func (*HandlerT) WriteMemProfile(file string) error { WriteMutexProfile writes a goroutine blocking profile to the given file. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6624,7 +6624,7 @@ file string -__Result__ +#### Result _None_ diff --git a/docs/JSON-RPC-API/modules/eth.md b/docs/JSON-RPC-API/modules/eth.md index d4b183594f..591464d860 100755 --- a/docs/JSON-RPC-API/modules/eth.md +++ b/docs/JSON-RPC-API/modules/eth.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ Accounts returns the collection of accounts this node manages -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -37,6 +37,7 @@ commonAddress []common.Address ``` Schema + - type: array - items: - title: `keccak` @@ -45,7 +46,6 @@ commonAddress []common.Address - type: string - - type: array ``` @@ -108,11 +108,11 @@ func (s *PublicAccountAPI) Accounts() [ // Accounts returns the collection of ac BlockNumber returns the block number of the chain head. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -126,10 +126,10 @@ __Result__ ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -191,7 +191,7 @@ Note, this function doesn't make and changes in the state/blockchain and is useful to execute and retrieve values. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -208,6 +208,11 @@ args CallArgs - additionalProperties: `false` - properties: + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - data: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` @@ -229,13 +234,8 @@ args CallArgs - type: `string` - to: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - type: `string` @@ -311,13 +311,7 @@ overrides *map[common.Address]account - patternProperties: - .*: - - additionalProperties: `false` - properties: - - code: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` @@ -326,10 +320,10 @@ overrides *map[common.Address]account - state: - patternProperties: - .*: - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` - type: `object` @@ -337,10 +331,10 @@ overrides *map[common.Address]account - stateDiff: - patternProperties: - .*: - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - description: `Hex representation of a Keccak 256 hash` - type: `object` @@ -350,8 +344,14 @@ overrides *map[common.Address]account - title: `integer` - type: `string` + - code: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + - type: `object` + - additionalProperties: `false` - type: object @@ -418,7 +418,7 @@ overrides *map[common.Address]account -__Result__ +#### Result @@ -432,10 +432,10 @@ __Result__ ``` Schema + - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -507,11 +507,11 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -588,11 +588,11 @@ func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 { ChainId returns the chainID value for transaction replay protection. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -606,10 +606,10 @@ __Result__ ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -665,11 +665,11 @@ func (s *PublicBlockChainAPI) ChainId() *hexutil.Big { Coinbase is the address that mining rewards will be send to (alias for Etherbase) -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -683,10 +683,10 @@ __Result__ ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -743,7 +743,7 @@ EstimateGas returns an estimate of the amount of gas needed to execute the given transaction against the current pending block. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -760,15 +760,10 @@ args CallArgs - additionalProperties: `false` - properties: - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - gasPrice: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -776,20 +771,25 @@ args CallArgs - type: `string` - value: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - data: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + - type: `string` - from: - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + - type: object @@ -852,7 +852,7 @@ blockNrOrHash *rpc.BlockNumberOrHash -__Result__ +#### Result @@ -866,10 +866,10 @@ __Result__ ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -930,11 +930,11 @@ func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs, bl Etherbase is the address that mining rewards will be send to -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -948,10 +948,10 @@ __Result__ ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1008,7 +1008,7 @@ FillTransaction fills the defaults (nonce, gas, gasPrice) on a given unsigned tr and returns it to the caller for further processing (signing + broadcast) -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -1023,12 +1023,18 @@ args SendTxArgs ``` Schema + - type: object - additionalProperties: `false` - properties: + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + - to: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -1036,14 +1042,14 @@ args SendTxArgs - type: `string` - data: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - from: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - gas: - pattern: `^0x([a-fA-F\d])+$` @@ -1051,22 +1057,16 @@ args SendTxArgs - type: `string` - gasPrice: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - input: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - - nonce: - - title: `uint64` - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - type: object ``` @@ -1128,7 +1128,7 @@ args SendTxArgs -__Result__ +#### Result @@ -1145,9 +1145,9 @@ __Result__ - additionalProperties: `false` - properties: - raw: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + - type: `string` - tx: - additionalProperties: `false` @@ -1228,11 +1228,11 @@ func (s *PublicTransactionPoolAPI) FillTransaction(ctx context.Context, args Sen GasPrice returns a suggestion for a gas price. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -1246,10 +1246,10 @@ __Result__ ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -1308,7 +1308,7 @@ given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block numbers are also allowed. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1323,10 +1323,10 @@ address common.Address ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -1357,7 +1357,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Result__ +#### Result @@ -1437,7 +1437,7 @@ GetBlockByHash returns the requested block. When fullTx is true all transactions detail, otherwise only the transaction hash is returned. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1452,10 +1452,10 @@ hash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -1486,7 +1486,7 @@ fullTx bool -__Result__ +#### Result @@ -1502,119 +1502,119 @@ __Result__ - additionalProperties: `false` - properties: - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - hash: - - title: `keccak` + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - mixHash: - - 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` - - miner: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - maxItems: `256` + - minItems: `256` + - type: `array` - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - parentHash: + - receiptsRoot: - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - receiptsRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - logsBloom: + - uncles: - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - maxItems: `256` - - minItems: `256` - type: `array` + - error: + - type: `string` + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - nonce: + - totalDifficulty: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - sha3Uncles: + - miner: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - stateRoot: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - transactions: - - items: - - additionalProperties: `true` - - - type: `array` - - - difficulty: + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - gasLimit: + - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - stateRoot: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + + - timestamp: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - uncles: + - transactions: - items: - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - additionalProperties: `true` - type: `array` - - error: + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - timestamp: + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - type: object @@ -1796,7 +1796,7 @@ GetBlockByNumber returns the requested canonical block. only the transaction hash is returned. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1814,16 +1814,16 @@ number rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` + - description: `The block height description` - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint64` @@ -1873,7 +1873,7 @@ fullTx bool -__Result__ +#### Result @@ -1887,124 +1887,124 @@ __Result__ ``` Schema + - additionalProperties: `false` - properties: - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - extraData: - - title: `dataWord` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - receiptsRoot: + - miner: - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - stateRoot: - - pattern: `^0x[a-fA-F\d]{64}$` + - parentHash: - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - - error: - - type: `string` - - - gasLimit: + - timestamp: - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - - hash: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - number: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - transactions: - - items: - - additionalProperties: `true` - - - type: `array` - - - difficulty: + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - logsBloom: + - uncles: - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - title: `keccak` - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` - - maxItems: `256` - - minItems: `256` - type: `array` - - mixHash: + - error: + - type: `string` + + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - parentHash: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - miner: + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - gasLimit: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - logsBloom: + - items: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - description: `Hex representation of the integer` + + - maxItems: `256` + - minItems: `256` + - type: `array` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - totalDifficulty: - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - - uncles: + - transactions: - items: - - title: `keccak` - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` + - additionalProperties: `true` - type: `array` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + - type: object - - additionalProperties: `false` ``` @@ -2186,7 +2186,7 @@ func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.B GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2201,10 +2201,10 @@ blockHash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -2226,7 +2226,7 @@ blockHash common.Hash -__Result__ +#### Result @@ -2303,7 +2303,7 @@ func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Co GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2321,10 +2321,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - type: string - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - type: string - title: `uint64` @@ -2371,7 +2371,7 @@ blockNr rpc.BlockNumber -__Result__ +#### Result @@ -2385,10 +2385,10 @@ __Result__ ``` Schema - - type: string - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `uint` ``` @@ -2448,7 +2448,7 @@ func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context. GetCode returns the code stored at the given address in the state for the given block number. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -2463,10 +2463,10 @@ address common.Address ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` ``` @@ -2497,7 +2497,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Result__ +#### Result @@ -2511,10 +2511,10 @@ __Result__ ``` Schema - - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -2581,7 +2581,7 @@ For pending transaction and block filters the result is []common.Hash. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2596,7 +2596,7 @@ id rpc.ID -__Result__ +#### Result @@ -2670,7 +2670,7 @@ If the filter could not be found an empty array of logs is returned. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -2685,7 +2685,7 @@ id rpc.ID -__Result__ +#### Result @@ -2700,18 +2700,35 @@ typesLog []*types.Log - items: - - type: object - additionalProperties: `false` - properties: + - data: + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: `string` + + - transactionHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - data: - - pattern: `^0x([a-fA-F0-9]?)+$` - - title: `bytes` + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logIndex: + - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - removed: + - type: `boolean` - topics: - items: @@ -2722,35 +2739,18 @@ typesLog []*types.Log - type: `array` - - removed: - - type: `boolean` - - - transactionHash: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - transactionIndex: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - address: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - logIndex: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - type: `string` + - type: object - type: array @@ -2890,11 +2890,11 @@ func (api *PublicFilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([ // GetHashrate returns the current hashrate for local CPU miner and remote miner. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -2908,10 +2908,10 @@ __Result__ ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -2967,7 +2967,7 @@ func (api *API) GetHashrate() uint64 { GetHeaderByHash returns the requested header by hash. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3007,7 +3007,7 @@ hash common.Hash -__Result__ +#### Result @@ -3023,12 +3023,12 @@ __Result__ - additionalProperties: `false` - properties: - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - sha3Uncles: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -3038,14 +3038,14 @@ __Result__ - title: `dataWord` - type: `string` - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` + - gasLimit: - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - transactionsRoot: @@ -3053,60 +3053,50 @@ __Result__ - title: `keccak` - type: `string` - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` + - miner: - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - receiptsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - timestamp: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - - gasLimit: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - miner: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - nonce: + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - parentHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - stateRoot: + - parentHash: - 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` + - receiptsRoot: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - logsBloom: - type: `array` @@ -3119,6 +3109,16 @@ __Result__ - maxItems: `256` - minItems: `256` + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - type: object @@ -3278,7 +3278,7 @@ GetHeaderByNumber returns the requested canonical block header. * When blockNr is -2 the pending chain head is returned. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3293,12 +3293,13 @@ number rpc.BlockNumber ``` Schema + - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` + - description: `The block height description` - title: `uint64` @@ -3307,7 +3308,6 @@ number rpc.BlockNumber - type: string - - title: `blockNumberIdentifier` ``` @@ -3346,7 +3346,7 @@ number rpc.BlockNumber -__Result__ +#### Result @@ -3360,49 +3360,43 @@ __Result__ ``` Schema - - additionalProperties: `false` - properties: - - gasUsed: + - gasLimit: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - sha3Uncles: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - size: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - timestamp: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - gasLimit: - - title: `uint64` + - extraData: + - title: `dataWord` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - hash: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - stateRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -3412,54 +3406,60 @@ __Result__ - title: `keccak` - type: `string` - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - logsBloom: + - items: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - description: `Hex representation of the integer` - - totalDifficulty: + - maxItems: `256` + - minItems: `256` + - type: `array` + + - nonce: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` + + - stateRoot: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - totalDifficulty: - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - difficulty: - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - extraData: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - title: `uint64` - 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: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - parentHash: - - title: `keccak` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - receiptsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - timestamp: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - type: object + - additionalProperties: `false` ``` @@ -3623,7 +3623,7 @@ GetLogs returns logs matching the given argument that are stored within the stat https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -3638,14 +3638,13 @@ crit FilterCriteria ``` Schema - - additionalProperties: `false` - properties: - Addresses: - items: + - type: `string` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - type: `array` @@ -3660,9 +3659,9 @@ crit FilterCriteria - type: `string` - ToBlock: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - Topics: - items: @@ -3678,6 +3677,7 @@ crit FilterCriteria - type: object + - additionalProperties: `false` ``` @@ -3735,7 +3735,7 @@ crit FilterCriteria -__Result__ +#### Result @@ -3750,12 +3750,27 @@ typesLog []*types.Log - items: + - additionalProperties: `false` - properties: - - address: + - topics: + - items: + - description: `Hex representation of a Keccak 256 hash` + - 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` + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - logIndex: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -3764,43 +3779,28 @@ typesLog []*types.Log - removed: - type: `boolean` - - topics: - - items: - - title: `keccak` - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - - type: `array` + - transactionHash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - transactionIndex: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - blockHash: - - title: `keccak` - - type: `string` + - address: - pattern: `^0x[a-fA-F\d]{64}$` - - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - title: `keccak` - type: `string` - data: - - type: `string` - pattern: `^0x([a-fA-F0-9]?)+$` - title: `bytes` - - - transactionHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - type: `string` - type: object - - additionalProperties: `false` - type: array @@ -3933,7 +3933,7 @@ func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([ GetProof returns the Merkle-proof for a given account and optionally some storage keys. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -3948,10 +3948,10 @@ address common.Address ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -4022,7 +4022,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Result__ +#### Result @@ -4036,17 +4036,27 @@ __Result__ ``` Schema - - additionalProperties: `false` - properties: + - accountProof: + - type: `array` + - items: + - type: `string` + + + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - balance: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - codeHash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - nonce: - pattern: `^0x([a-fA-F\d])+$` @@ -4060,6 +4070,7 @@ __Result__ - storageProof: - items: + - type: `object` - additionalProperties: `false` - properties: - key: @@ -4077,23 +4088,12 @@ __Result__ - type: `string` - - type: `object` - - - type: `array` - - - accountProof: - - items: - - type: `string` - type: `array` - - address: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - type: object + - additionalProperties: `false` ``` @@ -4231,7 +4231,7 @@ func (s *PublicBlockChainAPI) GetProof(ctx context.Context, address common.Addre GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4280,10 +4280,10 @@ index hexutil.Uint ``` Schema - - type: string - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -4305,7 +4305,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -4381,7 +4381,7 @@ func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx cont GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4396,21 +4396,21 @@ blockNr rpc.BlockNumber ``` Schema + - title: `blockNumberIdentifier` - oneOf: + - type: string - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - - type: string + - type: string - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - - type: string - - title: `blockNumberIdentifier` ``` @@ -4483,7 +4483,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -4497,10 +4497,10 @@ __Result__ ``` Schema + - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -4559,7 +4559,7 @@ func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx co GetRawTransactionByHash returns the bytes of the transaction for the given hash. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -4599,7 +4599,7 @@ hash common.Hash -__Result__ +#### Result @@ -4683,7 +4683,7 @@ block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block numbers are also allowed. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -4698,10 +4698,10 @@ address common.Address ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -4741,7 +4741,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Result__ +#### Result @@ -4821,7 +4821,7 @@ func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.A GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -4836,10 +4836,10 @@ blockHash common.Hash ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` ``` @@ -4870,10 +4870,10 @@ index hexutil.Uint ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint` - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -4895,7 +4895,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -4913,63 +4913,63 @@ __Result__ - additionalProperties: `false` - properties: - from: - - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - r: + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - transactionIndex: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - value: + - s: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - blockNumber: + - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - hash: - - type: `string` + - blockHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - - s: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - to: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - gas: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - - blockHash: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gas: + - input: - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - title: `dataWord` - type: `string` - - input: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - title: `uint64` - type: `string` - v: @@ -4977,10 +4977,10 @@ __Result__ - title: `integer` - type: `string` - - nonce: + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` @@ -5111,7 +5111,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -5129,10 +5129,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: + - type: string - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `uint64` @@ -5188,10 +5188,10 @@ index hexutil.Uint ``` Schema + - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint` ``` @@ -5213,7 +5213,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -5230,74 +5230,74 @@ __Result__ - type: object - additionalProperties: `false` - properties: - - value: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - blockNumber: + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: - - title: `keccak` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - gas: + - nonce: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - gasPrice: + - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - r: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - from: + - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - - v: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - hash: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - input: - - title: `dataWord` + - s: + - title: `integer` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` + - pattern: `^0x[a-fA-F0-9]+$` - - transactionIndex: + - gas: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - hash: + - to: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - nonce: - - type: `string` + - transactionIndex: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - - s: + - v: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + + - value: - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - to: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` @@ -5429,7 +5429,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx conte GetTransactionByHash returns the transaction for the given hash -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -5444,10 +5444,10 @@ hash common.Hash ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` ``` @@ -5469,7 +5469,7 @@ hash common.Hash -__Result__ +#### Result @@ -5485,37 +5485,32 @@ __Result__ - additionalProperties: `false` - properties: - - hash: + - from: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - transactionIndex: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - gas: - - title: `uint64` + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - r: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - transactionIndex: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - v: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -5525,36 +5520,41 @@ __Result__ - title: `dataWord` - type: `string` - - blockNumber: + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` + + - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - from: - - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - s: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - value: - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - - to: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - gas: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - blockNumber: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - type: object @@ -5692,7 +5692,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, has GetTransactionCount returns the number of transactions the given address has sent for the given block number -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -5741,7 +5741,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Result__ +#### Result @@ -5826,7 +5826,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, addr GetTransactionReceipt returns the transaction receipt for the given transaction hash. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -5866,7 +5866,7 @@ hash common.Hash -__Result__ +#### Result @@ -5972,7 +5972,7 @@ GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -6046,7 +6046,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -6062,11 +6062,37 @@ __Result__ - additionalProperties: `false` - properties: - - stateRoot: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logsBloom: + - maxItems: `256` + - minItems: `256` + - type: `array` + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -6078,6 +6104,14 @@ __Result__ - type: `array` + - error: + - type: `string` + + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - uncles: - items: - description: `Hex representation of a Keccak 256 hash` @@ -6087,95 +6121,61 @@ __Result__ - type: `array` - - difficulty: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - gasUsed: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - - parentHash: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - size: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - - timestamp: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - gasLimit: - - title: `uint64` + - miner: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - sha3Uncles: + - receiptsRoot: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - - transactionsRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - miner: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - nonce: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - 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` - - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - receiptsRoot: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - error: - - type: `string` - - - extraData: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: object @@ -6359,7 +6359,7 @@ GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash a all transactions in the block are returned in full detail, otherwise only the transaction hash is returned. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -6377,10 +6377,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` - title: `uint64` @@ -6461,7 +6461,7 @@ index hexutil.Uint -__Result__ +#### Result @@ -6482,114 +6482,114 @@ __Result__ - title: `keccak` - type: `string` - - mixHash: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - difficulty: - - title: `integer` - - type: `string` + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - title: `integer` - type: `string` - - logsBloom: - - minItems: `256` - - type: `array` + - uncles: - items: - type: `string` - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - maxItems: `256` - - - transactions: - - items: - - additionalProperties: `true` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `array` - - nonce: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - sha3Uncles: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - totalDifficulty: - - title: `integer` + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - stateRoot: - - title: `keccak` + - 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` - - pattern: `^0x[a-fA-F\d]{64}$` - - uncles: + - logsBloom: - items: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - description: `Hex representation of the integer` + - maxItems: `256` + - minItems: `256` - type: `array` - - error: + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - receiptsRoot: + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - - size: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - number: + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - receiptsRoot: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - sha3Uncles: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - - gasLimit: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` + - transactions: + - items: + - additionalProperties: `true` - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` + - type: `array` - type: object @@ -6773,7 +6773,7 @@ func (s *PublicBlockChainAPI) GetUncleByBlockNumberAndIndex(ctx context.Context, GetUncleCountByBlockHash returns number of uncles in the block for the given block hash -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6813,7 +6813,7 @@ blockHash common.Hash -__Result__ +#### Result @@ -6890,7 +6890,7 @@ func (s *PublicBlockChainAPI) GetUncleCountByBlockHash(ctx context.Context, bloc GetUncleCountByBlockNumber returns number of uncles in the block for the given block number -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -6905,13 +6905,12 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - description: `The block height description` - enum: earliest, latest, pending - type: string - title: `blockNumberTag` + - description: `The block height description` - title: `uint64` @@ -6920,6 +6919,7 @@ blockNr rpc.BlockNumber - type: string + - title: `blockNumberIdentifier` ``` @@ -6958,7 +6958,7 @@ blockNr rpc.BlockNumber -__Result__ +#### Result @@ -6972,10 +6972,10 @@ __Result__ ``` Schema - - description: `Hex representation of a uint` - - pattern: `^0x([a-fA-F\d])+$` - type: string - title: `uint` + - description: `Hex representation of a uint` + - pattern: `^0x([a-fA-F\d])+$` ``` @@ -7041,11 +7041,11 @@ The work package consists of 3 strings: result[3] - hex encoded block number -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7150,11 +7150,11 @@ func (api *API) GetWork() ([4]string, error) { Hashrate returns the POW hashrate -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7168,10 +7168,10 @@ __Result__ ``` Schema + - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint64` ``` @@ -7227,11 +7227,11 @@ func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64 { Mining returns an indication if this node is currently mining. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7282,11 +7282,11 @@ It is part of the filter package since polling goes with eth_getFilterChanges. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7373,7 +7373,7 @@ In case "fromBlock" > "toBlock" an error is returned. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -7388,27 +7388,14 @@ crit FilterCriteria ``` Schema - - type: object - additionalProperties: `false` - properties: - - Topics: - - items: - - items: - - title: `keccak` - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - - type: `array` - - - type: `array` - - Addresses: - items: - - description: `Hex representation of a Keccak 256 hash POINTER` - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` - type: `array` @@ -7418,16 +7405,29 @@ crit FilterCriteria - type: `string` - FromBlock: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - ToBlock: - - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - 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 ``` @@ -7485,7 +7485,7 @@ crit FilterCriteria -__Result__ +#### Result @@ -7576,11 +7576,11 @@ It is part of the filter package because this filter can be used through the https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7659,11 +7659,11 @@ NewSideBlockFilter creates a filter that fetches blocks that are imported into t It is part of the filter package since polling goes with eth_getFilterChanges. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7737,11 +7737,11 @@ PendingTransactions returns the transactions that are in the transaction pool and have a from address that is one of the accounts this node manages. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -7754,29 +7754,23 @@ RPCTransaction []*RPCTransaction ``` Schema - - type: array - items: - additionalProperties: `false` - properties: - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - v: - type: `string` - - - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - blockNumber: - type: `string` - - - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - s: @@ -7784,24 +7778,24 @@ RPCTransaction []*RPCTransaction - title: `integer` - type: `string` - - gasPrice: + - value: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` + - blockHash: - title: `keccak` - type: `string` - - - from: - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + + - gasPrice: + - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - input: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - to: @@ -7810,29 +7804,35 @@ RPCTransaction []*RPCTransaction - pattern: `^0x[a-fA-F\d]{64}$` - transactionIndex: + - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - v: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - gas: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + - type: object + - type: array ``` @@ -7987,11 +7987,11 @@ func (s *PublicTransactionPoolAPI) PendingTransactions() ([ // PendingTransactio ProtocolVersion returns the current Ethereum protocol version this node supports -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -8005,10 +8005,10 @@ __Result__ ``` Schema + - type: string - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -8065,7 +8065,7 @@ Resend accepts an existing transaction and a new gas price and limit. It will re the given transaction from the pool and reinsert it with the new gas price and limit. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -8080,50 +8080,50 @@ sendArgs SendTxArgs ``` Schema + - additionalProperties: `false` - properties: - - from: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - gas: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - gasPrice: + - to: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - input: + - data: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - nonce: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - to: + - from: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - value: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - data: + - input: + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - - type: `string` - type: object - - additionalProperties: `false` ``` @@ -8194,10 +8194,10 @@ gasPrice *hexutil.Big ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -8228,10 +8228,10 @@ gasLimit *hexutil.Uint64 ``` Schema - - title: `uint64` - - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint64` + - description: `Hex representation of a uint64` ``` @@ -8253,7 +8253,7 @@ gasLimit *hexutil.Uint64 -__Result__ +#### Result @@ -8267,10 +8267,10 @@ __Result__ ``` Schema + - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -8374,7 +8374,7 @@ SendRawTransaction will add the signed transaction to the transaction pool. The sender is responsible for signing the transaction and using the correct nonce. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -8389,10 +8389,10 @@ encodedTx hexutil.Bytes ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -8414,7 +8414,7 @@ encodedTx hexutil.Bytes -__Result__ +#### Result @@ -8493,7 +8493,7 @@ SendTransaction creates a transaction for the given argument, sign it and submit transaction pool. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -8508,6 +8508,7 @@ args SendTxArgs ``` Schema + - type: object - additionalProperties: `false` - properties: - from: @@ -8516,9 +8517,9 @@ args SendTxArgs - type: `string` - gas: - - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -8531,14 +8532,14 @@ args SendTxArgs - type: `string` - nonce: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - to: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -8546,12 +8547,11 @@ args SendTxArgs - type: `string` - data: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - type: object ``` @@ -8613,7 +8613,7 @@ args SendTxArgs -__Result__ +#### Result @@ -8712,7 +8712,7 @@ The account associated with addr must be unlocked. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -8786,7 +8786,7 @@ data hexutil.Bytes -__Result__ +#### Result @@ -8800,10 +8800,10 @@ __Result__ ``` Schema + - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -8878,7 +8878,7 @@ The node needs to have the private key of the account corresponding with the given from address and it needs to be unlocked. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -8895,10 +8895,15 @@ args SendTxArgs - additionalProperties: `false` - properties: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + - gasPrice: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - input: - pattern: `^0x([a-fA-F\d])+$` @@ -8911,9 +8916,9 @@ args SendTxArgs - type: `string` - to: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -8926,14 +8931,9 @@ args SendTxArgs - type: `string` - from: - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - - gas: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - pattern: `^0x[a-fA-F\d]{64}$` - type: object @@ -8998,7 +8998,7 @@ args SendTxArgs -__Result__ +#### Result @@ -9012,19 +9012,19 @@ __Result__ ``` Schema + - type: object - additionalProperties: `false` - properties: - - tx: - - additionalProperties: `false` - - type: `object` - - raw: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - tx: + - additionalProperties: `false` + - type: `object` + - - type: object ``` @@ -9119,7 +9119,7 @@ It accepts the miner hash rate and an identifier which must be unique between nodes. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -9168,10 +9168,10 @@ id common.Hash ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -9193,7 +9193,7 @@ id common.Hash -__Result__ +#### Result @@ -9258,7 +9258,7 @@ It returns an indication if the work was accepted. Note either an invalid solution, a stale work a non-existent work will return false. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -9273,10 +9273,10 @@ nonce types.BlockNonce ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -9307,10 +9307,10 @@ hash common.Hash ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -9366,7 +9366,7 @@ digest common.Hash -__Result__ +#### Result @@ -9427,7 +9427,7 @@ Subscribe creates a subscription to an event channel. Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -9451,7 +9451,7 @@ subscriptionOptions interface{} -__Result__ +#### Result @@ -9505,11 +9505,11 @@ yet received the latest block headers from its pears. In case it is synchronizin - knownStates: number of known state entries that still need to be pulled -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -9568,7 +9568,7 @@ UninstallFilter removes the filter with the given filter id. https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -9583,7 +9583,7 @@ id rpc.ID -__Result__ +#### Result @@ -9642,7 +9642,7 @@ func (api *PublicFilterAPI) UninstallFilter(id rpc.ID) bool { Unsubscribe terminates an existing subscription by ID. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -9657,7 +9657,7 @@ id rpc.ID -__Result__ +#### Result _None_ diff --git a/docs/JSON-RPC-API/modules/ethash.md b/docs/JSON-RPC-API/modules/ethash.md index 0d5158c400..0e512bf4af 100755 --- a/docs/JSON-RPC-API/modules/ethash.md +++ b/docs/JSON-RPC-API/modules/ethash.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ GetHashrate returns the current hashrate for local CPU miner and remote miner. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -38,10 +38,10 @@ __Result__ ``` Schema + - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string ``` @@ -103,11 +103,11 @@ The work package consists of 3 strings: result[3] - hex encoded block number -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -120,7 +120,6 @@ num4string [4]string ``` Schema - - minItems: `4` - type: array - items: @@ -128,6 +127,7 @@ num4string [4]string - maxItems: `4` + - minItems: `4` ``` @@ -217,7 +217,7 @@ It accepts the miner hash rate and an identifier which must be unique between nodes. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -266,10 +266,10 @@ id common.Hash ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -291,7 +291,7 @@ id common.Hash -__Result__ +#### Result @@ -356,7 +356,7 @@ It returns an indication if the work was accepted. Note either an invalid solution, a stale work a non-existent work will return false. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -439,10 +439,10 @@ digest common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` ``` @@ -464,7 +464,7 @@ digest common.Hash -__Result__ +#### Result diff --git a/docs/JSON-RPC-API/modules/miner.md b/docs/JSON-RPC-API/modules/miner.md index 62e64d2867..afbe049fec 100755 --- a/docs/JSON-RPC-API/modules/miner.md +++ b/docs/JSON-RPC-API/modules/miner.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ GetHashrate returns the current hashrate of the miner. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -97,7 +97,7 @@ func (api *PrivateMinerAPI) GetHashrate() uint64 { SetEtherbase sets the etherbase of the miner -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -137,7 +137,7 @@ etherbase common.Address -__Result__ +#### Result @@ -186,7 +186,7 @@ func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool { SetExtra sets the extra data string that is included when this miner mines a block. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -201,7 +201,7 @@ extra string -__Result__ +#### Result @@ -252,7 +252,7 @@ func (api *PrivateMinerAPI) SetExtra(extra string) (bool, error) { SetGasPrice sets the minimum accepted gas price for the miner. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -292,7 +292,7 @@ gasPrice hexutil.Big -__Result__ +#### Result @@ -344,7 +344,7 @@ func (api *PrivateMinerAPI) SetGasPrice(gasPrice hexutil.Big) bool { SetRecommitInterval updates the interval for miner sealing work recommitting. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -384,7 +384,7 @@ interval int -__Result__ +#### Result _None_ @@ -428,7 +428,7 @@ number of threads allowed to use and updates the minimum price required by the transaction pool. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -468,7 +468,7 @@ threads *int -__Result__ +#### Result _None_ @@ -516,11 +516,11 @@ Stop terminates the miner, both at the consensus engine level as well as at the block creation level. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result _None_ diff --git a/docs/JSON-RPC-API/modules/net.md b/docs/JSON-RPC-API/modules/net.md index 155a9f4ada..544cb56f2f 100755 --- a/docs/JSON-RPC-API/modules/net.md +++ b/docs/JSON-RPC-API/modules/net.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ Listening returns an indication if the node is listening for network connections. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -72,11 +72,11 @@ func (s *PublicNetAPI) Listening() bool { PeerCount returns the number of connected peers -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -149,11 +149,11 @@ func (s *PublicNetAPI) PeerCount() hexutil.Uint { Version returns the current ethereum protocol version. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result diff --git a/docs/JSON-RPC-API/modules/personal.md b/docs/JSON-RPC-API/modules/personal.md index cb10dad412..f9bec4e623 100755 --- a/docs/JSON-RPC-API/modules/personal.md +++ b/docs/JSON-RPC-API/modules/personal.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -21,7 +21,7 @@ DeriveAccount requests a HD wallet to derive a new account, optionally pinning it for later reuse. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -54,7 +54,7 @@ pin *bool -__Result__ +#### Result @@ -68,7 +68,6 @@ __Result__ ``` Schema - - additionalProperties: `false` - properties: - address: - pattern: `^0x[a-fA-F\d]{64}$` @@ -76,7 +75,6 @@ __Result__ - type: `string` - url: - - type: `object` - additionalProperties: `false` - properties: - Path: @@ -86,9 +84,11 @@ __Result__ - type: `string` + - type: `object` - type: object + - additionalProperties: `false` ``` @@ -182,7 +182,7 @@ the V value must be 27 or 28 for legacy reasons. https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecRecover -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -231,10 +231,10 @@ sig hexutil.Bytes ``` Schema - - type: string - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `dataWord` ``` @@ -256,7 +256,7 @@ sig hexutil.Bytes -__Result__ +#### Result @@ -270,10 +270,10 @@ __Result__ ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -350,7 +350,7 @@ ImportRawKey stores the given hex encoded ECDSA key into the key directory, encrypting it with the passphrase. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -374,7 +374,7 @@ password string -__Result__ +#### Result @@ -457,7 +457,7 @@ func (s *PrivateAccountAPI) ImportRawKey(privkey string, password string) (commo InitializeWallet initializes a new wallet at the provided URL, by generating and returning a new private key. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -472,7 +472,7 @@ url string -__Result__ +#### Result @@ -538,11 +538,11 @@ func (s *PrivateAccountAPI) InitializeWallet(ctx context.Context, url string) (s listAccounts will return a list of addresses for accounts this node manages. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -626,11 +626,11 @@ func (s *PrivateAccountAPI) ListAccounts() [ // listAccounts will return a list ListWallets will return a list of wallets this node manages. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -643,13 +643,13 @@ rawWallet []rawWallet ``` Schema + - type: array - items: - additionalProperties: `false` - properties: - accounts: - items: - - type: `object` - additionalProperties: `false` - properties: - address: @@ -658,6 +658,7 @@ rawWallet []rawWallet - type: `string` - url: + - additionalProperties: `false` - properties: - Path: - type: `string` @@ -667,9 +668,9 @@ rawWallet []rawWallet - type: `object` - - additionalProperties: `false` + - type: `object` - type: `array` @@ -686,7 +687,6 @@ rawWallet []rawWallet - type: object - - type: array ``` @@ -793,7 +793,7 @@ func (s *PrivateAccountAPI) ListWallets() [ // ListWallets will return a list of LockAccount will lock the account associated with the given address when it's unlocked. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -833,7 +833,7 @@ addr common.Address -__Result__ +#### Result @@ -884,7 +884,7 @@ func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool { NewAccount will create a new account and returns the address for the new account. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -899,7 +899,7 @@ password string -__Result__ +#### Result @@ -913,10 +913,10 @@ __Result__ ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` ``` @@ -986,7 +986,7 @@ the method may return an extra challenge requiring a second open (e.g. the Trezor PIN matrix challenge). -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1010,7 +1010,7 @@ passphrase *string -__Result__ +#### Result _None_ @@ -1063,7 +1063,7 @@ tries to sign it with the key associated with args.To. If the given passwd isn't able to decrypt the key it fails. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1078,23 +1078,12 @@ args SendTxArgs ``` Schema - - type: object - 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` + - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -1102,9 +1091,9 @@ args SendTxArgs - type: `string` - input: + - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - nonce: - pattern: `^0x([a-fA-F\d])+$` @@ -1121,7 +1110,18 @@ args SendTxArgs - title: `integer` - type: `string` + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - type: object ``` @@ -1192,7 +1192,7 @@ passwd string -__Result__ +#### Result @@ -1284,7 +1284,7 @@ The key used to calculate the signature is decrypted with the given password. https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -1299,10 +1299,10 @@ data hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `dataWord` ``` @@ -1333,10 +1333,10 @@ addr common.Address ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1367,7 +1367,7 @@ passwd string -__Result__ +#### Result @@ -1460,7 +1460,7 @@ SignAndSendTransaction was renamed to SendTransaction. This method is deprecated and will be removed in the future. It primary goal is to give clients time to update. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1498,14 +1498,14 @@ args SendTxArgs - type: `string` - to: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - value: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - data: - pattern: `^0x([a-fA-F\d])+$` @@ -1589,7 +1589,7 @@ passwd string -__Result__ +#### Result @@ -1603,10 +1603,10 @@ __Result__ ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -1666,7 +1666,7 @@ able to decrypt the key it fails. The transaction is returned in RLP-form, not b to other nodes -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -1681,18 +1681,21 @@ args SendTxArgs ``` Schema - - type: object - - additionalProperties: `false` - properties: + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - input: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - nonce: + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - - type: `string` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -1710,21 +1713,18 @@ args SendTxArgs - type: `string` - from: + - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - gas: - - title: `uint64` - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - title: `uint64` - type: `string` + - type: object + - additionalProperties: `false` ``` @@ -1795,7 +1795,7 @@ passwd string -__Result__ +#### Result @@ -1812,13 +1812,13 @@ __Result__ - additionalProperties: `false` - properties: - raw: + - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - tx: - - additionalProperties: `false` - type: `object` + - additionalProperties: `false` - type: object @@ -1912,7 +1912,7 @@ the given password for duration seconds. If duration is nil it will use a default of 300 seconds. It returns an indication if the account was unlocked. -__Params (3)__ +#### Params (3) Parameters must be given _by position_. @@ -1927,10 +1927,10 @@ addr common.Address ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -1995,7 +1995,7 @@ duration *uint64 -__Result__ +#### Result @@ -2065,7 +2065,7 @@ func (s *PrivateAccountAPI) UnlockAccount(ctx context.Context, addr common.Addre Unpair deletes a pairing between wallet and geth. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -2089,7 +2089,7 @@ pin string -__Result__ +#### Result _None_ diff --git a/docs/JSON-RPC-API/modules/trace.md b/docs/JSON-RPC-API/modules/trace.md index 8b77ba80bf..e68e3aa798 100755 --- a/docs/JSON-RPC-API/modules/trace.md +++ b/docs/JSON-RPC-API/modules/trace.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -22,7 +22,7 @@ EVM and returns them as a JSON object. The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -37,12 +37,13 @@ number rpc.BlockNumber ``` Schema + - title: `blockNumberIdentifier` - oneOf: + - enum: earliest, latest, pending - type: string - title: `blockNumberTag` - description: `The block height description` - - enum: earliest, latest, pending - title: `uint64` @@ -51,7 +52,6 @@ number rpc.BlockNumber - type: string - - title: `blockNumberIdentifier` ``` @@ -101,10 +101,13 @@ config *TraceConfig - additionalProperties: `false` - properties: - - overrides: - - additionalProperties: `true` + - Timeout: + - type: `string` - - DisableMemory: + - Tracer: + - type: `string` + + - DisableReturnData: - type: `boolean` - DisableStack: @@ -114,26 +117,23 @@ config *TraceConfig - type: `boolean` - Limit: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Timeout: - - type: `string` - - Debug: - type: `boolean` - - DisableReturnData: + - DisableMemory: - type: `boolean` - - Tracer: - - type: `string` + - overrides: + - additionalProperties: `true` - type: object @@ -192,7 +192,7 @@ config *TraceConfig -__Result__ +#### Result @@ -307,7 +307,7 @@ func (api *PrivateTraceAPI) Block(ctx context.Context, number rpc.BlockNumber, c -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -324,34 +324,34 @@ args ethapi.CallArgs - additionalProperties: `false` - properties: - - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - data: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - - to: + - from: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - from: + - to: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` @@ -416,24 +416,12 @@ config *TraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: - - Limit: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - Tracer: - - type: `string` - - - DisableStack: - - type: `boolean` - - DisableStorage: - type: `boolean` - - Reexec: + - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -441,8 +429,8 @@ config *TraceConfig - Timeout: - type: `string` - - overrides: - - additionalProperties: `true` + - Tracer: + - type: `string` - Debug: - type: `boolean` @@ -453,8 +441,20 @@ config *TraceConfig - DisableReturnData: - type: `boolean` + - DisableStack: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - overrides: + - additionalProperties: `true` + - type: object + ``` @@ -509,7 +509,7 @@ config *TraceConfig -__Result__ +#### Result @@ -524,16 +524,16 @@ txTraceResult []*txTraceResult - items: - - additionalProperties: `false` - properties: - - error: - - type: `string` - - result: - additionalProperties: `true` + - error: + - type: `string` + - type: object + - additionalProperties: `false` - type: array @@ -605,7 +605,7 @@ Transaction returns the structured logs created during the execution of EVM and returns them as a JSON object. -__Params (2)__ +#### Params (2) Parameters must be given _by position_. @@ -656,40 +656,40 @@ config *TraceConfig - additionalProperties: `false` - properties: - - Debug: - - type: `boolean` - - - DisableMemory: + - DisableReturnData: - type: `boolean` - DisableStack: - type: `boolean` - - Limit: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - Timeout: - type: `string` - - overrides: - - additionalProperties: `true` + - Debug: + - type: `boolean` - - DisableReturnData: + - DisableMemory: - type: `boolean` + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` + - DisableStorage: - type: `boolean` - - Reexec: + - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Tracer: - - type: `string` - - type: object @@ -747,7 +747,7 @@ config *TraceConfig -__Result__ +#### Result diff --git a/docs/JSON-RPC-API/modules/txpool.md b/docs/JSON-RPC-API/modules/txpool.md index 3e8af73d51..299dcda586 100755 --- a/docs/JSON-RPC-API/modules/txpool.md +++ b/docs/JSON-RPC-API/modules/txpool.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ Content returns the transactions contained within the transaction pool. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -45,76 +45,76 @@ mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string - .*: - additionalProperties: `false` - properties: - - r: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - r: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - s: - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - to: - - type: `string` + - blockHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - gas: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - blockNumber: + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - nonce: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - transactionIndex: - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - value: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - hash: + - from: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - input: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` + + - input: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + - type: `string` - - v: + - to: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - v: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - type: `object` @@ -283,11 +283,11 @@ Inspect retrieves the content of the transaction pool and flattens it into an easily inspectable list. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -304,12 +304,12 @@ mapstringmapstringmapstringstring map[string]map[string]map[string]string< - .*: - patternProperties: - .*: - - type: `object` - patternProperties: - .*: - type: `string` + - type: `object` - type: `object` @@ -407,11 +407,11 @@ func (s *PublicTxPoolAPI) Inspect() map // Inspect retrieves the content of the Status returns the number of pending and queued transaction in the pool. -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result diff --git a/docs/JSON-RPC-API/modules/web3.md b/docs/JSON-RPC-API/modules/web3.md index 3e753e63da..aceb5a8fff 100755 --- a/docs/JSON-RPC-API/modules/web3.md +++ b/docs/JSON-RPC-API/modules/web3.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T13:33:54-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | | OpenRPC | 1.2.6 | --- @@ -20,11 +20,11 @@ ClientVersion returns the node name -__Params (0)__ +#### Params (0) _None_ -__Result__ +#### Result @@ -73,7 +73,7 @@ Sha3 applies the ethereum sha3 implementation on the input. It assumes the input is hex encoded. -__Params (1)__ +#### Params (1) Parameters must be given _by position_. @@ -113,7 +113,7 @@ input hexutil.Bytes -__Result__ +#### Result @@ -127,10 +127,10 @@ __Result__ ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` From 048f51554595ed98f1bb8ffe2be9f833a5be4c0c Mon Sep 17 00:00:00 2001 From: meows Date: Thu, 21 Jan 2021 19:15:34 -0600 Subject: [PATCH 06/12] docs/assets/css: readd chris' ul ul ul Didn't work for me, but what do I know. Date: 2021-01-21 19:15:34-06:00 Signed-off-by: meows --- docs/assets/css/extra.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css index 04b92b5cf1..6f6d314eaa 100644 --- a/docs/assets/css/extra.css +++ b/docs/assets/css/extra.css @@ -1,3 +1,6 @@ nav.md-nav.md-nav--secondary > ul ul { display: none; } +nav.md-nav.md-nav--secondary > ul ul ul { + display: none; +} From 529f361e02ae93f0af29ff89fd055c2055e9693e Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 22 Jan 2021 08:53:47 -0600 Subject: [PATCH 07/12] docs/JSON-RPC-API/modules,ethclient: use deep-linkable method invocation examples Date: 2021-01-22 08:53:47-06:00 Signed-off-by: meows --- docs/JSON-RPC-API/modules/admin.md | 104 +- docs/JSON-RPC-API/modules/debug.md | 720 ++++++------- docs/JSON-RPC-API/modules/eth.md | 1338 ++++++++++++------------- docs/JSON-RPC-API/modules/ethash.md | 14 +- docs/JSON-RPC-API/modules/miner.md | 20 +- docs/JSON-RPC-API/modules/net.md | 10 +- docs/JSON-RPC-API/modules/personal.md | 148 +-- docs/JSON-RPC-API/modules/trace.md | 122 +-- docs/JSON-RPC-API/modules/txpool.md | 70 +- docs/JSON-RPC-API/modules/web3.md | 8 +- ethclient/docsgen_test.go | 2 +- 11 files changed, 1278 insertions(+), 1278 deletions(-) diff --git a/docs/JSON-RPC-API/modules/admin.md b/docs/JSON-RPC-API/modules/admin.md index 3417db9ed8..ca9c5ee917 100755 --- a/docs/JSON-RPC-API/modules/admin.md +++ b/docs/JSON-RPC-API/modules/admin.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -48,7 +48,7 @@ url string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -121,7 +121,7 @@ url string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -182,7 +182,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -235,10 +235,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` - title: `uint64` @@ -297,7 +297,7 @@ blockNr rpc.BlockNumber -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -430,7 +430,7 @@ last *uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -521,7 +521,7 @@ file string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -645,7 +645,7 @@ n int -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -709,8 +709,13 @@ _None_ ``` Schema - - additionalProperties: `false` - properties: + - id: + - type: `string` + + - ip: + - type: `string` + - listenAddr: - type: `string` @@ -721,20 +726,19 @@ _None_ - additionalProperties: `false` - properties: - discovery: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - listener: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - type: `object` - protocols: - - additionalProperties: `false` - properties: - discovery: - pattern: `^0x[a-fA-F0-9]+$` @@ -748,6 +752,7 @@ _None_ - type: `object` + - additionalProperties: `false` - enode: - type: `string` @@ -755,14 +760,9 @@ _None_ - enr: - type: `string` - - id: - - type: `string` - - - ip: - - type: `string` - - type: object + - additionalProperties: `false` ``` @@ -832,7 +832,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -895,27 +895,15 @@ p2pPeerInfo []*p2p.PeerInfo - 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: + - static: + - type: `boolean` + - trusted: - type: `boolean` @@ -928,15 +916,18 @@ p2pPeerInfo []*p2p.PeerInfo - remoteAddress: - type: `string` - - static: - - type: `boolean` - - type: `object` - protocols: - additionalProperties: `false` - properties: + - trusted: + - type: `boolean` + + - inbound: + - type: `boolean` + - localAddress: - type: `string` @@ -946,14 +937,23 @@ p2pPeerInfo []*p2p.PeerInfo - static: - type: `boolean` - - trusted: - - type: `boolean` - - inbound: - - type: `boolean` + - type: `object` + - caps: + - items: + - type: `string` - - type: `object` + - type: `array` + + - enode: + - type: `string` + + - enr: + - type: `string` + + - id: + - type: `string` - type: object @@ -1046,7 +1046,7 @@ p2pPeerInfo []*p2p.PeerInfo -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1114,7 +1114,7 @@ url string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1187,7 +1187,7 @@ url string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1257,10 +1257,10 @@ port *int ``` Schema - - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -1321,7 +1321,7 @@ vhosts *string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1476,7 +1476,7 @@ apis *string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1564,7 +1564,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1617,7 +1617,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/debug.md b/docs/JSON-RPC-API/modules/debug.md index 9abb742bce..d04d40c77b 100755 --- a/docs/JSON-RPC-API/modules/debug.md +++ b/docs/JSON-RPC-API/modules/debug.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -44,10 +44,10 @@ start []byte ``` Schema + - type: string - title: `bytes` - description: `Hex representation of a variable length byte array` - pattern: `^0x([a-fA-F0-9]?)+$` - - type: string ``` @@ -78,10 +78,10 @@ maxResults int ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -149,6 +149,7 @@ incompletes bool - accounts: - patternProperties: - .*: + - type: `object` - additionalProperties: `false` - properties: - code: @@ -179,23 +180,22 @@ incompletes bool - type: `object` - address: - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - balance: - type: `string` - - type: `object` - type: `object` - next: + - type: `string` - pattern: `^0x([a-fA-F0-9]?)+$` - title: `bytes` - - type: `string` - root: - type: `string` @@ -275,7 +275,7 @@ incompletes bool -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -366,7 +366,7 @@ location string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -458,7 +458,7 @@ nsec uint _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -508,7 +508,7 @@ _None_ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -579,7 +579,7 @@ property string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -645,10 +645,10 @@ nsec uint ``` Schema - - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -674,7 +674,7 @@ nsec uint _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -734,10 +734,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - type: string + - title: `blockNumberTag` - title: `uint64` @@ -798,13 +798,18 @@ blockNr rpc.BlockNumber ``` Schema - - additionalProperties: `false` - properties: - accounts: - patternProperties: - .*: - additionalProperties: `false` - properties: + - code: + - type: `string` + + - codeHash: + - type: `string` + - key: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` @@ -834,12 +839,6 @@ blockNr rpc.BlockNumber - balance: - type: `string` - - code: - - type: `string` - - - codeHash: - - type: `string` - - type: `object` @@ -851,6 +850,7 @@ blockNr rpc.BlockNumber - type: object + - additionalProperties: `false` ``` @@ -919,7 +919,7 @@ blockNr rpc.BlockNumber -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -980,7 +980,7 @@ _None_ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1034,8 +1034,18 @@ _None_ ``` Schema + - type: object - additionalProperties: `false` - properties: + - 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` @@ -1062,21 +1072,11 @@ _None_ - type: `string` - NumGC: - - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - - Pause: - - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - type: `array` + - title: `integer` - - type: object ``` @@ -1135,7 +1135,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1191,39 +1191,37 @@ BadBlockArgs []*BadBlockArgs ``` Schema - - type: array - items: - - type: object - additionalProperties: `false` - properties: - block: - additionalProperties: `false` - properties: - - mixHash: - - title: `keccak` + - error: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - error: + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - size: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - - stateRoot: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -1233,82 +1231,82 @@ BadBlockArgs []*BadBlockArgs - title: `integer` - type: `string` - - sha3Uncles: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - miner: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - - parentHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` + - gasLimit: - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - transactions: + - uncles: - items: - - additionalProperties: `true` + - title: `keccak` + - type: `string` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` - type: `array` - - transactionsRoot: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasLimit: + - timestamp: - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - nonce: - type: `string` - - - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - 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` + + - parentHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - uncles: + - transactions: - items: - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - additionalProperties: `true` - type: `array` - - extraData: + - gasUsed: + - title: `uint64` + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + + - 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` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` - maxItems: `256` - minItems: `256` @@ -1326,8 +1324,10 @@ BadBlockArgs []*BadBlockArgs - type: `string` + - type: object + - type: array ``` @@ -1482,7 +1482,7 @@ BadBlockArgs []*BadBlockArgs -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1585,7 +1585,7 @@ number uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1648,10 +1648,10 @@ startHash common.Hash ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` ``` @@ -1722,10 +1722,10 @@ commonAddress []common.Address - items: + - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` - type: array @@ -1755,7 +1755,7 @@ commonAddress []common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1831,10 +1831,10 @@ startNum uint64 ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -1865,10 +1865,10 @@ endNum *uint64 ``` Schema + - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string ``` @@ -1938,7 +1938,7 @@ commonAddress []common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2020,10 +2020,10 @@ nsec uint ``` Schema + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - title: `integer` - - description: `Hex representation of the integer` ``` @@ -2049,7 +2049,7 @@ nsec uint _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2109,64 +2109,34 @@ _None_ ``` Schema + - additionalProperties: `false` - properties: - - HeapObjects: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - PauseTotalNs: + - HeapAlloc: - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - OtherSys: + - HeapIdle: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - StackInuse: - - pattern: `^0x[a-fA-F0-9]+$` + - MCacheInuse: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - BySize: - - type: `array` - - items: - - additionalProperties: `false` - - properties: - - Mallocs: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Size: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Frees: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - - type: `object` - - - maxItems: `61` - - minItems: `61` - - - GCSys: + - Sys: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - LastGC: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - MSpanInuse: + - StackSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2176,130 +2146,160 @@ _None_ - title: `integer` - type: `string` - - HeapIdle: + - MCacheSys: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - - HeapReleased: + - MSpanInuse: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - NumForcedGC: + - PauseTotalNs: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - StackSys: + - HeapReleased: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - TotalAlloc: - - pattern: `^0x[a-fA-F0-9]+$` + - HeapSys: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - EnableGC: - - type: `boolean` - - - GCCPUFraction: - - type: `number` - - - HeapInuse: + - Lookups: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - NumGC: - - pattern: `^0x[a-fA-F0-9]+$` + - NextGC: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - NextGC: + - OtherSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - DebugGC: - - type: `boolean` - - - HeapAlloc: + - StackInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - HeapSys: + - Alloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - MCacheSys: + - HeapInuse: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - Frees: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - MCacheInuse: - - type: `string` + - MSpanSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - PauseEnd: - - minItems: `256` - type: `array` - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` - maxItems: `256` + - minItems: `256` + + - HeapObjects: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - PauseNs: - - type: `array` - items: + - type: `string` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - maxItems: `256` - minItems: `256` + - type: `array` - - Alloc: + - TotalAlloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - MSpanSys: + - NumGC: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Mallocs: + - BySize: + - items: + - properties: + - Frees: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Mallocs: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - Size: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + + - type: `object` + - additionalProperties: `false` + + - maxItems: `61` + - minItems: `61` + - type: `array` + + - DebugGC: + - type: `boolean` + + - EnableGC: + - type: `boolean` + + - GCCPUFraction: + - type: `number` + + - GCSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Lookups: + - Mallocs: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Sys: + - NumForcedGC: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - type: object - - additionalProperties: `false` ``` @@ -2506,7 +2506,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2599,7 +2599,7 @@ nsec uint _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2717,7 +2717,7 @@ hash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2771,10 +2771,10 @@ number uint64 ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -2808,7 +2808,7 @@ number uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2864,10 +2864,10 @@ hash common.Hash ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -2922,7 +2922,7 @@ hash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2974,10 +2974,10 @@ number uint64 ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -3011,7 +3011,7 @@ number uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3070,10 +3070,10 @@ rate int ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -3099,7 +3099,7 @@ rate int _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3191,10 +3191,10 @@ v int ``` Schema - - title: `integer` - - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` + - description: `Hex representation of the integer` ``` @@ -3214,7 +3214,7 @@ v int -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3266,10 +3266,10 @@ number hexutil.Uint64 ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -3295,7 +3295,7 @@ number hexutil.Uint64 _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3375,7 +3375,7 @@ rate int _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3427,7 +3427,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3521,19 +3521,6 @@ config *StdTraceConfig - DisableMemory: - type: `boolean` - - Limit: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - TxHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - Debug: - - type: `boolean` - - DisableReturnData: - type: `boolean` @@ -3543,11 +3530,24 @@ config *StdTraceConfig - 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` + + - Debug: + - type: `boolean` + - overrides: - additionalProperties: `true` @@ -3649,7 +3649,7 @@ string []string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3746,9 +3746,23 @@ config *StdTraceConfig - additionalProperties: `false` - properties: + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + - DisableMemory: - type: `boolean` + - DisableReturnData: + - type: `boolean` + - DisableStack: - type: `boolean` @@ -3756,29 +3770,15 @@ config *StdTraceConfig - type: `boolean` - Reexec: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - TxHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - Debug: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - - - Limit: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - overrides: - - additionalProperties: `true` - - type: object @@ -3877,7 +3877,7 @@ string []string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3938,7 +3938,7 @@ file string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4009,7 +4009,7 @@ file string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4069,7 +4069,7 @@ _None_ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4123,7 +4123,7 @@ _None_ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4184,10 +4184,10 @@ blockHash common.Hash ``` Schema + - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -4218,10 +4218,10 @@ txIndex int ``` Schema + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - title: `integer` - - description: `Hex representation of the integer` ``` @@ -4252,10 +4252,10 @@ contractAddress common.Address ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -4359,6 +4359,7 @@ maxResult int ``` Schema + - type: object - additionalProperties: `false` - properties: - nextKey: @@ -4377,9 +4378,9 @@ maxResult int - type: `string` - value: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - type: `object` @@ -4388,7 +4389,6 @@ maxResult int - type: `object` - - type: object ``` @@ -4434,7 +4434,7 @@ maxResult int -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4501,10 +4501,10 @@ address common.Address ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash POINTER` ``` @@ -4597,7 +4597,7 @@ number uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4715,40 +4715,40 @@ config *TraceConfig - type: object - additionalProperties: `false` - properties: - - DisableMemory: + - DisableReturnData: - type: `boolean` - - DisableReturnData: + - DisableStorage: - type: `boolean` + - Limit: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - Timeout: - type: `string` - Tracer: - type: `string` - - overrides: - - additionalProperties: `true` - - Debug: - type: `boolean` - - DisableStack: + - DisableMemory: - type: `boolean` - - DisableStorage: + - DisableStack: - type: `boolean` - - Limit: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - overrides: + - additionalProperties: `true` + @@ -4865,7 +4865,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4925,10 +4925,10 @@ blob []byte ``` Schema + - type: string - title: `bytes` - description: `Hex representation of a variable length byte array` - pattern: `^0x([a-fA-F0-9]?)+$` - - type: string ``` @@ -4959,17 +4959,27 @@ config *TraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: + - Debug: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - Timeout: - type: `string` - Tracer: - type: `string` - - Debug: - - type: `boolean` + - overrides: + - additionalProperties: `true` - DisableMemory: - type: `boolean` @@ -4980,23 +4990,13 @@ config *TraceConfig - DisableStorage: - type: `boolean` - - DisableStack: - - type: `boolean` - - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Reexec: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - overrides: - - additionalProperties: `true` - + - type: object ``` @@ -5065,7 +5065,6 @@ txTraceResult []*txTraceResult ``` Schema - - type: array - items: - additionalProperties: `false` @@ -5080,6 +5079,7 @@ txTraceResult []*txTraceResult - type: object + - type: array ``` @@ -5112,7 +5112,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5165,10 +5165,10 @@ hash common.Hash ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -5201,26 +5201,18 @@ config *TraceConfig - additionalProperties: `false` - properties: - - Debug: - - type: `boolean` - - - DisableMemory: - - type: `boolean` - - - DisableStorage: - - type: `boolean` - - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Tracer: - type: `string` - overrides: - additionalProperties: `true` + - DisableStorage: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + - DisableReturnData: - type: `boolean` @@ -5232,9 +5224,17 @@ config *TraceConfig - title: `integer` - type: `string` + - Reexec: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - Timeout: - type: `string` + - Debug: + - type: `boolean` + - type: object @@ -5307,7 +5307,6 @@ txTraceResult []*txTraceResult - items: - - type: object - additionalProperties: `false` - properties: - error: @@ -5317,6 +5316,7 @@ txTraceResult []*txTraceResult - additionalProperties: `true` + - type: object - type: array @@ -5352,7 +5352,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5409,7 +5409,6 @@ number rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - enum: earliest, latest, pending @@ -5424,6 +5423,7 @@ number rpc.BlockNumber - type: string + - title: `blockNumberIdentifier` ``` @@ -5471,14 +5471,23 @@ config *TraceConfig ``` Schema + - additionalProperties: `false` - properties: - DisableReturnData: - type: `boolean` + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - Tracer: - type: `string` - - Debug: + - overrides: + - additionalProperties: `true` + + - DisableMemory: - type: `boolean` - DisableStack: @@ -5492,23 +5501,14 @@ config *TraceConfig - title: `integer` - type: `string` - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Timeout: - type: `string` - - overrides: - - additionalProperties: `true` - - - DisableMemory: + - Debug: - type: `boolean` - type: object - - additionalProperties: `false` ``` @@ -5579,16 +5579,16 @@ txTraceResult []*txTraceResult - items: + - type: object - additionalProperties: `false` - properties: - - result: - - additionalProperties: `true` - - error: - type: `string` + - result: + - additionalProperties: `true` + - - type: object - type: array @@ -5624,7 +5624,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5686,21 +5686,25 @@ config *TraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: + - Timeout: + - type: `string` + - DisableMemory: - type: `boolean` - - DisableReturnData: + - DisableStorage: - type: `boolean` - Limit: + - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - Timeout: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - Tracer: @@ -5712,18 +5716,14 @@ config *TraceConfig - Debug: - type: `boolean` - - DisableStack: + - DisableReturnData: - type: `boolean` - - DisableStorage: + - DisableStack: - type: `boolean` - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - + - type: object ``` @@ -5839,7 +5839,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5897,12 +5897,16 @@ args ethapi.CallArgs ``` Schema - - additionalProperties: `false` - properties: - - from: + - 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])+$` @@ -5910,9 +5914,9 @@ args ethapi.CallArgs - type: `string` - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - to: - title: `keccak` @@ -5924,13 +5928,9 @@ args ethapi.CallArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - type: object + - additionalProperties: `false` ``` @@ -6000,37 +6000,35 @@ config *TraceConfig ``` Schema - - type: object - - additionalProperties: `false` - properties: - - Debug: + - Tracer: + - type: `string` + + - DisableMemory: + - type: `boolean` + + - DisableStack: - type: `boolean` - DisableStorage: - type: `boolean` - - Reexec: + - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Tracer: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - DisableMemory: + - Debug: - type: `boolean` - DisableReturnData: - type: `boolean` - - DisableStack: - - type: `boolean` - - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Timeout: - type: `string` @@ -6038,6 +6036,8 @@ config *TraceConfig - additionalProperties: `true` + - type: object + - additionalProperties: `false` ``` @@ -6104,7 +6104,7 @@ interface interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6181,10 +6181,10 @@ hash common.Hash ``` Schema + - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` ``` @@ -6215,22 +6215,9 @@ config *TraceConfig ``` Schema + - type: object - additionalProperties: `false` - properties: - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Timeout: - - type: `string` - - - Tracer: - - type: `string` - - - overrides: - - additionalProperties: `true` - - DisableReturnData: - type: `boolean` @@ -6242,8 +6229,10 @@ config *TraceConfig - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - Debug: - - type: `boolean` + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - DisableMemory: - type: `boolean` @@ -6251,8 +6240,19 @@ config *TraceConfig - DisableStack: - type: `boolean` + - Timeout: + - type: `string` + + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` + + - Debug: + - type: `boolean` + - - type: object ``` @@ -6319,7 +6319,7 @@ interface interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6372,10 +6372,10 @@ level int ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -6401,7 +6401,7 @@ level int _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6458,7 +6458,7 @@ pattern string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6514,7 +6514,7 @@ file string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6571,7 +6571,7 @@ file string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6628,7 +6628,7 @@ file string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/eth.md b/docs/JSON-RPC-API/modules/eth.md index 591464d860..02809c57a4 100755 --- a/docs/JSON-RPC-API/modules/eth.md +++ b/docs/JSON-RPC-API/modules/eth.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -37,7 +37,6 @@ commonAddress []common.Address ``` Schema - - type: array - items: - title: `keccak` @@ -46,6 +45,7 @@ commonAddress []common.Address - type: string + - type: array ``` @@ -72,7 +72,7 @@ commonAddress []common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -149,7 +149,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -208,15 +208,10 @@ args CallArgs - additionalProperties: `false` - properties: - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - from: - pattern: `^0x[a-fA-F\d]{64}$` @@ -238,6 +233,11 @@ args CallArgs - title: `keccak` - type: `string` + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - type: object @@ -311,19 +311,15 @@ overrides *map[common.Address]account - patternProperties: - .*: + - additionalProperties: `false` - properties: - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - state: - patternProperties: - .*: - - title: `keccak` - - type: `string` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - type: `object` @@ -331,10 +327,10 @@ overrides *map[common.Address]account - stateDiff: - patternProperties: - .*: + - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - description: `Hex representation of a Keccak 256 hash` - type: `object` @@ -349,9 +345,13 @@ overrides *map[common.Address]account - title: `dataWord` - type: `string` + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + - type: `object` - - additionalProperties: `false` - type: object @@ -432,10 +432,10 @@ overrides *map[common.Address]account ``` Schema - - type: string - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string + - title: `dataWord` ``` @@ -455,7 +455,7 @@ overrides *map[common.Address]account -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -548,7 +548,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -629,7 +629,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -706,7 +706,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -760,6 +760,16 @@ args CallArgs - additionalProperties: `false` - properties: + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - gas: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -776,19 +786,9 @@ args CallArgs - pattern: `^0x[a-fA-F0-9]+$` - data: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - - from: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - - gas: - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - type: object @@ -866,10 +866,10 @@ blockNrOrHash *rpc.BlockNumberOrHash ``` Schema - - title: `uint64` - - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint64` + - description: `Hex representation of a uint64` ``` @@ -889,7 +889,7 @@ blockNrOrHash *rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -948,10 +948,10 @@ _None_ ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` ``` @@ -971,7 +971,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1023,9 +1023,23 @@ args SendTxArgs ``` Schema - - type: object - additionalProperties: `false` - properties: + - 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` @@ -1042,31 +1056,17 @@ args SendTxArgs - type: `string` - data: + - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - from: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - gasPrice: - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - input: - - title: `dataWord` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` + - type: object ``` @@ -1144,15 +1144,15 @@ args SendTxArgs - additionalProperties: `false` - properties: + - tx: + - additionalProperties: `false` + - type: `object` + - raw: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - tx: - - additionalProperties: `false` - - type: `object` - - type: object @@ -1183,7 +1183,7 @@ args SendTxArgs -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1246,10 +1246,10 @@ _None_ ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -1269,7 +1269,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1323,10 +1323,10 @@ address common.Address ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1371,10 +1371,10 @@ blockNrOrHash rpc.BlockNumberOrHash ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -1394,7 +1394,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1452,10 +1452,10 @@ hash common.Hash ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1502,118 +1502,118 @@ fullTx bool - additionalProperties: `false` - properties: - - gasLimit: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - error: - type: `string` - - logsBloom: - - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - - maxItems: `256` - - minItems: `256` - - type: `array` + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - - number: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - receiptsRoot: + - mixHash: - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - sha3Uncles: + - parentHash: - 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` + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - - error: + - size: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - gasUsed: + - timestamp: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - totalDifficulty: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - miner: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - gasLimit: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - logsBloom: + - items: + - title: `integer` + - type: `string` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + + - maxItems: `256` + - minItems: `256` + - type: `array` - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - parentHash: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - stateRoot: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - 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` - extraData: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - 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` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` @@ -1751,7 +1751,7 @@ fullTx bool -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1820,10 +1820,10 @@ number rpc.BlockNumber - description: `The block height description` + - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint64` @@ -1889,118 +1889,118 @@ fullTx bool - additionalProperties: `false` - properties: - - miner: + - error: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - parentHash: - - title: `keccak` + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - timestamp: + - logsBloom: + - items: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - description: `Hex representation of the integer` + + - maxItems: `256` + - minItems: `256` + - type: `array` + + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` + + - timestamp: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - - transactionsRoot: + - miner: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` + - nonce: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - mixHash: + - number: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - nonce: + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - uncles: + - type: `array` - items: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - - type: `array` - - error: - - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - receiptsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - size: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - stateRoot: + - mixHash: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - - gasLimit: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - logsBloom: - - items: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - description: `Hex representation of the integer` - - - maxItems: `256` - - minItems: `256` - - type: `array` - - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - sha3Uncles: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - totalDifficulty: + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - transactions: - - items: - - additionalProperties: `true` - - type: `array` - - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` @@ -2138,7 +2138,7 @@ fullTx bool -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2263,7 +2263,7 @@ blockHash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2385,10 +2385,10 @@ blockNr rpc.BlockNumber ``` Schema + - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint` ``` @@ -2408,7 +2408,7 @@ blockNr rpc.BlockNumber -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2463,10 +2463,10 @@ address common.Address ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -2511,10 +2511,10 @@ blockNrOrHash rpc.BlockNumberOrHash ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `dataWord` ``` @@ -2534,7 +2534,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2607,7 +2607,7 @@ interface interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2703,8 +2703,13 @@ typesLog []*types.Log - additionalProperties: `false` - properties: - data: + - type: `string` - pattern: `^0x([a-fA-F0-9]?)+$` - title: `bytes` + + - logIndex: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - transactionHash: @@ -2712,39 +2717,34 @@ typesLog []*types.Log - title: `keccak` - type: `string` - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - blockHash: + - address: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - logIndex: + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - removed: - type: `boolean` - topics: - items: - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - description: `Hex representation of a Keccak 256 hash` - type: `array` - transactionIndex: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - address: + - blockHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -2827,7 +2827,7 @@ typesLog []*types.Log -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2931,7 +2931,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2982,10 +2982,10 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` ``` @@ -3023,24 +3023,9 @@ hash common.Hash - additionalProperties: `false` - properties: - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - - gasLimit: - - title: `uint64` - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - gasUsed: @@ -3048,58 +3033,62 @@ hash common.Hash - title: `uint64` - type: `string` - - transactionsRoot: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - miner: - - title: `keccak` + - mixHash: - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - - number: + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - timestamp: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - parentHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - stateRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - timestamp: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - difficulty: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - parentHash: + - miner: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - receiptsRoot: + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - logsBloom: - - type: `array` - items: - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` @@ -3108,16 +3097,27 @@ hash common.Hash - maxItems: `256` - minItems: `256` + - type: `array` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - sha3Uncles: + - size: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - stateRoot: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + + - transactionsRoot: + - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - type: object @@ -3236,7 +3236,7 @@ hash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3293,13 +3293,12 @@ number rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` - description: `The block height description` + - enum: earliest, latest, pending + - type: string - title: `uint64` @@ -3308,6 +3307,7 @@ number rpc.BlockNumber - type: string + - title: `blockNumberIdentifier` ``` @@ -3360,48 +3360,30 @@ number rpc.BlockNumber ``` Schema + - type: object + - additionalProperties: `false` - properties: - - gasLimit: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - miner: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - type: `string` - - - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - extraData: - - title: `dataWord` - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - - receiptsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - sha3Uncles: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - title: `dataWord` - type: `string` - - transactionsRoot: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -3417,49 +3399,67 @@ number rpc.BlockNumber - minItems: `256` - type: `array` - - nonce: - - title: `integer` + - gasLimit: + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` + - pattern: `^0x([a-fA-F\d])+$` - - stateRoot: + - nonce: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - totalDifficulty: - - title: `integer` - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - - difficulty: - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - gasUsed: + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - hash: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - timestamp: + - gasUsed: - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - number: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - - type: object - - additionalProperties: `false` ``` @@ -3575,7 +3575,7 @@ number rpc.BlockNumber -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3638,20 +3638,33 @@ crit FilterCriteria ``` Schema + - additionalProperties: `false` - properties: + - 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` + - Addresses: - items: - - type: `string` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - type: `array` - BlockHash: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - FromBlock: - pattern: `^0x[a-fA-F0-9]+$` @@ -3663,21 +3676,8 @@ crit FilterCriteria - 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 - - additionalProperties: `false` ``` @@ -3752,20 +3752,33 @@ typesLog []*types.Log - additionalProperties: `false` - properties: + - removed: + - type: `boolean` + - topics: - items: + - type: `string` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - type: `array` - - blockHash: + - transactionHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - data: + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: `string` + + - blockHash: + - title: `keccak` + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -3776,14 +3789,6 @@ typesLog []*types.Log - title: `integer` - type: `string` - - removed: - - type: `boolean` - - - transactionHash: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - transactionIndex: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -3794,11 +3799,6 @@ typesLog []*types.Log - title: `keccak` - type: `string` - - data: - - pattern: `^0x([a-fA-F0-9]?)+$` - - title: `bytes` - - type: `string` - - type: object @@ -3877,7 +3877,7 @@ typesLog []*types.Log -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -3948,10 +3948,10 @@ address common.Address ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -4036,12 +4036,13 @@ blockNrOrHash rpc.BlockNumberOrHash ``` Schema + - additionalProperties: `false` - properties: - accountProof: - - type: `array` - items: - type: `string` + - type: `array` - address: - pattern: `^0x[a-fA-F\d]{64}$` @@ -4049,9 +4050,9 @@ blockNrOrHash rpc.BlockNumberOrHash - type: `string` - balance: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - codeHash: - pattern: `^0x[a-fA-F\d]{64}$` @@ -4070,7 +4071,6 @@ blockNrOrHash rpc.BlockNumberOrHash - storageProof: - items: - - type: `object` - additionalProperties: `false` - properties: - key: @@ -4083,17 +4083,17 @@ blockNrOrHash rpc.BlockNumberOrHash - type: `array` - value: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` + - type: `object` - type: `array` - type: object - - additionalProperties: `false` ``` @@ -4167,7 +4167,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4280,10 +4280,10 @@ index hexutil.Uint ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint` ``` @@ -4319,10 +4319,10 @@ index hexutil.Uint ``` Schema + - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -4342,7 +4342,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4399,16 +4399,16 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: + - enum: earliest, latest, pending - type: string - 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 @@ -4458,10 +4458,10 @@ index hexutil.Uint ``` Schema + - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `uint` ``` @@ -4497,10 +4497,10 @@ index hexutil.Uint ``` Schema - - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -4520,7 +4520,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4636,7 +4636,7 @@ hash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4778,7 +4778,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -4836,10 +4836,10 @@ blockHash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -4909,53 +4909,41 @@ index hexutil.Uint ``` Schema - - type: object - - additionalProperties: `false` - properties: - - from: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - to: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - transactionIndex: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - s: + - r: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - value: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - blockHash: + - from: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - - blockNumber: + - s: + - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - gas: + - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - hash: - pattern: `^0x[a-fA-F\d]{64}$` @@ -4967,7 +4955,17 @@ index hexutil.Uint - title: `dataWord` - type: `string` - - nonce: + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - 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` @@ -4977,12 +4975,14 @@ index hexutil.Uint - title: `integer` - type: `string` - - r: + - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - type: object + - additionalProperties: `false` ``` @@ -5072,7 +5072,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5129,10 +5129,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - type: string - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - type: string - title: `uint64` @@ -5227,52 +5227,56 @@ index hexutil.Uint ``` Schema - - type: object - additionalProperties: `false` - properties: - - gasPrice: + - blockHash: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - input: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - nonce: + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - gas: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - r: + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - hash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - s: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - to: @@ -5281,26 +5285,22 @@ index hexutil.Uint - type: `string` - transactionIndex: - - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - v: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - nonce: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - + - type: object ``` @@ -5390,7 +5390,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5444,10 +5444,10 @@ hash common.Hash ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -5485,49 +5485,54 @@ hash common.Hash - additionalProperties: `false` - properties: - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - - to: - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + + - nonce: + - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - transactionIndex: - - title: `uint64` + - to: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - v: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - input: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - nonce: + - gas: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - r: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - input: + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - s: @@ -5535,25 +5540,20 @@ hash common.Hash - title: `integer` - type: `string` - - value: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - gas: + - transactionIndex: - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` + - value: - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - blockNumber: + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - type: object @@ -5646,7 +5646,7 @@ hash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5778,7 +5778,7 @@ blockNrOrHash rpc.BlockNumberOrHash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -5906,7 +5906,7 @@ mapstringinterface map[string]interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6062,119 +6062,119 @@ index hexutil.Uint - additionalProperties: `false` - properties: - - transactionsRoot: + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - receiptsRoot: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - - hash: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - logsBloom: - - maxItems: `256` - - minItems: `256` - - type: `array` + - transactions: - items: - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - additionalProperties: `true` + - type: `array` - - number: - - pattern: `^0x[a-fA-F0-9]+$` + - difficulty: - title: `integer` - type: `string` - - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - transactions: + - logsBloom: + - type: `array` - items: - - additionalProperties: `true` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - type: `array` + - maxItems: `256` + - minItems: `256` - - error: + - miner: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - - mixHash: + - parentHash: - 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` - - - stateRoot: + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasUsed: - - pattern: `^0x([a-fA-F\d])+$` + - gasLimit: - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - - miner: + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - nonce: + - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - receiptsRoot: + - timestamp: + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - pattern: `^0x([a-fA-F\d])+$` - - sha3Uncles: + - totalDifficulty: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - error: - type: `string` - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - mixHash: - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - nonce: - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - - gasLimit: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - parentHash: - - 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 @@ -6311,7 +6311,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6377,10 +6377,10 @@ blockNr rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: + - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending - type: string - - title: `blockNumberTag` - title: `uint64` @@ -6436,10 +6436,10 @@ index hexutil.Uint ``` Schema + - type: string - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -6478,58 +6478,56 @@ index hexutil.Uint - additionalProperties: `false` - properties: - miner: - - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - - size: + - timestamp: + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - - type: `string` - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - uncles: - - items: - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - type: `array` - - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - timestamp: + - gasLimit: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - error: + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - nonce: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - gasLimit: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - number: - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - uncles: + - items: + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - type: `array` - logsBloom: + - type: `array` - items: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -6538,9 +6536,8 @@ index hexutil.Uint - maxItems: `256` - minItems: `256` - - type: `array` - - mixHash: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -6550,46 +6547,49 @@ index hexutil.Uint - title: `keccak` - type: `string` - - transactionsRoot: + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - transactions: + - items: + - additionalProperties: `true` + + - type: `array` + + - sha3Uncles: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasUsed: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - error: - type: `string` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - extraData: + - title: `dataWord` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - parentHash: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - receiptsRoot: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - sha3Uncles: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - transactions: - - items: - - additionalProperties: `true` - - - type: `array` - type: object @@ -6726,7 +6726,7 @@ index hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6827,10 +6827,10 @@ blockHash common.Hash ``` Schema + - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string - title: `uint` - - description: `Hex representation of a uint` ``` @@ -6850,7 +6850,7 @@ blockHash common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -6905,12 +6905,13 @@ blockNr rpc.BlockNumber ``` Schema + - title: `blockNumberIdentifier` - oneOf: - - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` - description: `The block height description` + - enum: earliest, latest, pending + - type: string - title: `uint64` @@ -6919,7 +6920,6 @@ blockNr rpc.BlockNumber - type: string - - title: `blockNumberIdentifier` ``` @@ -6972,10 +6972,10 @@ blockNr rpc.BlockNumber ``` Schema - - type: string - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -6995,7 +6995,7 @@ blockNr rpc.BlockNumber -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7058,6 +7058,7 @@ num4string [4]string ``` Schema + - type: array - items: - type: string @@ -7065,7 +7066,6 @@ num4string [4]string - maxItems: `4` - minItems: `4` - - type: array ``` @@ -7091,7 +7091,7 @@ num4string [4]string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7191,7 +7191,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7243,7 +7243,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7298,7 +7298,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7390,41 +7390,41 @@ crit FilterCriteria - additionalProperties: `false` - properties: + - 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` + - Addresses: - items: - - title: `keccak` - type: `string` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `array` - BlockHash: + - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - type: `string` - FromBlock: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - ToBlock: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - 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: `string` - type: object @@ -7497,7 +7497,7 @@ crit FilterCriteria -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7592,7 +7592,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7675,7 +7675,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -7756,80 +7756,80 @@ RPCTransaction []*RPCTransaction - items: + - type: object - additionalProperties: `false` - properties: - - v: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - blockNumber: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - from: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - s: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - transactionIndex: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - value: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - blockHash: - title: `keccak` - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - gasPrice: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - to: - - title: `keccak` - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - - transactionIndex: - - title: `uint64` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - gas: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - hash: + - gasPrice: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - blockNumber: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + + - from: - 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` - - input: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - s: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - type: object - type: array @@ -7929,7 +7929,7 @@ RPCTransaction []*RPCTransaction -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8005,10 +8005,10 @@ _None_ ``` Schema - - type: string - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -8028,7 +8028,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8082,15 +8082,30 @@ sendArgs SendTxArgs - additionalProperties: `false` - properties: + - gas: + - title: `uint64` + - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + + - 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: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -8103,24 +8118,9 @@ sendArgs SendTxArgs - 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: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - pattern: `^0x[a-fA-F\d]{64}$` - type: object @@ -8228,10 +8228,10 @@ gasLimit *hexutil.Uint64 ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - description: `Hex representation of a uint64` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -8290,7 +8290,7 @@ gasLimit *hexutil.Uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8451,7 +8451,7 @@ encodedTx hexutil.Bytes -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8508,28 +8508,22 @@ args SendTxArgs ``` Schema - - type: object - additionalProperties: `false` - properties: - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - gas: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - input: - - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - nonce: - pattern: `^0x([a-fA-F\d])+$` @@ -8547,11 +8541,17 @@ args SendTxArgs - type: `string` - data: - - title: `dataWord` - type: `string` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + + - from: + - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: object ``` @@ -8650,7 +8650,7 @@ args SendTxArgs -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8761,10 +8761,10 @@ data hexutil.Bytes ``` Schema - - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -8800,10 +8800,10 @@ data hexutil.Bytes ``` Schema - - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -8823,7 +8823,7 @@ data hexutil.Bytes -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -8901,9 +8901,9 @@ args SendTxArgs - type: `string` - gasPrice: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - input: - pattern: `^0x([a-fA-F\d])+$` @@ -9012,7 +9012,6 @@ args SendTxArgs ``` Schema - - type: object - additionalProperties: `false` - properties: - raw: @@ -9025,6 +9024,7 @@ args SendTxArgs - type: `object` + - type: object ``` @@ -9053,7 +9053,7 @@ args SendTxArgs -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9134,10 +9134,10 @@ rate hexutil.Uint64 ``` Schema - - title: `uint64` - - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint64` + - description: `Hex representation of a uint64` ``` @@ -9168,10 +9168,10 @@ id common.Hash ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -9205,7 +9205,7 @@ id common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9273,10 +9273,10 @@ nonce types.BlockNonce ``` Schema + - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string - - title: `integer` ``` @@ -9378,7 +9378,7 @@ digest common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9462,7 +9462,7 @@ subscriptionID rpc.ID -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9520,7 +9520,7 @@ interface interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9595,7 +9595,7 @@ id rpc.ID -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -9661,7 +9661,7 @@ id rpc.ID _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/ethash.md b/docs/JSON-RPC-API/modules/ethash.md index 0e512bf4af..3a0d4ce7a3 100755 --- a/docs/JSON-RPC-API/modules/ethash.md +++ b/docs/JSON-RPC-API/modules/ethash.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -38,10 +38,10 @@ _None_ ``` Schema - - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - type: string ``` @@ -61,7 +61,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -153,7 +153,7 @@ num4string [4]string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -303,7 +303,7 @@ id common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -371,10 +371,10 @@ nonce types.BlockNonce ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -476,7 +476,7 @@ digest common.Hash -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/miner.md b/docs/JSON-RPC-API/modules/miner.md index afbe049fec..21da94e65a 100755 --- a/docs/JSON-RPC-API/modules/miner.md +++ b/docs/JSON-RPC-API/modules/miner.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -61,7 +61,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -149,7 +149,7 @@ etherbase common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -213,7 +213,7 @@ extra string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -267,10 +267,10 @@ gasPrice hexutil.Big ``` Schema + - type: string - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string ``` @@ -304,7 +304,7 @@ gasPrice hexutil.Big -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -388,7 +388,7 @@ interval int _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -443,10 +443,10 @@ threads *int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - type: string + - title: `integer` ``` @@ -472,7 +472,7 @@ threads *int _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -524,7 +524,7 @@ _None_ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/net.md b/docs/JSON-RPC-API/modules/net.md index 544cb56f2f..6a0f4ea744 100755 --- a/docs/JSON-RPC-API/modules/net.md +++ b/docs/JSON-RPC-API/modules/net.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -36,7 +36,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -90,10 +90,10 @@ _None_ ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - type: string + - title: `uint` ``` @@ -113,7 +113,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -165,7 +165,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/personal.md b/docs/JSON-RPC-API/modules/personal.md index f9bec4e623..e9a54d7975 100755 --- a/docs/JSON-RPC-API/modules/personal.md +++ b/docs/JSON-RPC-API/modules/personal.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -68,14 +68,10 @@ pin *bool ``` Schema + - type: object + - additionalProperties: `false` - properties: - - address: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - url: - - additionalProperties: `false` - properties: - Path: - type: `string` @@ -85,10 +81,14 @@ pin *bool - type: `object` + - additionalProperties: `false` + + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` - - type: object - - additionalProperties: `false` ``` @@ -125,7 +125,7 @@ pin *bool -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -231,10 +231,10 @@ sig hexutil.Bytes ``` Schema + - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - type: string - - title: `dataWord` ``` @@ -270,10 +270,10 @@ sig hexutil.Bytes ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -293,7 +293,7 @@ sig hexutil.Bytes -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -411,7 +411,7 @@ password string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -484,7 +484,7 @@ url string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -557,10 +557,10 @@ commonAddress []common.Address - items: + - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - type: string - - title: `keccak` - type: array @@ -590,7 +590,7 @@ commonAddress []common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -643,12 +643,16 @@ rawWallet []rawWallet ``` Schema - - type: array - items: + - type: object - additionalProperties: `false` - properties: + - url: + - type: `string` + - accounts: + - type: `array` - items: - additionalProperties: `false` - properties: @@ -658,7 +662,6 @@ rawWallet []rawWallet - type: `string` - url: - - additionalProperties: `false` - properties: - Path: - type: `string` @@ -668,11 +671,11 @@ rawWallet []rawWallet - type: `object` + - additionalProperties: `false` - type: `object` - - type: `array` - failure: - type: `string` @@ -680,13 +683,10 @@ rawWallet []rawWallet - status: - type: `string` - - url: - - type: `string` - - - type: object + - type: array ``` @@ -748,7 +748,7 @@ rawWallet []rawWallet -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -808,10 +808,10 @@ addr common.Address ``` Schema - - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` + - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -845,7 +845,7 @@ addr common.Address -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -936,7 +936,7 @@ password string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1014,7 +1014,7 @@ passphrase *string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1080,42 +1080,42 @@ args SendTxArgs - additionalProperties: `false` - properties: - - gas: - - title: `uint64` + - value: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - type: `string` - - input: + - data: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - from: + - title: `keccak` - type: `string` - - - to: - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + + - gas: - type: `string` + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - - value: + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - data: + - input: + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - from: + - to: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -1206,10 +1206,10 @@ passwd string ``` Schema - - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - type: string + - title: `keccak` + - description: `Hex representation of a Keccak 256 hash` ``` @@ -1229,7 +1229,7 @@ passwd string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1381,10 +1381,10 @@ passwd string ``` Schema - - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` - description: `Hex representation of some bytes` + - pattern: `^0x([a-fA-F\d])+$` + - type: string ``` @@ -1404,7 +1404,7 @@ passwd string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1475,8 +1475,19 @@ args SendTxArgs ``` Schema + - type: object - 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` @@ -1488,14 +1499,14 @@ args SendTxArgs - type: `string` - input: + - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - - type: `string` - nonce: - - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -1507,18 +1518,7 @@ args SendTxArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - - type: object ``` @@ -1603,10 +1603,10 @@ passwd string ``` Schema - - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - type: string ``` @@ -1626,7 +1626,7 @@ passwd string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1681,6 +1681,7 @@ args SendTxArgs ``` Schema + - additionalProperties: `false` - properties: - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -1693,9 +1694,9 @@ args SendTxArgs - type: `string` - nonce: + - title: `uint64` - type: `string` - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -1713,18 +1714,17 @@ args SendTxArgs - type: `string` - from: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - gas: - - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - type: object - - additionalProperties: `false` ``` @@ -1850,7 +1850,7 @@ passwd string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -1927,10 +1927,10 @@ addr common.Address ``` Schema + - pattern: `^0x[a-fA-F\d]{64}$` - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - - pattern: `^0x[a-fA-F\d]{64}$` ``` @@ -2007,7 +2007,7 @@ duration *uint64 -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -2093,7 +2093,7 @@ pin string _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/trace.md b/docs/JSON-RPC-API/modules/trace.md index e68e3aa798..094de77734 100755 --- a/docs/JSON-RPC-API/modules/trace.md +++ b/docs/JSON-RPC-API/modules/trace.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -40,10 +40,10 @@ number rpc.BlockNumber - title: `blockNumberIdentifier` - oneOf: - - enum: earliest, latest, pending - type: string - title: `blockNumberTag` - description: `The block height description` + - enum: earliest, latest, pending - title: `uint64` @@ -99,45 +99,45 @@ config *TraceConfig ``` Schema + - type: object - additionalProperties: `false` - properties: - - Timeout: + - Limit: + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - Tracer: - type: `string` - - DisableReturnData: - - type: `boolean` + - overrides: + - additionalProperties: `true` - - DisableStack: + - DisableMemory: - type: `boolean` - DisableStorage: - type: `boolean` - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - DisableStack: + - type: `boolean` - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - Timeout: - type: `string` - Debug: - type: `boolean` - - DisableMemory: + - DisableReturnData: - type: `boolean` - - overrides: - - additionalProperties: `true` - - type: object - ``` @@ -232,7 +232,7 @@ interface []interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -324,20 +324,10 @@ args ethapi.CallArgs - additionalProperties: `false` - properties: - - data: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - gas: - - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -354,6 +344,16 @@ args ethapi.CallArgs - title: `integer` - type: `string` + - data: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: `string` + + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - type: object @@ -418,14 +418,6 @@ config *TraceConfig - additionalProperties: `false` - properties: - - DisableStorage: - - type: `boolean` - - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - Timeout: - type: `string` @@ -435,13 +427,15 @@ config *TraceConfig - Debug: - type: `boolean` - - DisableMemory: - - type: `boolean` + - Limit: + - title: `integer` + - type: `string` + - pattern: `^0x[a-fA-F0-9]+$` - - DisableReturnData: + - DisableStack: - type: `boolean` - - DisableStack: + - DisableStorage: - type: `boolean` - Reexec: @@ -452,6 +446,12 @@ config *TraceConfig - overrides: - additionalProperties: `true` + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + - type: object @@ -524,16 +524,16 @@ txTraceResult []*txTraceResult - items: + - additionalProperties: `false` - properties: - - result: - - additionalProperties: `true` - - error: - type: `string` + - result: + - additionalProperties: `true` + - type: object - - additionalProperties: `false` - type: array @@ -569,7 +569,7 @@ txTraceResult []*txTraceResult -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -620,10 +620,10 @@ hash common.Hash ``` Schema + - type: string - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string ``` @@ -656,40 +656,40 @@ config *TraceConfig - additionalProperties: `false` - properties: - - DisableReturnData: + - DisableMemory: - type: `boolean` - DisableStack: - type: `boolean` - - Reexec: + - DisableStorage: + - type: `boolean` + + - Limit: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Timeout: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - Debug: - type: `boolean` - - DisableMemory: + - DisableReturnData: - type: `boolean` + - Timeout: + - type: `string` + - Tracer: - type: `string` - overrides: - additionalProperties: `true` - - DisableStorage: - - type: `boolean` - - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - type: object @@ -758,7 +758,7 @@ interface interface{} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/txpool.md b/docs/JSON-RPC-API/modules/txpool.md index 299dcda586..06470a6360 100755 --- a/docs/JSON-RPC-API/modules/txpool.md +++ b/docs/JSON-RPC-API/modules/txpool.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -45,75 +45,75 @@ mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string - .*: - additionalProperties: `false` - properties: - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - r: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - s: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + + - value: - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - blockHash: + - from: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasPrice: + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - transactionIndex: - - title: `uint64` + - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - from: - - pattern: `^0x[a-fA-F\d]{64}$` + - to: - title: `keccak` - type: `string` + - pattern: `^0x[a-fA-F\d]{64}$` - - gas: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - input: + - transactionIndex: - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - to: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - title: `uint64` - type: `string` - - hash: + - blockHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - v: - - title: `integer` + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - type: `object` @@ -230,7 +230,7 @@ mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -347,7 +347,7 @@ mapstringmapstringmapstringstring map[string]map[string]map[string]string< -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -457,7 +457,7 @@ mapstringhexutilUint map[string]hexutil.Uint -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/docs/JSON-RPC-API/modules/web3.md b/docs/JSON-RPC-API/modules/web3.md index aceb5a8fff..d3f717ded4 100755 --- a/docs/JSON-RPC-API/modules/web3.md +++ b/docs/JSON-RPC-API/modules/web3.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-21T17:27:32-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | | OpenRPC | 1.2.6 | --- @@ -36,7 +36,7 @@ _None_ -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" @@ -88,10 +88,10 @@ input hexutil.Bytes ``` Schema + - type: string - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string ``` @@ -150,7 +150,7 @@ input hexutil.Bytes -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go index 4361a51f2c..bef92c7c8f 100644 --- a/ethclient/docsgen_test.go +++ b/ethclient/docsgen_test.go @@ -180,7 +180,7 @@ _None_ {{- end }} {{- end }} -__Client Method Invocation Examples__ +#### Client Method Invocation Examples === "Shell" From 7809392794403ef13d6612bf152c48e872eb7ca7 Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 22 Jan 2021 08:56:05 -0600 Subject: [PATCH 08/12] mkdocs.yml: line numbers in code blocks Date: 2021-01-22 08:56:05-06:00 Signed-off-by: meows --- mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 61860d4660..ac7598b7d4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -72,3 +72,5 @@ markdown_extensions: social_url_shorthand: true - pymdownx.tasklist: custom_checkbox: true + - pymdownx.highlight: + linenums: true From f89ffdfc6898e9126d5356412f4ca07ad525742c Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 22 Jan 2021 09:07:47 -0600 Subject: [PATCH 09/12] Revert "docs/assets/css: readd chris' ul ul ul" This reverts commit 048f51554595ed98f1bb8ffe2be9f833a5be4c0c. Turns out didn't work for him either. --- docs/assets/css/extra.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css index 6f6d314eaa..04b92b5cf1 100644 --- a/docs/assets/css/extra.css +++ b/docs/assets/css/extra.css @@ -1,6 +1,3 @@ nav.md-nav.md-nav--secondary > ul ul { display: none; } -nav.md-nav.md-nav--secondary > ul ul ul { - display: none; -} From cc5afb07f9f0dc3ff86087a316f5c25953b60d9d Mon Sep 17 00:00:00 2001 From: meows Date: Sat, 23 Jan 2021 04:36:34 -0600 Subject: [PATCH 10/12] docs,ethclient: init ordering for bullet-point style printer --- docs/JSON-RPC-API/modules/admin.md | 86 +- docs/JSON-RPC-API/modules/debug.md | 620 ++++++------- docs/JSON-RPC-API/modules/eth.md | 1202 ++++++++++++------------- docs/JSON-RPC-API/modules/ethash.md | 16 +- docs/JSON-RPC-API/modules/miner.md | 14 +- docs/JSON-RPC-API/modules/net.md | 4 +- docs/JSON-RPC-API/modules/personal.md | 122 +-- docs/JSON-RPC-API/modules/trace.md | 120 +-- docs/JSON-RPC-API/modules/txpool.md | 60 +- docs/JSON-RPC-API/modules/web3.md | 8 +- ethclient/docsgen_test.go | 11 +- 11 files changed, 1136 insertions(+), 1127 deletions(-) diff --git a/docs/JSON-RPC-API/modules/admin.md b/docs/JSON-RPC-API/modules/admin.md index ca9c5ee917..232f7e7efd 100755 --- a/docs/JSON-RPC-API/modules/admin.md +++ b/docs/JSON-RPC-API/modules/admin.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -232,21 +232,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -359,10 +359,10 @@ first *uint64 ``` Schema - - type: string - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: string ``` @@ -393,9 +393,9 @@ last *uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -608,9 +608,9 @@ n int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -709,7 +709,14 @@ _None_ ``` Schema + - additionalProperties: `false` - properties: + - enode: + - type: `string` + + - enr: + - type: `string` + - id: - type: `string` @@ -731,14 +738,15 @@ _None_ - type: `string` - listener: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - type: `object` - protocols: + - additionalProperties: `false` - properties: - discovery: - pattern: `^0x[a-fA-F0-9]+$` @@ -752,17 +760,9 @@ _None_ - type: `object` - - additionalProperties: `false` - - - enode: - - type: `string` - - - enr: - - type: `string` - type: object - - additionalProperties: `false` ``` @@ -895,18 +895,27 @@ p2pPeerInfo []*p2p.PeerInfo - 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: - - static: - - type: `boolean` - - - trusted: - - type: `boolean` - - inbound: - type: `boolean` @@ -916,15 +925,18 @@ p2pPeerInfo []*p2p.PeerInfo - remoteAddress: - type: `string` + - static: + - type: `boolean` + + - trusted: + - type: `boolean` + - type: `object` - protocols: - additionalProperties: `false` - properties: - - trusted: - - type: `boolean` - - inbound: - type: `boolean` @@ -937,23 +949,11 @@ p2pPeerInfo []*p2p.PeerInfo - static: - type: `boolean` + - trusted: + - type: `boolean` - - type: `object` - - - caps: - - items: - - type: `string` - - - type: `array` - - - enode: - - type: `string` - - - enr: - - type: `string` - - id: - - type: `string` + - type: `object` - type: object @@ -1257,9 +1257,9 @@ port *int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -1421,9 +1421,9 @@ port *int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string diff --git a/docs/JSON-RPC-API/modules/debug.md b/docs/JSON-RPC-API/modules/debug.md index d04d40c77b..11a3697a08 100755 --- a/docs/JSON-RPC-API/modules/debug.md +++ b/docs/JSON-RPC-API/modules/debug.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -44,10 +44,10 @@ start []byte ``` Schema - - type: string - - title: `bytes` - description: `Hex representation of a variable length byte array` - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: string ``` @@ -78,9 +78,9 @@ maxResults int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -149,9 +149,16 @@ incompletes bool - accounts: - patternProperties: - .*: - - type: `object` - additionalProperties: `false` - properties: + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - balance: + - type: `string` + - code: - type: `string` @@ -179,23 +186,16 @@ incompletes bool - type: `object` - - address: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - - balance: - - type: `string` - + - type: `object` - type: `object` - next: - - type: `string` - pattern: `^0x([a-fA-F0-9]?)+$` - title: `bytes` + - type: `string` - root: - type: `string` @@ -429,9 +429,9 @@ nsec uint ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -645,9 +645,9 @@ nsec uint ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -731,21 +731,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -798,12 +798,21 @@ blockNr rpc.BlockNumber ``` 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` @@ -831,14 +840,6 @@ blockNr rpc.BlockNumber - type: `object` - - address: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - balance: - - type: `string` - - type: `object` @@ -850,7 +851,6 @@ blockNr rpc.BlockNumber - type: object - - additionalProperties: `false` ``` @@ -1034,9 +1034,17 @@ _None_ ``` Schema - - type: object - 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` @@ -1063,20 +1071,12 @@ _None_ - type: `array` - PauseTotal: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - LastGC: - - format: `date-time` - type: `string` - - NumGC: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - + - type: object ``` @@ -1198,37 +1198,12 @@ BadBlockArgs []*BadBlockArgs - block: - additionalProperties: `false` - properties: - - error: - - type: `string` - - - miner: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - number: + - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - error: - type: `string` - extraData: @@ -1237,33 +1212,55 @@ BadBlockArgs []*BadBlockArgs - type: `string` - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` + + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` - - uncles: + - hash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + + - logsBloom: - items: - - title: `keccak` + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` + - maxItems: `256` + - minItems: `256` - type: `array` - - stateRoot: + - miner: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - timestamp: - - title: `uint64` + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - 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}$` @@ -1275,10 +1272,20 @@ BadBlockArgs []*BadBlockArgs - title: `keccak` - type: `string` - - parentHash: - - title: `keccak` + - 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]+$` @@ -1291,25 +1298,18 @@ BadBlockArgs []*BadBlockArgs - type: `array` - - gasUsed: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - hash: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - logsBloom: + - uncles: - items: - - title: `integer` + - description: `Hex representation of a Keccak 256 hash` + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - maxItems: `256` - - minItems: `256` - type: `array` @@ -1548,9 +1548,9 @@ number uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -1648,10 +1648,10 @@ startHash common.Hash ``` Schema + - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` + - type: string ``` @@ -1682,9 +1682,9 @@ endHash *common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1722,9 +1722,9 @@ commonAddress []common.Address - items: - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1831,9 +1831,9 @@ startNum uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -1865,10 +1865,10 @@ endNum *uint64 ``` Schema - - type: string - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: string ``` @@ -1905,9 +1905,9 @@ commonAddress []common.Address - items: - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -2022,8 +2022,8 @@ nsec uint - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` @@ -2111,52 +2111,77 @@ _None_ - additionalProperties: `false` - properties: - - HeapAlloc: + - Alloc: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - HeapIdle: + - BuckHashSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - MCacheInuse: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` + - BySize: + - items: + - additionalProperties: `false` + - properties: + - Frees: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - Sys: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - Mallocs: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - LastGC: + - 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` - - StackSys: + - GCCPUFraction: + - type: `number` + + - GCSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - BuckHashSys: + - HeapAlloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - MCacheSys: - - type: `string` + - HeapIdle: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - MSpanInuse: + - HeapInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - PauseTotalNs: + - HeapObjects: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2167,133 +2192,108 @@ _None_ - 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` - - NextGC: + - MCacheInuse: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - OtherSys: + - MCacheSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - StackInuse: + - MSpanInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Alloc: + - MSpanSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - HeapInuse: + - Mallocs: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` + + - NextGC: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - Frees: + - NumForcedGC: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + + - NumGC: - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - MSpanSys: + - OtherSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - PauseEnd: - - type: `array` - items: - - title: `integer` - - type: `string` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - maxItems: `256` - minItems: `256` - - - HeapObjects: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` + - type: `array` - PauseNs: - items: - - type: `string` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - maxItems: `256` - minItems: `256` - type: `array` - - TotalAlloc: + - PauseTotalNs: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - NumGC: + - StackInuse: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - BySize: - - items: - - properties: - - Frees: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Mallocs: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Size: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - - type: `object` - - additionalProperties: `false` - - - maxItems: `61` - - minItems: `61` - - type: `array` - - - DebugGC: - - type: `boolean` - - - EnableGC: - - type: `boolean` - - - GCCPUFraction: - - type: `number` - - - GCSys: + - StackSys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - Mallocs: + - Sys: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - NumForcedGC: + - TotalAlloc: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -2570,9 +2570,9 @@ nsec uint ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -2655,9 +2655,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -2694,9 +2694,9 @@ hash common.Hash ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -2771,10 +2771,10 @@ number uint64 ``` Schema + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - - description: `Hex representation of the integer` + - type: string ``` @@ -2864,10 +2864,10 @@ hash common.Hash ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: string ``` @@ -2974,9 +2974,9 @@ number uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -3070,9 +3070,9 @@ rate int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -3152,9 +3152,9 @@ v int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -3191,10 +3191,10 @@ v int ``` Schema + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` - - description: `Hex representation of the integer` + - type: string ``` @@ -3266,9 +3266,9 @@ number hexutil.Uint64 ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -3346,9 +3346,9 @@ rate int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -3482,9 +3482,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -3518,6 +3518,9 @@ config *StdTraceConfig - additionalProperties: `false` - properties: + - Debug: + - type: `boolean` + - DisableMemory: - type: `boolean` @@ -3545,9 +3548,6 @@ config *StdTraceConfig - title: `keccak` - type: `string` - - Debug: - - type: `boolean` - - overrides: - additionalProperties: `true` @@ -3710,9 +3710,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -3746,14 +3746,6 @@ config *StdTraceConfig - additionalProperties: `false` - properties: - - Limit: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - overrides: - - additionalProperties: `true` - - Debug: - type: `boolean` @@ -3769,16 +3761,24 @@ config *StdTraceConfig - DisableStorage: - type: `boolean` - - Reexec: + - 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 @@ -4184,10 +4184,10 @@ blockHash common.Hash ``` Schema + - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` + - type: string ``` @@ -4220,8 +4220,8 @@ txIndex int - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` @@ -4252,9 +4252,9 @@ contractAddress common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4286,9 +4286,9 @@ keyStart hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -4320,9 +4320,9 @@ maxResult int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -4359,7 +4359,6 @@ maxResult int ``` Schema - - type: object - additionalProperties: `false` - properties: - nextKey: @@ -4389,6 +4388,7 @@ maxResult int - type: `object` + - type: object ``` @@ -4501,10 +4501,10 @@ address common.Address ``` Schema + - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` + - type: string ``` @@ -4535,9 +4535,9 @@ number uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -4576,8 +4576,8 @@ number uint64 - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` + - type: string ``` @@ -4678,9 +4678,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4712,12 +4712,20 @@ config *TraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + - DisableReturnData: - type: `boolean` + - DisableStack: + - type: `boolean` + - DisableStorage: - type: `boolean` @@ -4726,30 +4734,22 @@ config *TraceConfig - title: `integer` - type: `string` - - Timeout: + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - Tracer: + - Timeout: - type: `string` - - Debug: - - type: `boolean` - - - DisableMemory: - - type: `boolean` - - - DisableStack: - - type: `boolean` - - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - Tracer: - type: `string` - overrides: - additionalProperties: `true` + - type: object ``` @@ -4925,10 +4925,10 @@ blob []byte ``` Schema - - type: string - - title: `bytes` - description: `Hex representation of a variable length byte array` - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` + - type: string ``` @@ -4964,9 +4964,23 @@ config *TraceConfig - 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` @@ -4981,20 +4995,6 @@ config *TraceConfig - overrides: - additionalProperties: `true` - - DisableMemory: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - - - DisableStorage: - - type: `boolean` - - - Limit: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - type: object @@ -5165,9 +5165,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -5201,13 +5201,7 @@ config *TraceConfig - additionalProperties: `false` - properties: - - Tracer: - - type: `string` - - - overrides: - - additionalProperties: `true` - - - DisableStorage: + - Debug: - type: `boolean` - DisableMemory: @@ -5219,21 +5213,27 @@ config *TraceConfig - 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` - - pattern: `^0x[a-fA-F0-9]+$` - Timeout: - type: `string` - - Debug: - - type: `boolean` + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` - type: object @@ -5411,15 +5411,15 @@ number rpc.BlockNumber - oneOf: + - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` - - description: `The block height description` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -5473,23 +5473,15 @@ config *TraceConfig - additionalProperties: `false` - properties: - - DisableReturnData: + - Debug: - type: `boolean` - - Reexec: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - Tracer: - - type: `string` - - - overrides: - - additionalProperties: `true` - - DisableMemory: - type: `boolean` + - DisableReturnData: + - type: `boolean` + - DisableStack: - type: `boolean` @@ -5501,11 +5493,19 @@ config *TraceConfig - title: `integer` - type: `string` + - Reexec: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - Timeout: - type: `string` - - Debug: - - type: `boolean` + - Tracer: + - type: `string` + + - overrides: + - additionalProperties: `true` - type: object @@ -5579,7 +5579,6 @@ txTraceResult []*txTraceResult - items: - - type: object - additionalProperties: `false` - properties: - error: @@ -5589,6 +5588,7 @@ txTraceResult []*txTraceResult - additionalProperties: `true` + - type: object - type: array @@ -5688,40 +5688,40 @@ config *TraceConfig - additionalProperties: `false` - properties: - - Timeout: - - type: `string` + - 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` - - pattern: `^0x[a-fA-F0-9]+$` - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` + - Timeout: + - type: `string` + - Tracer: - type: `string` - overrides: - additionalProperties: `true` - - Debug: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - - - DisableStack: - - type: `boolean` - - type: object @@ -5794,7 +5794,6 @@ txTraceResult []*txTraceResult - items: - - type: object - additionalProperties: `false` - properties: - error: @@ -5804,6 +5803,7 @@ txTraceResult []*txTraceResult - additionalProperties: `true` + - type: object - type: array @@ -5897,6 +5897,7 @@ args ethapi.CallArgs ``` Schema + - additionalProperties: `false` - properties: - data: - pattern: `^0x([a-fA-F\d])+$` @@ -5914,14 +5915,14 @@ args ethapi.CallArgs - type: `string` - gasPrice: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - to: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -5930,7 +5931,6 @@ args ethapi.CallArgs - type: object - - additionalProperties: `false` ``` @@ -6000,13 +6000,17 @@ config *TraceConfig ``` Schema + - additionalProperties: `false` - properties: - - Tracer: - - type: `string` + - Debug: + - type: `boolean` - DisableMemory: - type: `boolean` + - DisableReturnData: + - type: `boolean` + - DisableStack: - type: `boolean` @@ -6023,21 +6027,17 @@ config *TraceConfig - title: `integer` - type: `string` - - Debug: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - - Timeout: - type: `string` + - Tracer: + - type: `string` + - overrides: - additionalProperties: `true` - type: object - - additionalProperties: `false` ``` @@ -6181,9 +6181,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -6215,31 +6215,33 @@ config *TraceConfig ``` Schema - - type: object - 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` - - pattern: `^0x[a-fA-F0-9]+$` - Reexec: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - DisableMemory: - - type: `boolean` - - - DisableStack: - - type: `boolean` - - Timeout: - type: `string` @@ -6249,10 +6251,8 @@ config *TraceConfig - overrides: - additionalProperties: `true` - - Debug: - - type: `boolean` - + - type: object ``` @@ -6372,9 +6372,9 @@ level int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string diff --git a/docs/JSON-RPC-API/modules/eth.md b/docs/JSON-RPC-API/modules/eth.md index 02809c57a4..66fd0629b1 100755 --- a/docs/JSON-RPC-API/modules/eth.md +++ b/docs/JSON-RPC-API/modules/eth.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -39,9 +39,9 @@ commonAddress []common.Address - items: - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -126,9 +126,9 @@ _None_ ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -209,9 +209,9 @@ args CallArgs - additionalProperties: `false` - properties: - data: + - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - from: - pattern: `^0x[a-fA-F\d]{64}$` @@ -313,6 +313,21 @@ overrides *map[common.Address]account - .*: - 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: - .*: @@ -335,21 +350,6 @@ overrides *map[common.Address]account - type: `object` - - 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` - - type: `object` @@ -434,8 +434,8 @@ overrides *map[common.Address]account - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` + - type: string ``` @@ -525,9 +525,9 @@ _None_ ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -606,9 +606,9 @@ _None_ ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -683,9 +683,9 @@ _None_ ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -760,15 +760,20 @@ args CallArgs - 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` - - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -781,14 +786,9 @@ args CallArgs - type: `string` - value: - - title: `integer` - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - - - data: - - title: `dataWord` + - title: `integer` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - type: object @@ -866,10 +866,10 @@ blockNrOrHash *rpc.BlockNumberOrHash ``` Schema + - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - - description: `Hex representation of a uint64` + - type: string ``` @@ -950,8 +950,8 @@ _None_ - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` + - type: string ``` @@ -1025,6 +1025,16 @@ args SendTxArgs - 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` @@ -1055,16 +1065,6 @@ args SendTxArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - type: object @@ -1144,15 +1144,15 @@ args SendTxArgs - additionalProperties: `false` - properties: - - tx: - - additionalProperties: `false` - - type: `object` - - raw: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` + - tx: + - additionalProperties: `false` + - type: `object` + - type: object @@ -1248,8 +1248,8 @@ _None_ - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` @@ -1323,9 +1323,9 @@ address common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1373,8 +1373,8 @@ blockNrOrHash rpc.BlockNumberOrHash - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` @@ -1452,9 +1452,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1502,83 +1502,98 @@ fullTx bool - 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` - - stateRoot: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - difficulty: + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - mixHash: - - title: `keccak` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - sha3Uncles: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - size: - - title: `uint64` + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - timestamp: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - totalDifficulty: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - - transactionsRoot: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasLimit: + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - logsBloom: - - items: - - title: `integer` - - type: `string` - - description: `Hex representation of the integer` - - pattern: `^0x[a-fA-F0-9]+$` - - - maxItems: `256` - - minItems: `256` - - type: `array` - - nonce: - - title: `integer` - - type: `string` + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - - - receiptsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - title: `integer` - type: `string` - transactions: @@ -1587,6 +1602,11 @@ fullTx bool - type: `array` + - transactionsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - uncles: - items: - description: `Hex representation of a Keccak 256 hash` @@ -1596,26 +1616,6 @@ fullTx bool - type: `array` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - 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` - - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - type: object @@ -1811,21 +1811,21 @@ number rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: + - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` - - description: `The block height description` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -1889,120 +1889,120 @@ fullTx bool - 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` - - description: `Hex representation of the integer` - maxItems: `256` - minItems: `256` - type: `array` - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - timestamp: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - miner: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - nonce: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - number: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - transactions: - - items: - - additionalProperties: `true` - - - type: `array` - - - sha3Uncles: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - uncles: - - type: `array` - - items: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - receiptsRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - gasUsed: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - mixHash: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - receiptsRoot: + - stateRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - timestamp: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - parentHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - stateRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - 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 @@ -2201,9 +2201,9 @@ blockHash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -2240,9 +2240,9 @@ blockHash common.Hash ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -2318,21 +2318,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -2385,9 +2385,9 @@ blockNr rpc.BlockNumber ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -2463,9 +2463,9 @@ address common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -2513,8 +2513,8 @@ blockNrOrHash rpc.BlockNumberOrHash - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` + - type: string ``` @@ -2702,22 +2702,12 @@ typesLog []*types.Log - additionalProperties: `false` - properties: - - data: - - type: `string` - - pattern: `^0x([a-fA-F0-9]?)+$` - - title: `bytes` - - - logIndex: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - transactionHash: + - address: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - address: + - blockHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -2727,28 +2717,38 @@ typesLog []*types.Log - 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` - - description: `Hex representation of a Keccak 256 hash` - 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` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - type: object @@ -2908,9 +2908,9 @@ _None_ ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -2984,8 +2984,8 @@ hash common.Hash - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` + - type: string ``` @@ -3023,10 +3023,20 @@ hash common.Hash - 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])+$` @@ -3038,86 +3048,76 @@ hash common.Hash - title: `keccak` - type: `string` - - mixHash: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - logsBloom: + - items: + - description: `Hex representation of the integer` + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` + - maxItems: `256` + - minItems: `256` + - type: `array` - - parentHash: + - miner: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - sha3Uncles: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - timestamp: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - difficulty: - - type: `string` + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - - - gasLimit: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - miner: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - totalDifficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - parentHash: + - 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` - - 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: - - type: `string` - 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` - - pattern: `^0x[a-fA-F\d]{64}$` - type: object @@ -3295,15 +3295,15 @@ number rpc.BlockNumber - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -3360,19 +3360,8 @@ number rpc.BlockNumber ``` Schema - - type: object - additionalProperties: `false` - properties: - - miner: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - parentHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - difficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` @@ -3383,6 +3372,16 @@ number rpc.BlockNumber - 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` @@ -3390,31 +3389,36 @@ number rpc.BlockNumber - logsBloom: - items: + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - description: `Hex representation of the integer` - maxItems: `256` - minItems: `256` - type: `array` - - gasLimit: - - title: `uint64` + - miner: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - nonce: + - mixHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` + + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - totalDifficulty: - - type: `string` + - number: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - transactionsRoot: + - parentHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -3424,6 +3428,11 @@ number rpc.BlockNumber - 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` @@ -3439,27 +3448,18 @@ number rpc.BlockNumber - title: `uint64` - type: `string` - - gasUsed: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - - mixHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - number: - - type: `string` + - totalDifficulty: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - - sha3Uncles: + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` + - type: object ``` @@ -3640,18 +3640,6 @@ crit FilterCriteria - additionalProperties: `false` - properties: - - 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` - - Addresses: - items: - description: `Hex representation of a Keccak 256 hash POINTER` @@ -3662,9 +3650,9 @@ crit FilterCriteria - type: `array` - BlockHash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - FromBlock: - pattern: `^0x[a-fA-F0-9]+$` @@ -3676,6 +3664,18 @@ crit FilterCriteria - 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 @@ -3752,53 +3752,53 @@ typesLog []*types.Log - additionalProperties: `false` - properties: - - removed: - - type: `boolean` - - - topics: - - items: - - type: `string` - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - - type: `array` - - - transactionHash: + - address: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - data: - - pattern: `^0x([a-fA-F0-9]?)+$` - - title: `bytes` - - type: `string` - - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - logIndex: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - data: + - pattern: `^0x([a-fA-F0-9]?)+$` + - title: `bytes` - type: `string` - - transactionIndex: + - logIndex: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - address: + - 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 @@ -3948,9 +3948,9 @@ address common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4083,9 +4083,9 @@ blockNrOrHash rpc.BlockNumberOrHash - type: `array` - value: - - type: `string` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` + - type: `string` - type: `object` @@ -4246,9 +4246,9 @@ blockHash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4282,8 +4282,8 @@ index hexutil.Uint - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint` + - type: string ``` @@ -4319,10 +4319,10 @@ index hexutil.Uint ``` Schema - - type: string - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: string ``` @@ -4396,21 +4396,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: + - description: `The block height description` - enum: earliest, latest, pending - - type: string - title: `blockNumberTag` - - description: `The block height description` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -4458,9 +4458,9 @@ index hexutil.Uint ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -4497,9 +4497,9 @@ index hexutil.Uint ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -4574,9 +4574,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4613,9 +4613,9 @@ hash common.Hash ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -4698,9 +4698,9 @@ address common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4755,9 +4755,9 @@ blockNrOrHash rpc.BlockNumberOrHash ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -4836,9 +4836,9 @@ blockHash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -4870,9 +4870,9 @@ index hexutil.Uint ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -4909,15 +4909,11 @@ index hexutil.Uint ``` Schema + - additionalProperties: `false` - properties: - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - r: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - blockNumber: @@ -4926,19 +4922,14 @@ index hexutil.Uint - type: `string` - from: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - s: - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - gas: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -4955,9 +4946,19 @@ index hexutil.Uint - title: `dataWord` - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - 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: @@ -4982,7 +4983,6 @@ index hexutil.Uint - type: object - - additionalProperties: `false` ``` @@ -5126,21 +5126,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -5188,9 +5188,9 @@ index hexutil.Uint ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -5230,23 +5230,18 @@ index hexutil.Uint - additionalProperties: `false` - properties: - blockHash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - type: `string` - - r: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - v: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - gas: @@ -5269,14 +5264,19 @@ index hexutil.Uint - title: `dataWord` - type: `string` - - s: + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - s: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - to: @@ -5285,14 +5285,14 @@ index hexutil.Uint - type: `string` - transactionIndex: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - nonce: + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - value: - pattern: `^0x[a-fA-F0-9]+$` @@ -5444,9 +5444,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -5485,54 +5485,49 @@ hash common.Hash - 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` - - hash: + - from: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - nonce: + - gas: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - r: + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - to: - - type: `string` + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - v: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - gas: + - nonce: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - input: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - r: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - s: @@ -5540,17 +5535,22 @@ hash common.Hash - 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` - - pattern: `^0x([a-fA-F\d])+$` - - value: + - v: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - gasPrice: + - value: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` @@ -5707,9 +5707,9 @@ address common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -5755,9 +5755,9 @@ blockNrOrHash rpc.BlockNumberOrHash ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -5841,9 +5841,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -5987,9 +5987,9 @@ blockHash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -6021,9 +6021,9 @@ index hexutil.Uint ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -6062,31 +6062,28 @@ index hexutil.Uint - additionalProperties: `false` - properties: - - extraData: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - receiptsRoot: + - error: - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - stateRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - transactions: - - items: - - additionalProperties: `true` - - - type: `array` + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` - - difficulty: - - title: `integer` + - gasUsed: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - hash: - pattern: `^0x[a-fA-F\d]{64}$` @@ -6094,7 +6091,6 @@ index hexutil.Uint - type: `string` - logsBloom: - - type: `array` - items: - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` @@ -6103,68 +6099,72 @@ index hexutil.Uint - 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` - - sha3Uncles: + - receiptsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - gasLimit: - - title: `uint64` + - sha3Uncles: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - gasUsed: + - size: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - number: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - timestamp: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - transactions: + - items: + - additionalProperties: `true` - - error: - - type: `string` + - type: `array` - - mixHash: - - type: `string` + - transactionsRoot: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - - - nonce: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - size: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - type: `string` - uncles: @@ -6374,21 +6374,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -6436,10 +6436,10 @@ index hexutil.Uint ``` Schema - - type: string - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` + - type: string ``` @@ -6477,86 +6477,74 @@ index hexutil.Uint - additionalProperties: `false` - properties: - - miner: - - title: `keccak` + - difficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - timestamp: + - error: - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - transactionsRoot: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - extraData: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - difficulty: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - gasLimit: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - gasLimit: + - gasUsed: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - mixHash: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - nonce: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - - number: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - uncles: - - items: - - description: `Hex representation of a Keccak 256 hash` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - type: `array` - - logsBloom: - - type: `array` - items: + - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - description: `Hex representation of the integer` - maxItems: `256` - minItems: `256` + - type: `array` - - parentHash: + - miner: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - stateRoot: + - mixHash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - totalDifficulty: + - nonce: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - transactions: - - items: - - additionalProperties: `true` + - number: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` - - type: `array` + - 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}$` @@ -6568,29 +6556,41 @@ index hexutil.Uint - title: `uint64` - type: `string` - - error: - - type: `string` - - - extraData: - - title: `dataWord` + - stateRoot: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - gasUsed: + - timestamp: - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - totalDifficulty: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - receiptsRoot: + - 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 @@ -6788,9 +6788,9 @@ blockHash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -6829,8 +6829,8 @@ blockHash common.Hash - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint` + - type: string ``` @@ -6905,21 +6905,21 @@ blockNr rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -6972,9 +6972,9 @@ blockNr rpc.BlockNumber ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -7058,7 +7058,6 @@ num4string [4]string ``` Schema - - type: array - items: - type: string @@ -7066,6 +7065,7 @@ num4string [4]string - maxItems: `4` - minItems: `4` + - type: array ``` @@ -7168,9 +7168,9 @@ _None_ ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -7390,42 +7390,42 @@ crit FilterCriteria - additionalProperties: `false` - properties: - - 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` - - Addresses: - items: - - type: `string` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - type: `array` - BlockHash: - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` + - type: `string` - FromBlock: + - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - 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 @@ -7756,35 +7756,19 @@ RPCTransaction []*RPCTransaction - items: - - type: object - additionalProperties: `false` - properties: - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - transactionIndex: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` - - type: `string` - - - value: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - type: `string` - - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - r: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - to: + - from: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -7795,16 +7779,11 @@ RPCTransaction []*RPCTransaction - type: `string` - gasPrice: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` @@ -7819,17 +7798,38 @@ RPCTransaction []*RPCTransaction - title: `uint64` - type: `string` - - s: + - 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 @@ -8005,9 +8005,9 @@ _None_ ``` Schema - - title: `uint` - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint` - type: string @@ -8082,10 +8082,20 @@ sendArgs SendTxArgs - 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` - - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -8112,16 +8122,6 @@ sendArgs SendTxArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - from: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - type: object @@ -8194,9 +8194,9 @@ gasPrice *hexutil.Big ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -8228,9 +8228,9 @@ gasLimit *hexutil.Uint64 ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -8267,10 +8267,10 @@ gasLimit *hexutil.Uint64 ``` Schema + - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` + - type: string ``` @@ -8389,9 +8389,9 @@ encodedTx hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -8428,9 +8428,9 @@ encodedTx hexutil.Bytes ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -8510,20 +8510,30 @@ args SendTxArgs - 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` - - pattern: `^0x[a-fA-F0-9]+$` - input: + - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - nonce: - pattern: `^0x([a-fA-F\d])+$` @@ -8540,16 +8550,6 @@ args SendTxArgs - title: `integer` - type: `string` - - data: - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - - from: - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: object @@ -8627,9 +8627,9 @@ args SendTxArgs ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -8727,9 +8727,9 @@ addr common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -8761,9 +8761,9 @@ data hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -8800,9 +8800,9 @@ data hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -8895,6 +8895,16 @@ args SendTxArgs - 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` @@ -8925,16 +8935,6 @@ args SendTxArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - from: - - title: `keccak` - - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - - type: object @@ -9134,10 +9134,10 @@ rate hexutil.Uint64 ``` Schema + - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint64` - - description: `Hex representation of a uint64` + - type: string ``` @@ -9168,10 +9168,10 @@ id common.Hash ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: string ``` @@ -9273,9 +9273,9 @@ nonce types.BlockNonce ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -9307,9 +9307,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -9341,9 +9341,9 @@ digest common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string diff --git a/docs/JSON-RPC-API/modules/ethash.md b/docs/JSON-RPC-API/modules/ethash.md index 3a0d4ce7a3..ae5a52e2e9 100755 --- a/docs/JSON-RPC-API/modules/ethash.md +++ b/docs/JSON-RPC-API/modules/ethash.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -38,9 +38,9 @@ _None_ ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -120,7 +120,6 @@ num4string [4]string ``` Schema - - type: array - items: - type: string @@ -128,6 +127,7 @@ num4string [4]string - maxItems: `4` - minItems: `4` + - type: array ``` @@ -232,9 +232,9 @@ rate hexutil.Uint64 ``` Schema - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string @@ -266,9 +266,9 @@ id common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -373,8 +373,8 @@ nonce types.BlockNonce - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` @@ -405,9 +405,9 @@ hash common.Hash ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -441,8 +441,8 @@ digest common.Hash - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` + - type: string ``` diff --git a/docs/JSON-RPC-API/modules/miner.md b/docs/JSON-RPC-API/modules/miner.md index 21da94e65a..fd91ba73ab 100755 --- a/docs/JSON-RPC-API/modules/miner.md +++ b/docs/JSON-RPC-API/modules/miner.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -38,9 +38,9 @@ _None_ ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -112,9 +112,9 @@ etherbase common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -267,10 +267,10 @@ gasPrice hexutil.Big ``` Schema - - type: string - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: string ``` @@ -359,9 +359,9 @@ interval int ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string @@ -445,8 +445,8 @@ threads *int - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` - - type: string - title: `integer` + - type: string ``` diff --git a/docs/JSON-RPC-API/modules/net.md b/docs/JSON-RPC-API/modules/net.md index 6a0f4ea744..e51704bcb5 100755 --- a/docs/JSON-RPC-API/modules/net.md +++ b/docs/JSON-RPC-API/modules/net.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -92,8 +92,8 @@ _None_ - description: `Hex representation of a uint` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `uint` + - type: string ``` diff --git a/docs/JSON-RPC-API/modules/personal.md b/docs/JSON-RPC-API/modules/personal.md index e9a54d7975..8f42f9a7e5 100755 --- a/docs/JSON-RPC-API/modules/personal.md +++ b/docs/JSON-RPC-API/modules/personal.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -68,10 +68,15 @@ pin *bool ``` Schema - - type: object - additionalProperties: `false` - properties: + - address: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: `string` + - url: + - additionalProperties: `false` - properties: - Path: - type: `string` @@ -81,14 +86,9 @@ pin *bool - type: `object` - - additionalProperties: `false` - - - address: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` + - type: object ``` @@ -197,9 +197,9 @@ data hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -231,9 +231,9 @@ sig hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -270,10 +270,10 @@ sig hexutil.Bytes ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: string ``` @@ -388,9 +388,9 @@ password string ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -557,9 +557,9 @@ commonAddress []common.Address - items: - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -645,14 +645,9 @@ rawWallet []rawWallet - items: - - type: object - additionalProperties: `false` - properties: - - url: - - type: `string` - - accounts: - - type: `array` - items: - additionalProperties: `false` - properties: @@ -662,6 +657,7 @@ rawWallet []rawWallet - type: `string` - url: + - additionalProperties: `false` - properties: - Path: - type: `string` @@ -671,11 +667,11 @@ rawWallet []rawWallet - type: `object` - - additionalProperties: `false` - type: `object` + - type: `array` - failure: - type: `string` @@ -683,8 +679,12 @@ rawWallet []rawWallet - status: - type: `string` + - url: + - type: `string` + - type: object + - type: array @@ -808,10 +808,10 @@ addr common.Address ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: string ``` @@ -913,10 +913,10 @@ password string ``` Schema + - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` + - type: string ``` @@ -1080,25 +1080,20 @@ args SendTxArgs - additionalProperties: `false` - properties: - - value: - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` - - data: - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` - type: `string` - from: + - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - pattern: `^0x[a-fA-F\d]{64}$` - gas: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` + - type: `string` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -1106,9 +1101,9 @@ args SendTxArgs - type: `string` - input: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + - type: `string` - nonce: - pattern: `^0x([a-fA-F\d])+$` @@ -1120,6 +1115,11 @@ args SendTxArgs - title: `keccak` - type: `string` + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` + - type: `string` + - type: object @@ -1206,10 +1206,10 @@ passwd string ``` Schema + - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash` + - type: string ``` @@ -1301,8 +1301,8 @@ data hexutil.Bytes - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` - - type: string - title: `dataWord` + - type: string ``` @@ -1333,9 +1333,9 @@ addr common.Address ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1381,9 +1381,9 @@ passwd string ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string @@ -1475,7 +1475,6 @@ args SendTxArgs ``` Schema - - type: object - additionalProperties: `false` - properties: - data: @@ -1499,14 +1498,14 @@ args SendTxArgs - type: `string` - input: - - type: `string` - pattern: `^0x([a-fA-F\d])+$` - title: `dataWord` + - type: `string` - nonce: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -1519,6 +1518,7 @@ args SendTxArgs - type: `string` + - type: object ``` @@ -1603,9 +1603,9 @@ passwd string ``` Schema - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: string @@ -1683,6 +1683,21 @@ args SendTxArgs - 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` @@ -1694,9 +1709,9 @@ args SendTxArgs - type: `string` - nonce: + - pattern: `^0x([a-fA-F\d])+$` - title: `uint64` - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - to: - pattern: `^0x[a-fA-F\d]{64}$` @@ -1708,21 +1723,6 @@ args SendTxArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - - gas: - - title: `uint64` - - type: `string` - - pattern: `^0x([a-fA-F\d])+$` - - type: object @@ -1817,8 +1817,8 @@ passwd string - type: `string` - tx: - - type: `object` - additionalProperties: `false` + - type: `object` - type: object @@ -1927,10 +1927,10 @@ addr common.Address ``` Schema + - description: `Hex representation of a Keccak 256 hash POINTER` - pattern: `^0x[a-fA-F\d]{64}$` - - type: string - title: `keccak` - - description: `Hex representation of a Keccak 256 hash POINTER` + - type: string ``` @@ -1970,9 +1970,9 @@ duration *uint64 ``` Schema - - title: `integer` - description: `Hex representation of the integer` - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: string diff --git a/docs/JSON-RPC-API/modules/trace.md b/docs/JSON-RPC-API/modules/trace.md index 094de77734..c4833224e5 100755 --- a/docs/JSON-RPC-API/modules/trace.md +++ b/docs/JSON-RPC-API/modules/trace.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -37,21 +37,21 @@ number rpc.BlockNumber ``` Schema - - title: `blockNumberIdentifier` - oneOf: - - type: string - - title: `blockNumberTag` - description: `The block height description` - enum: earliest, latest, pending + - title: `blockNumberTag` + - type: string - - title: `uint64` - description: `Hex representation of a uint64` - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: string + - title: `blockNumberIdentifier` ``` @@ -99,44 +99,44 @@ config *TraceConfig ``` Schema - - type: object - additionalProperties: `false` - properties: + - Debug: + - type: `boolean` + + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` + + - DisableStack: + - type: `boolean` + + - DisableStorage: + - type: `boolean` + - Limit: - - type: `string` - 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` - - DisableMemory: - - type: `boolean` - - - DisableStorage: - - type: `boolean` - - - DisableStack: - - type: `boolean` - - - Timeout: - - type: `string` - - - Debug: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - + - type: object ``` @@ -324,10 +324,20 @@ args ethapi.CallArgs - 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` - - pattern: `^0x([a-fA-F\d])+$` - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` @@ -344,16 +354,6 @@ args ethapi.CallArgs - title: `integer` - type: `string` - - data: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` - - type: `string` - - - from: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` - - type: `string` - - type: object @@ -418,19 +418,14 @@ config *TraceConfig - additionalProperties: `false` - properties: - - Timeout: - - type: `string` - - - Tracer: - - type: `string` - - Debug: - type: `boolean` - - Limit: - - title: `integer` - - type: `string` - - pattern: `^0x[a-fA-F0-9]+$` + - DisableMemory: + - type: `boolean` + + - DisableReturnData: + - type: `boolean` - DisableStack: - type: `boolean` @@ -438,19 +433,24 @@ config *TraceConfig - 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` - - overrides: - - additionalProperties: `true` + - Timeout: + - type: `string` - - DisableMemory: - - type: `boolean` + - Tracer: + - type: `string` - - DisableReturnData: - - type: `boolean` + - overrides: + - additionalProperties: `true` - type: object @@ -620,10 +620,10 @@ hash common.Hash ``` Schema - - type: string - - title: `keccak` - description: `Hex representation of a Keccak 256 hash` - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` + - type: string ``` @@ -656,9 +656,15 @@ config *TraceConfig - additionalProperties: `false` - properties: + - Debug: + - type: `boolean` + - DisableMemory: - type: `boolean` + - DisableReturnData: + - type: `boolean` + - DisableStack: - type: `boolean` @@ -675,12 +681,6 @@ config *TraceConfig - title: `integer` - type: `string` - - Debug: - - type: `boolean` - - - DisableReturnData: - - type: `boolean` - - Timeout: - type: `string` diff --git a/docs/JSON-RPC-API/modules/txpool.md b/docs/JSON-RPC-API/modules/txpool.md index 06470a6360..a67cb63aa7 100755 --- a/docs/JSON-RPC-API/modules/txpool.md +++ b/docs/JSON-RPC-API/modules/txpool.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -45,59 +45,59 @@ mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string - .*: - additionalProperties: `false` - properties: - - input: - - pattern: `^0x([a-fA-F\d])+$` - - title: `dataWord` + - blockHash: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - r: + - blockNumber: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - s: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - from: + - pattern: `^0x[a-fA-F\d]{64}$` + - title: `keccak` - type: `string` - - value: + - gas: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` + - type: `string` + + - gasPrice: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - from: + - hash: - pattern: `^0x[a-fA-F\d]{64}$` - title: `keccak` - type: `string` - - hash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - input: + - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: `string` - - blockNumber: - - pattern: `^0x[a-fA-F0-9]+$` - - title: `integer` + - nonce: + - pattern: `^0x([a-fA-F\d])+$` + - title: `uint64` - type: `string` - - v: + - r: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - - gasPrice: + - s: - pattern: `^0x[a-fA-F0-9]+$` - title: `integer` - type: `string` - to: - - title: `keccak` - - type: `string` - pattern: `^0x[a-fA-F\d]{64}$` - - - nonce: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - title: `keccak` - type: `string` - transactionIndex: @@ -105,14 +105,14 @@ mapstringmapstringmapstringRPCTransaction map[string]map[string]map[string - title: `uint64` - type: `string` - - blockHash: - - pattern: `^0x[a-fA-F\d]{64}$` - - title: `keccak` + - v: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` - - gas: - - pattern: `^0x([a-fA-F\d])+$` - - title: `uint64` + - value: + - pattern: `^0x[a-fA-F0-9]+$` + - title: `integer` - type: `string` diff --git a/docs/JSON-RPC-API/modules/web3.md b/docs/JSON-RPC-API/modules/web3.md index d3f717ded4..07bea14a7c 100755 --- a/docs/JSON-RPC-API/modules/web3.md +++ b/docs/JSON-RPC-API/modules/web3.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-22T08:53:19-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | | OpenRPC | 1.2.6 | --- @@ -88,10 +88,10 @@ input hexutil.Bytes ``` Schema - - type: string - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` + - type: string ``` @@ -127,9 +127,9 @@ input hexutil.Bytes ``` Schema - - title: `dataWord` - description: `Hex representation of some bytes` - pattern: `^0x([a-fA-F\d])+$` + - title: `dataWord` - type: string diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go index bef92c7c8f..6747896b44 100644 --- a/ethclient/docsgen_test.go +++ b/ethclient/docsgen_test.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "os" + "sort" "strings" "testing" "text/template" @@ -267,7 +268,15 @@ func printBullet(any interface{}, depth int) (out string) { switch typ := any.(type) { case map[string]interface{}: out += "\n" - for k, v := range typ { + ordered := []string{} + for k := range typ { + ordered = append(ordered, k) + } + sort.Slice(ordered, func(i, j int) bool { + return ordered[i] < ordered[j] + }) + for _, k := range ordered { + v := typ[k] out += fmt.Sprintf("%s- %s: %s", strings.Repeat("\t", depth), k, printBullet(v, depth+1)) } case []interface{}: From de739184a71d5082d777a6ea3ce2be61e621808a Mon Sep 17 00:00:00 2001 From: meows Date: Sat, 23 Jan 2021 04:51:41 -0600 Subject: [PATCH 11/12] docs/JSON-RPC-API/modules,ethclient: add generic param names to curl example Date: 2021-01-23 04:51:41-06:00 Signed-off-by: meows --- docs/JSON-RPC-API/modules/admin.md | 22 ++++---- docs/JSON-RPC-API/modules/debug.md | 76 ++++++++++++------------- docs/JSON-RPC-API/modules/eth.md | 80 +++++++++++++-------------- docs/JSON-RPC-API/modules/ethash.md | 6 +- docs/JSON-RPC-API/modules/miner.md | 12 ++-- docs/JSON-RPC-API/modules/net.md | 2 +- docs/JSON-RPC-API/modules/personal.md | 28 +++++----- docs/JSON-RPC-API/modules/trace.md | 8 +-- docs/JSON-RPC-API/modules/txpool.md | 2 +- docs/JSON-RPC-API/modules/web3.md | 4 +- ethclient/docsgen_test.go | 50 ++++++++++++++--- 11 files changed, 162 insertions(+), 128 deletions(-) diff --git a/docs/JSON-RPC-API/modules/admin.md b/docs/JSON-RPC-API/modules/admin.md index 232f7e7efd..75a9bd20e8 100755 --- a/docs/JSON-RPC-API/modules/admin.md +++ b/docs/JSON-RPC-API/modules/admin.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -53,7 +53,7 @@ url string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addPeer", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addPeer", "params": []}' ``` === "Javascript Console" @@ -126,7 +126,7 @@ url string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addTrustedPeer", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_addTrustedPeer", "params": []}' ``` === "Javascript Console" @@ -302,7 +302,7 @@ blockNr rpc.BlockNumber === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_ecbp1100", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_ecbp1100", "params": []}' ``` === "Javascript Console" @@ -435,7 +435,7 @@ last *uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_exportChain", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_exportChain", "params": [, , ]}' ``` === "Javascript Console" @@ -526,7 +526,7 @@ file string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_importChain", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_importChain", "params": []}' ``` === "Javascript Console" @@ -650,7 +650,7 @@ n int === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_maxPeers", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_maxPeers", "params": []}' ``` === "Javascript Console" @@ -1119,7 +1119,7 @@ url string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removePeer", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removePeer", "params": []}' ``` === "Javascript Console" @@ -1192,7 +1192,7 @@ url string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removeTrustedPeer", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_removeTrustedPeer", "params": []}' ``` === "Javascript Console" @@ -1326,7 +1326,7 @@ vhosts *string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startRPC", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startRPC", "params": [, , , , ]}' ``` === "Javascript Console" @@ -1481,7 +1481,7 @@ apis *string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startWS", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "admin_startWS", "params": [, , , ]}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/debug.md b/docs/JSON-RPC-API/modules/debug.md index 11a3697a08..ecf15d36ad 100755 --- a/docs/JSON-RPC-API/modules/debug.md +++ b/docs/JSON-RPC-API/modules/debug.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -280,7 +280,7 @@ incompletes bool === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_accountRange", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_accountRange", "params": [, , , , , ]}' ``` === "Javascript Console" @@ -371,7 +371,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_backtraceAt", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_backtraceAt", "params": []}' ``` === "Javascript Console" @@ -463,7 +463,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_blockProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_blockProfile", "params": [, ]}' ``` === "Javascript Console" @@ -584,7 +584,7 @@ property string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_chaindbProperty", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_chaindbProperty", "params": []}' ``` === "Javascript Console" @@ -679,7 +679,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_cpuProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_cpuProfile", "params": [, ]}' ``` === "Javascript Console" @@ -924,7 +924,7 @@ blockNr rpc.BlockNumber === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_dumpBlock", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_dumpBlock", "params": []}' ``` === "Javascript Console" @@ -1590,7 +1590,7 @@ number uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getBlockRlp", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getBlockRlp", "params": []}' ``` === "Javascript Console" @@ -1760,7 +1760,7 @@ commonAddress []common.Address === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByHash", "params": [, ]}' ``` === "Javascript Console" @@ -1943,7 +1943,7 @@ commonAddress []common.Address === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_getModifiedAccountsByNumber", "params": [, ]}' ``` === "Javascript Console" @@ -2054,7 +2054,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_goTrace", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_goTrace", "params": [, ]}' ``` === "Javascript Console" @@ -2604,7 +2604,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_mutexProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_mutexProfile", "params": [, ]}' ``` === "Javascript Console" @@ -2722,7 +2722,7 @@ hash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_preimage", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_preimage", "params": []}' ``` === "Javascript Console" @@ -2813,7 +2813,7 @@ number uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_printBlock", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_printBlock", "params": []}' ``` === "Javascript Console" @@ -2927,7 +2927,7 @@ hash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_removePendingTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_removePendingTransaction", "params": []}' ``` === "Javascript Console" @@ -3016,7 +3016,7 @@ number uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_seedHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_seedHash", "params": []}' ``` === "Javascript Console" @@ -3104,7 +3104,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setBlockProfileRate", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setBlockProfileRate", "params": []}' ``` === "Javascript Console" @@ -3219,7 +3219,7 @@ v int === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setGCPercent", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setGCPercent", "params": []}' ``` === "Javascript Console" @@ -3300,7 +3300,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setHead", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setHead", "params": []}' ``` === "Javascript Console" @@ -3380,7 +3380,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setMutexProfileFraction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_setMutexProfileFraction", "params": []}' ``` === "Javascript Console" @@ -3654,7 +3654,7 @@ string []string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBadBlockToFile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBadBlockToFile", "params": [, ]}' ``` === "Javascript Console" @@ -3882,7 +3882,7 @@ string []string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBlockToFile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_standardTraceBlockToFile", "params": [, ]}' ``` === "Javascript Console" @@ -3943,7 +3943,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startCPUProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startCPUProfile", "params": []}' ``` === "Javascript Console" @@ -4014,7 +4014,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startGoTrace", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_startGoTrace", "params": []}' ``` === "Javascript Console" @@ -4439,7 +4439,7 @@ maxResult int === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_storageRangeAt", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_storageRangeAt", "params": [, , , , ]}' ``` === "Javascript Console" @@ -4602,7 +4602,7 @@ number uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_testSignCliqueBlock", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_testSignCliqueBlock", "params": [
, ]}' ``` === "Javascript Console" @@ -4870,7 +4870,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBadBlock", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBadBlock", "params": [, ]}' ``` === "Javascript Console" @@ -5117,7 +5117,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlock", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlock", "params": [, ]}' ``` === "Javascript Console" @@ -5357,7 +5357,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByHash", "params": [, ]}' ``` === "Javascript Console" @@ -5629,7 +5629,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockByNumber", "params": [, ]}' ``` === "Javascript Console" @@ -5844,7 +5844,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockFromFile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceBlockFromFile", "params": [, ]}' ``` === "Javascript Console" @@ -6109,7 +6109,7 @@ interface interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceCall", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceCall", "params": [, , ]}' ``` === "Javascript Console" @@ -6324,7 +6324,7 @@ interface interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_traceTransaction", "params": [, ]}' ``` === "Javascript Console" @@ -6406,7 +6406,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_verbosity", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_verbosity", "params": []}' ``` === "Javascript Console" @@ -6463,7 +6463,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_vmodule", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_vmodule", "params": []}' ``` === "Javascript Console" @@ -6519,7 +6519,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeBlockProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeBlockProfile", "params": []}' ``` === "Javascript Console" @@ -6576,7 +6576,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMemProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMemProfile", "params": []}' ``` === "Javascript Console" @@ -6633,7 +6633,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMutexProfile", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "debug_writeMutexProfile", "params": []}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/eth.md b/docs/JSON-RPC-API/modules/eth.md index 66fd0629b1..7ecf4b8928 100755 --- a/docs/JSON-RPC-API/modules/eth.md +++ b/docs/JSON-RPC-API/modules/eth.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -460,7 +460,7 @@ overrides *map[common.Address]account === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_call", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_call", "params": [, , ]}' ``` === "Javascript Console" @@ -894,7 +894,7 @@ blockNrOrHash *rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_estimateGas", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_estimateGas", "params": [, ]}' ``` === "Javascript Console" @@ -1188,7 +1188,7 @@ args SendTxArgs === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_fillTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_fillTransaction", "params": []}' ``` === "Javascript Console" @@ -1399,7 +1399,7 @@ blockNrOrHash rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBalance", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBalance", "params": [
, ]}' ``` === "Javascript Console" @@ -1756,7 +1756,7 @@ fullTx bool === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByHash", "params": [, ]}' ``` === "Javascript Console" @@ -2143,7 +2143,7 @@ fullTx bool === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockByNumber", "params": [, ]}' ``` === "Javascript Console" @@ -2268,7 +2268,7 @@ blockHash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByHash", "params": []}' ``` === "Javascript Console" @@ -2413,7 +2413,7 @@ blockNr rpc.BlockNumber === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getBlockTransactionCountByNumber", "params": []}' ``` === "Javascript Console" @@ -2539,7 +2539,7 @@ blockNrOrHash rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getCode", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getCode", "params": [
, ]}' ``` === "Javascript Console" @@ -2612,7 +2612,7 @@ interface interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterChanges", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterChanges", "params": []}' ``` === "Javascript Console" @@ -2832,7 +2832,7 @@ typesLog []*types.Log === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterLogs", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getFilterLogs", "params": []}' ``` === "Javascript Console" @@ -3241,7 +3241,7 @@ hash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByHash", "params": []}' ``` === "Javascript Console" @@ -3580,7 +3580,7 @@ number rpc.BlockNumber === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getHeaderByNumber", "params": []}' ``` === "Javascript Console" @@ -3882,7 +3882,7 @@ typesLog []*types.Log === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getLogs", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getLogs", "params": []}' ``` === "Javascript Console" @@ -4172,7 +4172,7 @@ blockNrOrHash rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getProof", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getProof", "params": [
, , ]}' ``` === "Javascript Console" @@ -4347,7 +4347,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -4525,7 +4525,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockNumberAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByBlockNumberAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -4641,7 +4641,7 @@ hash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getRawTransactionByHash", "params": []}' ``` === "Javascript Console" @@ -4783,7 +4783,7 @@ blockNrOrHash rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getStorageAt", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getStorageAt", "params": [
, , ]}' ``` === "Javascript Console" @@ -5077,7 +5077,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockHashAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockHashAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -5395,7 +5395,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockNumberAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByBlockNumberAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -5651,7 +5651,7 @@ hash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionByHash", "params": []}' ``` === "Javascript Console" @@ -5783,7 +5783,7 @@ blockNrOrHash rpc.BlockNumberOrHash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionCount", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionCount", "params": [
, ]}' ``` === "Javascript Console" @@ -5911,7 +5911,7 @@ mapstringinterface map[string]interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionReceipt", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getTransactionReceipt", "params": []}' ``` === "Javascript Console" @@ -6316,7 +6316,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockHashAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockHashAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -6731,7 +6731,7 @@ index hexutil.Uint === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockNumberAndIndex", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleByBlockNumberAndIndex", "params": [, ]}' ``` === "Javascript Console" @@ -6855,7 +6855,7 @@ blockHash common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockHash", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockHash", "params": []}' ``` === "Javascript Console" @@ -7000,7 +7000,7 @@ blockNr rpc.BlockNumber === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockNumber", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_getUncleCountByBlockNumber", "params": []}' ``` === "Javascript Console" @@ -7502,7 +7502,7 @@ crit FilterCriteria === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newFilter", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_newFilter", "params": []}' ``` === "Javascript Console" @@ -8295,7 +8295,7 @@ gasLimit *hexutil.Uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_resend", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_resend", "params": [, , ]}' ``` === "Javascript Console" @@ -8456,7 +8456,7 @@ encodedTx hexutil.Bytes === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendRawTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendRawTransaction", "params": []}' ``` === "Javascript Console" @@ -8655,7 +8655,7 @@ args SendTxArgs === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sendTransaction", "params": []}' ``` === "Javascript Console" @@ -8828,7 +8828,7 @@ data hexutil.Bytes === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sign", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_sign", "params": [, ]}' ``` === "Javascript Console" @@ -9058,7 +9058,7 @@ args SendTxArgs === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_signTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_signTransaction", "params": []}' ``` === "Javascript Console" @@ -9210,7 +9210,7 @@ id common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitHashRate", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitHashRate", "params": [, ]}' ``` === "Javascript Console" @@ -9383,7 +9383,7 @@ digest common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitWork", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_submitWork", "params": [, , ]}' ``` === "Javascript Console" @@ -9467,7 +9467,7 @@ subscriptionID rpc.ID === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_subscribe", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_subscribe", "params": [, ]}' ``` === "Javascript Console" @@ -9600,7 +9600,7 @@ id rpc.ID === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_uninstallFilter", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_uninstallFilter", "params": []}' ``` === "Javascript Console" @@ -9666,7 +9666,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_unsubscribe", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "eth_unsubscribe", "params": []}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/ethash.md b/docs/JSON-RPC-API/modules/ethash.md index ae5a52e2e9..4bd3371876 100755 --- a/docs/JSON-RPC-API/modules/ethash.md +++ b/docs/JSON-RPC-API/modules/ethash.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -308,7 +308,7 @@ id common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitHashRate", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitHashRate", "params": [, ]}' ``` === "Javascript Console" @@ -481,7 +481,7 @@ digest common.Hash === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitWork", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "ethash_submitWork", "params": [, , ]}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/miner.md b/docs/JSON-RPC-API/modules/miner.md index fd91ba73ab..dfcc3537a9 100755 --- a/docs/JSON-RPC-API/modules/miner.md +++ b/docs/JSON-RPC-API/modules/miner.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -154,7 +154,7 @@ etherbase common.Address === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setEtherbase", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setEtherbase", "params": []}' ``` === "Javascript Console" @@ -218,7 +218,7 @@ extra string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setExtra", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setExtra", "params": []}' ``` === "Javascript Console" @@ -309,7 +309,7 @@ gasPrice hexutil.Big === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setGasPrice", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setGasPrice", "params": []}' ``` === "Javascript Console" @@ -393,7 +393,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setRecommitInterval", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_setRecommitInterval", "params": []}' ``` === "Javascript Console" @@ -477,7 +477,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_start", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "miner_start", "params": []}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/net.md b/docs/JSON-RPC-API/modules/net.md index e51704bcb5..f9c0501601 100755 --- a/docs/JSON-RPC-API/modules/net.md +++ b/docs/JSON-RPC-API/modules/net.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- diff --git a/docs/JSON-RPC-API/modules/personal.md b/docs/JSON-RPC-API/modules/personal.md index 8f42f9a7e5..dd2dc538a3 100755 --- a/docs/JSON-RPC-API/modules/personal.md +++ b/docs/JSON-RPC-API/modules/personal.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -130,7 +130,7 @@ pin *bool === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_deriveAccount", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_deriveAccount", "params": [, , ]}' ``` === "Javascript Console" @@ -298,7 +298,7 @@ sig hexutil.Bytes === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_ecRecover", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_ecRecover", "params": [, ]}' ``` === "Javascript Console" @@ -416,7 +416,7 @@ password string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_importRawKey", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_importRawKey", "params": [, ]}' ``` === "Javascript Console" @@ -489,7 +489,7 @@ url string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_initializeWallet", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_initializeWallet", "params": []}' ``` === "Javascript Console" @@ -850,7 +850,7 @@ addr common.Address === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_lockAccount", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_lockAccount", "params": []}' ``` === "Javascript Console" @@ -941,7 +941,7 @@ password string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_newAccount", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_newAccount", "params": []}' ``` === "Javascript Console" @@ -1019,7 +1019,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_openWallet", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_openWallet", "params": [, ]}' ``` === "Javascript Console" @@ -1234,7 +1234,7 @@ passwd string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sendTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sendTransaction", "params": [, ]}' ``` === "Javascript Console" @@ -1409,7 +1409,7 @@ passwd string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sign", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_sign", "params": [, , ]}' ``` === "Javascript Console" @@ -1631,7 +1631,7 @@ passwd string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signAndSendTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signAndSendTransaction", "params": [, ]}' ``` === "Javascript Console" @@ -1855,7 +1855,7 @@ passwd string === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signTransaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_signTransaction", "params": [, ]}' ``` === "Javascript Console" @@ -2012,7 +2012,7 @@ duration *uint64 === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unlockAccount", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unlockAccount", "params": [, , ]}' ``` === "Javascript Console" @@ -2098,7 +2098,7 @@ _None_ === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unpair", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "personal_unpair", "params": [, ]}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/trace.md b/docs/JSON-RPC-API/modules/trace.md index c4833224e5..c182c1c806 100755 --- a/docs/JSON-RPC-API/modules/trace.md +++ b/docs/JSON-RPC-API/modules/trace.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -237,7 +237,7 @@ interface []interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_block", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_block", "params": [, ]}' ``` === "Javascript Console" @@ -574,7 +574,7 @@ txTraceResult []*txTraceResult === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_filter", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_filter", "params": [, ]}' ``` === "Javascript Console" @@ -763,7 +763,7 @@ interface interface{} === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_transaction", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "trace_transaction", "params": [, ]}' ``` === "Javascript Console" diff --git a/docs/JSON-RPC-API/modules/txpool.md b/docs/JSON-RPC-API/modules/txpool.md index a67cb63aa7..8cd8063507 100755 --- a/docs/JSON-RPC-API/modules/txpool.md +++ b/docs/JSON-RPC-API/modules/txpool.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- diff --git a/docs/JSON-RPC-API/modules/web3.md b/docs/JSON-RPC-API/modules/web3.md index 07bea14a7c..8492cdef78 100755 --- a/docs/JSON-RPC-API/modules/web3.md +++ b/docs/JSON-RPC-API/modules/web3.md @@ -7,7 +7,7 @@ | Entity | Version | | --- | --- | -| Source | 1.11.22-unstable/generated-at:2021-01-23T04:35:53-06:00 | +| Source | 1.11.22-unstable/generated-at:2021-01-23T04:50:40-06:00 | | OpenRPC | 1.2.6 | --- @@ -155,7 +155,7 @@ input hexutil.Bytes === "Shell" ``` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "web3_sha3", "params": []}' + curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "web3_sha3", "params": []}' ``` === "Javascript Console" diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go index 6747896b44..05d971d37c 100644 --- a/ethclient/docsgen_test.go +++ b/ethclient/docsgen_test.go @@ -60,6 +60,31 @@ func TestRPCDiscover_BuildStatic(t *testing.T) { tpl := template.New("openrpc_doc") + trimNameSpecialChars := func(s string) string { + remove := []string{".", "*"} + for _, r := range remove { + s = strings.ReplaceAll(s, r, "") + } + return s + } + + contentDescriptorGenericName := func(cd *meta_schema.ContentDescriptorObject) (name string) { + defer func() { + name = fmt.Sprintf("<%s>", name) // make it generic-looking + }() + if cd.Description == nil { + return string(*cd.Name) + } + if cd.Name == nil { + return string(*cd.Description) + } + tr := trimNameSpecialChars(string(*cd.Description)) + if string(*cd.Name) == tr { + return string(*cd.Description) + } + return string(*cd.Name) + } + tpl.Funcs(template.FuncMap{ // tomap gives a plain map from a JSON representation of a given value. // This is useful because the meta_schema data types, being generated, and conforming to a pretty @@ -82,13 +107,9 @@ func TestRPCDiscover_BuildStatic(t *testing.T) { // method will also remove, eg '*hexutil.Uint64' -> 'hexutilUint64'. // These "special" characters were removed because of concerns about by-name arguments // and the use of titles for keys. - "trimNameSpecialChars": func(s string) string { - remove := []string{".", "*"} - for _, r := range remove { - s = strings.ReplaceAll(s, r, "") - } - return s - }, + "trimNameSpecialChars": trimNameSpecialChars, + // contentDescriptorTitle returns the name or description, in that order. + "contentDescriptorGenericName": contentDescriptorGenericName, // methodFormatJSConsole is a pretty-printer that returns the JS console use example for a method. "methodFormatJSConsole": func(m *meta_schema.MethodObject) string { name := string(*m.Name) @@ -113,6 +134,19 @@ func TestRPCDiscover_BuildStatic(t *testing.T) { }() return fmt.Sprintf("%s(%s);", formattedName, strings.Join(paramNames, ",")) }, + // methodFormatCURL is a pretty printer that returns the 'curl' method invocation example string. + "methodFormatCURL": func(m *meta_schema.MethodObject) string { + paramNames := "" + if m.Params != nil { + out := []string{} + for _, p := range *m.Params { + out = append(out, contentDescriptorGenericName(p.ContentDescriptorObject)) + } + paramNames = strings.Join(out, ", ") + } + + return fmt.Sprintf(`curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "%s", "params": [%s]}'`, *m.Name, paramNames) + }, }) tpl, err = tpl.Parse(` @@ -186,7 +220,7 @@ _None_ === "Shell" ` + "```" + ` shell - curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "{{ .Name }}", "params": []}' + {{ methodFormatCURL . }} ` + "```" + ` === "Javascript Console" From 744cc6fd1614ea06d798d95f0cbeebf596e1da59 Mon Sep 17 00:00:00 2001 From: meows Date: Sat, 23 Jan 2021 05:00:37 -0600 Subject: [PATCH 12/12] ethclient: (lint) goimports Date: 2021-01-23 05:00:37-06:00 Signed-off-by: meows --- ethclient/docsgen_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ethclient/docsgen_test.go b/ethclient/docsgen_test.go index 05d971d37c..cd13feed1f 100644 --- a/ethclient/docsgen_test.go +++ b/ethclient/docsgen_test.go @@ -138,11 +138,11 @@ func TestRPCDiscover_BuildStatic(t *testing.T) { "methodFormatCURL": func(m *meta_schema.MethodObject) string { paramNames := "" if m.Params != nil { - out := []string{} - for _, p := range *m.Params { - out = append(out, contentDescriptorGenericName(p.ContentDescriptorObject)) - } - paramNames = strings.Join(out, ", ") + out := []string{} + for _, p := range *m.Params { + out = append(out, contentDescriptorGenericName(p.ContentDescriptorObject)) + } + paramNames = strings.Join(out, ", ") } return fmt.Sprintf(`curl -X POST http://localhost:8545 --data '{"jsonrpc": "2.0", id": 42, "method": "%s", "params": [%s]}'`, *m.Name, paramNames)