+}
+
+impl InMemorySignerKeys {
+ /// Create a new InMemorySignerKeys
+ pub fn new(funding_key: SecretKey, revocation_base_key: SecretKey, payment_key: SecretKey,
+ delayed_payment_base_key: SecretKey, htlc_base_key: SecretKey, commitment_seed: [u8; 32],
+ ) -> InMemorySignerKeys {
+ InMemorySignerKeys {
+ funding_key,
+ revocation_base_key,
+ payment_key,
+ delayed_payment_base_key,
+ htlc_base_key,
+ commitment_seed,
+ }
+ }
+}
+
+#[derive(Clone)]
+/// A simple implementation of Sign that just keeps the private keys in memory.
+///
+/// This implementation performs no policy checks and is insufficient by itself as
+/// a secure external signer.
+pub struct InMemorySigner {
+ /// The private key material used to sign.
+ pub key_material: InMemorySignerKeys,