[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 = "Interact with Substrate based chains on the Polkadot Network"
keywords = ["parity", "substrate", "blockchain"]
[lints]
workspace = true
[features]
default = ["jsonrpsee", "native"]
docs = [
"default",
"light-client",
"runtime",
"reconnecting-rpc-client",
]
native = [
"subxt-lightclient?/native",
"subxt-rpcs/native",
"tokio-util",
"tokio?/sync",
"sp-crypto-hashing/std",
]
web = [
"subxt-lightclient?/web",
"subxt-macro/web",
"subxt-rpcs/web",
"tokio?/sync",
]
runtime = ["tokio/rt", "wasm-bindgen-futures"]
reconnecting-rpc-client = ["subxt-rpcs/reconnecting-rpc-client"]
jsonrpsee = [
"dep:jsonrpsee",
"subxt-rpcs/jsonrpsee",
"runtime"
]
unstable-metadata = []
light-client = ["subxt-lightclient", "subxt-rpcs/light-client"]
runtime-wasm-path = ["subxt-macro/runtime-wasm-path"]
[dependencies]
async-trait = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true, features = ["derive"] }
derive-where = { workspace = true }
scale-info = { workspace = true, features = ["default"] }
scale-info-legacy = { workspace = true }
scale-type-resolver = { workspace = true }
scale-value = { workspace = true, features = ["default"] }
scale-bits = { workspace = true, features = ["default"] }
scale-decode = { workspace = true, features = ["default"] }
scale-encode = { workspace = true, features = ["default"] }
futures = { workspace = true }
hex = { workspace = true }
impl-serde = { workspace = true, default-features = false }
keccak-hash = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["default", "raw_value"] }
sp-crypto-hashing = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
frame-metadata = { workspace = true }
frame-decode = { workspace = true, features = ["legacy-types"] }
either = { workspace = true }
web-time = { workspace = true }
primitive-types = { workspace = true, features = ["codec", "scale-info", "serde"] }
jsonrpsee = { workspace = true, optional = true, features = ["jsonrpsee-types"] }
subxt-macro = { workspace = true }
subxt-metadata = { workspace = true, features = ["std", "legacy"] }
subxt-lightclient = { workspace = true, optional = true, default-features = false }
subxt-rpcs = { workspace = true }
subxt-utils-accountid32 = { workspace = true }
tokio-util = { workspace = true, features = ["compat"], optional = true }
tokio = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
[[example]]
name = "light_client"
path = "examples/light_client.rs"
required-features = ["light-client", "jsonrpsee"]
[[example]]
name = "rpc_client"
path = "examples/rpc_client.rs"
required-features = ["reconnecting-rpc-client"]
[package.metadata.docs.rs]
features = ["docs"]
[package.metadata.playground]
features = ["default", "light-client"]