@raydium-io/raydium-sdk-v2 0.0.21-alpha → 0.0.23-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/index.d.ts +1 -1
- 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/raydium/account/account.d.ts +1 -1
- package/lib/raydium/clmm/clmm.d.ts +1 -1
- package/lib/raydium/clmm/index.d.ts +1 -1
- package/lib/raydium/cpmm/cpmm.d.ts +1 -1
- 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/farm/farm.d.ts +1 -1
- package/lib/raydium/ido/ido.d.ts +1 -1
- package/lib/raydium/ido/index.d.ts +1 -1
- package/lib/raydium/index.d.ts +1 -1
- 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/liquidity/liquidity.d.ts +1 -1
- package/lib/raydium/marketV2/createMarket.d.ts +1 -1
- package/lib/raydium/marketV2/index.d.ts +1 -1
- package/lib/raydium/moduleBase.d.ts +1 -1
- package/lib/raydium/raydium.d.ts +1 -1
- 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/token.d.ts +1 -1
- package/lib/raydium/tradeV2/trade.d.ts +1 -1
- package/lib/raydium/utils1216/index.d.ts +1 -1
- package/lib/raydium/utils1216/utils1216.d.ts +1 -1
- package/lib/{raydium-9f713012.d.ts → raydium-97f3539d.d.ts} +1 -1
- package/package.json +1 -1
- package/src/raydium/cpmm/cpmm.ts +10 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
2
|
import '../../type-2bed92a9.js';
|
|
3
|
-
export { j as default } from '../../raydium-
|
|
3
|
+
export { j as default } from '../../raydium-97f3539d.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../../common/txTool/txType.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
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-97f3539d.js';
|
|
2
2
|
import '@solana/web3.js';
|
|
3
3
|
import '../../api/api.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-
|
|
4
|
+
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-97f3539d.js';
|
|
5
5
|
import '../../marshmallow/buffer-layout.js';
|
|
6
6
|
import '../../api/api.js';
|
|
7
7
|
import 'axios';
|
|
@@ -228,7 +228,7 @@ declare class CpmmModule extends ModuleBase {
|
|
|
228
228
|
baseReserve: BN__default;
|
|
229
229
|
quoteReserve: BN__default;
|
|
230
230
|
}>;
|
|
231
|
-
createPool<T extends TxVersion>({ programId, poolFeeAccount,
|
|
231
|
+
createPool<T extends TxVersion>({ programId, poolFeeAccount, startTime, ownerInfo, associatedOnly, checkCreateATAOwner, txVersion, computeBudgetConfig, ...params }: CreateCpmmPoolParam<T>): Promise<MakeTxData<T, {
|
|
232
232
|
address: CreateCpmmPoolAddress;
|
|
233
233
|
}>>;
|
|
234
234
|
addLiquidity<T extends TxVersion>(params: AddCpmmLiquidityParams<T>): Promise<MakeTxData<T>>;
|
package/package.json
CHANGED
package/src/raydium/cpmm/cpmm.ts
CHANGED
|
@@ -73,18 +73,24 @@ export default class CpmmModule extends ModuleBase {
|
|
|
73
73
|
public async createPool<T extends TxVersion>({
|
|
74
74
|
programId,
|
|
75
75
|
poolFeeAccount,
|
|
76
|
-
mintA,
|
|
77
|
-
mintB,
|
|
78
|
-
mintAAmount,
|
|
79
|
-
mintBAmount,
|
|
80
76
|
startTime,
|
|
81
77
|
ownerInfo,
|
|
82
78
|
associatedOnly = false,
|
|
83
79
|
checkCreateATAOwner = false,
|
|
84
80
|
txVersion,
|
|
85
81
|
computeBudgetConfig,
|
|
82
|
+
...params
|
|
86
83
|
}: CreateCpmmPoolParam<T>): Promise<MakeTxData<T, { address: CreateCpmmPoolAddress }>> {
|
|
87
84
|
const payer = ownerInfo.feePayer || this.scope.owner?.publicKey;
|
|
85
|
+
const isFront = new BN(new PublicKey(params.mintA.address).toBuffer()).lte(
|
|
86
|
+
new BN(new PublicKey(params.mintB.address).toBuffer()),
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const [mintA, mintB] = isFront ? [params.mintA, params.mintB] : [params.mintB, params.mintA];
|
|
90
|
+
const [mintAAmount, mintBAmount] = isFront
|
|
91
|
+
? [params.mintAAmount, params.mintBAmount]
|
|
92
|
+
: [params.mintBAmount, params.mintAAmount];
|
|
93
|
+
|
|
88
94
|
const mintAUseSOLBalance = ownerInfo.useSOLBalance && mintA.address === NATIVE_MINT.toBase58();
|
|
89
95
|
const mintBUseSOLBalance = ownerInfo.useSOLBalance && mintB.address === NATIVE_MINT.toBase58();
|
|
90
96
|
const [mintAPubkey, mintBPubkey] = [new PublicKey(mintA.address), new PublicKey(mintB.address)];
|