shadow_drive_cli/command/nft/collection/
mod.rs1use clap::Parser;
2use shadow_drive_sdk::{Pubkey, Signer};
3
4mod get;
5mod init;
6mod withdraw;
7
8#[derive(Debug, Parser)]
9pub enum CollectionCommand {
10 Init,
12
13 Get { collection: Pubkey },
15
16 Withdraw { collection: Pubkey },
18}
19impl CollectionCommand {
20 pub async fn process(&self, signer: &impl Signer, rpc_url: &str) -> anyhow::Result<()> {
21 match self {
22 CollectionCommand::Init => init::process(signer, rpc_url).await,
23
24 CollectionCommand::Get { collection } => get::process(collection, rpc_url).await,
25 CollectionCommand::Withdraw { collection } => {
26 withdraw::process(signer, *collection, rpc_url).await
27 }
28 }
29 }
30}