- pub fn process_act_one_with_key(&mut self, act_one: &[u8], our_node_secret: &SecretKey) -> Result<[u8; 50], HandleError> {
- assert_eq!(act_one.len(), 50);
-
- let mut rng = thread_rng();
- let mut key = [0u8; 32];
- rng.fill_bytes(&mut key);
- let our_ephemeral_key = SecretKey::from_slice(&self.secp_ctx, &key).unwrap(); //TODO: nicer rng-is-bad error message
- self.process_act_one_with_ephemeral_key(act_one, our_node_secret, our_ephemeral_key)
- }
-
- pub fn process_act_two(&mut self, act_two: &[u8], our_node_secret: &SecretKey) -> Result<[u8; 66], HandleError> {
+ pub fn process_act_two(&mut self, act_two: &[u8], our_node_secret: &SecretKey) -> Result<([u8; 66], PublicKey), HandleError> {