RGB-WG / rgb-std

RGB standard libs for WASM & low-level integrations (no FS/networking)
https://rgb.tech
Apache License 2.0
66 stars 31 forks source link

Switch to Base64 encoding for the consignments #10

Closed dr-orlovsky closed 1 year ago

dr-orlovsky commented 1 year ago

Consignments currently use Bech32m encoding for ASCII armoring.

The main features of Bech32 is reduction of probability of typing mistakes. This is achieved by:

All these features make sense only for short data, which can be read in voice and typed by hand. Even small RGB contract genesis doesn't fit that limit and they would not be transferred in voice.

However, Bech32 makes sense only for short data, while the cost of Bech32 features is the increase of the textual representation (twice longer than in Base64).

Thus, it is advisable to switch to Base64 as the most short representation, which is already used in similar cases (for instance, PSBTs).

To differentiate from PSBT it is advised to start using ASCII armoring like it is used in PGP/GPG. A 120-bit checksum should also be added to the standard.

Depends on upstream: https://github.com/LNP-BP/rust-lnpbp/issues/224

dr-orlovsky commented 1 year ago

Completed with addition of Bindles