[package]
name = "reth-ethereum-primitives"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Ethereum primitive types"

[lints]
workspace = true

[dependencies]
# reth
reth-codecs = { workspace = true, optional = true }
reth-primitives-traits.workspace = true
reth-zstd-compressors = { workspace = true, optional = true }

# ethereum
alloy-evm.workspace = true
alloy-eips = { workspace = true, features = ["k256"] }
alloy-primitives.workspace = true
alloy-network = { workspace = true, optional = true }
alloy-consensus = { workspace = true, features = ["serde"] }
alloy-serde = { workspace = true, optional = true }
alloy-rlp.workspace = true
alloy-rpc-types-eth = { workspace = true, optional = true }
revm-context.workspace = true

# misc
arbitrary = { workspace = true, optional = true, features = ["derive"] }
derive_more.workspace = true
modular-bitfield = { workspace = true, optional = true }
rand = { workspace = true, optional = true }
secp256k1 = { workspace = true, optional = true, features = ["rand"] }
serde.workspace = true

[dev-dependencies]
arbitrary.workspace = true
bincode.workspace = true
proptest.workspace = true
proptest-arbitrary-interop.workspace = true
rand.workspace = true
reth-codecs = { workspace = true, features = ["test-utils"] }
reth-testing-utils.workspace = true
reth-zstd-compressors.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }
test-fuzz.workspace = true
alloy-consensus = { workspace = true, features = ["serde", "arbitrary"] }

[features]
default = ["std"]
test-utils = [
    "reth-codecs?/test-utils",
    "reth-primitives-traits/test-utils",
]
alloy-compat = ["dep:alloy-network", "dep:alloy-serde", "dep:alloy-rpc-types-eth"]
std = [
    "alloy-consensus/std",
    "alloy-primitives/std",
    "alloy-rlp/std",
    "reth-primitives-traits/std",
    "reth-zstd-compressors?/std",
    "serde/std",
    "alloy-eips/std",
    "derive_more/std",
    "secp256k1?/std",
    "alloy-serde?/std",
    "alloy-rpc-types-eth?/std",
    "revm-context/std",
    "alloy-evm/std",
]
reth-codec = [
    "std",
    "dep:reth-codecs",
    "dep:modular-bitfield",
    "dep:reth-zstd-compressors",
]
arbitrary = [
    "dep:arbitrary",
    "dep:rand",
    "dep:secp256k1",
    "alloy-consensus/arbitrary",
    "alloy-primitives/arbitrary",
    "reth-codecs?/arbitrary",
    "reth-primitives-traits/arbitrary",
    "alloy-eips/arbitrary",
    "alloy-serde?/arbitrary",
    "alloy-rpc-types-eth?/arbitrary",
]
serde-bincode-compat = [
    "alloy-consensus/serde-bincode-compat",
    "alloy-eips/serde-bincode-compat",
    "reth-primitives-traits/serde-bincode-compat",
]
