RPC: expose chain spec properties (#1104)

* Add properties to chain spec

* Read properties as serde_json::Value

* Use a serde json::map::Map directly for properties

* Add type alias for json Map

* Update chain_spec.rs
This commit is contained in:
Andrew Jones
2018-11-12 18:58:44 +00:00
committed by Gav Wood
parent 57b2896332
commit db075b57f0
8 changed files with 42 additions and 4 deletions
+4
View File
@@ -37,5 +37,9 @@ build_rpc_trait! {
/// Get the chain's type. Given as a string identifier.
#[rpc(name = "system_chain")]
fn system_chain(&self) -> Result<String>;
/// Get a custom set of properties as a JSON object, defined in the chain spec.
#[rpc(name = "system_properties")]
fn system_properties(&self) -> Result<serde_json::map::Map<String, serde_json::Value>>;
}
}