Skip to content

Improve Bolt12 offer APIs#3037

Merged
t-bast merged 2 commits intomasterfrom
expose-offer-data
Mar 12, 2025
Merged

Improve Bolt12 offer APIs#3037
t-bast merged 2 commits intomasterfrom
expose-offer-data

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Mar 12, 2025

This PR contains two separate commits that should have been done as part of #2976 but unfortunately were missed because of insufficient testing...

The listoffers RPC previously exposed raw TLV data and omitted the createdAt and disabledAt information, which made it quite useless. We now return all of the useful offer data, which makes it easier for node operators to manage their offers. This is added in the first commit.

If we previously registered the same offer twice, this would crash because we weren't properly handling primary key constraints failures. This is fixed in the second commit.

t-bast added 2 commits March 12, 2025 13:45
The `listoffers` RPC previously exposed raw TLV data and omitted the
`createdAt` and `disabledAt` information, which made it quite useless.
We now return all of the useful offer data, which makes it easier for
node operators to manage their offers.
If we register the same offer twice, this will crash because we're not
handling primary key constraints failures.
@t-bast t-bast requested a review from remyers March 12, 2025 12:48
Copy link
Contributor

@remyers remyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@t-bast t-bast merged commit bdaa625 into master Mar 12, 2025
1 check passed
@t-bast t-bast deleted the expose-offer-data branch March 12, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants