diff --git a/libs/cln-lsps/src/client.rs b/libs/cln-lsps/src/client.rs index eb2e86e..a9ab438 100644 --- a/libs/cln-lsps/src/client.rs +++ b/libs/cln-lsps/src/client.rs @@ -26,6 +26,7 @@ impl RequestId { // BOLT8 message ID 37913 pub const LSPS_MESSAGE_ID: [u8; 2] = [0x94, 0x19]; +pub const LSPS_MESSAGE_ID_U16: u16 = 30971; pub const TIMEOUT_MILLIS: u128 = 30_000; /// The LspClient diff --git a/plugins/lsps-client/src/main.rs b/plugins/lsps-client/src/main.rs index 29ad7f1..d661594 100644 --- a/plugins/lsps-client/src/main.rs +++ b/plugins/lsps-client/src/main.rs @@ -13,7 +13,7 @@ use lsp_primitives::lsps0::common_schemas::{Network, NetworkCheckable, PublicKey use lsp_primitives::lsps1; use lsp_primitives::methods; -use cln_lsps::client::{LspClient, RequestId, LSPS_MESSAGE_ID}; +use cln_lsps::client::{LspClient, RequestId, LSPS_MESSAGE_ID, LSPS_MESSAGE_ID_U16}; use cln_lsps::cln_rpc_client::ClnRpcLspClient; use cln_lsps::custom_msg_hook::RpcCustomMsgMessage; use cln_lsps::transport::RequestResponseMatcher as RRM; @@ -55,6 +55,7 @@ async fn main() -> Result<()> { .rpcmethod_from_builder(crate::plugin_rpc::lsps1_create_order()) .rpcmethod_from_builder(crate::plugin_rpc::lsps1_get_order()) .hook("custommsg", handle_custom_msg) + .custommessages(vec![LSPS_MESSAGE_ID_U16]) .dynamic() .configure() .await? diff --git a/plugins/lsps-server/src/main.rs b/plugins/lsps-server/src/main.rs index 3221433..622442b 100644 --- a/plugins/lsps-server/src/main.rs +++ b/plugins/lsps-server/src/main.rs @@ -23,7 +23,7 @@ use lsp_primitives::lsps0::schema::ListprotocolsResponse; use lsp_primitives::methods; use lsp_primitives::methods::JsonRpcMethodEnum; -use cln_lsps::client::LSPS_MESSAGE_ID; +use cln_lsps::client::{LSPS_MESSAGE_ID, LSPS_MESSAGE_ID_U16}; use cln_lsps::custom_msg_hook::RpcCustomMsgMessage; use serde_json::json; @@ -54,6 +54,7 @@ async fn main() -> Result<()> { .option(options::lsps1_info_website()) .option(options::lsps1_min_required_channel_confirmations()) .option(options::lsps1_min_onchain_payment_confirmations()) + .option(options::lsps1_min_funding_confirms_within_blocks()) .option(options::lsps1_supports_zero_channel_reserve()) .option(options::lsps1_max_channel_expiry_blocks()) .option(options::lsps1_min_onchain_payment_size_sat()) @@ -67,6 +68,7 @@ async fn main() -> Result<()> { .option(options::lsps1_max_initial_lsp_balance_sat()) .option(options::lsps1_min_channel_balance_sat()) .option(options::lsps1_max_channel_balance_sat()) + .custommessages(vec![LSPS_MESSAGE_ID_U16]) .hook("custommsg", handle_custom_msg) .hook("invoice_payment", handle_paid_invoice) .featurebits(FeatureBitsKind::Node, String::from(FEATURE_BIT_STRING))