[package]
name = "tari_template_lib_types"
version = "0.24.0"
edition.workspace = true
authors.workspace = true
description = "Tari template library types"
repository.workspace = true
license.workspace = true

[features]
default = ["std"]
std = ["serde/std", "tari_template_abi/std", "borsh?/std", "num-integer?/std"]
alloc = ["serde/alloc", "tari_template_abi/alloc"]
precision = ["dep:bnum"]
extra-arith = ["dep:num-integer", "bnum?/numtraits"]
borsh = ["dep:borsh", "tari_bor/borsh", "bnum?/borsh"]
ts = ["std", "ts-rs", "tari_template_abi/ts", "tari_bor/ts"]
# This feature removes the ability to deserialize Amounts as an integer/string (using deserialize_any), as formats like bincode do not support this.
# DO NOT USE if authoring contracts/templates as this will force transactions to convert integers to Amounts in instruction calls to your template.
bincode-compat = []

[dependencies]
tari_template_abi = { workspace = true, default-features = false }
tari_bor = { workspace = true }

bnum = { workspace = true, optional = true }
num-integer = { workspace = true, optional = true, default-features = false }
borsh = { workspace = true, optional = true, default-features = false, features = ["derive"] }
serde = { workspace = true, default-features = false, features = ["derive"] }
ts-rs = { workspace = true, optional = true }

[dev-dependencies]
serde_json = { workspace = true }
bincode = { workspace = true, features = ["serde"] }
tari_crypto = { workspace = true, features = ["borsh"] }
borsh = { workspace = true }
