# new LiquidityPoolAsset(assetA, assetB, fee)
Parameters:
Name | Type | Description |
---|---|---|
assetA |
Asset
|
– The first asset in the Pool, it must respect the rule assetA < assetB. See Asset.compare for more details on how assets are sorted. |
assetB |
Asset
|
– The second asset in the Pool, it must respect the rule assetA < assetB. See Asset.compare for more details on how assets are sorted. |
fee |
number
|
– The liquidity pool fee. For now the only fee supported is |
Classes
Methods
# equals(other) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
other |
LiquidityPoolAsset
|
the LiquidityPoolAsset to compare |
true
if this asset equals the given asset.
boolean
# getAssetType() → {AssetType.liquidityPoolShares}
asset type. Can only be liquidity_pool_shares
.
AssetType.liquidityPoolShares
# getLiquidityPoolParameters() → {LiquidityPoolParameters}
Liquidity pool parameters.
LiquidityPoolParameters
# toXDRObject() → {xdr.ChangeTrustAsset}
Returns the xdr.ChangeTrustAsset
object for this liquidity pool asset.
Note: To convert from an Asset
to xdr.ChangeTrustAsset
please refer to the
Asset.toChangeTrustXDRObject
method.
XDR ChangeTrustAsset object.
xdr.ChangeTrustAsset
# static fromOperation(ctAssetXdr) → {LiquidityPoolAsset}
Returns a liquidity pool asset object from its XDR ChangeTrustAsset object representation.
Parameters:
Name | Type | Description |
---|---|---|
ctAssetXdr |
xdr.ChangeTrustAsset
|
The asset XDR object. |