Class SimulateTransactionRequest

java.lang.Object
org.stellar.sdk.requests.sorobanrpc.SimulateTransactionRequest

public final class SimulateTransactionRequest extends Object
Request for JSON-RPC method simulateTransaction.
See Also:
  • Constructor Details

    • SimulateTransactionRequest

      public SimulateTransactionRequest(String transaction, SimulateTransactionRequest.ResourceConfig resourceConfig, SimulateTransactionRequest.AuthMode authMode, boolean useUpgradedAuth)
      Creates a new SimulateTransactionRequest instance.
      Parameters:
      transaction -
      resourceConfig -
      authMode - Explicitly allows users to opt-in to non-root authorization in recording mode.

      Leaving this field unset will default to SimulateTransactionRequest.AuthMode.ENFORCE if auth entries are present, SimulateTransactionRequest.AuthMode.RECORD otherwise.

      useUpgradedAuth - Whether simulation records ADDRESS_V2 ("upgraded") authorization credentials (CAP-71) instead of the legacy ADDRESS credentials. This maps to the useUpgradedAuth flag introduced in Stellar RPC v27.1.0, and is always sent in the request. It only affects the recording auth modes and is silently ignored by RPC servers (or protocol versions) that cannot emit ADDRESS_V2. Transitional: once the network returns ADDRESS_V2 credentials by default (protocol 28), it becomes a no-op.
  • Method Details

    • getTransaction

      public String getTransaction()
    • getResourceConfig

      public SimulateTransactionRequest.ResourceConfig getResourceConfig()
    • getAuthMode

      Explicitly allows users to opt-in to non-root authorization in recording mode.

      Leaving this field unset will default to SimulateTransactionRequest.AuthMode.ENFORCE if auth entries are present, SimulateTransactionRequest.AuthMode.RECORD otherwise.

    • isUseUpgradedAuth

      public boolean isUseUpgradedAuth()
      Whether simulation records ADDRESS_V2 ("upgraded") authorization credentials (CAP-71) instead of the legacy ADDRESS credentials. This maps to the useUpgradedAuth flag introduced in Stellar RPC v27.1.0, and is always sent in the request. It only affects the recording auth modes and is silently ignored by RPC servers (or protocol versions) that cannot emit ADDRESS_V2. Transitional: once the network returns ADDRESS_V2 credentials by default (protocol 28), it becomes a no-op.
    • 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