Skip to content

Commit 28e4d38

Browse files
committed
Create nonce generation method on Taproot signer.
1 parent be7266d commit 28e4d38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/sign/taproot.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ use bitcoin::blockdata::transaction::Transaction;
22
use bitcoin::secp256k1;
33
use bitcoin::secp256k1::{PublicKey, schnorr::Signature, Secp256k1, SecretKey};
44

5-
use musig2::types::PartialSignature;
5+
use musig2::types::{PartialSignature, PublicNonce};
66

77
use crate::events::bump_transaction::HTLCDescriptor;
88
use crate::ln::chan_utils::{ClosingTransaction, CommitmentTransaction, HolderCommitmentTransaction, HTLCOutputInCommitment};
99
use crate::ln::PaymentPreimage;
1010
use crate::sign::ChannelSigner;
1111

12-
trait TaprootSigner: ChannelSigner {
12+
pub trait TaprootSigner: ChannelSigner {
13+
fn generate_local_nonce_pair(&self, secp_ctx: &Secp256k1<secp256k1::All>) -> PublicNonce;
14+
1315
/// Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
1416
///
1517
/// Note that if signing fails or is rejected, the channel will be force-closed.

0 commit comments

Comments
 (0)