SEP24InfoResponse
extends Response
in package
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
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
$depositAssets
public
array<string|int, SEP24DepositAsset>|null
$depositAssets
= null
deposit assets of the info response.
$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)
$withdrawAssets
public
array<string|int, SEP24WithdrawAsset>|null
$withdrawAssets
= null
withdrawal assets of the info response.
$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.
getDepositAssets()
public
getDepositAssets() : array<string|int, SEP24DepositAsset>|null
Return values
array<string|int, SEP24DepositAsset>|null —deposit assets of the info response.
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.
getFeeEndpointInfo()
public
getFeeEndpointInfo() : FeeEndpointInfo|null
Return values
FeeEndpointInfo|null —Info about the fee endpoint (e.g. if enabled and if it requires sep-10 authentication)
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
Return values
int|nullgetRateLimitRemaining()
Returns X-RateLimit-Remaining header from the response.
public
getRateLimitRemaining() : int|null
The number of remaining requests for the current window.
Tags
Return values
int|nullgetRateLimitReset()
Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
public
getRateLimitReset() : int|null
Tags
Return values
int|nullgetWithdrawAssets()
public
getWithdrawAssets() : array<string|int, SEP24WithdrawAsset>|null
Return values
array<string|int, SEP24WithdrawAsset>|null —withdrawal assets of the info response.
setDepositAssets()
public
setDepositAssets(array<string|int, SEP24DepositAsset>|null $depositAssets) : void
Parameters
- $depositAssets : array<string|int, SEP24DepositAsset>|null
-
deposit assets of the info response.
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
setWithdrawAssets()
public
setWithdrawAssets(array<string|int, SEP24WithdrawAsset>|null $withdrawAssets) : void
Parameters
- $withdrawAssets : array<string|int, SEP24WithdrawAsset>|null
-
withdrawal assets of the info response.
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.