[package]
edition = "2024"
rust-version = "1.85"
name = "metaflux-client"
version = "0.9.0"
authors = ["MTF Exchange contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for the MetaFlux derivatives L1 — REST + WebSocket, EIP-712 signing, and typed builders for the full signed-action surface (orders, TWAP, margin, vaults, staking, spot/Earn)."
homepage = "https://github.com/mtf-exchange/metaflux-client-rust"
documentation = "https://docs.rs/metaflux-client"
readme = "README.md"
keywords = [
"metaflux",
"mtf",
"crypto",
"perpetuals",
"sdk",
]
categories = [
"api-bindings",
"cryptography::cryptocurrencies",
]
license = "MIT"
repository = "https://github.com/mtf-exchange/metaflux-client-rust"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
cli = ["dep:clap"]
default = ["cli"]
[lib]
name = "metaflux_client"
path = "src/lib.rs"
[[bin]]
name = "mip3-deploy"
path = "src/bin/mip3-deploy.rs"
required-features = ["cli"]
[[example]]
name = "create_vault"
path = "examples/create_vault.rs"
[[example]]
name = "cross_fill"
path = "examples/cross_fill.rs"
[[example]]
name = "devnet_market_maker"
path = "examples/devnet_market_maker.rs"
[[example]]
name = "e2e_fill"
path = "examples/e2e_fill.rs"
[[example]]
name = "fund_evm_gas"
path = "examples/fund_evm_gas.rs"
[[example]]
name = "mip3_full_deploy"
path = "examples/mip3_full_deploy.rs"
[[example]]
name = "stream_trades"
path = "examples/stream_trades.rs"
[[example]]
name = "submit_limit_order"
path = "examples/submit_limit_order.rs"
[[test]]
name = "faucet_mock"
path = "tests/faucet_mock.rs"
[[test]]
name = "mip3_builder"
path = "tests/mip3_builder.rs"
[[test]]
name = "mip3_cli"
path = "tests/mip3_cli.rs"
[[test]]
name = "native_signing_xcheck"
path = "tests/native_signing_xcheck.rs"
[[test]]
name = "rest_exchange_mock"
path = "tests/rest_exchange_mock.rs"
[[test]]
name = "rest_info_mock"
path = "tests/rest_info_mock.rs"
[[test]]
name = "typed_signing_kat"
path = "tests/typed_signing_kat.rs"
[[test]]
name = "wallet_eip712"
path = "tests/wallet_eip712.rs"
[[test]]
name = "ws_post"
path = "tests/ws_post.rs"
[[test]]
name = "ws_reconnect"
path = "tests/ws_reconnect.rs"
[dependencies.bytes]
version = "1"
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true
[dependencies.futures-util]
version = "0.3"
[dependencies.hex]
version = "0.4"
[dependencies.k256]
version = "0.13"
features = [
"ecdsa",
"sha256",
]
[dependencies.reqwest]
version = "0.12"
features = [
"json",
"rustls-tls",
]
default-features = false
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.tiny-keccak]
version = "2"
features = ["keccak"]
[dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
"sync",
]
[dependencies.tokio-tungstenite]
version = "0.24"
features = ["rustls-tls-native-roots"]
[dependencies.tracing]
version = "0.1"
[dev-dependencies.assert_cmd]
version = "2"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
"sync",
"test-util",
"time",
"net",
]
[dev-dependencies.tokio-test]
version = "0.4"
[dev-dependencies.wiremock]
version = "0.6"
[lints.clippy]
float_arithmetic = "deny"
manual_let_else = "warn"
needless_return = "warn"
redundant_clone = "warn"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
unsafe_code = "forbid"