add TOC to RPC namespace pages

This commit is contained in:
Felix Lange 2019-11-01 12:45:33 +01:00
parent 0c30279a1e
commit 09f5831c33
5 changed files with 80 additions and 64 deletions

View file

@ -6,6 +6,9 @@ The `admin` API gives you access to several non-standard RPC methods, which will
a fine grained control over your Geth instance, including but not limited to network peer and RPC a fine grained control over your Geth instance, including but not limited to network peer and RPC
endpoint management. endpoint management.
* TOC
{:toc}
### admin_addPeer ### admin_addPeer
The `addPeer` administrative method requests adding a new remote node to the list of tracked static The `addPeer` administrative method requests adding a new remote node to the list of tracked static
@ -17,7 +20,7 @@ URL of the remote peer to start tracking and returns a `BOOL` indicating whether
for tracking or some error occurred. for tracking or some error occurred.
| Client | Method invocation | | Client | Method invocation |
|:-------:|------------------------------------------------| |:--------|------------------------------------------------|
| Go | `admin.AddPeer(url string) (bool, error)` | | Go | `admin.AddPeer(url string) (bool, error)` |
| Console | `admin.addPeer(url)` | | Console | `admin.addPeer(url)` |
| RPC | `{"method": "admin_addPeer", "params": [url]}` | | RPC | `{"method": "admin_addPeer", "params": [url]}` |
@ -35,7 +38,7 @@ The `datadir` administrative property can be queried for the absolute path the r
currently uses to store all its databases. currently uses to store all its databases.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------| |:--------|-----------------------------------|
| Go | `admin.Datadir() (string, error`) | | Go | `admin.Datadir() (string, error`) |
| Console | `admin.datadir` | | Console | `admin.datadir` |
| RPC | `{"method": "admin_datadir"}` | | RPC | `{"method": "admin_datadir"}` |
@ -56,7 +59,7 @@ overlay protocol, as well as specialized information added by each of the runnin
(e.g. `eth`, `les`, `shh`, `bzz`). (e.g. `eth`, `les`, `shh`, `bzz`).
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------| |:--------|-------------------------------------------|
| Go | `admin.NodeInfo() (*p2p.NodeInfo, error`) | | Go | `admin.NodeInfo() (*p2p.NodeInfo, error`) |
| Console | `admin.nodeInfo` | | Console | `admin.nodeInfo` |
| RPC | `{"method": "admin_nodeInfo"}` | | RPC | `{"method": "admin_nodeInfo"}` |
@ -95,7 +98,7 @@ P2P overlay protocol, as well as specialized information added by each of the ru
protocols (e.g. `eth`, `les`, `shh`, `bzz`). protocols (e.g. `eth`, `les`, `shh`, `bzz`).
| Client | Method invocation | | Client | Method invocation |
|:-------:|------------------------------------------| |:--------|------------------------------------------|
| Go | `admin.Peers() ([]*p2p.PeerInfo, error`) | | Go | `admin.Peers() ([]*p2p.PeerInfo, error`) |
| Console | `admin.peers` | | Console | `admin.peers` |
| RPC | `{"method": "admin_peers"}` | | RPC | `{"method": "admin_peers"}` |
@ -148,7 +151,7 @@ would depend on the current to the user unknown working directory of Get
version string reported by `solc --version`. version string reported by `solc --version`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------| |:--------|-------------------------------------------------|
| Go | `admin.SetSolc(path string) (string, error`) | | Go | `admin.SetSolc(path string) (string, error`) |
| Console | `admin.setSolc(path)` | | Console | `admin.setSolc(path)` |
| RPC | `{"method": "admin_setSolc", "params": [path]}` | | RPC | `{"method": "admin_setSolc", "params": [path]}` |
@ -173,7 +176,7 @@ API webserver to handle client requests. All the parameters are optional:
The method returns a boolean flag specifying whether the HTTP RPC listener was opened or not. Please note, only one HTTP endpoint is allowed to be active at any time. The method returns a boolean flag specifying whether the HTTP RPC listener was opened or not. Please note, only one HTTP endpoint is allowed to be active at any time.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------------------------------------------------------------------| |:--------|-----------------------------------------------------------------------------------------------|
| Go | `admin.StartRPC(host *string, port *rpc.HexNumber, cors *string, apis *string) (bool, error)` | | Go | `admin.StartRPC(host *string, port *rpc.HexNumber, cors *string, apis *string) (bool, error)` |
| Console | `admin.startRPC(host, port, cors, apis)` | | Console | `admin.startRPC(host, port, cors, apis)` |
| RPC | `{"method": "admin_startRPC", "params": [host, port, cors, apis]}` | | RPC | `{"method": "admin_startRPC", "params": [host, port, cors, apis]}` |
@ -198,7 +201,7 @@ API webserver to handle client requests. All the parameters are optional:
The method returns a boolean flag specifying whether the WebSocket RPC listener was opened or not. Please note, only one WebSocket endpoint is allowed to be active at any time. The method returns a boolean flag specifying whether the WebSocket RPC listener was opened or not. Please note, only one WebSocket endpoint is allowed to be active at any time.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------------------------------------------------------------------| |:--------|-----------------------------------------------------------------------------------------------|
| Go | `admin.StartWS(host *string, port *rpc.HexNumber, cors *string, apis *string) (bool, error)` | | Go | `admin.StartWS(host *string, port *rpc.HexNumber, cors *string, apis *string) (bool, error)` |
| Console | `admin.startWS(host, port, cors, apis)` | | Console | `admin.startWS(host, port, cors, apis)` |
| RPC | `{"method": "admin_startWS", "params": [host, port, cors, apis]}` | | RPC | `{"method": "admin_startWS", "params": [host, port, cors, apis]}` |
@ -215,7 +218,7 @@ true
The `stopRPC` administrative method closes the currently open HTTP RPC endpoint. As the node can only have a single HTTP endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not. The `stopRPC` administrative method closes the currently open HTTP RPC endpoint. As the node can only have a single HTTP endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------| |:--------|---------------------------------|
| Go | `admin.StopRPC() (bool, error`) | | Go | `admin.StopRPC() (bool, error`) |
| Console | `admin.stopRPC()` | | Console | `admin.stopRPC()` |
| RPC | `{"method": "admin_stopRPC"` | | RPC | `{"method": "admin_stopRPC"` |
@ -232,7 +235,7 @@ true
The `stopWS` administrative method closes the currently open WebSocket RPC endpoint. As the node can only have a single WebSocket endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not. The `stopWS` administrative method closes the currently open WebSocket RPC endpoint. As the node can only have a single WebSocket endpoint running, this method takes no parameters, returning a boolean whether the endpoint was closed or not.
| Client | Method invocation | | Client | Method invocation |
|:-------:|--------------------------------| |:--------|--------------------------------|
| Go | `admin.StopWS() (bool, error`) | | Go | `admin.StopWS() (bool, error`) |
| Console | `admin.stopWS()` | | Console | `admin.stopWS()` |
| RPC | `{"method": "admin_stopWS"` | | RPC | `{"method": "admin_stopWS"` |

