Skip to content

Commit

Permalink
Add proto for UpdateChannelConfig api.
Browse files Browse the repository at this point in the history
  • Loading branch information
G8XSU committed Oct 15, 2024
1 parent 4ea1f13 commit d647505
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions protos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ pub struct OpenChannelResponse {
#[prost(bytes = "bytes", tag = "1")]
pub user_channel_id: ::prost::bytes::Bytes,
}
/// Update the config for a previously opened channel.
/// See more: <https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.update_channel_config>
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChannelConfigRequest {
/// The hex-encoded local `user_channel_id` of this channel.
#[prost(string, tag = "1")]
pub user_channel_id: ::prost::alloc::string::String,
/// The hex-encoded public key of the counterparty node to update channel config with.
#[prost(string, tag = "2")]
pub counterparty_node_id: ::prost::alloc::string::String,
/// The updated channel configuration settings for a channel.
#[prost(message, optional, tag = "3")]
pub channel_config: ::core::option::Option<ChannelConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChannelConfigResponse {}
/// ChannelConfig represents the configuration settings for a channel in a Lightning Network node.
/// See more: <https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html>
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
17 changes: 17 additions & 0 deletions protos/src/proto/ldk_node_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,23 @@ message OpenChannelResponse {
bytes user_channel_id = 1;
}

// Update the config for a previously opened channel.
// See more: https://docs.rs/ldk-node/latest/ldk_node/struct.Node.html#method.update_channel_config
message UpdateChannelConfigRequest {

// The hex-encoded local `user_channel_id` of this channel.
string user_channel_id = 1;

// The hex-encoded public key of the counterparty node to update channel config with.
string counterparty_node_id = 2;

// The updated channel configuration settings for a channel.
ChannelConfig channel_config = 3;
}

message UpdateChannelConfigResponse {
}

// ChannelConfig represents the configuration settings for a channel in a Lightning Network node.
// See more: https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelConfig.html
message ChannelConfig {
Expand Down

0 comments on commit d647505

Please sign in to comment.