Animated QRs are an interoperable specification for transmitting data that allows for the transmission of relatively large amounts of data (compared to standard QRs). They were created with the following goals:
- To Allow for the Transmission of Data Across Airgaps.
- To Support the Conveyance of More Data than Allowed by a Static QR.
- To Especially Enable PSBT Signing That is Done on an Unconnected Device.
- To Ensure Interoperability among Many Vendors by the Use of Uniform Resources.
- To Resolve The NASCAR Problem in Wallets.
Airgap Usage
QRs came into use in the digital-asset community because they could be used in airgap architectures. This allows for the storage of sensitive data (such as seeds and keys) in a device not directly connected to the internet, such as a hardware wallet or (to a lesser extent) a phone. A coordinator that is linked to the internet can then communicate with the disconnected device by QRs, without any sort of direct connection.
One of the earliest use cases for airgaps was Partially Signed Bitcoin Transactions (PSBTs). A networked coordinator could create a PSBT and then send it to the disconnected device for signing. After a PSBT was totally signed it could be returned to the networked coordinator for transmission to the Bitcoin network.
Why Airgaps? Airgaps allow users to keep critical data in a location that’s not connected to the internet, protecting them from most sorts of theft and hacking, which tend to rely on internet-connected devices. By usings QRs to constrain communication with the airgapped device, security is greatly improved, and even if some overflow were possible, the requirement for a user to carry data back and forth across the airgap would greatly reduce the choice of an exploit. This means that even if a device coordinating a transaction were corrupted, the keys wouldn’t be, and even if a transaction were produced incorrectly, a user could see this on their signing device.
Why PSBTs? PSBTs are a perfect complement to airgaps because they allow transactions to be created on an internet-connected device (which knows about UTXOs) but signed on an airgapped device (which knows about keys). They also become more important as multisigs are increasingly used to protect digital assets, because PSBTs allow for individual key holders to each sign on their own device, at their own convenience.
Size Problems
Unfortunately, QRs can only contain limited amounts of information. Technically, they can hold up to 7089 numeric characters, 4296 alphanumeric characters, or 2953 bytes of binary data. The reality is often lower than that, especially because large QRs pack their data so tightly that they can easily become unreadable on consumer devices such as phones or computer cameras.
This proved problematic for PSBTs because they often require the transmission of larger amounts of information, particularly as more signers were added. Solving this problem required a new type of QR: the animated QR, which transmits several QR frames that together comprise the entirity of a large set of digital data, such as a PSBT.
UR Interoperability
Blockchain Commons’ Animated QRs are built atop the Uniform Resource (UR) specification to ensure their interoperability among many wallets. URs are fundamentally a self-describing data encoding, but they can also be fragmented and sequenced. This allows a much larger data set to be broken into smaller segments and later to be recombined, all in a carefully specified way. To create Animated QRs, fragments are created that are each small enough to be encoded in a QR that will be readable by average consumer devices.
Fountain Code Tech
Blockchain Commons’ multipart Animated QRs are built from URs using Luby transform codes (fountain codes). This rateless encoding method allows for the receipt of an animated QR to begin at any frame and for the transmission to overcome issues with missing frames.
This process is detailed in our references: URKit, a reference framework that allows for the encoding and decoding of URs in Swift; and URDemo, an iOS demo that shows how Animated QRs built on URs can be sent and received. A variety of UR libraries in additional languages such as Java, Python, and Rust are available thanks to our community.
The use of an interoperable specification for encoding, fragmenting, sequencing, transmitting, recombining, and decoding data is what allows Animated QRs to defeat the NASCAR problem. Already, software wallets are building up huge menus of hardware devices, with different interactions required for each. Wallets using the UR standard can instead present a unified communication methodology, making interaction with other devices effortless.
Wide Adoption
Prior to Blockchain Commons’ release of URs and Animated QRs, PSBTs could not be reliably transmitted using QR codes. As a result of this need, Blockchain Commons’ Animated QRs have seen wide adoption in the wallet developer community.
However, URs can do much more than just allow the transmission of PSBTs. They were built to allow for the transmission of a wide variety of data types in a way that is both self-describing and interoperable. They support the transmission of seeds, keys, envelopes, and other data between a wide variety of parties and increase the resilience of that valuable data because the self-describing tags ensure that it can be recovered by anyone at a later time.
See our UR docs for more information on the foundational data format that allows for the creation of animated QRs.
Supporting Interoperability
If you’re a Bitcoin User who values the safety and resilience of your digital assets, don’t take any chances with their safety. Use a wallet that supports interoperability specifications such as Animated QRs for PSBTs (and other future interoperability standards from Blockchain Commons). This not only increases the convenience of your assets, because you can use them across multiple wallets and devices, but also their resilience, because you can use one of those alternative wallets if your main wallet’s vendor goes out of business or suffers a catastrophic failure.
If you’re a Wallet Developer who wants to to support their users in this way, and also to take advantage of the innovations of Blockchain Commons and its members, join our Gordian Developer Community. Sign up for our announcements list or join our Signal channel. Even better, join us on GitHub where we welcome your input on projects!