SendTransactionResponse
extends SorobanRpcResponse
in package
Response when submitting a real transaction to the Stellar network via Soroban RPC.
Tags
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
$diagnosticEvents
public
array<string|int, XdrDiagnosticEvent>|null
$diagnosticEvents
= null
Diagnostic events if status is ERROR
$error
public
SorobanRpcErrorResponse|null
$error
= null
Error data if the response is an error response
$errorResultXdr
public
string|null
$errorResultXdr
= null
Base64-encoded TransactionResult XDR if status is ERROR
$hash
public
string|null
$hash
= null
Transaction hash as hex-encoded string
$jsonResponse
public
array<string|int, mixed>
$jsonResponse
$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
getDiagnosticEvents()
public
getDiagnosticEvents() : array<string|int, XdrDiagnosticEvent>|null
Return values
array<string|int, XdrDiagnosticEvent>|null —Diagnostic events if status is ERROR
getError()
public
getError() : SorobanRpcErrorResponse|null
Return values
SorobanRpcErrorResponse|null —Error data if the response is an error response
getErrorResultXdr()
public
getErrorResultXdr() : string|null
Return values
string|null —Base64-encoded TransactionResult XDR if status is ERROR
getErrorXdrTransactionResult()
public
getErrorXdrTransactionResult() : XdrTransactionResult|null
Tags
Return values
XdrTransactionResult|null —TransactionResult XDR object containing error details 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)
setError()
public
setError(SorobanRpcErrorResponse|null $error) : void
Parameters
- $error : SorobanRpcErrorResponse|null
-
Error data if the response is an error response
setJsonResponse()
public
setJsonResponse(array<string|int, mixed> $jsonResponse) : void
Parameters
- $jsonResponse : array<string|int, mixed>
-
The complete JSON response as data array