@raydium-io/raydium-sdk-v2 0.1.112-alpha → 0.1.114-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.
Files changed (112) hide show
  1. package/lib/api/api.d.ts +1 -1
  2. package/lib/api/api.js.map +1 -1
  3. package/lib/api/api.mjs.map +1 -1
  4. package/lib/api/index.d.ts +1 -1
  5. package/lib/api/index.js.map +1 -1
  6. package/lib/api/index.mjs.map +1 -1
  7. package/lib/api/type.d.ts +1 -1
  8. package/lib/api/type.js.map +1 -1
  9. package/lib/api/type.mjs.map +1 -1
  10. package/lib/{api-19c05a82.d.ts → api-80d620f3.d.ts} +5 -5
  11. package/lib/common/accountInfo.d.ts +1 -1
  12. package/lib/common/bignumber.d.ts +1 -1
  13. package/lib/common/constant.d.ts +1 -1
  14. package/lib/common/fractionUtil.d.ts +1 -1
  15. package/lib/common/index.d.ts +1 -1
  16. package/lib/common/transfer.d.ts +1 -1
  17. package/lib/common/txTool/txTool.d.ts +1 -1
  18. package/lib/common/txTool/txUtils.d.ts +1 -1
  19. package/lib/common/utility.d.ts +1 -1
  20. package/lib/index.d.ts +3 -3
  21. package/lib/index.js +1 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib/index.mjs +1 -1
  24. package/lib/index.mjs.map +1 -1
  25. package/lib/module/amount.d.ts +1 -1
  26. package/lib/module/fraction.d.ts +1 -1
  27. package/lib/module/index.d.ts +1 -1
  28. package/lib/module/percent.d.ts +1 -1
  29. package/lib/module/price.d.ts +1 -1
  30. package/lib/raydium/account/account.d.ts +3 -3
  31. package/lib/raydium/account/index.d.ts +1 -1
  32. package/lib/raydium/account/instruction.d.ts +1 -1
  33. package/lib/raydium/account/types.d.ts +1 -1
  34. package/lib/raydium/account/util.d.ts +1 -1
  35. package/lib/raydium/clmm/clmm.d.ts +3 -3
  36. package/lib/raydium/clmm/index.d.ts +3 -3
  37. package/lib/raydium/clmm/instrument.d.ts +2 -2
  38. package/lib/raydium/clmm/layout.d.ts +5 -5
  39. package/lib/raydium/clmm/type.d.ts +2 -2
  40. package/lib/raydium/clmm/utils/math.d.ts +2 -2
  41. package/lib/raydium/clmm/utils/pool.d.ts +2 -2
  42. package/lib/raydium/clmm/utils/position.d.ts +2 -2
  43. package/lib/raydium/clmm/utils/tick.d.ts +2 -2
  44. package/lib/raydium/clmm/utils/tickQuery.d.ts +2 -2
  45. package/lib/raydium/clmm/utils/tickarrayBitmap.d.ts +2 -2
  46. package/lib/raydium/cpmm/cpmm.d.ts +3 -3
  47. package/lib/raydium/cpmm/cpmm.js +1 -1
  48. package/lib/raydium/cpmm/cpmm.js.map +1 -1
  49. package/lib/raydium/cpmm/cpmm.mjs +1 -1
  50. package/lib/raydium/cpmm/cpmm.mjs.map +1 -1
  51. package/lib/raydium/cpmm/curve/calculator.d.ts +1 -1
  52. package/lib/raydium/cpmm/curve/constantProduct.d.ts +1 -1
  53. package/lib/raydium/cpmm/index.d.ts +1 -1
  54. package/lib/raydium/cpmm/instruction.d.ts +1 -1
  55. package/lib/raydium/cpmm/type.d.ts +3 -1
  56. package/lib/raydium/cpmm/type.js.map +1 -1
  57. package/lib/raydium/farm/config.d.ts +1 -1
  58. package/lib/raydium/farm/farm.d.ts +3 -3
  59. package/lib/raydium/farm/index.d.ts +1 -1
  60. package/lib/raydium/farm/instruction.d.ts +1 -1
  61. package/lib/raydium/farm/layout.d.ts +1 -1
  62. package/lib/raydium/farm/type.d.ts +1 -1
  63. package/lib/raydium/farm/util.d.ts +1 -1
  64. package/lib/raydium/ido/ido.d.ts +3 -3
  65. package/lib/raydium/ido/index.d.ts +3 -3
  66. package/lib/raydium/ido/instruction.d.ts +1 -1
  67. package/lib/raydium/ido/type.d.ts +1 -1
  68. package/lib/raydium/index.d.ts +3 -3
  69. package/lib/raydium/index.js +1 -1
  70. package/lib/raydium/index.js.map +1 -1
  71. package/lib/raydium/index.mjs +1 -1
  72. package/lib/raydium/index.mjs.map +1 -1
  73. package/lib/raydium/liquidity/index.d.ts +1 -1
  74. package/lib/raydium/liquidity/instruction.d.ts +1 -1
  75. package/lib/raydium/liquidity/liquidity.d.ts +3 -3
  76. package/lib/raydium/liquidity/type.d.ts +1 -1
  77. package/lib/raydium/liquidity/utils.d.ts +1 -1
  78. package/lib/raydium/marketV2/createMarket.d.ts +3 -3
  79. package/lib/raydium/marketV2/index.d.ts +3 -3
  80. package/lib/raydium/moduleBase.d.ts +3 -3
  81. package/lib/raydium/raydium.d.ts +3 -3
  82. package/lib/raydium/raydium.js +1 -1
  83. package/lib/raydium/raydium.js.map +1 -1
  84. package/lib/raydium/raydium.mjs +1 -1
  85. package/lib/raydium/raydium.mjs.map +1 -1
  86. package/lib/raydium/token/constant.d.ts +1 -1
  87. package/lib/raydium/token/index.d.ts +1 -1
  88. package/lib/raydium/token/token.d.ts +3 -3
  89. package/lib/raydium/token/token.js +1 -1
  90. package/lib/raydium/token/token.js.map +1 -1
  91. package/lib/raydium/token/token.mjs +1 -1
  92. package/lib/raydium/token/token.mjs.map +1 -1
  93. package/lib/raydium/token/type.d.ts +1 -1
  94. package/lib/raydium/token/utils.d.ts +1 -1
  95. package/lib/raydium/tradeV2/index.d.ts +2 -2
  96. package/lib/raydium/tradeV2/index.js +1 -1
  97. package/lib/raydium/tradeV2/index.mjs +1 -1
  98. package/lib/raydium/tradeV2/instrument.d.ts +2 -2
  99. package/lib/raydium/tradeV2/trade.d.ts +3 -3
  100. package/lib/raydium/tradeV2/type.d.ts +2 -2
  101. package/lib/raydium/type.d.ts +1 -1
  102. package/lib/raydium/utils1216/index.d.ts +3 -3
  103. package/lib/raydium/utils1216/utils1216.d.ts +3 -3
  104. package/lib/{raydium-12e49584.d.ts → raydium-3ed04285.d.ts} +3 -3
  105. package/lib/{type-5c415626.d.ts → type-3885792c.d.ts} +1 -1
  106. package/package.json +1 -1
  107. package/src/api/api.ts +1 -1
  108. package/src/api/type.ts +1 -1
  109. package/src/raydium/.DS_Store +0 -0
  110. package/src/raydium/cpmm/cpmm.ts +6 -4
  111. package/src/raydium/cpmm/type.ts +2 -0
  112. package/src/raydium/token/token.ts +3 -6
