[package]
name = "darkfi_money_contract"
version = "0.5.0"
authors = ["Dyne.org foundation <foundation@dyne.org>"]
license = "AGPL-3.0-only"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
blake3 = "1.8.2"
bs58 = "0.5.1"
darkfi-sdk = { path = "../../sdk", features = ["wasm"] }
darkfi-serial = { version = "0.5.0", features = ["derive", "crypto"] }
thiserror = "2.0.17"

# The following dependencies are used for the client API and
# probably shouldn't be in WASM
darkfi = { path = "../../../", features = ["zk"], optional = true }
chacha20poly1305 = { version = "0.10.1", optional = true }
halo2_proofs = { version = "0.3.2", optional = true }
tracing = { version = "0.1.44", optional = true }
rand = { version = "0.8.5", optional = true }

# Misc
lazy_static = "1.5.0"

# These are used just for the integration tests
[dev-dependencies]
smol = "2.0.2"
darkfi-contract-test-harness = {path = "../test-harness"}

# We need to disable random using "custom" which makes the crate a noop
# so the wasm32-unknown-unknown target is enabled.
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.8", features = ["custom"] }
darkfi-sdk = { path = "../../sdk", features = ["wasm"] }

[features]
default = []
no-entrypoint = []
client = [
    "darkfi",
    "darkfi-serial/async",

    "rand",
    "chacha20poly1305",
    "tracing",
    "halo2_proofs",
]

[lints]
workspace = true
