Stellar PHP SDK API Documentation

ChangeTrustOperationResponse extends OperationResponse

Represents a change trust operation response from Horizon API

This operation creates, updates, or deletes a trustline from the source account to an asset or liquidity pool. Contains trustline details including trustor, trustee, asset, and limit.

Tags
see
OperationResponse

Base operation response

see
https://developers.stellar.org

Stellar developer docs Horizon Change Trust

since
1.0.0

Table of Contents

Properties

$transactionSuccessful  : bool
$httpClient  : Client|null
$rateLimitLimit  : int|null
$rateLimitRemaining  : int|null
$rateLimitReset  : int|null

Methods

fromJson()  : ChangeTrustOperationResponse
getAssetCode()  : string|null
Gets the asset code if applicable
getAssetIssuer()  : string|null
Gets the asset issuer if applicable
getAssetType()  : string
Gets the asset type
getCreatedAt()  : string
Gets the timestamp when this operation was created
getHttpClient()  : Client|null
Gets the HTTP client used for pagination requests
getHumanReadableOperationType()  : string
Gets the human-readable operation type name
getLimit()  : string|null
Gets the trust limit
getLinks()  : OperationLinksResponse
Gets the hypermedia links to related resources
getLiquidityPoolId()  : string|null
Gets the liquidity pool ID if trusting a pool
getOperationId()  : string
Gets the unique identifier for this operation
getOperationType()  : int
Gets the operation type as an integer code
getPagingToken()  : string
Gets the paging token for this operation in list results
getRateLimitLimit()  : int|null
Returns X-RateLimit-Limit header from the response.
getRateLimitRemaining()  : int|null
Returns X-RateLimit-Remaining header from the response.
getRateLimitReset()  : int|null
Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
getSourceAccount()  : string
Gets the source account for this operation
getSourceAccountMuxed()  : string|null
Gets the multiplexed source account if applicable
getSourceAccountMuxedId()  : string|null
Gets the multiplexed source account ID if applicable
getTransaction()  : TransactionResponse|null
Gets the full transaction details if requested via join parameter
getTransactionHash()  : string
Gets the hash of the transaction containing this operation
getTrustee()  : string|null
Gets the account or pool being trusted
getTrustor()  : string
Gets the account creating or modifying the trustline
getTrustorMuxed()  : string|null
Gets the multiplexed trustor account if applicable
getTrustorMuxedId()  : string|null
Gets the multiplexed trustor account ID if applicable
isTransactionSuccessful()  : bool
Checks if the parent transaction was successful
setHeaders()  : void
Extracts and sets rate limiting information from HTTP response headers
setHttpClient()  : void
Sets the HTTP client for making follow-up requests
loadFromJson()  : void
Loads response data from a JSON array

Properties

$httpClient

protected Client|null $httpClient = null

$rateLimitLimit

protected int|null $rateLimitLimit = null

$rateLimitRemaining

protected int|null $rateLimitRemaining = null

$rateLimitReset

protected int|null $rateLimitReset = null

Methods

getAssetCode()

Gets the asset code if applicable

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

The asset code or null for native or pools

getAssetIssuer()

Gets the asset issuer if applicable

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

The issuer account ID or null for native or pools

getAssetType()

Gets the asset type

public getAssetType() : string
Return values
string

The asset type (native, credit_alphanum4, credit_alphanum12, or liquidity_pool_shares)

getCreatedAt()

Gets the timestamp when this operation was created

public getCreatedAt() : string
Return values
string

The creation time in ISO 8601 format

getHttpClient()

Gets the HTTP client used for pagination requests

public getHttpClient() : Client|null
Return values
Client|null

The HTTP client instance, or null if not set

getHumanReadableOperationType()

Gets the human-readable operation type name

public getHumanReadableOperationType() : string

Examples: "payment", "create_account", "manage_sell_offer"

Return values
string

The operation type as a string

getLimit()

Gets the trust limit

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

The maximum amount that can be held, or null for unlimited

getLiquidityPoolId()

Gets the liquidity pool ID if trusting a pool

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

The liquidity pool ID or null if trusting an asset

getOperationId()

Gets the unique identifier for this operation

public getOperationId() : string
Return values
string

The operation ID

getOperationType()

Gets the operation type as an integer code

public getOperationType() : int
Return values
int

The operation type code matching OperationType constants

getPagingToken()

Gets the paging token for this operation in list results

public getPagingToken() : string
Return values
string

The paging token used for cursor-based pagination

getRateLimitLimit()

Returns X-RateLimit-Limit header from the response.

public getRateLimitLimit() : int|null

This number represents the he maximum number of requests that the current client can make in one hour.

Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

getRateLimitRemaining()

Returns X-RateLimit-Remaining header from the response.

public getRateLimitRemaining() : int|null

The number of remaining requests for the current window.

Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

getRateLimitReset()

Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.

public getRateLimitReset() : int|null
Tags
see
https://developers.stellar.org

Stellar developer docs Rate limiting documentation

Return values
int|null

getSourceAccount()

Gets the source account for this operation

public getSourceAccount() : string
Return values
string

The source account ID

getSourceAccountMuxed()

Gets the multiplexed source account if applicable

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

The muxed source account address, or null if not muxed

getSourceAccountMuxedId()

Gets the multiplexed source account ID if applicable

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

The muxed account ID, or null if not muxed

getTransactionHash()

Gets the hash of the transaction containing this operation

public getTransactionHash() : string
Return values
string

The transaction hash

getTrustee()

Gets the account or pool being trusted

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

The trustee account ID or null for liquidity pools

getTrustor()

Gets the account creating or modifying the trustline

public getTrustor() : string
Return values
string

The trustor account ID

getTrustorMuxed()

Gets the multiplexed trustor account if applicable

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

The muxed trustor account address or null

getTrustorMuxedId()

Gets the multiplexed trustor account ID if applicable

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

The muxed trustor account ID or null

isTransactionSuccessful()

Checks if the parent transaction was successful

public isTransactionSuccessful() : bool
Return values
bool

True if the transaction succeeded

setHeaders()

Extracts and sets rate limiting information from HTTP response headers

public setHeaders(array<string|int, mixed> $headers) : void

This method processes the X-Ratelimit-* headers from the HTTP response and stores them for client access.

Parameters
$headers : array<string|int, mixed>

Associative array of HTTP headers from the response

setHttpClient()

Sets the HTTP client for making follow-up requests

public setHttpClient([Client|null $httpClient = null ]) : void

Paginated responses contain links to next/previous pages. This HTTP client is used when following those links to fetch additional pages.

Parameters
$httpClient : Client|null = null

The Guzzle HTTP client to use for pagination

loadFromJson()

Loads response data from a JSON array

protected loadFromJson(array<string|int, mixed> $json) : void

This method is used internally to populate response objects from parsed JSON. Subclasses override this to extract their specific data fields.

Parameters
$json : array<string|int, mixed>

Associative array of parsed JSON data


        
On this page

Search results