lsdk 0.0.2

Rust SDK for hardware wallets speaking the BOLOS APDU protocol: HID/WebHID transport, device info, genuine check, app management, firmware updates and app signers
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.95"
name = "lsdk"
version = "0.0.2"
authors = ["Mark Karpeles"]
build = false
exclude = [
    "/web",
    "/.github",
    "/tests",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for hardware wallets speaking the BOLOS APDU protocol: HID/WebHID transport, device info, genuine check, app management, firmware updates and app signers"
homepage = "https://karpeleslab.github.io/lsdk/"
documentation = "https://docs.rs/lsdk"
readme = "README.md"
keywords = [
    "hardware-wallet",
    "hid",
    "webhid",
    "apdu",
    "bitcoin",
]
categories = [
    "cryptography::cryptocurrencies",
    "hardware-support",
    "wasm",
]
license = "MIT"
repository = "https://github.com/KarpelesLab/lsdk"

[package.metadata.docs.rs]
features = [
    "full",
    "serde",
]

[features]
apps = [
    "eth",
    "btc",
    "sol",
]
attestation = [
    "dep:purecrypto",
    "dep:js-sys",
    "dep:wasm-bindgen",
]
btc = [
    "dep:outscript",
    "outscript/bitcoin",
    "dep:purecrypto",
]
cli = [
    "full",
    "serde",
    "dep:clap",
    "tokio/rt",
    "tokio/macros",
]
default = ["hid"]
eth = [
    "dep:outscript",
    "outscript/evm",
    "dep:num-bigint",
]
full = [
    "hid",
    "manager",
    "apps",
    "attestation",
    "scp",
    "loader",
]
hid = ["dep:hidapi"]
hsm = [
    "serde",
    "dep:serde",
    "dep:serde_json",
    "dep:tokio-tungstenite",
    "dep:futures-util",
    "dep:tokio",
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:js-sys",
    "dep:web-sys",
    "dep:futures-channel",
]
loader = ["scp"]
manager = [
    "manager-api",
    "hsm",
]
manager-api = [
    "dep:reqwest",
    "dep:serde",
    "dep:serde_json",
    "serde",
]
scp = [
    "attestation",
    "purecrypto/cipher",
]
serde = ["dep:serde"]
sol = [
    "dep:outscript",
    "outscript/solana",
]
wasm = [
    "webhid",
    "manager",
    "apps",
    "attestation",
    "scp",
    "loader",
    "serde",
    "dep:serde-wasm-bindgen",
]
webhid = [
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:js-sys",
    "dep:web-sys",
    "dep:futures-channel",
    "dep:futures-util",
]

[lib]
name = "lsdk"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[bin]]
name = "lsdk"
path = "src/bin/lsdk.rs"
required-features = ["cli"]

[[example]]
name = "elfinfo"
path = "examples/elfinfo.rs"
required-features = ["loader"]

[dependencies.futures-channel]
version = "0.3.34"
optional = true

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

[dependencies.hex]
version = "0.4"

[dependencies.num-bigint]
version = "0.4"
optional = true

[dependencies.outscript]
version = "0.2.7"
features = ["std"]
optional = true
default-features = false

[dependencies.purecrypto]
version = "0.10"
features = [
    "std",
    "hash",
    "hazmat-secp256k1",
]
optional = true
default-features = false

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

[dependencies.serde_json]
version = "1.0.154"
optional = true

[dependencies.thiserror]
version = "2"

[dev-dependencies.tokio]
version = "1.54.1"
features = [
    "macros",
    "rt",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.clap]
version = "4"
features = ["derive"]
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.hidapi]
version = "2.6.7"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.reqwest]
version = "0.13.5"
features = [
    "json",
    "query",
    "rustls",
]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.54.1"
features = [
    "net",
    "time",
]
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio-tungstenite]
version = "0.30.0"
features = [
    "rustls-tls-webpki-roots",
    "connect",
]
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys]
version = "0.3.107"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.reqwest]
version = "0.13.5"
features = [
    "json",
    "query",
]
optional = true
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.serde-wasm-bindgen]
version = "0.6"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2.130"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4.80"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.107"
features = [
    "WebSocket",
    "MessageEvent",
    "CloseEvent",
    "Event",
    "BinaryType",
    "Window",
]
optional = true

[profile.release]
opt-level = "s"
lto = true