+/// Set of lightning keys needed to operate a channel as described in BOLT 3.
+///
+/// If you're implementing a custom signer, you almost certainly want to implement
+/// Readable/Writable to serialize out a unique reference to this set of keys so
+/// that you can serialize the full ChannelManager object.
+///
+/// (TODO: We shouldn't require that, and should have an API to get them at deser time, due mostly
+/// to the possibility of reentrancy issues by calling the user's code during our deserialization
+/// routine).
+pub trait ChannelKeys : Send {
+ /// Gets the private key for the anchor tx
+ fn funding_key<'a>(&'a self) -> &'a SecretKey;
+ /// Gets the local secret key for blinded revocation pubkey
+ fn revocation_base_key<'a>(&'a self) -> &'a SecretKey;
+ /// Gets the local secret key used in commitment tx htlc outputs
+ fn payment_base_key<'a>(&'a self) -> &'a SecretKey;
+ /// Gets the local secret key used in HTLC tx
+ fn delayed_payment_base_key<'a>(&'a self) -> &'a SecretKey;
+ /// Gets the local htlc secret key used in commitment tx htlc outputs
+ fn htlc_base_key<'a>(&'a self) -> &'a SecretKey;
+ /// Gets the commitment seed
+ fn commitment_seed<'a>(&'a self) -> &'a [u8; 32];
+}
+