Skip to content

LN-Zap/ldk-offer-parser-reproducer

Repository files navigation

BOLT12 Offer Parsing Investigation

This repository contains an investigation into why BOLT12 offers generated by Breez wallet fail to parse using LDK implementations.

TL;DR

Question: Is this a version compatibility issue between different BOLT12 spec implementations?

Answer: Evidence strongly suggests this is not a version compatibility issue, but more likely an encoding issue in the offer generation.

Investigation Results

  • Tested across multiple LDK versions (0.0.123 and 0.1.3)
  • Validated with independent JavaScript implementation (bolt12-decoder v1.0.0)
  • Confirmed with official BOLT12 test vectors
  • Root cause analysis: Consistent padding-related errors across implementations

Files

  • INVESTIGATION_SUMMARY.md - Complete investigation report with technical analysis
  • UnitTest1.cs - 13 comprehensive test methods documenting the investigation
  • ldk-offer-parser-reproducer.csproj - Test project using LDK C# bindings

Key Evidence

All implementations tested fail with padding-related errors:

  • LDK C# bindings (v0.1.3): Bech32(InvalidPadding)
  • LDK C# bindings (v0.0.123): Bech32(InvalidPadding)
  • LNDK CLI (LDK v0.0.123): ERROR Bech32(InvalidPadding)
  • JavaScript bolt12-decoder (v1.0.0): Error: Excess padding

Conclusion

The evidence strongly suggests that the Breez wallet's BOLT12 offers contain an encoding issue that prevents parsing across all tested implementations. The consistent padding-related error pattern across multiple independent implementations indicates this is not a specification compatibility problem.

About

Sample repository to reproduce ldk offer parser issues

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages