SubmitTransactionResponseExtras
in package
Represents additional submission details for transaction responses
This response contains supplementary information returned by Horizon when a transaction is submitted, particularly useful for debugging failed transactions. Includes base64-encoded XDR representations of the transaction envelope and result, plus human-readable result codes.
The envelope XDR contains the complete signed transaction as submitted, while the result XDR contains the execution outcome. Result codes provide specific error information at both the transaction and operation levels when failures occur.
Typically populated for failed transaction submissions, but may also be included in successful submissions depending on Horizon configuration.
Tags
Table of Contents
Methods
- fromJson() : SubmitTransactionResponseExtras
- Creates a SubmitTransactionResponseExtras instance from JSON data
- getEnvelopeXdr() : string
- Gets the base64-encoded transaction envelope XDR
- getResultCodes() : ExtrasResultCodes|null
- Gets the human-readable result codes
- getResultXdr() : string
- Gets the base64-encoded transaction result XDR
- loadFromJson() : void
- Loads extras data from JSON response
Methods
fromJson()
Creates a SubmitTransactionResponseExtras instance from JSON data
public
static fromJson(array<string|int, mixed> $json) : SubmitTransactionResponseExtras
Parameters
- $json : array<string|int, mixed>
-
The JSON array containing submission extras data from Horizon
Return values
SubmitTransactionResponseExtras —The parsed submission extras
getEnvelopeXdr()
Gets the base64-encoded transaction envelope XDR
public
getEnvelopeXdr() : string
Returns the XDR representation of the complete signed transaction envelope as it was submitted to the network. This includes the transaction data, signatures, and any fee-bump wrapper. Useful for debugging or resubmitting transactions.
Return values
string —The base64-encoded envelope XDR
getResultCodes()
Gets the human-readable result codes
public
getResultCodes() : ExtrasResultCodes|null
Returns detailed result codes for transaction and operation-level failures. Provides easier error diagnosis than parsing result XDR manually. Null if result codes are not included in the response.
Return values
ExtrasResultCodes|null —The result codes, or null if not available
getResultXdr()
Gets the base64-encoded transaction result XDR
public
getResultXdr() : string
Returns the XDR representation of the transaction execution result. Contains the result code, fee charged, and individual operation results. Essential for diagnosing why a transaction failed.
Return values
string —The base64-encoded result XDR
loadFromJson()
Loads extras data from JSON response
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>
-
The JSON array containing submission extras data