# 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 = "2024"
rust-version = "1.88"
name = "celestia-rpc"
version = "1.0.0"
authors = ["Celestia <contact@celestia.org>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A collection of traits for interacting with Celestia data availability nodes RPC"
homepage = "https://www.celestia.org"
readme = "README.md"
keywords = [
    "blockchain",
    "celestia",
    "lumina",
]
categories = [
    "api-bindings",
    "asynchronous",
    "encoding",
    "cryptography::cryptocurrencies",
]
license = "Apache-2.0"
repository = "https://github.com/celestiaorg/lumina"
resolver = "2"

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

[features]
default = ["p2p"]
p2p = [
    "dep:libp2p-identity",
    "dep:multiaddr",
]
wasm-bindgen = [
    "celestia-types/wasm-bindgen",
    "jsonrpsee/wasm-client",
]

[lib]
name = "celestia_rpc"
path = "src/lib.rs"

[[test]]
name = "auth_token"
path = "tests/auth_token.rs"

[[test]]
name = "blob"
path = "tests/blob.rs"

[[test]]
name = "blobstream"
path = "tests/blobstream.rs"

[[test]]
name = "das"
path = "tests/das.rs"

[[test]]
name = "header"
path = "tests/header.rs"

[[test]]
name = "p2p"
path = "tests/p2p.rs"

[[test]]
name = "share"
path = "tests/share.rs"

[[test]]
name = "state"
path = "tests/state.rs"

[dependencies.async-stream]
version = "0.3.5"

[dependencies.base64]
version = "0.22.1"

[dependencies.celestia-proto]
version = "=1.0.0"

[dependencies.celestia-types]
version = "=1.0.0"
default-features = false

[dependencies.futures-util]
version = "0.3"

[dependencies.jsonrpsee]
version = "0.26"
features = [
    "client-core",
    "macros",
    "server-core",
]

[dependencies.libp2p-identity]
version = "0.2.12"
optional = true

[dependencies.multiaddr]
version = "0.18.1"
optional = true

[dependencies.serde]
version = "1.0.194"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.142"

[dependencies.serde_repr]
version = "0.1.17"

[dependencies.tendermint-proto]
version = "0.40.3"

[dependencies.thiserror]
version = "2.0.3"

[dependencies.tracing]
version = "0.1.41"

[dev-dependencies.anyhow]
version = "1.0.40"

[dev-dependencies.lumina-utils]
version = "=1.0.0"
features = [
    "test-utils",
    "time",
]

[dev-dependencies.nmt-rs]
version = "0.2.2"

[dev-dependencies.rand]
version = "0.8.5"

[dev-dependencies.tokio]
version = "1.49.0"
features = ["sync"]

[dev-dependencies.tracing]
version = "0.1.41"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.http]
version = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.jsonrpsee]
version = "0.26"
features = [
    "http-client",
    "ws-client",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.49.0"
features = ["sync"]

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.dotenvy]
version = "0.15"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.libp2p]
version = "0.56"
features = [
    "tokio",
    "macros",
    "tcp",
    "noise",
    "yamux",
]

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tokio]
version = "1.49.0"
features = [
    "rt",
    "macros",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom_03]
version = "0.3.4"
features = ["wasm_js"]
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dependencies.gloo-net]
version = "0.6"
features = [
    "http",
    "json",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.gloo-timers]
version = "0.3"
features = ["futures"]

[target.'cfg(target_arch = "wasm32")'.dependencies.send_wrapper]
version = "0.6"
features = ["futures"]

[target.'cfg(target_arch = "wasm32")'.dependencies.serde_json]
version = "1.0.142"

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.70"
features = [
    "console",
    "AbortController",
    "AbortSignal",
]

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.getrandom_02]
version = "0.2.10"
features = ["js"]
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.getrandom_03]
version = "0.3.4"
features = ["wasm_js"]
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.rust-embed]
version = "8"
features = [
    "debug-embed",
    "include-exclude",
    "interpolate-folder-path",
]

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3"