@@ -1,6 +1,6 @@
1
1
  import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
2
  import BN__default from 'bn.js';
3
- import { r as ApiV3PoolInfoItem, D as PoolKeys } from '../../api-19c05a82.js';
3
+ import { r as ApiV3PoolInfoItem, D as PoolKeys } from '../../api-80d620f3.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-5c415626.js';
19
+ import '../../type-3885792c.js';
20
20
  import '../clmm/layout.js';
21
21
  import '../liquidity/type.js';
22
22
  import '../liquidity/layout.js';
@@ -1,9 +1,9 @@
1
1
  import '@solana/web3.js';
2
2
  import 'bn.js';
3
- import '../../api-19c05a82.js';
3
+ import '../../api-80d620f3.js';
4
4
  import '../../common/txTool/txType.js';
5
- export { j as default } from '../../raydium-12e49584.js';
6
- import '../../type-5c415626.js';
5
+ export { j as default } from '../../raydium-3ed04285.js';
6
+ import '../../type-3885792c.js';
7
7
  import '../liquidity/type.js';
8
8
  import '../cpmm/type.js';
9
9
  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 { bR as TransferAmountFee, c8 as TokenAmount, D as PoolKeys, r as ApiV3PoolInfoItem } from '../../api-19c05a82.js';
4
+ import { bR as TransferAmountFee, c8 as TokenAmount, D as PoolKeys, r as ApiV3PoolInfoItem } from '../../api-80d620f3.js';
5
5
  import { Token } from '../../module/token.js';
