carbon-wavebreak-decoder 2.0.0

Wavebreak Program Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
pub mod authority_config_schema;
pub mod bonding_curve_schema;
pub mod consumed_permission_schema;
pub mod mint_config_schema;
pub mod permission_config_schema;

use juniper::GraphQLObject;
pub use {
    authority_config_schema::*, bonding_curve_schema::*, consumed_permission_schema::*,
    mint_config_schema::*, permission_config_schema::*,
};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "AccountMetadata")]
pub struct AccountMetadataGraphQL {
    pub pubkey: carbon_core::graphql::primitives::Pubkey,
    pub slot: Option<carbon_core::graphql::primitives::U64>,
}

impl From<carbon_core::postgres::metadata::AccountRowMetadata> for AccountMetadataGraphQL {
    fn from(metadata: carbon_core::postgres::metadata::AccountRowMetadata) -> Self {
        Self {
            pubkey: carbon_core::graphql::primitives::Pubkey(*metadata.pubkey),
            slot: metadata
                .slot
                .map(|v| carbon_core::graphql::primitives::U64(*v)),
        }
    }
}