[package]
name = "soroban-sdk"
description = "Soroban SDK."
homepage = "https://github.com/stellar/rs-soroban-sdk"
repository = "https://github.com/stellar/rs-soroban-sdk"
authors = ["Stellar Development Foundation <info@stellar.org>"]
readme = "README.md"
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version.workspace = true

exclude = ["test_snapshots/", "src/tests/"]

[lib]
doctest = false

[build-dependencies]
rustc_version = "0.4.1"
crate-git-revision = "0.0.6"

[dependencies]
soroban-sdk-macros = { workspace = true }
stellar-strkey = { workspace = true }
bytes-lit = "0.0.5"
visibility = "0.1.1"

[target.'cfg(target_family="wasm")'.dependencies]
soroban-env-guest = { workspace = true }

[target.'cfg(not(target_family="wasm"))'.dependencies]
soroban-env-host = { workspace = true, features = [] }
soroban-ledger-snapshot = { workspace = true, optional = true }
stellar-strkey = { workspace = true }
arbitrary = { version = "~1.3.0", features = ["derive"], optional = true }
derive_arbitrary = { version = "~1.3.0", optional = true }
serde = { version = "1.0.0", features = ["derive"] }
serde_json = "1.0.0"
ed25519-dalek = { version = "2.1.1", features = ["rand_core"], optional = true }
curve25519-dalek = { version = "4.1.3", features = ["digest"], optional = true }
# match the version of rand used in dalek
rand = "0.8.5"
ctor = { version = "0.5.0", optional = true }

[dev-dependencies]
soroban-sdk-macros = { workspace = true, features = ["testutils"] }
soroban-env-host = { workspace = true, features = ["testutils"] }
soroban-ledger-snapshot = { workspace = true, features = ["testutils"] }
stellar-xdr = { workspace = true, features = ["curr", "std"] }
soroban-spec = { workspace = true }
ed25519-dalek = "2.0.0"
rand = "0.8.5"
ctor = "0.5.0"
hex = "0.4.3"
arbitrary = { version = "~1.3.0", features = ["derive"] }
derive_arbitrary = { version = "~1.3.0" }
proptest = "1.2.0"
proptest-arbitrary-interop = "0.1.0"
libfuzzer-sys = "0.4.7"
expect-test = "1.4.1"
sha2 = "0.10.7"
ark-bn254 = { version = "0.5", default-features = false, features = ["curve"] }
ark-bls12-381 = { version = "0.5", default-features = false, features = ["curve"] }
ark-ff = { version = "0.5", default-features = false }

[features]
alloc = []
testutils = ["soroban-sdk-macros/testutils", "soroban-env-host/testutils", "soroban-ledger-snapshot/testutils", "dep:ed25519-dalek", "dep:arbitrary", "dep:derive_arbitrary", "dep:ctor", "dep:soroban-ledger-snapshot"]
experimental_spec_shaking_v2 = ["soroban-sdk-macros/experimental_spec_shaking_v2"]
docs = []

# Umbrella feature that enables all hazmat sub-features (backwards compatible)
hazmat = [
  "hazmat-crypto",
  "hazmat-address",
]

# Granular hazmat features
hazmat-crypto = []
hazmat-address = []

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