# 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.88"
name = "af-iperps"
version = "0.46.3"
authors = ["Aftermath Finance <admin@aftermath.finance>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Move types for the `Perpetuals` 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"]

[features]
graphql = [
    "dep:async-stream",
    "dep:cynic",
    "dep:enum-as-inner",
    "dep:futures",
    "dep:graphql-extract",
    "dep:sui-gql-client",
    "dep:sui-gql-schema",
    "sui-gql-schema/build",
]
stop-orders = ["dep:fastcrypto"]

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

[[example]]
name = "all-orders-concurrently"
path = "examples/fetch/all_orders_concurrently.rs"
required-features = ["graphql"]

[[example]]
name = "cancel-orders"
path = "examples/ptb/cancel_orders.rs"
required-features = ["graphql"]

[[example]]
name = "clearing-house-orders"
path = "examples/fetch/clearing_house_orders.rs"
required-features = ["graphql"]

[[example]]
name = "clearing-house-positions"
path = "examples/fetch/clearing_house_positions.rs"
required-features = ["graphql"]

[[example]]
name = "clearing-house-vault"
path = "examples/fetch/clearing_house_vault.rs"
required-features = ["graphql"]

[[example]]
name = "create-account"
path = "examples/ptb/create_account.rs"
required-features = ["graphql"]

[[example]]
name = "deposit-collateral"
path = "examples/ptb/deposit_collateral.rs"
required-features = ["graphql"]

[[example]]
name = "map-orders"
path = "examples/fetch/map_orders.rs"
required-features = ["graphql"]

[[example]]
name = "order-maps"
path = "examples/fetch/order_maps.rs"
required-features = ["graphql"]

[[example]]
name = "place-orders"
path = "examples/ptb/place_orders.rs"
required-features = ["graphql"]

[[example]]
name = "withdraw-collateral"
path = "examples/ptb/withdraw_collateral.rs"
required-features = ["graphql"]

[dependencies.af-move-type]
version = "0.19.1"

[dependencies.af-sui-pkg-sdk]
version = "0.15.3"

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

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

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

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

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

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

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

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

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

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

[dependencies.move-stdlib-sdk]
version = "0.16.3"

[dependencies.num-traits]
version = "0.2"

[dependencies.num_enum]
version = "0.7"

[dependencies.remain]
version = "0.2"

[dependencies.serde]
version = "1"

[dependencies.strum]
version = "0.28"
features = ["derive"]

[dependencies.sui-framework-sdk]
version = "0.17.3"

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

[dependencies.sui-sdk-types]
version = "0.3"

[dependencies.thiserror]
version = "2"

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

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

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

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

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

[dev-dependencies.num_enum]
version = "0.7"

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

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

[dev-dependencies.rgb]
version = "0.8"

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

[dev-dependencies.textplots]
version = "0.8"

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

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

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

[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"
