Added txpool_pantheonTransactions (#1145)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
MadelineMurray 6 years ago committed by GitHub
parent 0d08a12171
commit fdc6c2b728
  1. 2
      docs/JSON-RPC-API/Using-JSON-RPC-API.md
  2. 46
      docs/Reference/JSON-RPC-API-Methods.md
  3. 10
      docs/Reference/Pantheon-CLI-Syntax.md

@ -116,7 +116,7 @@ Send individual requests as a JSON data package at each prompt:
The `ETH`, `NET`, and `WEB3` API methods are enabled by default. The `ETH`, `NET`, and `WEB3` API methods are enabled by default.
Use the [`--rpc-http-api`](../Reference/Pantheon-CLI-Syntax.md#rpc-http-api) or [`--rpc-ws-api`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-api) Use the [`--rpc-http-api`](../Reference/Pantheon-CLI-Syntax.md#rpc-http-api) or [`--rpc-ws-api`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-api)
options to enable the `ADMIN` ,`CLIQUE`,`DEBUG`, `EEA`, `IBFT`, `MINER`, and `PERM` API methods. options to enable the `ADMIN`, `CLIQUE`, `DEBUG`, `EEA`, `IBFT`, `MINER`, `PERM`, and `TXPOOL` API methods.
!!!note !!!note
EEA methods are for privacy features. Privacy features are under development and will be available in v1.1. EEA methods are for privacy features. Privacy features are under development and will be available in v1.1.

@ -2518,6 +2518,52 @@ None
"result": "Success" "result": "Success"
} }
``` ```
## Txpool Methods
!!! note
The `TXPOOL` API methods are not enabled by default. Use the [`--rpc-http-api`](Pantheon-CLI-Syntax.md#rpc-http-api)
or [`--rpc-ws-api`](Pantheon-CLI-Syntax.md#rpc-ws-api) options to enable the `TXPOOL` API methods.
### txpool_pantheonTransactions
Lists transactions in the node transaction pool.
**Parameters**
None
**Returns**
`result` - List of transactions
!!! example
```bash tab="curl HTTP request"
curl -X POST --data '{"jsonrpc":"2.0","method":"txpool_pantheonTransactions","params":[],"id":1}' http://127.0.0.1:8545
```
```bash tab="wscat WS request"
{"jsonrpc":"2.0","method":"txpool_pantheonTransactions","params":[],"id":1}
```
```json tab="JSON result"
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x8a66830098be4006a3f63a03b6e9b67aa721e04bd6b46d420b8f1937689fb4f1",
"isReceivedFromLocalSource": true,
"addedToPoolAt": "2019-03-21T01:35:50.911Z"
},
{
"hash": "0x41ee803c3987ceb5bcea0fad7a76a8106a2a6dd654409007d9931032ea54579b",
"isReceivedFromLocalSource": true,
"addedToPoolAt": "2019-03-21T01:36:00.374Z"
}
]
}
```
## Miscellaneous Methods ## Miscellaneous Methods

@ -1,4 +1,4 @@
description: Pantheon commande line interface reference description: Pantheon command line interface reference
<!--- END of page meta data --> <!--- END of page meta data -->
# Pantheon Command Line # Pantheon Command Line
@ -39,7 +39,7 @@ banned-nodeids=["0xc35c3...d615f","0xf42c13...fc456"]
List of node IDs with which this node will not peer. The node ID is the public key of the node. You can specify the banned node IDs with or without the `0x` prefix. List of node IDs with which this node will not peer. The node ID is the public key of the node. You can specify the banned node IDs with or without the `0x` prefix.
!!!tip !!!tip
The singular `--banned-node-id` and plural `--banned-node-ids` are available and are just two The singular `--banned-node-id` and plural `--banned-node-ids` are available and are two
names for the same option. names for the same option.
### bootnodes ### bootnodes
@ -684,14 +684,14 @@ rpc-http-api=["ETH","NET","WEB3"]
Comma-separated APIs to enable on the HTTP JSON-RPC channel. Comma-separated APIs to enable on the HTTP JSON-RPC channel.
When you use this option, the `--rpc-http-enabled` option must also be specified. When you use this option, the `--rpc-http-enabled` option must also be specified.
The available API options are: `ADMIN`, `ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`, `PERM`, `DEBUG`, `MINER`, and `EEA`. The available API options are: `ADMIN`, `ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`, `PERM`, `DEBUG`, `MINER`, `EEA`, and `TXPOOL`.
The default is: `ETH`, `NET`, `WEB3`. The default is: `ETH`, `NET`, `WEB3`.
!!!note !!!note
EEA methods are for privacy features. Privacy features are under development and will be available in v1.1. EEA methods are for privacy features. Privacy features are under development and will be available in v1.1.
!!!tip !!!tip
The singular `--rpc-http-api` and plural `--rpc-http-apis` are available and are just two The singular `--rpc-http-api` and plural `--rpc-http-apis` are available and are two
names for the same option. names for the same option.
### rpc-http-authentication-credentials-file ### rpc-http-authentication-credentials-file
@ -846,7 +846,7 @@ rpc-ws-api=["ETH","NET","WEB3"]
Comma-separated APIs to enable on WebSockets channel. Comma-separated APIs to enable on WebSockets channel.
When you use this option, the `--rpc-ws-enabled` option must also be specified. When you use this option, the `--rpc-ws-enabled` option must also be specified.
The available API options are: `ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`, `PERM', DEBUG`, `MINER` and `EEA`. The available API options are: `ADMIN`,`ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`, `PERM', DEBUG`, `MINER`, `EEA`, and `TXPOOL`.
The default is: `ETH`, `NET`, `WEB3`. The default is: `ETH`, `NET`, `WEB3`.
!!!note !!!note

Loading…
Cancel
Save