# 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 = "af-oracle"
version = "0.19.0"
authors = ["Aftermath Finance <admin@aftermath.finance>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Move types for Aftermath's `AfOracle` package"
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]
graphql = [
    "dep:async-stream",
    "dep:bcs",
    "dep:cynic",
    "dep:enum-as-inner",
    "dep:extension-traits",
    "dep:futures",
    "dep:graphql-extract",
    "dep:sui-gql-client",
    "dep:sui-gql-schema",
    "dep:trait-variant",
    "sui-gql-client/move-type",
    "sui-gql-client/queries",
    "sui-gql-schema/build",
]

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

[[example]]
name = "price-feed-for-source"
path = "examples/price_feed_for_source.rs"
required-features = ["graphql"]

[[example]]
name = "price-feeds"
path = "examples/price_feeds.rs"
required-features = ["graphql"]

[dependencies.af-move-type]
version = "0.10.0"
public = true

[dependencies.af-sui-pkg-sdk]
version = "0.10.0"
public = true

[dependencies.af-sui-types]
version = "0.10.0"

[dependencies.af-utilities]
version = "0.10.0"

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

[dependencies.bcs]
version = "0.1"
optional = true

[dependencies.cynic]
version = "3"
optional = true

[dependencies.derive_more]
version = "2"
features = [
    "display",
    "from",
    "is_variant",
    "try_into",
]

[dependencies.enum-as-inner]
version = "0.6"
optional = true

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

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

[dependencies.graphql-extract]
version = "0.0.8"
optional = true

[dependencies.remain]
version = "0.2"

[dependencies.serde]
version = "1"

[dependencies.serde_json]
version = "1"

[dependencies.sui-framework-sdk]
version = "0.12.0"
public = true

[dependencies.sui-gql-client]
version = "0.17.0"
optional = true
default-features = false
public = true

[dependencies.sui-sdk-types]
version = "0.0.4"
public = true

[dependencies.thiserror]
version = "2"

[dependencies.trait-variant]
version = "0.1"
optional = true

[dev-dependencies.clap]
version = "4"
features = ["derive"]

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

[dev-dependencies.indicatif]
version = "0.17"

[dev-dependencies.insta]
version = "1"

[dev-dependencies.reqwest]
version = "0.12"

[dev-dependencies.rustdoc-json]
version = "0.9.5"

[dev-dependencies.rustup-toolchain]
version = "0.1.10"

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

[dev-dependencies.tokio-test]
version = "0.4"

[build-dependencies.sui-gql-schema]
version = "0.11"
features = ["build"]
optional = true
default-features = false

[lints.clippy]
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
