[package]
name = "serai-processor"
version = "0.1.0"
description = "Multichain processor premised on canonicity to reach distributed consensus automatically"
license = "AGPL-3.0-only"
repository = "https://github.com/serai-dex/serai/tree/develop/processor"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
keywords = []
edition = "2021"
publish = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
# Macros
async-trait = "0.1"
lazy_static = "1"
zeroize = "1"
thiserror = "1"
serde = { version = "1", default-features = false, features = ["derive"] }

# Libs
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
rand_chacha = { version = "0.3", default-features = false }

# Encoders
hex = "0.4"
scale = { package = "parity-scale-codec", version = "3" }
bincode = { version = "1", default-features = false }
serde_json = { version = "1", default-features = false }

# Cryptography
ciphersuite = { path = "../crypto/ciphersuite", default-features = false, features = ["ristretto"] }

transcript = { package = "flexible-transcript", default-features = false, path = "../crypto/transcript" }
frost = { package = "modular-frost", path = "../crypto/frost", features = ["ristretto"] }
frost-schnorrkel = { path = "../crypto/schnorrkel" }

# Substrate
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }

# Bitcoin
secp256k1 = { version = "0.27", features = ["global-context", "rand-std"], optional = true }
k256 = { version = "^0.13.1", optional = true }
bitcoin-serai = { path = "../coins/bitcoin", optional = true }

# Monero
dalek-ff-group = { path = "../crypto/dalek-ff-group", optional = true }
monero-serai = { path = "../coins/monero", features = ["multisig"], optional = true }

# Application
log = "0.4"
env_logger = "0.10"
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] }

serai-db = { path = "../common/db", default-features = false, features = ["rocksdb"] }
serai-env = { path = "../common/env" }
serai-client = { path = "../substrate/client", default-features = false }

messages = { package = "serai-processor-messages", path = "./messages" }

message-queue = { package = "serai-message-queue", path = "../message-queue" }

[dev-dependencies]
futures = "0.3"

frost = { package = "modular-frost", path = "../crypto/frost", features = ["tests"] }

env_logger = "0.10"

[features]
secp256k1 = ["k256", "frost/secp256k1"]
bitcoin = ["dep:secp256k1", "secp256k1", "bitcoin-serai", "serai-client/bitcoin"]

ed25519 = ["dalek-ff-group", "frost/ed25519"]
monero = ["ed25519", "monero-serai", "serai-client/monero"]
