Skip to content

Commit d78d5e8

Browse files
committed
Add Cli command for Bolt11Send
1 parent 7546ae0 commit d78d5e8

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

cli/src/main.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use clap::{Parser, Subcommand};
22
use client::client::LdkNodeServerClient;
33
use client::error::LdkNodeServerError;
4-
use client::protos::{Bolt11ReceiveRequest, OnchainReceiveRequest, OnchainSendRequest};
4+
use client::protos::{
5+
Bolt11ReceiveRequest, Bolt11SendRequest, OnchainReceiveRequest, OnchainSendRequest,
6+
};
57

68
#[derive(Parser, Debug)]
79
#[command(version, about, long_about = None)]
@@ -32,6 +34,12 @@ enum Commands {
3234
#[arg(long)]
3335
amount_msat: Option<u64>,
3436
},
37+
Bolt11Send {
38+
#[arg(short, long)]
39+
invoice: String,
40+
#[arg(long)]
41+
amount_msat: Option<u64>,
42+
},
3543
}
3644

3745
#[tokio::main]
@@ -55,6 +63,9 @@ async fn main() {
5563
.await,
5664
);
5765
},
66+
Commands::Bolt11Send { invoice, amount_msat } => {
67+
handle_response(client.bolt11_send(Bolt11SendRequest { invoice, amount_msat }).await);
68+
},
5869
}
5970
}
6071

0 commit comments

Comments
 (0)