@@ -75,7 +75,7 @@ pub struct DelayedPaymentOutputDescriptor {
75
75
/// The revocation point specific to the commitment transaction which was broadcast. Used to
76
76
/// derive the witnessScript for this output.
77
77
pub revocation_pubkey : PublicKey ,
78
- /// Arbitrary identification information returned by a call to [`BaseSign ::channel_keys_id`].
78
+ /// Arbitrary identification information returned by a call to [`EcdsaChannelSigner ::channel_keys_id`].
79
79
/// This may be useful in re-deriving keys used in the channel to spend the output.
80
80
pub channel_keys_id : [ u8 ; 32 ] ,
81
81
/// The value of the channel which this output originated from, possibly indirectly.
@@ -107,7 +107,7 @@ pub struct StaticPaymentOutputDescriptor {
107
107
pub outpoint : OutPoint ,
108
108
/// The output which is referenced by the given outpoint.
109
109
pub output : TxOut ,
110
- /// Arbitrary identification information returned by a call to [`BaseSign ::channel_keys_id`].
110
+ /// Arbitrary identification information returned by a call to [`EcdsaChannelSigner ::channel_keys_id`].
111
111
/// This may be useful in re-deriving keys used in the channel to spend the output.
112
112
pub channel_keys_id : [ u8 ; 32 ] ,
113
113
/// The value of the channel which this transactions spends.
@@ -172,15 +172,15 @@ pub enum SpendableOutputDescriptor {
172
172
///
173
173
/// To derive the delayed payment key which is used to sign this input, you must pass the
174
174
/// holder [`InMemorySigner::delayed_payment_base_key`] (i.e., the private key which corresponds to the
175
- /// [`ChannelPublicKeys::delayed_payment_basepoint`] in [`BaseSign ::pubkeys`]) and the provided
175
+ /// [`ChannelPublicKeys::delayed_payment_basepoint`] in [`EcdsaChannelSigner ::pubkeys`]) and the provided
176
176
/// [`DelayedPaymentOutputDescriptor::per_commitment_point`] to [`chan_utils::derive_private_key`]. The public key can be
177
177
/// generated without the secret key using [`chan_utils::derive_public_key`] and only the
178
- /// [`ChannelPublicKeys::delayed_payment_basepoint`] which appears in [`BaseSign ::pubkeys`].
178
+ /// [`ChannelPublicKeys::delayed_payment_basepoint`] which appears in [`EcdsaChannelSigner ::pubkeys`].
179
179
///
180
180
/// To derive the [`DelayedPaymentOutputDescriptor::revocation_pubkey`] provided here (which is
181
181
/// used in the witness script generation), you must pass the counterparty
182
182
/// [`ChannelPublicKeys::revocation_basepoint`] (which appears in the call to
183
- /// [`BaseSign ::provide_channel_parameters`]) and the provided
183
+ /// [`EcdsaChannelSigner ::provide_channel_parameters`]) and the provided
184
184
/// [`DelayedPaymentOutputDescriptor::per_commitment_point`] to
185
185
/// [`chan_utils::derive_public_revocation_key`].
186
186
///
@@ -191,7 +191,7 @@ pub enum SpendableOutputDescriptor {
191
191
/// [`chan_utils::get_revokeable_redeemscript`].
192
192
DelayedPaymentOutput ( DelayedPaymentOutputDescriptor ) ,
193
193
/// An output to a P2WPKH, spendable exclusively by our payment key (i.e., the private key
194
- /// which corresponds to the `payment_point` in [`BaseSign ::pubkeys`]). The witness
194
+ /// which corresponds to the `payment_point` in [`EcdsaChannelSigner ::pubkeys`]). The witness
195
195
/// in the spending input is, thus, simply:
196
196
/// ```bitcoin
197
197
/// <BIP 143 signature> <payment key>
@@ -219,7 +219,7 @@ impl_writeable_tlv_based_enum!(SpendableOutputDescriptor,
219
219
/// policies in order to be secure. Please refer to the [VLS Policy
220
220
/// Controls](https://gitlab.com/lightning-signer/validating-lightning-signer/-/blob/main/docs/policy-controls.md)
221
221
/// for an example of such policies.
222
- pub trait BaseSign {
222
+ pub trait EcdsaChannelSigner {
223
223
/// Gets the per-commitment point for a specific commitment number
224
224
///
225
225
/// Note that the commitment number starts at `(1 << 48) - 1` and counts backwards.
@@ -253,7 +253,7 @@ pub trait BaseSign {
253
253
fn pubkeys ( & self ) -> & ChannelPublicKeys ;
254
254
/// Returns an arbitrary identifier describing the set of keys which are provided back to you in
255
255
/// some [`SpendableOutputDescriptor`] types. This should be sufficient to identify this
256
- /// [`BaseSign `] object uniquely and lookup or re-derive its keys.
256
+ /// [`EcdsaChannelSigner `] object uniquely and lookup or re-derive its keys.
257
257
fn channel_keys_id ( & self ) -> [ u8 ; 32 ] ;
258
258
/// Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
259
259
///
@@ -398,7 +398,7 @@ pub trait BaseSign {
398
398
/// Set the counterparty static channel data, including basepoints,
399
399
/// `counterparty_selected`/`holder_selected_contest_delay` and funding outpoint.
400
400
///
401
- /// This data is static, and will never change for a channel once set. For a given [`BaseSign `]
401
+ /// This data is static, and will never change for a channel once set. For a given [`EcdsaChannelSigner `]
402
402
/// instance, LDK will call this method exactly once - either immediately after construction
403
403
/// (not including if done via [`SignerProvider::read_chan_signer`]) or when the funding
404
404
/// information has been generated.
@@ -414,7 +414,7 @@ pub trait BaseSign {
414
414
///
415
415
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
416
416
/// [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
417
- pub trait Sign : BaseSign + Writeable { }
417
+ pub trait Sign : EcdsaChannelSigner + Writeable { }
418
418
419
419
/// Specifies the recipient of an invoice.
420
420
///
@@ -511,7 +511,7 @@ pub trait SignerProvider {
511
511
/// To derive a new `Signer`, a fresh `channel_keys_id` should be obtained through
512
512
/// [`SignerProvider::generate_channel_keys_id`]. Otherwise, an existing `Signer` can be
513
513
/// re-derived from its `channel_keys_id`, which can be obtained through its trait method
514
- /// [`BaseSign ::channel_keys_id`].
514
+ /// [`EcdsaChannelSigner ::channel_keys_id`].
515
515
fn derive_channel_signer ( & self , channel_value_satoshis : u64 , channel_keys_id : [ u8 ; 32 ] ) -> Self :: Signer ;
516
516
517
517
/// Reads a [`Signer`] for this [`SignerProvider`] from the given input stream.
@@ -620,38 +620,38 @@ impl InMemorySigner {
620
620
621
621
/// Returns the counterparty's pubkeys.
622
622
///
623
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
623
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
624
624
pub fn counterparty_pubkeys ( & self ) -> & ChannelPublicKeys { & self . get_channel_parameters ( ) . counterparty_parameters . as_ref ( ) . unwrap ( ) . pubkeys }
625
625
/// Returns the `contest_delay` value specified by our counterparty and applied on holder-broadcastable
626
626
/// transactions, i.e., the amount of time that we have to wait to recover our funds if we
627
627
/// broadcast a transaction.
628
628
///
629
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
629
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
630
630
pub fn counterparty_selected_contest_delay ( & self ) -> u16 { self . get_channel_parameters ( ) . counterparty_parameters . as_ref ( ) . unwrap ( ) . selected_contest_delay }
631
631
/// Returns the `contest_delay` value specified by us and applied on transactions broadcastable
632
632
/// by our counterparty, i.e., the amount of time that they have to wait to recover their funds
633
633
/// if they broadcast a transaction.
634
634
///
635
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
635
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
636
636
pub fn holder_selected_contest_delay ( & self ) -> u16 { self . get_channel_parameters ( ) . holder_selected_contest_delay }
637
637
/// Returns whether the holder is the initiator.
638
638
///
639
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
639
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
640
640
pub fn is_outbound ( & self ) -> bool { self . get_channel_parameters ( ) . is_outbound_from_holder }
641
641
/// Funding outpoint
642
642
///
643
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
643
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
644
644
pub fn funding_outpoint ( & self ) -> & OutPoint { self . get_channel_parameters ( ) . funding_outpoint . as_ref ( ) . unwrap ( ) }
645
645
/// Returns a [`ChannelTransactionParameters`] for this channel, to be used when verifying or
646
646
/// building transactions.
647
647
///
648
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
648
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
649
649
pub fn get_channel_parameters ( & self ) -> & ChannelTransactionParameters {
650
650
self . channel_parameters . as_ref ( ) . unwrap ( )
651
651
}
652
652
/// Returns whether anchors should be used.
653
653
///
654
- /// Will panic if [`BaseSign ::provide_channel_parameters`] has not been called before.
654
+ /// Will panic if [`EcdsaChannelSigner ::provide_channel_parameters`] has not been called before.
655
655
pub fn opt_anchors ( & self ) -> bool {
656
656
self . get_channel_parameters ( ) . opt_anchors . is_some ( )
657
657
}
@@ -725,7 +725,7 @@ impl InMemorySigner {
725
725
}
726
726
}
727
727
728
- impl BaseSign for InMemorySigner {
728
+ impl EcdsaChannelSigner for InMemorySigner {
729
729
fn get_per_commitment_point ( & self , idx : u64 , secp_ctx : & Secp256k1 < secp256k1:: All > ) -> PublicKey {
730
730
let commitment_secret = SecretKey :: from_slice ( & chan_utils:: build_commitment_secret ( & self . commitment_seed , idx) ) . unwrap ( ) ;
731
731
PublicKey :: from_secret_key ( secp_ctx, & commitment_secret)
@@ -1452,8 +1452,8 @@ impl PhantomKeysManager {
1452
1452
}
1453
1453
}
1454
1454
1455
- // Ensure that BaseSign can have a vtable
1455
+ // Ensure that EcdsaChannelSigner can have a vtable
1456
1456
#[ test]
1457
1457
pub fn dyn_sign ( ) {
1458
- let _signer: Box < dyn BaseSign > ;
1458
+ let _signer: Box < dyn EcdsaChannelSigner > ;
1459
1459
}
0 commit comments