This repository was archived by the owner on May 2, 2026. It is now read-only.
Add QR payload decompression for pairing flow#7
Merged
filinvadim merged 1 commit intomainfrom Apr 26, 2026
Merged
Conversation
The fat node now ships the full AuthNodeInfo Brotli-compressed and Base45-encoded so the QR carries every dial field instead of the trimmed subset the previous frontend sent. Decode the scanned (or pasted) payload through QrPayloadCodec before handing it to the JSON parser. Plain-JSON input is passed through unchanged so legacy desktops and manual paste flows still validate. Pulls in org.brotli:dec for the decompression step; the Base45 codec is inlined to avoid another transitive on the transport module.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Adds support for decoding Brotli-compressed, Base45-encoded QR payloads in the pairing flow. The fat node now ships pairing QR codes with compression to fit more data within QR alphanumeric mode constraints.
Key Changes
QrPayloadCodecclass: Decodes QR payloads that are Brotli-compressed and Base45-encoded per RFC 9285, while maintaining backward compatibility with plain JSON payloads (legacy/manual paste scenarios)Base45implementation: RFC 9285 Base45 codec (~50 lines) implemented directly to avoid adding a transitive dependency for minimal functionalityAuthNodeInfoValidator: Modified to decompress payloads viaQrPayloadCodec.decode()before JSON parsing, with proper error handling for malformed payloadsorg.brotli:dec) for decompressionImplementation Details
{0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:) is a strict subset of QR alphanumeric mode, enabling efficient packing of 5.5 bits per character vs. 8 bits in byte modehttps://claude.ai/code/session_011638L4REv78jEVUjQsniPz