6
- import { d as ComputeClmmPoolInfo } from '../../type-5c415626.js';
6
+ import { d as ComputeClmmPoolInfo } from '../../type-3885792c.js';
7
7
  import { ComputeAmountOutParam } from '../liquidity/type.js';
8
8
  import { CpmmComputeData } from '../cpmm/type.js';
9
9
  import 'axios';
@@ -1,7 +1,7 @@
1
1
  import '@solana/web3.js';
2
2
  import 'bn.js';
3
3
  import '@solana/spl-token';
4
- export { bZ as ArrayItem, bO as ComputeBudgetConfig, c4 as Cover, b_ as ExactPartial, b$ as ExactRequired, c3 as Fallback, bS as GetTransferAmountFee, c1 as GetValue, bN as InstructionReturn, bQ as LoadParams, bM as MakeMultiTransaction, bK as MakeTransaction, bL as MakeV0Transaction, bW as MayArray, bX as MayDeepArray, bY as MayFunction, bV as ReplaceType, bT as ReturnTypeFetchMultipleMintInfo, bU as ReturnTypeFetchMultipleMintInfos, bI as ReturnTypeMakeInstructions, c0 as SKeyof, c2 as SOR, bJ as SignAllTransactions, bR as TransferAmountFee, bP as TxTipConfig, c5 as UnionCover, c6 as unionArr } from '../api-19c05a82.js';
4
+ export { bZ as ArrayItem, bO as ComputeBudgetConfig, c4 as Cover, b_ as ExactPartial, b$ as ExactRequired, c3 as Fallback, bS as GetTransferAmountFee, c1 as GetValue, bN as InstructionReturn, bQ as LoadParams, bM as MakeMultiTransaction, bK as MakeTransaction, bL as MakeV0Transaction, bW as MayArray, bX as MayDeepArray, bY as MayFunction, bV as ReplaceType, bT as ReturnTypeFetchMultipleMintInfo, bU as ReturnTypeFetchMultipleMintInfos, bI as ReturnTypeMakeInstructions, c0 as SKeyof, c2 as SOR, bJ as SignAllTransactions, bR as TransferAmountFee, bP as TxTipConfig, c5 as UnionCover, c6 as unionArr } from '../api-80d620f3.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-12e49584.js';
1
+ export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-3ed04285.js';
2
2
  import '@solana/web3.js';
3
- import '../../api-19c05a82.js';
3
+ import '../../api-80d620f3.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-5c415626.js';
25
+ import '../../type-3885792c.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-12e49584.js';
4
+ export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-3ed04285.js';
5
5
  import '../../marshmallow/buffer-layout.js';
6
- import '../../api-19c05a82.js';
6
+ import '../../api-80d620f3.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-5c415626.js';
25
+ import '../../type-3885792c.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 { aC as TxBuilder, au as AddInstructionParam, ad as BigNumberish, bp as CreateFarm, aB as MakeTxData, bq as CreateFarmExtInfo, br as UpdateFarmReward, bs as UpdateFarmRewards, bt as FarmDWParam, Z as FormatFarmInfoOut, bO as ComputeBudgetConfig, bP as TxTipConfig, aA as MakeMultiTxData, p as ApiV3PoolInfoStandardItem, cc as Percent, c8 as TokenAmount, w as AmmV4Keys, x as AmmV5Keys, o as ApiV3PoolInfoConcentratedItem, Y as FormatFarmInfoOutV6, B as ClmmKeys, bK as MakeTransaction, bU as ReturnTypeFetchMultipleMintInfos, y as CpmmKeys, q as ApiV3PoolInfoStandardItemCpmm, bS as GetTransferAmountFee, D as PoolKeys, i as ApiV3Token, a0 as OwnerIdoInfo, a1 as IdoKeysData, bQ as LoadParams, J as JupTokenType, bE as TokenInfo, bJ as SignAllTransactions, a as Api, _ as AvailabilityCheckAPI3, j as ApiV3TokenRes } from './api-19c05a82.js';
2
+ import { aC as TxBuilder, au as AddInstructionParam, ad as BigNumberish, bp as CreateFarm, aB as MakeTxData, bq as CreateFarmExtInfo, br as UpdateFarmReward, bs as UpdateFarmRewards, bt as FarmDWParam, Z as FormatFarmInfoOut, bO as ComputeBudgetConfig, bP as TxTipConfig, aA as MakeMultiTxData, p as ApiV3PoolInfoStandardItem, cc as Percent, c8 as TokenAmount, w as AmmV4Keys, x as AmmV5Keys, o as ApiV3PoolInfoConcentratedItem, Y as FormatFarmInfoOutV6, B as ClmmKeys, bK as MakeTransaction, bU as ReturnTypeFetchMultipleMintInfos, y as CpmmKeys, q as ApiV3PoolInfoStandardItemCpmm, bS as GetTransferAmountFee, D as PoolKeys, i as ApiV3Token, a0 as OwnerIdoInfo, a1 as IdoKeysData, bQ as LoadParams, J as JupTokenType, bE as TokenInfo, bJ as SignAllTransactions, a as Api, _ as AvailabilityCheckAPI3, j as ApiV3TokenRes } from './api-80d620f3.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, PoolInfoLayout } from './raydium/clmm/layout.js';
14
- import { m as CreateConcentratedPool, O as OpenPositionFromBase, p as OpenPositionFromBaseExtInfo, q as OpenPositionFromLiquidity, r as OpenPositionFromLiquidityExtInfo, I as IncreasePositionFromLiquidity, M as ManipulateLiquidityExtInfo, n as IncreasePositionFromBase, D as DecreaseLiquidity, B as ClosePositionExtInfo, L as LockPosition, J as ClmmLockAddress, H as HarvestLockPosition, s as InitRewardParams, E as InitRewardExtInfo, t as InitRewardsParams, u as SetRewardParams, v as SetRewardsParams, w as CollectRewardParams, x as CollectRewardsParams, y as HarvestAllRewardsParams, F as ClmmRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays } from './type-5c415626.js';
14
+ import { m as CreateConcentratedPool, O as OpenPositionFromBase, p as OpenPositionFromBaseExtInfo, q as OpenPositionFromLiquidity, r as OpenPositionFromLiquidityExtInfo, I as IncreasePositionFromLiquidity, M as ManipulateLiquidityExtInfo, n as IncreasePositionFromBase, D as DecreaseLiquidity, B as ClosePositionExtInfo, L as LockPosition, J as ClmmLockAddress, H as HarvestLockPosition, s as InitRewardParams, E as InitRewardExtInfo, t as InitRewardsParams, u as SetRewardParams, v as SetRewardsParams, w as CollectRewardParams, x as CollectRewardsParams, y as HarvestAllRewardsParams, F as ClmmRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays } from './type-3885792c.js';
15
15
  import { CpmmRpcData, CpmmComputeData, CreateCpmmPoolParam, CreateCpmmPoolAddress, AddCpmmLiquidityParams, WithdrawCpmmLiquidityParams, CpmmSwapParams, LockCpmmLpParams, CpmmLockExtInfo, HarvestLockCpmmLpParams, ComputePairAmountParams } from './raydium/cpmm/type.js';
16
16
  import { ComputeAmountOutLayout, BasicPoolInfo, ReturnTypeGetAllRoute, ComputeRoutePathType, ComputePoolType, ReturnTypeFetchMultipleInfo } from './raydium/tradeV2/type.js';
