-
Notifications
You must be signed in to change notification settings - Fork 764
/
Cargo.toml
160 lines (146 loc) · 4.86 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[package]
name = "sp-core"
version = "28.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
homepage = "https://substrate.io"
repository.workspace = true
description = "Shareable Substrate types."
documentation = "https://docs.rs/sp-core"
[lints]
workspace = true
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { features = ["derive", "max-encoded-len"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
log = { workspace = true }
serde = { optional = true, features = ["alloc", "derive"], workspace = true }
bounded-collections = { workspace = true }
primitive-types = { features = ["codec", "scale-info"], workspace = true }
impl-serde = { optional = true, workspace = true }
hash-db = { workspace = true }
hash256-std-hasher = { workspace = true }
bs58 = { optional = true, workspace = true }
rand = { features = ["small_rng"], optional = true, workspace = true, default-features = true }
substrate-bip39 = { workspace = true }
# personal fork here as workaround for: https://github.com/rust-bitcoin/rust-bip39/pull/64
bip39 = { package = "parity-bip39", version = "2.0.1", default-features = false, features = ["alloc"] }
zeroize = { workspace = true }
secrecy = { features = ["alloc"], workspace = true }
parking_lot = { optional = true, workspace = true, default-features = true }
ss58-registry = { workspace = true }
sp-std = { workspace = true }
sp-debug-derive = { workspace = true }
sp-storage = { workspace = true }
sp-externalities = { optional = true, workspace = true }
futures = { optional = true, workspace = true }
dyn-clonable = { optional = true, workspace = true }
thiserror = { optional = true, workspace = true }
tracing = { optional = true, workspace = true, default-features = true }
bitflags = { workspace = true }
paste = { workspace = true, default-features = true }
itertools = { optional = true, workspace = true }
# full crypto
array-bytes = { workspace = true, default-features = true }
ed25519-zebra = { workspace = true }
blake2 = { optional = true, workspace = true }
libsecp256k1 = { features = ["static-context"], workspace = true }
schnorrkel = { features = ["preaudit_deprecated"], workspace = true }
merlin = { workspace = true }
sp-crypto-hashing = { workspace = true }
sp-runtime-interface = { workspace = true }
# k256 crate, better portability, intended to be used in substrate-runtimes (no-std)
k256 = { features = ["alloc", "ecdsa"], workspace = true }
# secp256k1 crate, better performance, intended to be used on host side (std)
secp256k1 = { features = ["alloc", "recovery"], optional = true, workspace = true }
# bls crypto
w3f-bls = { optional = true, workspace = true }
# bandersnatch crypto
bandersnatch_vrfs = { git = "https://github.com/w3f/ring-vrf", rev = "e9782f9", default-features = false, features = ["substrate-curves"], optional = true }
[dev-dependencies]
criterion = { workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }
lazy_static = { workspace = true }
regex = { workspace = true }
[[bench]]
name = "bench"
harness = false
[lib]
bench = false
[features]
default = ["std"]
std = [
"bandersnatch_vrfs?/std",
"bip39/rand",
"bip39/std",
"blake2/std",
"bounded-collections/std",
"bs58/std",
"codec/std",
"dyn-clonable",
"ed25519-zebra/std",
"full_crypto",
"futures",
"futures/thread-pool",
"hash-db/std",
"hash256-std-hasher/std",
"impl-serde/std",
"itertools",
"k256/std",
"libsecp256k1/std",
"log/std",
"merlin/std",
"parking_lot",
"primitive-types/byteorder",
"primitive-types/rustc-hex",
"primitive-types/serde",
"primitive-types/std",
"rand",
"scale-info/std",
"schnorrkel/std",
"secp256k1/global-context",
"secp256k1/std",
"serde/std",
"sp-crypto-hashing/std",
"sp-debug-derive/std",
"sp-externalities/std",
"sp-runtime-interface/std",
"sp-std/std",
"sp-storage/std",
"ss58-registry/std",
"substrate-bip39/std",
"thiserror",
"tracing",
"w3f-bls?/std",
"zeroize/alloc",
"zeroize/std",
]
# Serde support without relying on std features.
serde = [
"blake2",
"bounded-collections/serde",
"bs58/alloc",
"dep:serde",
"impl-serde",
"k256/serde",
"primitive-types/serde_no_std",
"scale-info/serde",
"sp-storage/serde",
]
# This feature enables all crypto primitives for `no_std` builds like microcontrollers
# or Intel SGX.
# For the regular wasm runtime builds this should not be used.
full_crypto = [
"blake2",
"sp-runtime-interface/disable_target_static_assertions",
]
# This feature adds BLS crypto primitives.
# It should not be used in production since the implementation and interface may still
# be subject to significant changes.
bls-experimental = ["w3f-bls"]
# This feature adds Bandersnatch crypto primitives.
# It should not be used in production since the implementation and interface may still
# be subject to significant changes.
bandersnatch-experimental = ["bandersnatch_vrfs"]