@meteora-ag/dlmm 1.9.1-rc.1 → 1.9.2
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 +76 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17018,25 +17018,53 @@ var DLMM = class {
|
|
|
17018
17018
|
padding: Array(63).fill(0)
|
|
17019
17019
|
};
|
|
17020
17020
|
const preInstructions = [];
|
|
17021
|
-
const
|
|
17022
|
-
connection,
|
|
17021
|
+
const userTokenX = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
17023
17022
|
tokenX,
|
|
17024
17023
|
creatorKey,
|
|
17024
|
+
true,
|
|
17025
17025
|
tokenXAccount.owner
|
|
17026
17026
|
);
|
|
17027
|
-
createUserTokenXIx
|
|
17028
|
-
|
|
17029
|
-
|
|
17027
|
+
const createUserTokenXIx = _spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
17028
|
+
creatorKey,
|
|
17029
|
+
userTokenX,
|
|
17030
|
+
creatorKey,
|
|
17031
|
+
tokenX,
|
|
17032
|
+
tokenXAccount.owner
|
|
17033
|
+
);
|
|
17034
|
+
preInstructions.push(createUserTokenXIx);
|
|
17035
|
+
const userTokenY = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
17030
17036
|
tokenY,
|
|
17031
17037
|
creatorKey,
|
|
17038
|
+
true,
|
|
17032
17039
|
tokenYAccount.owner
|
|
17033
17040
|
);
|
|
17034
|
-
createUserTokenYIx
|
|
17041
|
+
const createUserTokenYIx = _spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
17042
|
+
creatorKey,
|
|
17043
|
+
userTokenY,
|
|
17044
|
+
creatorKey,
|
|
17045
|
+
tokenY,
|
|
17046
|
+
tokenYAccount.owner
|
|
17047
|
+
);
|
|
17048
|
+
preInstructions.push(createUserTokenYIx);
|
|
17035
17049
|
const postInstructions = [];
|
|
17036
|
-
if (tokenY.equals(_spltoken.NATIVE_MINT) && !_optionalChain([opt, 'optionalAccess', _69 => _69.skipSolWrappingOperation])) {
|
|
17037
|
-
const wrapAmount = BigInt(
|
|
17038
|
-
|
|
17039
|
-
|
|
17050
|
+
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess', _69 => _69.skipSolWrappingOperation])) {
|
|
17051
|
+
const wrapAmount = BigInt(1);
|
|
17052
|
+
if (tokenX.equals(_spltoken.NATIVE_MINT)) {
|
|
17053
|
+
const wrapSOLIxX = wrapSOLInstruction(
|
|
17054
|
+
creatorKey,
|
|
17055
|
+
userTokenX,
|
|
17056
|
+
wrapAmount
|
|
17057
|
+
);
|
|
17058
|
+
preInstructions.push(...wrapSOLIxX);
|
|
17059
|
+
}
|
|
17060
|
+
if (tokenY.equals(_spltoken.NATIVE_MINT)) {
|
|
17061
|
+
const wrapSOLIxY = wrapSOLInstruction(
|
|
17062
|
+
creatorKey,
|
|
17063
|
+
userTokenY,
|
|
17064
|
+
wrapAmount
|
|
17065
|
+
);
|
|
17066
|
+
preInstructions.push(...wrapSOLIxY);
|
|
17067
|
+
}
|
|
17040
17068
|
const unwrapSOLIx = await unwrapSOLInstruction(creatorKey);
|
|
17041
17069
|
if (unwrapSOLIx) {
|
|
17042
17070
|
postInstructions.push(unwrapSOLIx);
|
|
@@ -17110,25 +17138,53 @@ var DLMM = class {
|
|
|
17110
17138
|
padding: Array(63).fill(0)
|
|
17111
17139
|
};
|
|
17112
17140
|
const preInstructions = [];
|
|
17113
|
-
const
|
|
17114
|
-
connection,
|
|
17141
|
+
const userTokenX = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
17115
17142
|
tokenX,
|
|
17116
17143
|
creatorKey,
|
|
17144
|
+
true,
|
|
17117
17145
|
tokenXAccount.owner
|
|
17118
17146
|
);
|
|
17119
|
-
createUserTokenXIx
|
|
17120
|
-
|
|
17121
|
-
|
|
17147
|
+
const createUserTokenXIx = _spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
17148
|
+
creatorKey,
|
|
17149
|
+
userTokenX,
|
|
17150
|
+
creatorKey,
|
|
17151
|
+
tokenX,
|
|
17152
|
+
tokenXAccount.owner
|
|
17153
|
+
);
|
|
17154
|
+
preInstructions.push(createUserTokenXIx);
|
|
17155
|
+
const userTokenY = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
17122
17156
|
tokenY,
|
|
17123
17157
|
creatorKey,
|
|
17158
|
+
true,
|
|
17124
17159
|
tokenYAccount.owner
|
|
17125
17160
|
);
|
|
17126
|
-
createUserTokenYIx
|
|
17161
|
+
const createUserTokenYIx = _spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
17162
|
+
creatorKey,
|
|
17163
|
+
userTokenY,
|
|
17164
|
+
creatorKey,
|
|
17165
|
+
tokenY,
|
|
17166
|
+
tokenYAccount.owner
|
|
17167
|
+
);
|
|
17168
|
+
preInstructions.push(createUserTokenYIx);
|
|
17127
17169
|
const postInstructions = [];
|
|
17128
|
-
if (tokenY.equals(_spltoken.NATIVE_MINT) && !_optionalChain([opt, 'optionalAccess', _70 => _70.skipSolWrappingOperation])) {
|
|
17129
|
-
const wrapAmount = BigInt(
|
|
17130
|
-
|
|
17131
|
-
|
|
17170
|
+
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess', _70 => _70.skipSolWrappingOperation])) {
|
|
17171
|
+
const wrapAmount = BigInt(1);
|
|
17172
|
+
if (tokenX.equals(_spltoken.NATIVE_MINT)) {
|
|
17173
|
+
const wrapSOLIxX = wrapSOLInstruction(
|
|
17174
|
+
creatorKey,
|
|
17175
|
+
userTokenX,
|
|
17176
|
+
wrapAmount
|
|
17177
|
+
);
|
|
17178
|
+
preInstructions.push(...wrapSOLIxX);
|
|
17179
|
+
}
|
|
17180
|
+
if (tokenY.equals(_spltoken.NATIVE_MINT)) {
|
|
17181
|
+
const wrapSOLIxY = wrapSOLInstruction(
|
|
17182
|
+
creatorKey,
|
|
17183
|
+
userTokenY,
|
|
17184
|
+
wrapAmount
|
|
17185
|
+
);
|
|
17186
|
+
preInstructions.push(...wrapSOLIxY);
|
|
17187
|
+
}
|
|
17132
17188
|
const unwrapSOLIx = await unwrapSOLInstruction(creatorKey);
|
|
17133
17189
|
if (unwrapSOLIx) {
|
|
17134
17190
|
postInstructions.push(unwrapSOLIx);
|