@alephium/powfi-sdk 0.0.1-rc.17 → 0.0.1-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/clmm/clmm.ts +7 -1
package/lib/index.d.mts
CHANGED
|
@@ -4436,6 +4436,7 @@ declare class ClmmModule extends ModuleBase {
|
|
|
4436
4436
|
collectProtocolFees(p: ClmmCollectProtocolFeesRequest): Promise<SignExecuteScriptTxResult>;
|
|
4437
4437
|
setRewardParams(p: ClmmSetRewardParamsRequest): Promise<SignExecuteScriptTxResult>;
|
|
4438
4438
|
extendRewards(p: ClmmExtendRewardsRequest): Promise<SignExecuteScriptTxResult>;
|
|
4439
|
+
private getAddLiquidityAttoAlphAmount;
|
|
4439
4440
|
private _getClmmConfig;
|
|
4440
4441
|
}
|
|
4441
4442
|
|
package/lib/index.d.ts
CHANGED
|
@@ -4436,6 +4436,7 @@ declare class ClmmModule extends ModuleBase {
|
|
|
4436
4436
|
collectProtocolFees(p: ClmmCollectProtocolFeesRequest): Promise<SignExecuteScriptTxResult>;
|
|
4437
4437
|
setRewardParams(p: ClmmSetRewardParamsRequest): Promise<SignExecuteScriptTxResult>;
|
|
4438
4438
|
extendRewards(p: ClmmExtendRewardsRequest): Promise<SignExecuteScriptTxResult>;
|
|
4439
|
+
private getAddLiquidityAttoAlphAmount;
|
|
4439
4440
|
private _getClmmConfig;
|
|
4440
4441
|
}
|
|
4441
4442
|
|
package/lib/index.js
CHANGED
|
@@ -16216,7 +16216,8 @@ var ClmmModule = class extends ModuleBase {
|
|
|
16216
16216
|
}
|
|
16217
16217
|
},
|
|
16218
16218
|
tokens,
|
|
16219
|
-
attoAlphAmount:
|
|
16219
|
+
attoAlphAmount: this.getAddLiquidityAttoAlphAmount(p.token0, p.token1),
|
|
16220
|
+
dustAmount: deposit,
|
|
16220
16221
|
positionId
|
|
16221
16222
|
};
|
|
16222
16223
|
return [positionId, positionManager, params];
|
|
@@ -16421,6 +16422,10 @@ var ClmmModule = class extends ModuleBase {
|
|
|
16421
16422
|
});
|
|
16422
16423
|
return result;
|
|
16423
16424
|
}
|
|
16425
|
+
getAddLiquidityAttoAlphAmount(token0Id, token1Id) {
|
|
16426
|
+
const nonAlphTokenCount = [token0Id, token1Id].filter((tokenId) => tokenId !== import_web331.ALPH_TOKEN_ID).length;
|
|
16427
|
+
return BigInt(nonAlphTokenCount) * import_web331.DUST_AMOUNT;
|
|
16428
|
+
}
|
|
16424
16429
|
_getClmmConfig() {
|
|
16425
16430
|
const networkId = this.scope.network.id;
|
|
16426
16431
|
try {
|