[package]
name = "zebra-rpc"
version = "1.0.0-beta.30"
authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ZcashFoundation/zebra"
edition = "2021"

readme = "../README.md"
homepage = "https://zfnd.org/zebra/"
# crates.io is limited to 5 keywords and categories
keywords = ["zebra", "zcash"]
# Must be one of <https://crates.io/category_slugs>
categories = ["asynchronous", "cryptography::cryptocurrencies", "encoding", "network-programming"]

[features]
default = []

# Production features that activate extra dependencies, or extra features in dependencies

# Experimental mining RPC support
getblocktemplate-rpcs = [
    "rand",
    "zcash_address",
    "zebra-consensus/getblocktemplate-rpcs",
    "zebra-state/getblocktemplate-rpcs",
    "zebra-node-services/getblocktemplate-rpcs",
    "zebra-chain/getblocktemplate-rpcs",
]

# Test-only features
proptest-impl = [
    "proptest",
    "zebra-consensus/proptest-impl",
    "zebra-state/proptest-impl",
    "zebra-network/proptest-impl",
    "zebra-chain/proptest-impl",
]

[dependencies]
chrono = { version = "0.4.31", default-features = false, features = ["clock", "std"] }
futures = "0.3.28"

# lightwalletd sends JSON-RPC requests over HTTP 1.1
hyper = { version = "0.14.27", features = ["http1", "server"] }

jsonrpc-core = "18.0.0"
jsonrpc-derive = "18.0.0"
jsonrpc-http-server = "18.0.0"
num_cpus = "1.16.0"

# zebra-rpc needs the preserve_order feature in serde_json, which is a dependency of jsonrpc-core
serde_json = { version = "1.0.107", features = ["preserve_order"] }
indexmap = { version = "2.0.1", features = ["serde"] }

tokio = { version = "1.33.0", features = ["time", "rt-multi-thread", "macros", "tracing"] }
tower = "0.4.13"

tracing = "0.1.39"

hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.188", features = ["serde_derive"] }

# Experimental feature getblocktemplate-rpcs
rand = { version = "0.8.5", optional = true }
# ECC deps used by getblocktemplate-rpcs feature
zcash_address = { version = "0.3.0", optional = true }

# Test-only feature proptest-impl
proptest = { version = "1.3.1", optional = true }

zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.30", features = ["json-conversion"] }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.30" }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.30" }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.30" }
zebra-script = { path = "../zebra-script", version = "1.0.0-beta.30" }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.30" }

[dev-dependencies]
insta = { version = "1.33.0", features = ["redactions", "json", "ron"] }

proptest = "1.3.1"

thiserror = "1.0.48"
tokio = { version = "1.33.0", features = ["full", "tracing", "test-util"] }

zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
zebra-consensus = { path = "../zebra-consensus", features = ["proptest-impl"] }
zebra-network = { path = "../zebra-network", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }

zebra-test = { path = "../zebra-test" }
