From cdacf2a101c4ddbaf06ac79ef3b17d5044ef015d Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 22 Dec 2024 19:36:24 +0100 Subject: [PATCH] seals: improve mmb APIs --- seals/src/txout.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seals/src/txout.rs b/seals/src/txout.rs index 0f2c02ab..54276b9b 100644 --- a/seals/src/txout.rs +++ b/seals/src/txout.rs @@ -72,12 +72,16 @@ pub mod mmb { fn from(hasher: Sha256) -> Self { hasher.finish().into() } } + impl From for mpc::Message { + fn from(msg: Commitment) -> Self { mpc::Message::from_byte_array(msg.to_byte_array()) } + } + #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)] #[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)] #[strict_type(lib = dbc::LIB_NAME_BPCORE)] #[derive(CommitEncode)] #[commit_encode(strategy = strict, id = Commitment)] - #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(rename_all = "camelCase"))] + #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct BundleProof { pub map: SmallOrdMap, }