carbon-mpl-token-metadata-decoder 2.0.0

MPL Token Metadata Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
use {crate::types::Key, solana_pubkey::Pubkey};

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct MasterEditionV1 {
    pub key: Key,
    pub supply: u64,
    pub max_supply: Option<u64>,
    pub printing_mint: Pubkey,
    pub one_time_printing_authorization_mint: Pubkey,
}

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

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