+/// Wrapper for logging a [`PublicKey`] in hex format.
+/// (C-not exported) as fmt can't be used in C
+#[doc(hidden)]
+pub struct DebugPubKey<'a>(pub &'a PublicKey);
+impl<'a> core::fmt::Display for DebugPubKey<'a> {
+ fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> {
+ for i in self.0.serialize().iter() {
+ write!(f, "{:02x}", i)?;
+ }
+ Ok(())
+ }
+}
+