@meteora-ag/dlmm 1.9.0-rc.3 → 1.9.1-rc.0
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/dist/index.js +31 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17017,18 +17017,21 @@ var DLMM = class {
|
|
|
17017
17017
|
baseFeePowerFactor: baseFeePowerFactor.toNumber(),
|
|
17018
17018
|
padding: Array(63).fill(0)
|
|
17019
17019
|
};
|
|
17020
|
-
const
|
|
17020
|
+
const preInstructions = [];
|
|
17021
|
+
const { ataPubKey: userTokenX, ix: createUserTokenXIx } = await getOrCreateATAInstruction(
|
|
17022
|
+
connection,
|
|
17021
17023
|
tokenX,
|
|
17022
17024
|
creatorKey,
|
|
17023
|
-
true,
|
|
17024
17025
|
tokenXAccount.owner
|
|
17025
17026
|
);
|
|
17026
|
-
|
|
17027
|
+
createUserTokenXIx && preInstructions.push(createUserTokenXIx);
|
|
17028
|
+
const { ataPubKey: userTokenY, ix: createUserTokenYIx } = await getOrCreateATAInstruction(
|
|
17029
|
+
connection,
|
|
17027
17030
|
tokenY,
|
|
17028
17031
|
creatorKey,
|
|
17029
|
-
true,
|
|
17030
17032
|
tokenYAccount.owner
|
|
17031
17033
|
);
|
|
17034
|
+
createUserTokenYIx && preInstructions.push(createUserTokenYIx);
|
|
17032
17035
|
return program.methods.initializeCustomizablePermissionlessLbPair2(ixData).accountsPartial({
|
|
17033
17036
|
tokenBadgeX: tokenBadgeXAccount ? tokenBadgeX : program.programId,
|
|
17034
17037
|
tokenBadgeY: tokenBadgeYAccount ? tokenBadgeY : program.programId,
|
|
@@ -17045,7 +17048,7 @@ var DLMM = class {
|
|
|
17045
17048
|
funder: creatorKey,
|
|
17046
17049
|
tokenProgramX: tokenXAccount.owner,
|
|
17047
17050
|
tokenProgramY: tokenYAccount.owner
|
|
17048
|
-
}).transaction();
|
|
17051
|
+
}).preInstructions(preInstructions).transaction();
|
|
17049
17052
|
}
|
|
17050
17053
|
/**
|
|
17051
17054
|
* Create a new customizable permissionless pair. Support only token program.
|
|
@@ -17069,6 +17072,13 @@ var DLMM = class {
|
|
|
17069
17072
|
tokenY,
|
|
17070
17073
|
program.programId
|
|
17071
17074
|
);
|
|
17075
|
+
const [
|
|
17076
|
+
tokenXAccount,
|
|
17077
|
+
tokenYAccount
|
|
17078
|
+
] = await connection.getMultipleAccountsInfo([
|
|
17079
|
+
tokenX,
|
|
17080
|
+
tokenY
|
|
17081
|
+
]);
|
|
17072
17082
|
const [reserveX] = deriveReserve(tokenX, lbPair, program.programId);
|
|
17073
17083
|
const [reserveY] = deriveReserve(tokenY, lbPair, program.programId);
|
|
17074
17084
|
const [oracle] = deriveOracle(lbPair, program.programId);
|
|
@@ -17095,8 +17105,21 @@ var DLMM = class {
|
|
|
17095
17105
|
creatorPoolOnOffControl: creatorPoolOnOffControl ? creatorPoolOnOffControl : false,
|
|
17096
17106
|
padding: Array(63).fill(0)
|
|
17097
17107
|
};
|
|
17098
|
-
const
|
|
17099
|
-
const
|
|
17108
|
+
const preInstructions = [];
|
|
17109
|
+
const { ataPubKey: userTokenX, ix: createUserTokenXIx } = await getOrCreateATAInstruction(
|
|
17110
|
+
connection,
|
|
17111
|
+
tokenX,
|
|
17112
|
+
creatorKey,
|
|
17113
|
+
tokenXAccount.owner
|
|
17114
|
+
);
|
|
17115
|
+
createUserTokenXIx && preInstructions.push(createUserTokenXIx);
|
|
17116
|
+
const { ataPubKey: userTokenY, ix: createUserTokenYIx } = await getOrCreateATAInstruction(
|
|
17117
|
+
connection,
|
|
17118
|
+
tokenY,
|
|
17119
|
+
creatorKey,
|
|
17120
|
+
tokenYAccount.owner
|
|
17121
|
+
);
|
|
17122
|
+
createUserTokenYIx && preInstructions.push(createUserTokenYIx);
|
|
17100
17123
|
return program.methods.initializeCustomizablePermissionlessLbPair(ixData).accountsPartial({
|
|
17101
17124
|
lbPair,
|
|
17102
17125
|
reserveX,
|
|
@@ -17109,7 +17132,7 @@ var DLMM = class {
|
|
|
17109
17132
|
userTokenX,
|
|
17110
17133
|
userTokenY,
|
|
17111
17134
|
funder: creatorKey
|
|
17112
|
-
}).transaction();
|
|
17135
|
+
}).preInstructions(preInstructions).transaction();
|
|
17113
17136
|
}
|
|
17114
17137
|
/**
|
|
17115
17138
|
* Create a new liquidity pair. Support only token program.
|