Class LedgerCloseMetaV1

java.lang.Object
org.stellar.sdk.xdr.LedgerCloseMetaV1
All Implemented Interfaces:
XdrElement

public class LedgerCloseMetaV1 extends Object implements XdrElement
LedgerCloseMetaV1's original definition in the XDR file is:
 struct LedgerCloseMetaV1
 {
     LedgerCloseMetaExt ext;

     LedgerHeaderHistoryEntry ledgerHeader;

     GeneralizedTransactionSet txSet;

     // NB: transactions are sorted in apply order here
     // fees for all transactions are processed first
     // followed by applying transactions
     TransactionResultMeta txProcessing<>;

     // upgrades are applied last
     UpgradeEntryMeta upgradesProcessing<>;

     // other misc information attached to the ledger close
     SCPHistoryEntry scpInfo<>;

     // Size in bytes of live Soroban state, to support downstream
     // systems calculating storage fees correctly.
     uint64 totalByteSizeOfLiveSorobanState;

     // TTL and data/code keys that have been evicted at this ledger.
     LedgerKey evictedKeys<>;

     // Maintained for backwards compatibility, should never be populated.
     LedgerEntry unused<>;
 };
 
  • Constructor Details

    • LedgerCloseMetaV1

      public LedgerCloseMetaV1()
    • LedgerCloseMetaV1

      public LedgerCloseMetaV1(LedgerCloseMetaExt ext, LedgerHeaderHistoryEntry ledgerHeader, GeneralizedTransactionSet txSet, TransactionResultMeta[] txProcessing, UpgradeEntryMeta[] upgradesProcessing, SCPHistoryEntry[] scpInfo, Uint64 totalByteSizeOfLiveSorobanState, LedgerKey[] evictedKeys, LedgerEntry[] unused)
      Creates a new LedgerCloseMetaV1 instance.
      Parameters:
      ext - the ext field value
      ledgerHeader - the ledgerHeader field value
      txSet - the txSet field value
      txProcessing - the txProcessing field value
      upgradesProcessing - the upgradesProcessing field value
      scpInfo - the scpInfo field value
      totalByteSizeOfLiveSorobanState - the totalByteSizeOfLiveSorobanState field value
      evictedKeys - the evictedKeys field value
      unused - the unused field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static LedgerCloseMetaV1 decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static LedgerCloseMetaV1 decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static LedgerCloseMetaV1 fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static LedgerCloseMetaV1 fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static LedgerCloseMetaV1 fromJson(String json)
    • builder

    • toBuilder

    • getExt

      public LedgerCloseMetaExt getExt()
      Value of the ext field.
      Returns:
      the ext field value
    • getLedgerHeader

      public LedgerHeaderHistoryEntry getLedgerHeader()
      Value of the ledgerHeader field.
      Returns:
      the ledgerHeader field value
    • getTxSet

      public GeneralizedTransactionSet getTxSet()
      Value of the txSet field.
      Returns:
      the txSet field value
    • getTxProcessing

      public TransactionResultMeta[] getTxProcessing()
      Value of the txProcessing field.
      Returns:
      the txProcessing field value
    • getUpgradesProcessing

      public UpgradeEntryMeta[] getUpgradesProcessing()
      Value of the upgradesProcessing field.
      Returns:
      the upgradesProcessing field value
    • getScpInfo

      public SCPHistoryEntry[] getScpInfo()
      Value of the scpInfo field.
      Returns:
      the scpInfo field value
    • getTotalByteSizeOfLiveSorobanState

      public Uint64 getTotalByteSizeOfLiveSorobanState()
      Value of the totalByteSizeOfLiveSorobanState field.
      Returns:
      the totalByteSizeOfLiveSorobanState field value
    • getEvictedKeys

      public LedgerKey[] getEvictedKeys()
      Value of the evictedKeys field.
      Returns:
      the evictedKeys field value
    • getUnused

      public LedgerEntry[] getUnused()
      Value of the unused field.
      Returns:
      the unused field value
    • setExt

      public void setExt(LedgerCloseMetaExt ext)
      Value of the ext field.
      Parameters:
      ext - the ext field value
    • setLedgerHeader

      public void setLedgerHeader(LedgerHeaderHistoryEntry ledgerHeader)
      Value of the ledgerHeader field.
      Parameters:
      ledgerHeader - the ledgerHeader field value
    • setTxSet

      public void setTxSet(GeneralizedTransactionSet txSet)
      Value of the txSet field.
      Parameters:
      txSet - the txSet field value
    • setTxProcessing

      public void setTxProcessing(TransactionResultMeta[] txProcessing)
      Value of the txProcessing field.
      Parameters:
      txProcessing - the txProcessing field value
    • setUpgradesProcessing

      public void setUpgradesProcessing(UpgradeEntryMeta[] upgradesProcessing)
      Value of the upgradesProcessing field.
      Parameters:
      upgradesProcessing - the upgradesProcessing field value
    • setScpInfo

      public void setScpInfo(SCPHistoryEntry[] scpInfo)
      Value of the scpInfo field.
      Parameters:
      scpInfo - the scpInfo field value
    • setTotalByteSizeOfLiveSorobanState

      public void setTotalByteSizeOfLiveSorobanState(Uint64 totalByteSizeOfLiveSorobanState)
      Value of the totalByteSizeOfLiveSorobanState field.
      Parameters:
      totalByteSizeOfLiveSorobanState - the totalByteSizeOfLiveSorobanState field value
    • setEvictedKeys

      public void setEvictedKeys(LedgerKey[] evictedKeys)
      Value of the evictedKeys field.
      Parameters:
      evictedKeys - the evictedKeys field value
    • setUnused

      public void setUnused(LedgerEntry[] unused)
      Value of the unused field.
      Parameters:
      unused - the unused field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object