[package]
name         = "ibc-types-core-commitment"
version      = "0.12.1"
edition      = "2021"
license      = "Apache-2.0"
readme       = "../../README.md"
keywords     = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"]
repository   = "https://github.com/penumbra-zone/ibc-types"
authors      = ["Penumbra Labs <team@penumbralabs.xyz"]
rust-version = "1.60"
description  = """
    Data types for the Inter-Blockchain Communication (IBC) protocol.
    This crate defines common data structures that can be reused by different IBC implementations or ecosystem tooling.
"""
# Not publishing to crates.io yet; will iterate quickly via git deps.
publish	= true
[package.metadata.docs.rs]
all-features = true

[features]
default = ["std"]
std = [ 
    "ibc-types-timestamp/std",
    "ibc-types-identifier/std",
    "ibc-proto/std",
    "ics23/std",
    "serde/std",
    "serde_json/std",
    "erased-serde/std",
    "tracing/std",
    "prost/std",
    "bytes/std",
    "subtle-encoding/std",
    "sha2/std",
    "displaydoc/std",
    "num-traits/std",
    "uint/std",
    "primitive-types/std",
    "tendermint/clock",
    "tendermint/std",
    "hex/std",
]
parity-scale-codec = ["dep:parity-scale-codec", "dep:scale-info"]
borsh = ["dep:borsh"]

# This feature is required for token transfer (ICS-20)
with_serde = ["serde", "serde_derive", "serde_json", "erased-serde"]

# This feature guards the unfinished implementation of the `UpgradeClient` handler.
upgrade_client = []

# This feature grants access to development-time mocking libraries, such as `MockContext` or `MockHeader`.
# Depends on the `testgen` suite for generating Tendermint light blocks.
mocks = ["tendermint-testgen", "tendermint/clock", "cfg-if", "parking_lot"]
mocks-no-std = ["cfg-if"]

[dependencies]
ibc-types-timestamp = { version = "0.12.1", path = "../ibc-types-timestamp", default-features = false }
ibc-types-identifier = { version = "0.12.1", path = "../ibc-types-identifier", default-features = false }
ibc-types-domain-type = { version = "0.12.1", path = "../ibc-types-domain-type", default-features = false }
# Proto definitions for all IBC-related interfaces, e.g., connections or channels.
ibc-proto = { version = "0.41.0", default-features = false }
ics23 = { version = "0.11.3", default-features = false, features = ["host-functions"] }
time = { version = "0.3", default-features = false }
serde_derive = { version = "1.0.104", default-features = false, optional = true }
serde = { version = "1.0", default-features = false, optional = true }
serde_json = { version = "1", default-features = false, optional = true }
erased-serde = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
tracing = { version = "0.1.36", default-features = false }
prost = { version = "0.12", default-features = false }
bytes = { version = "1.2.1", default-features = false }
safe-regex = { version = "0.2.5", default-features = false }
subtle-encoding = { version = "0.5", default-features = false }
sha2 = { version = "0.10.6", default-features = false }
displaydoc = { version = "0.2", default-features = false }
num-traits = { version = "0.2.15", default-features = false }
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display"] }
uint = { version = "0.9", default-features = false }
primitive-types = { version = "0.12.1", default-features = false, features = ["serde_no_std"] }
dyn-clone = "1.0.8"
## for codec encode or decode
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["full"], optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"], optional = true }
## for borsh encode or decode
borsh = {version = "0.10.0", default-features = false, optional = true }
parking_lot = { version = "0.12.1", default-features = false, optional = true }
cfg-if = { version = "1.0.0", optional = true }
anyhow = "1"
hex = { version = "0.4.3", default-features = false }

[dependencies.tendermint]
version = "0.34.0"
default-features = false

[dependencies.tendermint-proto]
version = "0.34.0"
default-features = false

[dependencies.tendermint-light-client-verifier]
version = "0.34.0"
default-features = false
features = ["rust-crypto"]

[dependencies.tendermint-testgen]
version = "0.34.0"
optional = true
default-features = false

[dev-dependencies]
env_logger = "0.10.0"
rstest = "0.16.0"
tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"]}
test-log = { version = "0.2.10", features = ["trace"] }
tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] }
tendermint-testgen = { version = "0.34.0" } # Needed for generating (synthetic) light blocks.
parking_lot = { version = "0.12.1" }
cfg-if = { version = "1.0.0" }

