Updates to invoicing #147
dr-orlovsky
started this conversation in
Ideas
Replies: 1 comment
-
Are you aware of unified QRs for Bitcoin? Doesn't have a BIP, but has some wallet support, also supported by BTCPay Server. It is BIP21 based approach, where BOLT11 invoice is added as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The existing universal invoicing needs several major improvements.
It become apparent that the use of Bech32m encoding was a mistake. You can read more about this in here:
https://github.com/UBIDECO/rust-baid58/blob/0d9f2b2af90212212b0e9ca5723788bf07b5607b/README.md?plain=1#L72-L94
Additionally to what is said there, Bech32(m) simply doesn't work for anything longer than 90 encoded characters: it is a clearly stated in the BIP-173:
The reason for the length limit is the fact that the error correction can't handle longer strings; and 6 character checksum appended to the end of the Bech32(m) string is just a waste of space in this case - plus "safety" guarantees of the Bech32 are broken.
Thus, use of Bech32(m) in lightning invoices was a technical nonsense, also reducing QR code performance.
Invoices of different kind would really vary in size by the orders of magnitude - thus, it is a poor design to encode them in the same way. For instance, address-based invoices has size of an bitcoin address; RGB onchain invoices are at least twice of that; RGB lightning invoices are triple or quadriple of that; descriptor based invoices would have length which 10-50 times exceeds size of a bitcoin address, and PSBTs would get to 100-500 of that.
Use of miniscript descriptors makes it really hard to support wallets which can't be represented as a miniscript descriptor (for instance, most of pre-Taproot wallets with time-locks and multisigs, or custom wallets created before miniscript was introduced).
Existing universal invoices carry no visually parsable information, which is undesirable.
URL support
After a lot of considerations I start to think that providing an invoice in form of an URL is more important than having a single-click-selectable string in some of form of binary-to-text encoding. The only advantage of the latter is "ability to select and copy with a single click", but this doesn't actually adds usability: a user has to perform five (!) manual operations: single-click to select, click copy, going to wallet app, initiating payment, pasting. At the same time, all mobile apps, messengers, browsers, desktop apps etc support URLs, which open into a proper screen (pre-filled with the data from the URL) of a user-configured default wallet app with just one operation: click on a URL. Also, URL has a plenty of advantages over binary strings:
Proposal
Examples
The resulting desired form of an invoicing protocol should look like:
bitcoin:bc1qxlcvg7ap7ld990f4dv6x09v0dcktvhv2az9cxu?amount=5&recurrent=7EnUZg#invoice-check-words
rgb-rpc://wallet.com?asset=asset_check_words_7EnUZgFtu28sWqqH3womkTopXCkgAGsCLvLnYvNcPLRt&amount=395&recurrent=7EnUZg&txob=NopdF52RXruPXgJpGEBik9ki#invoice-check-words
rgb+https://wallet.com/asset_check_words_7EnUZgFtu28sWqqH3womkTopXCkgAGsCLvLnYvNcPLRt/NopdF52RXruPXgJpGEBik9ki#invoice-check-words
(interactive REST protocol)rgb+wss://wallet.com/asset_check_words_7EnUZgFtu28sWqqH3womkTopXCkgAGsCLvLnYvNcPLRt/NopdF52RXruPXgJpGEBik9ki#invoice-check-words
(interactive websockets protocol)rgb+storm://node_check_words_DFpCegE8EESBvYD6NcbnnhTx6NKDFpCegE8QkQd8M@ihqqffiq2x4gxnwv26qq3znk7hb646lw7kaue5iihxf4zunremoainid.onion/asset_check_words_7EnUZgFtu28sWqqH3womkTopXCkgAGsCLvLnYvNcPLRt/NopdF52RXruPXgJpGEBik9ki.txob/?amount=395&recurrent=7EnUZg#invoice-check-words
bitcoin://wallet.com/NopdF52RXruPXgJpGEBik9ki?amount=45#invoice-check-words
bolt:lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs
bifrost://node_check_words_DFpCegE8EESBvYD6NcbnnhTx6NKDFpCegE8QkQd8M/asset_check_words_7EnUZgFtu28sWqqH3womkTopXCkgAGsCLvLnYvNcPLRt/KDFpCennhTx6NQd8MgE8QkDFpCegE8EESBvYD6Ncb?amount=584#invoice-check-words
Beta Was this translation helpful? Give feedback.
All reactions