public static LedgerHeader Decode(XdrDataInputStream stream) { var decodedLedgerHeader = new LedgerHeader(); decodedLedgerHeader.LedgerVersion = Uint32.Decode(stream); decodedLedgerHeader.PreviousLedgerHash = Hash.Decode(stream); decodedLedgerHeader.ScpValue = StellarValue.Decode(stream); decodedLedgerHeader.TxSetResultHash = Hash.Decode(stream); decodedLedgerHeader.BucketListHash = Hash.Decode(stream); decodedLedgerHeader.LedgerSeq = Uint32.Decode(stream); decodedLedgerHeader.TotalCoins = Int64.Decode(stream); decodedLedgerHeader.FeePool = Int64.Decode(stream); decodedLedgerHeader.InflationSeq = Uint32.Decode(stream); decodedLedgerHeader.IdPool = Uint64.Decode(stream); decodedLedgerHeader.BaseFee = Uint32.Decode(stream); decodedLedgerHeader.BaseReserve = Uint32.Decode(stream); decodedLedgerHeader.MaxTxSetSize = Uint32.Decode(stream); var skipListsize = 4; decodedLedgerHeader.SkipList = new Hash[skipListsize]; for (var i = 0; i < skipListsize; i++) { decodedLedgerHeader.SkipList[i] = Hash.Decode(stream); } decodedLedgerHeader.Ext = LedgerHeaderExt.Decode(stream); return(decodedLedgerHeader); }