1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
use crate::imports::*;

pub mod account;
pub mod address;
pub mod broadcast;
pub mod close;
pub mod connect;
#[path = "create-unsigned-tx.rs"]
pub mod create_unsigned_tx;
pub mod details;
pub mod disconnect;
pub mod estimate;
pub mod exit;
pub mod export;
pub mod guide;
pub mod halt;
pub mod help;
pub mod history;
// pub mod import;
pub mod list;
pub mod message;
pub mod miner;
pub mod monitor;
pub mod mute;
pub mod network;
pub mod node;
pub mod open;
pub mod ping;
pub mod reload;
pub mod rpc;
pub mod select;
pub mod send;
pub mod server;
pub mod settings;
pub mod sign;
pub mod start;
pub mod stop;
pub mod sweep;
// pub mod test;
pub mod theme;
pub mod track;
pub mod transfer;
pub mod wallet;

// this module is registered manually within
// applications that support metrics
pub mod metrics;

// TODO
// broadcast
// create-unsigned-tx
// sign

pub fn register_handlers(cli: &Arc<KaspaCli>) -> Result<()> {
    register_handlers!(
        cli,
        cli.handlers(),
        [
            account, address, close, connect, details, disconnect, estimate, exit, export, guide, help, history, rpc, list, miner,
            message, monitor, mute, network, node, open, ping, reload, select, send, server, settings, sweep, track, transfer,
            wallet,
            // halt,
            // theme,  start, stop
        ]
    );

    Ok(())
}