Skip to content

Custom tlvs#223

Open
Billa05 wants to merge 4 commits into
lightningdevkit:mainfrom
Billa05:custom-tlvs
Open

Custom tlvs#223
Billa05 wants to merge 4 commits into
lightningdevkit:mainfrom
Billa05:custom-tlvs

Conversation

@Billa05
Copy link
Copy Markdown

@Billa05 Billa05 commented May 28, 2026

Closes #217.

Exposes CustomTlvRecord through the gRPC API (LDK Node already supports it under the hood):

  • New types.CustomTlvRecord { uint64 type_num; bytes value; }
  • repeated custom_tlvs field on SpontaneousSendRequest
  • repeated custom_records field on PaymentReceived and PaymentClaimable
  • --custom-tlv <type_num>:<hex_value> flag (repeatable) on ldk-server-cli spontaneous-send

Strictly wire-additive, no new dependencies. Unit tests cover the proto <-> ldk-node conversions and the PaymentClaimable proto build, e2e-tests::test_cli_spontaneous_send_with_custom_tlvs drives the full CLI round-trip.

Note: the receive path round-trips odd-type TLVs only. LDK Node's spontaneous-receive uses claim_funds(preimage) rather than claim_funds_with_known_custom_tlvs, so BOLT 4 rejects even-type TLVs at the receiver. Inherited from the pinned ldk-node revision, this surface will support even types automatically once upstream changes that.

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented May 28, 2026

I've assigned @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.

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.

gRPC API: expose custom_tlvs on SpontaneousSend and custom_records on PaymentReceived / PaymentClaimable events

2 participants