Full JSON-RPC docs + sync tests. (#4335)

* Extended Markdown generator

* Synced and extended all JSON-RPC interfaces

* Fix linter errors

* Format `parity_listAccounts` output in API

* typo

* Check if interfaces are synced in JS spec tests

* Fixing missing interface errors

* Better #[rpc] attribute parsing

* Fixed RPC JS spec tests

* More examples

* Refactored how dummy data appears in examples

* Complete trace docs!

* fix typo

* Less copy-paste

* All the docs!

* Fix differences between CallRequest and TransactionRequest

* Fix differences between CallRequest and TransactionRequest

* Missing examples

* Grumble fixes
This commit is contained in:
Maciej Hirsz
2017-02-01 10:58:09 +01:00
committed by Jaco Greeff
parent b2ecf1c5a4
commit ed09a76c91
17 changed files with 791 additions and 299 deletions

View File

@@ -105,7 +105,7 @@ build_rpc_trait! {
#[rpc(name = "eth_sendRawTransaction")]
fn send_raw_transaction(&self, Bytes) -> Result<H256, Error>;
/// Alias of `eth_sendRawTransaction`.
/// @alias of `eth_sendRawTransaction`.
#[rpc(name = "eth_submitTransaction")]
fn submit_transaction(&self, Bytes) -> Result<H256, Error>;

View File

@@ -70,7 +70,8 @@ build_rpc_trait! {
#[rpc(name = "parity_setAccountMeta")]
fn set_account_meta(&self, H160, String) -> Result<bool, Error>;
/// Sets account visibility
/// Sets account visibility.
/// @unimplemented
#[rpc(name = "parity_setAccountVisiblity")]
fn set_account_visibility(&self, H160, H256, bool) -> Result<bool, Error>;

View File

@@ -74,13 +74,13 @@ build_rpc_trait! {
/// Start the network.
///
/// Deprecated. Use `set_mode("active")` instead.
/// @deprecated - Use `set_mode("active")` instead.
#[rpc(name = "parity_startNetwork")]
fn start_network(&self) -> Result<bool, Error>;
/// Stop the network.
///
/// Deprecated. Use `set_mode("offline")` instead.
/// @deprecated - Use `set_mode("offline")` instead.
#[rpc(name = "parity_stopNetwork")]
fn stop_network(&self) -> Result<bool, Error>;

View File

@@ -24,10 +24,12 @@ build_rpc_trait! {
/// RPC Interface.
pub trait Rpc {
/// Returns supported modules for Geth 1.3.6
/// @ignore
#[rpc(name = "modules")]
fn modules(&self) -> Result<BTreeMap<String, String>, Error>;
/// Returns supported modules for Geth 1.4.0
/// @ignore
#[rpc(name = "rpc_modules")]
fn rpc_modules(&self) -> Result<BTreeMap<String, String>, Error>;
}