diff --git a/lnclient/ldk/ldk.go b/lnclient/ldk/ldk.go index b97ba2ab..b570b8ed 100644 --- a/lnclient/ldk/ldk.go +++ b/lnclient/ldk/ldk.go @@ -1236,11 +1236,23 @@ func (ls *LDKService) handleLdkEvent(event *ldk_node.Event) { switch eventType := (*event).(type) { case ldk_node.EventChannelReady: + channels := ls.node.ListChannels() + channelIndex := slices.IndexFunc(channels, func(c ldk_node.ChannelDetails) bool { + return c.ChannelId == eventType.ChannelId + }) + if channelIndex == -1 { + logger.Logger.WithField("event", eventType).Error("Failed to find channel by ID") + return + } + channel := channels[channelIndex] ls.eventPublisher.Publish(&events.Event{ Event: "nwc_channel_ready", Properties: map[string]interface{}{ "counterparty_node_id": eventType.CounterpartyNodeId, "node_type": config.LDKBackendType, + "public": channel.IsPublic, + "capacity": channel.ChannelValueSats, + "is_outbound": channel.IsOutbound, }, })