fix: Provide access to PlutusScript bytes (#102)

This commit is contained in:
Santiago Carmuega 2022-05-03 13:54:48 -03:00 committed by GitHub
parent 82c2dd657f
commit 57d2d8e757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -910,7 +910,13 @@ impl minicbor::encode::Encode for NativeScript {
#[derive(Encode, Decode, Debug, PartialEq)]
#[cbor(transparent)]
pub struct PlutusScript(#[n(0)] ByteVec);
pub struct PlutusScript(#[n(0)] pub ByteVec);
impl AsRef<[u8]> for PlutusScript {
fn as_ref(&self) -> &[u8] {
self.0.as_slice()
}
}
/*
big_int = int / big_uint / big_nint ; New