mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 07:58:02 +00:00
34ff3da37d
* lightclient: Make `smoldot::chainID` part of the RPC requests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Make `BackgroundTask` generic over `PlatformRef` and chain Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Construct from raw smoldot and target different chains Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * testing: Update cargo lock for wasm tests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reuse `new_from_client` method and removed unused imports Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport smoldot client and RPC objects used in pub interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Adjust `new_from_client` interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Extend background to poll over multiple RPC objects Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Build light client from raw and target different chains Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Add demo chain specs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Move artifacts to dedicated folder Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Use SelectAll to drive all streams Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Fetch initial data from the target chain Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport other smoldot objects Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Target chain with potentially different config Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt/rpc: Log chainID for debugging Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt/examples: Add smoldot client with parachain example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Propagate chain ID together with rpc responses object Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Multiplex responses by request ID and chain ID Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Add raw light client builder Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Add cargo feature flag for parachains example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Derive default for internal structure Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Guard reexports by std feature flag Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update subxt/src/client/light_client/mod.rs Co-authored-by: James Wilson <james@jsdw.me> * lightclient: Update the builder pattern and chain targetting Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Fix documentation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Provide more insightful docs wrt native/wasm panics Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * examples: Adjust comment location Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Refactor UniqueChainId into the background task Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update lightclient/src/background.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update subxt/src/client/light_client/builder.rs Co-authored-by: James Wilson <james@jsdw.me> * lightclient: Update docs wrt panics Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update docs wrt to smoldot instance -> client Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Use IntoIter instead of Iterator Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Adjsut docs wrt [`Self::new_from_client`] Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Remove RawRpc from LightClient in favor of chainID Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport everything under smoldot module Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Use stateRootHash instead of genesis.raw Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: James Wilson <james@jsdw.me> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
122 lines
4.6 KiB
TOML
122 lines
4.6 KiB
TOML
[package]
|
|
name = "subxt"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
publish = true
|
|
|
|
license.workspace = true
|
|
readme = "../README.md"
|
|
repository.workspace = true
|
|
documentation.workspace = true
|
|
homepage.workspace = true
|
|
description = "Submit extrinsics (transactions) to a substrate node via RPC"
|
|
keywords = ["parity", "substrate", "blockchain"]
|
|
|
|
[features]
|
|
# For dev and documentation reasons we enable more features than are often desired.
|
|
# it's recommended to use `--no-default-features` and then select what you need.
|
|
default = ["jsonrpsee", "native"]
|
|
|
|
# Enable this for native (ie non web/wasm builds).
|
|
# Exactly 1 of "web" and "native" is expected.
|
|
native = [
|
|
"jsonrpsee?/async-client",
|
|
"jsonrpsee?/client-ws-transport-native-tls",
|
|
"subxt-lightclient?/native"
|
|
]
|
|
|
|
# Enable this for web/wasm builds.
|
|
# Exactly 1 of "web" and "native" is expected.
|
|
web = ["jsonrpsee?/async-wasm-client", "jsonrpsee?/client-web-transport", "getrandom/js", "subxt-lightclient?/web", "subxt-macro/web"]
|
|
|
|
# Enable this to use jsonrpsee (allowing for example `OnlineClient::from_url`).
|
|
jsonrpsee = ["dep:jsonrpsee"]
|
|
|
|
# Enable this to pull in extra Substrate dependencies which make it possible to
|
|
# use the `sp_core::crypto::Pair` Signer implementation, as well as adding some
|
|
# `From` impls for types like `AccountId32`. Cannot be used with "web".
|
|
substrate-compat = ["sp-core", "sp-runtime"]
|
|
|
|
# Enable this to fetch and utilize the latest unstable metadata from a node.
|
|
# The unstable metadata is subject to breaking changes and the subxt might
|
|
# fail to decode the metadata properly. Use this to experiment with the
|
|
# latest features exposed by the 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.
|
|
unstable-light-client = ["subxt-lightclient", "tokio-stream"]
|
|
|
|
[dependencies]
|
|
async-trait = { workspace = true }
|
|
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
|
|
scale-info = { workspace = true }
|
|
scale-value = { workspace = true }
|
|
scale-bits = { workspace = true }
|
|
scale-decode = { workspace = true }
|
|
scale-encode = { workspace = true }
|
|
futures = { workspace = true }
|
|
hex = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
thiserror = { workspace = true }
|
|
tracing = { workspace = true }
|
|
frame-metadata = { workspace = true }
|
|
derivative = { workspace = true }
|
|
either = { workspace = true }
|
|
|
|
# Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256:
|
|
impl-serde = { workspace = true }
|
|
primitive-types = { workspace = true }
|
|
sp-core-hashing = { workspace = true }
|
|
|
|
# For ss58 encoding AccountId32 to serialize them properly:
|
|
base58 = { workspace = true }
|
|
blake2 = { workspace = true }
|
|
|
|
# Included if the "jsonrpsee" feature is enabled.
|
|
jsonrpsee = { workspace = true, optional = true, features = ["jsonrpsee-types"] }
|
|
|
|
# Included if the "substrate-compat" feature is enabled.
|
|
sp-core = { workspace = true, optional = true }
|
|
sp-runtime = { workspace = true, optional = true }
|
|
|
|
# Other subxt crates we depend on.
|
|
subxt-macro = { workspace = true }
|
|
subxt-metadata = { workspace = true }
|
|
subxt-lightclient = { workspace = true, optional = true, default-features = false }
|
|
|
|
# Light client support:
|
|
tokio-stream = { workspace = true, optional = true }
|
|
|
|
# Included if "web" feature is enabled, to enable its js feature.
|
|
getrandom = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
bitvec = { workspace = true }
|
|
codec = { workspace = true, features = ["derive", "bit-vec"] }
|
|
scale-info = { workspace = true, features = ["bit-vec"] }
|
|
tokio = { workspace = true, features = ["macros", "time", "rt-multi-thread"] }
|
|
sp-core = { workspace = true }
|
|
sp-keyring = { workspace = true }
|
|
sp-runtime = { workspace = true }
|
|
assert_matches = { workspace = true }
|
|
subxt-signer = { path = "../signer" }
|
|
# Tracing subscriber is useful for light-client examples to ensure that
|
|
# the `bootNodes` and chain spec are configured correctly. If all is fine, then
|
|
# the light-client wlll emit INFO logs with
|
|
# `GrandPa warp sync finished` and `Finalized block runtime ready.`
|
|
tracing-subscriber = { workspace = true }
|
|
|
|
[[example]]
|
|
name = "unstable_light_client_tx_basic"
|
|
path = "examples/unstable_light_client_tx_basic.rs"
|
|
required-features = ["unstable-light-client", "jsonrpsee"]
|
|
|
|
[[example]]
|
|
name = "unstable_light_client_parachains"
|
|
path = "examples/unstable_light_client_parachains.rs"
|
|
required-features = ["unstable-light-client", "jsonrpsee", "native"]
|