Stellar PHP SDK API Documentation

WithdrawExchangeAsset

Describes anchor support and parameters for a withdrawal exchange asset.

Contains information about whether withdrawal exchange operations are enabled for an asset, authentication requirements, fee structure, amount limits, and withdrawal type specifications.

Returned as part of the info endpoint response to indicate which assets are available for withdraw-exchange operations and under what conditions.

Tags
see
https://github.com/stellar/stellar-protocol/blob/v4.3.0/ecosystem/sep-0006.md

SEP-06 Specification

see
InfoResponse

Table of Contents

Properties

$authenticationRequired  : bool|null
$enabled  : bool
$feeFixed  : float|null
$feePercent  : float|null
$maxAmount  : float|null
$minAmount  : float|null
$types  : array<string|int, array<string|int, AnchorField>|null>|null
A field with each type of withdrawal supported for that asset as a key.

Methods

__construct()  : mixed
fromJson()  : WithdrawExchangeAsset
Constructs a new instance of WithdrawExchangeAsset by using the given data.

Properties

$authenticationRequired

public bool|null $authenticationRequired = null

Optional. true if client must be authenticated before accessing the withdraw endpoint for this asset. false if not specified.

$feeFixed

public float|null $feeFixed = null

Optional fixed (flat) fee for withdraw, in units of the Stellar asset. Null if there is no fee or the fee schedule is complex.

$feePercent

public float|null $feePercent = null

Optional percentage fee for withdraw, in percentage points of the Stellar asset. Null if there is no fee or the fee schedule is complex.

$maxAmount

public float|null $maxAmount = null

Optional maximum amount. No limit if not specified.

$minAmount

public float|null $minAmount = null

Optional minimum amount. No limit if not specified.

$types

A field with each type of withdrawal supported for that asset as a key.

public array<string|int, array<string|int, AnchorField>|null>|null $types = null

Each type can specify a fields object explaining what fields are needed and what they do. Anchors are encouraged to use SEP-9 financial account fields, but can also define custom fields if necessary. If a fields object is not specified, the wallet should assume that no extra fields are needed for that type of withdrawal. In the case that the Anchor requires additional fields for a withdrawal, it should set the transaction status to pending_customer_info_update. The wallet can query the /transaction endpoint to get the fields needed to complete the transaction in required_customer_info_updates and then use SEP-12 to collect the information from the user.

Methods

__construct()

public __construct(bool $enabled) : mixed
Parameters
$enabled : bool

true if SEP-6 withdrawal exchange for this asset is supported

fromJson()

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

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

the data to construct the object from.

Return values
WithdrawExchangeAsset

the object containing the parsed data.


        
On this page

Search results