View file

@ -5,6 +5,9 @@ title: debug Namespace
The `debug` API gives you access to several non-standard RPC methods, which will allow you The `debug` API gives you access to several non-standard RPC methods, which will allow you
to inspect, debug and set certain debugging flags during runtime. to inspect, debug and set certain debugging flags during runtime.
* TOC
{:toc}
### debug_backtraceAt ### debug_backtraceAt
Sets the logging backtrace location. When a backtrace location Sets the logging backtrace location. When a backtrace location
@ -14,7 +17,7 @@ of the goroutine executing the log statement will be printed to stderr.
The location is specified as `<filename>:<line>`. The location is specified as `<filename>:<line>`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------| |:--------|-------------------------------------------------------|
| Console | `debug.backtraceAt(string)` | | Console | `debug.backtraceAt(string)` |
| RPC | `{"method": "debug_backtraceAt", "params": [string]}` | | RPC | `{"method": "debug_backtraceAt", "params": [string]}` |
@ -33,7 +36,7 @@ the rate and write the profile manually using
`debug_writeBlockProfile`. `debug_writeBlockProfile`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------------------| |:--------|----------------------------------------------------------------|
| Console | `debug.blockProfile(file, seconds)` | | Console | `debug.blockProfile(file, seconds)` |
| RPC | `{"method": "debug_blockProfile", "params": [string, number]}` | | RPC | `{"method": "debug_blockProfile", "params": [string, number]}` |
@ -43,7 +46,7 @@ Turns on CPU profiling for the given duration and writes
profile data to disk. profile data to disk.
| Client | Method invocation | | Client | Method invocation |
|:-------:|--------------------------------------------------------------| |:--------|--------------------------------------------------------------|
| Console | `debug.cpuProfile(file, seconds)` | | Console | `debug.cpuProfile(file, seconds)` |
| RPC | `{"method": "debug_cpuProfile", "params": [string, number]}` | | RPC | `{"method": "debug_cpuProfile", "params": [string, number]}` |
@ -53,7 +56,7 @@ Retrieves the state that corresponds to the block number and returns a list of a
storage and code). storage and code).
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------| |:--------|-------------------------------------------------------|
| Go | `debug.DumpBlock(number uint64) (state.World, error)` | | Go | `debug.DumpBlock(number uint64) (state.World, error)` |
| Console | `debug.traceBlockByHash(number, [options])` | | Console | `debug.traceBlockByHash(number, [options])` |
| RPC | `{"method": "debug_dumpBlock", "params": [number]}` | | RPC | `{"method": "debug_dumpBlock", "params": [number]}` |
@ -92,7 +95,7 @@ See https://golang.org/pkg/runtime/debug/#GCStats for information about
the fields of the returned object. the fields of the returned object.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.gcStats()` | | Console | `debug.gcStats()` |
| RPC | `{"method": "debug_gcStats", "params": []}` | | RPC | `{"method": "debug_gcStats", "params": []}` |
@ -101,7 +104,7 @@ the fields of the returned object.
Retrieves and returns the RLP encoded block by number. Retrieves and returns the RLP encoded block by number.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------| |:--------|-------------------------------------------------------|
| Go | `debug.GetBlockRlp(number uint64) (string, error)` | | Go | `debug.GetBlockRlp(number uint64) (string, error)` |
| Console | `debug.getBlockRlp(number, [options])` | | Console | `debug.getBlockRlp(number, [options])` |
| RPC | `{"method": "debug_getBlockRlp", "params": [number]}` | | RPC | `{"method": "debug_getBlockRlp", "params": [number]}` |
@ -114,7 +117,7 @@ Turns on Go runtime tracing for the given duration and writes
trace data to disk. trace data to disk.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------------------------------| |:--------|-----------------------------------------------------------|
| Console | `debug.goTrace(file, seconds)` | | Console | `debug.goTrace(file, seconds)` |
| RPC | `{"method": "debug_goTrace", "params": [string, number]}` | | RPC | `{"method": "debug_goTrace", "params": [string, number]}` |
@ -126,7 +129,7 @@ See https://golang.org/pkg/runtime/#MemStats for information about
the fields of the returned object. the fields of the returned object.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.memStats()` | | Console | `debug.memStats()` |
| RPC | `{"method": "debug_memStats", "params": []}` | | RPC | `{"method": "debug_memStats", "params": []}` |
@ -135,7 +138,7 @@ the fields of the returned object.
Fetches and retrieves the seed hash of the block by number Fetches and retrieves the seed hash of the block by number
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------| |:--------|----------------------------------------------------|
| Go | `debug.SeedHash(number uint64) (string, error)` | | Go | `debug.SeedHash(number uint64) (string, error)` |
| Console | `debug.seedHash(number, [options])` | | Console | `debug.seedHash(number, [options])` |
| RPC | `{"method": "debug_seedHash", "params": [number]}` | | RPC | `{"method": "debug_seedHash", "params": [number]}` |
@ -146,7 +149,7 @@ Sets the current head of the local chain by block number. **Note**, this is a
destructive action and may severely damage your chain. Use with *extreme* caution. destructive action and may severely damage your chain. Use with *extreme* caution.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Go | `debug.SetHead(number uint64)` | | Go | `debug.SetHead(number uint64)` |
| Console | `debug.setHead(number)` | | Console | `debug.setHead(number)` |
| RPC | `{"method": "debug_setHead", "params": [number]}` | | RPC | `{"method": "debug_setHead", "params": [number]}` |
@ -162,7 +165,7 @@ setting it to zero stops the profile. Collected profile data
can be written using `debug_writeBlockProfile`. can be written using `debug_writeBlockProfile`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------------------| |:--------|---------------------------------------------------------------|
| Console | `debug.setBlockProfileRate(rate)` | | Console | `debug.setBlockProfileRate(rate)` |
| RPC | `{"method": "debug_setBlockProfileRate", "params": [number]}` | | RPC | `{"method": "debug_setBlockProfileRate", "params": [number]}` |
@ -173,7 +176,7 @@ Note that the web3 wrapper for this method takes care of the printing
and does not return the string. and does not return the string.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.stacks()` | | Console | `debug.stacks()` |
| RPC | `{"method": "debug_stacks", "params": []}` | | RPC | `{"method": "debug_stacks", "params": []}` |
@ -182,7 +185,7 @@ and does not return the string.
Turns on CPU profiling indefinitely, writing to the given file. Turns on CPU profiling indefinitely, writing to the given file.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------------------------------| |:--------|-----------------------------------------------------------|
| Console | `debug.startCPUProfile(file)` | | Console | `debug.startCPUProfile(file)` |
| RPC | `{"method": "debug_startCPUProfile", "params": [string]}` | | RPC | `{"method": "debug_startCPUProfile", "params": [string]}` |
@ -191,7 +194,7 @@ Turns on CPU profiling indefinitely, writing to the given file.
Starts writing a Go runtime trace to the given file. Starts writing a Go runtime trace to the given file.
| Client | Method invocation | | Client | Method invocation |
|:-------:|--------------------------------------------------------| |:--------|--------------------------------------------------------|
| Console | `debug.startGoTrace(file)` | | Console | `debug.startGoTrace(file)` |
| RPC | `{"method": "debug_startGoTrace", "params": [string]}` | | RPC | `{"method": "debug_startGoTrace", "params": [string]}` |
@ -200,7 +203,7 @@ Starts writing a Go runtime trace to the given file.
Stops an ongoing CPU profile. Stops an ongoing CPU profile.
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------| |:--------|----------------------------------------------------|
| Console | `debug.stopCPUProfile()` | | Console | `debug.stopCPUProfile()` |
| RPC | `{"method": "debug_stopCPUProfile", "params": []}` | | RPC | `{"method": "debug_stopCPUProfile", "params": []}` |
@ -209,7 +212,7 @@ Stops an ongoing CPU profile.
Stops writing the Go runtime trace. Stops writing the Go runtime trace.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.startGoTrace(file)` | | Console | `debug.startGoTrace(file)` |
| RPC | `{"method": "debug_stopGoTrace", "params": []}` | | RPC | `{"method": "debug_stopGoTrace", "params": []}` |
@ -220,7 +223,7 @@ that were included included in this block. **Note**, the parent of this block mu
it will fail. it will fail.
| Client | Method invocation | | Client | Method invocation |
|:-------:|--------------------------------------------------------------------------| |:--------|--------------------------------------------------------------------------|
| Go | `debug.TraceBlock(blockRlp []byte, config. *vm.Config) BlockTraceResult` | | Go | `debug.TraceBlock(blockRlp []byte, config. *vm.Config) BlockTraceResult` |
| Console | `debug.traceBlock(tblockRlp, [options])` | | Console | `debug.traceBlock(tblockRlp, [options])` |
| RPC | `{"method": "debug_traceBlock", "params": [blockRlp, {}]}` | | RPC | `{"method": "debug_traceBlock", "params": [blockRlp, {}]}` |
@ -270,7 +273,7 @@ Similar to [debug_traceBlock](#debug_traceblock), `traceBlockByNumber` accepts a
block that is already present in the database. block that is already present in the database.
| Client | Method invocation | | Client | Method invocation |
|:-------:|--------------------------------------------------------------------------------| |:--------|--------------------------------------------------------------------------------|
| Go | `debug.TraceBlockByNumber(number uint64, config. *vm.Config) BlockTraceResult` | | Go | `debug.TraceBlockByNumber(number uint64, config. *vm.Config) BlockTraceResult` |
| Console | `debug.traceBlockByNumber(number, [options])` | | Console | `debug.traceBlockByNumber(number, [options])` |
| RPC | `{"method": "debug_traceBlockByNumber", "params": [number, {}]}` | | RPC | `{"method": "debug_traceBlockByNumber", "params": [number, {}]}` |
@ -284,7 +287,7 @@ Similar to [debug_traceBlock](#debug_traceblock), `traceBlockByHash` accepts a b
block that is already present in the database. block that is already present in the database.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------------------------------------| |:--------|---------------------------------------------------------------------------------|
| Go | `debug.TraceBlockByHash(hash common.Hash, config. *vm.Config) BlockTraceResult` | | Go | `debug.TraceBlockByHash(hash common.Hash, config. *vm.Config) BlockTraceResult` |
| Console | `debug.traceBlockByHash(hash, [options])` | | Console | `debug.traceBlockByHash(hash, [options])` |
| RPC | `{"method": "debug_traceBlockByHash", "params": [hash {}]}` | | RPC | `{"method": "debug_traceBlockByHash", "params": [hash {}]}` |
@ -297,7 +300,7 @@ References:
Similar to [debug_traceBlock](#debug_traceblock), `traceBlockFromFile` accepts a file containing the RLP of the block. Similar to [debug_traceBlock](#debug_traceblock), `traceBlockFromFile` accepts a file containing the RLP of the block.
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------------------------------------| |:--------|----------------------------------------------------------------------------------|
| Go | `debug.TraceBlockFromFile(fileName string, config. *vm.Config) BlockTraceResult` | | Go | `debug.TraceBlockFromFile(fileName string, config. *vm.Config) BlockTraceResult` |
| Console | `debug.traceBlockFromFile(fileName, [options])` | | Console | `debug.traceBlockFromFile(fileName, [options])` |
| RPC | `{"method": "debug_traceBlockFromFile", "params": [fileName, {}]}` | | RPC | `{"method": "debug_traceBlockFromFile", "params": [fileName, {}]}` |
@ -377,7 +380,7 @@ specifies the options for this specific call. The possible options are:
* `timeout`: `STRING`. Overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Valid values are described [here](https://golang.org/pkg/time/#ParseDuration). * `timeout`: `STRING`. Overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Valid values are described [here](https://golang.org/pkg/time/#ParseDuration).
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------------------------------------------------| |:--------|----------------------------------------------------------------------------------------------|
| Go | `debug.TraceTransaction(txHash common.Hash, logger *vm.LogConfig) (*ExecutionResurt, error)` | | Go | `debug.TraceTransaction(txHash common.Hash, logger *vm.LogConfig) (*ExecutionResurt, error)` |
| Console | `debug.traceTransaction(txHash, [options])` | | Console | `debug.traceTransaction(txHash, [options])` |
| RPC | `{"method": "debug_traceTransaction", "params": [txHash, {}]}` | | RPC | `{"method": "debug_traceTransaction", "params": [txHash, {}]}` |
@ -493,7 +496,7 @@ The verbosity of individual packages and source files
can be raised using `debug_vmodule`. can be raised using `debug_vmodule`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.verbosity(level)` | | Console | `debug.verbosity(level)` |
| RPC | `{"method": "debug_vmodule", "params": [number]}` | | RPC | `{"method": "debug_vmodule", "params": [number]}` |
@ -502,7 +505,7 @@ can be raised using `debug_vmodule`.
Sets the logging verbosity pattern. Sets the logging verbosity pattern.
| Client | Method invocation | | Client | Method invocation |
|:-------:|---------------------------------------------------| |:--------|---------------------------------------------------|
| Console | `debug.vmodule(string)` | | Console | `debug.vmodule(string)` |
| RPC | `{"method": "debug_vmodule", "params": [string]}` | | RPC | `{"method": "debug_vmodule", "params": [string]}` |
@ -543,7 +546,7 @@ debug.vmodule("eth/*/peer.go=6,p2p=5")
Writes a goroutine blocking profile to the given file. Writes a goroutine blocking profile to the given file.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------------| |:--------|-------------------------------------------------------------|
| Console | `debug.writeBlockProfile(file)` | | Console | `debug.writeBlockProfile(file)` |
| RPC | `{"method": "debug_writeBlockProfile", "params": [string]}` | | RPC | `{"method": "debug_writeBlockProfile", "params": [string]}` |
@ -555,6 +558,6 @@ it must be set on the command line using the `--memprofilerate`
flag. flag.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------------| |:--------|-------------------------------------------------------------|
| Console | `debug.writeMemProfile(file string)` | | Console | `debug.writeMemProfile(file string)` |
| RPC | `{"method": "debug_writeBlockProfile", "params": [string]}` | | RPC | `{"method": "debug_writeBlockProfile", "params": [string]}` |

View file

@ -5,6 +5,9 @@ title: miner Namespace
The `miner` API allows you to remote control the node's mining operation and set various The `miner` API allows you to remote control the node's mining operation and set various
mining specific settings. mining specific settings.
* TOC
{:toc}
### miner_getHashrate ### miner_getHashrate
Get your hashrate in H/s (Hash operations per second). Get your hashrate in H/s (Hash operations per second).

View file

@ -4,6 +4,9 @@ title: personal Namespace
The personal API manages private keys in the key store. The personal API manages private keys in the key store.
* TOC
{:toc}
### personal_importRawKey ### personal_importRawKey
Imports the given unencrypted private key (hex string) into the key store, Imports the given unencrypted private key (hex string) into the key store,
@ -11,20 +14,20 @@ encrypting it with the passphrase.
Returns the address of the new account. Returns the address of the new account.
| Client | Method invocation | | Client | Method invocation |
| :-------: | ----------------------------------------------------------------- | | :--------| ----------------------------------------------------------------- |
| Console | `personal.importRawKey(keydata, passphrase)` | | Console | `personal.importRawKey(keydata, passphrase)` |
| RPC | `{"method": "personal_importRawKey", "params": [string, string]}` | | RPC | `{"method": "personal_importRawKey", "params": [string, string]}` |
### personal_listAccounts ### personal_listAccounts
Returns all the Ethereum account addresses of all keys Returns all the Ethereum account addresses of all keys
in the key store. in the key store.
| Client | Method invocation | | Client | Method invocation |
| :-------: | --------------------------------------------------- | | :--------| --------------------------------------------------- |
| Console | `personal.listAccounts` | | Console | `personal.listAccounts` |
| RPC | `{"method": "personal_listAccounts", "params": []}` | | RPC | `{"method": "personal_listAccounts", "params": []}` |
#### Example #### Example
@ -38,10 +41,10 @@ in the key store.
Removes the private key with given address from memory. Removes the private key with given address from memory.
The account can no longer be used to send transactions. The account can no longer be used to send transactions.
| Client | Method invocation | | Client | Method invocation |
| :-------: | -------------------------------------------------------- | | :--------| -------------------------------------------------------- |
| Console | `personal.lockAccount(address)` | | Console | `personal.lockAccount(address)` |
| RPC | `{"method": "personal_lockAccount", "params": [string]}` | | RPC | `{"method": "personal_lockAccount", "params": [string]}` |
### personal_newAccount ### personal_newAccount
@ -52,10 +55,10 @@ Returns the address of the new account.
At the geth console, `newAccount` will prompt for a passphrase when At the geth console, `newAccount` will prompt for a passphrase when
it is not supplied as the argument. it is not supplied as the argument.
| Client | Method invocation | | Client | Method invocation |
| :-------: | --------------------------------------------------- | | :--------| --------------------------------------------------- |
| Console | `personal.newAccount()` | | Console | `personal.newAccount()` |
| RPC | `{"method": "personal_newAccount", "params": [string]}` | | RPC | `{"method": "personal_newAccount", "params": [string]}` |
#### Example #### Example
@ -87,10 +90,10 @@ of zero seconds unlocks the key until geth exits.
The account can be used with `eth_sign` and `eth_sendTransaction` while it is unlocked. The account can be used with `eth_sign` and `eth_sendTransaction` while it is unlocked.
| Client | Method invocation | | Client | Method invocation |
| :-------: | -------------------------------------------------------------------------- | | :--------| -------------------------------------------------------------------------- |
| Console | `personal.unlockAccount(address, passphrase, duration)` | | Console | `personal.unlockAccount(address, passphrase, duration)` |
| RPC | `{"method": "personal_unlockAccount", "params": [string, string, number]}` | | RPC | `{"method": "personal_unlockAccount", "params": [string, string, number]}` |
#### Examples #### Examples
@ -124,12 +127,13 @@ Validate the given passphrase and submit transaction.
The transaction is the same argument as for `eth_sendTransaction` and contains the `from` address. If the passphrase can be used to decrypt the private key belogging to `tx.from` the transaction is verified, signed and send onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls. The transaction is the same argument as for `eth_sendTransaction` and contains the `from` address. If the passphrase can be used to decrypt the private key belogging to `tx.from` the transaction is verified, signed and send onto the network. The account is not unlocked globally in the node and cannot be used in other RPC calls.
| Client | Method invocation | | Client | Method invocation |
| :-------: | -----------------------------------------------------------------| | :--------| -----------------------------------------------------------------|
| Console | `personal.sendTransaction(tx, passphrase)` | | Console | `personal.sendTransaction(tx, passphrase)` |
| RPC | `{"method": "personal_sendTransaction", "params": [tx, string]}` | | RPC | `{"method": "personal_sendTransaction", "params": [tx, string]}` |
*Note, prior to Geth 1.5, please use `personal_signAndSendTransaction` as that was the original introductory name and only later renamed to the current final version.* *Note, prior to Geth 1.5, please use `personal_signAndSendTransaction` as that was the
original introductory name and only later renamed to the current final version.*
#### Examples #### Examples
@ -150,7 +154,7 @@ By adding a prefix to the message makes the calculated signature recognisable as
See ecRecover to verify the signature. See ecRecover to verify the signature.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------| |:--------|-------------------------------------------------------|
| Console | `personal.sign(message, account, [password])` | | Console | `personal.sign(message, account, [password])` |
| RPC | `{"method": "personal_sign", "params": [message, account, password]}` | | RPC | `{"method": "personal_sign", "params": [message, account, password]}` |
@ -167,7 +171,7 @@ See ecRecover to verify the signature.
`ecRecover` returns the address associated with the private key that was used to calculate the signature in `personal_sign`. `ecRecover` returns the address associated with the private key that was used to calculate the signature in `personal_sign`.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------| |:--------|-------------------------------------------------------|
| Console | `personal.ecRecover(message, signature)` | | Console | `personal.ecRecover(message, signature)` |
| RPC | `{"method": "personal_ecRecover", "params": [message, signature]}` | | RPC | `{"method": "personal_ecRecover", "params": [message, signature]}` |

View file

@ -6,6 +6,9 @@ The `txpool` API gives you access to several non-standard RPC methods to inspect
transaction pool containing all the currently pending transactions as well as the ones queued for transaction pool containing all the currently pending transactions as well as the ones queued for
future processing. future processing.
* TOC
{:toc}
### txpool_content ### txpool_content
The `content` inspection property can be queried to list the exact details of all the transactions The `content` inspection property can be queried to list the exact details of all the transactions
@ -21,7 +24,7 @@ happen if the user broadcast mutliple ones with varying gas allowances (or even
transactions). transactions).
| Client | Method invocation | | Client | Method invocation |
|:-------:|-------------------------------------------------------------------------| |:--------|-------------------------------------------------------------------------|
| Go | `txpool.Content() (map[string]map[string]map[string][]*RPCTransaction)` | | Go | `txpool.Content() (map[string]map[string]map[string][]*RPCTransaction)` |
| Console | `txpool.content` | | Console | `txpool.content` |
| RPC | `{"method": "txpool_content"}` | | RPC | `{"method": "txpool_content"}` |
@ -139,7 +142,7 @@ happen if the user broadcast mutliple ones with varying gas allowances (or even
transactions). transactions).
| Client | Method invocation | | Client | Method invocation |
|:-------:|----------------------------------------------------------------| |:--------|----------------------------------------------------------------|
| Go | `txpool.Inspect() (map[string]map[string]map[string][]string)` | | Go | `txpool.Inspect() (map[string]map[string]map[string][]string)` |
| Console | `txpool.inspect` | | Console | `txpool.inspect` |
| RPC | `{"method": "txpool_inspect"}` | | RPC | `{"method": "txpool_inspect"}` |
@ -208,7 +211,7 @@ The result is an object with two fields `pending` and `queued`, each of which is
the number of transactions in that particular state. the number of transactions in that particular state.
| Client | Method invocation | | Client | Method invocation |
|:-------:|-----------------------------------------------| |:--------|-----------------------------------------------|
| Go | `txpool.Status() (map[string]*rpc.HexNumber)` | | Go | `txpool.Status() (map[string]*rpc.HexNumber)` |
| Console | `txpool.status` | | Console | `txpool.status` |
| RPC | `{"method": "txpool_status"}` | | RPC | `{"method": "txpool_status"}` |