mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
subxt: Expose light client under experimental feature-flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -73,6 +73,11 @@ wabt = "0.10.0"
|
|||||||
wasm-bindgen-test = "0.3.24"
|
wasm-bindgen-test = "0.3.24"
|
||||||
which = "4.4.0"
|
which = "4.4.0"
|
||||||
|
|
||||||
|
# Light client support:
|
||||||
|
smoldot-light = { git = "https://github.com/smol-dot/smoldot.git", default-features = false }
|
||||||
|
tokio-stream = "0.1.14"
|
||||||
|
futures-util = "0.3.28"
|
||||||
|
|
||||||
# Substrate crates:
|
# Substrate crates:
|
||||||
sp-core = { version = "20.0.0", default-features = false }
|
sp-core = { version = "20.0.0", default-features = false }
|
||||||
sp-core-hashing = "8.0.0"
|
sp-core-hashing = "8.0.0"
|
||||||
|
|||||||
@@ -40,6 +40,16 @@ jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport"
|
|||||||
# latest features exposed by the metadata.
|
# latest features exposed by the metadata.
|
||||||
unstable-metadata = []
|
unstable-metadata = []
|
||||||
|
|
||||||
|
# Activate this to expose the Light Client functionality.
|
||||||
|
# Note that this feature is experimental and things may break or not work as expected.
|
||||||
|
experimental-light-client = [
|
||||||
|
"smoldot-light/std",
|
||||||
|
"tokio-stream",
|
||||||
|
"tokio/sync",
|
||||||
|
"tokio/rt",
|
||||||
|
"futures-util",
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
|
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
|
||||||
scale-info = { workspace = true }
|
scale-info = { workspace = true }
|
||||||
@@ -78,6 +88,12 @@ sp-runtime = { workspace = true, optional = true }
|
|||||||
subxt-macro = { workspace = true }
|
subxt-macro = { workspace = true }
|
||||||
subxt-metadata = { workspace = true }
|
subxt-metadata = { workspace = true }
|
||||||
|
|
||||||
|
# Light client support:
|
||||||
|
smoldot-light = { workspace = true, optional = true }
|
||||||
|
tokio = { workspace = true, optional = true }
|
||||||
|
tokio-stream = { workspace = true, optional = true }
|
||||||
|
futures-util = { workspace = true, optional = true }
|
||||||
|
|
||||||
[target.wasm32-unknown-unknown.dependencies]
|
[target.wasm32-unknown-unknown.dependencies]
|
||||||
getrandom = { workspace = true, features = ["js"] }
|
getrandom = { workspace = true, features = ["js"] }
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,9 @@
|
|||||||
#[cfg(feature = "jsonrpsee")]
|
#[cfg(feature = "jsonrpsee")]
|
||||||
mod jsonrpsee_impl;
|
mod jsonrpsee_impl;
|
||||||
|
|
||||||
|
#[cfg(feature = "experimental-light-client")]
|
||||||
|
mod lightclient;
|
||||||
|
|
||||||
mod rpc;
|
mod rpc;
|
||||||
mod rpc_client;
|
mod rpc_client;
|
||||||
mod rpc_client_t;
|
mod rpc_client_t;
|
||||||
@@ -62,3 +65,6 @@ pub use rpc_client_t::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub use rpc_client::{rpc_params, RpcClient, RpcParams, Subscription};
|
pub use rpc_client::{rpc_params, RpcClient, RpcParams, Subscription};
|
||||||
|
|
||||||
|
#[cfg(feature = "experimental-light-client")]
|
||||||
|
pub use lightclient::{LightClient, LightClientError};
|
||||||
|
|||||||
Reference in New Issue
Block a user