Skip to content

Commit

Permalink
Merge pull request #796 from Alesfatalis/sign_reduced_tx_deterministic
Browse files Browse the repository at this point in the history
Sign reduced transaction deterministic
  • Loading branch information
SethDusek authored Dec 19, 2024
2 parents 020421d + d556c3f commit 1d4ef47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ergo-lib/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ impl Wallet {
sign_reduced_transaction(&*self.prover, reduced_tx, Some(&hints)).map_err(From::from)
}

/// Generate signatures for P2PK inputs deterministically
/// See: [`Wallet::sign_transaction_deterministic`]
pub fn sign_reduced_transaction_deterministic(
&self,
reduced_tx: ReducedTransaction,
aux_rand: &[u8],
) -> Result<Transaction, WalletError> {
let hints = self.generate_deterministic_commitments(&reduced_tx, aux_rand)?;
sign_reduced_transaction(&*self.prover, reduced_tx, Some(&hints)).map_err(From::from)
}

/// Signs a message
#[cfg(feature = "std")]
pub fn sign_message(
Expand Down

0 comments on commit 1d4ef47

Please sign in to comment.