pub(super) fn common_nonce(&self, secp: &Secp256k1) -> Result<SecretKey, ErrorKind> {
		let hashed_nonces: Vec<SecretKey> = self
			.multisig
			.participants
			.iter()
			.filter_map(|p| p.partial_commitment.as_ref().map(|c| c.hash()))
			.filter_map(|h| h.ok().map(|h| h.to_secret_key(secp)))
			.filter_map(|s| s.ok())
			.collect();
		if hashed_nonces.len() != 2 {
			return Err(super::multisig::ErrorKind::MultiSigIncomplete.into());
		}
		let sec_key = secp.blind_sum(hashed_nonces, Vec::new())?;

		Ok(sec_key)
	}
/// Common nonce for the BulletProof is sum_i H(C_i) where C_i is the commitment of participant i
Common nonce for the BulletProof is sum_i H(C_i) where C_i is the commitment of participant i
Common nonce for the BulletProof is sum_i H ( C_i ) where C_i is the commitment of participant i
pub(super) fn common_nonce(&self, secp: &Secp256k1) -> Result<SecretKey, ErrorKind> {
		let hashed_nonces: Vec<SecretKey> = self
			.multisig
			.participants
			.iter()
			.filter_map(|p| p.partial_commitment.as_ref().map(|c| c.hash()))
			.filter_map(|h| h.ok().map(|h| h.to_secret_key(secp)))
			.filter_map(|s| s.ok())
			.collect();
		if hashed_nonces.len() != 2 {
			return Err(super::multisig::ErrorKind::MultiSigIncomplete.into());
		}
		let sec_key = secp.blind_sum(hashed_nonces, Vec::new())?;
		Ok(sec_key)
	}
pub ( super ) fn common_nonce ( & self , secp : & Secp256k1 ) -> Result < SecretKey , ErrorKind > { let hashed_nonces : Vec < SecretKey > = self . multisig . participants . iter ( ) . filter_map ( | p | p . partial_commitment . as_ref ( ) . map ( | c | c . hash ( ) ) ) . filter_map ( | h | h . ok ( ) . map ( | h | h . to_secret_key ( secp ) ) ) . filter_map ( | s | s . ok ( ) ) . collect ( ) ; if hashed_nonces . len ( ) != 2 { return Err ( super :: multisig :: ErrorKind :: MultiSigIncomplete . into ( ) ) ; } let sec_key = secp . blind_sum ( hashed_nonces , Vec :: new ( ) ) ? ; Ok ( sec_key ) }
Common nonce for the BulletProof is sum_i H(C_i) where C_i is the commitment of participant i
Common nonce for the BulletProof is sum_i H ( C_i ) where C_i is the commitment of participant i
&self
secp
&Secp256k1
&self
secp
&Secp256k1