@crypticdot/defituna-client 2.0.6 → 2.0.7

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.mts CHANGED
@@ -70,10 +70,12 @@ declare enum AccountsType {
70
70
  SwapTickArrays = 0,
71
71
  TickArrayLower = 1,
72
72
  TickArrayUpper = 2,
73
- PoolVaultTokenA = 3,
74
- PoolVaultTokenB = 4,
75
- WhirlpoolOracle = 5,
76
- Rewards = 6
73
+ SecondaryTickArrayLower = 3,
74
+ SecondaryTickArrayUpper = 4,
75
+ PoolVaultTokenA = 5,
76
+ PoolVaultTokenB = 6,
77
+ WhirlpoolOracle = 7,
78
+ Rewards = 8
77
79
  }
78
80
  type AccountsTypeArgs = AccountsType;
79
81
  declare function getAccountsTypeEncoder(): Encoder<AccountsTypeArgs>;
@@ -408,6 +410,11 @@ type TunaPosition = {
408
410
  flags: number;
409
411
  /** Market maker (Orca, Fusion) */
410
412
  marketMaker: MarketMaker;
413
+ /**
414
+ * The position might be re-balanced if the current tick is lower than tick_lower_index or
415
+ * higher than tick_higher_index by a threshold value.
416
+ */
417
+ rebalanceThresholdTicks: number;
411
418
  /** Reserved */
412
419
  reserved: ReadonlyUint8Array;
413
420
  };
@@ -471,6 +478,11 @@ type TunaPositionArgs = {
471
478
  flags: number;
472
479
  /** Market maker (Orca, Fusion) */
473
480
  marketMaker: MarketMakerArgs;
481
+ /**
482
+ * The position might be re-balanced if the current tick is lower than tick_lower_index or
483
+ * higher than tick_higher_index by a threshold value.
484
+ */
485
+ rebalanceThresholdTicks: number;
474
486
  /** Reserved */
475
487
  reserved: ReadonlyUint8Array;
476
488
  };
@@ -575,68 +587,68 @@ declare function getVaultSize(): number;
575
587
  * @see https://github.com/codama-idl/codama
576
588
  */
577
589
 
578
- /** AmountSlippageExceeded: AmountSlippageExceeded */
590
+ /** AmountSlippageExceeded: Amount slippage exceeded */
579
591
  declare const TUNA_ERROR__AMOUNT_SLIPPAGE_EXCEEDED = 6000;
580
- /** BadDebt: BadDebt */
592
+ /** BadDebt: Bad debt is not allowed for the executed instruction */
581
593
  declare const TUNA_ERROR__BAD_DEBT = 6001;
582
- /** InvalidRemainingAccountsLength: InvalidRemainingAccountsLength */
594
+ /** InvalidRemainingAccountsLength: Invalid number of remaining accounts */
583
595
  declare const TUNA_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH = 6002;
584
- /** InvalidTickArrayAccounts: InvalidAccounts */
585
- declare const TUNA_ERROR__INVALID_TICK_ARRAY_ACCOUNTS = 6003;
586
- /** InvalidAccountOwner: InvalidAccountOwner */
587
- declare const TUNA_ERROR__INVALID_ACCOUNT_OWNER = 6004;
588
- /** InvalidInstructionArguments: InvalidInstructionArguments */
589
- declare const TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS = 6005;
590
- /** InvalidMarketMaker: InvalidMarketMaker */
591
- declare const TUNA_ERROR__INVALID_MARKET_MAKER = 6006;
596
+ /** InvalidAccountOwner: Invalid account owner */
597
+ declare const TUNA_ERROR__INVALID_ACCOUNT_OWNER = 6003;
598
+ /** InvalidInstructionArguments: Invalid instruction arguments */
599
+ declare const TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS = 6004;
600
+ /** InvalidMarketMaker: Invalid market maker */
601
+ declare const TUNA_ERROR__INVALID_MARKET_MAKER = 6005;
592
602
  /** InvalidSqrtPriceLimitDirection: Provided SqrtPriceLimit not in the same direction as the swap. */
593
- declare const TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION = 6007;
594
- /** InvalidTickArraySequence: InvalidTickArraySequence */
595
- declare const TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE = 6008;
596
- /** InsufficientLiquidity: InsufficientLiquidity */
597
- declare const TUNA_ERROR__INSUFFICIENT_LIQUIDITY = 6009;
598
- /** InterestRateIsOutOfRange: InterestRateIsOutOfRange */
599
- declare const TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE = 6010;
600
- /** LeverageIsOutOfRange: LeverageIsOutOfRange */
601
- declare const TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE = 6011;
602
- /** LeftoversExceeded: LeftoversExceeded */
603
- declare const TUNA_ERROR__LEFTOVERS_EXCEEDED = 6012;
604
- /** LimitOrderExecutionFeeIsOutOfRange: LimitOrderExecutionFeeIsOutOfRange */
605
- declare const TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE = 6013;
606
- /** LiquidationFeeIsOutOfRange: LiquidationFeeIsOutOfRange */
607
- declare const TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE = 6014;
608
- /** LiquidationThresholdIsOutOfRange: LiquidationThresholdIsOutOfRange */
609
- declare const TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE = 6015;
603
+ declare const TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION = 6006;
604
+ /** InvalidTickArraySequence: Invalid tick array sequence provided for instruction */
605
+ declare const TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE = 6007;
606
+ /** InsufficientLiquidity: Insufficient liquidity */
607
+ declare const TUNA_ERROR__INSUFFICIENT_LIQUIDITY = 6008;
608
+ /** InterestRateIsOutOfRange: Interest rate is out of range */
609
+ declare const TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE = 6009;
610
+ /** LeverageIsOutOfRange: Leverage is out or range */
611
+ declare const TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE = 6010;
612
+ /** LeftoversExceeded: Leftovers percentage exceeded the maximum allowed value */
613
+ declare const TUNA_ERROR__LEFTOVERS_EXCEEDED = 6011;
614
+ /** LimitOrderExecutionFeeIsOutOfRange: Limit order execution fee is out of range */
615
+ declare const TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE = 6012;
616
+ /** LiquidationFeeIsOutOfRange: Liquidation fee is out of range */
617
+ declare const TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE = 6013;
618
+ /** LiquidationThresholdIsOutOfRange: Liquidation threshold is out of range */
619
+ declare const TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE = 6014;
610
620
  /** LiquidityZero: Liquidity amount must be greater than zero. */
611
- declare const TUNA_ERROR__LIQUIDITY_ZERO = 6016;
612
- /** MarketDisabled: MarketDisabled */
613
- declare const TUNA_ERROR__MARKET_DISABLED = 6017;
614
- /** MarketDebtLimitExceeded: MarketDebtLimitExceeded */
615
- declare const TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED = 6018;
616
- /** MathOverflow: MathOverflow */
617
- declare const TUNA_ERROR__MATH_OVERFLOW = 6019;
618
- /** MathUnderflow: MathUnderflow */
619
- declare const TUNA_ERROR__MATH_UNDERFLOW = 6020;
621
+ declare const TUNA_ERROR__LIQUIDITY_ZERO = 6015;
622
+ /** MarketDisabled: Market is disabled */
623
+ declare const TUNA_ERROR__MARKET_DISABLED = 6016;
624
+ /** MarketDebtLimitExceeded: Exceed the maximum allowed debt for the market */
625
+ declare const TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED = 6017;
626
+ /** MathOverflow: Math overflow */
627
+ declare const TUNA_ERROR__MATH_OVERFLOW = 6018;
628
+ /** MathUnderflow: Math underflow */
629
+ declare const TUNA_ERROR__MATH_UNDERFLOW = 6019;
620
630
  /** NoExtraAccountsForTransferHook: Unable to call transfer hook without extra accounts */
621
- declare const TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK = 6021;
622
- /** OracleStalePrice: OracleStalePrice */
623
- declare const TUNA_ERROR__ORACLE_STALE_PRICE = 6022;
631
+ declare const TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK = 6020;
632
+ /** OracleStalePrice: Oracle price is stale */
633
+ declare const TUNA_ERROR__ORACLE_STALE_PRICE = 6021;
624
634
  /** OraclePriceDeviationThresholdExceeded: OraclePriceDeviationThresholdExceeded */
625
- declare const TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED = 6023;
635
+ declare const TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED = 6022;
626
636
  /** OraclePriceDeviationThresholdOutOfRange: OraclePriceDeviationThresholdOutOfRange */
627
- declare const TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE = 6024;
637
+ declare const TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE = 6023;
628
638
  /** PartialFillError: Trade resulted in partial fill */
629
- declare const TUNA_ERROR__PARTIAL_FILL_ERROR = 6025;
630
- /** PositionIsHealthy: PositionIsHealthy */
631
- declare const TUNA_ERROR__POSITION_IS_HEALTHY = 6026;
632
- /** PositionIsLiquidated: PositionIsLiquidated */
633
- declare const TUNA_ERROR__POSITION_IS_LIQUIDATED = 6027;
634
- /** PositionIsUnhealthy: PositionIsUnhealthy */
635
- declare const TUNA_ERROR__POSITION_IS_UNHEALTHY = 6028;
636
- /** PositionNotEmpty: PositionNotEmpty */
637
- declare const TUNA_ERROR__POSITION_NOT_EMPTY = 6029;
638
- /** ProtocolFeeIsOutOfRange: ProtocolFeeIsOutOfRange */
639
- declare const TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE = 6030;
639
+ declare const TUNA_ERROR__PARTIAL_FILL_ERROR = 6024;
640
+ /** PositionIsHealthy: Position is healthy */
641
+ declare const TUNA_ERROR__POSITION_IS_HEALTHY = 6025;
642
+ /** PositionIsLiquidated: Position is already liquidated */
643
+ declare const TUNA_ERROR__POSITION_IS_LIQUIDATED = 6026;
644
+ /** PositionIsUnhealthy: Position is unhealthy */
645
+ declare const TUNA_ERROR__POSITION_IS_UNHEALTHY = 6027;
646
+ /** PositionNotEmpty: Position is not empty */
647
+ declare const TUNA_ERROR__POSITION_NOT_EMPTY = 6028;
648
+ /** ProtocolFeeIsOutOfRange: Protocol fee is out of range */
649
+ declare const TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE = 6029;
650
+ /** RebalanceConditionsNotMet: Rebalance conditions are not met */
651
+ declare const TUNA_ERROR__REBALANCE_CONDITIONS_NOT_MET = 6030;
640
652
  /** RemainingAccountsDuplicatedAccountsType: Same accounts type is provided more than once */
641
653
  declare const TUNA_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE = 6031;
642
654
  /** RemainingAccountsInvalidSlice: Invalid remaining accounts */
@@ -647,57 +659,61 @@ declare const TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE_LENGTH = 6033;
647
659
  declare const TUNA_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT = 6034;
648
660
  /** RequiredRemainingAccountNotProvided: Required remaining account is not provided */
649
661
  declare const TUNA_ERROR__REQUIRED_REMAINING_ACCOUNT_NOT_PROVIDED = 6035;
650
- /** SolverFailedToFindRoot: SolverFailedToFindRoot */
662
+ /** SolverFailedToFindRoot: Swap equation solver failed to t find the root */
651
663
  declare const TUNA_ERROR__SOLVER_FAILED_TO_FIND_ROOT = 6036;
652
- /** SqrtPriceOutOfBounds: SqrtPriceOutOfBounds */
664
+ /** SqrtPriceOutOfBounds: Provided sqrt price out of bounds */
653
665
  declare const TUNA_ERROR__SQRT_PRICE_OUT_OF_BOUNDS = 6037;
654
- /** SupplyLimitExceeded: SupplyLimitExceeded */
666
+ /** SupplyLimitExceeded: Lending vault supply limit exceeded */
655
667
  declare const TUNA_ERROR__SUPPLY_LIMIT_EXCEEDED = 6038;
656
- /** Suspended: Suspended */
668
+ /** Suspended: Instruction is suspended */
657
669
  declare const TUNA_ERROR__SUSPENDED = 6039;
658
- /** SwapSlippageExceeded: SwapSlippageExceeded */
670
+ /** SwapSlippageExceeded: Maximum allowed swap slippage is exceeded */
659
671
  declare const TUNA_ERROR__SWAP_SLIPPAGE_EXCEEDED = 6040;
660
- /** SwapSlippageIsOutOfRange: SwapSlippageIsOutOfRange */
672
+ /** SwapSlippageIsOutOfRange: Provided swap slippage value is out of range */
661
673
  declare const TUNA_ERROR__SWAP_SLIPPAGE_IS_OUT_OF_RANGE = 6041;
662
- /** TickIndexOfBounds: TickIndexOfBounds */
663
- declare const TUNA_ERROR__TICK_INDEX_OF_BOUNDS = 6042;
674
+ /** SwapToPositionRatioEstimationFailed: Swap to position ratio estimation failed */
675
+ declare const TUNA_ERROR__SWAP_TO_POSITION_RATIO_ESTIMATION_FAILED = 6042;
676
+ /** SwapQuoteNotEqualToActualSwapAmount: Swap quote amount is not equal to the actual swap amount */
677
+ declare const TUNA_ERROR__SWAP_QUOTE_NOT_EQUAL_TO_ACTUAL_SWAP_AMOUNT = 6043;
678
+ /** TickIndexOfBounds: Tick index is out of bounds */
679
+ declare const TUNA_ERROR__TICK_INDEX_OF_BOUNDS = 6044;
664
680
  /** TransferFeeCalculationError: Transfer fee calculation failed */
665
- declare const TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR = 6043;
666
- /** TypeCastOverflow: TypeCastOverflow */
667
- declare const TUNA_ERROR__TYPE_CAST_OVERFLOW = 6044;
668
- /** UnexpectedValue: UnexpectedValue */
669
- declare const TUNA_ERROR__UNEXPECTED_VALUE = 6045;
681
+ declare const TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR = 6045;
682
+ /** TypeCastOverflow: Type cast overflow */
683
+ declare const TUNA_ERROR__TYPE_CAST_OVERFLOW = 6046;
684
+ /** UnableToLoadAccountData: Unable to load the account data */
685
+ declare const TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA = 6047;
686
+ /** UnableToDeserializeAccountData: Unable to deserialize the account data */
687
+ declare const TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA = 6048;
688
+ /** UnexpectedValue: Unexpected value */
689
+ declare const TUNA_ERROR__UNEXPECTED_VALUE = 6049;
670
690
  /** UnsupportedTokenMint: Token mint has unsupported attributes */
671
- declare const TUNA_ERROR__UNSUPPORTED_TOKEN_MINT = 6046;
672
- /** VaultNotInitialized: VaultNotInitialized */
673
- declare const TUNA_ERROR__VAULT_NOT_INITIALIZED = 6047;
674
- /** WithdrawRequestExceedsUserBalance: WithdrawRequestExceedsUserBalance */
675
- declare const TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE = 6048;
676
- /** ZeroPriceRange: ZeroPriceRange */
677
- declare const TUNA_ERROR__ZERO_PRICE_RANGE = 6049;
691
+ declare const TUNA_ERROR__UNSUPPORTED_TOKEN_MINT = 6050;
692
+ /** VaultNotInitialized: Lending vault is not initialized */
693
+ declare const TUNA_ERROR__VAULT_NOT_INITIALIZED = 6051;
694
+ /** WithdrawRequestExceedsUserBalance: Withdraw request the exceeds user balance */
695
+ declare const TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE = 6052;
696
+ /** ZeroPriceRange: Zero price range: the lower price is equal to upper price) */
697
+ declare const TUNA_ERROR__ZERO_PRICE_RANGE = 6053;
678
698
  /** ZeroTradableAmount: There are no tradable amount to swap. */
