ScriptRefType.deserialize constructor
ScriptRefType.deserialize(
- CborIntValue cbor, {
- ScriptRefType? validate,
Deserializes a ScriptRefType instance from CBOR.
Implementation
factory ScriptRefType.deserialize(CborIntValue cbor,
{ScriptRefType? validate}) {
final type = fromValue(cbor.value);
if (validate != null && type != validate) {
throw MessageException("Invalid ScriptRefType.",
details: {"Expected": validate, "Type": type});
}
return fromValue(cbor.value);
}