-
Notifications
You must be signed in to change notification settings - Fork 11
/
Cargo.toml
122 lines (104 loc) · 3.58 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[package]
name = "bitbox-api"
authors = ["Marko Bencun <benma@bitbox.swiss>"]
version = "0.6.0"
homepage = "https://bitbox.swiss/"
repository = "https://github.com/BitBoxSwiss/bitbox-api-rs/"
readme = "README-rust.md"
edition = "2021"
license = "Apache-2.0"
description = "A library to interact with the BitBox02 hardware wallet"
keywords = ["bitbox", "api", "bitcoin", "wasm"]
categories = ["api-bindings", "cryptography"]
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
async-trait = "0.1.68"
base32 = "0.4"
bitcoin = { version = "0.32", features = ["base64"] }
byteorder = "1.3.2"
getrandom = { version = "0.2" }
hex = { version = "0.4" }
noise-protocol = "0.2"
noise-rust-crypto = "0.6"
num-bigint = "0.4"
# If you change this, also change the version of prost-build in scripts/build-protos.rs
# and run `make build-protos`.
prost = "0.13"
semver = "1.0.17"
serde_json = { version = "1.0" }
thiserror = "1.0"
zeroize = "1"
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
enum-assoc = { version = "1.1.0", optional = true }
hidapi = { version = "2.3", optional = true }
js-sys = { version = "0.3.64", optional = true }
rlp = { version = "0.5", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = { version = "0.6.5", optional = true }
tokio = { version = "1", optional = true, features = ["time"] }
wasm-bindgen = { version = "0.2.92", optional = true }
wasm-bindgen-futures = { version ="0.4.42", optional = true }
web-sys = { version = "0.3.64", features = ["Storage", "Window"], optional = true }
[dev-dependencies]
async-trait = "0.1.68"
wasm-bindgen-test = "0.3.42"
tokio = { version = "1", features = ["time", "macros", "rt", "fs"] }
reqwest = "0.12"
url = "2.5"
# Enable this to be able to get coverage using `cargo tarpaulin --features=simulator,tokio --out=Html` without compilation error.
# See https://github.com/rust-bitcoin/rust-bitcoinconsensus/pull/94
# bitcoinconsensus = { git = "https://github.com/rust-bitcoin/rust-bitcoinconsensus.git", rev = "788ce4d210f7fe6fae4414f5be80968216ba0fd8", default-features = false }
bitcoinconsensus = { version = "0.106.0", default-features = false }
miniscript = "12.0.0"
[build-dependencies]
prost-build = { version = "0.11" }
[[example]]
name = "singlethreaded"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[[example]]
name = "multithreaded"
required-features = ["usb", "tokio/rt", "tokio/macros", "tokio/rt-multi-thread", "multithreaded"]
[[example]]
name = "btc_signtx"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[[example]]
name = "btc_sign_psbt"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[[example]]
name = "btc_sign_msg"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[[example]]
name = "btc_miniscript"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[[example]]
name = "eth"
required-features = ["usb", "tokio/rt", "tokio/macros", "rlp"]
[[example]]
name = "cardano"
required-features = ["usb", "tokio/rt", "tokio/macros"]
[profile.release]
# Reduce wasm binary size.
opt-level = 'z'
codegen-units = 1
lto = true
[features]
# Implement Sync+Send for PairedBitBox and PairingBitBox.
# This may or may not cause trouble on macOS, see: https://github.com/libusb/hidapi/issues/503
multithreaded = []
usb = ["dep:hidapi"]
simulator = []
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",
# Reduces the secp256k1 precompute table to decrease the WASM binary
# size significantly.
"bitcoin/secp-lowmemory",
]