Skip to content

Commit

Permalink
Add wallet tree explore command
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jan 9, 2025
1 parent 825e969 commit 40f7b69
Show file tree
Hide file tree
Showing 6 changed files with 760 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ qrcode = { version = "0.14", optional = true, default-features = false }
rqrr = { version = "0.8", optional = true }
ur = { version = "0.4", optional = true }

# Tree exploration
incrementalmerkletree = "0.7"
shardtree = "0.5"

# TUI
crossterm = { version = "0.28", optional = true, features = ["event-stream"] }
ratatui = { version = "0.29", optional = true }
Expand Down
5 changes: 5 additions & 0 deletions src/commands/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub(crate) mod reset;
pub(crate) mod send;
pub(crate) mod shield;
pub(crate) mod sync;
pub(crate) mod tree;
pub(crate) mod upgrade;

#[derive(Debug, Subcommand)]
Expand Down Expand Up @@ -62,4 +63,8 @@ pub(crate) enum Command {

/// Send funds to the given address
Send(send::Command),

/// Commands that operate directly on the note commitment trees
#[command(subcommand)]
Tree(tree::Command),
}
11 changes: 11 additions & 0 deletions src/commands/wallet/tree.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use clap::Subcommand;

#[cfg(feature = "tui")]
pub(crate) mod explore;

#[derive(Debug, Subcommand)]
pub(crate) enum Command {
/// Explore a tree
#[cfg(feature = "tui")]
Explore(explore::Command),
}
Loading

0 comments on commit 40f7b69

Please sign in to comment.