Class

LiquidityPoolAsset

LiquidityPoolAsset(assetA, assetB, fee)

LiquidityPoolAsset class represents a liquidity pool trustline change.

Constructor

# 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 30.

View Source js-stellar-base/src/liquidity_pool_asset.js, line 16

Classes

LiquidityPoolAsset

Methods

# equals(other) → {boolean}

Parameters:
Name Type Description
other LiquidityPoolAsset

the LiquidityPoolAsset to compare

View Source js-stellar-base/src/liquidity_pool_asset.js, line 105

true if this asset equals the given asset.

boolean

# getAssetType() → {AssetType.liquidityPoolShares}

See:

View Source js-stellar-base/src/liquidity_pool_asset.js, line 97

asset type. Can only be liquidity_pool_shares.

AssetType.liquidityPoolShares

# getLiquidityPoolParameters() → {LiquidityPoolParameters}

View Source js-stellar-base/src/liquidity_pool_asset.js, line 84

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.

View Source js-stellar-base/src/liquidity_pool_asset.js, line 67

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.

View Source js-stellar-base/src/liquidity_pool_asset.js, line 42