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
use clap::Parser;

use shadow_drive_sdk::{Pubkey, Signer};

mod get;
mod init;

#[derive(Debug, Parser)]
pub enum MinterCommand {
    Init,
    Get { minter: Pubkey },
}

impl MinterCommand {
    pub async fn process(
        &self,
        signer: &impl Signer,
        client_signer: impl Signer,
        rpc_url: &str,
    ) -> anyhow::Result<()> {
        match self {
            MinterCommand::Init => init::process(signer, client_signer, rpc_url).await,

            MinterCommand::Get { minter } => get::process(minter, rpc_url).await,
        }
    }
}