Skip to content
Merged
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
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Repository instructions

Read [README.md](README.md) before making changes to this repository.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,19 @@ npm run test:sim -- test/simulator-btc.test.ts

For build, test, simulator, protobuf, and contribution workflow details, see
[CONTRIBUTING.md](CONTRIBUTING.md).

## Updating the Bitcoin transaction test vectors

The vectors in [test/data/btc-transaction-test-vectors.json](test/data/btc-transaction-test-vectors.json)
are generated in the BitBox02 firmware repository. Do not modify this JSON file directly.

The source of truth is the Rust constructors in
[`src/rust/bitbox-test-vectors/src/btc_transaction/cases/`](https://github.com/BitBoxSwiss/bitbox02-firmware/tree/master/src/rust/bitbox-test-vectors/src/btc_transaction/cases).
Make changes there and regenerate the canonical JSON following the
[test vector generation instructions](https://github.com/BitBoxSwiss/bitbox02-firmware/blob/master/src/rust/bitbox-test-vectors/README.md).
Then copy the generated file byte-for-byte into this repository:

```sh
cp /path/to/bitbox02-firmware/src/rust/bitbox-test-vectors/testdata/btc-transaction-test-vectors.json \
test/data/btc-transaction-test-vectors.json
```
Loading