Stellar PHP SDK API Documentation

SEP24InfoResponse extends Response

Response containing anchor capabilities and supported assets for SEP-24 operations

This class represents the response from the SEP-24 /info endpoint, which provides comprehensive information about the anchor's supported deposit and withdrawal assets, fee calculation capabilities, and additional features.

Wallets query this endpoint to discover which assets the anchor supports for deposits and withdrawals, what fields are required for each operation, and what additional features are available such as account creation or claimable balance support.

The response includes separate asset lists for deposits and withdrawals, as each asset may have different requirements and constraints depending on the operation type.

Tags
see
https://github.com/stellar/stellar-protocol/blob/v3.8.0/ecosystem/sep-0024.md

SEP-24 Specification

see
InteractiveService::info()

For retrieving this information

see
SEP24DepositAsset

For deposit asset details

see
SEP24WithdrawAsset

For withdrawal asset details

Table of Contents

Properties

$depositAssets  : array<string|int, SEP24DepositAsset>|null
$featureFlags  : FeatureFlags|null
$feeEndpointInfo  : FeeEndpointInfo|null
$withdrawAssets  : array<string|int, SEP24WithdrawAsset>|null
$httpClient  : Client|null
$rateLimitLimit  : int|null
$rateLimitRemaining  : int|null
$rateLimitReset  : int|null

Methods

fromJson()  : SEP24InfoResponse
Constructs a new instance of SEP24InfoResponse by using the given data.
getDepositAssets()  : array<string|int, SEP24DepositAsset>|null
getFeatureFlags()  : FeatureFlags|null
getFeeEndpointInfo()  : FeeEndpointInfo|null
getHttpClient()  : Client|null
Gets the HTTP client used for pagination requests
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.
getWithdrawAssets()  : array<string|int, SEP24WithdrawAsset>|null
setDepositAssets()  : void
setFeatureFlags()  : void
setFeeEndpointInfo()  : void
setHeaders()  : void
Extracts and sets rate limiting information from HTTP response headers
setHttpClient()  : void
Sets the HTTP client for making follow-up requests
setWithdrawAssets()  : void
loadFromJson()  : void
Loads the needed data from a json array.

Properties

$featureFlags

public FeatureFlags|null $featureFlags = null

Info about the additional features the anchor offers. E.g. whether the anchor supports creating accounts for users requesting deposits.

$feeEndpointInfo

public FeeEndpointInfo|null $feeEndpointInfo = null

Info about the fee endpoint (e.g. if enabled and if it requires sep-10 authentication)

$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

fromJson()

Constructs a new instance of SEP24InfoResponse by using the given data.

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

the data to construct the object from.

Return values
SEP24InfoResponse

the object containing the parsed data.

getFeatureFlags()

public getFeatureFlags() : FeatureFlags|null
Return values
FeatureFlags|null

Info about the additional features the anchor offers. E.g. whether the anchor supports creating accounts for users requesting deposits.

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

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

setFeatureFlags()

public setFeatureFlags(FeatureFlags|null $featureFlags) : void
Parameters
$featureFlags : FeatureFlags|null

Info about the additional features the anchor offers. E.g. whether the anchor supports creating accounts for users requesting deposits.

setFeeEndpointInfo()

public setFeeEndpointInfo(FeeEndpointInfo|null $feeEndpointInfo) : void
Parameters
$feeEndpointInfo : FeeEndpointInfo|null

Info about the fee endpoint (e.g. if enabled and if it requires sep-10 authentication)

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 the needed data from a json array.

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

the data array to read from.


        
On this page

Search results