# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "sp-core"
version = "41.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Shareable Substrate types."
homepage = "https://paritytech.github.io/polkadot-sdk/"
documentation = "https://docs.rs/sp-core"
readme = false
license = "Apache-2.0"
repository = "https://github.com/paritytech/polkadot-sdk.git"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[features]
bandersnatch-experimental = ["ark-vrf"]
bls-experimental = [
    "sha2",
    "w3f-bls",
]
default = ["std"]
full_crypto = ["blake2"]
serde = [
    "blake2",
    "bounded-collections/serde",
    "bs58/alloc",
    "dep:serde",
    "impl-serde",
    "k256/serde",
    "primitive-types/serde_no_std",
    "scale-info/serde",
    "sp-storage/serde",
]
std = [
    "ark-vrf?/std",
    "bip39/rand",
    "bip39/std",
    "blake2/std",
    "bounded-collections/std",
    "bs58/std",
    "codec/std",
    "ed25519-zebra/std",
    "full_crypto",
    "futures/std",
    "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",
    "sha2?/std",
    "sp-crypto-hashing/std",
    "sp-debug-derive/std",
    "sp-externalities/std",
    "sp-std/std",
    "sp-storage/std",
    "ss58-registry/std",
    "substrate-bip39/std",
    "thiserror",
    "tracing",
    "w3f-bls?/std",
    "zeroize/alloc",
    "zeroize/std",
]

[lib]
name = "sp_core"
path = "src/lib.rs"
bench = false

[[bench]]
name = "bench"
path = "benches/bench.rs"
harness = false

[dependencies.ark-vrf]
version = "0.5.0"
features = [
    "bandersnatch",
    "ring",
]
optional = true
default-features = false

[dependencies.array-bytes]
version = "6.2.2"
default-features = true

[dependencies.bip39]
version = "2.2.0"
features = ["alloc"]
default-features = false

[dependencies.bitflags]
version = "1.3.2"

[dependencies.blake2]
version = "0.10.4"
optional = true
default-features = false

[dependencies.bounded-collections]
version = "0.3.2"
features = ["scale-codec"]
default-features = false

[dependencies.bs58]
version = "0.5.1"
optional = true
default-features = false

[dependencies.codec]
version = "3.7.5"
features = [
    "derive",
    "max-encoded-len",
]
default-features = false
package = "parity-scale-codec"

[dependencies.ed25519-zebra]
version = "4.0.3"
default-features = false

[dependencies.futures]
version = "0.3.31"
optional = true

[dependencies.hash-db]
version = "0.16.0"
default-features = false

[dependencies.hash256-std-hasher]
version = "0.15.2"
default-features = false

[dependencies.impl-serde]
version = "0.5.0"
optional = true
default-features = false

[dependencies.itertools]
version = "0.11"
optional = true

[dependencies.k256]
version = "0.13.4"
features = [
    "alloc",
    "ecdsa",
]
default-features = false

[dependencies.libsecp256k1]
version = "0.7.0"
features = ["static-context"]
default-features = false

[dependencies.log]
version = "0.4.22"
default-features = false

[dependencies.merlin]
version = "3.0"
default-features = false

[dependencies.parking_lot]
version = "0.12.1"
optional = true
default-features = true

[dependencies.paste]
version = "1.0.15"
default-features = true

[dependencies.primitive-types]
version = "0.13.1"
features = [
    "num-traits",
    "codec",
    "scale-info",
]
default-features = false

[dependencies.rand]
version = "0.8.5"
features = ["small_rng"]
optional = true
default-features = true

[dependencies.scale-info]
version = "2.11.6"
features = ["derive"]
default-features = false

[dependencies.schnorrkel]
version = "0.11.4"
features = ["preaudit_deprecated"]
default-features = false

[dependencies.secp256k1]
version = "0.28.0"
features = [
    "alloc",
    "recovery",
]
optional = true
default-features = false

