[package]
name         = "ibc-primitives"
version      = { workspace = true }
authors      = { workspace = true }
edition      = { workspace = true }
rust-version = { workspace = true }
license      = { workspace = true }
repository   = { workspace = true }
keywords     = [ "blockchain", "cosmos", "ibc" ]
readme       = "README.md"

description = """
    Maintained by `ibc-rs`, furnishes essential types and traits universally
    utilized in the implementation of diverse IBC modules, encompassing
    core functionalities, clients, and applications.
"""

[package.metadata.docs.rs]
all-features = true

[dependencies]
# external dependencies
borsh       = { workspace = true, optional = true }
derive_more = { workspace = true }
displaydoc  = { workspace = true }
prost       = { workspace = true }
schemars    = { workspace = true, optional = true }
serde       = { workspace = true, optional = true }
time        = { version = ">=0.3.0, <0.3.37", default-features = false }

# ibc dependencies
ibc-proto = { workspace = true }

# parity dependencies
parity-scale-codec = { workspace = true, optional = true }
scale-info         = { workspace = true, optional = true }

[dev-dependencies]
rstest     = { workspace = true }
serde-json = { workspace = true }

[features]
default = [ "std" ]
std = [
  "displaydoc/std",
  "prost/std",
  "serde/std",
  "ibc-proto/std",
  "time/std",
]
serde = [
  "dep:serde",
  "ibc-proto/serde",
]
schema = [
  "dep:schemars",
  "ibc-proto/json-schema",
  "serde",
  "std",
]
borsh = [
  "dep:borsh",
  "ibc-proto/borsh",
]
parity-scale-codec = [
  "dep:parity-scale-codec",
  "dep:scale-info",
  "ibc-proto/parity-scale-codec",
]
