# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "sui-jsonrpc"
version = "0.22.0"
authors = ["Aftermath Finance <admin@aftermath.finance>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Light-weight Sui JSON-RPC client by Aftermath Finance"
readme = "README.md"
categories = ["cryptography::cryptocurrencies"]
license = "Apache-2.0"
repository = "https://github.com/AftermathFinance/aftermath-sdk-rust"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--generate-link-to-definition",
    "-Zunstable-options",
]

[features]
client = [
    "client-api",
    "dep:async-stream",
    "dep:futures-core",
    "dep:futures-util",
    "dep:http",
    "dep:jsonrpsee-http-client",
    "jsonrpsee/ws-client",
]
client-api = [
    "dep:extension-traits",
    "dep:jsonrpsee-core",
    "dep:jsonrpsee-types",
    "jsonrpsee/client-core",
    "jsonrpsee/macros",
]
default = ["client"]

[lib]
name = "sui_jsonrpc"
path = "src/lib.rs"

[[example]]
name = "jrpc-get-chain-id"
path = "examples/get_chain_identifier.rs"
required-features = ["client"]

[[example]]
name = "jrpc-get-df"
path = "examples/get_dynamic_field_object.rs"
required-features = ["client"]

[[example]]
name = "jrpc-get-dfs"
path = "examples/get_dynamic_fields.rs"
required-features = ["client"]

[[example]]
name = "jrpc-get-object"
path = "examples/get_object.rs"
required-features = ["client"]

[dependencies.async-stream]
version = "0.3"
optional = true

[dependencies.base64ct]
version = "1"

[dependencies.bcs]
version = "0.1"

[dependencies.bs58]
version = "0.5"

[dependencies.colored]
version = "3"

[dependencies.derive_more]
version = "2"
features = ["from"]

[dependencies.enum_dispatch]
version = "0.3"

[dependencies.extension-traits]
version = "2"
optional = true

[dependencies.futures-core]
version = "0.3"
optional = true
public = true

[dependencies.futures-util]
version = "0.3"
optional = true

[dependencies.http]
version = "1"
optional = true

[dependencies.itertools]
version = "0.14"

[dependencies.json_to_table]
version = "0.6"

[dependencies.jsonrpsee]
version = "0.26"
optional = true

[dependencies.jsonrpsee-core]
version = "0.26"
optional = true
public = true

[dependencies.jsonrpsee-http-client]
version = "0.26"
optional = true
public = true

[dependencies.jsonrpsee-types]
version = "0.26"
optional = true
public = true

[dependencies.regex]
version = "1"

[dependencies.rustversion]
version = "1"

[dependencies.serde]
version = "1"
public = true

[dependencies.serde_json]
version = "1"
public = true

[dependencies.serde_with]
version = "3"
features = ["base64"]

[dependencies.sui-sdk-types]
version = "0.0.8"
features = [
    "hash",
    "serde",
]
public = true

[dependencies.tabled]
version = "0.12"

[dependencies.thiserror]
version = "2"

[dev-dependencies.color-eyre]
version = "0.6"

[dev-dependencies.futures]
version = "0.3"

[dev-dependencies.tokio]
version = "1"
features = ["full"]

[lints.clippy]
double_parens = "allow"
todo = "warn"
uninlined_format_args = "allow"
unwrap_used = "warn"

[lints.clippy.nursery]
level = "warn"
priority = 1

[lints.clippy.redundant_pub_crate]
level = "allow"
priority = 2

[lints.rust]
exported_private_dependencies = "allow"
