lightning-decoder icon indicating copy to clipboard operation
lightning-decoder copied to clipboard

Bolt12 offers support

Open a-mpch opened this issue 10 months ago • 1 comments

👋🏼 I wrote a minimal support for bolt12 offers.

What's going on here

As bolt12 was merged and part of the lightning specs I thought that would be fun to decode offers in this page. I had few options to do this changes:

  1. Writing a decoding functions of bolt12 TLVs
  2. Use LDK wasm
  3. Use custom wasm

Then I thought that BoltzExchange probably had the same dilemma when implementing bolt12 on their webpage. So They solved bringing Offer and Invoice from LDK and building their own wasm.

Said so, I tried using LDK and Boltz one but Webpack version was a bit deprecated. So I went to upgrade react scripts, adding and removing packages so project could use newer webpack (with native support of wasm).

After upgrading, added a bolt12 decoding from the wasm and expose it minimally into the UI.

What to check?

  • I didn't break stuff upgrading (I think not, tried building and running it in local)
  • using offers to be decoded

What else could be added?

  • Maybe BIP353?
  • Other fields or better parsing? idk

a-mpch avatar Mar 17 '25 17:03 a-mpch

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lightning-decoder ❌ Failed (Inspect) Mar 21, 2025 11:09am

vercel[bot] avatar Mar 17 '25 17:03 vercel[bot]