ic-query-cli 0.100.2

Command-line wrapper for read-only Internet Computer metadata queries
Documentation
//! Typed ledger-wide ICRC operations.

use super::options::{IcrcArchivesOptions, IcrcLedgerOptions, IcrcTransactionsOptions};
use crate::cli::common::{COLLECTION_MODE_LIVE, collection_help};
use clap::Subcommand;

///
/// LedgerCommand
///
/// Parsed ledger operation and its arguments.
///

#[derive(Subcommand)]
#[command(about = "Inspect ledger-wide ICRC metadata and transactions", long_about = None)]
pub(super) enum LedgerCommand {
    #[command(about = "Probe generic ICRC ledger endpoint capabilities", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger capabilities mxzaz-hqaaa-aaaar-qaada-cai\n  icq icrc ledger capabilities mxzaz-hqaaa-aaaar-qaada-cai --json"))]
    Capabilities(IcrcLedgerOptions),
    #[command(about = "Show generic ICRC token metadata by ledger canister id", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger token ryjl3-tyaaa-aaaaa-aaaba-cai\n  icq icrc ledger token ryjl3-tyaaa-aaaaa-aaaba-cai --json"))]
    Token(IcrcLedgerOptions),
    #[command(about = "Show a generic ICRC ledger index canister", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger index ryjl3-tyaaa-aaaaa-aaaba-cai\n  icq icrc ledger index ryjl3-tyaaa-aaaaa-aaaba-cai --json"))]
    Index(IcrcLedgerOptions),
    #[command(about = "Show a generic ICRC ledger transaction history page", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger transactions ryjl3-tyaaa-aaaaa-aaaba-cai\n  icq icrc ledger transactions mxzaz-hqaaa-aaaar-qaada-cai --start 0 --limit 1 --follow-archives --json"))]
    Transactions(IcrcTransactionsOptions),
    #[command(about = "Show generic ICRC-3 ledger supported block types", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger block-types ryjl3-tyaaa-aaaaa-aaaba-cai\n  icq icrc ledger block-types ryjl3-tyaaa-aaaaa-aaaba-cai --json"))]
    BlockTypes(IcrcLedgerOptions),
    #[command(about = "Show generic ICRC-3 ledger archive ranges", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger archives ryjl3-tyaaa-aaaaa-aaaba-cai\n  icq icrc ledger archives ryjl3-tyaaa-aaaaa-aaaba-cai --from qaa6y-5yaaa-aaaaa-aaafa-cai --json"))]
    Archives(IcrcArchivesOptions),
    #[command(about = "Show a generic ICRC-3 ledger tip certificate", long_about = None, after_help = collection_help(COLLECTION_MODE_LIVE, "Examples:\n  icq icrc ledger tip-certificate mxzaz-hqaaa-aaaar-qaada-cai\n  icq icrc ledger tip-certificate mxzaz-hqaaa-aaaar-qaada-cai --json"))]
    TipCertificate(IcrcLedgerOptions),
}