Stellar PHP SDK API Documentation

AnchorField

Describes an input field required by the anchor for deposit or withdrawal operations.

Contains metadata about a field that the user needs to provide, including a description for display, whether the field is optional, and possible values to choose from.

Used in asset definitions to specify what information is required for different operation types. Anchors should prefer SEP-9 standard fields where applicable.

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

SEP-06 Specification

see
https://github.com/stellar/stellar-protocol/blob/v1.17.0/ecosystem/sep-0009.md

SEP-9 v1.17.0 Financial Account Fields

see
DepositAsset
see
WithdrawAsset

Table of Contents

Properties

$choices  : array<string|int, string>|null
$description  : string|null
$optional  : bool|null

Methods

fromJson()  : AnchorField
Constructs a new instance of AnchorField by using the given data.

Properties

$choices

public array<string|int, string>|null $choices = null

list of possible values for the field.

$description

public string|null $description = null

description of field to show to user.

$optional

public bool|null $optional = null

if field is optional. Defaults to false.

Methods

fromJson()

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

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

the data to construct the object from.

Return values
AnchorField

the object containing the parsed data.


        
On this page

Search results