@@ -50,6 +50,8 @@ use core::sync::atomic::{AtomicUsize, Ordering};
50
50
use crate :: io:: { self , Error } ;
51
51
use crate :: ln:: features:: ChannelTypeFeatures ;
52
52
use crate :: ln:: msgs:: { DecodeError , MAX_VALUE_MSAT } ;
53
+ #[ cfg( taproot) ]
54
+ use crate :: sign:: taproot:: TaprootChannelSigner ;
53
55
use crate :: util:: atomic_counter:: AtomicCounter ;
54
56
use crate :: util:: chacha20:: ChaCha20 ;
55
57
use crate :: util:: invoice:: construct_invoice_preimage;
@@ -638,6 +640,9 @@ pub trait NodeSigner {
638
640
pub trait SignerProvider {
639
641
/// A type which implements [`WriteableEcdsaChannelSigner`] which will be returned by [`Self::derive_channel_signer`].
640
642
type EcdsaSigner : WriteableEcdsaChannelSigner ;
643
+ #[ cfg( taproot) ]
644
+ /// A type which implements [`TaprootChannelSigner`]
645
+ type TaprootSigner : TaprootChannelSigner ;
641
646
642
647
/// Generates a unique `channel_keys_id` that can be used to obtain a [`Self::EcdsaSigner`] through
643
648
/// [`SignerProvider::derive_channel_signer`]. The `user_channel_id` is provided to allow
@@ -1463,6 +1468,8 @@ impl NodeSigner for KeysManager {
1463
1468
1464
1469
impl SignerProvider for KeysManager {
1465
1470
type EcdsaSigner = InMemorySigner ;
1471
+ #[ cfg( taproot) ]
1472
+ type TaprootSigner = InMemorySigner ;
1466
1473
1467
1474
fn generate_channel_keys_id ( & self , _inbound : bool , _channel_value_satoshis : u64 , user_channel_id : u128 ) -> [ u8 ; 32 ] {
1468
1475
let child_idx = self . channel_child_index . fetch_add ( 1 , Ordering :: AcqRel ) ;
@@ -1570,6 +1577,8 @@ impl NodeSigner for PhantomKeysManager {
1570
1577
1571
1578
impl SignerProvider for PhantomKeysManager {
1572
1579
type EcdsaSigner = InMemorySigner ;
1580
+ #[ cfg( taproot) ]
1581
+ type TaprootSigner = InMemorySigner ;
1573
1582
1574
1583
fn generate_channel_keys_id ( & self , inbound : bool , channel_value_satoshis : u64 , user_channel_id : u128 ) -> [ u8 ; 32 ] {
1575
1584
self . inner . generate_channel_keys_id ( inbound, channel_value_satoshis, user_channel_id)
0 commit comments