Class SubmitTransactionResponse

java.lang.Object
org.stellar.sdk.responses.Response
org.stellar.sdk.responses.SubmitTransactionResponse

public class SubmitTransactionResponse extends Response
Represents server response after submitting transaction.
See Also:
  • Method Details

    • isSuccess

      public boolean isSuccess()
    • getEnvelopeXdr

      public Optional<String> getEnvelopeXdr()
    • getResultXdr

      public Optional<String> getResultXdr()
    • getOfferIdFromResult

      public Optional<Long> getOfferIdFromResult(int position) throws IOException
      Helper method that returns Offer ID for ManageOffer from TransactionResult Xdr. This is helpful when you need ID of an offer to update it later.
      Parameters:
      position - Position of ManageSellOffer/ManageBuyOffer operation. If it is second operation in this transaction this should be equal 1.
      Returns:
      Offer ID or null when operation at position is not a ManageSellOffer/ManageBuyOffer operation or error has occurred.
      Throws:
      IOException
    • getDecodedTransactionResult

      public Optional<TransactionResult> getDecodedTransactionResult() throws IOException
      Decoding "TransactionResult" from "resultXdr". This will be Optional.empty()() if transaction has failed.
      Throws:
      IOException
    • equals

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

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

      public String getHash()
    • getLedger

      public Long getLedger()
    • getExtras

      Additional information returned by a server. This will be null if transaction succeeded.