[package]
name = "sui-sdk-types"
version = "0.0.8"
authors = ["Brandon Williams <brandon@mystenlabs.com>"]
repository = "https://github.com/mystenlabs/sui-rust-sdk/"
license = "Apache-2.0"
edition = "2021"
readme = "README.md"
description = "Core types for the Sui Sdk"

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg=doc_cfg -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open
all-features = true
rustdoc-args = [
    # Enable doc_cfg showing the required features.
    "--cfg=doc_cfg",

    # Generate links to definition in rustdoc source code pages
    # https://github.com/rust-lang/rust/pull/84176
    "-Zunstable-options", "--generate-link-to-definition"
]

[features]
default = []
serde = ["dep:serde", "dep:serde_derive", "dep:serde_with", "dep:bcs", "dep:serde_json", "roaring/std", "dep:itertools"]
rand = ["dep:rand_core"]
hash = ["dep:blake2"]
proptest = ["dep:proptest", "dep:test-strategy", "serde"]

[dependencies]
base64ct = { version = "1.6.0", features = ["alloc"] }
bnum = "0.12.0"
bs58 = "0.5.1"
bytes = { version = "1", default-features = false }
bytestring = { version = "1", default-features = false }
roaring = { version = "0.10.9", default-features = false }
winnow = "0.7"

# Serialization and Deserialization support
serde = { version = "1.0.210", optional = true }
serde_derive = { version = "1.0.210", optional = true }
serde_with = { version = "3.9", default-features = false, features = ["alloc"], optional = true }
bcs = { version = "0.1.6", optional = true }
serde_json = { version = "1.0.128", optional = true }
itertools = { version = "0.13.0", optional = true }

# RNG support
rand_core = { version = "0.6.4", optional = true }

# Hash support
blake2 = { version = "0.10.6", optional = true }

# proptest support
proptest = { version = "1.6.0", default-features = false, features = ["std"], optional = true }
test-strategy = { version = "0.4", optional = true }

[dev-dependencies]
bcs = "0.1.6"
serde_json = "1.0.128"
num-bigint = "0.4.6"
paste = "1.0.15"

[target.wasm32-unknown-unknown.dev-dependencies]
wasm-bindgen-test = "0.3"
getrandom = { version = "0.3", features = ["wasm_js"] }
test-strategy = "=0.4.1"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }
