Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,114 changes: 1,216 additions & 898 deletions FULL_HELP_DOCS.md

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions cmd/soroban-cli/src/commands/message/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::Parser;
use sha2::{Digest, Sha256};

use crate::{
commands::global,
commands::{global, HEADING_SIGNING},
config::{locator, secret},
print::Print,
signer::{self, Signer},
Expand Down Expand Up @@ -57,10 +57,15 @@ pub struct Cmd {

// @dev: Ledger and Lab don't support signing arbitrary messages yet. Once they do, use `sign_with::Args` here.
/// Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path.
#[arg(long, env = "STELLAR_SIGN_WITH_KEY", hide_env_values = true)]
#[arg(
long,
env = "STELLAR_SIGN_WITH_KEY",
hide_env_values = true,
help_heading = HEADING_SIGNING
)]
pub sign_with_key: String,

#[arg(long)]
#[arg(long, help_heading = HEADING_SIGNING)]
/// If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
pub hd_path: Option<usize>,

Expand Down
8 changes: 5 additions & 3 deletions cmd/soroban-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ pub mod version;

pub mod txn_result;

pub const HEADING_RPC: &str = "Options (RPC)";
pub const HEADING_ARCHIVE: &str = "Options (Archive)";
pub const HEADING_GLOBAL: &str = "Options (Global)";
pub const HEADING_RPC: &str = "RPC Options";
pub const HEADING_ARCHIVE: &str = "Archive Options";
pub const HEADING_GLOBAL: &str = "Global Options";
pub const HEADING_SIGNING: &str = "Signing Options";
pub const HEADING_TRANSACTION: &str = "Transaction Options";
Comment thread
fnando marked this conversation as resolved.
const ABOUT: &str =
"Work seamlessly with Stellar accounts, contracts, and assets from the command line.

Expand Down
4 changes: 2 additions & 2 deletions cmd/soroban-cli/src/commands/tx/args.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
commands::{global, txn_result::TxnEnvelopeResult},
commands::{global, txn_result::TxnEnvelopeResult, HEADING_TRANSACTION},
config::{
self,
address::{self, UnresolvedMuxedAccount},
Expand All @@ -16,7 +16,7 @@ pub struct Args {
#[clap(flatten)]
pub config: config::Args,
/// Build the transaction and only write the base64 xdr to stdout
#[arg(long)]
#[arg(long, help_heading = HEADING_TRANSACTION)]
pub build_only: bool,
}

Expand Down
17 changes: 14 additions & 3 deletions cmd/soroban-cli/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{
};

use crate::{
commands::HEADING_TRANSACTION,
print::Print,
signer::{self, Signer},
utils::deprecate_message,
Expand Down Expand Up @@ -59,7 +60,13 @@ pub struct Args {
#[command(flatten)]
pub network: network::Args,

#[arg(long, short = 's', visible_alias = "source", env = "STELLAR_ACCOUNT")]
#[arg(
long,
short = 's',
visible_alias = "source",
env = "STELLAR_ACCOUNT",
help_heading = HEADING_TRANSACTION
)]
/// Account that where transaction originates from. Alias `source`.
/// Can be an identity (--source alice), a public key (--source GDKW...),
/// a muxed account (--source MDA…), a secret key (--source SC36…),
Expand All @@ -75,11 +82,15 @@ pub struct Args {
pub sign_with: sign_with::Args,

/// ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm
#[arg(long, env = "STELLAR_FEE")]
#[arg(long, env = "STELLAR_FEE", help_heading = HEADING_TRANSACTION)]
pub fee: Option<u32>,

/// Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided
#[arg(long, env = "STELLAR_INCLUSION_FEE")]
#[arg(
long,
env = "STELLAR_INCLUSION_FEE",
help_heading = HEADING_TRANSACTION
)]
pub inclusion_fee: Option<u32>,
}

Expand Down
20 changes: 16 additions & 4 deletions cmd/soroban-cli/src/config/sign_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use super::{
network::{self, Network},
secret,
};
use crate::commands::HEADING_SIGNING;

#[derive(thiserror::Error, Debug)]
pub enum Error {
Expand Down Expand Up @@ -37,24 +38,35 @@ pub enum Error {
#[group(skip)]
pub struct Args {
/// Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path.
#[arg(long, env = "STELLAR_SIGN_WITH_KEY", hide_env_values = true)]
#[arg(
long,
env = "STELLAR_SIGN_WITH_KEY",
hide_env_values = true,
help_heading = HEADING_SIGNING
)]
pub sign_with_key: Option<String>,

#[arg(long, conflicts_with = "sign_with_lab")]
#[arg(long, conflicts_with = "sign_with_lab", help_heading = HEADING_SIGNING)]
/// If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
pub hd_path: Option<usize>,

#[allow(clippy::doc_markdown)]
/// Sign with https://lab.stellar.org
#[arg(long, conflicts_with = "sign_with_key", env = "STELLAR_SIGN_WITH_LAB")]
#[arg(
long,
conflicts_with = "sign_with_key",
env = "STELLAR_SIGN_WITH_LAB",
help_heading = HEADING_SIGNING
)]
pub sign_with_lab: bool,

/// Sign with a ledger wallet
#[arg(
long,
conflicts_with = "sign_with_key",
conflicts_with = "sign_with_lab",
env = "STELLAR_SIGN_WITH_LEDGER"
env = "STELLAR_SIGN_WITH_LEDGER",
help_heading = HEADING_SIGNING
)]
pub sign_with_ledger: bool,
}
Expand Down
Loading