feat(sdk-core): add support for BOLT11 lightning invoices in OFC token #7912
Merged
davidkaplanbitgo merged 1 commit intomasterfrom Jan 20, 2026
Merged
feat(sdk-core): add support for BOLT11 lightning invoices in OFC token #7912davidkaplanbitgo merged 1 commit intomasterfrom
davidkaplanbitgo merged 1 commit intomasterfrom
Conversation
a73b213 to
22bea22
Compare
girish131
previously approved these changes
Jan 15, 2026
KaustubhPatange
approved these changes
Jan 16, 2026
kaustubhbitgo
previously approved these changes
Jan 16, 2026
louib
previously approved these changes
Jan 16, 2026
85fc6d6
22bea22 to
85fc6d6
Compare
Implement support for Bolt11 Lightning Network invoices in the OfcToken class, allowing users to send to Lightning addresses. Added validation for Lightning invoice addresses and proper amount handling. - Created new lightning.ts module with isBolt11Invoice validation function - Extended checkRecipient method in OfcToken class to handle Lightning invoices - Added validation for Lightning invoice amounts and backing coins - Added unit tests for the Lightning invoice validation BTC-2775 TICKET: BTC-2775
85fc6d6 to
30f26d9
Compare
Contributor
Author
|
Instead of adding the dependency for fully decoding the invoice on the SDK, we are just going to check that it "looks" like an invoice and we will verify the invoice on WP where |
girish131
approved these changes
Jan 16, 2026
kaustubhbitgo
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow BOLT11 lightning invoice addresses to be used as recipients in OFC token transactions.
The implementation adds validation for invoice addresses with either an 'invoice' amount
or a non-zero bigint amount. Also adds comprehensive test coverage for the new functionality.
TICKET: BTC-2775