679
- declare const TUNA_ERROR__ZERO_TRADABLE_AMOUNT = 6050;
680
- /** ZeroYield: ZeroYield */
681
- declare const TUNA_ERROR__ZERO_YIELD = 6051;
699
+ declare const TUNA_ERROR__ZERO_TRADABLE_AMOUNT = 6054;
700
+ /** ZeroYield: Collected yield is zero */
701
+ declare const TUNA_ERROR__ZERO_YIELD = 6055;
682
702
  /** RaydiumInvalidFirstTickArrayAccount: RaydiumInvalidFirstTickArrayAccount */
683
- declare const TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT = 6052;
703
+ declare const TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT = 6056;
684
704
  /** RaydiumInvalidTickArray: RaydiumInvalidTickArray */
685
- declare const TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY = 6053;
705
+ declare const TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY = 6057;
686
706
  /** RaydiumInvaildTickIndex: RaydiumInvaildTickIndex */
687
- declare const TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX = 6054;
707
+ declare const TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX = 6058;
688
708
  /** RaydiumMaxTokenOverflow: RaydiumMaxTokenOverflow */
689
- declare const TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW = 6055;
709
+ declare const TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW = 6059;
690
710
  /** RaydiumNotEnoughTickArrayAccount: RaydiumNotEnoughTickArrayAccount */
691
- declare const TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT = 6056;
711
+ declare const TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT = 6060;
692
712
  /** RaydiumSqrtPriceLimitOverflow: RaydiumSqrtPriceLimitOverflow */
693
- declare const TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW = 6057;
713
+ declare const TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW = 6061;
694
714
  /** RaydiumZeroAmountSpecified: RaydiumZeroAmountSpecified */
695
- declare const TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED = 6058;
696
- /** UnableToLoadAccountData: UnableToLoadAccountData */
697
- declare const TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA = 6059;
698
- /** UnableToDeserializeAccountData: UnableToDeserializeAccountData */
699
- declare const TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA = 6060;
700
- type TunaError = typeof TUNA_ERROR__AMOUNT_SLIPPAGE_EXCEEDED | typeof TUNA_ERROR__BAD_DEBT | typeof TUNA_ERROR__INSUFFICIENT_LIQUIDITY | typeof TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__INVALID_ACCOUNT_OWNER | typeof TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS | typeof TUNA_ERROR__INVALID_MARKET_MAKER | typeof TUNA_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH | typeof TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION | typeof TUNA_ERROR__INVALID_TICK_ARRAY_ACCOUNTS | typeof TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE | typeof TUNA_ERROR__LEFTOVERS_EXCEEDED | typeof TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDITY_ZERO | typeof TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED | typeof TUNA_ERROR__MARKET_DISABLED | typeof TUNA_ERROR__MATH_OVERFLOW | typeof TUNA_ERROR__MATH_UNDERFLOW | typeof TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK | typeof TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED | typeof TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE | typeof TUNA_ERROR__ORACLE_STALE_PRICE | typeof TUNA_ERROR__PARTIAL_FILL_ERROR | typeof TUNA_ERROR__POSITION_IS_HEALTHY | typeof TUNA_ERROR__POSITION_IS_LIQUIDATED | typeof TUNA_ERROR__POSITION_IS_UNHEALTHY | typeof TUNA_ERROR__POSITION_NOT_EMPTY | typeof TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX | typeof TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT | typeof TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY | typeof TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW | typeof TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT | typeof TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW | typeof TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED | typeof TUNA_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE_LENGTH | typeof TUNA_ERROR__REQUIRED_REMAINING_ACCOUNT_NOT_PROVIDED | typeof TUNA_ERROR__SOLVER_FAILED_TO_FIND_ROOT | typeof TUNA_ERROR__SQRT_PRICE_OUT_OF_BOUNDS | typeof TUNA_ERROR__SUPPLY_LIMIT_EXCEEDED | typeof TUNA_ERROR__SUSPENDED | typeof TUNA_ERROR__SWAP_SLIPPAGE_EXCEEDED | typeof TUNA_ERROR__SWAP_SLIPPAGE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__TICK_INDEX_OF_BOUNDS | typeof TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR | typeof TUNA_ERROR__TYPE_CAST_OVERFLOW | typeof TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA | typeof TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA | typeof TUNA_ERROR__UNEXPECTED_VALUE | typeof TUNA_ERROR__UNSUPPORTED_TOKEN_MINT | typeof TUNA_ERROR__VAULT_NOT_INITIALIZED | typeof TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE | typeof TUNA_ERROR__ZERO_PRICE_RANGE | typeof TUNA_ERROR__ZERO_TRADABLE_AMOUNT | typeof TUNA_ERROR__ZERO_YIELD;
715
+ declare const TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED = 6062;
716
+ type TunaError = typeof TUNA_ERROR__AMOUNT_SLIPPAGE_EXCEEDED | typeof TUNA_ERROR__BAD_DEBT | typeof TUNA_ERROR__INSUFFICIENT_LIQUIDITY | typeof TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__INVALID_ACCOUNT_OWNER | typeof TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS | typeof TUNA_ERROR__INVALID_MARKET_MAKER | typeof TUNA_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH | typeof TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION | typeof TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE | typeof TUNA_ERROR__LEFTOVERS_EXCEEDED | typeof TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE | typeof TUNA_ERROR__LIQUIDITY_ZERO | typeof TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED | typeof TUNA_ERROR__MARKET_DISABLED | typeof TUNA_ERROR__MATH_OVERFLOW | typeof TUNA_ERROR__MATH_UNDERFLOW | typeof TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK | typeof TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED | typeof TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE | typeof TUNA_ERROR__ORACLE_STALE_PRICE | typeof TUNA_ERROR__PARTIAL_FILL_ERROR | typeof TUNA_ERROR__POSITION_IS_HEALTHY | typeof TUNA_ERROR__POSITION_IS_LIQUIDATED | typeof TUNA_ERROR__POSITION_IS_UNHEALTHY | typeof TUNA_ERROR__POSITION_NOT_EMPTY | typeof TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX | typeof TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT | typeof TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY | typeof TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW | typeof TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT | typeof TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW | typeof TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED | typeof TUNA_ERROR__REBALANCE_CONDITIONS_NOT_MET | typeof TUNA_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE | typeof TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE_LENGTH | typeof TUNA_ERROR__REQUIRED_REMAINING_ACCOUNT_NOT_PROVIDED | typeof TUNA_ERROR__SOLVER_FAILED_TO_FIND_ROOT | typeof TUNA_ERROR__SQRT_PRICE_OUT_OF_BOUNDS | typeof TUNA_ERROR__SUPPLY_LIMIT_EXCEEDED | typeof TUNA_ERROR__SUSPENDED | typeof TUNA_ERROR__SWAP_QUOTE_NOT_EQUAL_TO_ACTUAL_SWAP_AMOUNT | typeof TUNA_ERROR__SWAP_SLIPPAGE_EXCEEDED | typeof TUNA_ERROR__SWAP_SLIPPAGE_IS_OUT_OF_RANGE | typeof TUNA_ERROR__SWAP_TO_POSITION_RATIO_ESTIMATION_FAILED | typeof TUNA_ERROR__TICK_INDEX_OF_BOUNDS | typeof TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR | typeof TUNA_ERROR__TYPE_CAST_OVERFLOW | typeof TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA | typeof TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA | typeof TUNA_ERROR__UNEXPECTED_VALUE | typeof TUNA_ERROR__UNSUPPORTED_TOKEN_MINT | typeof TUNA_ERROR__VAULT_NOT_INITIALIZED | typeof TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE | typeof TUNA_ERROR__ZERO_PRICE_RANGE | typeof TUNA_ERROR__ZERO_TRADABLE_AMOUNT | typeof TUNA_ERROR__ZERO_YIELD;
701
717
  declare function getTunaErrorMessage(code: TunaError): string;
