ord/subcommand/wallet/
outputs.rs

1use super::*;
2
3#[derive(Serialize, Deserialize)]
4pub struct Output {
5  pub output: OutPoint,
6  pub amount: u64,
7}
8
9pub(crate) fn run(wallet: Wallet) -> SubcommandResult {
10  let mut outputs = Vec::new();
11  for (output, txout) in wallet.utxos() {
12    outputs.push(Output {
13      output: *output,
14      amount: txout.value,
15    });
16  }
17
18  Ok(Some(Box::new(outputs)))
19}