You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are various payment request formats that often should be used once. Also, identifiers which have a longer lifespan as they can be used to identify a contact and either, establish a communication channel to relay a message between wallets, return payment request, etc. While one way of communicating such data is through text, it is also often the case that they are displayed as QR Codes.
We need to build a library that would allow the input of a payment request or identifier and parsing them for any meta data they contain.
An inverse of this function would be to encode it back to a string, with optimisations for QR Codes. See reference BTC Pay Server.
You will need to have a few libaries from NPM to make the validation a bit easier.
Optimise string size, for use in QR encoding. The uppercasing of characters use less bits. When encoding these payment request strings as QR Codes the result would be less dense, thus easier to scan.
Uppercase bech32 address, attribute names, and meta data where it doesnt change the meaning.
For example uppercasing the value of some invoice description or label could change the intended meaning.
Warning: Legagcy addresses cannot be made uppercase as they would be invalid.
Testing
We use the Jest framework. Test files are in /__tests__
The text was updated successfully, but these errors were encountered:
There are various payment request formats that often should be used once. Also, identifiers which have a longer lifespan as they can be used to identify a contact and either, establish a communication channel to relay a message between wallets, return payment request, etc. While one way of communicating such data is through text, it is also often the case that they are displayed as QR Codes.
We need to build a library that would allow the input of a payment request or identifier and parsing them for any meta data they contain.
An inverse of this function would be to encode it back to a string, with optimisations for QR Codes. See reference BTC Pay Server.
You will need to have a few libaries from NPM to make the validation a bit easier.
Payment Request Types
2. Legacy Address
3. Native Segwit
4. Segwit
5. Taproot
7. With URI
8. Without URI
Identifiers
Optimiser
Optimise string size, for use in QR encoding. The uppercasing of characters use less bits. When encoding these payment request strings as QR Codes the result would be less dense, thus easier to scan.
Testing
We use the Jest framework. Test files are in
/__tests__
The text was updated successfully, but these errors were encountered: