-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add "ord wallet cardinals" command to list the cardinal outputs. #1904
Add "ord wallet cardinals" command to list the cardinal outputs. #1904
Conversation
This would really be helpful. I'm overwhelmed with the list of outputs and have difficulty discerning how many cardinal UTXOs and the balances that remain. @raphjaph Would you be the right person to tag for review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gonna change these things real quick myself
src/subcommand/wallet.rs
Outdated
@@ -48,6 +49,8 @@ pub(crate) enum Wallet { | |||
Transactions(transactions::Transactions), | |||
#[clap(about = "List wallet outputs")] | |||
Outputs, | |||
#[clap(about = "List wallet cardinals")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[clap(about = "List wallet cardinals")] | |
#[clap(about = "List unspent cardinal outputs in wallet")] |
src/subcommand/wallet.rs
Outdated
@@ -48,6 +49,8 @@ pub(crate) enum Wallet { | |||
Transactions(transactions::Transactions), | |||
#[clap(about = "List wallet outputs")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[clap(about = "List wallet outputs")] | |
#[clap(about = "List all unspent outputs in wallet")] |
src/subcommand/wallet/cardinals.rs
Outdated
.collect::<BTreeSet<OutPoint>>(); | ||
|
||
let mut outputs = Vec::new(); | ||
for (output, amount) in index.get_unspent_outputs(Wallet::load(&options)?)? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do a filter map
…nals#1904) Co-authored-by: Greg Martin <gm7t2@gmail.com> Co-authored-by: raphjaph <raphjaph@protonmail.com>
There's no easy way to find a list of cardinal outputs. You have to list all the outputs and remove the inscriptions.
Hence:
ord wallet cardinals
.