@meteora-ag/dlmm 1.9.8 → 1.9.9
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.d.ts +2 -1
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14332,7 +14332,8 @@ declare class DLMM {
|
|
|
14332
14332
|
* - `limitOrderPubkey`: The public key of the limit-order account to cancel.
|
|
14333
14333
|
* - `owner`: The owner of the limit-order account and transaction fee payer.
|
|
14334
14334
|
* - `binIds`: Bin IDs to cancel from the limit order.
|
|
14335
|
-
* @returns {Promise<Transaction>} A transaction that cancels the limit order
|
|
14335
|
+
* @returns {Promise<Transaction>} A transaction that cancels the limit order, ensures owner ATAs for both pool
|
|
14336
|
+
* mints (including idempotent creates for non-SOL legs), and unwraps SOL when applicable.
|
|
14336
14337
|
*/
|
|
14337
14338
|
cancelLimitOrder({ limitOrderPubkey, owner, rentReceiver, binIds, }: {
|
|
14338
14339
|
limitOrderPubkey: PublicKey;
|
package/dist/index.js
CHANGED
|
@@ -22062,7 +22062,8 @@ var DLMM = class {
|
|
|
22062
22062
|
* - `limitOrderPubkey`: The public key of the limit-order account to cancel.
|
|
22063
22063
|
* - `owner`: The owner of the limit-order account and transaction fee payer.
|
|
22064
22064
|
* - `binIds`: Bin IDs to cancel from the limit order.
|
|
22065
|
-
* @returns {Promise<Transaction>} A transaction that cancels the limit order
|
|
22065
|
+
* @returns {Promise<Transaction>} A transaction that cancels the limit order, ensures owner ATAs for both pool
|
|
22066
|
+
* mints (including idempotent creates for non-SOL legs), and unwraps SOL when applicable.
|
|
22066
22067
|
*/
|
|
22067
22068
|
async cancelLimitOrder({
|
|
22068
22069
|
limitOrderPubkey,
|
|
@@ -22090,7 +22091,20 @@ var DLMM = class {
|
|
|
22090
22091
|
true,
|
|
22091
22092
|
this.tokenY.owner
|
|
22092
22093
|
);
|
|
22093
|
-
if (this.tokenX.mint.address.equals(_spltoken.NATIVE_MINT)
|
|
22094
|
+
if (this.tokenX.mint.address.equals(_spltoken.NATIVE_MINT)) {
|
|
22095
|
+
if (!_optionalChain([this, 'access', _177 => _177.opt, 'optionalAccess', _178 => _178.skipSolWrappingOperation])) {
|
|
22096
|
+
preInstructions.push(
|
|
22097
|
+
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22098
|
+
owner,
|
|
22099
|
+
userTokenX,
|
|
22100
|
+
owner,
|
|
22101
|
+
this.tokenX.mint.address,
|
|
22102
|
+
this.tokenX.owner
|
|
22103
|
+
)
|
|
22104
|
+
);
|
|
22105
|
+
postInstructions.push(unwrapSOLInstruction(owner));
|
|
22106
|
+
}
|
|
22107
|
+
} else {
|
|
22094
22108
|
preInstructions.push(
|
|
22095
22109
|
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22096
22110
|
owner,
|
|
@@ -22100,9 +22114,21 @@ var DLMM = class {
|
|
|
22100
22114
|
this.tokenX.owner
|
|
22101
22115
|
)
|
|
22102
22116
|
);
|
|
22103
|
-
postInstructions.push(unwrapSOLInstruction(owner));
|
|
22104
22117
|
}
|
|
22105
|
-
if (this.tokenY.mint.address.equals(_spltoken.NATIVE_MINT)
|
|
22118
|
+
if (this.tokenY.mint.address.equals(_spltoken.NATIVE_MINT)) {
|
|
22119
|
+
if (!_optionalChain([this, 'access', _179 => _179.opt, 'optionalAccess', _180 => _180.skipSolWrappingOperation])) {
|
|
22120
|
+
preInstructions.push(
|
|
22121
|
+
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22122
|
+
owner,
|
|
22123
|
+
userTokenY,
|
|
22124
|
+
owner,
|
|
22125
|
+
this.tokenY.mint.address,
|
|
22126
|
+
this.tokenY.owner
|
|
22127
|
+
)
|
|
22128
|
+
);
|
|
22129
|
+
postInstructions.push(unwrapSOLInstruction(owner));
|
|
22130
|
+
}
|
|
22131
|
+
} else {
|
|
22106
22132
|
preInstructions.push(
|
|
22107
22133
|
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22108
22134
|
owner,
|
|
@@ -22112,7 +22138,6 @@ var DLMM = class {
|
|
|
22112
22138
|
this.tokenY.owner
|
|
22113
22139
|
)
|
|
22114
22140
|
);
|
|
22115
|
-
postInstructions.push(unwrapSOLInstruction(owner));
|
|
22116
22141
|
}
|
|
22117
22142
|
const closeLimitOrderIx = await this.program.methods.closeLimitOrderIfEmpty().accountsPartial({
|
|
22118
22143
|
limitOrder: limitOrderPubkey,
|