//! This code was AUTOGENERATED using the Codama library.
use crate::types::Key;

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct HashedAssetV1 {
    pub key: Key,
    pub hash: [u8; 32],
}

impl HashedAssetV1 {
    pub fn decode(data: &[u8]) -> Option<Self> {
        let mut data_slice = data;

        borsh::BorshDeserialize::deserialize(&mut data_slice).ok()
    }
}
