LiquidityPoolId

LiquidityPoolId

LiquidityPoolId class represents the asset referenced by a trustline to a liquidity pool.

Constructor

new LiquidityPoolId(liquidityPoolId)

Source:
Parameters:
Name Type Description
liquidityPoolId string

The ID of the liquidity pool in string 'hex'.

Classes

LiquidityPoolId

Methods

equals(asset) → {boolean}

Source:
Parameters:
Name Type Description
asset LiquidityPoolId

LiquidityPoolId to compare.

Returns:
Type:
boolean

true if this asset equals the given asset.

getAssetType() → {AssetType.liquidityPoolShares}

Source:
See:
Returns:
Type:
AssetType.liquidityPoolShares

asset type. Can only be liquidity_pool_shares.

getLiquidityPoolId() → {string}

Source:
Returns:
Type:
string

Liquidity pool ID.

toXDRObject() → {xdr.TrustLineAsset}

Returns the xdr.TrustLineAsset object for this liquidity pool ID.

Note: To convert from Asset to xdr.TrustLineAsset please refer to the Asset.toTrustLineXDRObject method.

Source:
Returns:
Type:
xdr.TrustLineAsset

XDR LiquidityPoolId object

(static) fromOperation(tlAssetXdr) → {LiquidityPoolId}

Returns a liquidity pool ID object from its xdr.TrustLineAsset representation.

Source:
Parameters:
Name Type Description
tlAssetXdr xdr.TrustLineAsset

The asset XDR object.

Returns:
Type:
LiquidityPoolId