Stellar PHP SDK API Documentation

SendTransactionResponse extends SorobanRpcResponse

Response when submitting a real transaction to the Stellar network via Soroban RPC.

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

For simulating transactions before submission

Table of Contents

Constants

STATUS_DUPLICATE  = "DUPLICATE"
The transaction has already been submitted to stellar-core
STATUS_ERROR  = "ERROR"
An error occurred from submitting the transaction to stellar-core
STATUS_PENDING  = "PENDING"
The transaction has been accepted by stellar-core
STATUS_TRY_AGAIN_LATER  = "TRY_AGAIN_LATER"
The transaction was not included in the previous 4 ledgers and is banned from the next few ledgers

Properties

$diagnosticEvents  : array<string|int, XdrDiagnosticEvent>|null
$error  : SorobanRpcErrorResponse|null
$errorResultXdr  : string|null
$hash  : string|null
$jsonResponse  : array<string|int, mixed>
$latestLedger  : int|null
$latestLedgerCloseTime  : string|null
$status  : string|null

Methods

__construct()  : mixed
fromJson()  : static
Creates an instance from JSON-RPC response data
getDiagnosticEvents()  : array<string|int, XdrDiagnosticEvent>|null
getError()  : SorobanRpcErrorResponse|null
getErrorResultXdr()  : string|null
getErrorXdrTransactionResult()  : XdrTransactionResult|null
getHash()  : string|null
getJsonResponse()  : array<string|int, mixed>
getLatestLedger()  : int|null
getLatestLedgerCloseTime()  : string|null
getStatus()  : string|null
setError()  : void
setJsonResponse()  : void

Constants

STATUS_DUPLICATE

The transaction has already been submitted to stellar-core

public mixed STATUS_DUPLICATE = "DUPLICATE"

STATUS_ERROR

An error occurred from submitting the transaction to stellar-core

public mixed STATUS_ERROR = "ERROR"

STATUS_PENDING

The transaction has been accepted by stellar-core

public mixed STATUS_PENDING = "PENDING"

STATUS_TRY_AGAIN_LATER

The transaction was not included in the previous 4 ledgers and is banned from the next few ledgers

public mixed STATUS_TRY_AGAIN_LATER = "TRY_AGAIN_LATER"

Properties

$errorResultXdr

public string|null $errorResultXdr = null

Base64-encoded TransactionResult XDR if status is ERROR

$latestLedger

public int|null $latestLedger = null

The sequence number of the latest ledger known to Soroban RPC at the time it handled the request

$latestLedgerCloseTime

public string|null $latestLedgerCloseTime = null

Unix timestamp of the latest ledger close time

$status

public string|null $status = null

The current status of the transaction (PENDING, DUPLICATE, TRY_AGAIN_LATER, or ERROR)

Methods

__construct()

public __construct(array<string|int, mixed> $jsonResponse) : mixed
Parameters
$jsonResponse : array<string|int, mixed>

The complete JSON response as data array

fromJson()

Creates an instance from JSON-RPC response data

public static fromJson(array<string, mixed> $json) : static
Parameters
$json : array<string, mixed>

The JSON response data

Return values
static

The created instance

getErrorResultXdr()

public getErrorResultXdr() : string|null
Return values
string|null

Base64-encoded TransactionResult XDR if status is ERROR

getHash()

public getHash() : string|null
Return values
string|null

Transaction hash as hex-encoded string

getJsonResponse()

public getJsonResponse() : array<string|int, mixed>
Return values
array<string|int, mixed>

The complete JSON response as data array

getLatestLedger()

public getLatestLedger() : int|null
Return values
int|null

The sequence number of the latest ledger known to Soroban RPC at the time it handled the request

getLatestLedgerCloseTime()

public getLatestLedgerCloseTime() : string|null
Return values
string|null

Unix timestamp of the latest ledger close time

getStatus()

public getStatus() : string|null
Return values
string|null

The current status of the transaction (PENDING, DUPLICATE, TRY_AGAIN_LATER, or ERROR)

setJsonResponse()

public setJsonResponse(array<string|int, mixed> $jsonResponse) : void
Parameters
$jsonResponse : array<string|int, mixed>

The complete JSON response as data array


        
On this page

Search results