Skip to content

Commit d556c3f

Browse files
committed
add sign reduced transaction deterministic
1 parent 020421d commit d556c3f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ergo-lib/src/wallet.rs

+11
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,17 @@ impl Wallet {
197197
sign_reduced_transaction(&*self.prover, reduced_tx, Some(&hints)).map_err(From::from)
198198
}
199199

200+
/// Generate signatures for P2PK inputs deterministically
201+
/// See: [`Wallet::sign_transaction_deterministic`]
202+
pub fn sign_reduced_transaction_deterministic(
203+
&self,
204+
reduced_tx: ReducedTransaction,
205+
aux_rand: &[u8],
206+
) -> Result<Transaction, WalletError> {
207+
let hints = self.generate_deterministic_commitments(&reduced_tx, aux_rand)?;
208+
sign_reduced_transaction(&*self.prover, reduced_tx, Some(&hints)).map_err(From::from)
209+
}
210+
200211
/// Signs a message
201212
#[cfg(feature = "std")]
202213
pub fn sign_message(

0 commit comments

Comments
 (0)