@crypticdot/defituna-client 3.0.0 → 3.0.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 CHANGED
@@ -74,8 +74,8 @@ __export(index_exports, {
74
74
  MIN_SQRT_PRICE: () => MIN_SQRT_PRICE,
75
75
  MarketMaker: () => MarketMaker,
76
76
  NATIVE_MINT: () => NATIVE_MINT,
77
- NO_STOP_LOSS: () => NO_STOP_LOSS,
78
- NO_TAKE_PROFIT: () => NO_TAKE_PROFIT,
77
+ NO_LOWER_LIMIT_ORDER: () => NO_LOWER_LIMIT_ORDER,
78
+ NO_UPPER_LIMIT_ORDER: () => NO_UPPER_LIMIT_ORDER,
79
79
  OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR: () => OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR,
80
80
  OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR: () => OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR,
81
81
  OPEN_AND_INCREASE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR: () => OPEN_AND_INCREASE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
@@ -169,10 +169,10 @@ __export(index_exports, {
169
169
  TUNA_POSITION_FLAGS_ALLOW_REBALANCING: () => TUNA_POSITION_FLAGS_ALLOW_REBALANCING,
170
170
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD: () => TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD,
171
171
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE: () => TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE,
172
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A: () => TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A,
173
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B: () => TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B,
174
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A: () => TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A,
175
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B: () => TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B,
172
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A: () => TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
173
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B: () => TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
174
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A: () => TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
175
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B: () => TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
176
176
  TUNA_PROGRAM_ADDRESS: () => TUNA_PROGRAM_ADDRESS,
177
177
  TUNA_SPOT_POSITION_DISCRIMINATOR: () => TUNA_SPOT_POSITION_DISCRIMINATOR,
178
178
  TunaAccount: () => TunaAccount,
@@ -1132,8 +1132,8 @@ function getTunaLpPositionEncoder() {
1132
1132
  ["flags", (0, import_kit10.getU32Encoder)()],
1133
1133
  ["marketMaker", getMarketMakerEncoder()],
1134
1134
  ["entrySqrtPrice", (0, import_kit10.getU128Encoder)()],
1135
- ["stopLossSqrtPrice", (0, import_kit10.getU128Encoder)()],
1136
- ["takeProfitSqrtPrice", (0, import_kit10.getU128Encoder)()],
1135
+ ["lowerLimitOrderSqrtPrice", (0, import_kit10.getU128Encoder)()],
1136
+ ["upperLimitOrderSqrtPrice", (0, import_kit10.getU128Encoder)()],
1137
1137
  ["rebalanceThresholdTicks", (0, import_kit10.getU32Encoder)()],
1138
1138
  ["reserved", (0, import_kit10.fixEncoderSize)((0, import_kit10.getBytesEncoder)(), 9)]
1139
1139
  ]),
@@ -1169,8 +1169,8 @@ function getTunaLpPositionDecoder() {
1169
1169
  ["flags", (0, import_kit10.getU32Decoder)()],
1170
1170
  ["marketMaker", getMarketMakerDecoder()],
1171
1171
  ["entrySqrtPrice", (0, import_kit10.getU128Decoder)()],
1172
- ["stopLossSqrtPrice", (0, import_kit10.getU128Decoder)()],
1173
- ["takeProfitSqrtPrice", (0, import_kit10.getU128Decoder)()],
1172
+ ["lowerLimitOrderSqrtPrice", (0, import_kit10.getU128Decoder)()],
1173
+ ["upperLimitOrderSqrtPrice", (0, import_kit10.getU128Decoder)()],
1174
1174
  ["rebalanceThresholdTicks", (0, import_kit10.getU32Decoder)()],
1175
1175
  ["reserved", (0, import_kit10.fixDecoderSize)((0, import_kit10.getBytesDecoder)(), 9)]
1176
1176
  ]);
@@ -1249,8 +1249,8 @@ function getTunaSpotPositionEncoder() {
1249
1249
  ["loanShares", (0, import_kit11.getU64Encoder)()],
1250
1250
  ["loanFunds", (0, import_kit11.getU64Encoder)()],
1251
1251
  ["entrySqrtPrice", (0, import_kit11.getU128Encoder)()],
1252
- ["stopLossSqrtPrice", (0, import_kit11.getU128Encoder)()],
1253
- ["takeProfitSqrtPrice", (0, import_kit11.getU128Encoder)()],
1252
+ ["lowerLimitOrderSqrtPrice", (0, import_kit11.getU128Encoder)()],
1253
+ ["upperLimitOrderSqrtPrice", (0, import_kit11.getU128Encoder)()],
1254
1254
  ["reserved", (0, import_kit11.fixEncoderSize)((0, import_kit11.getBytesEncoder)(), 128)]
1255
1255
  ]),
1256
1256
  (value) => ({ ...value, discriminator: TUNA_SPOT_POSITION_DISCRIMINATOR })
@@ -1275,8 +1275,8 @@ function getTunaSpotPositionDecoder() {
1275
1275
  ["loanShares", (0, import_kit11.getU64Decoder)()],
1276
1276
  ["loanFunds", (0, import_kit11.getU64Decoder)()],
1277
1277
  ["entrySqrtPrice", (0, import_kit11.getU128Decoder)()],
1278
- ["stopLossSqrtPrice", (0, import_kit11.getU128Decoder)()],
1279
- ["takeProfitSqrtPrice", (0, import_kit11.getU128Decoder)()],
1278
+ ["lowerLimitOrderSqrtPrice", (0, import_kit11.getU128Decoder)()],
1279
+ ["upperLimitOrderSqrtPrice", (0, import_kit11.getU128Decoder)()],
1280
1280
  ["reserved", (0, import_kit11.fixDecoderSize)((0, import_kit11.getBytesDecoder)(), 128)]
1281
1281
  ]);
1282
1282
  }
