use {
crate::types::{Key, UpdateAuthority},
solana_pubkey::Pubkey,
};
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct AssetV1 {
pub key: Key,
pub owner: Pubkey,
pub update_authority: UpdateAuthority,
pub name: String,
pub uri: String,
pub seq: Option<u64>,
}
impl AssetV1 {
pub fn decode(data: &[u8]) -> Option<Self> {
let mut data_slice = data;
borsh::BorshDeserialize::deserialize(&mut data_slice).ok()
}
}