kaspa_cli_lib/modules/broadcast.rs
1use crate::imports::*;
2
3#[derive(Default, Handler)]
4#[help("Broadcast signed transaction to the network")]
5pub struct Broadcast;
6
7impl Broadcast {
8 async fn main(self: Arc<Self>, ctx: &Arc<dyn Context>, _argv: Vec<String>, _cmd: &str) -> Result<()> {
9 let ctx = ctx.clone().downcast_arc::<KaspaCli>()?;
10 ctx.wallet().broadcast().await?;
11 Ok(())
12 }
13}