ReserveResponse
in package
Represents a reserve in a liquidity pool
Contains the amount and asset type for one of the reserves in a liquidity pool. Liquidity pools typically have two reserves representing the paired assets.
Tags
Table of Contents
Methods
- fromJson() : ReserveResponse
- getAmount() : string
- Gets the amount of the asset in this reserve
- getAsset() : Asset
- Gets the asset type for this reserve
- loadFromJson() : void
Methods
fromJson()
public
static fromJson(array<string|int, mixed> $json) : ReserveResponse
Parameters
- $json : array<string|int, mixed>
Return values
ReserveResponsegetAmount()
Gets the amount of the asset in this reserve
public
getAmount() : string
Return values
string —The reserve amount as a string to preserve precision
getAsset()
Gets the asset type for this reserve
public
getAsset() : Asset
Return values
Asset —The asset object
loadFromJson()
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>