nym_cli_commands/validator/block/
mod.rs

1// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4use clap::{Args, Subcommand};
5
6pub mod block_time;
7pub mod current_height;
8pub mod get;
9
10#[derive(Debug, Args)]
11#[clap(args_conflicts_with_subcommands = true, subcommand_required = true)]
12pub struct Block {
13    #[clap(subcommand)]
14    pub command: Option<BlockCommands>,
15}
16
17#[derive(Debug, Subcommand)]
18pub enum BlockCommands {
19    /// Gets a block's details and prints as JSON
20    Get(crate::validator::block::get::Args),
21    /// Gets the block time at a height
22    Time(crate::validator::block::block_time::Args),
23    /// Gets the current block height
24    CurrentHeight(crate::validator::block::current_height::Args),
25}