+ /// Set of signer operations that are disabled. If an operation is disabled,
+ /// the signer will return `Err` when the corresponding method is called.
+ pub disabled_signer_ops: Arc<Mutex<HashSet<SignerOp>>>,
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum SignerOp {
+ GetPerCommitmentPoint,
+ ReleaseCommitmentSecret,
+ ValidateHolderCommitment,
+ SignCounterpartyCommitment,
+ ValidateCounterpartyRevocation,
+ SignHolderCommitment,
+ SignJusticeRevokedOutput,
+ SignJusticeRevokedHtlc,
+ SignHolderHtlcTransaction,
+ SignCounterpartyHtlcTransaction,
+ SignClosingTransaction,
+ SignHolderAnchorInput,
+ SignChannelAnnouncementWithFundingKey,
+}
+
+impl fmt::Display for SignerOp {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ SignerOp::GetPerCommitmentPoint => write!(f, "get_per_commitment_point"),
+ SignerOp::ReleaseCommitmentSecret => write!(f, "release_commitment_secret"),
+ SignerOp::ValidateHolderCommitment => write!(f, "validate_holder_commitment"),
+ SignerOp::SignCounterpartyCommitment => write!(f, "sign_counterparty_commitment"),
+ SignerOp::ValidateCounterpartyRevocation => write!(f, "validate_counterparty_revocation"),
+ SignerOp::SignHolderCommitment => write!(f, "sign_holder_commitment"),
+ SignerOp::SignJusticeRevokedOutput => write!(f, "sign_justice_revoked_output"),
+ SignerOp::SignJusticeRevokedHtlc => write!(f, "sign_justice_revoked_htlc"),
+ SignerOp::SignHolderHtlcTransaction => write!(f, "sign_holder_htlc_transaction"),
+ SignerOp::SignCounterpartyHtlcTransaction => write!(f, "sign_counterparty_htlc_transaction"),
+ SignerOp::SignClosingTransaction => write!(f, "sign_closing_transaction"),
+ SignerOp::SignHolderAnchorInput => write!(f, "sign_holder_anchor_input"),
+ SignerOp::SignChannelAnnouncementWithFundingKey => write!(f, "sign_channel_announcement_with_funding_key"),
+ }
+ }