[package]
edition = "2021"
name = "bitbox-api"
version = "0.12.0"
authors = ["Marko Bencun <benma@bitbox.swiss>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A library to interact with BitBox hardware wallets"
homepage = "https://bitbox.swiss/"
readme = "README-rust.md"
keywords = [
"bitbox",
"api",
"bitcoin",
"wasm",
]
categories = [
"api-bindings",
"cryptography",
]
license = "Apache-2.0"
repository = "https://github.com/BitBoxSwiss/bitbox-api-rs/"
[features]
multithreaded = []
simulator = []
usb = ["dep:hidapi"]
wasm = [
"dep:enum-assoc",
"dep:js-sys",
"dep:serde-wasm-bindgen",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:web-sys",
"getrandom/js",
"hex/serde",
"bitcoin/serde",
"bitcoin/secp-lowmemory",
]
[lib]
name = "bitbox_api"
crate-type = [
"cdylib",
"rlib",
]
path = "src/lib.rs"
[[example]]
name = "btc_miniscript"
path = "examples/btc_miniscript.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "btc_sign_msg"
path = "examples/btc_sign_msg.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "btc_sign_op_return"
path = "examples/btc_sign_op_return.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "btc_sign_psbt"
path = "examples/btc_sign_psbt.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "btc_signtx"
path = "examples/btc_signtx.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "cardano"
path = "examples/cardano.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[example]]
name = "eth"
path = "examples/eth.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
"rlp",
]
[[example]]
name = "multithreaded"
path = "examples/multithreaded.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
"tokio/rt-multi-thread",
"multithreaded",
]
[[example]]
name = "simulator"
path = "examples/simulator.rs"
required-features = [
"simulator",
"tokio/rt",
"tokio/macros",
"tokio/rt-multi-thread",
"multithreaded",
]
[[example]]
name = "singlethreaded"
path = "examples/singlethreaded.rs"
required-features = [
"usb",
"tokio/rt",
"tokio/macros",
]
[[test]]
name = "test_btc"
path = "tests/test_btc.rs"
[[test]]
name = "test_btc_psbt"
path = "tests/test_btc_psbt.rs"
[[test]]
name = "test_cardano"
path = "tests/test_cardano.rs"
[[test]]
name = "test_device"
path = "tests/test_device.rs"
[[test]]
name = "test_eth"
path = "tests/test_eth.rs"
[dependencies.async-trait]
version = "0.1.68"
[dependencies.base32]
version = "0.4"
[dependencies.bitcoin]
version = "0.32"
features = ["base64"]
[dependencies.byteorder]
version = "1.3.2"
[dependencies.chrono]
version = "0.4.38"
features = ["clock"]
default-features = false
[dependencies.enum-assoc]
version = "1.1.0"
optional = true
[dependencies.getrandom]
version = "0.2"
[dependencies.hex]
version = "0.4"
[dependencies.hidapi]
version = "2.3"
optional = true
[dependencies.js-sys]
version = "0.3.64"
optional = true
[dependencies.noise-protocol]
version = "0.2"
[dependencies.noise-rust-crypto]
version = "0.6"
[dependencies.num-bigint]
version = "0.4"
[dependencies.prost]
version = "0.13"
[dependencies.rlp]
version = "0.5"
optional = true
[dependencies.semver]
version = "1.0.17"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde-wasm-bindgen]
version = "0.6.5"
optional = true
[dependencies.serde_json]
version = "1.0"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
version = "1"
features = ["time"]
optional = true
[dependencies.wasm-bindgen]
version = "0.2.92"
optional = true
[dependencies.wasm-bindgen-futures]
version = "0.4.42"
optional = true
[dependencies.web-sys]
version = "0.3.64"
features = [
"Storage",
"Window",
]
optional = true
[dependencies.zeroize]
version = "1"
[dev-dependencies.async-trait]
version = "0.1.68"
[dev-dependencies.bitcoinconsensus]
version = "0.106.0"
default-features = false
[dev-dependencies.miniscript]
version = "12.0.0"
[dev-dependencies.reqwest]
version = "0.12"
[dev-dependencies.rlp]
version = "0.5"
[dev-dependencies.tiny-keccak]
version = "2.0"
features = ["keccak"]
[dev-dependencies.tokio]
version = "1"
features = [
"time",
"macros",
"rt",
"fs",
]
[dev-dependencies.url]
version = "2.5"
[dev-dependencies.wasm-bindgen-test]
version = "0.3.42"
[build-dependencies.prost-build]
version = "0.11"
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1