@stabbleorg/mclmm-sdk 0.1.3 → 0.1.4
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.js +7 -7
- package/lib/index.mjs +8 -8
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8700,7 +8700,7 @@ var PositionManager = class {
|
|
|
8700
8700
|
const [positionNftAccount] = await (0, import_token2.findAssociatedTokenPda)({
|
|
8701
8701
|
mint: ownerPosition.nftMint,
|
|
8702
8702
|
owner: ownerInfo.wallet.address,
|
|
8703
|
-
tokenProgram:
|
|
8703
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS
|
|
8704
8704
|
});
|
|
8705
8705
|
const [protocolPositionPda] = await PdaUtils.getProtocolPositionStatePda(
|
|
8706
8706
|
poolState.address,
|
|
@@ -8733,7 +8733,7 @@ var PositionManager = class {
|
|
|
8733
8733
|
tokenAccount1: ownerInfo.tokenAccountB,
|
|
8734
8734
|
tokenVault0: poolState.data.tokenVault0,
|
|
8735
8735
|
tokenVault1: poolState.data.tokenVault1,
|
|
8736
|
-
tokenProgram:
|
|
8736
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS,
|
|
8737
8737
|
vault0Mint: poolState.data.tokenMint0,
|
|
8738
8738
|
vault1Mint: poolState.data.tokenMint1,
|
|
8739
8739
|
liquidity,
|
|
@@ -8776,7 +8776,7 @@ var PositionManager = class {
|
|
|
8776
8776
|
const [positionNftAccount] = await (0, import_token2.findAssociatedTokenPda)({
|
|
8777
8777
|
mint: ownerPosition.nftMint,
|
|
8778
8778
|
owner: ownerInfo.wallet.address,
|
|
8779
|
-
tokenProgram:
|
|
8779
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS
|
|
8780
8780
|
});
|
|
8781
8781
|
const [protocolPositionPda] = await PdaUtils.getProtocolPositionStatePda(
|
|
8782
8782
|
poolState.address,
|
|
@@ -8809,7 +8809,7 @@ var PositionManager = class {
|
|
|
8809
8809
|
tickArrayUpper,
|
|
8810
8810
|
recipientTokenAccount0: ownerInfo.tokenAccountA,
|
|
8811
8811
|
recipientTokenAccount1: ownerInfo.tokenAccountB,
|
|
8812
|
-
tokenProgram:
|
|
8812
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS,
|
|
8813
8813
|
vault0Mint: poolState.data.tokenMint0,
|
|
8814
8814
|
vault1Mint: poolState.data.tokenMint1,
|
|
8815
8815
|
liquidity,
|
|
@@ -8843,14 +8843,14 @@ var PositionManager = class {
|
|
|
8843
8843
|
const [positionNftAccount] = await (0, import_token2.findAssociatedTokenPda)({
|
|
8844
8844
|
mint: ownerPosition.nftMint,
|
|
8845
8845
|
owner: ownerInfo.wallet.address,
|
|
8846
|
-
tokenProgram:
|
|
8846
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS
|
|
8847
8847
|
});
|
|
8848
8848
|
const instruction = getClosePositionInstruction({
|
|
8849
8849
|
nftOwner: ownerInfo.wallet,
|
|
8850
8850
|
positionNftMint: ownerPosition.nftMint,
|
|
8851
8851
|
positionNftAccount,
|
|
8852
8852
|
personalPosition,
|
|
8853
|
-
tokenProgram:
|
|
8853
|
+
tokenProgram: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS
|
|
8854
8854
|
});
|
|
8855
8855
|
return {
|
|
8856
8856
|
instructions: [instruction],
|
|
@@ -8971,7 +8971,7 @@ var PositionManager = class {
|
|
|
8971
8971
|
try {
|
|
8972
8972
|
const response = await this.config.rpc.getTokenAccountsByOwner(
|
|
8973
8973
|
wallet,
|
|
8974
|
-
{ programId:
|
|
8974
|
+
{ programId: import_token_2022.TOKEN_2022_PROGRAM_ADDRESS },
|
|
8975
8975
|
{ encoding: "jsonParsed" }
|
|
8976
8976
|
).send();
|
|
8977
8977
|
const response22 = await this.config.rpc.getTokenAccountsByOwner(
|
package/lib/index.mjs
CHANGED
|
@@ -9128,7 +9128,7 @@ var PoolManager = class {
|
|
|
9128
9128
|
|
|
9129
9129
|
// src/position-manager.ts
|
|
9130
9130
|
import { generateKeyPairSigner } from "@solana/kit";
|
|
9131
|
-
import { findAssociatedTokenPda
|
|
9131
|
+
import { findAssociatedTokenPda } from "@solana-program/token";
|
|
9132
9132
|
import { TOKEN_2022_PROGRAM_ADDRESS } from "@solana-program/token-2022";
|
|
9133
9133
|
import BN6 from "bn.js";
|
|
9134
9134
|
var PositionManager = class {
|
|
@@ -9338,7 +9338,7 @@ var PositionManager = class {
|
|
|
9338
9338
|
const [positionNftAccount] = await findAssociatedTokenPda({
|
|
9339
9339
|
mint: ownerPosition.nftMint,
|
|
9340
9340
|
owner: ownerInfo.wallet.address,
|
|
9341
|
-
tokenProgram:
|
|
9341
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS
|
|
9342
9342
|
});
|
|
9343
9343
|
const [protocolPositionPda] = await PdaUtils.getProtocolPositionStatePda(
|
|
9344
9344
|
poolState.address,
|
|
@@ -9371,7 +9371,7 @@ var PositionManager = class {
|
|
|
9371
9371
|
tokenAccount1: ownerInfo.tokenAccountB,
|
|
9372
9372
|
tokenVault0: poolState.data.tokenVault0,
|
|
9373
9373
|
tokenVault1: poolState.data.tokenVault1,
|
|
9374
|
-
tokenProgram:
|
|
9374
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS,
|
|
9375
9375
|
vault0Mint: poolState.data.tokenMint0,
|
|
9376
9376
|
vault1Mint: poolState.data.tokenMint1,
|
|
9377
9377
|
liquidity,
|
|
@@ -9414,7 +9414,7 @@ var PositionManager = class {
|
|
|
9414
9414
|
const [positionNftAccount] = await findAssociatedTokenPda({
|
|
9415
9415
|
mint: ownerPosition.nftMint,
|
|
9416
9416
|
owner: ownerInfo.wallet.address,
|
|
9417
|
-
tokenProgram:
|
|
9417
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS
|
|
9418
9418
|
});
|
|
9419
9419
|
const [protocolPositionPda] = await PdaUtils.getProtocolPositionStatePda(
|
|
9420
9420
|
poolState.address,
|
|
@@ -9447,7 +9447,7 @@ var PositionManager = class {
|
|
|
9447
9447
|
tickArrayUpper,
|
|
9448
9448
|
recipientTokenAccount0: ownerInfo.tokenAccountA,
|
|
9449
9449
|
recipientTokenAccount1: ownerInfo.tokenAccountB,
|
|
9450
|
-
tokenProgram:
|
|
9450
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS,
|
|
9451
9451
|
vault0Mint: poolState.data.tokenMint0,
|
|
9452
9452
|
vault1Mint: poolState.data.tokenMint1,
|
|
9453
9453
|
liquidity,
|
|
@@ -9481,14 +9481,14 @@ var PositionManager = class {
|
|
|
9481
9481
|
const [positionNftAccount] = await findAssociatedTokenPda({
|
|
9482
9482
|
mint: ownerPosition.nftMint,
|
|
9483
9483
|
owner: ownerInfo.wallet.address,
|
|
9484
|
-
tokenProgram:
|
|
9484
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS
|
|
9485
9485
|
});
|
|
9486
9486
|
const instruction = getClosePositionInstruction({
|
|
9487
9487
|
nftOwner: ownerInfo.wallet,
|
|
9488
9488
|
positionNftMint: ownerPosition.nftMint,
|
|
9489
9489
|
positionNftAccount,
|
|
9490
9490
|
personalPosition,
|
|
9491
|
-
tokenProgram:
|
|
9491
|
+
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS
|
|
9492
9492
|
});
|
|
9493
9493
|
return {
|
|
9494
9494
|
instructions: [instruction],
|
|
@@ -9609,7 +9609,7 @@ var PositionManager = class {
|
|
|
9609
9609
|
try {
|
|
9610
9610
|
const response = await this.config.rpc.getTokenAccountsByOwner(
|
|
9611
9611
|
wallet,
|
|
9612
|
-
{ programId:
|
|
9612
|
+
{ programId: TOKEN_2022_PROGRAM_ADDRESS },
|
|
9613
9613
|
{ encoding: "jsonParsed" }
|
|
9614
9614
|
).send();
|
|
9615
9615
|
const response22 = await this.config.rpc.getTokenAccountsByOwner(
|