public static IMicheline UnforgeMicheline(ForgedReader reader) { var micheline = reader.ReadMicheline(); if (!reader.EndOfStream) { throw new ArgumentException($"Did not reach EOS (position: {reader.StreamPosition})"); } return(micheline); }
public MichelineArray ReadMichelineArray() { var arrayData = ReadArray(); var res = new MichelineArray(); using (var arr = new ForgedReader(arrayData)) { while (!arr.EndOfStream) { res.Add(arr.ReadMicheline()); } } return(res); }