PSBT in QR codes



Summary:

There is a discussion about how to encode a partially signed bitcoin transaction (PSBT) in QR codes. The specification allows a version 40 QR code to contain up to 3706 bytes of data, but practical limitations and the potential size of a PSBT mean that it cannot fit in one QR code. Some proposals suggest using animated QR codes or alphanumeric mode with custom headers for data reconstruction. However, these have drawbacks such as difficulty in printing, lack of clarity on data transfer, and compatibility issues with older hardware. The author suggests using binary encoding and structured append, which allows chaining up to 16 QR codes with 1 byte of parity. While there are doubts about the support of structured append in QR code libraries, the widely used zxing library on Android and the Apple built-in scanner both allow access to the scanned raw bytes, enabling parsing of the structured append header. Despite some downsides, binary encoding and structured append offer advantages such as efficient encoding, copypaste functionality, and compatibility with bech32.


Updated on: 2023-06-14T01:02:52.531242+00:00