-
Notifications
You must be signed in to change notification settings - Fork 125
/
Copy pathCargo.toml
117 lines (106 loc) · 4.98 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[package]
name = "substrate-api-client"
version = "0.14.0"
authors = ["Supercomputing Systems AG <[email protected]>"]
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"]
categories = ["no-std", "wasm"]
[workspace]
members = [
".",
"client-keystore",
"compose-macros",
"examples",
"node-api",
"test-no-std",
"testing",
]
[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"] }
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.0.0", optional = true }
# websocket dependent features
futures = { version = "0.3", optional = true }
jsonrpsee = { version = "0.16", optional = true, features = ["async-client", "client-ws-transport", "jsonrpsee-types"] }
tungstenite = { version = "0.20.1", optional = true, features = ["native-tls"] }
ws = { version = "0.9.2", optional = true, features = ["ssl"] }
# Substrate no_std dependencies
sp-core = { default-features = false, features = ["full_crypto", "serde"], git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-runtime = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-storage = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-version = { default-features = false, features = ["serde"], git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
# substrate std / wasm only
frame-support = { optional = true, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
# local deps
ac-compose-macros = { path = "compose-macros", default-features = false }
ac-node-api = { path = "node-api", default-features = false }
ac-primitives = { path = "primitives", default-features = false }
[dev-dependencies]
ac-node-api = { path = "node-api", features = ["mocks"] }
kitchensink-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
scale-info = { version = "2.1.1", features = ["derive"] }
test-case = "3.1.0"
[features]
default = ["std", "jsonrpsee-client", "sync-api"]
# 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. Otherwise `async` is supported.
sync-api = ["ac-compose-macros/sync-api", "maybe-async/is_sync"]
# Use the `jsonrpsee` crate for websocket communication. Does provide sync and async support but 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", "futures"]
# 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"]
# 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"]
# 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"]
std = [
# crates.io no_std
"codec/std",
"frame-metadata/std",
"hex/std",
"log/std",
"serde/std",
"serde_json/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",
]