Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions .github/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/deploy-sandbox.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,6 @@ jobs:
sudo apt-get install -y libudev-dev
./ci.sh

WASM:
name: WASM and Sandbox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: |
sudo apt-get update
sudo apt-get install -y clang jq
cargo install --force wasm-pack
make wasm
make build-sandbox

# Temporarily disabled; re-enable when we find a way to use the same protobuf compiler version
# in the developer docs and here, otherwise this check will often fail.
# Check-Protobufs:
Expand Down
17 changes: 6 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
# Repository Guidelines

This repo contains both a Rust library and a NPM library.
This repo contains the Rust BitBox02 client library.

## Versioning
- The Rust client version is in Cargo.toml. The changelog is in CHANGELOG-rust.md. The readme is in README-rust.md
- The NPM client version is in NPM_VERSION. The changelog is in CHANGELOG-npm.md. The readme is in README-npm.md.
- The client version is in Cargo.toml. The changelog is in CHANGELOG.md. The readme is in README.md.

## Project Structure & Module Organization
- `src/`: core Rust library (transport, protocol, coin-specific modules).
- `tests/`: integration tests; prefer adding new end-to-end flows here.
- `examples/`: runnable usage samples (`cargo run --example …`) for common flows.
- `messages/`: protobuf definitions; regenerated via `make build-protos`.
- `sandbox/`: browser demo for the WASM/JS API, used with WebHID.
- `scripts/`: build utilities (for example, protocol buffer generation).

## Build, Test, and Development Commands
- `cargo build` – build the Rust crate.
- `cargo test` – run unit and integration tests.
- `cargo fmt` – format Rust code using the repo’s `rustfmt` settings.
- `make build-protos` – regenerate Rust code from `messages/*.proto`.
- `make wasm` – build the WASM/JS package (`pkg/`) via `wasm-pack`.
- `make build-sandbox` - build the WebHID sandbox in `sandbox/`.
- `make run-sandbox` – start the WebHID sandbox in `sandbox/` for manual testing.

## Coding Style & Naming Conventions
- Rust edition 2021; rely on `cargo fmt` for formatting (4-space indents, standard rustfmt defaults).
Expand All @@ -32,12 +27,12 @@ This repo contains both a Rust library and a NPM library.
- Place integration tests in `tests/` and unit tests next to the code in `src/`.
- Name tests after the behavior under test (for example, `sign_psbt_roundtrip`).
- Run `cargo test` before opening a PR; for deeper changes, consider `cargo tarpaulin --features=simulator,tokio --out Html`.
- Check README-rust.md for how to run simulator tests.
- Check ./ci/ci.sh for how to run tests
- Check README.md for how to run simulator tests.
- Check ./ci.sh for how to run tests
- `cargo test` will output a lot of warnings, that is normal without the right features selected (see ci.sh). Don't attempt to fix them if not prompted to do so.

## Commit & Pull Request Guidelines
- Use short, focused commits; prefix with area when useful (for example, `btc: …`, `npm: …`, `tests: …`).
- Use short, focused commits; prefix with area when useful (for example, `btc: …`, `tests: …`).
- Write commit subjects in imperative mood (for example, `add OP_RETURN example`).
- PRs should describe motivation, key changes, and any API or protocol impacts; link related issues and mention how it was tested (commands, examples, or sandbox runs).
- PRs should describe motivation, key changes, and any API or protocol impacts; link related issues and mention how it was tested (commands, examples, or simulator runs).

41 changes: 0 additions & 41 deletions CHANGELOG-npm.md

This file was deleted.

45 changes: 0 additions & 45 deletions CHANGELOG-rust.md

This file was deleted.

63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Changelog

## [Unreleased]
- Remove the `wasm` feature, the public `wasm` module, and the TypeScript/WASM package. The
TypeScript library is now maintained in
[BitBoxSwiss/bitbox-api-ts](https://github.com/BitBoxSwiss/bitbox-api-ts/).
- Remove the `serde::Serialize` implementation for `btc::SignMessageSignature`, including its
camelCase field naming. This affects native Rust users as well.
- Remove the WASM-only Serde implementations: `Serialize` and `Deserialize` for protobuf types,
and `Deserialize` for `Keypath`, `btc::KeyOriginInfo`, `eth::Transaction`, and
`eth::EIP1559Transaction`.
- Remove the WASM-only `js_code()` methods on `error::Error`, `error::BitBoxError`, and
`btc::PsbtError`.
- Stop enabling Bitcoin's `base64` feature for library consumers. Applications using base64 PSBT
parsing or formatting must enable `bitcoin/base64` in their own dependencies. The PSBT example
continues to enable it through development dependencies.
- Stop enabling the dependency features previously supplied by `wasm`: `bitcoin/serde`,
`hex/serde`, `getrandom/js`, and `bitcoin/secp-lowmemory`. Consumers relying on these features
must enable them directly on their own dependencies.
- Build only a Rust library by default; Cargo no longer also generates a `cdylib` artifact.
- Use Cargo's default release profile instead of the WASM-oriented size optimization settings.

## 0.13.1
- Restrict persisted Noise config files to private permissions on Unix.
- Validate ECDSA signatures and recovery IDs in Anti-Klepto and direct signing flows.

## 0.13.0
- Add `BitBox::from_transport()`
- Serialize public API calls that talk to the device to avoid interleaving request/response
sequences and breaking the device communication state.

## 0.12.0
- eth: add support for streaming transactions and EIP-712 typed data with large data
- eth: add `use_antiklepto` toggle to `eth_sign_typed_message()` (set `false` for deterministic
typed-message signatures, firmware >=9.26.0)

## 0.11.0
- btc: add support for OP_RETURN outputs
- add `change_password()` to change the device password (firmware >=9.25.0)

## 0.10.0
- Add `btc_xpubs()`

## 0.9.0
- Add support for BitBox02 Nova

## 0.8.0
- Add `bip85_app_bip39()`
- Make the `simulator` feature work with the `multithreaded` feature

## 0.7.0
- cardano: add support for 258-tagged sets

## 0.6.0
- btc: handle error when an input's previous transaction is required but missing
- btc: add support for regtest
- btc: add support for Taproot wallet policies
- cardano: added support for vote delegation
- eth: add method to help clients identify and specify address case (upper/lower/mixed)

## 0.5.0

- btc: add `make_script_config_multisig()`
Loading
Loading