1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mod build;
mod registration;

use std::process::Command;
pub struct StakeAddress {
    command: Command,
}

impl StakeAddress {
    pub fn new(command: Command) -> Self {
        Self { command }
    }

    pub fn build(mut self) -> build::StakeAddressBuilder {
        self.command.arg("build");
        build::StakeAddressBuilder::new(self.command)
    }

    pub fn register_certificate(mut self) -> registration::RegisterCertificate {
        self.command.arg("register-certificate");
        registration::RegisterCertificate::new(self.command)
    }
}