metaplex-foundation / mpl-token-metadata

Program to attach additional data to Fungible or Non-Fungible tokens on Solana.
https://developers.metaplex.com/token-metadata
Other
124 stars 65 forks source link

Add deprecated MasterEditionV1 to clients #86

Closed danenbm closed 8 months ago

danenbm commented 8 months ago

This is needed for MasterEditionV1 parsing in blockbuster which supports DAS API (digital-asset-rpc-infrastructure).

The only thing I need it for in blockbuster is to deserialize and save the type using the Rust client. The exact use case is:

let key = Key::try_from_slice(&account_data[0..1])?;
let token_metadata_account_state = match key {
    ...
    Key::MasterEditionV1 => {
        let account: DeprecatedMasterEditionV1 = try_from_slice_unchecked(&account_data)?;

        TokenMetadataAccountState {
            key: account.key,
            data: TokenMetadataAccountData::MasterEditionV1(account),
        }
    }