Skip to content

Conversation

@erdoganishe
Copy link
Collaborator

Fixes #8554.

Add description field for offer related responces. Examples:

% lightning-cli --network=regtest --lightning-dir=/tmp/cln1 offer 100msat "Coffee payment" "" myoffer
{
   "offer_id": "41ebdcd9d7b72e7b6e4294ab6fec93c8e99c4fe1df7b3503386b64aeefc233f0",
   "active": true,
   "single_use": false,
   "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgq9jq5rjrdanxvet9ypcxz7tdv4h8gysqzcss8zeszk6dq87kufv7nswc9l22kfsy3x9ckuxavvle8q27gf5k2j8u",
   "description": "Coffee payment",
   "used": false,
   "label": "myoffer",
   "created": false
}
% lightning-cli --network=regtest --lightning-dir=/tmp/cln1 listoffers
{
   "offers": [
      {
         "offer_id": "41ebdcd9d7b72e7b6e4294ab6fec93c8e99c4fe1df7b3503386b64aeefc233f0",
         "active": true,
         "single_use": false,
         "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgq9jq5rjrdanxvet9ypcxz7tdv4h8gysqzcss8zeszk6dq87kufv7nswc9l22kfsy3x9ckuxavvle8q27gf5k2j8u",
         "description": "Coffee payment",
         "used": false,
         "label": "myoffer"
      }
   ]
}

@erdoganishe erdoganishe force-pushed the fix/show-offers-description branch from c67d35a to 60073f9 Compare December 11, 2025 14:46
@ShahanaFarooqui ShahanaFarooqui force-pushed the fix/show-offers-description branch 2 times, most recently from d13eef1 to 053694a Compare December 11, 2025 23:53
@ShahanaFarooqui ShahanaFarooqui requested review from ShahanaFarooqui and removed request for cdecker December 12, 2025 00:13
Copy link
Collaborator

@ShahanaFarooqui ShahanaFarooqui left a comment

Choose a reason for hiding this comment

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

@rustyrussell Currently, listsendpays and sql -k query="SELECT * FROM sendpays;" do not return the Bolt11/Bolt12 description. In contrast, listinvoices and sql -k query="SELECT * FROM invoices;", and listoffers and sql -k query="SELECT * FROM offers;" (after this PR), will also show the description. Should we extend the same functionality to sendpays as well? If so, I will create a separate issue for that and keep this PR focused on offers only.

@erdoganishe erdoganishe force-pushed the fix/show-offers-description branch from f3a2437 to 96960f2 Compare December 15, 2025 10:46
Copy link
Collaborator

@ShahanaFarooqui ShahanaFarooqui left a comment

Choose a reason for hiding this comment

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

@erdoganishe Thanks for the updates. The PR is nearly ready to merge. As this is your first PR, I am being a bit more nit-picky than usual to draw your attention to commit practices 🙂:

nit: Git log entries with Changelog-* tags generate the release changelog from PRs merged between releases. While multiple changelog entries per PR are fine, they should represent independent changes. For instance, if one commit adds a field and another removes an RPC, separate entries make sense. However, this PR makes a single logical change from a release perspective: adding a description field across multiple RPCs.

So rather than having multiple entries, we can include a single changelog entry in any one commit, like: "Changelog-Added: Add description field to listoffers, encodeoffer, decodeoffer, and the sql plugin’s offers table."


nit: We already have a commit titled doc: Added doc schemas with description and update proto that updates the protobufs. Could we either merge the changes from the later commit (grpc: regenerate Python protobufs after rebase) into that commit, or split the original commit into two logical ones like: doc: Added doc schemas with description and grpc: Update protobufs with description field.


nit: I initially added my changes into a separate commit (lightningd: Updated offer methods) to make the changes clearer for your review. However, this commit isn’t meaningful for future references and should be merged with lightningd: add description field to offer related responces.

@madelinevibes madelinevibes added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show description of offers

3 participants