@@ -6218,8 +6218,8 @@ function getOpenAndIncreaseTunaLpPositionFusionInstructionDataEncoder() {
6218
6218
  ["discriminator", (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8)],
6219
6219
  ["tickLowerIndex", (0, import_kit42.getI32Encoder)()],
6220
6220
  ["tickUpperIndex", (0, import_kit42.getI32Encoder)()],
6221
- ["stopLossSqrtPrice", (0, import_kit42.getU128Encoder)()],
6222
- ["takeProfitSqrtPrice", (0, import_kit42.getU128Encoder)()],
6221
+ ["lowerLimitOrderSqrtPrice", (0, import_kit42.getU128Encoder)()],
6222
+ ["upperLimitOrderSqrtPrice", (0, import_kit42.getU128Encoder)()],
6223
6223
  ["flags", (0, import_kit42.getU32Encoder)()],
6224
6224
  ["collateralA", (0, import_kit42.getU64Encoder)()],
6225
6225
  ["collateralB", (0, import_kit42.getU64Encoder)()],
@@ -6241,8 +6241,8 @@ function getOpenAndIncreaseTunaLpPositionFusionInstructionDataDecoder() {
6241
6241
  ["discriminator", (0, import_kit42.fixDecoderSize)((0, import_kit42.getBytesDecoder)(), 8)],
6242
6242
  ["tickLowerIndex", (0, import_kit42.getI32Decoder)()],
6243
6243
  ["tickUpperIndex", (0, import_kit42.getI32Decoder)()],
6244
- ["stopLossSqrtPrice", (0, import_kit42.getU128Decoder)()],
6245
- ["takeProfitSqrtPrice", (0, import_kit42.getU128Decoder)()],
6244
+ ["lowerLimitOrderSqrtPrice", (0, import_kit42.getU128Decoder)()],
6245
+ ["upperLimitOrderSqrtPrice", (0, import_kit42.getU128Decoder)()],
6246
6246
  ["flags", (0, import_kit42.getU32Decoder)()],
6247
6247
  ["collateralA", (0, import_kit42.getU64Decoder)()],
6248
6248
  ["collateralB", (0, import_kit42.getU64Decoder)()],
@@ -6443,8 +6443,8 @@ function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataEncoder() {
6443
6443
  ["discriminator", (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8)],
6444
6444
  ["tickLowerIndex", (0, import_kit43.getI32Encoder)()],
6445
6445
  ["tickUpperIndex", (0, import_kit43.getI32Encoder)()],
6446
- ["stopLossSqrtPrice", (0, import_kit43.getU128Encoder)()],
6447
- ["takeProfitSqrtPrice", (0, import_kit43.getU128Encoder)()],
6446
+ ["lowerLimitOrderSqrtPrice", (0, import_kit43.getU128Encoder)()],
6447
+ ["upperLimitOrderSqrtPrice", (0, import_kit43.getU128Encoder)()],
6448
6448
  ["flags", (0, import_kit43.getU32Encoder)()],
6449
6449
  ["collateralA", (0, import_kit43.getU64Encoder)()],
6450
6450
  ["collateralB", (0, import_kit43.getU64Encoder)()],
@@ -6466,8 +6466,8 @@ function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataDecoder() {
6466
6466
  ["discriminator", (0, import_kit43.fixDecoderSize)((0, import_kit43.getBytesDecoder)(), 8)],
6467
6467
  ["tickLowerIndex", (0, import_kit43.getI32Decoder)()],
6468
6468
  ["tickUpperIndex", (0, import_kit43.getI32Decoder)()],
6469
- ["stopLossSqrtPrice", (0, import_kit43.getU128Decoder)()],
6470
- ["takeProfitSqrtPrice", (0, import_kit43.getU128Decoder)()],
6469
+ ["lowerLimitOrderSqrtPrice", (0, import_kit43.getU128Decoder)()],
6470
+ ["upperLimitOrderSqrtPrice", (0, import_kit43.getU128Decoder)()],
6471
6471
  ["flags", (0, import_kit43.getU32Decoder)()],
6472
6472
  ["collateralA", (0, import_kit43.getU64Decoder)()],
6473
6473
  ["collateralB", (0, import_kit43.getU64Decoder)()],
@@ -6670,8 +6670,8 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstructionDataEncoder() {
6670
6670
  ["collateralToken", getPoolTokenEncoder()],
6671
6671
  ["collateralAmount", (0, import_kit44.getU64Encoder)()],
6672
6672
  ["borrowAmount", (0, import_kit44.getU64Encoder)()],
6673
- ["stopLossSqrtPrice", (0, import_kit44.getU128Encoder)()],
6674
- ["takeProfitSqrtPrice", (0, import_kit44.getU128Encoder)()],
6673
+ ["lowerLimitOrderSqrtPrice", (0, import_kit44.getU128Encoder)()],
6674
+ ["upperLimitOrderSqrtPrice", (0, import_kit44.getU128Encoder)()],
6675
6675
  ["flags", (0, import_kit44.getU32Encoder)()],
6676
6676
  ["maxSwapSlippage", (0, import_kit44.getU32Encoder)()],
6677
6677
  ["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
@@ -6689,8 +6689,8 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstructionDataDecoder() {
6689
6689
  ["collateralToken", getPoolTokenDecoder()],
6690
6690
  ["collateralAmount", (0, import_kit44.getU64Decoder)()],
6691
6691
  ["borrowAmount", (0, import_kit44.getU64Decoder)()],
6692
- ["stopLossSqrtPrice", (0, import_kit44.getU128Decoder)()],
6693
- ["takeProfitSqrtPrice", (0, import_kit44.getU128Decoder)()],
6692
+ ["lowerLimitOrderSqrtPrice", (0, import_kit44.getU128Decoder)()],
6693
+ ["upperLimitOrderSqrtPrice", (0, import_kit44.getU128Decoder)()],
6694
6694
  ["flags", (0, import_kit44.getU32Decoder)()],
6695
6695
  ["maxSwapSlippage", (0, import_kit44.getU32Decoder)()],
6696
6696
  ["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
@@ -6873,8 +6873,8 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstructionDataEncoder() {
6873
6873
  ["collateralToken", getPoolTokenEncoder()],
6874
6874
  ["collateralAmount", (0, import_kit45.getU64Encoder)()],
6875
6875
  ["borrowAmount", (0, import_kit45.getU64Encoder)()],
6876
- ["stopLossSqrtPrice", (0, import_kit45.getU128Encoder)()],
6877
- ["takeProfitSqrtPrice", (0, import_kit45.getU128Encoder)()],
6876
+ ["lowerLimitOrderSqrtPrice", (0, import_kit45.getU128Encoder)()],
6877
+ ["upperLimitOrderSqrtPrice", (0, import_kit45.getU128Encoder)()],
6878
6878
  ["flags", (0, import_kit45.getU32Encoder)()],
6879
6879
  ["maxSwapSlippage", (0, import_kit45.getU32Encoder)()],
6880
6880
  ["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
@@ -6892,8 +6892,8 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstructionDataDecoder() {
6892
6892
  ["collateralToken", getPoolTokenDecoder()],
6893
6893
  ["collateralAmount", (0, import_kit45.getU64Decoder)()],
6894
6894
  ["borrowAmount", (0, import_kit45.getU64Decoder)()],
6895
- ["stopLossSqrtPrice", (0, import_kit45.getU128Decoder)()],
6896
- ["takeProfitSqrtPrice", (0, import_kit45.getU128Decoder)()],
6895
+ ["lowerLimitOrderSqrtPrice", (0, import_kit45.getU128Decoder)()],
6896
+ ["upperLimitOrderSqrtPrice", (0, import_kit45.getU128Decoder)()],
6897
6897
  ["flags", (0, import_kit45.getU32Decoder)()],
6898
6898
  ["maxSwapSlippage", (0, import_kit45.getU32Decoder)()],
6899
6899
  ["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
@@ -7175,8 +7175,8 @@ function getOpenTunaLpPositionFusionInstructionDataEncoder() {
7175
7175
  ["discriminator", (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8)],
7176
7176
  ["tickLowerIndex", (0, import_kit47.getI32Encoder)()],
7177
7177
  ["tickUpperIndex", (0, import_kit47.getI32Encoder)()],
7178
- ["stopLossSqrtPrice", (0, import_kit47.getU128Encoder)()],
7179
- ["takeProfitSqrtPrice", (0, import_kit47.getU128Encoder)()],
7178
+ ["lowerLimitOrderSqrtPrice", (0, import_kit47.getU128Encoder)()],
7179
+ ["upperLimitOrderSqrtPrice", (0, import_kit47.getU128Encoder)()],
7180
7180
  ["flags", (0, import_kit47.getU32Encoder)()]
7181
7181
  ]),
7182
7182
  (value) => ({
@@ -7190,8 +7190,8 @@ function getOpenTunaLpPositionFusionInstructionDataDecoder() {
7190
7190
  ["discriminator", (0, import_kit47.fixDecoderSize)((0, import_kit47.getBytesDecoder)(), 8)],
7191
7191
  ["tickLowerIndex", (0, import_kit47.getI32Decoder)()],
7192
7192
  ["tickUpperIndex", (0, import_kit47.getI32Decoder)()],
7193
- ["stopLossSqrtPrice", (0, import_kit47.getU128Decoder)()],
7194
- ["takeProfitSqrtPrice", (0, import_kit47.getU128Decoder)()],
7193
+ ["lowerLimitOrderSqrtPrice", (0, import_kit47.getU128Decoder)()],
7194
+ ["upperLimitOrderSqrtPrice", (0, import_kit47.getU128Decoder)()],
7195
7195
  ["flags", (0, import_kit47.getU32Decoder)()]
7196
7196
  ]);
7197
7197
  }
@@ -7339,8 +7339,8 @@ function getOpenTunaLpPositionOrcaInstructionDataEncoder() {
7339
7339
  ["discriminator", (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8)],
7340
7340
  ["tickLowerIndex", (0, import_kit48.getI32Encoder)()],
7341
7341
  ["tickUpperIndex", (0, import_kit48.getI32Encoder)()],
7342
- ["stopLossSqrtPrice", (0, import_kit48.getU128Encoder)()],
7343
- ["takeProfitSqrtPrice", (0, import_kit48.getU128Encoder)()],
7342
+ ["lowerLimitOrderSqrtPrice", (0, import_kit48.getU128Encoder)()],
7343
+ ["upperLimitOrderSqrtPrice", (0, import_kit48.getU128Encoder)()],
7344
7344
  ["flags", (0, import_kit48.getU32Encoder)()]
7345
7345
  ]),
7346
7346
  (value) => ({
@@ -7354,8 +7354,8 @@ function getOpenTunaLpPositionOrcaInstructionDataDecoder() {
7354
7354
  ["discriminator", (0, import_kit48.fixDecoderSize)((0, import_kit48.getBytesDecoder)(), 8)],
7355
7355
  ["tickLowerIndex", (0, import_kit48.getI32Decoder)()],
7356
7356
  ["tickUpperIndex", (0, import_kit48.getI32Decoder)()],
7357
- ["stopLossSqrtPrice", (0, import_kit48.getU128Decoder)()],
7358
- ["takeProfitSqrtPrice", (0, import_kit48.getU128Decoder)()],
7357
+ ["lowerLimitOrderSqrtPrice", (0, import_kit48.getU128Decoder)()],
7358
+ ["upperLimitOrderSqrtPrice", (0, import_kit48.getU128Decoder)()],
7359
7359
  ["flags", (0, import_kit48.getU32Decoder)()]
7360
7360
  ]);
7361
7361
  }
@@ -7503,8 +7503,8 @@ function getOpenTunaSpotPositionFusionInstructionDataEncoder() {
7503
7503
  ["discriminator", (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8)],
7504
7504
  ["positionToken", getPoolTokenEncoder()],
7505
7505
  ["collateralToken", getPoolTokenEncoder()],
7506
- ["stopLossSqrtPrice", (0, import_kit49.getU128Encoder)()],
7507
- ["takeProfitSqrtPrice", (0, import_kit49.getU128Encoder)()],
7506
+ ["lowerLimitOrderSqrtPrice", (0, import_kit49.getU128Encoder)()],
7507
+ ["upperLimitOrderSqrtPrice", (0, import_kit49.getU128Encoder)()],
7508
7508
  ["flags", (0, import_kit49.getU32Encoder)()]
7509
7509
  ]),
7510
7510
  (value) => ({
@@ -7518,8 +7518,8 @@ function getOpenTunaSpotPositionFusionInstructionDataDecoder() {
7518
7518
  ["discriminator", (0, import_kit49.fixDecoderSize)((0, import_kit49.getBytesDecoder)(), 8)],
7519
7519
  ["positionToken", getPoolTokenDecoder()],
7520
7520
  ["collateralToken", getPoolTokenDecoder()],
7521
- ["stopLossSqrtPrice", (0, import_kit49.getU128Decoder)()],
7522
- ["takeProfitSqrtPrice", (0, import_kit49.getU128Decoder)()],
7521
+ ["lowerLimitOrderSqrtPrice", (0, import_kit49.getU128Decoder)()],
7522
+ ["upperLimitOrderSqrtPrice", (0, import_kit49.getU128Decoder)()],
7523
7523
  ["flags", (0, import_kit49.getU32Decoder)()]
7524
7524
  ]);
7525
7525
  }
@@ -7640,8 +7640,8 @@ function getOpenTunaSpotPositionOrcaInstructionDataEncoder() {
7640
7640
  ["discriminator", (0, import_kit50.fixEncoderSize)((0, import_kit50.getBytesEncoder)(), 8)],
7641
7641
  ["positionToken", getPoolTokenEncoder()],
7642
7642
  ["collateralToken", getPoolTokenEncoder()],
7643
- ["stopLossSqrtPrice", (0, import_kit50.getU128Encoder)()],
7644
- ["takeProfitSqrtPrice", (0, import_kit50.getU128Encoder)()],
7643
+ ["lowerLimitOrderSqrtPrice", (0, import_kit50.getU128Encoder)()],
7644
+ ["upperLimitOrderSqrtPrice", (0, import_kit50.getU128Encoder)()],
7645
7645
  ["flags", (0, import_kit50.getU32Encoder)()]
7646
7646
  ]),
7647
7647
  (value) => ({
@@ -7655,8 +7655,8 @@ function getOpenTunaSpotPositionOrcaInstructionDataDecoder() {
7655
7655
  ["discriminator", (0, import_kit50.fixDecoderSize)((0, import_kit50.getBytesDecoder)(), 8)],
7656
7656
  ["positionToken", getPoolTokenDecoder()],
7657
7657
  ["collateralToken", getPoolTokenDecoder()],
7658
- ["stopLossSqrtPrice", (0, import_kit50.getU128Decoder)()],
7659
- ["takeProfitSqrtPrice", (0, import_kit50.getU128Decoder)()],
7658
+ ["lowerLimitOrderSqrtPrice", (0, import_kit50.getU128Decoder)()],
7659
+ ["upperLimitOrderSqrtPrice", (0, import_kit50.getU128Decoder)()],
7660
7660
  ["flags", (0, import_kit50.getU32Decoder)()]
7661
7661
  ]);
7662
7662
  }
@@ -9071,8 +9071,8 @@ function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
9071
9071
  return (0, import_kit64.transformEncoder)(
9072
9072
  (0, import_kit64.getStructEncoder)([
9073
9073
  ["discriminator", (0, import_kit64.fixEncoderSize)((0, import_kit64.getBytesEncoder)(), 8)],
9074
- ["stopLossSqrtPrice", (0, import_kit64.getU128Encoder)()],
9075
- ["takeProfitSqrtPrice", (0, import_kit64.getU128Encoder)()],
9074
+ ["lowerLimitOrderSqrtPrice", (0, import_kit64.getU128Encoder)()],
9075
+ ["upperLimitOrderSqrtPrice", (0, import_kit64.getU128Encoder)()],
9076
9076
  ["swapToTokenOnLimitOrder", (0, import_kit64.getU8Encoder)()]
9077
9077
  ]),
9078
9078
  (value) => ({
@@ -9084,8 +9084,8 @@ function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
9084
9084
  function getSetTunaLpPositionLimitOrdersInstructionDataDecoder() {
9085
9085
  return (0, import_kit64.getStructDecoder)([
9086
9086
  ["discriminator", (0, import_kit64.fixDecoderSize)((0, import_kit64.getBytesDecoder)(), 8)],
9087
- ["stopLossSqrtPrice", (0, import_kit64.getU128Decoder)()],
9088
- ["takeProfitSqrtPrice", (0, import_kit64.getU128Decoder)()],
9087
+ ["lowerLimitOrderSqrtPrice", (0, import_kit64.getU128Decoder)()],
9088
+ ["upperLimitOrderSqrtPrice", (0, import_kit64.getU128Decoder)()],
9089
9089
  ["swapToTokenOnLimitOrder", (0, import_kit64.getU8Decoder)()]
9090
9090
  ]);
9091
9091
  }
@@ -9227,8 +9227,8 @@ function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
9227
9227
  return (0, import_kit66.transformEncoder)(
9228
9228
  (0, import_kit66.getStructEncoder)([
9229
9229
  ["discriminator", (0, import_kit66.fixEncoderSize)((0, import_kit66.getBytesEncoder)(), 8)],
9230
- ["stopLossSqrtPrice", (0, import_kit66.getU128Encoder)()],
9231
- ["takeProfitSqrtPrice", (0, import_kit66.getU128Encoder)()]
9230
+ ["lowerLimitOrderSqrtPrice", (0, import_kit66.getU128Encoder)()],
9231
+ ["upperLimitOrderSqrtPrice", (0, import_kit66.getU128Encoder)()]
9232
9232
  ]),
9233
9233
  (value) => ({
9234
9234
  ...value,
@@ -9239,8 +9239,8 @@ function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
9239
9239
  function getSetTunaSpotPositionLimitOrdersInstructionDataDecoder() {
9240
9240
  return (0, import_kit66.getStructDecoder)([
9241
9241
  ["discriminator", (0, import_kit66.fixDecoderSize)((0, import_kit66.getBytesDecoder)(), 8)],
9242
- ["stopLossSqrtPrice", (0, import_kit66.getU128Decoder)()],
9243
- ["takeProfitSqrtPrice", (0, import_kit66.getU128Decoder)()]
9242
+ ["lowerLimitOrderSqrtPrice", (0, import_kit66.getU128Decoder)()],
9243
+ ["upperLimitOrderSqrtPrice", (0, import_kit66.getU128Decoder)()]
9244
9244
  ]);
9245
9245
  }
9246
9246
  function getSetTunaSpotPositionLimitOrdersInstructionDataCodec() {
@@ -9999,14 +9999,14 @@ var MAX_LIQUIDATION_FEE = HUNDRED_PERCENT / 5;
9999
9999
  var MAX_LIMIT_ORDER_EXECUTION_FEE = HUNDRED_PERCENT / 100;
10000
10000
  var DEFAULT_MAX_SWAP_SLIPPAGE = HUNDRED_PERCENT / 50;
10001
10001
  var MAX_LIQUIDATION_THRESHOLD = HUNDRED_PERCENT * 95 / 100;
10002
- var NO_STOP_LOSS = -2147483648;
10003
- var NO_TAKE_PROFIT = 2147483647;
10002
+ var NO_LOWER_LIMIT_ORDER = -2147483648;
10003
+ var NO_UPPER_LIMIT_ORDER = 2147483647;
10004
10004
  var COMPUTED_AMOUNT = 18446744073709551615n;
10005
10005
  var UNLIMITED_SUPPLY_LIMIT = 18446744073709551615n;
10006
- var TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A = 1;
10007
- var TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B = 1 << 1;
10008
- var TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A = 1 << 2;
10009
- var TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B = 1 << 3;
10006
+ var TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A = 1;
10007
+ var TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B = 1 << 1;
10008
+ var TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A = 1 << 2;
10009
+ var TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B = 1 << 3;
10010
10010
  var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD = 1 << 4;
10011
10011
  var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE = 1 << 5;
10012
10012
  var TUNA_POSITION_FLAGS_ALLOW_REBALANCING = 1 << 6;
@@ -14991,8 +14991,8 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
14991
14991
  MIN_SQRT_PRICE,
14992
14992
  MarketMaker,
14993
14993
  NATIVE_MINT,
14994
- NO_STOP_LOSS,
14995
- NO_TAKE_PROFIT,
14994
+ NO_LOWER_LIMIT_ORDER,
14995
+ NO_UPPER_LIMIT_ORDER,
14996
14996
  OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR,
14997
14997
  OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR,
14998
14998
  OPEN_AND_INCREASE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
@@ -15086,10 +15086,10 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
15086
15086
  TUNA_POSITION_FLAGS_ALLOW_REBALANCING,
15087
15087
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD,
15088
15088
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE,
15089
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A,
15090
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B,
15091
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A,
15092
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B,
15089
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
15090
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
15091
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
15092
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
15093
15093
  TUNA_PROGRAM_ADDRESS,
15094
15094
  TUNA_SPOT_POSITION_DISCRIMINATOR,
15095
15095
  TunaAccount,
package/dist/index.mjs CHANGED
@@ -557,8 +557,8 @@ function getTunaLpPositionEncoder() {
557
557
  ["flags", getU32Encoder3()],
558
558
  ["marketMaker", getMarketMakerEncoder()],
559
559
  ["entrySqrtPrice", getU128Encoder()],
560
- ["stopLossSqrtPrice", getU128Encoder()],
561
- ["takeProfitSqrtPrice", getU128Encoder()],
560
+ ["lowerLimitOrderSqrtPrice", getU128Encoder()],
561
+ ["upperLimitOrderSqrtPrice", getU128Encoder()],
562
562
  ["rebalanceThresholdTicks", getU32Encoder3()],
563
563
  ["reserved", fixEncoderSize4(getBytesEncoder4(), 9)]
564
564
  ]),
@@ -594,8 +594,8 @@ function getTunaLpPositionDecoder() {
594
594
  ["flags", getU32Decoder3()],
595
595
  ["marketMaker", getMarketMakerDecoder()],
596
596
  ["entrySqrtPrice", getU128Decoder()],
597
- ["stopLossSqrtPrice", getU128Decoder()],
598
- ["takeProfitSqrtPrice", getU128Decoder()],
597
+ ["lowerLimitOrderSqrtPrice", getU128Decoder()],
598
+ ["upperLimitOrderSqrtPrice", getU128Decoder()],
599
599
  ["rebalanceThresholdTicks", getU32Decoder3()],
600
600
  ["reserved", fixDecoderSize4(getBytesDecoder4(), 9)]
601
601
  ]);
@@ -698,8 +698,8 @@ function getTunaSpotPositionEncoder() {
698
698
  ["loanShares", getU64Encoder4()],
699
699
  ["loanFunds", getU64Encoder4()],
700
700
  ["entrySqrtPrice", getU128Encoder2()],
701
- ["stopLossSqrtPrice", getU128Encoder2()],
702
- ["takeProfitSqrtPrice", getU128Encoder2()],
701
+ ["lowerLimitOrderSqrtPrice", getU128Encoder2()],
702
+ ["upperLimitOrderSqrtPrice", getU128Encoder2()],
703
703
  ["reserved", fixEncoderSize5(getBytesEncoder5(), 128)]
704
704
  ]),
705
705
  (value) => ({ ...value, discriminator: TUNA_SPOT_POSITION_DISCRIMINATOR })
@@ -724,8 +724,8 @@ function getTunaSpotPositionDecoder() {
724
724
  ["loanShares", getU64Decoder4()],
725
725
  ["loanFunds", getU64Decoder4()],
726
726
  ["entrySqrtPrice", getU128Decoder2()],
727
- ["stopLossSqrtPrice", getU128Decoder2()],
728
- ["takeProfitSqrtPrice", getU128Decoder2()],
727
+ ["lowerLimitOrderSqrtPrice", getU128Decoder2()],
728
+ ["upperLimitOrderSqrtPrice", getU128Decoder2()],
729
729
  ["reserved", fixDecoderSize5(getBytesDecoder5(), 128)]
730
730
  ]);
731
731
  }
@@ -6019,8 +6019,8 @@ function getOpenAndIncreaseTunaLpPositionFusionInstructionDataEncoder() {
6019
6019
  ["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)],
6020
6020
  ["tickLowerIndex", getI32Encoder2()],
6021
6021
  ["tickUpperIndex", getI32Encoder2()],
6022
- ["stopLossSqrtPrice", getU128Encoder3()],
6023
- ["takeProfitSqrtPrice", getU128Encoder3()],
6022
+ ["lowerLimitOrderSqrtPrice", getU128Encoder3()],
6023
+ ["upperLimitOrderSqrtPrice", getU128Encoder3()],
6024
6024
  ["flags", getU32Encoder20()],
6025
6025
  ["collateralA", getU64Encoder15()],
6026
6026
  ["collateralB", getU64Encoder15()],
@@ -6042,8 +6042,8 @@ function getOpenAndIncreaseTunaLpPositionFusionInstructionDataDecoder() {
6042
6042
  ["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)],
6043
6043
  ["tickLowerIndex", getI32Decoder2()],
6044
6044
  ["tickUpperIndex", getI32Decoder2()],
6045
- ["stopLossSqrtPrice", getU128Decoder3()],
6046
- ["takeProfitSqrtPrice", getU128Decoder3()],
6045
+ ["lowerLimitOrderSqrtPrice", getU128Decoder3()],
6046
+ ["upperLimitOrderSqrtPrice", getU128Decoder3()],
6047
6047
  ["flags", getU32Decoder20()],
6048
6048
  ["collateralA", getU64Decoder15()],
6049
6049
  ["collateralB", getU64Decoder15()],
@@ -6261,8 +6261,8 @@ function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataEncoder() {
6261
6261
  ["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)],
6262
6262
  ["tickLowerIndex", getI32Encoder3()],
6263
6263
  ["tickUpperIndex", getI32Encoder3()],
6264
- ["stopLossSqrtPrice", getU128Encoder4()],
6265
- ["takeProfitSqrtPrice", getU128Encoder4()],
6264
+ ["lowerLimitOrderSqrtPrice", getU128Encoder4()],
6265
+ ["upperLimitOrderSqrtPrice", getU128Encoder4()],
6266
6266
  ["flags", getU32Encoder21()],
6267
6267
  ["collateralA", getU64Encoder16()],
6268
6268
  ["collateralB", getU64Encoder16()],
@@ -6284,8 +6284,8 @@ function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataDecoder() {
6284
6284
  ["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)],
6285
6285
  ["tickLowerIndex", getI32Decoder3()],
6286
6286
  ["tickUpperIndex", getI32Decoder3()],
6287
- ["stopLossSqrtPrice", getU128Decoder4()],
6288
- ["takeProfitSqrtPrice", getU128Decoder4()],
6287
+ ["lowerLimitOrderSqrtPrice", getU128Decoder4()],
6288
+ ["upperLimitOrderSqrtPrice", getU128Decoder4()],
6289
6289
  ["flags", getU32Decoder21()],
6290
6290
  ["collateralA", getU64Decoder16()],
6291
6291
  ["collateralB", getU64Decoder16()],
@@ -6503,8 +6503,8 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstructionDataEncoder() {
6503
6503
  ["collateralToken", getPoolTokenEncoder()],
6504
6504
  ["collateralAmount", getU64Encoder17()],
6505
6505
  ["borrowAmount", getU64Encoder17()],
6506
- ["stopLossSqrtPrice", getU128Encoder5()],
6507
- ["takeProfitSqrtPrice", getU128Encoder5()],
6506
+ ["lowerLimitOrderSqrtPrice", getU128Encoder5()],
6507
+ ["upperLimitOrderSqrtPrice", getU128Encoder5()],
6508
6508
  ["flags", getU32Encoder22()],
6509
6509
  ["maxSwapSlippage", getU32Encoder22()],
6510
6510
  ["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
@@ -6522,8 +6522,8 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstructionDataDecoder() {
6522
6522
  ["collateralToken", getPoolTokenDecoder()],
6523
6523
  ["collateralAmount", getU64Decoder17()],
6524
6524
  ["borrowAmount", getU64Decoder17()],
6525
- ["stopLossSqrtPrice", getU128Decoder5()],
6526
- ["takeProfitSqrtPrice", getU128Decoder5()],
6525
+ ["lowerLimitOrderSqrtPrice", getU128Decoder5()],
6526
+ ["upperLimitOrderSqrtPrice", getU128Decoder5()],
6527
6527
  ["flags", getU32Decoder22()],
6528
6528
  ["maxSwapSlippage", getU32Decoder22()],
6529
6529
  ["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
@@ -6721,8 +6721,8 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstructionDataEncoder() {
6721
6721
  ["collateralToken", getPoolTokenEncoder()],
6722
6722
  ["collateralAmount", getU64Encoder18()],
6723
6723
  ["borrowAmount", getU64Encoder18()],
6724
- ["stopLossSqrtPrice", getU128Encoder6()],
6725
- ["takeProfitSqrtPrice", getU128Encoder6()],
6724
+ ["lowerLimitOrderSqrtPrice", getU128Encoder6()],
6725
+ ["upperLimitOrderSqrtPrice", getU128Encoder6()],
6726
6726
  ["flags", getU32Encoder23()],
6727
6727
  ["maxSwapSlippage", getU32Encoder23()],
6728
6728
  ["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
@@ -6740,8 +6740,8 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstructionDataDecoder() {
6740
6740
  ["collateralToken", getPoolTokenDecoder()],
6741
6741
  ["collateralAmount", getU64Decoder18()],
6742
6742
  ["borrowAmount", getU64Decoder18()],
6743
- ["stopLossSqrtPrice", getU128Decoder6()],
6744
- ["takeProfitSqrtPrice", getU128Decoder6()],
6743
+ ["lowerLimitOrderSqrtPrice", getU128Decoder6()],
6744
+ ["upperLimitOrderSqrtPrice", getU128Decoder6()],
6745
6745
  ["flags", getU32Decoder23()],
6746
6746
  ["maxSwapSlippage", getU32Decoder23()],
6747
6747
  ["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
@@ -7047,8 +7047,8 @@ function getOpenTunaLpPositionFusionInstructionDataEncoder() {
7047
7047
  ["discriminator", fixEncoderSize39(getBytesEncoder39(), 8)],
7048
7048
  ["tickLowerIndex", getI32Encoder4()],
7049
7049
  ["tickUpperIndex", getI32Encoder4()],
7050
- ["stopLossSqrtPrice", getU128Encoder7()],
7051
- ["takeProfitSqrtPrice", getU128Encoder7()],
7050
+ ["lowerLimitOrderSqrtPrice", getU128Encoder7()],
7051
+ ["upperLimitOrderSqrtPrice", getU128Encoder7()],
7052
7052
  ["flags", getU32Encoder24()]
7053
7053
  ]),
7054
7054
  (value) => ({
@@ -7062,8 +7062,8 @@ function getOpenTunaLpPositionFusionInstructionDataDecoder() {
7062
7062
  ["discriminator", fixDecoderSize38(getBytesDecoder38(), 8)],
7063
7063
  ["tickLowerIndex", getI32Decoder4()],
7064
7064
  ["tickUpperIndex", getI32Decoder4()],
7065
- ["stopLossSqrtPrice", getU128Decoder7()],
7066
- ["takeProfitSqrtPrice", getU128Decoder7()],
7065
+ ["lowerLimitOrderSqrtPrice", getU128Decoder7()],
7066
+ ["upperLimitOrderSqrtPrice", getU128Decoder7()],
7067
7067
  ["flags", getU32Decoder24()]
7068
7068
  ]);
7069
7069
  }
@@ -7226,8 +7226,8 @@ function getOpenTunaLpPositionOrcaInstructionDataEncoder() {
7226
7226
  ["discriminator", fixEncoderSize40(getBytesEncoder40(), 8)],
7227
7227
  ["tickLowerIndex", getI32Encoder5()],
7228
7228
  ["tickUpperIndex", getI32Encoder5()],
7229
- ["stopLossSqrtPrice", getU128Encoder8()],
7230
- ["takeProfitSqrtPrice", getU128Encoder8()],
7229
+ ["lowerLimitOrderSqrtPrice", getU128Encoder8()],
7230
+ ["upperLimitOrderSqrtPrice", getU128Encoder8()],
7231
7231
  ["flags", getU32Encoder25()]
7232
7232
  ]),
7233
7233
  (value) => ({
@@ -7241,8 +7241,8 @@ function getOpenTunaLpPositionOrcaInstructionDataDecoder() {
7241
7241
  ["discriminator", fixDecoderSize39(getBytesDecoder39(), 8)],
7242
7242
  ["tickLowerIndex", getI32Decoder5()],
7243
7243
  ["tickUpperIndex", getI32Decoder5()],
7244
- ["stopLossSqrtPrice", getU128Decoder8()],
7245
- ["takeProfitSqrtPrice", getU128Decoder8()],
7244
+ ["lowerLimitOrderSqrtPrice", getU128Decoder8()],
7245
+ ["upperLimitOrderSqrtPrice", getU128Decoder8()],
7246
7246
  ["flags", getU32Decoder25()]
7247
7247
  ]);
7248
7248
  }
@@ -7403,8 +7403,8 @@ function getOpenTunaSpotPositionFusionInstructionDataEncoder() {
7403
7403
  ["discriminator", fixEncoderSize41(getBytesEncoder41(), 8)],
7404
7404
  ["positionToken", getPoolTokenEncoder()],
7405
7405
  ["collateralToken", getPoolTokenEncoder()],
7406
- ["stopLossSqrtPrice", getU128Encoder9()],
7407
- ["takeProfitSqrtPrice", getU128Encoder9()],
7406
+ ["lowerLimitOrderSqrtPrice", getU128Encoder9()],
7407
+ ["upperLimitOrderSqrtPrice", getU128Encoder9()],
7408
7408
  ["flags", getU32Encoder26()]
7409
7409
  ]),
7410
7410
  (value) => ({
@@ -7418,8 +7418,8 @@ function getOpenTunaSpotPositionFusionInstructionDataDecoder() {
7418
7418
  ["discriminator", fixDecoderSize40(getBytesDecoder40(), 8)],
7419
7419
  ["positionToken", getPoolTokenDecoder()],
7420
7420
  ["collateralToken", getPoolTokenDecoder()],
7421
- ["stopLossSqrtPrice", getU128Decoder9()],
7422
- ["takeProfitSqrtPrice", getU128Decoder9()],
7421
+ ["lowerLimitOrderSqrtPrice", getU128Decoder9()],
7422
+ ["upperLimitOrderSqrtPrice", getU128Decoder9()],
7423
7423
  ["flags", getU32Decoder26()]
7424
7424
  ]);
7425
7425
  }
@@ -7553,8 +7553,8 @@ function getOpenTunaSpotPositionOrcaInstructionDataEncoder() {
7553
7553
  ["discriminator", fixEncoderSize42(getBytesEncoder42(), 8)],
7554
7554
  ["positionToken", getPoolTokenEncoder()],
7555
7555
  ["collateralToken", getPoolTokenEncoder()],
7556
- ["stopLossSqrtPrice", getU128Encoder10()],
7557
- ["takeProfitSqrtPrice", getU128Encoder10()],
7556
+ ["lowerLimitOrderSqrtPrice", getU128Encoder10()],
7557
+ ["upperLimitOrderSqrtPrice", getU128Encoder10()],
7558
7558
  ["flags", getU32Encoder27()]
7559
7559
  ]),
7560
7560
  (value) => ({
@@ -7568,8 +7568,8 @@ function getOpenTunaSpotPositionOrcaInstructionDataDecoder() {
7568
7568
  ["discriminator", fixDecoderSize41(getBytesDecoder41(), 8)],
7569
7569
  ["positionToken", getPoolTokenDecoder()],
7570
7570
  ["collateralToken", getPoolTokenDecoder()],
7571
- ["stopLossSqrtPrice", getU128Decoder10()],
7572
- ["takeProfitSqrtPrice", getU128Decoder10()],
7571
+ ["lowerLimitOrderSqrtPrice", getU128Decoder10()],
7572
+ ["upperLimitOrderSqrtPrice", getU128Decoder10()],
7573
7573
  ["flags", getU32Decoder27()]
7574
7574
  ]);
7575
7575
  }
@@ -9136,8 +9136,8 @@ function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
9136
9136
  return transformEncoder55(
9137
9137
  getStructEncoder57([
9138
9138
  ["discriminator", fixEncoderSize56(getBytesEncoder56(), 8)],
9139
- ["stopLossSqrtPrice", getU128Encoder11()],
9140
- ["takeProfitSqrtPrice", getU128Encoder11()],
9139
+ ["lowerLimitOrderSqrtPrice", getU128Encoder11()],
9140
+ ["upperLimitOrderSqrtPrice", getU128Encoder11()],
9141
9141
  ["swapToTokenOnLimitOrder", getU8Encoder5()]
9142
9142
  ]),
9143
9143
  (value) => ({
@@ -9149,8 +9149,8 @@ function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
9149
9149
  function getSetTunaLpPositionLimitOrdersInstructionDataDecoder() {
9150
9150
  return getStructDecoder57([
9151
9151
  ["discriminator", fixDecoderSize55(getBytesDecoder55(), 8)],
9152
- ["stopLossSqrtPrice", getU128Decoder11()],
9153
- ["takeProfitSqrtPrice", getU128Decoder11()],
9152
+ ["lowerLimitOrderSqrtPrice", getU128Decoder11()],
9153
+ ["upperLimitOrderSqrtPrice", getU128Decoder11()],
9154
9154
  ["swapToTokenOnLimitOrder", getU8Decoder5()]
9155
9155
  ]);
9156
9156
  }
@@ -9314,8 +9314,8 @@ function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
9314
9314
  return transformEncoder57(
9315
9315
  getStructEncoder59([
9316
9316
  ["discriminator", fixEncoderSize58(getBytesEncoder58(), 8)],
9317
- ["stopLossSqrtPrice", getU128Encoder12()],
9318
- ["takeProfitSqrtPrice", getU128Encoder12()]
9317
+ ["lowerLimitOrderSqrtPrice", getU128Encoder12()],
9318
+ ["upperLimitOrderSqrtPrice", getU128Encoder12()]
9319
9319
  ]),
9320
9320
  (value) => ({
9321
9321
  ...value,
@@ -9326,8 +9326,8 @@ function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
9326
9326
  function getSetTunaSpotPositionLimitOrdersInstructionDataDecoder() {
9327
9327
  return getStructDecoder59([
9328
9328
  ["discriminator", fixDecoderSize57(getBytesDecoder57(), 8)],
9329
- ["stopLossSqrtPrice", getU128Decoder12()],
9330
- ["takeProfitSqrtPrice", getU128Decoder12()]
9329
+ ["lowerLimitOrderSqrtPrice", getU128Decoder12()],
9330
+ ["upperLimitOrderSqrtPrice", getU128Decoder12()]
9331
9331
  ]);
9332
9332
  }
9333
9333
  function getSetTunaSpotPositionLimitOrdersInstructionDataCodec() {
@@ -10167,14 +10167,14 @@ var MAX_LIQUIDATION_FEE = HUNDRED_PERCENT / 5;
10167
10167
  var MAX_LIMIT_ORDER_EXECUTION_FEE = HUNDRED_PERCENT / 100;
10168
10168
  var DEFAULT_MAX_SWAP_SLIPPAGE = HUNDRED_PERCENT / 50;
10169
10169
  var MAX_LIQUIDATION_THRESHOLD = HUNDRED_PERCENT * 95 / 100;
10170
- var NO_STOP_LOSS = -2147483648;
10171
- var NO_TAKE_PROFIT = 2147483647;
10170
+ var NO_LOWER_LIMIT_ORDER = -2147483648;
10171
+ var NO_UPPER_LIMIT_ORDER = 2147483647;
10172
10172
  var COMPUTED_AMOUNT = 18446744073709551615n;
10173
10173
  var UNLIMITED_SUPPLY_LIMIT = 18446744073709551615n;
10174
- var TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A = 1;
10175
- var TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B = 1 << 1;
10176
- var TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A = 1 << 2;
10177
- var TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B = 1 << 3;
10174
+ var TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A = 1;
10175
+ var TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B = 1 << 1;
10176
+ var TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A = 1 << 2;
10177
+ var TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B = 1 << 3;
10178
10178
  var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD = 1 << 4;
10179
10179
  var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE = 1 << 5;
10180
10180
  var TUNA_POSITION_FLAGS_ALLOW_REBALANCING = 1 << 6;
@@ -15388,8 +15388,8 @@ export {
15388
15388
  MIN_SQRT_PRICE,
15389
15389
  MarketMaker,
15390
15390
  NATIVE_MINT,
15391
- NO_STOP_LOSS,
15392
- NO_TAKE_PROFIT,
15391
+ NO_LOWER_LIMIT_ORDER,
15392
+ NO_UPPER_LIMIT_ORDER,
15393
15393
  OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR,
15394
15394
  OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR,
15395
15395
  OPEN_AND_INCREASE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
@@ -15483,10 +15483,10 @@ export {
15483
15483
  TUNA_POSITION_FLAGS_ALLOW_REBALANCING,
15484
15484
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD,
15485
15485
  TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE,
15486
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A,
15487
- TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B,
15488
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A,
15489
- TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B,
15486
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
15487
+ TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
15488
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A,
15489
+ TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B,
15490
15490
  TUNA_PROGRAM_ADDRESS,
15491
15491
  TUNA_SPOT_POSITION_DISCRIMINATOR,
15492
15492
  TunaAccount,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-client",
3
3
  "description": "Typescript client to interact with DefiTuna's on-chain program.",
4
- "version": "3.0.0",
4
+ "version": "3.0.2",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "main": "./dist/index.js",