chore(utxorpc): update spec to v0.14 and update redeemer mapper (#559)
Co-authored-by: ricomiles <ricoquiblat@gmail.com>
This commit is contained in:
parent
e2aa8139fc
commit
ac66eb9473
4 changed files with 49 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use pallas_codec::minicbor;
|
||||
use pallas_primitives::{alonzo, conway};
|
||||
|
||||
use crate::MultiEraRedeemer;
|
||||
|
|
@ -78,4 +79,11 @@ impl<'b> MultiEraRedeemer<'b> {
|
|||
})),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn encode(&self) -> Vec<u8> {
|
||||
match self {
|
||||
MultiEraRedeemer::AlonzoCompatible(x) => minicbor::to_vec(x).unwrap(),
|
||||
MultiEraRedeemer::Conway(k, v) => minicbor::to_vec((k, v)).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue