[package]
name = "ln-types"
version = "0.2.1"
authors = ["Martin Habovstiak <martin.habovstiak@gmail.com>"]
edition = "2018"
description = "Common types related to Lightning Network"
rust-version = "1.56.0"
repository = "https://github.com/LNP-BP/ln-types"
readme = "README.md"
keywords = ["lightning", "network", "newtypes"]
categories = ["cryptography::cryptocurrencies", "encoding", "rust-patterns", "value-formatting"]
license = "MITNFA"

[package.metadata.docs.rs]
features = ["serde", "node_pubkey_verify", "node_pubkey_recovery", "bitcoin-units/serde", "postgres-types", "parse_arg", "slog"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["std"]
std = ["alloc"]
alloc = []
postgres-types = ["postgres-types-real", "bytes", "std"]
node_pubkey_verify = ["secp256k1/hashes"]
node_pubkey_recovery = ["node_pubkey_verify", "secp256k1/recovery"]
secp256k1_std = ["secp256k1/std", "std"]
serde_alloc = ["alloc", "serde/alloc"]
slog_std = ["std", "slog/std"]

[dependencies]
hex-conservative = { version = "0.2.1", default-features = false, optional = true }
serde = { version = "1.0.130", optional = true, default-features = false }
# Warning: don't depend on this as a feature!
postgres-types-real = { package = "postgres-types", version = "0.2.2", optional = true }
parse_arg = { version = "0.1.4", optional = true }
bitcoin-units = { version = "0.1.2", optional = true, default-features = false }
secp256k1 = { version = "0.29.0", optional = true, default-features = false, features = ["alloc"] }
slog = { version = "2.7.0", optional = true, default-features = false }

# Warning: don't depend on this as a feature!
bytes = { version = "1.1.0", optional = true }
