Skip to content

Commit

Permalink
chore: stash
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Oct 25, 2024
1 parent d7bc73a commit b2ad8fe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bolt-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ thiserror = "1.0"
hex = "0.4.3"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
reqwest = "0.12.8"

[dev-dependencies]
tempfile = "3.13.0"
reqwest = "0.12.8"

[build-dependencies]
tonic-build = "0.12.3"
15 changes: 15 additions & 0 deletions bolt-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pub enum Commands {

/// Output a list of pubkeys in JSON format.
Pubkeys(PubkeysCommand),

/// Send a preconfirmation request to a Bolt proposer.
Send(SendCommand),
}

/// Command for generating BLS delegation or revocation messages.
Expand Down Expand Up @@ -61,6 +64,18 @@ pub struct PubkeysCommand {
pub source: KeySource,
}

/// Command for sending a preconfirmation request to a Bolt proposer.
#[derive(Debug, Clone, Deserialize, Parser)]
pub struct SendCommand {
/// Bolt Sidecar RPC URL to send requests to.
#[clap(long, env = "SIDECAR_RPC_URL")]
pub sidecar_rpc_url: String,

/// The private key to sign the transaction with.
#[clap(long, env = "PRIVATE_KEY", hide_env_values = true)]
pub private_key: String,
}

/// The action to perform.
#[derive(Debug, Clone, ValueEnum, Deserialize)]
#[clap(rename_all = "kebab_case")]
Expand Down
9 changes: 9 additions & 0 deletions bolt-cli/src/commands/send.rs
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
use eyre::Result;

use crate::cli::SendCommand;

impl SendCommand {
/// Run the `send` command.
pub async fn run(self) -> Result<()> {
Ok(())
}
}
1 change: 1 addition & 0 deletions bolt-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ async fn main() -> Result<()> {
match cli.command {
Commands::Delegate(cmd) => cmd.run().await?,
Commands::Pubkeys(cmd) => cmd.run().await?,
Commands::Send(cmd) => cmd.run().await?,
}

Ok(())
Expand Down

0 comments on commit b2ad8fe

Please sign in to comment.