griffin-core 0.3.0

UTXO framework for Substrate and Polkadot.
Documentation
use crate::pallas_primitives::{alonzo, conway};

use crate::pallas_traverse::MultiEraCert;

impl<'b> MultiEraCert<'b> {
    pub fn as_alonzo(&self) -> Option<&alonzo::Certificate> {
        match self {
            MultiEraCert::AlonzoCompatible(x) => Some(x),
            _ => None,
        }
    }

    pub fn as_conway(&self) -> Option<&conway::Certificate> {
        match self {
            MultiEraCert::Conway(x) => Some(x),
            _ => None,
        }
    }
}