- /// Gets the commitment seed for a specific commitment number
- /// Note that the commitment number starts at (1 << 48) - 1 and counts backwards
- fn commitment_secret(&self, idx: u64) -> [u8; 32];
+ /// Gets the per-commitment point for a specific commitment number
+ ///
+ /// Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
+ fn get_per_commitment_point<T: secp256k1::Signing + secp256k1::Verification>(&self, idx: u64, secp_ctx: &Secp256k1<T>) -> PublicKey;
+ /// Gets the commitment secret for a specific commitment number as part of the revocation process
+ ///
+ /// An external signer implementation should error here if the commitment was already signed
+ /// and should refuse to sign it in the future.
+ ///
+ /// May be called more than once for the same index.
+ ///
+ /// Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
+ /// TODO: return a Result so we can signal a validation error
+ fn release_commitment_secret(&self, idx: u64) -> [u8; 32];