AnchorField
in package
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
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.