Class: ChromaticLens
A class representing Chromatic Lens, which provides access to liquidity-related functions.
Constructors
constructor
• new ChromaticLens(_client
)
Creates a new instance of ChromaticLens.
Parameters
Name | Type | Description |
---|---|---|
_client | Client | The Chromatic Client instance. |
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:90
Methods
claimableLiquidities
▸ claimableLiquidities(marketAddress
, params
): Promise
<{ [tradingFeeRate: string | number]
: { [oracleVersion: string | number]
: ClaimableLiquidityResult
; }; }>
Retrieves the claimable liquidities for a given market and parameters.
Parameters
Name | Type | Description |
---|---|---|
marketAddress | string | The address of the Chromatic Market contract. |
params | { oracleVersion : BigNumber ; tradingFeeRate : number }[] | An array of objects containing tradingFeeRate and oracleVersion. |
Returns
Promise
<{ [tradingFeeRate: string | number]
: { [oracleVersion: string | number]
: ClaimableLiquidityResult
; }; }>
A promise that resolves to an object with mappings between tradingFee and oracleVersion.
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:205
contracts
▸ contracts(): Object
Retrieves the ChromaticLens contract.
Returns
Object
The ChromaticLens contract.
Name | Type |
---|---|
lens | ChromaticLens |
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:103
liquidityBins
▸ liquidityBins(marketAddress
): Promise
<LiquidityBinResult
[]>
Retrieves the liquidity bins for a given market.
Parameters
Name | Type | Description |
---|---|---|
marketAddress | string | The address of the Chromatic Market contract. |
Returns
Promise
<LiquidityBinResult
[]>
A promise that resolves to an array of LiquidityBinResult.
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:114
lpReceipts
▸ lpReceipts(marketAddress
, owner?
): Promise
<LpReceiptStructOutput
[]>
Retrieves the LP receipts for a given market and owner.
Parameters
Name | Type | Description |
---|---|---|
marketAddress | string | The address of the Chromatic Market contract. |
owner? | string | The address of the LP owner. |
Returns
Promise
<LpReceiptStructOutput
[]>
A promise that resolves to the LP receipts.
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:283
ownedLiquidityBins
▸ ownedLiquidityBins(marketAddress
, ownerAddress?
): Promise
<OwnedLiquidityBinResult
[]>
Retrieves the owned liquidity bins for a given market and owner.
Parameters
Name | Type | Description |
---|---|---|
marketAddress | string | The address of the Chromatic Market contract. |
ownerAddress? | string | The address of the liquidity owner. |
Returns
Promise
<OwnedLiquidityBinResult
[]>
A promise that resolves to an array of OwnedLiquidityBinResult.
Defined in
packages/sdk-ethers-v5/src/entities/ChromaticLens.ts:149
pendingLiquidityBatch
▸ pendingLiquidityBatch(marketAddress
, tradingFeeRates
): Promise
<PendingLiquidityResult
[]>
Retrieves the pending liquidities for a given market and trading fee rates.
Parameters
Name | Type | Description |
---|---|---|
marketAddress | string | The address of the Chromatic Market contract. |
tradingFeeRates | number [] | An array of tradingFeeRate. |
Returns
Promise
<PendingLiquidityResult
[]>
A promise that resolves to an array of PendingLiquidity.