SimulateTransactionRequest
in package
Soroban Simulate Transaction Request.
Tags
Table of Contents
Properties
- $authMode : string|null
- $resourceConfig : ResourceConfig|null
- $transaction : Transaction
Methods
- __construct() : mixed
- Constructor.
- getAuthMode() : string|null
- Returns the authorization mode for transaction simulation.
- getRequestParams() : array<string, mixed>
- Builds and returns the request parameters array for the RPC API call.
- getResourceConfig() : ResourceConfig|null
- getTransaction() : Transaction
- setAuthMode() : void
- Sets the authorization mode for transaction simulation.
- setResourceConfig() : void
- setTransaction() : void
Properties
$authMode
public
string|null
$authMode
= null
$resourceConfig
public
ResourceConfig|null
$resourceConfig
= null
$transaction
public
Transaction
$transaction
Methods
__construct()
Constructor.
public
__construct(Transaction $transaction[, ResourceConfig|null $resourceConfig = null ][, string|null $authMode = null ]) : mixed
Parameters
- $transaction : Transaction
-
The transaction to be submitted. In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type invokeHostFunction.
- $resourceConfig : ResourceConfig|null = null
-
Contains configuration for how resources will be calculated when simulating transactions.
- $authMode : string|null = null
-
Support for non-root authorization. Only available for protocol >= 23. Possible values: "enforce" | "record" | "record_allow_nonroot"
getAuthMode()
Returns the authorization mode for transaction simulation.
public
getAuthMode() : string|null
Controls how authorization is handled during simulation.
Return values
string|null —The auth mode ("enforce", "record", or "record_allow_nonroot"), or null if not set
getRequestParams()
Builds and returns the request parameters array for the RPC API call.
public
getRequestParams() : array<string, mixed>
Return values
array<string, mixed> —The request parameters formatted for Soroban RPC
getResourceConfig()
public
getResourceConfig() : ResourceConfig|null
Return values
ResourceConfig|null —Contains configuration for how resources will be calculated when simulating transactions.
getTransaction()
public
getTransaction() : Transaction
Return values
Transaction —The transaction to be submitted. In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type invokeHostFunction.
setAuthMode()
Sets the authorization mode for transaction simulation.
public
setAuthMode(string|null $authMode) : void
Only available for protocol >= 23.
Parameters
- $authMode : string|null
-
The auth mode: "enforce" | "record" | "record_allow_nonroot"
setResourceConfig()
public
setResourceConfig(ResourceConfig|null $resourceConfig) : void
Parameters
- $resourceConfig : ResourceConfig|null
-
Contains configuration for how resources will be calculated when simulating transactions.
setTransaction()
public
setTransaction(Transaction $transaction) : void
Parameters
- $transaction : Transaction
-
The transaction to be submitted. In order for the RPC server to successfully simulate a Stellar transaction, the provided transaction must contain only a single operation of the type invokeHostFunction.