2f6617daac
* Move the functionality to issue credentials from the credential binary and connect it with nym-cli * finished CLI part, trying to fit SDK part * finished Rust SDK * fix: cleanup * linting * linting * linting * remove one layer of coconut in nym-cli * linting * Fixes based on PR comments * formatting * fixes based on PR comments * formatting * fixing clippy errors * fixed post-rebasing issues and converted the lib into shared dep for other binaries * removed credentials client in favour of moving the functionality to nym-cli * removed redundant 'issue_credential' example (it did the same thing as 'bandwdith') * removed credentials client from build server * made the coconut cli also accept nym-api configs * fixed support for socks5 and NR --------- Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
27 lines
911 B
Rust
27 lines
911 B
Rust
use nym_cli_commands::context::{create_query_client, create_signing_client, ClientArgs};
|
|
use nym_network_defaults::NymNetworkDetails;
|
|
|
|
pub(crate) async fn execute(
|
|
global_args: ClientArgs,
|
|
coconut: nym_cli_commands::coconut::Coconut,
|
|
network_details: &NymNetworkDetails,
|
|
) -> anyhow::Result<()> {
|
|
match coconut.command {
|
|
nym_cli_commands::coconut::CoconutCommands::IssueCredentials(args) => {
|
|
nym_cli_commands::coconut::issue_credentials::execute(
|
|
args,
|
|
create_signing_client(global_args, network_details)?,
|
|
)
|
|
.await?
|
|
}
|
|
nym_cli_commands::coconut::CoconutCommands::RecoverCredentials(args) => {
|
|
nym_cli_commands::coconut::recover_credentials::execute(
|
|
args,
|
|
create_query_client(network_details)?,
|
|
)
|
|
.await?
|
|
}
|
|
}
|
|
Ok(())
|
|
}
|