fusion44 / fusion44/dart_bolt11_decoder
Feature Request: Add support for lntbs (signet) prefix
- Dominant language
- Dart
- Stars
- 8
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
The PayRequestPrefix enum is missing the `lntbs` prefix, which is used for Lightning Network invoices on bitcoin signet. This causes `Bolt11PaymentRequest` to throw a `FormatException` when decoding signet invoices.
### Current behavior
```dart
Throws: FormatException: s50 is not a valid format
final req = Bolt11PaymentRequest('lntbs50u1p5ems8psp5cs8yqjk564udl32...');
```
The lntbs hrp matches lntb via startsWith, but then _processAmount tries to parse s50u as the amount string. The leading s (from lntbs) causes Decimal.parse("s50") to fail.
### Expected behavior
Signet invoices with the`lntbs` prefix should decode successfully.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the PayRequestPrefix enum and the Bolt11PaymentRequest decoding path, then inspect _processAmount where the lntbs suffix is currently parsed. Use the provided signet invoice example to verify that decoding completes without a FormatException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- fintech-quant
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100