[dependencies.secrecy]
version = "0.8.0"
features = ["alloc"]
default-features = false

[dependencies.serde]
version = "1.0.214"
features = [
    "alloc",
    "derive",
]
optional = true
default-features = false

[dependencies.sha2]
version = "0.10.7"
optional = true
default-features = false

[dependencies.sp-crypto-hashing]
version = "0.1.0"
default-features = false

[dependencies.sp-debug-derive]
version = "15.0.0"
default-features = false

[dependencies.sp-externalities]
version = "0.32.0"
optional = true
default-features = false

[dependencies.sp-std]
version = "14.0.0"
default-features = false

[dependencies.sp-storage]
version = "23.0.0"
default-features = false

[dependencies.ss58-registry]
version = "1.34.0"
default-features = false

[dependencies.substrate-bip39]
version = "0.6.1"
default-features = false

[dependencies.thiserror]
version = "1.0.64"
optional = true

[dependencies.tracing]
version = "0.1.37"
optional = true
default-features = true

[dependencies.w3f-bls]
version = "0.1.9"
optional = true
default-features = false

[dependencies.zeroize]
version = "1.7.0"
default-features = false

[dev-dependencies.criterion]
version = "0.5.1"
default-features = true

[dev-dependencies.regex]
version = "1.10.2"

[dev-dependencies.serde_json]
version = "1.0.132"
default-features = true

[target."cfg(not(substrate_runtime))".dependencies.dyn-clone]
version = "1.0.17"

[target."cfg(not(substrate_runtime))".dependencies.futures]
version = "0.3.30"
features = ["alloc"]
default-features = false

[target."cfg(not(substrate_runtime))".dependencies.sp-externalities]
version = "0.32.0"
default-features = false

[lints.clippy.all]
level = "allow"
priority = 0

[lints.clippy.bind_instead_of_map]
level = "allow"
priority = 2

[lints.clippy.borrowed-box]
level = "allow"
priority = 2

[lints.clippy.complexity]
level = "warn"
priority = 1

[lints.clippy.correctness]
level = "warn"
priority = 1

[lints.clippy.default_constructed_unit_structs]
level = "allow"
priority = 2

[lints.clippy.derivable_impls]
level = "allow"
priority = 2

[lints.clippy.eq_op]
level = "allow"
priority = 2

[lints.clippy.erasing_op]
level = "allow"
priority = 2

[lints.clippy.extra-unused-type-parameters]
level = "allow"
priority = 2

[lints.clippy.identity-op]
level = "allow"
priority = 2

[lints.clippy.if-same-then-else]
level = "allow"
priority = 2

[lints.clippy.needless-lifetimes]
level = "allow"
priority = 2

[lints.clippy.needless_option_as_deref]
level = "allow"
priority = 2

[lints.clippy.nonminimal-bool]
level = "allow"
priority = 2

[lints.clippy.option-map-unit-fn]
level = "allow"
priority = 2

[lints.clippy.stable_sort_primitive]
level = "allow"
priority = 2

[lints.clippy.too-many-arguments]
level = "allow"
priority = 2

[lints.clippy.type_complexity]
level = "allow"
priority = 2

[lints.clippy.unit_arg]
level = "allow"
priority = 2

[lints.clippy.unnecessary_cast]
level = "allow"
priority = 2

[lints.clippy.useless_conversion]
level = "allow"
priority = 2

[lints.clippy.while_immutable_condition]
level = "allow"
priority = 2

[lints.clippy.zero-prefixed-literal]
level = "allow"
priority = 2

[lints.rust.suspicious_double_ref_op]
level = "allow"
priority = 2

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    'cfg(build_opt_level, values("3"))',
    'cfg(build_profile, values("debug", "release"))',
    "cfg(enable_alloc_error_handler)",
    "cfg(fuzzing)",
    "cfg(ignore_flaky_test)",
    "cfg(revive_debug)",
    "cfg(substrate_runtime)",
]
