Class

LiquidityPoolId

LiquidityPoolId(liquidityPoolId)

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

Constructor

# new LiquidityPoolId(liquidityPoolId)

Parameters:
Name Type Description
liquidityPoolId string

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

View Source js-stellar-base/src/liquidity_pool_id.js, line 10

Classes

LiquidityPoolId

Methods

# equals(asset) → {boolean}

Parameters:
Name Type Description
asset LiquidityPoolId

LiquidityPoolId to compare.

View Source js-stellar-base/src/liquidity_pool_id.js, line 70

true if this asset equals the given asset.

boolean

# getAssetType() → {AssetType.liquidityPoolShares}

See:

View Source js-stellar-base/src/liquidity_pool_id.js, line 62

asset type. Can only be liquidity_pool_shares.

AssetType.liquidityPoolShares

# getLiquidityPoolId() → {string}

View Source js-stellar-base/src/liquidity_pool_id.js, line 54

Liquidity pool ID.

string

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

View Source js-stellar-base/src/liquidity_pool_id.js, line 46

XDR LiquidityPoolId object

xdr.TrustLineAsset

# static fromOperation(tlAssetXdr) → {LiquidityPoolId}

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

Parameters:
Name Type Description
tlAssetXdr xdr.TrustLineAsset

The asset XDR object.

View Source js-stellar-base/src/liquidity_pool_id.js, line 27