@raydium-io/raydium-sdk-v2 0.1.112-alpha → 0.1.113-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 (42) hide show
  1. package/lib/index.d.ts +1 -1
  2. package/lib/index.js +1 -1
  3. package/lib/index.js.map +1 -1
  4. package/lib/index.mjs +1 -1
  5. package/lib/index.mjs.map +1 -1
  6. package/lib/raydium/account/account.d.ts +1 -1
  7. package/lib/raydium/clmm/clmm.d.ts +1 -1
  8. package/lib/raydium/clmm/index.d.ts +1 -1
  9. package/lib/raydium/cpmm/cpmm.d.ts +1 -1
  10. package/lib/raydium/cpmm/cpmm.js +1 -1
  11. package/lib/raydium/cpmm/cpmm.js.map +1 -1
  12. package/lib/raydium/cpmm/cpmm.mjs +1 -1
  13. package/lib/raydium/cpmm/cpmm.mjs.map +1 -1
  14. package/lib/raydium/cpmm/type.d.ts +2 -0
  15. package/lib/raydium/cpmm/type.js.map +1 -1
  16. package/lib/raydium/farm/farm.d.ts +1 -1
  17. package/lib/raydium/ido/ido.d.ts +1 -1
  18. package/lib/raydium/ido/index.d.ts +1 -1
  19. package/lib/raydium/index.d.ts +1 -1
  20. package/lib/raydium/index.js +1 -1
  21. package/lib/raydium/index.js.map +1 -1
  22. package/lib/raydium/index.mjs +1 -1
  23. package/lib/raydium/index.mjs.map +1 -1
  24. package/lib/raydium/liquidity/liquidity.d.ts +1 -1
  25. package/lib/raydium/marketV2/createMarket.d.ts +1 -1
  26. package/lib/raydium/marketV2/index.d.ts +1 -1
  27. package/lib/raydium/moduleBase.d.ts +1 -1
  28. package/lib/raydium/raydium.d.ts +1 -1
  29. package/lib/raydium/raydium.js +1 -1
  30. package/lib/raydium/raydium.js.map +1 -1
  31. package/lib/raydium/raydium.mjs +1 -1
  32. package/lib/raydium/raydium.mjs.map +1 -1
  33. package/lib/raydium/token/token.d.ts +1 -1
  34. package/lib/raydium/tradeV2/index.js +1 -1
  35. package/lib/raydium/tradeV2/index.mjs +1 -1
  36. package/lib/raydium/tradeV2/trade.d.ts +1 -1
  37. package/lib/raydium/utils1216/index.d.ts +1 -1
  38. package/lib/raydium/utils1216/utils1216.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/src/raydium/cpmm/cpmm.ts +6 -4
  41. package/src/raydium/cpmm/type.ts +2 -0
  42. /package/lib/{raydium-12e49584.d.ts → raydium-6f213ff1.d.ts} +0 -0
@@ -2,7 +2,7 @@ import '@solana/web3.js';
2
2
  import 'bn.js';
3
3
  import '../../api-19c05a82.js';
4
4
  import '../../common/txTool/txType.js';
5
- export { j as default } from '../../raydium-12e49584.js';
5
+ export { j as default } from '../../raydium-6f213ff1.js';
6
6
  import '../../type-5c415626.js';
7
7
  import '../liquidity/type.js';
8
8
  import '../cpmm/type.js';
@@ -1,4 +1,4 @@
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-6f213ff1.js';
2
2
  import '@solana/web3.js';
3
3
  import '../../api-19c05a82.js';
4
4
  import 'axios';
@@ -1,7 +1,7 @@
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-6f213ff1.js';
5
5
  import '../../marshmallow/buffer-layout.js';
6
6
  import '../../api-19c05a82.js';
7
7
  import 'axios';
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.113-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",
@@ -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 {