Files
pezkuwi-subxt/substrate/srml/support/rpc/Cargo.toml
T
Tomasz Drwięga 57ab3aeb82 Typed chain state queries over rpc. (#4079)
* Create typed client helpers for querying chain state storage items declared by
'decl_storage!'.

* Update substrate-rpc-custom functions to use async await syntax.

* The implementation of substrate-rpc-custom was a bit verbose and repetitive.
This commit makes the implementation simpler by intruducing a struct which
represents query for a typed value in storage. The new struct is called
StorageQuery. A StorageQuery wraps a raw StorageKey but is not directy
constructable. To construct a StorageQuery, the user must supply an
implementation of a srml_support::storage::generator trait such as
StorageValue or StorageMap.

A type implementing one of the generator traits can be aquired by:
A) marking a storage item as pub within a call to decl_storage (recommended)
or B) implementing one of the generator types manually.

While option B may sometimes me necessary, it's not recommended because
separate manual implementaions may lose sync with the original definition.

* drop unused dependency

* fmt

* Remove unnecessary pub from Authorities field in test-runtime storage
declaration.

This field was added to support a test in an earlier commit. The
test no longer relies on test-runtime so the change can be reverted.

* Move it to srml as support extension.

* Fix long lines.

* Fix.
2019-11-11 02:01:15 +01:00

20 lines
561 B
TOML

[package]
name = "srml-support-rpc"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>", "Andrew Dirksen <andrew@dirksen.com>"]
edition = "2018"
[dependencies]
futures = { version = "0.3.0", features = ["compat"] }
jsonrpc-client-transports = "14"
jsonrpc-core = "14"
parity-scale-codec = "1"
serde = "1"
srml-support = { path = "../" }
substrate-primitives-storage = { path = "../../../core/primitives/storage" }
substrate-rpc-api = { path = "../../../core/rpc/api" }
[dev-dependencies]
srml-system = { path = "../../system" }
tokio = "0.1"