Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightning / On-chain -> Receive: inconsistency of data (lower/upper case and prefix) #2731

Open
myxmaster opened this issue Jan 11, 2025 · 0 comments

Comments

@myxmaster
Copy link
Contributor

Describe your enhancement idea

When creating invoices (or on-chain addresses or lightning addresses) we always have 3 representations of that data:

  • QR data
  • Displayed text
  • Copied data

For each data representation, we need to decide if we need prefixes (lightning: or bitcoin:) and determine casing (all uppercase, all lowercase, or mixed casing [case sensitive]).

Casing:

  • QR data should be all uppercase (leads to a smaller QRs / requires fewer bits per character).
    • Exception 1: Mixed case for on-chain legacy and nested SegWit addresses (those are case sensitive)
    • Exception 2: LN addresses are ok lowercase (not much data anyway).
  • Displayed text and copied data should be all lowercase because that is easier to read.
    • Exception: Mixed case for on-chain legacy and nested SegWit addresses (those are case sensitive)

Prefixes:

  • QR data: Prefixes everywhere
  • Displayed text and copied data:
    • We need prefixes for unified invoices
    • We do not need prefixes for lightning invoices
    • We need prefixes for on-chain invoices with amount (lightning->receive->on-chain)
    • We do not need prefixes for lightning addresses
    • We do not need prefixes for on-chain addresses (on-chain->receive)

Right now we have:

lightning -> receive -> unified (SegWit/Taproot)

  • QR data uppercase ✔️, with prefixes ✔️
  • displayed text uppercase ❌, with prefixes ✔️
  • copied data uppercase ❌, with prefixes ✔️

lightning -> receive -> unified (Nested SegWit)

  • on-chain part
    • QR data mixed case ✔️, with prefix ✔️
    • displayed text mixed case ✔️, with prefix ✔️
    • copied data mixed case ✔️, with prefix ✔️
  • lightning part
    • QR data uppercase ✔️, with prefix ✔️
    • displayed text uppercase ❌, with prefix ✔️
    • copied data uppercase ❌, with prefix ✔️

lightning -> receive -> lightning

  • QR data uppercase ✔️, with prefix ✔️
  • displayed text uppercase ❌, with prefix ❌
  • copied data lowercase ✔️, without prefix ✔️

lightning -> receive -> on-chain with amount (SegWit/Taproot)

  • QR data uppercase ✔️, with prefix ✔️
  • displayed text uppercase ❌, with prefix ✔️
  • copied data uppercase ❌, with prefix ✔️

lightning -> receive -> on-chain with amount (Nested SegWit)

  • QR data mixed case ✔️, with prefix ✔️
  • displayed text mixed case ✔️, with prefix ✔️
  • copied data mixed case ✔️, with prefix ✔️

lightning -> receive -> on-chain without amount (SegWit/Taproot)

  • QR data uppercase ✔️, with prefix ✔️
  • displayed text uppercase ❌, with prefix ❌
  • copied data lowercase ✔️, without prefix ✔️

lightning -> receive -> on-chain wihtout amount (Nested SegWit)

  • QR data mixed case ✔️, with prefix ✔️
  • displayed text mixed case ✔️, with prefix ❌
  • copied data mixed case ✔️, without prefix ✔️

lightning -> receive -> ln-address

  • QR data lowercase ✔️, with prefix ✔️
  • displayed text lowercase ✔️, without prefix ✔️
  • copied data lowercase ✔️, with prefix ❌

on-chain -> receive (SegWit/Taproot)

  • QR data uppercase ✔️, with prefix ✔️
  • displayed text uppercase ❌, with prefix ❌
  • copied data lowercase ✔️, without prefix ✔️

on-chain -> receive (Nested SegWit)

  • QR data mixed case ✔️, with prefix ✔️
  • displayed text mixed case ✔️, with prefix ❌
  • copied data mixed case ✔️, without prefix ✔️

on-chain -> receive (legacy)
Not tested (possible via accounts?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant