@raydium-io/raydium-sdk-v2 0.2.26-alpha → 0.2.27-alpha
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/api/api.d.ts +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/type.d.ts +1 -1
- package/lib/{api-633d94c4.d.ts → api-c27cc5ec.d.ts} +8 -8
- package/lib/common/accountInfo.d.ts +1 -1
- package/lib/common/bignumber.d.ts +1 -1
- package/lib/common/constant.d.ts +1 -1
- package/lib/common/fractionUtil.d.ts +1 -1
- package/lib/common/index.d.ts +1 -1
- package/lib/common/transfer.d.ts +1 -1
- package/lib/common/txTool/txTool.d.ts +1 -1
- package/lib/common/txTool/txUtils.d.ts +1 -1
- package/lib/common/utility.d.ts +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/module/amount.d.ts +1 -1
- package/lib/module/fraction.d.ts +1 -1
- package/lib/module/index.d.ts +1 -1
- package/lib/module/percent.d.ts +1 -1
- package/lib/module/price.d.ts +1 -1
- package/lib/raydium/account/account.d.ts +3 -3
- package/lib/raydium/account/index.d.ts +1 -1
- package/lib/raydium/account/instruction.d.ts +1 -1
- package/lib/raydium/account/types.d.ts +1 -1
- package/lib/raydium/account/util.d.ts +1 -1
- package/lib/raydium/clmm/clmm.d.ts +3 -3
- package/lib/raydium/clmm/index.d.ts +3 -3
- package/lib/raydium/clmm/instrument.d.ts +2 -2
- package/lib/raydium/clmm/layout.d.ts +6 -6
- package/lib/raydium/clmm/type.d.ts +2 -2
- package/lib/raydium/clmm/utils/math.d.ts +2 -2
- package/lib/raydium/clmm/utils/pool.d.ts +2 -2
- package/lib/raydium/clmm/utils/position.d.ts +2 -2
- package/lib/raydium/clmm/utils/tick.d.ts +2 -2
- package/lib/raydium/clmm/utils/tickQuery.d.ts +2 -2
- package/lib/raydium/cpmm/cpmm.d.ts +3 -3
- package/lib/raydium/cpmm/cpmm.js +1 -1
- package/lib/raydium/cpmm/cpmm.js.map +1 -1
- package/lib/raydium/cpmm/cpmm.mjs +1 -1
- package/lib/raydium/cpmm/cpmm.mjs.map +1 -1
- package/lib/raydium/cpmm/index.d.ts +1 -1
- package/lib/raydium/cpmm/instruction.d.ts +1 -1
- package/lib/raydium/cpmm/layout.d.ts +2 -2
- package/lib/raydium/cpmm/type.d.ts +1 -1
- package/lib/raydium/farm/config.d.ts +1 -1
- package/lib/raydium/farm/farm.d.ts +3 -3
- package/lib/raydium/farm/index.d.ts +1 -1
- package/lib/raydium/farm/instruction.d.ts +1 -1
- package/lib/raydium/farm/layout.d.ts +1 -1
- package/lib/raydium/farm/type.d.ts +1 -1
- package/lib/raydium/farm/util.d.ts +1 -1
- package/lib/raydium/ido/ido.d.ts +3 -3
- package/lib/raydium/ido/index.d.ts +3 -3
- package/lib/raydium/ido/instruction.d.ts +1 -1
- package/lib/raydium/ido/type.d.ts +1 -1
- package/lib/raydium/index.d.ts +3 -3
- package/lib/raydium/index.js +1 -1
- package/lib/raydium/index.js.map +1 -1
- package/lib/raydium/index.mjs +1 -1
- package/lib/raydium/index.mjs.map +1 -1
- package/lib/raydium/launchpad/curve/curve.d.ts +1 -1
- package/lib/raydium/launchpad/index.d.ts +3 -3
- package/lib/raydium/launchpad/instrument.d.ts +1 -1
- package/lib/raydium/launchpad/launchpad.d.ts +3 -3
- package/lib/raydium/launchpad/layout.d.ts +3 -3
- package/lib/raydium/launchpad/pda.d.ts +1 -1
- package/lib/raydium/launchpad/type.d.ts +1 -1
- package/lib/raydium/liquidity/index.d.ts +1 -1
- package/lib/raydium/liquidity/instruction.d.ts +1 -1
- package/lib/raydium/liquidity/layout.d.ts +6 -6
- package/lib/raydium/liquidity/liquidity.d.ts +3 -3
- package/lib/raydium/liquidity/type.d.ts +1 -1
- package/lib/raydium/liquidity/utils.d.ts +1 -1
- package/lib/raydium/marketV2/createMarket.d.ts +3 -3
- package/lib/raydium/marketV2/index.d.ts +3 -3
- package/lib/raydium/moduleBase.d.ts +3 -3
- package/lib/raydium/raydium.d.ts +3 -3
- package/lib/raydium/raydium.js +1 -1
- package/lib/raydium/raydium.js.map +1 -1
- package/lib/raydium/raydium.mjs +1 -1
- package/lib/raydium/raydium.mjs.map +1 -1
- package/lib/raydium/token/constant.d.ts +1 -1
- package/lib/raydium/token/index.d.ts +1 -1
- package/lib/raydium/token/token.d.ts +3 -3
- package/lib/raydium/token/type.d.ts +1 -1
- package/lib/raydium/token/utils.d.ts +1 -1
- package/lib/raydium/tradeV2/index.d.ts +2 -2
- package/lib/raydium/tradeV2/instrument.d.ts +2 -2
- package/lib/raydium/tradeV2/trade.d.ts +3 -3
- package/lib/raydium/tradeV2/type.d.ts +2 -2
- package/lib/raydium/type.d.ts +1 -1
- package/lib/raydium/utils1216/index.d.ts +3 -3
- package/lib/raydium/utils1216/utils1216.d.ts +3 -3
- package/lib/{raydium-be056a1c.d.ts → raydium-d01bd283.d.ts} +5 -4
- package/lib/{type-367f8461.d.ts → type-a4faa080.d.ts} +1 -1
- package/package.json +1 -1
- package/src/raydium/cpmm/cpmm.ts +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SOL_INFO, TOKEN_WSOL } from './constant.js';
|
|
2
2
|
export { SPL_MINT_LAYOUT, SplMintLayout } from './layout.js';
|
|
3
|
-
export { bN as LpToken, bM as SplToken, bK as TokenInfo, bL as TokenJson } from '../../api-
|
|
3
|
+
export { bN as LpToken, bM as SplToken, bK as TokenInfo, bL as TokenJson } from '../../api-c27cc5ec.js';
|
|
4
4
|
export { parseTokenInfo, solToWSolToken, toApiV3Token, toFeeConfig, toToken, toTokenAmount, toTokenInfo, wSolToSolToken } from './utils.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
|
-
import '../../api-
|
|
3
|
-
export { n as default } from '../../raydium-
|
|
2
|
+
import '../../api-c27cc5ec.js';
|
|
3
|
+
export { n as default } from '../../raydium-d01bd283.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import '../../solana/type.js';
|
|
6
6
|
import 'bn.js';
|
|
@@ -22,7 +22,7 @@ import '../liquidity/stable.js';
|
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
|
-
import '../../type-
|
|
25
|
+
import '../../type-a4faa080.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
import '../cpmm/curve/calculator.js';
|
|
28
28
|
import '../cpmm/layout.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bN as LpToken, bM as SplToken, bK as TokenInfo, bL as TokenJson } from '../../api-
|
|
1
|
+
export { bN as LpToken, bM as SplToken, bK as TokenInfo, bL as TokenJson } from '../../api-c27cc5ec.js';
|
|
2
2
|
import '../../module/token.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import '../../solana/type.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { RawMint, TransferFeeConfigLayout } from '@solana/spl-token';
|
|
3
|
-
import { bK as TokenInfo, ag as BigNumberish, ce as TokenAmount, i as ApiV3Token } from '../../api-
|
|
3
|
+
import { bK as TokenInfo, ag as BigNumberish, ce as TokenAmount, i as ApiV3Token } from '../../api-c27cc5ec.js';
|
|
4
4
|
import { Token } from '../../module/token.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -2,7 +2,7 @@ export { ApiSwapV1Out, makeSwapInstruction, route1Instruction, route2Instruction
|
|
|
2
2
|
export { BasicPoolInfo, ComputeAmountOutAmmLayout, ComputeAmountOutLayout, ComputeAmountOutRouteLayout, ComputePoolType, ComputeRoutePathType, MakeSwapInstructionParam, PoolAccountInfoV4, ReturnTypeFetchMultipleInfo, ReturnTypeGetAddLiquidityDefaultPool, ReturnTypeGetAllRoute, ReturnTypeMakeSwapInstruction, ReturnTypeMakeSwapTransaction, RoutePathType } from './type.js';
|
|
3
3
|
import '@solana/web3.js';
|
|
4
4
|
import 'bn.js';
|
|
5
|
-
import '../../api-
|
|
5
|
+
import '../../api-c27cc5ec.js';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import '../../solana/type.js';
|
|
8
8
|
import '@solana/spl-token';
|
|
@@ -17,7 +17,7 @@ import '../../common/logger.js';
|
|
|
17
17
|
import '../../module/currency.js';
|
|
18
18
|
import '../../marshmallow/index.js';
|
|
19
19
|
import '../../marshmallow/buffer-layout.js';
|
|
20
|
-
import '../../type-
|
|
20
|
+
import '../../type-a4faa080.js';
|
|
21
21
|
import '../clmm/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
|
-
import { s as ApiV3PoolInfoItem, G as PoolKeys } from '../../api-
|
|
3
|
+
import { s as ApiV3PoolInfoItem, G as PoolKeys } from '../../api-c27cc5ec.js';
|
|
4
4
|
import { ComputePoolType, MakeSwapInstructionParam, ReturnTypeMakeSwapInstruction } from './type.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -16,7 +16,7 @@ import '../../common/logger.js';
|
|
|
16
16
|
import '../../module/currency.js';
|
|
17
17
|
import '../../marshmallow/index.js';
|
|
18
18
|
import '../../marshmallow/buffer-layout.js';
|
|
19
|
-
import '../../type-
|
|
19
|
+
import '../../type-a4faa080.js';
|
|
20
20
|
import '../clmm/layout.js';
|
|
21
21
|
import '../liquidity/type.js';
|
|
22
22
|
import '../liquidity/layout.js';
|
|
@@ -2,10 +2,10 @@ import '@solana/web3.js';
|
|
|
2
2
|
import '@solana/spl-token';
|
|
3
3
|
import 'bn.js';
|
|
4
4
|
import 'decimal.js';
|
|
5
|
-
import '../../api-
|
|
5
|
+
import '../../api-c27cc5ec.js';
|
|
6
6
|
import '../../common/txTool/txType.js';
|
|
7
|
-
export { m as default } from '../../raydium-
|
|
8
|
-
import '../../type-
|
|
7
|
+
export { m as default } from '../../raydium-d01bd283.js';
|
|
8
|
+
import '../../type-a4faa080.js';
|
|
9
9
|
import '../liquidity/type.js';
|
|
10
10
|
import '../cpmm/type.js';
|
|
11
11
|
import './type.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PublicKey, Keypair, Signer, TransactionInstruction, Transaction } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
3
|
import Decimal from 'decimal.js';
|
|
4
|
-
import { bX as TransferAmountFee, ce as TokenAmount, G as PoolKeys, s as ApiV3PoolInfoItem } from '../../api-
|
|
4
|
+
import { bX as TransferAmountFee, ce as TokenAmount, G as PoolKeys, s as ApiV3PoolInfoItem } from '../../api-c27cc5ec.js';
|
|
5
5
|
import { Token } from '../../module/token.js';
|
|
6
|
-
import { d as ComputeClmmPoolInfo } from '../../type-
|
|
6
|
+
import { d as ComputeClmmPoolInfo } from '../../type-a4faa080.js';
|
|
7
7
|
import { ComputeAmountOutParam } from '../liquidity/type.js';
|
|
8
8
|
import { CpmmComputeData } from '../cpmm/type.js';
|
|
9
9
|
import 'axios';
|
package/lib/raydium/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
2
|
import 'bn.js';
|
|
3
3
|
import '@solana/spl-token';
|
|
4
|
-
export { c3 as ArrayItem, bU as ComputeBudgetConfig, ca as Cover, c4 as ExactPartial, c5 as ExactRequired, c9 as Fallback, bY as GetTransferAmountFee, c7 as GetValue, bT as InstructionReturn, bW as LoadParams, bS as MakeMultiTransaction, bQ as MakeTransaction, bR as MakeV0Transaction, c0 as MayArray, c1 as MayDeepArray, c2 as MayFunction, b$ as ReplaceType, bZ as ReturnTypeFetchMultipleMintInfo, b_ as ReturnTypeFetchMultipleMintInfos, bO as ReturnTypeMakeInstructions, c6 as SKeyof, c8 as SOR, bP as SignAllTransactions, bX as TransferAmountFee, bV as TxTipConfig, cb as UnionCover, cc as unionArr } from '../api-
|
|
4
|
+
export { c3 as ArrayItem, bU as ComputeBudgetConfig, ca as Cover, c4 as ExactPartial, c5 as ExactRequired, c9 as Fallback, bY as GetTransferAmountFee, c7 as GetValue, bT as InstructionReturn, bW as LoadParams, bS as MakeMultiTransaction, bQ as MakeTransaction, bR as MakeV0Transaction, c0 as MayArray, c1 as MayDeepArray, c2 as MayFunction, b$ as ReplaceType, bZ as ReturnTypeFetchMultipleMintInfo, b_ as ReturnTypeFetchMultipleMintInfos, bO as ReturnTypeMakeInstructions, c6 as SKeyof, c8 as SOR, bP as SignAllTransactions, bX as TransferAmountFee, bV as TxTipConfig, cb as UnionCover, cc as unionArr } from '../api-c27cc5ec.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import '../solana/type.js';
|
|
7
7
|
import '../api/url.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-
|
|
1
|
+
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-d01bd283.js';
|
|
2
2
|
import '@solana/web3.js';
|
|
3
|
-
import '../../api-
|
|
3
|
+
import '../../api-c27cc5ec.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import '../../solana/type.js';
|
|
6
6
|
import 'bn.js';
|
|
@@ -22,7 +22,7 @@ import '../liquidity/stable.js';
|
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
|
-
import '../../type-
|
|
25
|
+
import '../../type-a4faa080.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
import '../cpmm/curve/calculator.js';
|
|
28
28
|
import '../cpmm/layout.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../../marshmallow/index.js';
|
|
2
2
|
import '@solana/web3.js';
|
|
3
3
|
import 'bn.js';
|
|
4
|
-
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-
|
|
4
|
+
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-d01bd283.js';
|
|
5
5
|
import '../../marshmallow/buffer-layout.js';
|
|
6
|
-
import '../../api-
|
|
6
|
+
import '../../api-c27cc5ec.js';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import '../../solana/type.js';
|
|
9
9
|
import '@solana/spl-token';
|
|
@@ -22,7 +22,7 @@ import '../liquidity/stable.js';
|
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
|
-
import '../../type-
|
|
25
|
+
import '../../type-a4faa080.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
import '../cpmm/curve/calculator.js';
|
|
28
28
|
import '../cpmm/layout.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey, Commitment, EpochInfo, Connection, Transaction, Signer, TransactionInstruction, Keypair } from '@solana/web3.js';
|
|
2
|
-
import { aG as TxBuilder, ay as AddInstructionParam, ag as BigNumberish, bt as CreateFarm, aF as MakeTxData, bu as CreateFarmExtInfo, bv as UpdateFarmReward, bw as UpdateFarmRewards, bx as FarmDWParam, $ as FormatFarmInfoOut, bU as ComputeBudgetConfig, bV as TxTipConfig, aE as MakeMultiTxData, q as ApiV3PoolInfoStandardItem, ci as Percent, ce as TokenAmount, x as AmmV4Keys, y as AmmV5Keys, p as ApiV3PoolInfoConcentratedItem, _ as FormatFarmInfoOutV6, D as ClmmKeys, bQ as MakeTransaction, b_ as ReturnTypeFetchMultipleMintInfos, z as CpmmKeys, r as ApiV3PoolInfoStandardItemCpmm, bY as GetTransferAmountFee, G as PoolKeys, i as ApiV3Token, a2 as OwnerIdoInfo, a3 as IdoKeysData, bW as LoadParams, J as JupTokenType, bK as TokenInfo, bP as SignAllTransactions, a as Api, a0 as AvailabilityCheckAPI3, k as ApiV3TokenRes } from './api-
|
|
2
|
+
import { aG as TxBuilder, ay as AddInstructionParam, ag as BigNumberish, bt as CreateFarm, aF as MakeTxData, bu as CreateFarmExtInfo, bv as UpdateFarmReward, bw as UpdateFarmRewards, bx as FarmDWParam, $ as FormatFarmInfoOut, bU as ComputeBudgetConfig, bV as TxTipConfig, aE as MakeMultiTxData, q as ApiV3PoolInfoStandardItem, ci as Percent, ce as TokenAmount, x as AmmV4Keys, y as AmmV5Keys, p as ApiV3PoolInfoConcentratedItem, _ as FormatFarmInfoOutV6, D as ClmmKeys, bQ as MakeTransaction, b_ as ReturnTypeFetchMultipleMintInfos, z as CpmmKeys, r as ApiV3PoolInfoStandardItemCpmm, bY as GetTransferAmountFee, G as PoolKeys, i as ApiV3Token, a2 as OwnerIdoInfo, a3 as IdoKeysData, bW as LoadParams, J as JupTokenType, bK as TokenInfo, bP as SignAllTransactions, a as Api, a0 as AvailabilityCheckAPI3, k as ApiV3TokenRes } from './api-c27cc5ec.js';
|
|
3
3
|
import { API_URL_CONFIG } from './api/url.js';
|
|
4
4
|
import { Owner } from './common/owner.js';
|
|
5
5
|
import { Cluster } from './solana/type.js';
|
|
@@ -11,7 +11,7 @@ import Decimal from 'decimal.js';
|
|
|
11
11
|
import { StableLayout } from './raydium/liquidity/stable.js';
|
|
12
12
|
import { AddLiquidityParams, RemoveParams, CreatePoolParam, CreatePoolAddress, CreateMarketAndPoolParam, ComputeAmountOutParam, ComputeAmountInParam, SwapParam, AmmRpcData } from './raydium/liquidity/type.js';
|
|
13
13
|
import { ClmmPositionLayout, PositionInfoLayout, LockClPositionLayoutV2, PoolInfoLayout } from './raydium/clmm/layout.js';
|
|
14
|
-
import { m as CreateConcentratedPool, O as OpenPositionFromBase, o as OpenPositionFromBaseExtInfo, p as OpenPositionFromLiquidity, q as OpenPositionFromLiquidityExtInfo, I as IncreasePositionFromLiquidity, M as ManipulateLiquidityExtInfo, n as IncreasePositionFromBase, D as DecreaseLiquidity, z as ClosePositionExtInfo, L as LockPosition, F as ClmmLockAddress, H as HarvestLockPosition, r as InitRewardParams, B as InitRewardExtInfo, s as InitRewardsParams, t as SetRewardParams, u as SetRewardsParams, v as CollectRewardParams, w as CollectRewardsParams, x as HarvestAllRewardsParams, E as ClmmParsedRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays, k as ReturnTypeComputeAmountOutBaseOut, i as ReturnTypeComputeAmountOutFormat } from './type-
|
|
14
|
+
import { m as CreateConcentratedPool, O as OpenPositionFromBase, o as OpenPositionFromBaseExtInfo, p as OpenPositionFromLiquidity, q as OpenPositionFromLiquidityExtInfo, I as IncreasePositionFromLiquidity, M as ManipulateLiquidityExtInfo, n as IncreasePositionFromBase, D as DecreaseLiquidity, z as ClosePositionExtInfo, L as LockPosition, F as ClmmLockAddress, H as HarvestLockPosition, r as InitRewardParams, B as InitRewardExtInfo, s as InitRewardsParams, t as SetRewardParams, u as SetRewardsParams, v as CollectRewardParams, w as CollectRewardsParams, x as HarvestAllRewardsParams, E as ClmmParsedRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays, k as ReturnTypeComputeAmountOutBaseOut, i as ReturnTypeComputeAmountOutFormat } from './type-a4faa080.js';
|
|
15
15
|
import { CpmmParsedRpcData, CpmmComputeData, CreateCpmmPoolParam, CreateCpmmPoolAddress, AddCpmmLiquidityParams, WithdrawCpmmLiquidityParams, CpmmSwapParams, LockCpmmLpParams, CpmmLockExtInfo, HarvestLockCpmmLpParams, HarvestMultiLockCpmmLpParams, CreateCpmmPoolPermissionParam, CollectCreatorFees, CollectMultiCreatorFees, ComputePairAmountParams } from './raydium/cpmm/type.js';
|
|
16
16
|
import { TransferFeeConfig } from '@solana/spl-token';
|
|
17
17
|
import { ComputeAmountOutLayout, BasicPoolInfo, ReturnTypeGetAllRoute, ComputeRoutePathType, ComputePoolType, ReturnTypeFetchMultipleInfo } from './raydium/tradeV2/type.js';
|
|
@@ -402,11 +402,12 @@ declare class CpmmModule extends ModuleBase {
|
|
|
402
402
|
}>>;
|
|
403
403
|
collectCreatorFees<T extends TxVersion>({ poolInfo, poolKeys: propPoolKeys, programId, txVersion, computeBudgetConfig, txTipConfig, feePayer, }: CollectCreatorFees<T>): Promise<MakeTxData<T>>;
|
|
404
404
|
collectMultiCreatorFees<T extends TxVersion>({ poolInfoList, programId, txVersion, computeBudgetConfig, feePayer, }: CollectMultiCreatorFees<T>): Promise<MakeMultiTxData<T>>;
|
|
405
|
-
computeSwapAmount({ pool, amountIn, outputMint, slippage, }: {
|
|
405
|
+
computeSwapAmount({ pool, amountIn, outputMint, slippage, swapBaseIn, }: {
|
|
406
406
|
pool: CpmmComputeData;
|
|
407
407
|
amountIn: BN__default;
|
|
408
408
|
outputMint: string | PublicKey;
|
|
409
409
|
slippage: number;
|
|
410
|
+
swapBaseIn?: boolean;
|
|
410
411
|
}): {
|
|
411
412
|
allTrade: boolean;
|
|
412
413
|
amountIn: BN__default;
|
|
@@ -751,11 +752,11 @@ declare class Utils1216 extends ModuleBase {
|
|
|
751
752
|
perLpLoss: BN__default;
|
|
752
753
|
totalClaimedAmount: BN__default;
|
|
753
754
|
}[], "", {
|
|
754
|
-
status: number;
|
|
755
755
|
padding: BN__default[];
|
|
756
756
|
bump: number;
|
|
757
757
|
endTime: BN__default;
|
|
758
758
|
openTime: BN__default;
|
|
759
|
+
status: number;
|
|
759
760
|
ammId: PublicKey;
|
|
760
761
|
tokenInfo: {
|
|
761
762
|
mintDecimals: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PublicKey, Transaction, Signer, Keypair, EpochInfo } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
3
|
import Decimal from 'decimal.js';
|
|
4
|
-
import { p as ApiV3PoolInfoConcentratedItem, d as ApiClmmConfigInfo, i as ApiV3Token, bY as GetTransferAmountFee, bX as TransferAmountFee, cj as Price, ci as Percent, ce as TokenAmount, bU as ComputeBudgetConfig, bV as TxTipConfig, cg as Fraction, bK as TokenInfo, D as ClmmKeys } from './api-
|
|
4
|
+
import { p as ApiV3PoolInfoConcentratedItem, d as ApiClmmConfigInfo, i as ApiV3Token, bY as GetTransferAmountFee, bX as TransferAmountFee, cj as Price, ci as Percent, ce as TokenAmount, bU as ComputeBudgetConfig, bV as TxTipConfig, cg as Fraction, bK as TokenInfo, D as ClmmKeys } from './api-c27cc5ec.js';
|
|
5
5
|
import { TxVersion } from './common/txTool/txType.js';
|
|
6
6
|
import { TickArrayBitmapExtensionLayout, PoolInfoLayout, ClmmPositionLayout, LockClPositionLayoutV2 } from './raydium/clmm/layout.js';
|
|
7
7
|
|
package/package.json
CHANGED
package/src/raydium/cpmm/cpmm.ts
CHANGED
|
@@ -1397,11 +1397,13 @@ export default class CpmmModule extends ModuleBase {
|
|
|
1397
1397
|
amountIn,
|
|
1398
1398
|
outputMint,
|
|
1399
1399
|
slippage,
|
|
1400
|
+
swapBaseIn = true,
|
|
1400
1401
|
}: {
|
|
1401
1402
|
pool: CpmmComputeData;
|
|
1402
1403
|
amountIn: BN;
|
|
1403
1404
|
outputMint: string | PublicKey;
|
|
1404
1405
|
slippage: number;
|
|
1406
|
+
swapBaseIn?: boolean;
|
|
1405
1407
|
}): {
|
|
1406
1408
|
allTrade: boolean;
|
|
1407
1409
|
amountIn: BN;
|
|
@@ -1413,7 +1415,7 @@ export default class CpmmModule extends ModuleBase {
|
|
|
1413
1415
|
} {
|
|
1414
1416
|
const isBaseIn = outputMint.toString() === pool.mintB.address;
|
|
1415
1417
|
const isCreatorFeeOnInput = pool.feeOn === FeeOn.BothToken || pool.feeOn === FeeOn.OnlyTokenB;
|
|
1416
|
-
const swapResult =
|
|
1418
|
+
const swapResult = swapBaseIn
|
|
1417
1419
|
? CurveCalculator.swapBaseInput(
|
|
1418
1420
|
amountIn,
|
|
1419
1421
|
isBaseIn ? pool.baseReserve : pool.quoteReserve,
|