[package]
name = "tig-utils"
version = "0.1.0"
readme = "README.md"
license = "https://github.com/tig-foundation/tig-monorepo/tree/main/docs/agreements/end_user_license_agreement.pdf"
authors.workspace = true
repository.workspace = true
edition.workspace = true

[dependencies]
anyhow = "1.0.81"
base64 = "0.22.0"
blake3 = "1.5.4"
flate2 = "1.0.28"
hex = "0.4.3"
js-sys = { version = "0.3.68", optional = true }
rand = { version = "0.8.5", default-features = false, features = ["std_rng"] }
reqwest = { version = "0.12.2", optional = true }
serde = { version = "1.0.196", features = ["derive"] }
serde_json = { version = "1.0.113", features = ["preserve_order"] }
uint = "0.9.5"
wasm-bindgen = { version = "0.2.91", optional = true }
wasm-bindgen-futures = { version = "0.4.41", optional = true }
web3 = { version = "0.19.0", optional = true }
web-sys = { version = "0.3.68", optional = true, features = [
    'Headers',
    'Request',
    'RequestInit',
    'RequestMode',
    'Response',
    'Window',
] }

[dev-dependencies]
tokio = { version = "1.37.0", features = ["full"] }

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

[features]
default = []
web3 = ["dep:web3"]
request = ["dep:reqwest"]
request-js = [
    "dep:wasm-bindgen",
    "dep:js-sys",
    "dep:wasm-bindgen-futures",
    "dep:web-sys",
]
