feat: Provide access to all assets at a tx out (#180)

This commit is contained in:
Lucas 2022-09-16 16:53:45 -04:00 committed by GitHub
parent 55db5eb34d
commit 32c05c6ff7
3 changed files with 100 additions and 4 deletions

View file

@ -1,6 +1,6 @@
use minicbor::{data::Tag, Decode, Encode};
use serde::{Deserialize, Serialize};
use std::ops::Deref;
use std::{fmt, ops::Deref};
/// Utility for skipping parts of the CBOR payload, use only for debugging
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord)]
@ -778,6 +778,14 @@ impl From<Bytes> for String {
}
}
impl fmt::Display for Bytes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let bytes: Vec<u8> = self.clone().into();
f.write_str(&hex::encode(bytes))
}
}
#[derive(
Serialize, Deserialize, Clone, Copy, Encode, Decode, Debug, PartialEq, Eq, PartialOrd, Ord,
)]