17
17
  import { Structure } from './marshmallow/index.js';
@@ -633,7 +633,7 @@ declare class TokenModule extends ModuleBase {
633
633
  }): Promise<void>;
634
634
  get tokenList(): TokenInfo[];
635
635
  get tokenMap(): Map<string, TokenInfo>;
636
- get blackTokenMap(): Map<string, TokenInfo>;
636
+ get blackTokenMap(): Set<string>;
637
637
  get mintGroup(): {
638
638
  official: Set<string>;
639
639
  jup: Set<string>;
@@ -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 { o as ApiV3PoolInfoConcentratedItem, d as ApiClmmConfigInfo, i as ApiV3Token, bS as GetTransferAmountFee, bR as TransferAmountFee, cd as Price, cc as Percent, c8 as TokenAmount, bO as ComputeBudgetConfig, bP as TxTipConfig, ca as Fraction, bE as TokenInfo, B as ClmmKeys } from './api-19c05a82.js';
4
+ import { o as ApiV3PoolInfoConcentratedItem, d as ApiClmmConfigInfo, i as ApiV3Token, bS as GetTransferAmountFee, bR as TransferAmountFee, cd as Price, cc as Percent, c8 as TokenAmount, bO as ComputeBudgetConfig, bP as TxTipConfig, ca as Fraction, bE as TokenInfo, B as ClmmKeys } from './api-80d620f3.js';
5
5
  import { TxVersion } from './common/txTool/txType.js';
6
6
  import { PoolInfoLayout, ClmmPositionLayout, LockClPositionLayoutV2 } from './raydium/clmm/layout.js';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydium-io/raydium-sdk-v2",
3
- "version": "0.1.112-alpha",
3
+ "version": "0.1.114-alpha",
4
4
  "description": "An SDK for building applications on top of Raydium.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "./lib/index.js",
package/src/api/api.ts CHANGED
@@ -168,7 +168,7 @@ export class Api {
168
168
  return this.api.get(this.urlConfigs.RPCS || API_URLS.RPCS);
169
169
  }
170
170
 
171
- async getTokenList(): Promise<{ mintList: ApiV3Token[]; blacklist: ApiV3Token[]; whiteList: string[] }> {
171
+ async getTokenList(): Promise<{ mintList: ApiV3Token[]; blacklist: string[]; whiteList: string[] }> {
172
172
  const res = await this.api.get(this.urlConfigs.TOKEN_LIST || API_URLS.TOKEN_LIST);
173
173
  return res.data;
174
174
  }
package/src/api/type.ts CHANGED
@@ -169,7 +169,7 @@ export type ApiV3Token = {
169
169
 
170
170
  export type ApiV3TokenRes = {
171
171
  mintList: ApiV3Token[];
172
- blacklist: ApiV3Token[];
172
+ blacklist: string[];
173
173
  whiteList: string[];
174
174
  };
175
175
 
Binary file
@@ -557,6 +557,7 @@ export default class CpmmModule extends ModuleBase {
557
557
  txTipConfig,
558
558
  txVersion,
559
559
  feePayer,
560
+ closeWsol = true,
560
561
  } = params;
561
562
 
562
563
  if (this.scope.availability.addStandardPosition === false)
@@ -595,7 +596,7 @@ export default class CpmmModule extends ModuleBase {
595
596
  payer: this.scope.ownerPubKey,
596
597
  amount: 0,
597
598
  },
598
- skipCloseAccount: !mintAUseSOLBalance,
599
+ skipCloseAccount: !(mintAUseSOLBalance && closeWsol),
599
600
  associatedOnly: mintAUseSOLBalance ? false : true,
600
601
  checkCreateATAOwner: false,
601
602
  });
@@ -612,7 +613,7 @@ export default class CpmmModule extends ModuleBase {
612
613
  payer: this.scope.ownerPubKey,
613
614
  amount: 0,
614
615
  },
615
- skipCloseAccount: !mintBUseSOLBalance,
616
+ skipCloseAccount: !(mintBUseSOLBalance && closeWsol),
616
617
  associatedOnly: mintBUseSOLBalance ? false : true,
617
618
  checkCreateATAOwner: false,
618
619
  });
