Repository navigation
Conversation
Collaborator
|
merged #182 that is a variant of this, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the two BBQr encodings every receiver must support, base32 (
2) and zlib (Z), next to hex. Stacked onbbqr-equal-parts#176: only the last six commits are new.What changes
bwk-bbqrreads and writesH,2andZparts. Inflate and the compressor (1024-byte window, as zlib'swbits=-10) are in-house, so there is no new runtime dependency.miniz_oxideis a dev-dependency, fordifferential tests only.
bwk-qr'sEncodernow writes zlib by default and falls back to base32 when compression does not shrink the payload, as the reference does.Encoder::with_bbqr_encodingpicks another encoding. A reader that only knows hex cannot read the new default.Bonly.Liana
With this bwk Liana sends B$ZB or B$2B parts instead of B$HB. Kern reads them, and BIP 377 is transport-agnostic, so I'd keep the zlib default. A hex-only signer would stop reading Liana's requests; the opt-out is .with_bbqr_encoding(Encoding::Hex) at liana-gui/src/airgap/animation.rs:104. doc/QR_EXCHANGE.md:8 should say the device must read zlib and base32 parts.
All QR code exchanges have both less frames and lower densities, improving reliability and UX.
Tested with Liana (pythcoiner/liana@95ba4b2) and Kern (odudex/Kern@c2adbd8)