[package]
description = "Aftermath's extensions to `sui-sdk-types`"
name        = "af-sui-types"
version     = "0.8.6"

authors.workspace      = true
categories.workspace   = true
edition.workspace      = true
license.workspace      = true
repository.workspace   = true
rust-version.workspace = true

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="-Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo +nightly doc --all-features --no-deps --open
all-features = true
rustdoc-args = [
  # Generate links to definition in rustdoc source code pages
  # https://github.com/rust-lang/rust/pull/84176
  "--generate-link-to-definition",
  "-Zunstable-options",
]

[lints]
workspace = true

[features]
fuzzing = ["dep:proptest"]
hash    = ["sui-sdk-types/hash"]
u256    = ["dep:primitive-types", "dep:rand", "dep:uint"]

[dependencies]
base64        = "0.22"
bcs           = "0.1"
bs58          = "0.5"
enum_dispatch = "0.3"
hex           = "0.4"
ref-cast      = "1"
serde         = "1"
serde_with    = { version = "3", features = ["base64"] }
sui-sdk-types = { version = "0.0.3", features = ["serde"] }
thiserror     = "2"

derive_more = { version = "2", features = ["from_str"] }

# for u256 (optional)
primitive-types = { version = "0.12", features = ["fp-conversion"], optional = true }
rand            = { version = "0.9", optional = true }
uint            = { version = "0.9", optional = true }

# for fuzzing tests (optional)
proptest = { version = "1", optional = true }

[dev-dependencies]
insta         = "1"
proptest      = "1"
serde_json    = "1"
sui-sdk-types = { version = "0.0.3", features = ["proptest"] }
test-strategy = "0.4"

[[test]]
name              = "bcs"
path              = "tests/bcs.rs"
required-features = ["hash"]
