diff --git a/rust/trezor-client/src/client/mod.rs b/rust/trezor-client/src/client/mod.rs index 4666e84595..f541883df8 100644 --- a/rust/trezor-client/src/client/mod.rs +++ b/rust/trezor-client/src/client/mod.rs @@ -238,4 +238,17 @@ impl Trezor { req.set_ecdsa_curve_name(curve); self.call(req, Box::new(|_, m| Ok(m.signature().to_owned()))) } + + pub fn get_ecdh_session_key( + &mut self, + identity: protos::IdentityType, + peer_public_key: Vec, + curve: String, + ) -> Result> { + let mut req = protos::GetECDHSessionKey::new(); + req.identity = MessageField::some(identity); + req.set_peer_public_key(peer_public_key); + req.set_ecdsa_curve_name(curve); + self.call(req, Box::new(|_, m| Ok(m))) + } }