702
718
  declare function isTunaError<TProgramErrorCode extends TunaError>(error: unknown, transactionMessage: {
703
719
  instructions: Record<number, {
@@ -749,23 +765,26 @@ declare enum TunaInstruction {
749
765
  OpenPositionOrca = 17,
750
766
  OpenPositionWithLiquidityFusion = 18,
751
767
  OpenPositionWithLiquidityOrca = 19,
752
- RemoveLiquidityFusion = 20,
753
- RemoveLiquidityOrca = 21,
754
- RepayBadDebt = 22,
755
- RepayDebt = 23,
756
- SetAdminAuthority = 24,
757
- SetDefaultMaxPercentageOfLeftovers = 25,
758
- SetDefaultMaxSwapSlippage = 26,
759
- SetDefaultOraclePriceDeviationThreshold = 27,
760
- SetFeeRecipient = 28,
761
- SetLimitOrders = 29,
762
- SetLiquidatorAuthority = 30,
763
- SetOwnerAuthority = 31,
764
- SetSuspendedState = 32,
765
- SetTunaPositionFlags = 33,
766
- UpdateMarket = 34,
767
- UpdateVault = 35,
768
- Withdraw = 36
768
+ RebalancePositionFusion = 20,
769
+ RebalancePositionOrca = 21,
770
+ RemoveLiquidityFusion = 22,
771
+ RemoveLiquidityOrca = 23,
772
+ RepayBadDebt = 24,
773
+ RepayDebt = 25,
774
+ SetAdminAuthority = 26,
775
+ SetDefaultMaxPercentageOfLeftovers = 27,
776
+ SetDefaultMaxSwapSlippage = 28,
777
+ SetDefaultOraclePriceDeviationThreshold = 29,
778
+ SetFeeRecipient = 30,
779
+ SetLimitOrders = 31,
780
+ SetLiquidatorAuthority = 32,
781
+ SetOwnerAuthority = 33,
782
+ SetSuspendedState = 34,
783
+ SetTunaPositionFlags = 35,
784
+ SetTunaPositionRebalanceThreshold = 36,
785
+ UpdateMarket = 37,
786
+ UpdateVault = 38,
787
+ Withdraw = 39
769
788
  }
770
789
  declare function identifyTunaInstruction(instruction: {
771
790
  data: ReadonlyUint8Array;
@@ -811,6 +830,10 @@ type ParsedTunaInstruction<TProgram extends string = 'tuna4uSQZncNeeiAMKbstuxA9C
811
830
  } & ParsedOpenPositionWithLiquidityFusionInstruction<TProgram>) | ({
812
831
  instructionType: TunaInstruction.OpenPositionWithLiquidityOrca;
813
832
  } & ParsedOpenPositionWithLiquidityOrcaInstruction<TProgram>) | ({
833
+ instructionType: TunaInstruction.RebalancePositionFusion;
834
+ } & ParsedRebalancePositionFusionInstruction<TProgram>) | ({
835
+ instructionType: TunaInstruction.RebalancePositionOrca;
836
+ } & ParsedRebalancePositionOrcaInstruction<TProgram>) | ({
814
837
  instructionType: TunaInstruction.RemoveLiquidityFusion;
815
838
  } & ParsedRemoveLiquidityFusionInstruction<TProgram>) | ({
816
839
  instructionType: TunaInstruction.RemoveLiquidityOrca;
@@ -839,6 +862,8 @@ type ParsedTunaInstruction<TProgram extends string = 'tuna4uSQZncNeeiAMKbstuxA9C
839
862
  } & ParsedSetSuspendedStateInstruction<TProgram>) | ({
840
863
  instructionType: TunaInstruction.SetTunaPositionFlags;
841
864
  } & ParsedSetTunaPositionFlagsInstruction<TProgram>) | ({
865
+ instructionType: TunaInstruction.SetTunaPositionRebalanceThreshold;
866
+ } & ParsedSetTunaPositionRebalanceThresholdInstruction<TProgram>) | ({
842
867
  instructionType: TunaInstruction.UpdateMarket;
843
868
  } & ParsedUpdateMarketInstruction<TProgram>) | ({
844
869
  instructionType: TunaInstruction.UpdateVault;
@@ -3161,6 +3186,249 @@ type ParsedOpenPositionWithLiquidityOrcaInstruction<TProgram extends string = ty
3161
3186
  };
3162
3187
  declare function parseOpenPositionWithLiquidityOrcaInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedOpenPositionWithLiquidityOrcaInstruction<TProgram, TAccountMetas>;
3163
3188
 
3189
+ /**
3190
+ * This code was AUTOGENERATED using the codama library.
3191
+ * Please DO NOT EDIT THIS FILE, instead use visitors
3192
+ * to add features, then rerun codama to update it.
3193
+ *
3194
+ * @see https://github.com/codama-idl/codama
3195
+ */
3196
+
3197
+ declare const REBALANCE_POSITION_FUSION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
3198
+ declare function getRebalancePositionFusionDiscriminatorBytes(): ReadonlyUint8Array;
3199
+ type RebalancePositionFusionInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountAuthority extends string | IAccountMeta<string> = string, TAccountTunaConfig extends string | IAccountMeta<string> = string, TAccountMarket extends string | IAccountMeta<string> = string, TAccountMintA extends string | IAccountMeta<string> = string, TAccountMintB extends string | IAccountMeta<string> = string, TAccountTokenProgramA extends string | IAccountMeta<string> = string, TAccountTokenProgramB extends string | IAccountMeta<string> = string, TAccountVaultA extends string | IAccountMeta<string> = string, TAccountVaultB extends string | IAccountMeta<string> = string, TAccountTunaPosition extends string | IAccountMeta<string> = string, TAccountTunaPositionAta extends string | IAccountMeta<string> = string, TAccountTunaPositionAtaA extends string | IAccountMeta<string> = string, TAccountTunaPositionAtaB extends string | IAccountMeta<string> = string, TAccountFeeRecipientAtaA extends string | IAccountMeta<string> = string, TAccountFeeRecipientAtaB extends string | IAccountMeta<string> = string, TAccountPythOraclePriceFeedA extends string | IAccountMeta<string> = string, TAccountPythOraclePriceFeedB extends string | IAccountMeta<string> = string, TAccountFusionammProgram extends string | IAccountMeta<string> = string, TAccountFusionPool extends string | IAccountMeta<string> = string, TAccountFusionPosition extends string | IAccountMeta<string> = string, TAccountMemoProgram extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
3200
+ TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority,
3201
+ TAccountTunaConfig extends string ? ReadonlyAccount<TAccountTunaConfig> : TAccountTunaConfig,
3202
+ TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
3203
+ TAccountMintA extends string ? ReadonlyAccount<TAccountMintA> : TAccountMintA,
3204
+ TAccountMintB extends string ? ReadonlyAccount<TAccountMintB> : TAccountMintB,
3205
+ TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
3206
+ TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
3207
+ TAccountVaultA extends string ? WritableAccount<TAccountVaultA> : TAccountVaultA,
3208
+ TAccountVaultB extends string ? WritableAccount<TAccountVaultB> : TAccountVaultB,
3209
+ TAccountTunaPosition extends string ? WritableAccount<TAccountTunaPosition> : TAccountTunaPosition,
3210
+ TAccountTunaPositionAta extends string ? WritableAccount<TAccountTunaPositionAta> : TAccountTunaPositionAta,
3211
+ TAccountTunaPositionAtaA extends string ? WritableAccount<TAccountTunaPositionAtaA> : TAccountTunaPositionAtaA,
3212
+ TAccountTunaPositionAtaB extends string ? WritableAccount<TAccountTunaPositionAtaB> : TAccountTunaPositionAtaB,
3213
+ TAccountFeeRecipientAtaA extends string ? WritableAccount<TAccountFeeRecipientAtaA> : TAccountFeeRecipientAtaA,
3214
+ TAccountFeeRecipientAtaB extends string ? WritableAccount<TAccountFeeRecipientAtaB> : TAccountFeeRecipientAtaB,
3215
+ TAccountPythOraclePriceFeedA extends string ? ReadonlyAccount<TAccountPythOraclePriceFeedA> : TAccountPythOraclePriceFeedA,
3216
+ TAccountPythOraclePriceFeedB extends string ? ReadonlyAccount<TAccountPythOraclePriceFeedB> : TAccountPythOraclePriceFeedB,
3217
+ TAccountFusionammProgram extends string ? ReadonlyAccount<TAccountFusionammProgram> : TAccountFusionammProgram,
3218
+ TAccountFusionPool extends string ? WritableAccount<TAccountFusionPool> : TAccountFusionPool,
3219
+ TAccountFusionPosition extends string ? WritableAccount<TAccountFusionPosition> : TAccountFusionPosition,
3220
+ TAccountMemoProgram extends string ? ReadonlyAccount<TAccountMemoProgram> : TAccountMemoProgram,
3221
+ ...TRemainingAccounts
3222
+ ]>;
3223
+ type RebalancePositionFusionInstructionData = {
3224
+ discriminator: ReadonlyUint8Array;
3225
+ remainingAccountsInfo: RemainingAccountsInfo;
3226
+ };
3227
+ type RebalancePositionFusionInstructionDataArgs = {
3228
+ remainingAccountsInfo: RemainingAccountsInfoArgs;
3229
+ };
3230
+ declare function getRebalancePositionFusionInstructionDataEncoder(): Encoder<RebalancePositionFusionInstructionDataArgs>;
3231
+ declare function getRebalancePositionFusionInstructionDataDecoder(): Decoder<RebalancePositionFusionInstructionData>;
3232
+ declare function getRebalancePositionFusionInstructionDataCodec(): Codec<RebalancePositionFusionInstructionDataArgs, RebalancePositionFusionInstructionData>;
3233
+ type RebalancePositionFusionInput<TAccountAuthority extends string = string, TAccountTunaConfig extends string = string, TAccountMarket extends string = string, TAccountMintA extends string = string, TAccountMintB extends string = string, TAccountTokenProgramA extends string = string, TAccountTokenProgramB extends string = string, TAccountVaultA extends string = string, TAccountVaultB extends string = string, TAccountTunaPosition extends string = string, TAccountTunaPositionAta extends string = string, TAccountTunaPositionAtaA extends string = string, TAccountTunaPositionAtaB extends string = string, TAccountFeeRecipientAtaA extends string = string, TAccountFeeRecipientAtaB extends string = string, TAccountPythOraclePriceFeedA extends string = string, TAccountPythOraclePriceFeedB extends string = string, TAccountFusionammProgram extends string = string, TAccountFusionPool extends string = string, TAccountFusionPosition extends string = string, TAccountMemoProgram extends string = string> = {
3234
+ /**
3235
+ *
3236
+ * TUNA accounts
3237
+ *
3238
+ */
3239
+ authority: TransactionSigner<TAccountAuthority>;
3240
+ tunaConfig: Address<TAccountTunaConfig>;
3241
+ market: Address<TAccountMarket>;
3242
+ mintA: Address<TAccountMintA>;
3243
+ mintB: Address<TAccountMintB>;
3244
+ tokenProgramA: Address<TAccountTokenProgramA>;
3245
+ tokenProgramB: Address<TAccountTokenProgramB>;
3246
+ vaultA: Address<TAccountVaultA>;
3247
+ vaultB: Address<TAccountVaultB>;
3248
+ tunaPosition: Address<TAccountTunaPosition>;
3249
+ tunaPositionAta: Address<TAccountTunaPositionAta>;
3250
+ tunaPositionAtaA: Address<TAccountTunaPositionAtaA>;
3251
+ tunaPositionAtaB: Address<TAccountTunaPositionAtaB>;
3252
+ feeRecipientAtaA: Address<TAccountFeeRecipientAtaA>;
3253
+ feeRecipientAtaB: Address<TAccountFeeRecipientAtaB>;
3254
+ pythOraclePriceFeedA: Address<TAccountPythOraclePriceFeedA>;
3255
+ pythOraclePriceFeedB: Address<TAccountPythOraclePriceFeedB>;
3256
+ /**
3257
+ *
3258
+ * Fusion accounts
3259
+ *
3260
+ */
3261
+ fusionammProgram: Address<TAccountFusionammProgram>;
3262
+ fusionPool: Address<TAccountFusionPool>;
3263
+ fusionPosition: Address<TAccountFusionPosition>;
3264
+ memoProgram: Address<TAccountMemoProgram>;
3265
+ remainingAccountsInfo: RebalancePositionFusionInstructionDataArgs['remainingAccountsInfo'];
3266
+ };
3267
+ declare function getRebalancePositionFusionInstruction<TAccountAuthority extends string, TAccountTunaConfig extends string, TAccountMarket extends string, TAccountMintA extends string, TAccountMintB extends string, TAccountTokenProgramA extends string, TAccountTokenProgramB extends string, TAccountVaultA extends string, TAccountVaultB extends string, TAccountTunaPosition extends string, TAccountTunaPositionAta extends string, TAccountTunaPositionAtaA extends string, TAccountTunaPositionAtaB extends string, TAccountFeeRecipientAtaA extends string, TAccountFeeRecipientAtaB extends string, TAccountPythOraclePriceFeedA extends string, TAccountPythOraclePriceFeedB extends string, TAccountFusionammProgram extends string, TAccountFusionPool extends string, TAccountFusionPosition extends string, TAccountMemoProgram extends string, TProgramAddress extends Address = typeof TUNA_PROGRAM_ADDRESS>(input: RebalancePositionFusionInput<TAccountAuthority, TAccountTunaConfig, TAccountMarket, TAccountMintA, TAccountMintB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountVaultA, TAccountVaultB, TAccountTunaPosition, TAccountTunaPositionAta, TAccountTunaPositionAtaA, TAccountTunaPositionAtaB, TAccountFeeRecipientAtaA, TAccountFeeRecipientAtaB, TAccountPythOraclePriceFeedA, TAccountPythOraclePriceFeedB, TAccountFusionammProgram, TAccountFusionPool, TAccountFusionPosition, TAccountMemoProgram>, config?: {
3268
+ programAddress?: TProgramAddress;
3269
+ }): RebalancePositionFusionInstruction<TProgramAddress, TAccountAuthority, TAccountTunaConfig, TAccountMarket, TAccountMintA, TAccountMintB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountVaultA, TAccountVaultB, TAccountTunaPosition, TAccountTunaPositionAta, TAccountTunaPositionAtaA, TAccountTunaPositionAtaB, TAccountFeeRecipientAtaA, TAccountFeeRecipientAtaB, TAccountPythOraclePriceFeedA, TAccountPythOraclePriceFeedB, TAccountFusionammProgram, TAccountFusionPool, TAccountFusionPosition, TAccountMemoProgram>;
3270
+ type ParsedRebalancePositionFusionInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
3271
+ programAddress: Address<TProgram>;
3272
+ accounts: {
3273
+ /**
3274
+ *
3275
+ * TUNA accounts
3276
+ *
3277
+ */
3278
+ authority: TAccountMetas[0];
3279
+ tunaConfig: TAccountMetas[1];
3280
+ market: TAccountMetas[2];
3281
+ mintA: TAccountMetas[3];
3282
+ mintB: TAccountMetas[4];
3283
+ tokenProgramA: TAccountMetas[5];
3284
+ tokenProgramB: TAccountMetas[6];
3285
+ vaultA: TAccountMetas[7];
3286
+ vaultB: TAccountMetas[8];
3287
+ tunaPosition: TAccountMetas[9];
3288
+ tunaPositionAta: TAccountMetas[10];
3289
+ tunaPositionAtaA: TAccountMetas[11];
3290
+ tunaPositionAtaB: TAccountMetas[12];
3291
+ feeRecipientAtaA: TAccountMetas[13];
3292
+ feeRecipientAtaB: TAccountMetas[14];
3293
+ pythOraclePriceFeedA: TAccountMetas[15];
3294
+ pythOraclePriceFeedB: TAccountMetas[16];
3295
+ /**
3296
+ *
3297
+ * Fusion accounts
3298
+ *
3299
+ */
3300
+ fusionammProgram: TAccountMetas[17];
3301
+ fusionPool: TAccountMetas[18];
3302
+ fusionPosition: TAccountMetas[19];
3303
+ memoProgram: TAccountMetas[20];
3304
+ };
3305
+ data: RebalancePositionFusionInstructionData;
3306
+ };
3307
+ declare function parseRebalancePositionFusionInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedRebalancePositionFusionInstruction<TProgram, TAccountMetas>;
3308
+
3309
+ /**
3310
+ * This code was AUTOGENERATED using the codama library.
3311
+ * Please DO NOT EDIT THIS FILE, instead use visitors
3312
+ * to add features, then rerun codama to update it.
3313
+ *
3314
+ * @see https://github.com/codama-idl/codama
3315
+ */
3316
+
3317
+ declare const REBALANCE_POSITION_ORCA_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
3318
+ declare function getRebalancePositionOrcaDiscriminatorBytes(): ReadonlyUint8Array;
3319
+ type RebalancePositionOrcaInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountAuthority extends string | IAccountMeta<string> = string, TAccountTunaConfig extends string | IAccountMeta<string> = string, TAccountMintA extends string | IAccountMeta<string> = string, TAccountMintB extends string | IAccountMeta<string> = string, TAccountMarket extends string | IAccountMeta<string> = string, TAccountVaultA extends string | IAccountMeta<string> = string, TAccountVaultB extends string | IAccountMeta<string> = string, TAccountTunaPosition extends string | IAccountMeta<string> = string, TAccountTunaPositionAta extends string | IAccountMeta<string> = string, TAccountTunaPositionAtaA extends string | IAccountMeta<string> = string, TAccountTunaPositionAtaB extends string | IAccountMeta<string> = string, TAccountFeeRecipientAtaA extends string | IAccountMeta<string> = string, TAccountFeeRecipientAtaB extends string | IAccountMeta<string> = string, TAccountPythOraclePriceFeedA extends string | IAccountMeta<string> = string, TAccountPythOraclePriceFeedB extends string | IAccountMeta<string> = string, TAccountWhirlpoolProgram extends string | IAccountMeta<string> = string, TAccountWhirlpool extends string | IAccountMeta<string> = string, TAccountOrcaPosition extends string | IAccountMeta<string> = string, TAccountTokenProgramA extends string | IAccountMeta<string> = string, TAccountTokenProgramB extends string | IAccountMeta<string> = string, TAccountSystemProgram extends string | IAccountMeta<string> = '11111111111111111111111111111111', TAccountMemoProgram extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
3320
+ TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority,
3321
+ TAccountTunaConfig extends string ? ReadonlyAccount<TAccountTunaConfig> : TAccountTunaConfig,
3322
+ TAccountMintA extends string ? ReadonlyAccount<TAccountMintA> : TAccountMintA,
3323
+ TAccountMintB extends string ? ReadonlyAccount<TAccountMintB> : TAccountMintB,
3324
+ TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
3325
+ TAccountVaultA extends string ? WritableAccount<TAccountVaultA> : TAccountVaultA,
3326
+ TAccountVaultB extends string ? WritableAccount<TAccountVaultB> : TAccountVaultB,
3327
+ TAccountTunaPosition extends string ? WritableAccount<TAccountTunaPosition> : TAccountTunaPosition,
3328
+ TAccountTunaPositionAta extends string ? WritableAccount<TAccountTunaPositionAta> : TAccountTunaPositionAta,
3329
+ TAccountTunaPositionAtaA extends string ? WritableAccount<TAccountTunaPositionAtaA> : TAccountTunaPositionAtaA,
3330
+ TAccountTunaPositionAtaB extends string ? WritableAccount<TAccountTunaPositionAtaB> : TAccountTunaPositionAtaB,
3331
+ TAccountFeeRecipientAtaA extends string ? WritableAccount<TAccountFeeRecipientAtaA> : TAccountFeeRecipientAtaA,
3332
+ TAccountFeeRecipientAtaB extends string ? WritableAccount<TAccountFeeRecipientAtaB> : TAccountFeeRecipientAtaB,
3333
+ TAccountPythOraclePriceFeedA extends string ? ReadonlyAccount<TAccountPythOraclePriceFeedA> : TAccountPythOraclePriceFeedA,
3334
+ TAccountPythOraclePriceFeedB extends string ? ReadonlyAccount<TAccountPythOraclePriceFeedB> : TAccountPythOraclePriceFeedB,
3335
+ TAccountWhirlpoolProgram extends string ? ReadonlyAccount<TAccountWhirlpoolProgram> : TAccountWhirlpoolProgram,
3336
+ TAccountWhirlpool extends string ? WritableAccount<TAccountWhirlpool> : TAccountWhirlpool,
3337
+ TAccountOrcaPosition extends string ? WritableAccount<TAccountOrcaPosition> : TAccountOrcaPosition,
3338
+ TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
3339
+ TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
3340
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
3341
+ TAccountMemoProgram extends string ? ReadonlyAccount<TAccountMemoProgram> : TAccountMemoProgram,
3342
+ ...TRemainingAccounts
3343
+ ]>;
3344
+ type RebalancePositionOrcaInstructionData = {
3345
+ discriminator: ReadonlyUint8Array;
3346
+ remainingAccountsInfo: RemainingAccountsInfo;
3347
+ };
3348
+ type RebalancePositionOrcaInstructionDataArgs = {
3349
+ remainingAccountsInfo: RemainingAccountsInfoArgs;
3350
+ };
3351
+ declare function getRebalancePositionOrcaInstructionDataEncoder(): Encoder<RebalancePositionOrcaInstructionDataArgs>;
3352
+ declare function getRebalancePositionOrcaInstructionDataDecoder(): Decoder<RebalancePositionOrcaInstructionData>;
3353
+ declare function getRebalancePositionOrcaInstructionDataCodec(): Codec<RebalancePositionOrcaInstructionDataArgs, RebalancePositionOrcaInstructionData>;
3354
+ type RebalancePositionOrcaInput<TAccountAuthority extends string = string, TAccountTunaConfig extends string = string, TAccountMintA extends string = string, TAccountMintB extends string = string, TAccountMarket extends string = string, TAccountVaultA extends string = string, TAccountVaultB extends string = string, TAccountTunaPosition extends string = string, TAccountTunaPositionAta extends string = string, TAccountTunaPositionAtaA extends string = string, TAccountTunaPositionAtaB extends string = string, TAccountFeeRecipientAtaA extends string = string, TAccountFeeRecipientAtaB extends string = string, TAccountPythOraclePriceFeedA extends string = string, TAccountPythOraclePriceFeedB extends string = string, TAccountWhirlpoolProgram extends string = string, TAccountWhirlpool extends string = string, TAccountOrcaPosition extends string = string, TAccountTokenProgramA extends string = string, TAccountTokenProgramB extends string = string, TAccountSystemProgram extends string = string, TAccountMemoProgram extends string = string> = {
3355
+ /**
3356
+ *
3357
+ * TUNA accounts
3358
+ *
3359
+ */
3360
+ authority: TransactionSigner<TAccountAuthority>;
3361
+ tunaConfig: Address<TAccountTunaConfig>;
3362
+ mintA: Address<TAccountMintA>;
3363
+ mintB: Address<TAccountMintB>;
3364
+ market: Address<TAccountMarket>;
3365
+ vaultA: Address<TAccountVaultA>;
3366
+ vaultB: Address<TAccountVaultB>;
3367
+ tunaPosition: Address<TAccountTunaPosition>;
3368
+ tunaPositionAta: Address<TAccountTunaPositionAta>;
3369
+ tunaPositionAtaA: Address<TAccountTunaPositionAtaA>;
3370
+ tunaPositionAtaB: Address<TAccountTunaPositionAtaB>;
3371
+ feeRecipientAtaA: Address<TAccountFeeRecipientAtaA>;
3372
+ feeRecipientAtaB: Address<TAccountFeeRecipientAtaB>;
3373
+ pythOraclePriceFeedA: Address<TAccountPythOraclePriceFeedA>;
3374
+ pythOraclePriceFeedB: Address<TAccountPythOraclePriceFeedB>;
3375
+ /**
3376
+ *
3377
+ * ORCA accounts
3378
+ *
3379
+ */
3380
+ whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
3381
+ whirlpool: Address<TAccountWhirlpool>;
3382
+ orcaPosition: Address<TAccountOrcaPosition>;
3383
+ tokenProgramA: Address<TAccountTokenProgramA>;
3384
+ tokenProgramB: Address<TAccountTokenProgramB>;
3385
+ systemProgram?: Address<TAccountSystemProgram>;
3386
+ memoProgram: Address<TAccountMemoProgram>;
3387
+ remainingAccountsInfo: RebalancePositionOrcaInstructionDataArgs['remainingAccountsInfo'];
3388
+ };
3389
+ declare function getRebalancePositionOrcaInstruction<TAccountAuthority extends string, TAccountTunaConfig extends string, TAccountMintA extends string, TAccountMintB extends string, TAccountMarket extends string, TAccountVaultA extends string, TAccountVaultB extends string, TAccountTunaPosition extends string, TAccountTunaPositionAta extends string, TAccountTunaPositionAtaA extends string, TAccountTunaPositionAtaB extends string, TAccountFeeRecipientAtaA extends string, TAccountFeeRecipientAtaB extends string, TAccountPythOraclePriceFeedA extends string, TAccountPythOraclePriceFeedB extends string, TAccountWhirlpoolProgram extends string, TAccountWhirlpool extends string, TAccountOrcaPosition extends string, TAccountTokenProgramA extends string, TAccountTokenProgramB extends string, TAccountSystemProgram extends string, TAccountMemoProgram extends string, TProgramAddress extends Address = typeof TUNA_PROGRAM_ADDRESS>(input: RebalancePositionOrcaInput<TAccountAuthority, TAccountTunaConfig, TAccountMintA, TAccountMintB, TAccountMarket, TAccountVaultA, TAccountVaultB, TAccountTunaPosition, TAccountTunaPositionAta, TAccountTunaPositionAtaA, TAccountTunaPositionAtaB, TAccountFeeRecipientAtaA, TAccountFeeRecipientAtaB, TAccountPythOraclePriceFeedA, TAccountPythOraclePriceFeedB, TAccountWhirlpoolProgram, TAccountWhirlpool, TAccountOrcaPosition, TAccountTokenProgramA, TAccountTokenProgramB, TAccountSystemProgram, TAccountMemoProgram>, config?: {
3390
+ programAddress?: TProgramAddress;
3391
+ }): RebalancePositionOrcaInstruction<TProgramAddress, TAccountAuthority, TAccountTunaConfig, TAccountMintA, TAccountMintB, TAccountMarket, TAccountVaultA, TAccountVaultB, TAccountTunaPosition, TAccountTunaPositionAta, TAccountTunaPositionAtaA, TAccountTunaPositionAtaB, TAccountFeeRecipientAtaA, TAccountFeeRecipientAtaB, TAccountPythOraclePriceFeedA, TAccountPythOraclePriceFeedB, TAccountWhirlpoolProgram, TAccountWhirlpool, TAccountOrcaPosition, TAccountTokenProgramA, TAccountTokenProgramB, TAccountSystemProgram, TAccountMemoProgram>;
3392
+ type ParsedRebalancePositionOrcaInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
3393
+ programAddress: Address<TProgram>;
3394
+ accounts: {
3395
+ /**
3396
+ *
3397
+ * TUNA accounts
3398
+ *
3399
+ */
3400
+ authority: TAccountMetas[0];
3401
+ tunaConfig: TAccountMetas[1];
3402
+ mintA: TAccountMetas[2];
3403
+ mintB: TAccountMetas[3];
3404
+ market: TAccountMetas[4];
3405
+ vaultA: TAccountMetas[5];
3406
+ vaultB: TAccountMetas[6];
3407
+ tunaPosition: TAccountMetas[7];
3408
+ tunaPositionAta: TAccountMetas[8];
3409
+ tunaPositionAtaA: TAccountMetas[9];
3410
+ tunaPositionAtaB: TAccountMetas[10];
3411
+ feeRecipientAtaA: TAccountMetas[11];
3412
+ feeRecipientAtaB: TAccountMetas[12];
3413
+ pythOraclePriceFeedA: TAccountMetas[13];
3414
+ pythOraclePriceFeedB: TAccountMetas[14];
3415
+ /**
3416
+ *
3417
+ * ORCA accounts
3418
+ *
3419
+ */
3420
+ whirlpoolProgram: TAccountMetas[15];
3421
+ whirlpool: TAccountMetas[16];
3422
+ orcaPosition: TAccountMetas[17];
3423
+ tokenProgramA: TAccountMetas[18];
3424
+ tokenProgramB: TAccountMetas[19];
3425
+ systemProgram: TAccountMetas[20];
3426
+ memoProgram: TAccountMetas[21];
3427
+ };
3428
+ data: RebalancePositionOrcaInstructionData;
3429
+ };
3430
+ declare function parseRebalancePositionOrcaInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedRebalancePositionOrcaInstruction<TProgram, TAccountMetas>;
3431
+
3164
3432
  /**
3165
3433
  * This code was AUTOGENERATED using the codama library.
3166
3434
  * Please DO NOT EDIT THIS FILE, instead use visitors
@@ -4060,6 +4328,49 @@ type ParsedSetTunaPositionFlagsInstruction<TProgram extends string = typeof TUNA
4060
4328
  };
4061
4329
  declare function parseSetTunaPositionFlagsInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedSetTunaPositionFlagsInstruction<TProgram, TAccountMetas>;
4062
4330
 
4331
+ /**
4332
+ * This code was AUTOGENERATED using the codama library.
4333
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4334
+ * to add features, then rerun codama to update it.
4335
+ *
4336
+ * @see https://github.com/codama-idl/codama
4337
+ */
4338
+
4339
+ declare const SET_TUNA_POSITION_REBALANCE_THRESHOLD_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
4340
+ declare function getSetTunaPositionRebalanceThresholdDiscriminatorBytes(): ReadonlyUint8Array;
4341
+ type SetTunaPositionRebalanceThresholdInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountAuthority extends string | IAccountMeta<string> = string, TAccountTunaPosition extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
4342
+ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority,
4343
+ TAccountTunaPosition extends string ? WritableAccount<TAccountTunaPosition> : TAccountTunaPosition,
4344
+ ...TRemainingAccounts
4345
+ ]>;
4346
+ type SetTunaPositionRebalanceThresholdInstructionData = {
4347
+ discriminator: ReadonlyUint8Array;
4348
+ rebalanceThresholdTicks: number;
4349
+ };
4350
+ type SetTunaPositionRebalanceThresholdInstructionDataArgs = {
4351
+ rebalanceThresholdTicks: number;
4352
+ };
4353
+ declare function getSetTunaPositionRebalanceThresholdInstructionDataEncoder(): Encoder<SetTunaPositionRebalanceThresholdInstructionDataArgs>;
4354
+ declare function getSetTunaPositionRebalanceThresholdInstructionDataDecoder(): Decoder<SetTunaPositionRebalanceThresholdInstructionData>;
4355
+ declare function getSetTunaPositionRebalanceThresholdInstructionDataCodec(): Codec<SetTunaPositionRebalanceThresholdInstructionDataArgs, SetTunaPositionRebalanceThresholdInstructionData>;
4356
+ type SetTunaPositionRebalanceThresholdInput<TAccountAuthority extends string = string, TAccountTunaPosition extends string = string> = {
4357
+ authority: TransactionSigner<TAccountAuthority>;
4358
+ tunaPosition: Address<TAccountTunaPosition>;
4359
+ rebalanceThresholdTicks: SetTunaPositionRebalanceThresholdInstructionDataArgs['rebalanceThresholdTicks'];
4360
+ };
4361
+ declare function getSetTunaPositionRebalanceThresholdInstruction<TAccountAuthority extends string, TAccountTunaPosition extends string, TProgramAddress extends Address = typeof TUNA_PROGRAM_ADDRESS>(input: SetTunaPositionRebalanceThresholdInput<TAccountAuthority, TAccountTunaPosition>, config?: {
4362
+ programAddress?: TProgramAddress;
4363
+ }): SetTunaPositionRebalanceThresholdInstruction<TProgramAddress, TAccountAuthority, TAccountTunaPosition>;
4364
+ type ParsedSetTunaPositionRebalanceThresholdInstruction<TProgram extends string = typeof TUNA_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
4365
+ programAddress: Address<TProgram>;
4366
+ accounts: {
4367
+ authority: TAccountMetas[0];
4368
+ tunaPosition: TAccountMetas[1];
4369
+ };
4370
+ data: SetTunaPositionRebalanceThresholdInstructionData;
4371
+ };
4372
+ declare function parseSetTunaPositionRebalanceThresholdInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedSetTunaPositionRebalanceThresholdInstruction<TProgram, TAccountMetas>;
4373
+
4063
4374
  /**
4064
4375
  * This code was AUTOGENERATED using the codama library.
4065
4376
  * Please DO NOT EDIT THIS FILE, instead use visitors
@@ -4288,11 +4599,23 @@ declare function fetchAllLendingPositionWithFilter(rpc: Rpc<GetProgramAccountsAp
4288
4599
  declare class OrcaUtils {
4289
4600
  static getTickArrayAddressFromTickIndex(whirlpool: Account<Whirlpool>, tickIndex: number): Promise<Address<string>>;
4290
4601
  static getSwapTickArrayAddresses(whirlpool: Account<Whirlpool>): Promise<Address[]>;
4602
+ static getTickArraysForRebalancedPosition(whirlpool: Account<Whirlpool>, tunaPosition: Account<TunaPosition>): Promise<{
4603
+ lowerTickArrayAddress: Address<string>;
4604
+ lowerTickArrayStartIndex: number;
4605
+ upperTickArrayAddress: Address<string>;
4606
+ upperTickArrayStartIndex: number;
4607
+ }>;
4291
4608
  }
4292
4609
 
4293
4610
  declare class FusionUtils {
4294
- static getTickArrayAddressFromTickIndex(whirlpool: Account<FusionPool>, tickIndex: number): Promise<Address<string>>;
4295
- static getSwapTickArrayAddresses(whirlpool: Account<FusionPool>): Promise<Address[]>;
4611
+ static getTickArrayAddressFromTickIndex(fusionPool: Account<FusionPool>, tickIndex: number): Promise<Address<string>>;
4612
+ static getSwapTickArrayAddresses(fusionPool: Account<FusionPool>): Promise<Address[]>;
4613
+ static getTickArraysForRebalancedPosition(fusionPool: Account<FusionPool>, tunaPosition: Account<TunaPosition>): Promise<{
4614
+ lowerTickArrayAddress: Address<string>;
4615
+ lowerTickArrayStartIndex: number;
4616
+ upperTickArrayAddress: Address<string>;
4617
+ upperTickArrayStartIndex: number;
4618
+ }>;
4296
4619
  }
4297
4620
 
4298
4621
  declare const NATIVE_MINT: Address<"So11111111111111111111111111111111111111112">;
@@ -4413,7 +4736,7 @@ declare function closePositionWithLiquidityFusionInstructions(rpc: Rpc<GetAccoun
4413
4736
 
4414
4737
  declare function createMarketInstruction(authority: TransactionSigner, pool: Address, args: CreateMarketInstructionDataArgs): Promise<IInstruction>;
4415
4738
 
4416
- declare function createTunaConfigInstruction(authority: TransactionSigner, adminAuthority: Address, feeRecipient: Address, liquidatorAuthority: Address, ownerAuthority: Address): Promise<IInstruction>;
4739
+ declare function createTunaConfigInstruction(authority: TransactionSigner, ownerAuthority: Address, adminAuthority: Address, liquidatorAuthority: Address, feeRecipient: Address): Promise<IInstruction>;
4417
4740
 
4418
4741
  declare function createVaultInstructions(authority: TransactionSigner, mint: Account<Mint>, args: CreateVaultInstructionDataArgs): Promise<IInstruction[]>;
4419
4742
 
@@ -4470,6 +4793,12 @@ declare function createAddressLookupTableForMarketInstructions(rpc: Rpc<GetAccou
4470
4793
  declare function repayDebtInstructions(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi>, authority: TransactionSigner, positionMint: Address, collateralA: bigint, collateralB: bigint, createInstructions?: IInstruction[], cleanupInstructions?: IInstruction[]): Promise<IInstruction[]>;
4471
4794
  declare function repayDebtInstruction(authority: TransactionSigner, positionMint: Address, mintA: Account<Mint>, mintB: Account<Mint>, marketAddress: Address, collateralA: bigint, collateralB: bigint): Promise<IInstruction>;
4472
4795
 
4796
+ declare function rebalancePositionOrcaInstructions(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi>, authority: TransactionSigner, positionMint: Address, createInstructions?: IInstruction[], cleanupInstructions?: IInstruction[]): Promise<IInstruction[]>;
4797
+ declare function rebalancePositionOrcaInstruction(authority: TransactionSigner, tunaPosition: Account<TunaPosition>, tunaConfig: Account<TunaConfig>, mintA: Account<Mint>, mintB: Account<Mint>, vaultA: Account<Vault>, vaultB: Account<Vault>, whirlpool: Account<Whirlpool>): Promise<IInstruction>;
4798
+
4799
+ declare function rebalancePositionFusionInstructions(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi>, authority: TransactionSigner, positionMint: Address, createInstructions?: IInstruction[], cleanupInstructions?: IInstruction[]): Promise<IInstruction[]>;
4800
+ declare function rebalancePositionFusionInstruction(authority: TransactionSigner, tunaPosition: Account<TunaPosition>, tunaConfig: Account<TunaConfig>, mintA: Account<Mint>, mintB: Account<Mint>, vaultA: Account<Vault>, vaultB: Account<Vault>, fusionPool: Account<FusionPool>): Promise<IInstruction>;
4801
+
4473
4802
  declare const DEFAULT_ADDRESS: _solana_kit.Address<"11111111111111111111111111111111">;
4474
4803
  declare const HUNDRED_PERCENT = 1000000;
4475
4804
  declare const LEVERAGE_ONE = 1000000;
@@ -4488,6 +4817,7 @@ declare const TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A: number;
4488
4817
  declare const TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B: number;
4489
4818
  declare const TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD: number;
4490
4819
  declare const TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE: number;
4820
+ declare const TUNA_POSITION_FLAGS_ALLOW_REBALANCING: number;
4491
4821
  declare const WP_NFT_UPDATE_AUTH: _solana_kit.Address<"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr">;
4492
4822
 
4493
- export { ADD_LIQUIDITY_FUSION_DISCRIMINATOR, ADD_LIQUIDITY_ORCA_DISCRIMINATOR, AccountsType, type AccountsTypeArgs, type AddLiquidityFusionInput, type AddLiquidityFusionInstruction, type AddLiquidityFusionInstructionData, type AddLiquidityFusionInstructionDataArgs, type AddLiquidityFusionInstructionsArgs, type AddLiquidityOrcaInput, type AddLiquidityOrcaInstruction, type AddLiquidityOrcaInstructionData, type AddLiquidityOrcaInstructionDataArgs, type AddLiquidityOrcaInstructionsArgs, CLOSE_POSITION_FUSION_DISCRIMINATOR, CLOSE_POSITION_ORCA_DISCRIMINATOR, COLLECT_AND_COMPOUND_FEES_FUSION_DISCRIMINATOR, COLLECT_AND_COMPOUND_FEES_ORCA_DISCRIMINATOR, COLLECT_FEES_FUSION_DISCRIMINATOR, COLLECT_FEES_ORCA_DISCRIMINATOR, COLLECT_REWARD_ORCA_DISCRIMINATOR, COMPUTED_AMOUNT, CREATE_MARKET_DISCRIMINATOR, CREATE_TUNA_CONFIG_DISCRIMINATOR, CREATE_VAULT_DISCRIMINATOR, type ClosePositionFusionInput, type ClosePositionFusionInstruction, type ClosePositionFusionInstructionData, type ClosePositionFusionInstructionDataArgs, type ClosePositionOrcaInput, type ClosePositionOrcaInstruction, type ClosePositionOrcaInstructionData, type ClosePositionOrcaInstructionDataArgs, type ClosePositionWithLiquidityFusionInstructionArgs, type ClosePositionWithLiquidityOrcaInstructionArgs, type CollectAndCompoundFeesFusionInput, type CollectAndCompoundFeesFusionInstruction, type CollectAndCompoundFeesFusionInstructionData, type CollectAndCompoundFeesFusionInstructionDataArgs, type CollectAndCompoundFeesOrcaInput, type CollectAndCompoundFeesOrcaInstruction, type CollectAndCompoundFeesOrcaInstructionData, type CollectAndCompoundFeesOrcaInstructionDataArgs, type CollectFeesFusionInput, type CollectFeesFusionInstruction, type CollectFeesFusionInstructionData, type CollectFeesFusionInstructionDataArgs, type CollectFeesOrcaInput, type CollectFeesOrcaInstruction, type CollectFeesOrcaInstructionData, type CollectFeesOrcaInstructionDataArgs, type CollectRewardOrcaInput, type CollectRewardOrcaInstruction, type CollectRewardOrcaInstructionData, type CollectRewardOrcaInstructionDataArgs, type CreateAddressLookupTableResult, type CreateMarketInput, type CreateMarketInstruction, type CreateMarketInstructionData, type CreateMarketInstructionDataArgs, type CreateTunaConfigInput, type CreateTunaConfigInstruction, type CreateTunaConfigInstructionData, type CreateTunaConfigInstructionDataArgs, type CreateVaultInput, type CreateVaultInstruction, type CreateVaultInstructionData, type CreateVaultInstructionDataArgs, DEFAULT_ADDRESS, DEFAULT_MAX_AMOUNT_SLIPPAGE, DEFAULT_MAX_SWAP_SLIPPAGE, DEPOSIT_DISCRIMINATOR, type DepositInput, type DepositInstruction, type DepositInstructionData, type DepositInstructionDataArgs, FusionUtils, HUNDRED_PERCENT, type IncreaseLiquidityQuoteArgs, type IncreaseLiquidityQuoteResult, LENDING_POSITION_DISCRIMINATOR, LEVERAGE_ONE, LIQUIDATE_POSITION_FUSION_DISCRIMINATOR, LIQUIDATE_POSITION_ORCA_DISCRIMINATOR, type LendingPosition, type LendingPositionArgs, type LiquidatePositionFusionInput, type LiquidatePositionFusionInstruction, type LiquidatePositionFusionInstructionData, type LiquidatePositionFusionInstructionDataArgs, type LiquidatePositionOrcaInput, type LiquidatePositionOrcaInstruction, type LiquidatePositionOrcaInstructionData, type LiquidatePositionOrcaInstructionDataArgs, MARKET_DISCRIMINATOR, MAX_LEVERAGE, MAX_LIMIT_ORDER_EXECUTION_FEE, MAX_LIQUIDATION_FEE, MAX_LIQUIDATION_THRESHOLD, MAX_PROTOCOL_FEE, type Market, type MarketArgs, MarketMaker, type MarketMakerArgs, NATIVE_MINT, NO_STOP_LOSS, NO_TAKE_PROFIT, OPEN_LENDING_POSITION_DISCRIMINATOR, OPEN_POSITION_FUSION_DISCRIMINATOR, OPEN_POSITION_ORCA_DISCRIMINATOR, OPEN_POSITION_WITH_LIQUIDITY_FUSION_DISCRIMINATOR, OPEN_POSITION_WITH_LIQUIDITY_ORCA_DISCRIMINATOR, type OpenLendingPositionInput, type OpenLendingPositionInstruction, type OpenLendingPositionInstructionData, type OpenLendingPositionInstructionDataArgs, type OpenPositionFusionInput, type OpenPositionFusionInstruction, type OpenPositionFusionInstructionData, type OpenPositionFusionInstructionDataArgs, type OpenPositionOrcaInput, type OpenPositionOrcaInstruction, type OpenPositionOrcaInstructionData, type OpenPositionOrcaInstructionDataArgs, type OpenPositionWithLiquidityFusionInput, type OpenPositionWithLiquidityFusionInstruction, type OpenPositionWithLiquidityFusionInstructionData, type OpenPositionWithLiquidityFusionInstructionDataArgs, type OpenPositionWithLiquidityFusionInstructionsArgs, type OpenPositionWithLiquidityOrcaInput, type OpenPositionWithLiquidityOrcaInstruction, type OpenPositionWithLiquidityOrcaInstructionData, type OpenPositionWithLiquidityOrcaInstructionDataArgs, type OpenPositionWithLiquidityOrcaInstructionsArgs, OrcaUtils, type ParsedAddLiquidityFusionInstruction, type ParsedAddLiquidityOrcaInstruction, type ParsedClosePositionFusionInstruction, type ParsedClosePositionOrcaInstruction, type ParsedCollectAndCompoundFeesFusionInstruction, type ParsedCollectAndCompoundFeesOrcaInstruction, type ParsedCollectFeesFusionInstruction, type ParsedCollectFeesOrcaInstruction, type ParsedCollectRewardOrcaInstruction, type ParsedCreateMarketInstruction, type ParsedCreateTunaConfigInstruction, type ParsedCreateVaultInstruction, type ParsedDepositInstruction, type ParsedLiquidatePositionFusionInstruction, type ParsedLiquidatePositionOrcaInstruction, type ParsedOpenLendingPositionInstruction, type ParsedOpenPositionFusionInstruction, type ParsedOpenPositionOrcaInstruction, type ParsedOpenPositionWithLiquidityFusionInstruction, type ParsedOpenPositionWithLiquidityOrcaInstruction, type ParsedRemoveLiquidityFusionInstruction, type ParsedRemoveLiquidityOrcaInstruction, type ParsedRepayBadDebtInstruction, type ParsedRepayDebtInstruction, type ParsedSetAdminAuthorityInstruction, type ParsedSetDefaultMaxPercentageOfLeftoversInstruction, type ParsedSetDefaultMaxSwapSlippageInstruction, type ParsedSetDefaultOraclePriceDeviationThresholdInstruction, type ParsedSetFeeRecipientInstruction, type ParsedSetLimitOrdersInstruction, type ParsedSetLiquidatorAuthorityInstruction, type ParsedSetOwnerAuthorityInstruction, type ParsedSetSuspendedStateInstruction, type ParsedSetTunaPositionFlagsInstruction, type ParsedTunaInstruction, type ParsedUpdateMarketInstruction, type ParsedUpdateVaultInstruction, type ParsedWithdrawInstruction, REMOVE_LIQUIDITY_FUSION_DISCRIMINATOR, REMOVE_LIQUIDITY_ORCA_DISCRIMINATOR, REPAY_BAD_DEBT_DISCRIMINATOR, REPAY_DEBT_DISCRIMINATOR, type RemainingAccountsInfo, type RemainingAccountsInfoArgs, type RemainingAccountsSlice, type RemainingAccountsSliceArgs, type RemoveLiquidityFusionInput, type RemoveLiquidityFusionInstruction, type RemoveLiquidityFusionInstructionData, type RemoveLiquidityFusionInstructionDataArgs, type RemoveLiquidityFusionInstructionsArgs, type RemoveLiquidityOrcaInput, type RemoveLiquidityOrcaInstruction, type RemoveLiquidityOrcaInstructionData, type RemoveLiquidityOrcaInstructionDataArgs, type RemoveLiquidityOrcaInstructionsArgs, type RepayBadDebtInput, type RepayBadDebtInstruction, type RepayBadDebtInstructionData, type RepayBadDebtInstructionDataArgs, type RepayDebtInput, type RepayDebtInstruction, type RepayDebtInstructionData, type RepayDebtInstructionDataArgs, SET_ADMIN_AUTHORITY_DISCRIMINATOR, SET_DEFAULT_MAX_PERCENTAGE_OF_LEFTOVERS_DISCRIMINATOR, SET_DEFAULT_MAX_SWAP_SLIPPAGE_DISCRIMINATOR, SET_DEFAULT_ORACLE_PRICE_DEVIATION_THRESHOLD_DISCRIMINATOR, SET_FEE_RECIPIENT_DISCRIMINATOR, SET_LIMIT_ORDERS_DISCRIMINATOR, SET_LIQUIDATOR_AUTHORITY_DISCRIMINATOR, SET_OWNER_AUTHORITY_DISCRIMINATOR, SET_SUSPENDED_STATE_DISCRIMINATOR, SET_TUNA_POSITION_FLAGS_DISCRIMINATOR, type SetAdminAuthorityInput, type SetAdminAuthorityInstruction, type SetAdminAuthorityInstructionData, type SetAdminAuthorityInstructionDataArgs, type SetDefaultMaxPercentageOfLeftoversInput, type SetDefaultMaxPercentageOfLeftoversInstruction, type SetDefaultMaxPercentageOfLeftoversInstructionData, type SetDefaultMaxPercentageOfLeftoversInstructionDataArgs, type SetDefaultMaxSwapSlippageInput, type SetDefaultMaxSwapSlippageInstruction, type SetDefaultMaxSwapSlippageInstructionData, type SetDefaultMaxSwapSlippageInstructionDataArgs, type SetDefaultOraclePriceDeviationThresholdInput, type SetDefaultOraclePriceDeviationThresholdInstruction, type SetDefaultOraclePriceDeviationThresholdInstructionData, type SetDefaultOraclePriceDeviationThresholdInstructionDataArgs, type SetFeeRecipientInput, type SetFeeRecipientInstruction, type SetFeeRecipientInstructionData, type SetFeeRecipientInstructionDataArgs, type SetLimitOrdersInput, type SetLimitOrdersInstruction, type SetLimitOrdersInstructionData, type SetLimitOrdersInstructionDataArgs, type SetLiquidatorAuthorityInput, type SetLiquidatorAuthorityInstruction, type SetLiquidatorAuthorityInstructionData, type SetLiquidatorAuthorityInstructionDataArgs, type SetOwnerAuthorityInput, type SetOwnerAuthorityInstruction, type SetOwnerAuthorityInstructionData, type SetOwnerAuthorityInstructionDataArgs, type SetSuspendedStateInput, type SetSuspendedStateInstruction, type SetSuspendedStateInstructionData, type SetSuspendedStateInstructionDataArgs, type SetTunaPositionFlagsInput, type SetTunaPositionFlagsInstruction, type SetTunaPositionFlagsInstructionData, type SetTunaPositionFlagsInstructionDataArgs, TUNA_CONFIG_DISCRIMINATOR, TUNA_ERROR__AMOUNT_SLIPPAGE_EXCEEDED, TUNA_ERROR__BAD_DEBT, TUNA_ERROR__INSUFFICIENT_LIQUIDITY, TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE, TUNA_ERROR__INVALID_ACCOUNT_OWNER, TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS, TUNA_ERROR__INVALID_MARKET_MAKER, TUNA_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH, TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION, TUNA_ERROR__INVALID_TICK_ARRAY_ACCOUNTS, TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE, TUNA_ERROR__LEFTOVERS_EXCEEDED, TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE, TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDITY_ZERO, TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED, TUNA_ERROR__MARKET_DISABLED, TUNA_ERROR__MATH_OVERFLOW, TUNA_ERROR__MATH_UNDERFLOW, TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK, TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED, TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE, TUNA_ERROR__ORACLE_STALE_PRICE, TUNA_ERROR__PARTIAL_FILL_ERROR, TUNA_ERROR__POSITION_IS_HEALTHY, TUNA_ERROR__POSITION_IS_LIQUIDATED, TUNA_ERROR__POSITION_IS_UNHEALTHY, TUNA_ERROR__POSITION_NOT_EMPTY, TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX, TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT, TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY, TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW, TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT, TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW, TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED, TUNA_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE, TUNA_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT, TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE, TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE_LENGTH, TUNA_ERROR__REQUIRED_REMAINING_ACCOUNT_NOT_PROVIDED, TUNA_ERROR__SOLVER_FAILED_TO_FIND_ROOT, TUNA_ERROR__SQRT_PRICE_OUT_OF_BOUNDS, TUNA_ERROR__SUPPLY_LIMIT_EXCEEDED, TUNA_ERROR__SUSPENDED, TUNA_ERROR__SWAP_SLIPPAGE_EXCEEDED, TUNA_ERROR__SWAP_SLIPPAGE_IS_OUT_OF_RANGE, TUNA_ERROR__TICK_INDEX_OF_BOUNDS, TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR, TUNA_ERROR__TYPE_CAST_OVERFLOW, TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA, TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA, TUNA_ERROR__UNEXPECTED_VALUE, TUNA_ERROR__UNSUPPORTED_TOKEN_MINT, TUNA_ERROR__VAULT_NOT_INITIALIZED, TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE, TUNA_ERROR__ZERO_PRICE_RANGE, TUNA_ERROR__ZERO_TRADABLE_AMOUNT, TUNA_ERROR__ZERO_YIELD, TUNA_POSITION_DISCRIMINATOR, TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD, TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE, TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A, TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B, TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A, TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B, TUNA_PROGRAM_ADDRESS, TunaAccount, type TunaConfig, type TunaConfigArgs, type TunaError, TunaInstruction, type TunaPosition, type TunaPositionArgs, TunaPositionState, type TunaPositionStateArgs, UPDATE_MARKET_DISCRIMINATOR, UPDATE_VAULT_DISCRIMINATOR, type UpdateMarketInput, type UpdateMarketInstruction, type UpdateMarketInstructionData, type UpdateMarketInstructionDataArgs, type UpdateVaultInput, type UpdateVaultInstruction, type UpdateVaultInstructionData, type UpdateVaultInstructionDataArgs, VAULT_DISCRIMINATOR, type Vault, type VaultArgs, WITHDRAW_DISCRIMINATOR, WP_NFT_UPDATE_AUTH, type WithdrawInput, type WithdrawInstruction, type WithdrawInstructionData, type WithdrawInstructionDataArgs, addLiquidityFusionInstruction, addLiquidityFusionInstructions, addLiquidityOrcaInstruction, addLiquidityOrcaInstructions, calculateProtocolFee, closePositionFusionInstruction, closePositionOrcaInstruction, closePositionWithLiquidityFusionInstructions, closePositionWithLiquidityOrcaInstructions, collectAndCompoundFeesFusionInstruction, collectAndCompoundFeesFusionInstructions, collectAndCompoundFeesOrcaInstruction, collectAndCompoundFeesOrcaInstructions, collectFeesFusionInstruction, collectFeesFusionInstructions, collectFeesOrcaInstruction, collectFeesOrcaInstructions, createAddressLookupTableForMarketInstructions, createAddressLookupTableInstructions, createMarketInstruction, createTunaConfigInstruction, createVaultInstructions, decodeLendingPosition, decodeMarket, decodeTunaConfig, decodeTunaPosition, decodeVault, depositInstruction, depositInstructions, fetchAllLendingPosition, fetchAllLendingPositionWithFilter, fetchAllMarket, fetchAllMaybeLendingPosition, fetchAllMaybeMarket, fetchAllMaybeTunaConfig, fetchAllMaybeTunaPosition, fetchAllMaybeVault, fetchAllTunaConfig, fetchAllTunaPosition, fetchAllTunaPositionWithFilter, fetchAllVault, fetchLendingPosition, fetchMarket, fetchMaybeLendingPosition, fetchMaybeMarket, fetchMaybeTunaConfig, fetchMaybeTunaPosition, fetchMaybeVault, fetchTunaConfig, fetchTunaPosition, fetchVault, getAccountsTypeCodec, getAccountsTypeDecoder, getAccountsTypeEncoder, getAddLiquidityFusionDiscriminatorBytes, getAddLiquidityFusionInstruction, getAddLiquidityFusionInstructionDataCodec, getAddLiquidityFusionInstructionDataDecoder, getAddLiquidityFusionInstructionDataEncoder, getAddLiquidityOrcaDiscriminatorBytes, getAddLiquidityOrcaInstruction, getAddLiquidityOrcaInstructionDataCodec, getAddLiquidityOrcaInstructionDataDecoder, getAddLiquidityOrcaInstructionDataEncoder, getClosePositionFusionDiscriminatorBytes, getClosePositionFusionInstruction, getClosePositionFusionInstructionDataCodec, getClosePositionFusionInstructionDataDecoder, getClosePositionFusionInstructionDataEncoder, getClosePositionOrcaDiscriminatorBytes, getClosePositionOrcaInstruction, getClosePositionOrcaInstructionDataCodec, getClosePositionOrcaInstructionDataDecoder, getClosePositionOrcaInstructionDataEncoder, getCollectAndCompoundFeesFusionDiscriminatorBytes, getCollectAndCompoundFeesFusionInstruction, getCollectAndCompoundFeesFusionInstructionDataCodec, getCollectAndCompoundFeesFusionInstructionDataDecoder, getCollectAndCompoundFeesFusionInstructionDataEncoder, getCollectAndCompoundFeesOrcaDiscriminatorBytes, getCollectAndCompoundFeesOrcaInstruction, getCollectAndCompoundFeesOrcaInstructionDataCodec, getCollectAndCompoundFeesOrcaInstructionDataDecoder, getCollectAndCompoundFeesOrcaInstructionDataEncoder, getCollectFeesFusionDiscriminatorBytes, getCollectFeesFusionInstruction, getCollectFeesFusionInstructionDataCodec, getCollectFeesFusionInstructionDataDecoder, getCollectFeesFusionInstructionDataEncoder, getCollectFeesOrcaDiscriminatorBytes, getCollectFeesOrcaInstruction, getCollectFeesOrcaInstructionDataCodec, getCollectFeesOrcaInstructionDataDecoder, getCollectFeesOrcaInstructionDataEncoder, getCollectRewardOrcaDiscriminatorBytes, getCollectRewardOrcaInstruction, getCollectRewardOrcaInstructionDataCodec, getCollectRewardOrcaInstructionDataDecoder, getCollectRewardOrcaInstructionDataEncoder, getCreateAtaInstruction, getCreateAtaInstructions, getCreateMarketDiscriminatorBytes, getCreateMarketInstruction, getCreateMarketInstructionDataCodec, getCreateMarketInstructionDataDecoder, getCreateMarketInstructionDataEncoder, getCreateTunaConfigDiscriminatorBytes, getCreateTunaConfigInstruction, getCreateTunaConfigInstructionDataCodec, getCreateTunaConfigInstructionDataDecoder, getCreateTunaConfigInstructionDataEncoder, getCreateVaultDiscriminatorBytes, getCreateVaultInstruction, getCreateVaultInstructionDataCodec, getCreateVaultInstructionDataDecoder, getCreateVaultInstructionDataEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getLendingPositionAddress, getLendingPositionCodec, getLendingPositionDecoder, getLendingPositionDiscriminatorBytes, getLendingPositionEncoder, getLendingPositionSize, getLendingVaultAddress, getLiquidatePositionFusionDiscriminatorBytes, getLiquidatePositionFusionInstruction, getLiquidatePositionFusionInstructionDataCodec, getLiquidatePositionFusionInstructionDataDecoder, getLiquidatePositionFusionInstructionDataEncoder, getLiquidatePositionOrcaDiscriminatorBytes, getLiquidatePositionOrcaInstruction, getLiquidatePositionOrcaInstructionDataCodec, getLiquidatePositionOrcaInstructionDataDecoder, getLiquidatePositionOrcaInstructionDataEncoder, getLiquidityIncreaseQuote, getMarketAddress, getMarketCodec, getMarketDecoder, getMarketDiscriminatorBytes, getMarketEncoder, getMarketMakerCodec, getMarketMakerDecoder, getMarketMakerEncoder, getMarketSize, getOpenLendingPositionDiscriminatorBytes, getOpenLendingPositionInstruction, getOpenLendingPositionInstructionDataCodec, getOpenLendingPositionInstructionDataDecoder, getOpenLendingPositionInstructionDataEncoder, getOpenPositionFusionDiscriminatorBytes, getOpenPositionFusionInstruction, getOpenPositionFusionInstructionDataCodec, getOpenPositionFusionInstructionDataDecoder, getOpenPositionFusionInstructionDataEncoder, getOpenPositionOrcaDiscriminatorBytes, getOpenPositionOrcaInstruction, getOpenPositionOrcaInstructionDataCodec, getOpenPositionOrcaInstructionDataDecoder, getOpenPositionOrcaInstructionDataEncoder, getOpenPositionWithLiquidityFusionDiscriminatorBytes, getOpenPositionWithLiquidityFusionInstruction, getOpenPositionWithLiquidityFusionInstructionDataCodec, getOpenPositionWithLiquidityFusionInstructionDataDecoder, getOpenPositionWithLiquidityFusionInstructionDataEncoder, getOpenPositionWithLiquidityOrcaDiscriminatorBytes, getOpenPositionWithLiquidityOrcaInstruction, getOpenPositionWithLiquidityOrcaInstructionDataCodec, getOpenPositionWithLiquidityOrcaInstructionDataDecoder, getOpenPositionWithLiquidityOrcaInstructionDataEncoder, getRemainingAccountsInfoCodec, getRemainingAccountsInfoDecoder, getRemainingAccountsInfoEncoder, getRemainingAccountsSliceCodec, getRemainingAccountsSliceDecoder, getRemainingAccountsSliceEncoder, getRemoveLiquidityFusionDiscriminatorBytes, getRemoveLiquidityFusionInstruction, getRemoveLiquidityFusionInstructionDataCodec, getRemoveLiquidityFusionInstructionDataDecoder, getRemoveLiquidityFusionInstructionDataEncoder, getRemoveLiquidityOrcaDiscriminatorBytes, getRemoveLiquidityOrcaInstruction, getRemoveLiquidityOrcaInstructionDataCodec, getRemoveLiquidityOrcaInstructionDataDecoder, getRemoveLiquidityOrcaInstructionDataEncoder, getRepayBadDebtDiscriminatorBytes, getRepayBadDebtInstruction, getRepayBadDebtInstructionDataCodec, getRepayBadDebtInstructionDataDecoder, getRepayBadDebtInstructionDataEncoder, getRepayDebtDiscriminatorBytes, getRepayDebtInstruction, getRepayDebtInstructionDataCodec, getRepayDebtInstructionDataDecoder, getRepayDebtInstructionDataEncoder, getSetAdminAuthorityDiscriminatorBytes, getSetAdminAuthorityInstruction, getSetAdminAuthorityInstructionDataCodec, getSetAdminAuthorityInstructionDataDecoder, getSetAdminAuthorityInstructionDataEncoder, getSetDefaultMaxPercentageOfLeftoversDiscriminatorBytes, getSetDefaultMaxPercentageOfLeftoversInstruction, getSetDefaultMaxPercentageOfLeftoversInstructionDataCodec, getSetDefaultMaxPercentageOfLeftoversInstructionDataDecoder, getSetDefaultMaxPercentageOfLeftoversInstructionDataEncoder, getSetDefaultMaxSwapSlippageDiscriminatorBytes, getSetDefaultMaxSwapSlippageInstruction, getSetDefaultMaxSwapSlippageInstructionDataCodec, getSetDefaultMaxSwapSlippageInstructionDataDecoder, getSetDefaultMaxSwapSlippageInstructionDataEncoder, getSetDefaultOraclePriceDeviationThresholdDiscriminatorBytes, getSetDefaultOraclePriceDeviationThresholdInstruction, getSetDefaultOraclePriceDeviationThresholdInstructionDataCodec, getSetDefaultOraclePriceDeviationThresholdInstructionDataDecoder, getSetDefaultOraclePriceDeviationThresholdInstructionDataEncoder, getSetFeeRecipientDiscriminatorBytes, getSetFeeRecipientInstruction, getSetFeeRecipientInstructionDataCodec, getSetFeeRecipientInstructionDataDecoder, getSetFeeRecipientInstructionDataEncoder, getSetLimitOrdersDiscriminatorBytes, getSetLimitOrdersInstruction, getSetLimitOrdersInstructionDataCodec, getSetLimitOrdersInstructionDataDecoder, getSetLimitOrdersInstructionDataEncoder, getSetLiquidatorAuthorityDiscriminatorBytes, getSetLiquidatorAuthorityInstruction, getSetLiquidatorAuthorityInstructionDataCodec, getSetLiquidatorAuthorityInstructionDataDecoder, getSetLiquidatorAuthorityInstructionDataEncoder, getSetOwnerAuthorityDiscriminatorBytes, getSetOwnerAuthorityInstruction, getSetOwnerAuthorityInstructionDataCodec, getSetOwnerAuthorityInstructionDataDecoder, getSetOwnerAuthorityInstructionDataEncoder, getSetSuspendedStateDiscriminatorBytes, getSetSuspendedStateInstruction, getSetSuspendedStateInstructionDataCodec, getSetSuspendedStateInstructionDataDecoder, getSetSuspendedStateInstructionDataEncoder, getSetTunaPositionFlagsDiscriminatorBytes, getSetTunaPositionFlagsInstruction, getSetTunaPositionFlagsInstructionDataCodec, getSetTunaPositionFlagsInstructionDataDecoder, getSetTunaPositionFlagsInstructionDataEncoder, getTunaConfigAddress, getTunaConfigCodec, getTunaConfigDecoder, getTunaConfigDiscriminatorBytes, getTunaConfigEncoder, getTunaConfigSize, getTunaErrorMessage, getTunaPositionAddress, getTunaPositionCodec, getTunaPositionDecoder, getTunaPositionDiscriminatorBytes, getTunaPositionEncoder, getTunaPositionSize, getTunaPositionStateCodec, getTunaPositionStateDecoder, getTunaPositionStateEncoder, getUpdateMarketDiscriminatorBytes, getUpdateMarketInstruction, getUpdateMarketInstructionDataCodec, getUpdateMarketInstructionDataDecoder, getUpdateMarketInstructionDataEncoder, getUpdateVaultDiscriminatorBytes, getUpdateVaultInstruction, getUpdateVaultInstructionDataCodec, getUpdateVaultInstructionDataDecoder, getUpdateVaultInstructionDataEncoder, getVaultCodec, getVaultDecoder, getVaultDiscriminatorBytes, getVaultEncoder, getVaultSize, getWithdrawDiscriminatorBytes, getWithdrawInstruction, getWithdrawInstructionDataCodec, getWithdrawInstructionDataDecoder, getWithdrawInstructionDataEncoder, identifyTunaAccount, identifyTunaInstruction, isTunaError, lendingPositionAuthorityFilter, lendingPositionMintFilter, liquidatePositionFusionInstruction, liquidatePositionFusionInstructions, liquidatePositionOrcaInstruction, liquidatePositionOrcaInstructions, openLendingPositionAndDepositInstructions, openLendingPositionInstruction, openPositionFusionInstruction, openPositionOrcaInstruction, openPositionWithLiquidityFusionInstruction, openPositionWithLiquidityFusionInstructions, openPositionWithLiquidityOrcaInstruction, openPositionWithLiquidityOrcaInstructions, parseAddLiquidityFusionInstruction, parseAddLiquidityOrcaInstruction, parseClosePositionFusionInstruction, parseClosePositionOrcaInstruction, parseCollectAndCompoundFeesFusionInstruction, parseCollectAndCompoundFeesOrcaInstruction, parseCollectFeesFusionInstruction, parseCollectFeesOrcaInstruction, parseCollectRewardOrcaInstruction, parseCreateMarketInstruction, parseCreateTunaConfigInstruction, parseCreateVaultInstruction, parseDepositInstruction, parseLiquidatePositionFusionInstruction, parseLiquidatePositionOrcaInstruction, parseOpenLendingPositionInstruction, parseOpenPositionFusionInstruction, parseOpenPositionOrcaInstruction, parseOpenPositionWithLiquidityFusionInstruction, parseOpenPositionWithLiquidityOrcaInstruction, parseRemoveLiquidityFusionInstruction, parseRemoveLiquidityOrcaInstruction, parseRepayBadDebtInstruction, parseRepayDebtInstruction, parseSetAdminAuthorityInstruction, parseSetDefaultMaxPercentageOfLeftoversInstruction, parseSetDefaultMaxSwapSlippageInstruction, parseSetDefaultOraclePriceDeviationThresholdInstruction, parseSetFeeRecipientInstruction, parseSetLimitOrdersInstruction, parseSetLiquidatorAuthorityInstruction, parseSetOwnerAuthorityInstruction, parseSetSuspendedStateInstruction, parseSetTunaPositionFlagsInstruction, parseUpdateMarketInstruction, parseUpdateVaultInstruction, parseWithdrawInstruction, removeLiquidityFusionInstruction, removeLiquidityFusionInstructions, removeLiquidityOrcaInstruction, removeLiquidityOrcaInstructions, repayBadDebtInstruction, repayDebtInstruction, repayDebtInstructions, setLimitOrdersInstruction, tunaPositionAuthorityFilter, tunaPositionMarketMakerFilter, tunaPositionMintAFilter, tunaPositionMintBFilter, tunaPositionMintFilter, tunaPositionPoolFilter, updateMarketInstruction, updateVaultInstruction, withdrawInstruction, withdrawInstructions };
4823
+ export { ADD_LIQUIDITY_FUSION_DISCRIMINATOR, ADD_LIQUIDITY_ORCA_DISCRIMINATOR, AccountsType, type AccountsTypeArgs, type AddLiquidityFusionInput, type AddLiquidityFusionInstruction, type AddLiquidityFusionInstructionData, type AddLiquidityFusionInstructionDataArgs, type AddLiquidityFusionInstructionsArgs, type AddLiquidityOrcaInput, type AddLiquidityOrcaInstruction, type AddLiquidityOrcaInstructionData, type AddLiquidityOrcaInstructionDataArgs, type AddLiquidityOrcaInstructionsArgs, CLOSE_POSITION_FUSION_DISCRIMINATOR, CLOSE_POSITION_ORCA_DISCRIMINATOR, COLLECT_AND_COMPOUND_FEES_FUSION_DISCRIMINATOR, COLLECT_AND_COMPOUND_FEES_ORCA_DISCRIMINATOR, COLLECT_FEES_FUSION_DISCRIMINATOR, COLLECT_FEES_ORCA_DISCRIMINATOR, COLLECT_REWARD_ORCA_DISCRIMINATOR, COMPUTED_AMOUNT, CREATE_MARKET_DISCRIMINATOR, CREATE_TUNA_CONFIG_DISCRIMINATOR, CREATE_VAULT_DISCRIMINATOR, type ClosePositionFusionInput, type ClosePositionFusionInstruction, type ClosePositionFusionInstructionData, type ClosePositionFusionInstructionDataArgs, type ClosePositionOrcaInput, type ClosePositionOrcaInstruction, type ClosePositionOrcaInstructionData, type ClosePositionOrcaInstructionDataArgs, type ClosePositionWithLiquidityFusionInstructionArgs, type ClosePositionWithLiquidityOrcaInstructionArgs, type CollectAndCompoundFeesFusionInput, type CollectAndCompoundFeesFusionInstruction, type CollectAndCompoundFeesFusionInstructionData, type CollectAndCompoundFeesFusionInstructionDataArgs, type CollectAndCompoundFeesOrcaInput, type CollectAndCompoundFeesOrcaInstruction, type CollectAndCompoundFeesOrcaInstructionData, type CollectAndCompoundFeesOrcaInstructionDataArgs, type CollectFeesFusionInput, type CollectFeesFusionInstruction, type CollectFeesFusionInstructionData, type CollectFeesFusionInstructionDataArgs, type CollectFeesOrcaInput, type CollectFeesOrcaInstruction, type CollectFeesOrcaInstructionData, type CollectFeesOrcaInstructionDataArgs, type CollectRewardOrcaInput, type CollectRewardOrcaInstruction, type CollectRewardOrcaInstructionData, type CollectRewardOrcaInstructionDataArgs, type CreateAddressLookupTableResult, type CreateMarketInput, type CreateMarketInstruction, type CreateMarketInstructionData, type CreateMarketInstructionDataArgs, type CreateTunaConfigInput, type CreateTunaConfigInstruction, type CreateTunaConfigInstructionData, type CreateTunaConfigInstructionDataArgs, type CreateVaultInput, type CreateVaultInstruction, type CreateVaultInstructionData, type CreateVaultInstructionDataArgs, DEFAULT_ADDRESS, DEFAULT_MAX_AMOUNT_SLIPPAGE, DEFAULT_MAX_SWAP_SLIPPAGE, DEPOSIT_DISCRIMINATOR, type DepositInput, type DepositInstruction, type DepositInstructionData, type DepositInstructionDataArgs, FusionUtils, HUNDRED_PERCENT, type IncreaseLiquidityQuoteArgs, type IncreaseLiquidityQuoteResult, LENDING_POSITION_DISCRIMINATOR, LEVERAGE_ONE, LIQUIDATE_POSITION_FUSION_DISCRIMINATOR, LIQUIDATE_POSITION_ORCA_DISCRIMINATOR, type LendingPosition, type LendingPositionArgs, type LiquidatePositionFusionInput, type LiquidatePositionFusionInstruction, type LiquidatePositionFusionInstructionData, type LiquidatePositionFusionInstructionDataArgs, type LiquidatePositionOrcaInput, type LiquidatePositionOrcaInstruction, type LiquidatePositionOrcaInstructionData, type LiquidatePositionOrcaInstructionDataArgs, MARKET_DISCRIMINATOR, MAX_LEVERAGE, MAX_LIMIT_ORDER_EXECUTION_FEE, MAX_LIQUIDATION_FEE, MAX_LIQUIDATION_THRESHOLD, MAX_PROTOCOL_FEE, type Market, type MarketArgs, MarketMaker, type MarketMakerArgs, NATIVE_MINT, NO_STOP_LOSS, NO_TAKE_PROFIT, OPEN_LENDING_POSITION_DISCRIMINATOR, OPEN_POSITION_FUSION_DISCRIMINATOR, OPEN_POSITION_ORCA_DISCRIMINATOR, OPEN_POSITION_WITH_LIQUIDITY_FUSION_DISCRIMINATOR, OPEN_POSITION_WITH_LIQUIDITY_ORCA_DISCRIMINATOR, type OpenLendingPositionInput, type OpenLendingPositionInstruction, type OpenLendingPositionInstructionData, type OpenLendingPositionInstructionDataArgs, type OpenPositionFusionInput, type OpenPositionFusionInstruction, type OpenPositionFusionInstructionData, type OpenPositionFusionInstructionDataArgs, type OpenPositionOrcaInput, type OpenPositionOrcaInstruction, type OpenPositionOrcaInstructionData, type OpenPositionOrcaInstructionDataArgs, type OpenPositionWithLiquidityFusionInput, type OpenPositionWithLiquidityFusionInstruction, type OpenPositionWithLiquidityFusionInstructionData, type OpenPositionWithLiquidityFusionInstructionDataArgs, type OpenPositionWithLiquidityFusionInstructionsArgs, type OpenPositionWithLiquidityOrcaInput, type OpenPositionWithLiquidityOrcaInstruction, type OpenPositionWithLiquidityOrcaInstructionData, type OpenPositionWithLiquidityOrcaInstructionDataArgs, type OpenPositionWithLiquidityOrcaInstructionsArgs, OrcaUtils, type ParsedAddLiquidityFusionInstruction, type ParsedAddLiquidityOrcaInstruction, type ParsedClosePositionFusionInstruction, type ParsedClosePositionOrcaInstruction, type ParsedCollectAndCompoundFeesFusionInstruction, type ParsedCollectAndCompoundFeesOrcaInstruction, type ParsedCollectFeesFusionInstruction, type ParsedCollectFeesOrcaInstruction, type ParsedCollectRewardOrcaInstruction, type ParsedCreateMarketInstruction, type ParsedCreateTunaConfigInstruction, type ParsedCreateVaultInstruction, type ParsedDepositInstruction, type ParsedLiquidatePositionFusionInstruction, type ParsedLiquidatePositionOrcaInstruction, type ParsedOpenLendingPositionInstruction, type ParsedOpenPositionFusionInstruction, type ParsedOpenPositionOrcaInstruction, type ParsedOpenPositionWithLiquidityFusionInstruction, type ParsedOpenPositionWithLiquidityOrcaInstruction, type ParsedRebalancePositionFusionInstruction, type ParsedRebalancePositionOrcaInstruction, type ParsedRemoveLiquidityFusionInstruction, type ParsedRemoveLiquidityOrcaInstruction, type ParsedRepayBadDebtInstruction, type ParsedRepayDebtInstruction, type ParsedSetAdminAuthorityInstruction, type ParsedSetDefaultMaxPercentageOfLeftoversInstruction, type ParsedSetDefaultMaxSwapSlippageInstruction, type ParsedSetDefaultOraclePriceDeviationThresholdInstruction, type ParsedSetFeeRecipientInstruction, type ParsedSetLimitOrdersInstruction, type ParsedSetLiquidatorAuthorityInstruction, type ParsedSetOwnerAuthorityInstruction, type ParsedSetSuspendedStateInstruction, type ParsedSetTunaPositionFlagsInstruction, type ParsedSetTunaPositionRebalanceThresholdInstruction, type ParsedTunaInstruction, type ParsedUpdateMarketInstruction, type ParsedUpdateVaultInstruction, type ParsedWithdrawInstruction, REBALANCE_POSITION_FUSION_DISCRIMINATOR, REBALANCE_POSITION_ORCA_DISCRIMINATOR, REMOVE_LIQUIDITY_FUSION_DISCRIMINATOR, REMOVE_LIQUIDITY_ORCA_DISCRIMINATOR, REPAY_BAD_DEBT_DISCRIMINATOR, REPAY_DEBT_DISCRIMINATOR, type RebalancePositionFusionInput, type RebalancePositionFusionInstruction, type RebalancePositionFusionInstructionData, type RebalancePositionFusionInstructionDataArgs, type RebalancePositionOrcaInput, type RebalancePositionOrcaInstruction, type RebalancePositionOrcaInstructionData, type RebalancePositionOrcaInstructionDataArgs, type RemainingAccountsInfo, type RemainingAccountsInfoArgs, type RemainingAccountsSlice, type RemainingAccountsSliceArgs, type RemoveLiquidityFusionInput, type RemoveLiquidityFusionInstruction, type RemoveLiquidityFusionInstructionData, type RemoveLiquidityFusionInstructionDataArgs, type RemoveLiquidityFusionInstructionsArgs, type RemoveLiquidityOrcaInput, type RemoveLiquidityOrcaInstruction, type RemoveLiquidityOrcaInstructionData, type RemoveLiquidityOrcaInstructionDataArgs, type RemoveLiquidityOrcaInstructionsArgs, type RepayBadDebtInput, type RepayBadDebtInstruction, type RepayBadDebtInstructionData, type RepayBadDebtInstructionDataArgs, type RepayDebtInput, type RepayDebtInstruction, type RepayDebtInstructionData, type RepayDebtInstructionDataArgs, SET_ADMIN_AUTHORITY_DISCRIMINATOR, SET_DEFAULT_MAX_PERCENTAGE_OF_LEFTOVERS_DISCRIMINATOR, SET_DEFAULT_MAX_SWAP_SLIPPAGE_DISCRIMINATOR, SET_DEFAULT_ORACLE_PRICE_DEVIATION_THRESHOLD_DISCRIMINATOR, SET_FEE_RECIPIENT_DISCRIMINATOR, SET_LIMIT_ORDERS_DISCRIMINATOR, SET_LIQUIDATOR_AUTHORITY_DISCRIMINATOR, SET_OWNER_AUTHORITY_DISCRIMINATOR, SET_SUSPENDED_STATE_DISCRIMINATOR, SET_TUNA_POSITION_FLAGS_DISCRIMINATOR, SET_TUNA_POSITION_REBALANCE_THRESHOLD_DISCRIMINATOR, type SetAdminAuthorityInput, type SetAdminAuthorityInstruction, type SetAdminAuthorityInstructionData, type SetAdminAuthorityInstructionDataArgs, type SetDefaultMaxPercentageOfLeftoversInput, type SetDefaultMaxPercentageOfLeftoversInstruction, type SetDefaultMaxPercentageOfLeftoversInstructionData, type SetDefaultMaxPercentageOfLeftoversInstructionDataArgs, type SetDefaultMaxSwapSlippageInput, type SetDefaultMaxSwapSlippageInstruction, type SetDefaultMaxSwapSlippageInstructionData, type SetDefaultMaxSwapSlippageInstructionDataArgs, type SetDefaultOraclePriceDeviationThresholdInput, type SetDefaultOraclePriceDeviationThresholdInstruction, type SetDefaultOraclePriceDeviationThresholdInstructionData, type SetDefaultOraclePriceDeviationThresholdInstructionDataArgs, type SetFeeRecipientInput, type SetFeeRecipientInstruction, type SetFeeRecipientInstructionData, type SetFeeRecipientInstructionDataArgs, type SetLimitOrdersInput, type SetLimitOrdersInstruction, type SetLimitOrdersInstructionData, type SetLimitOrdersInstructionDataArgs, type SetLiquidatorAuthorityInput, type SetLiquidatorAuthorityInstruction, type SetLiquidatorAuthorityInstructionData, type SetLiquidatorAuthorityInstructionDataArgs, type SetOwnerAuthorityInput, type SetOwnerAuthorityInstruction, type SetOwnerAuthorityInstructionData, type SetOwnerAuthorityInstructionDataArgs, type SetSuspendedStateInput, type SetSuspendedStateInstruction, type SetSuspendedStateInstructionData, type SetSuspendedStateInstructionDataArgs, type SetTunaPositionFlagsInput, type SetTunaPositionFlagsInstruction, type SetTunaPositionFlagsInstructionData, type SetTunaPositionFlagsInstructionDataArgs, type SetTunaPositionRebalanceThresholdInput, type SetTunaPositionRebalanceThresholdInstruction, type SetTunaPositionRebalanceThresholdInstructionData, type SetTunaPositionRebalanceThresholdInstructionDataArgs, TUNA_CONFIG_DISCRIMINATOR, TUNA_ERROR__AMOUNT_SLIPPAGE_EXCEEDED, TUNA_ERROR__BAD_DEBT, TUNA_ERROR__INSUFFICIENT_LIQUIDITY, TUNA_ERROR__INTEREST_RATE_IS_OUT_OF_RANGE, TUNA_ERROR__INVALID_ACCOUNT_OWNER, TUNA_ERROR__INVALID_INSTRUCTION_ARGUMENTS, TUNA_ERROR__INVALID_MARKET_MAKER, TUNA_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH, TUNA_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION, TUNA_ERROR__INVALID_TICK_ARRAY_SEQUENCE, TUNA_ERROR__LEFTOVERS_EXCEEDED, TUNA_ERROR__LEVERAGE_IS_OUT_OF_RANGE, TUNA_ERROR__LIMIT_ORDER_EXECUTION_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDATION_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDATION_THRESHOLD_IS_OUT_OF_RANGE, TUNA_ERROR__LIQUIDITY_ZERO, TUNA_ERROR__MARKET_DEBT_LIMIT_EXCEEDED, TUNA_ERROR__MARKET_DISABLED, TUNA_ERROR__MATH_OVERFLOW, TUNA_ERROR__MATH_UNDERFLOW, TUNA_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK, TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_EXCEEDED, TUNA_ERROR__ORACLE_PRICE_DEVIATION_THRESHOLD_OUT_OF_RANGE, TUNA_ERROR__ORACLE_STALE_PRICE, TUNA_ERROR__PARTIAL_FILL_ERROR, TUNA_ERROR__POSITION_IS_HEALTHY, TUNA_ERROR__POSITION_IS_LIQUIDATED, TUNA_ERROR__POSITION_IS_UNHEALTHY, TUNA_ERROR__POSITION_NOT_EMPTY, TUNA_ERROR__PROTOCOL_FEE_IS_OUT_OF_RANGE, TUNA_ERROR__RAYDIUM_INVAILD_TICK_INDEX, TUNA_ERROR__RAYDIUM_INVALID_FIRST_TICK_ARRAY_ACCOUNT, TUNA_ERROR__RAYDIUM_INVALID_TICK_ARRAY, TUNA_ERROR__RAYDIUM_MAX_TOKEN_OVERFLOW, TUNA_ERROR__RAYDIUM_NOT_ENOUGH_TICK_ARRAY_ACCOUNT, TUNA_ERROR__RAYDIUM_SQRT_PRICE_LIMIT_OVERFLOW, TUNA_ERROR__RAYDIUM_ZERO_AMOUNT_SPECIFIED, TUNA_ERROR__REBALANCE_CONDITIONS_NOT_MET, TUNA_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE, TUNA_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT, TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE, TUNA_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE_LENGTH, TUNA_ERROR__REQUIRED_REMAINING_ACCOUNT_NOT_PROVIDED, TUNA_ERROR__SOLVER_FAILED_TO_FIND_ROOT, TUNA_ERROR__SQRT_PRICE_OUT_OF_BOUNDS, TUNA_ERROR__SUPPLY_LIMIT_EXCEEDED, TUNA_ERROR__SUSPENDED, TUNA_ERROR__SWAP_QUOTE_NOT_EQUAL_TO_ACTUAL_SWAP_AMOUNT, TUNA_ERROR__SWAP_SLIPPAGE_EXCEEDED, TUNA_ERROR__SWAP_SLIPPAGE_IS_OUT_OF_RANGE, TUNA_ERROR__SWAP_TO_POSITION_RATIO_ESTIMATION_FAILED, TUNA_ERROR__TICK_INDEX_OF_BOUNDS, TUNA_ERROR__TRANSFER_FEE_CALCULATION_ERROR, TUNA_ERROR__TYPE_CAST_OVERFLOW, TUNA_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT_DATA, TUNA_ERROR__UNABLE_TO_LOAD_ACCOUNT_DATA, TUNA_ERROR__UNEXPECTED_VALUE, TUNA_ERROR__UNSUPPORTED_TOKEN_MINT, TUNA_ERROR__VAULT_NOT_INITIALIZED, TUNA_ERROR__WITHDRAW_REQUEST_EXCEEDS_USER_BALANCE, TUNA_ERROR__ZERO_PRICE_RANGE, TUNA_ERROR__ZERO_TRADABLE_AMOUNT, TUNA_ERROR__ZERO_YIELD, TUNA_POSITION_DISCRIMINATOR, TUNA_POSITION_FLAGS_ALLOW_REBALANCING, TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD, TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE, TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A, TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B, TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A, TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_B, TUNA_PROGRAM_ADDRESS, TunaAccount, type TunaConfig, type TunaConfigArgs, type TunaError, TunaInstruction, type TunaPosition, type TunaPositionArgs, TunaPositionState, type TunaPositionStateArgs, UPDATE_MARKET_DISCRIMINATOR, UPDATE_VAULT_DISCRIMINATOR, type UpdateMarketInput, type UpdateMarketInstruction, type UpdateMarketInstructionData, type UpdateMarketInstructionDataArgs, type UpdateVaultInput, type UpdateVaultInstruction, type UpdateVaultInstructionData, type UpdateVaultInstructionDataArgs, VAULT_DISCRIMINATOR, type Vault, type VaultArgs, WITHDRAW_DISCRIMINATOR, WP_NFT_UPDATE_AUTH, type WithdrawInput, type WithdrawInstruction, type WithdrawInstructionData, type WithdrawInstructionDataArgs, addLiquidityFusionInstruction, addLiquidityFusionInstructions, addLiquidityOrcaInstruction, addLiquidityOrcaInstructions, calculateProtocolFee, closePositionFusionInstruction, closePositionOrcaInstruction, closePositionWithLiquidityFusionInstructions, closePositionWithLiquidityOrcaInstructions, collectAndCompoundFeesFusionInstruction, collectAndCompoundFeesFusionInstructions, collectAndCompoundFeesOrcaInstruction, collectAndCompoundFeesOrcaInstructions, collectFeesFusionInstruction, collectFeesFusionInstructions, collectFeesOrcaInstruction, collectFeesOrcaInstructions, createAddressLookupTableForMarketInstructions, createAddressLookupTableInstructions, createMarketInstruction, createTunaConfigInstruction, createVaultInstructions, decodeLendingPosition, decodeMarket, decodeTunaConfig, decodeTunaPosition, decodeVault, depositInstruction, depositInstructions, fetchAllLendingPosition, fetchAllLendingPositionWithFilter, fetchAllMarket, fetchAllMaybeLendingPosition, fetchAllMaybeMarket, fetchAllMaybeTunaConfig, fetchAllMaybeTunaPosition, fetchAllMaybeVault, fetchAllTunaConfig, fetchAllTunaPosition, fetchAllTunaPositionWithFilter, fetchAllVault, fetchLendingPosition, fetchMarket, fetchMaybeLendingPosition, fetchMaybeMarket, fetchMaybeTunaConfig, fetchMaybeTunaPosition, fetchMaybeVault, fetchTunaConfig, fetchTunaPosition, fetchVault, getAccountsTypeCodec, getAccountsTypeDecoder, getAccountsTypeEncoder, getAddLiquidityFusionDiscriminatorBytes, getAddLiquidityFusionInstruction, getAddLiquidityFusionInstructionDataCodec, getAddLiquidityFusionInstructionDataDecoder, getAddLiquidityFusionInstructionDataEncoder, getAddLiquidityOrcaDiscriminatorBytes, getAddLiquidityOrcaInstruction, getAddLiquidityOrcaInstructionDataCodec, getAddLiquidityOrcaInstructionDataDecoder, getAddLiquidityOrcaInstructionDataEncoder, getClosePositionFusionDiscriminatorBytes, getClosePositionFusionInstruction, getClosePositionFusionInstructionDataCodec, getClosePositionFusionInstructionDataDecoder, getClosePositionFusionInstructionDataEncoder, getClosePositionOrcaDiscriminatorBytes, getClosePositionOrcaInstruction, getClosePositionOrcaInstructionDataCodec, getClosePositionOrcaInstructionDataDecoder, getClosePositionOrcaInstructionDataEncoder, getCollectAndCompoundFeesFusionDiscriminatorBytes, getCollectAndCompoundFeesFusionInstruction, getCollectAndCompoundFeesFusionInstructionDataCodec, getCollectAndCompoundFeesFusionInstructionDataDecoder, getCollectAndCompoundFeesFusionInstructionDataEncoder, getCollectAndCompoundFeesOrcaDiscriminatorBytes, getCollectAndCompoundFeesOrcaInstruction, getCollectAndCompoundFeesOrcaInstructionDataCodec, getCollectAndCompoundFeesOrcaInstructionDataDecoder, getCollectAndCompoundFeesOrcaInstructionDataEncoder, getCollectFeesFusionDiscriminatorBytes, getCollectFeesFusionInstruction, getCollectFeesFusionInstructionDataCodec, getCollectFeesFusionInstructionDataDecoder, getCollectFeesFusionInstructionDataEncoder, getCollectFeesOrcaDiscriminatorBytes, getCollectFeesOrcaInstruction, getCollectFeesOrcaInstructionDataCodec, getCollectFeesOrcaInstructionDataDecoder, getCollectFeesOrcaInstructionDataEncoder, getCollectRewardOrcaDiscriminatorBytes, getCollectRewardOrcaInstruction, getCollectRewardOrcaInstructionDataCodec, getCollectRewardOrcaInstructionDataDecoder, getCollectRewardOrcaInstructionDataEncoder, getCreateAtaInstruction, getCreateAtaInstructions, getCreateMarketDiscriminatorBytes, getCreateMarketInstruction, getCreateMarketInstructionDataCodec, getCreateMarketInstructionDataDecoder, getCreateMarketInstructionDataEncoder, getCreateTunaConfigDiscriminatorBytes, getCreateTunaConfigInstruction, getCreateTunaConfigInstructionDataCodec, getCreateTunaConfigInstructionDataDecoder, getCreateTunaConfigInstructionDataEncoder, getCreateVaultDiscriminatorBytes, getCreateVaultInstruction, getCreateVaultInstructionDataCodec, getCreateVaultInstructionDataDecoder, getCreateVaultInstructionDataEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getLendingPositionAddress, getLendingPositionCodec, getLendingPositionDecoder, getLendingPositionDiscriminatorBytes, getLendingPositionEncoder, getLendingPositionSize, getLendingVaultAddress, getLiquidatePositionFusionDiscriminatorBytes, getLiquidatePositionFusionInstruction, getLiquidatePositionFusionInstructionDataCodec, getLiquidatePositionFusionInstructionDataDecoder, getLiquidatePositionFusionInstructionDataEncoder, getLiquidatePositionOrcaDiscriminatorBytes, getLiquidatePositionOrcaInstruction, getLiquidatePositionOrcaInstructionDataCodec, getLiquidatePositionOrcaInstructionDataDecoder, getLiquidatePositionOrcaInstructionDataEncoder, getLiquidityIncreaseQuote, getMarketAddress, getMarketCodec, getMarketDecoder, getMarketDiscriminatorBytes, getMarketEncoder, getMarketMakerCodec, getMarketMakerDecoder, getMarketMakerEncoder, getMarketSize, getOpenLendingPositionDiscriminatorBytes, getOpenLendingPositionInstruction, getOpenLendingPositionInstructionDataCodec, getOpenLendingPositionInstructionDataDecoder, getOpenLendingPositionInstructionDataEncoder, getOpenPositionFusionDiscriminatorBytes, getOpenPositionFusionInstruction, getOpenPositionFusionInstructionDataCodec, getOpenPositionFusionInstructionDataDecoder, getOpenPositionFusionInstructionDataEncoder, getOpenPositionOrcaDiscriminatorBytes, getOpenPositionOrcaInstruction, getOpenPositionOrcaInstructionDataCodec, getOpenPositionOrcaInstructionDataDecoder, getOpenPositionOrcaInstructionDataEncoder, getOpenPositionWithLiquidityFusionDiscriminatorBytes, getOpenPositionWithLiquidityFusionInstruction, getOpenPositionWithLiquidityFusionInstructionDataCodec, getOpenPositionWithLiquidityFusionInstructionDataDecoder, getOpenPositionWithLiquidityFusionInstructionDataEncoder, getOpenPositionWithLiquidityOrcaDiscriminatorBytes, getOpenPositionWithLiquidityOrcaInstruction, getOpenPositionWithLiquidityOrcaInstructionDataCodec, getOpenPositionWithLiquidityOrcaInstructionDataDecoder, getOpenPositionWithLiquidityOrcaInstructionDataEncoder, getRebalancePositionFusionDiscriminatorBytes, getRebalancePositionFusionInstruction, getRebalancePositionFusionInstructionDataCodec, getRebalancePositionFusionInstructionDataDecoder, getRebalancePositionFusionInstructionDataEncoder, getRebalancePositionOrcaDiscriminatorBytes, getRebalancePositionOrcaInstruction, getRebalancePositionOrcaInstructionDataCodec, getRebalancePositionOrcaInstructionDataDecoder, getRebalancePositionOrcaInstructionDataEncoder, getRemainingAccountsInfoCodec, getRemainingAccountsInfoDecoder, getRemainingAccountsInfoEncoder, getRemainingAccountsSliceCodec, getRemainingAccountsSliceDecoder, getRemainingAccountsSliceEncoder, getRemoveLiquidityFusionDiscriminatorBytes, getRemoveLiquidityFusionInstruction, getRemoveLiquidityFusionInstructionDataCodec, getRemoveLiquidityFusionInstructionDataDecoder, getRemoveLiquidityFusionInstructionDataEncoder, getRemoveLiquidityOrcaDiscriminatorBytes, getRemoveLiquidityOrcaInstruction, getRemoveLiquidityOrcaInstructionDataCodec, getRemoveLiquidityOrcaInstructionDataDecoder, getRemoveLiquidityOrcaInstructionDataEncoder, getRepayBadDebtDiscriminatorBytes, getRepayBadDebtInstruction, getRepayBadDebtInstructionDataCodec, getRepayBadDebtInstructionDataDecoder, getRepayBadDebtInstructionDataEncoder, getRepayDebtDiscriminatorBytes, getRepayDebtInstruction, getRepayDebtInstructionDataCodec, getRepayDebtInstructionDataDecoder, getRepayDebtInstructionDataEncoder, getSetAdminAuthorityDiscriminatorBytes, getSetAdminAuthorityInstruction, getSetAdminAuthorityInstructionDataCodec, getSetAdminAuthorityInstructionDataDecoder, getSetAdminAuthorityInstructionDataEncoder, getSetDefaultMaxPercentageOfLeftoversDiscriminatorBytes, getSetDefaultMaxPercentageOfLeftoversInstruction, getSetDefaultMaxPercentageOfLeftoversInstructionDataCodec, getSetDefaultMaxPercentageOfLeftoversInstructionDataDecoder, getSetDefaultMaxPercentageOfLeftoversInstructionDataEncoder, getSetDefaultMaxSwapSlippageDiscriminatorBytes, getSetDefaultMaxSwapSlippageInstruction, getSetDefaultMaxSwapSlippageInstructionDataCodec, getSetDefaultMaxSwapSlippageInstructionDataDecoder, getSetDefaultMaxSwapSlippageInstructionDataEncoder, getSetDefaultOraclePriceDeviationThresholdDiscriminatorBytes, getSetDefaultOraclePriceDeviationThresholdInstruction, getSetDefaultOraclePriceDeviationThresholdInstructionDataCodec, getSetDefaultOraclePriceDeviationThresholdInstructionDataDecoder, getSetDefaultOraclePriceDeviationThresholdInstructionDataEncoder, getSetFeeRecipientDiscriminatorBytes, getSetFeeRecipientInstruction, getSetFeeRecipientInstructionDataCodec, getSetFeeRecipientInstructionDataDecoder, getSetFeeRecipientInstructionDataEncoder, getSetLimitOrdersDiscriminatorBytes, getSetLimitOrdersInstruction, getSetLimitOrdersInstructionDataCodec, getSetLimitOrdersInstructionDataDecoder, getSetLimitOrdersInstructionDataEncoder, getSetLiquidatorAuthorityDiscriminatorBytes, getSetLiquidatorAuthorityInstruction, getSetLiquidatorAuthorityInstructionDataCodec, getSetLiquidatorAuthorityInstructionDataDecoder, getSetLiquidatorAuthorityInstructionDataEncoder, getSetOwnerAuthorityDiscriminatorBytes, getSetOwnerAuthorityInstruction, getSetOwnerAuthorityInstructionDataCodec, getSetOwnerAuthorityInstructionDataDecoder, getSetOwnerAuthorityInstructionDataEncoder, getSetSuspendedStateDiscriminatorBytes, getSetSuspendedStateInstruction, getSetSuspendedStateInstructionDataCodec, getSetSuspendedStateInstructionDataDecoder, getSetSuspendedStateInstructionDataEncoder, getSetTunaPositionFlagsDiscriminatorBytes, getSetTunaPositionFlagsInstruction, getSetTunaPositionFlagsInstructionDataCodec, getSetTunaPositionFlagsInstructionDataDecoder, getSetTunaPositionFlagsInstructionDataEncoder, getSetTunaPositionRebalanceThresholdDiscriminatorBytes, getSetTunaPositionRebalanceThresholdInstruction, getSetTunaPositionRebalanceThresholdInstructionDataCodec, getSetTunaPositionRebalanceThresholdInstructionDataDecoder, getSetTunaPositionRebalanceThresholdInstructionDataEncoder, getTunaConfigAddress, getTunaConfigCodec, getTunaConfigDecoder, getTunaConfigDiscriminatorBytes, getTunaConfigEncoder, getTunaConfigSize, getTunaErrorMessage, getTunaPositionAddress, getTunaPositionCodec, getTunaPositionDecoder, getTunaPositionDiscriminatorBytes, getTunaPositionEncoder, getTunaPositionSize, getTunaPositionStateCodec, getTunaPositionStateDecoder, getTunaPositionStateEncoder, getUpdateMarketDiscriminatorBytes, getUpdateMarketInstruction, getUpdateMarketInstructionDataCodec, getUpdateMarketInstructionDataDecoder, getUpdateMarketInstructionDataEncoder, getUpdateVaultDiscriminatorBytes, getUpdateVaultInstruction, getUpdateVaultInstructionDataCodec, getUpdateVaultInstructionDataDecoder, getUpdateVaultInstructionDataEncoder, getVaultCodec, getVaultDecoder, getVaultDiscriminatorBytes, getVaultEncoder, getVaultSize, getWithdrawDiscriminatorBytes, getWithdrawInstruction, getWithdrawInstructionDataCodec, getWithdrawInstructionDataDecoder, getWithdrawInstructionDataEncoder, identifyTunaAccount, identifyTunaInstruction, isTunaError, lendingPositionAuthorityFilter, lendingPositionMintFilter, liquidatePositionFusionInstruction, liquidatePositionFusionInstructions, liquidatePositionOrcaInstruction, liquidatePositionOrcaInstructions, openLendingPositionAndDepositInstructions, openLendingPositionInstruction, openPositionFusionInstruction, openPositionOrcaInstruction, openPositionWithLiquidityFusionInstruction, openPositionWithLiquidityFusionInstructions, openPositionWithLiquidityOrcaInstruction, openPositionWithLiquidityOrcaInstructions, parseAddLiquidityFusionInstruction, parseAddLiquidityOrcaInstruction, parseClosePositionFusionInstruction, parseClosePositionOrcaInstruction, parseCollectAndCompoundFeesFusionInstruction, parseCollectAndCompoundFeesOrcaInstruction, parseCollectFeesFusionInstruction, parseCollectFeesOrcaInstruction, parseCollectRewardOrcaInstruction, parseCreateMarketInstruction, parseCreateTunaConfigInstruction, parseCreateVaultInstruction, parseDepositInstruction, parseLiquidatePositionFusionInstruction, parseLiquidatePositionOrcaInstruction, parseOpenLendingPositionInstruction, parseOpenPositionFusionInstruction, parseOpenPositionOrcaInstruction, parseOpenPositionWithLiquidityFusionInstruction, parseOpenPositionWithLiquidityOrcaInstruction, parseRebalancePositionFusionInstruction, parseRebalancePositionOrcaInstruction, parseRemoveLiquidityFusionInstruction, parseRemoveLiquidityOrcaInstruction, parseRepayBadDebtInstruction, parseRepayDebtInstruction, parseSetAdminAuthorityInstruction, parseSetDefaultMaxPercentageOfLeftoversInstruction, parseSetDefaultMaxSwapSlippageInstruction, parseSetDefaultOraclePriceDeviationThresholdInstruction, parseSetFeeRecipientInstruction, parseSetLimitOrdersInstruction, parseSetLiquidatorAuthorityInstruction, parseSetOwnerAuthorityInstruction, parseSetSuspendedStateInstruction, parseSetTunaPositionFlagsInstruction, parseSetTunaPositionRebalanceThresholdInstruction, parseUpdateMarketInstruction, parseUpdateVaultInstruction, parseWithdrawInstruction, rebalancePositionFusionInstruction, rebalancePositionFusionInstructions, rebalancePositionOrcaInstruction, rebalancePositionOrcaInstructions, removeLiquidityFusionInstruction, removeLiquidityFusionInstructions, removeLiquidityOrcaInstruction, removeLiquidityOrcaInstructions, repayBadDebtInstruction, repayDebtInstruction, repayDebtInstructions, setLimitOrdersInstruction, tunaPositionAuthorityFilter, tunaPositionMarketMakerFilter, tunaPositionMintAFilter, tunaPositionMintBFilter, tunaPositionMintFilter, tunaPositionPoolFilter, updateMarketInstruction, updateVaultInstruction, withdrawInstruction, withdrawInstructions };