Skip to content

Commit

Permalink
Merge pull request #92 from 'murisi/expose-input-addresses'
Browse files Browse the repository at this point in the history
  • Loading branch information
murisi committed Mar 5, 2025
2 parents 5670109 + e9ca8d9 commit 978ca23
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: echo "MASP_PARAMS=$(cargo run --release --example get-params-path --features directories)" >> $GITHUB_ENV
- name: Cache MASP parameters
id: cache-params
uses: actions/cache@v3.3.2
uses: actions/cache@v4
with:
path: ${{ env.MASP_PARAMS }}
key: ${{ runner.os }}-params
Expand Down Expand Up @@ -131,6 +131,8 @@ jobs:
image: rustlang/rust:nightly
steps:
- uses: actions/checkout@v3
- name: Add target
run: rustup toolchain install 1.81.0-x86_64-unknown-linux-gnu
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Cargo Audit
Expand Down
4 changes: 4 additions & 0 deletions masp_primitives/src/transaction/components/sapling/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ impl<K> fees::InputView<(), K> for SpendDescriptionInfo<K> {
fn key(&self) -> &K {
&self.extsk
}

fn address(&self) -> Option<PaymentAddress> {
PaymentAddress::from_parts(self.diversifier, self.note.pk_d)
}
}

/// A struct containing the information required in order to construct a
Expand Down
2 changes: 2 additions & 0 deletions masp_primitives/src/transaction/components/sapling/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub trait InputView<NoteRef, Key> {
fn asset_type(&self) -> AssetType;
/// The spend/view key of the input being spent.
fn key(&self) -> &Key;
/// The payment address of this input
fn address(&self) -> Option<PaymentAddress>;
}

/// A trait that provides a minimized view of a Sapling conversion suitable for use in
Expand Down

0 comments on commit 978ca23

Please sign in to comment.