-
Notifications
You must be signed in to change notification settings - Fork 124
/
Cargo.toml
135 lines (115 loc) · 5.69 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[package]
name = "substrate-api-client"
version = "0.18.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", "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"], git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-crypto-hashing = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master" }
sp-inherents = { default-features = false, 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", version = "0.18", default-features = false }
ac-node-api = { path = "node-api", version = "0.18", default-features = false }
ac-primitives = { path = "primitives", version = "0.18", default-features = false }
[dev-dependencies]
ac-node-api = { path = "node-api", version = "0.18", features = ["mocks"] }
rococo-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"]
# 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",
]