Skip to content

Commit

Permalink
feat: add input/output getters to Tx builder
Browse files Browse the repository at this point in the history
This enables api users (such as mint-repl) to check the input/output
len (or inspect ins/outs) while building up the Tx.
  • Loading branch information
dan-da authored and dirvine committed Feb 17, 2022
1 parent c291c6d commit 78d910c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ impl TransactionBuilder {
self.material.outputs.iter().map(|o| o.amount).sum()
}

/// get inputs
pub fn inputs(&self) -> &Vec<MlsagMaterial> {
&self.material.inputs
}

/// get outputs
pub fn outputs(&self) -> &Vec<Output> {
&self.material.outputs
}

/// build a RingCtTransaction and associated secrets
pub fn build(
self,
Expand Down

0 comments on commit 78d910c

Please sign in to comment.