Skip to content

Expose introduction node direction in decoded offers#213

Merged
benthecarman merged 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-05-directed-scid
May 19, 2026
Merged

Expose introduction node direction in decoded offers#213
benthecarman merged 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-05-directed-scid

Conversation

@jkczyz
Copy link
Copy Markdown
Contributor

@jkczyz jkczyz commented May 19, 2026

A BOLT12 blinded path's introduction node may be identified by a directed short channel ID (SCID plus a direction byte selecting one of the channel's two endpoints), not just by node id. Previously the decoded offer dropped the direction byte, leaving callers unable to tell which endpoint was the introduction node. The two identification forms were also represented as independent optional fields, so the schema did not enforce that exactly one was set; mutual exclusivity relied on server convention.

Restructure BlindedPath so the introduction node is a oneof between a node_id string and a new DirectedShortChannelId message carrying both the SCID and a ChannelDirection enum. Populate it from the LDK IntroductionNode::DirectedShortChannelId variant.

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented May 19, 2026

👋 Thanks for assigning @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

A BOLT12 blinded path's introduction node may be identified by a
directed short channel ID (SCID plus a direction byte selecting one
of the channel's two endpoints), not just by node id. Previously the
decoded offer dropped the direction byte, leaving callers unable to
tell which endpoint was the introduction node. The two identification
forms were also represented as independent optional fields, so the
schema did not enforce that exactly one was set; mutual exclusivity
relied on server convention.

Restructure `BlindedPath` so the introduction node is a `oneof`
between a `node_id` string and a new `DirectedShortChannelId` message
carrying both the SCID and a `ChannelDirection` enum. Populate it
from the LDK `IntroductionNode::DirectedShortChannelId` variant.

Co-Authored-By: Claude <noreply@anthropic.com>
@jkczyz jkczyz force-pushed the 2026-05-directed-scid branch from f1c293b to 499a6c7 Compare May 19, 2026 17:19
@jkczyz jkczyz requested a review from benthecarman May 19, 2026 17:19
Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

thanks!

@benthecarman benthecarman merged commit 06c40b5 into lightningdevkit:main May 19, 2026
11 checks passed
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.

3 participants