Commands

Enum Commands 

Source
pub enum Commands {
    Gen {
        mnemonic: Option<String>,
        passphrase: Option<String>,
        unsafe_show_secret: bool,
        output: Option<String>,
        force: bool,
    },
    Sign {
        message: Option<String>,
        from_file: Option<String>,
        keypair: Option<String>,
        output: Option<String>,
        force: bool,
    },
    Verify {
        message: Option<String>,
        from_file: Option<String>,
        signature: Option<String>,
        signature_file: Option<String>,
        pubkey: Option<String>,
        pubkey_file: Option<String>,
        output: Option<String>,
        force: bool,
    },
    Base58 {
        action: Base58Action,
    },
    SignTx {
        input: String,
        lookup_tables: Option<String>,
        keypair: Option<String>,
        output: Option<String>,
        output_format: Option<OutFmt>,
        force: bool,
        assume_yes: bool,
        max_fee: Option<u64>,
        summary_json: bool,
    },
}

Variants§

§

Gen

Generate a new mnemonic and keypair, or derive from existing mnemonic

Fields

§mnemonic: Option<String>

Read mnemonic from file or stdin (“-”). If omitted, a new mnemonic is generated.

§passphrase: Option<String>

Read passphrase from file or stdin (“-”). Optional.

§unsafe_show_secret: bool

UNSAFE: print secret to stdout

§output: Option<String>

Output path for a wallet

§force: bool

Force save(override) a wallet file [env: SOLANA_TOOLS_LITE_FORCE]

§

Sign

Sign a message

Fields

§message: Option<String>

Message to sign (inline)

§from_file: Option<String>

Read message from file or stdin (“-”)

§keypair: Option<String>

Path to keypair file (stdin disabled for secrets) [env: SOLANA_SIGNER_KEYPAIR]

§output: Option<String>

Optional output file (if not set, print to stdout)

§force: bool

Force save(override) a file [env: SOLANA_TOOLS_LITE_FORCE]

§

Verify

Verify a signature

Fields

§message: Option<String>

Message to verify (inline)

§from_file: Option<String>

Read message from file or stdin (“-”) Accepts both --from-file and --message-file for convenience.

§signature: Option<String>

Signature to verify (Base58, inline)

§signature_file: Option<String>

Read signature from file or stdin (“-”)

§pubkey: Option<String>

Public key (Base58, inline)

§pubkey_file: Option<String>

Read public key from file or stdin (“-”)

§output: Option<String>

Optional output file (if not set, print to stdout)

§force: bool

Force save(override) a file [env: SOLANA_TOOLS_LITE_FORCE]

§

Base58

Base58 encode/decode

Fields

§

SignTx

Sign a transaction file (JSON/Base64/Base58)

Fields

§input: String

Path to input transaction (UI JSON/Base64/Base58)

§lookup_tables: Option<String>

Optional lookup table file (JSON map: table address -> array of addresses)

§keypair: Option<String>

Path to keypair file (stdin disabled for secrets) [env: SOLANA_SIGNER_KEYPAIR]

§output: Option<String>

Optional output file (if not set, print to stdout)

§output_format: Option<OutFmt>

Force output format (json|base64|base58). If not specified, we mirror the input format. [env: SOLANA_TOOLS_LITE_OUTPUT_FORMAT]

§force: bool

Force save(override) the output file when it exists [env: SOLANA_TOOLS_LITE_FORCE]

§assume_yes: bool

Auto-approve without interactive prompt (useful for CI/pipelines) [env: SOLANA_TOOLS_LITE_YES]

§max_fee: Option<u64>

Fail if total fee (base + priority) exceeds this limit (lamports) [env: SOLANA_TOOLS_LITE_MAX_FEE]

§summary_json: bool

Emit signing summary as JSON to stdout (requires –output for signed tx)

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V