Stellar PHP SDK API Documentation

SEP38Asset
in package

Asset information including delivery methods and country availability for SEP-38.

This class represents a single asset supported by an anchor's quote service, including optional delivery methods for buying and selling the asset, and country code restrictions.

Tags
see
https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#get-info
see
SEP38InfoResponse
see
SEP38SellDeliveryMethod
see
SEP38BuyDeliveryMethod

Table of Contents

Properties

$asset  : string
$buyDeliveryMethods  : array<string|int, mixed>|null
$countryCodes  : array<string|int, mixed>|null
$sellDeliveryMethods  : array<string|int, mixed>|null

Methods

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

Properties

$buyDeliveryMethods

public array<string|int, mixed>|null $buyDeliveryMethods = null

$countryCodes

public array<string|int, mixed>|null $countryCodes = null

$sellDeliveryMethods

public array<string|int, mixed>|null $sellDeliveryMethods = null

Methods

__construct()

public __construct(string $asset[, array<string|int, SEP38SellDeliveryMethod>|null $sellDeliveryMethods = null ][, array<string|int, SEP38SellDeliveryMethod>|null $buyDeliveryMethods = null ][, array<string|int, string>|null $countryCodes = null ]) : mixed
Parameters
$asset : string

The asset identifier in Stellar Asset Identification Format or one of the allowed off-chain assets.

$sellDeliveryMethods : array<string|int, SEP38SellDeliveryMethod>|null = null

Optional delivery methods for selling the asset to the anchor.

$buyDeliveryMethods : array<string|int, SEP38SellDeliveryMethod>|null = null

Optional delivery methods for buying the asset from the anchor.

$countryCodes : array<string|int, string>|null = null

Optional ISO country codes where the asset is available.

fromJson()

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

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

the data to construct the object from.

Return values
SEP38Asset

the object containing the parsed data.


        
On this page

Search results