Skip to content

feat: add PRIVATE_KEY env var support to wallet ops #10311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions crates/wallets/src/raw_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::Serialize;

/// A wrapper for the raw data options for `Wallet`, extracted to also be used standalone.
/// The raw wallet options can either be:
/// 1. Private Key (cleartext in CLI)
/// 1. Private Key (cleartext in CLI or as `PRIVATE_KEY` env var)
/// 2. Private Key (interactively via secure prompt)
/// 3. Mnemonic (via file path)
#[derive(Clone, Debug, Default, Serialize, Parser)]
Expand All @@ -16,7 +16,7 @@ pub struct RawWalletOpts {
pub interactive: bool,

/// Use the provided private key.
#[arg(long, value_name = "RAW_PRIVATE_KEY")]
#[arg(long, value_name = "RAW_PRIVATE_KEY", env = "PRIVATE_KEY")]
pub private_key: Option<String>,

/// Use the mnemonic phrase of mnemonic file at the specified path.
Expand Down
Loading