Stellar PHP SDK API Documentation

SimulateTransactionRequest

Soroban Simulate Transaction Request.

Tags
see
https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction

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

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

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"

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.


        
On this page

Search results