nym_cli_commands/validator/vesting/
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 balance;
7pub mod create_vesting_schedule;
8pub mod query_vesting_schedule;
9pub mod withdraw_vested;
10
11#[derive(Debug, Args)]
12#[clap(args_conflicts_with_subcommands = true, subcommand_required = true)]
13pub struct VestingSchedule {
14    #[clap(subcommand)]
15    pub command: Option<VestingScheduleCommands>,
16}
17
18#[derive(Debug, Subcommand)]
19pub enum VestingScheduleCommands {
20    /// Creates a vesting schedule
21    Create(crate::validator::vesting::create_vesting_schedule::Args),
22    /// Query for vesting schedule
23    Query(crate::validator::vesting::query_vesting_schedule::Args),
24    /// Get the amount that has vested and is free for withdrawal, delegation or bonding
25    VestedBalance(crate::validator::vesting::balance::Args),
26    /// Withdraw vested tokens (note: the available amount excludes anything delegated or bonded before or after vesting)
27    WithdrawVested(crate::validator::vesting::withdraw_vested::Args),
28}