[package] name = "substrate-api-client" version = "1.16.0" authors = ["Supercomputing Systems AG "] license = "Apache-2.0" edition = "2021" repository = "https://github.com/scs/substrate-api-client" description = "Json-rpc client with helper functions compatible with any Substrate node" readme = "README.md" keywords = ["json", "rpc", "polkadot", "api", "blockchain"] categories = ["no-std", "wasm"] [workspace] members = [ ".", "keystore", "compose-macros", "examples/async", "examples/sync", "examples/wasm", "node-api", "test-no-std", "testing/async", "testing/sync", ] [dependencies] # crates.io no_std async-trait = "0.1.68" codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ['derive'] } derive_more = { version = "0.99.5" } frame-metadata = { version = "16.0", default-features = false, features = ["current", "serde_full", "decode"] } futures-util = { version = "0.3", default-features = false } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } log = { version = "0.4.14", default-features = false } maybe-async = { version = "0.2.7" } serde = { version = "1.0.136", default-features = false, features = ["derive"] } serde_json = { version = "1.0.79", default-features = false } # crates.io std only url = { version = "2.5", optional = true } # websocket dependent features jsonrpsee = { version = "0.24", optional = true, features = ["async-client", "client-ws-transport-tls", "jsonrpsee-types"] } tungstenite = { version = "0.23", optional = true, features = ["native-tls", "url"] } ws = { version = "0.9.2", optional = true, features = ["ssl"] } # Substrate no_std dependencies sp-core = { default-features = false, features = ["full_crypto", "serde"], version = "34.0.0" } sp-crypto-hashing = { default-features = false, version = "0.1.0" } sp-inherents = { default-features = false, version = "34.0.0" } sp-runtime = { default-features = false, features = ["serde"], version = "39.0.1" } sp-runtime-interface = { default-features = false, version = "28.0.0" } sp-storage = { default-features = false, features = ["serde"], version = "21.0.0" } sp-version = { default-features = false, features = ["serde"], version = "37.0.0" } # substrate std / wasm only frame-support = { optional = true, version = "38.0.0" } # local deps ac-compose-macros = { path = "compose-macros", version = "1.16", default-features = false } ac-node-api = { path = "node-api", version = "1.16", default-features = false } ac-primitives = { path = "primitives", version = "1.16", default-features = false } [dev-dependencies] ac-node-api = { path = "node-api", version = "1.16", features = ["mocks"] } rococo-runtime = { version = "18.0.0" } scale-info = { version = "2.1.1", features = ["derive"] } test-case = "3.1.0" [features] default = ["std", "jsonrpsee-client"] # To support `no_std` builds in non-32 bit environments. disable_target_static_assertions = [ "sp-runtime-interface/disable_target_static_assertions", ] # If this is active all the code compiles in synchronous mode. If not selected, code will compile to async mode. sync-api = ["ac-compose-macros/sync-api", "maybe-async/is_sync"] # Use the `jsonrpsee` crate for websocket communication. Does only provide async support and needs a tokio runtime. # Provides convenience functions such as subscription callbacks. # Most examples use the `jsonrpsee` feature and can be used for reference. jsonrpsee-client = ["std", "jsonrpsee"] # Use the `tungstenite` crate for websocket communication. No async support but has some reconnection capabilities. # See the example `transfer_with_tungstenite_client` on how to use it. tungstenite-client = ["std", "tungstenite", "sync-api"] # Use the `ws` crate for websocket communication. No async support. # Establishes a new connection for each request and therefore is limited in terms of performance. # See the example `transfer_with_ws_client` on how to use it. ws-client = ["std", "ws", "sync-api"] # Enables functionality that helps to create extrinsics for `pallet-staking`. # See the `StakingExtrinsics` trait and the `staking_batch_payout` example to get an understanding # of the functionality this feature provides staking-xt = ["std", "ac-primitives/staking-xt"] # Enables functionality that helps to create extrinsics for `pallet-contracts`. # See the `ContractsExtrinsics` trait and the `contract_instantiate_with_code` example to get an understanding # of the functionality this feature provides. contracts-xt = ["std", "ac-primitives/contracts-xt"] # Provides compatibility to RFC-0078: "Merkelized Metadata" but disables the check of the metadata hash disable-metadata-hash-check = ["ac-primitives/disable-metadata-hash-check"] # Enables all std features of dependencies in case of std build. std = [ # crates.io no_std "codec/std", "frame-metadata/std", "hex/std", "log/std", "serde/std", "serde_json/std", "futures-util/std", # crates.io std only "url", # substrate no_std "sp-core/std", "sp-runtime/std", "sp-runtime-interface/std", "sp-storage/std", "sp-version/std", # substrate std "frame-support", # local deps "ac-compose-macros/std", "ac-node-api/std", "ac-primitives/std", ]