From 5d6bb0e490532f64689e522467dfd80df366f24c Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 2 May 2024 12:11:15 +1000 Subject: [PATCH] Remove lab xdr command (#1310) * Remove lab xdr command * fix * fix * update docs --- cmd/soroban-cli/src/commands/lab/mod.rs | 23 ---- cmd/soroban-cli/src/commands/mod.rs | 7 - docs/soroban-cli-full-docs.md | 167 ------------------------ 3 files changed, 197 deletions(-) delete mode 100644 cmd/soroban-cli/src/commands/lab/mod.rs diff --git a/cmd/soroban-cli/src/commands/lab/mod.rs b/cmd/soroban-cli/src/commands/lab/mod.rs deleted file mode 100644 index d183217fc..000000000 --- a/cmd/soroban-cli/src/commands/lab/mod.rs +++ /dev/null @@ -1,23 +0,0 @@ -use clap::Subcommand; -use stellar_xdr::cli as xdr; - -#[derive(Debug, Subcommand)] -pub enum Cmd { - /// Decode xdr - Xdr(xdr::Root), -} - -#[derive(thiserror::Error, Debug)] -pub enum Error { - #[error(transparent)] - Xdr(#[from] xdr::Error), -} - -impl Cmd { - pub fn run(&self) -> Result<(), Error> { - match &self { - Cmd::Xdr(xdr) => xdr.run()?, - } - Ok(()) - } -} diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index 4aaa3e645..cd0aeadae 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -9,7 +9,6 @@ pub mod contract; pub mod events; pub mod global; pub mod keys; -pub mod lab; pub mod network; pub mod plugin; pub mod version; @@ -95,7 +94,6 @@ impl Root { Cmd::Completion(completion) => completion.run(), Cmd::Contract(contract) => contract.run(&self.global_args).await?, Cmd::Events(events) => events.run().await?, - Cmd::Lab(lab) => lab.run()?, Cmd::Xdr(xdr) => xdr.run()?, Cmd::Network(network) => network.run().await?, Cmd::Version(version) => version.run(), @@ -126,9 +124,6 @@ pub enum Cmd { /// Create and manage identities including keys and addresses #[command(subcommand)] Keys(keys::Cmd), - /// Experiment with early features and expert tools - #[command(subcommand)] - Lab(lab::Cmd), /// Decode and encode XDR Xdr(stellar_xdr::cli::Root), /// Start and configure networks @@ -148,8 +143,6 @@ pub enum Error { #[error(transparent)] Keys(#[from] keys::Error), #[error(transparent)] - Lab(#[from] lab::Error), - #[error(transparent)] Xdr(#[from] stellar_xdr::cli::Error), #[error(transparent)] Clap(#[from] clap::error::Error), diff --git a/docs/soroban-cli-full-docs.md b/docs/soroban-cli-full-docs.md index 5b9f8002d..40d63624e 100644 --- a/docs/soroban-cli-full-docs.md +++ b/docs/soroban-cli-full-docs.md @@ -37,14 +37,6 @@ This document contains the help content for the `soroban` command-line program. * [`soroban keys ls`↴](#soroban-keys-ls) * [`soroban keys rm`↴](#soroban-keys-rm) * [`soroban keys show`↴](#soroban-keys-show) -* [`soroban lab`↴](#soroban-lab) -* [`soroban lab xdr`↴](#soroban-lab-xdr) -* [`soroban lab xdr types`↴](#soroban-lab-xdr-types) -* [`soroban lab xdr types list`↴](#soroban-lab-xdr-types-list) -* [`soroban lab xdr guess`↴](#soroban-lab-xdr-guess) -* [`soroban lab xdr decode`↴](#soroban-lab-xdr-decode) -* [`soroban lab xdr encode`↴](#soroban-lab-xdr-encode) -* [`soroban lab xdr version`↴](#soroban-lab-xdr-version) * [`soroban xdr`↴](#soroban-xdr) * [`soroban xdr types`↴](#soroban-xdr-types) * [`soroban xdr types list`↴](#soroban-xdr-types-list) @@ -95,7 +87,6 @@ Full CLI reference: https://github.com/stellar/soroban-tools/tree/main/docs/soro * `contract` — Tools for smart contract developers * `events` — Watch the network for contract events * `keys` — Create and manage identities including keys and addresses -* `lab` — Experiment with early features and expert tools * `xdr` — Decode and encode XDR * `network` — Start and configure networks * `version` — Print version information @@ -982,164 +973,6 @@ Given an identity return its private key -## `soroban lab` - -Experiment with early features and expert tools - -**Usage:** `soroban lab ` - -###### **Subcommands:** - -* `xdr` — Decode xdr - - - -## `soroban lab xdr` - -Decode xdr - -**Usage:** `soroban lab xdr [CHANNEL] ` - -###### **Subcommands:** - -* `types` — View information about types -* `guess` — Guess the XDR type -* `decode` — Decode XDR -* `encode` — Encode XDR -* `version` — Print version information - -###### **Arguments:** - -* `` — Channel of XDR to operate on - - Default value: `+curr` - - Possible values: `+curr`, `+next` - - - - -## `soroban lab xdr types` - -View information about types - -**Usage:** `soroban lab xdr types ` - -###### **Subcommands:** - -* `list` — - - - -## `soroban lab xdr types list` - -**Usage:** `soroban lab xdr types list [OPTIONS]` - -###### **Options:** - -* `--output ` - - Default value: `plain` - - Possible values: `plain`, `json`, `json-formatted` - - - - -## `soroban lab xdr guess` - -Guess the XDR type - -**Usage:** `soroban lab xdr guess [OPTIONS] [FILE]` - -###### **Arguments:** - -* `` — File to decode, or stdin if omitted - -###### **Options:** - -* `--input ` - - Default value: `single-base64` - - Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` - -* `--output ` - - Default value: `list` - - Possible values: `list` - -* `--certainty ` — Certainty as an arbitrary value - - Default value: `2` - - - -## `soroban lab xdr decode` - -Decode XDR - -**Usage:** `soroban lab xdr decode [OPTIONS] --type [FILES]...` - -###### **Arguments:** - -* `` — Files to decode, or stdin if omitted - -###### **Options:** - -* `--type ` — XDR type to decode -* `--input ` - - Default value: `stream-base64` - - Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` - -* `--output ` - - Default value: `json` - - Possible values: `json`, `json-formatted`, `rust-debug`, `rust-debug-formatted` - - - - -## `soroban lab xdr encode` - -Encode XDR - -**Usage:** `soroban lab xdr encode [OPTIONS] --type [FILES]...` - -###### **Arguments:** - -* `` — Files to encode, or stdin if omitted - -###### **Options:** - -* `--type ` — XDR type to encode -* `--input ` - - Default value: `json` - - Possible values: `json` - -* `--output ` - - Default value: `single-base64` - - Possible values: `single`, `single-base64` - - - - -## `soroban lab xdr version` - -Print version information - -**Usage:** `soroban lab xdr version` - - - ## `soroban xdr` Decode and encode XDR