feat: v1.11.17

This commit is contained in:
2025-04-30 01:19:21 +08:00
parent 4dca8e0146
commit 21676451fd
6 changed files with 126 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
use crate::util;
use clap::{App, Arg, ArgMatches, SubCommand};
use rust_util::util_clap::{Command, CommandError};
use serde_json::Value;
use std::collections::BTreeMap;
pub struct CommandImpl;
impl Command for CommandImpl {
fn name(&self) -> &str {
"external_public_key"
}
fn subcommand<'a>(&self) -> App<'a, 'a> {
SubCommand::with_name(self.name())
.about("External public key subcommand")
.arg(
Arg::with_name("parameter")
.long("parameter")
.takes_value(true)
.required(true)
.help("Parameter"),
)
}
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
let _parameter = sub_arg_matches.value_of("parameter").unwrap();
let mut json = BTreeMap::new();
json.insert("success", Value::Bool(true));
json.insert("public_key_base64", "**".into());
util::print_pretty_json(&json);
Ok(None)
}
}