lsdk 0.1.1

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.1.1"
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",
    "recover",
]
hid = [
    "dep:hidapi",
    "dep:rawusb",
]
hsm = [
    "serde",
    "dep:serde",
    "dep:serde_json",
    "dep:rsurl",
]
loader = ["scp"]
manager = [
    "manager-api",
    "hsm",
]
manager-api = [
    "dep:rsurl",
    "dep:serde",
    "dep:serde_json",
    "serde",
]
recover = [
    "scp",
    "dep:num-bigint",
    "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",
    "recover",
    "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.rsurl]
version = "0.1.22"
features = [
    "purecrypto-tls",
    "json",
    "tokio-rt",
]
optional = true
default-features = false

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

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

[target.'cfg(target_arch = "wasm32")'.dependencies.rsurl]
version = "0.1.22"
features = ["json"]
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

[target.'cfg(target_os = "linux")'.dependencies.rawusb]
version = "0.1.7"
optional = true

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