@@ -845,6 +846,7 @@ export default class CpmmModule extends ModuleBase {
845
846
  computeBudgetConfig,
846
847
  txTipConfig,
847
848
  txVersion,
849
+ closeWsol = true,
848
850
  } = params;
849
851
 
850
852
  if (lpFeeAmount.isZero())
@@ -873,7 +875,7 @@ export default class CpmmModule extends ModuleBase {
873
875
  payer: this.scope.ownerPubKey,
874
876
  amount: 0,
875
877
  },
876
- skipCloseAccount: !mintAUseSOLBalance,
878
+ skipCloseAccount: !(mintAUseSOLBalance && closeWsol),
877
879
  associatedOnly: mintAUseSOLBalance ? false : true,
878
880
  checkCreateATAOwner: false,
879
881
  });
@@ -890,7 +892,7 @@ export default class CpmmModule extends ModuleBase {
890
892
  payer: this.scope.ownerPubKey,
891
893
  amount: 0,
892
894
  },
893
- skipCloseAccount: !mintBUseSOLBalance,
895
+ skipCloseAccount: !(mintBUseSOLBalance && closeWsol),
894
896
  associatedOnly: mintBUseSOLBalance ? false : true,
895
897
  checkCreateATAOwner: false,
896
898
  });
@@ -123,6 +123,7 @@ export interface WithdrawCpmmLiquidityParams<T = TxVersion.LEGACY> {
123
123
  txTipConfig?: TxTipConfig;
124
124
  txVersion?: T;
125
125
  feePayer?: PublicKey;
126
+ closeWsol?: boolean;
126
127
  }
127
128
 
128
129
  export interface CpmmSwapParams<T = TxVersion.LEGACY> {
@@ -222,6 +223,7 @@ export interface HarvestLockCpmmLpParams<T = TxVersion.LEGACY> {
222
223
  computeBudgetConfig?: ComputeBudgetConfig;
223
224
  txTipConfig?: TxTipConfig;
224
225
  txVersion?: T;
226
+ closeWsol?: boolean;
225
227
  }
226
228
 
227
229
  export interface CpmmLockNftBasicInfo {
@@ -11,7 +11,7 @@ import { TokenInfo } from "./type";
11
11
  export default class TokenModule extends ModuleBase {
12
12
  private _tokenList: TokenInfo[] = [];
13
13
  private _tokenMap: Map<string, TokenInfo> = new Map();
14
- private _blackTokenMap: Map<string, TokenInfo> = new Map();
14
+ private _blackTokenMap: Set<string> = new Set();
15
15
  private _mintGroup: { official: Set<string>; jup: Set<string>; extra: Set<string> } = {
16
16
  official: new Set(),
17
17
  jup: new Set(),
@@ -32,15 +32,12 @@ export default class TokenModule extends ModuleBase {
32
32
  // reset all data
33
33
  this._tokenList = [];
34
34
  this._tokenMap = new Map();
35
- this._blackTokenMap = new Map();
35
+ this._blackTokenMap = new Set(blacklist);
36
36
  this._mintGroup = { official: new Set(), jup: new Set(), extra: new Set() };
37
37
  this._whiteMap = new Set(whiteList);
38
38
 
39
39
  this._tokenMap.set(SOL_INFO.address, SOL_INFO);
40
40
  this._mintGroup.official.add(SOL_INFO.address);
41
- blacklist.forEach((token) => {
42
- this._blackTokenMap.set(token.address, { ...token, priority: -1 });
43
- });
44
41
 
45
42
  mintList.forEach((token) => {
46
43
  if (this._blackTokenMap.has(token.address)) return;
@@ -92,7 +89,7 @@ export default class TokenModule extends ModuleBase {
92
89
  get tokenMap(): Map<string, TokenInfo> {
93
90
  return this._tokenMap;
94
91
  }
95
- get blackTokenMap(): Map<string, TokenInfo> {
92
+ get blackTokenMap(): Set<string> {
96
93
  return this._blackTokenMap;
97
94
  }
98
95
  get mintGroup(): { official: Set<string>; jup: Set<string> } {