df-hyperliquid-core 0.0.9-beta

Hyperliquid SDK for Rust: markets, account, trading, transfers, earn and deploy, with exact decimals and signing. Native and wasm.
Documentation
# 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.94"
name = "df-hyperliquid-core"
version = "0.0.9-beta"
authors = ["Dennis Furrer"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Hyperliquid SDK for Rust: markets, account, trading, transfers, earn and deploy, with exact decimals and signing. Native and wasm."
homepage = "https://dfurrer.com"
readme = "README.md"
keywords = [
    "hyperliquid",
    "hyperevm",
    "perps",
    "trading",
    "sdk",
]
categories = [
    "api-bindings",
    "cryptography::cryptocurrencies",
    "wasm",
]
license = "BUSL-1.1"

[package.metadata.docs.rs]
all-features = true

[features]
default = [
    "sign",
    "native",
]
native = [
    "dep:reqwest",
    "dep:tokio",
    "dep:tokio-tungstenite",
    "dep:futures-util",
]
sign = [
    "dep:k256",
    "dep:zeroize",
    "dep:getrandom02",
]
web = [
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:js-sys",
    "dep:web-sys",
]

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

[[example]]
name = "market_order"
path = "examples/market_order.rs"
required-features = ["native"]

[[test]]
name = "conformance"
path = "tests/conformance/main.rs"

[[test]]
name = "live"
path = "tests/live/main.rs"

[[test]]
name = "mocked"
path = "tests/mocked/main.rs"

[dependencies.futures-util]
version = "0.3.34"
features = [
    "std",
    "sink",
]
optional = true
default-features = false

[dependencies.js-sys]
version = "0.3.106"
optional = true

[dependencies.k256]
version = "0.13.4"
features = ["ecdsa"]
optional = true

[dependencies.keccak]
version = "0.2.2"

[dependencies.reqwest]
version = "0.12.28"
features = [
    "rustls-tls",
    "http2",
]
optional = true
default-features = false

[dependencies.serde]
version = "1.0.229"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.151"
features = ["raw_value"]

[dependencies.thiserror]
version = "2.0.21"

[dependencies.tokio]
version = "1.53.1"
features = [
    "rt",
    "sync",
    "time",
    "macros",
    "net",
]
optional = true
default-features = false

[dependencies.tokio-tungstenite]
version = "0.29.0"
features = ["rustls-tls-webpki-roots"]
optional = true

[dependencies.wasm-bindgen]
version = "=0.2.129"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4.79"
optional = true

[dependencies.web-sys]
version = "0.3.106"
features = [
    "CloseEvent",
    "Headers",
    "MessageEvent",
    "RequestInit",
    "Response",
    "WebSocket",
]
optional = true

[dependencies.zeroize]
version = "1.9.0"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tokio]
version = "1.53.1"
features = [
    "macros",
    "rt-multi-thread",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom02]
version = "0.2.17"
features = ["js"]
optional = true
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "=0.3.79"

[lints.clippy]
dbg_macro = "deny"
expect_used = "deny"
float_arithmetic = "deny"
float_cmp = "warn"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"

[lints.rust]
unsafe_code = "forbid"
unsafe_op_in_unsafe_fn = "deny"
unused_must_use = "deny"