@stabbleorg/mclmm-sdk 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -249,6 +249,9 @@ __export(generated_exports, {
249
249
  getAmmConfigSize: () => getAmmConfigSize,
250
250
  getAmmV3ErrorMessage: () => getAmmV3ErrorMessage,
251
251
  getClosePositionDiscriminatorBytes: () => getClosePositionDiscriminatorBytes,
252
+ getClosePositionEventCodec: () => getClosePositionEventCodec,
253
+ getClosePositionEventDecoder: () => getClosePositionEventDecoder,
254
+ getClosePositionEventEncoder: () => getClosePositionEventEncoder,
252
255
  getClosePositionInstruction: () => getClosePositionInstruction,
253
256
  getClosePositionInstructionAsync: () => getClosePositionInstructionAsync,
254
257
  getClosePositionInstructionDataCodec: () => getClosePositionInstructionDataCodec,
@@ -553,454 +556,469 @@ function getAmmConfigSize() {
553
556
  }
554
557
 
555
558
  // src/generated/accounts/observationState.ts
556
- var import_kit17 = require("@solana/kit");
559
+ var import_kit18 = require("@solana/kit");
557
560
 
558
- // src/generated/types/collectPersonalFeeEvent.ts
561
+ // src/generated/types/closePositionEvent.ts
559
562
  var import_kit2 = require("@solana/kit");
560
- function getCollectPersonalFeeEventEncoder() {
561
- return (0, import_kit2.getStructEncoder)([
562
- ["positionNftMint", (0, import_kit2.getAddressEncoder)()],
563
- ["recipientTokenAccount0", (0, import_kit2.getAddressEncoder)()],
564
- ["recipientTokenAccount1", (0, import_kit2.getAddressEncoder)()],
565
- ["amount0", (0, import_kit2.getU64Encoder)()],
566
- ["amount1", (0, import_kit2.getU64Encoder)()]
567
- ]);
563
+ function getClosePositionEventEncoder() {
564
+ return (0, import_kit2.getStructEncoder)([["positionKey", (0, import_kit2.getAddressEncoder)()]]);
568
565
  }
569
- function getCollectPersonalFeeEventDecoder() {
570
- return (0, import_kit2.getStructDecoder)([
571
- ["positionNftMint", (0, import_kit2.getAddressDecoder)()],
572
- ["recipientTokenAccount0", (0, import_kit2.getAddressDecoder)()],
573
- ["recipientTokenAccount1", (0, import_kit2.getAddressDecoder)()],
574
- ["amount0", (0, import_kit2.getU64Decoder)()],
575
- ["amount1", (0, import_kit2.getU64Decoder)()]
576
- ]);
566
+ function getClosePositionEventDecoder() {
567
+ return (0, import_kit2.getStructDecoder)([["positionKey", (0, import_kit2.getAddressDecoder)()]]);
577
568
  }
578
- function getCollectPersonalFeeEventCodec() {
569
+ function getClosePositionEventCodec() {
579
570
  return (0, import_kit2.combineCodec)(
580
- getCollectPersonalFeeEventEncoder(),
581
- getCollectPersonalFeeEventDecoder()
571
+ getClosePositionEventEncoder(),
572
+ getClosePositionEventDecoder()
582
573
  );
583
574
  }
584
575
 
585
- // src/generated/types/collectProtocolFeeEvent.ts
576
+ // src/generated/types/collectPersonalFeeEvent.ts
586
577
  var import_kit3 = require("@solana/kit");
587
- function getCollectProtocolFeeEventEncoder() {
578
+ function getCollectPersonalFeeEventEncoder() {
588
579
  return (0, import_kit3.getStructEncoder)([
589
- ["poolState", (0, import_kit3.getAddressEncoder)()],
580
+ ["positionNftMint", (0, import_kit3.getAddressEncoder)()],
590
581
  ["recipientTokenAccount0", (0, import_kit3.getAddressEncoder)()],
591
582
  ["recipientTokenAccount1", (0, import_kit3.getAddressEncoder)()],
592
583
  ["amount0", (0, import_kit3.getU64Encoder)()],
593
584
  ["amount1", (0, import_kit3.getU64Encoder)()]
594
585
  ]);
595
586
  }
596
- function getCollectProtocolFeeEventDecoder() {
587
+ function getCollectPersonalFeeEventDecoder() {
597
588
  return (0, import_kit3.getStructDecoder)([
598
- ["poolState", (0, import_kit3.getAddressDecoder)()],
589
+ ["positionNftMint", (0, import_kit3.getAddressDecoder)()],
599
590
  ["recipientTokenAccount0", (0, import_kit3.getAddressDecoder)()],
600
591
  ["recipientTokenAccount1", (0, import_kit3.getAddressDecoder)()],
601
592
  ["amount0", (0, import_kit3.getU64Decoder)()],
602
593
  ["amount1", (0, import_kit3.getU64Decoder)()]
603
594
  ]);
604
595
  }
605
- function getCollectProtocolFeeEventCodec() {
596
+ function getCollectPersonalFeeEventCodec() {
606
597
  return (0, import_kit3.combineCodec)(
598
+ getCollectPersonalFeeEventEncoder(),
599
+ getCollectPersonalFeeEventDecoder()
600
+ );
601
+ }
602
+
603
+ // src/generated/types/collectProtocolFeeEvent.ts
604
+ var import_kit4 = require("@solana/kit");
605
+ function getCollectProtocolFeeEventEncoder() {
606
+ return (0, import_kit4.getStructEncoder)([
607
+ ["poolState", (0, import_kit4.getAddressEncoder)()],
608
+ ["recipientTokenAccount0", (0, import_kit4.getAddressEncoder)()],
609
+ ["recipientTokenAccount1", (0, import_kit4.getAddressEncoder)()],
610
+ ["amount0", (0, import_kit4.getU64Encoder)()],
611
+ ["amount1", (0, import_kit4.getU64Encoder)()]
612
+ ]);
613
+ }
614
+ function getCollectProtocolFeeEventDecoder() {
615
+ return (0, import_kit4.getStructDecoder)([
616
+ ["poolState", (0, import_kit4.getAddressDecoder)()],
617
+ ["recipientTokenAccount0", (0, import_kit4.getAddressDecoder)()],
618
+ ["recipientTokenAccount1", (0, import_kit4.getAddressDecoder)()],
619
+ ["amount0", (0, import_kit4.getU64Decoder)()],
620
+ ["amount1", (0, import_kit4.getU64Decoder)()]
621
+ ]);
622
+ }
623
+ function getCollectProtocolFeeEventCodec() {
624
+ return (0, import_kit4.combineCodec)(
607
625
  getCollectProtocolFeeEventEncoder(),
608
626
  getCollectProtocolFeeEventDecoder()
609
627
  );
610
628
  }
611
629
 
612
630
  // src/generated/types/configChangeEvent.ts
613
- var import_kit4 = require("@solana/kit");
631
+ var import_kit5 = require("@solana/kit");
614
632
  function getConfigChangeEventEncoder() {
615
- return (0, import_kit4.getStructEncoder)([
616
- ["index", (0, import_kit4.getU16Encoder)()],
617
- ["owner", (0, import_kit4.getAddressEncoder)()],
618
- ["protocolFeeRate", (0, import_kit4.getU32Encoder)()],
619
- ["tradeFeeRate", (0, import_kit4.getU32Encoder)()],
620
- ["tickSpacing", (0, import_kit4.getU16Encoder)()],
621
- ["fundFeeRate", (0, import_kit4.getU32Encoder)()],
622
- ["fundOwner", (0, import_kit4.getAddressEncoder)()]
633
+ return (0, import_kit5.getStructEncoder)([
634
+ ["index", (0, import_kit5.getU16Encoder)()],
635
+ ["owner", (0, import_kit5.getAddressEncoder)()],
636
+ ["protocolFeeRate", (0, import_kit5.getU32Encoder)()],
637
+ ["tradeFeeRate", (0, import_kit5.getU32Encoder)()],
638
+ ["tickSpacing", (0, import_kit5.getU16Encoder)()],
639
+ ["fundFeeRate", (0, import_kit5.getU32Encoder)()],
640
+ ["fundOwner", (0, import_kit5.getAddressEncoder)()]
623
641
  ]);
624
642
  }
625
643
  function getConfigChangeEventDecoder() {
626
- return (0, import_kit4.getStructDecoder)([
627
- ["index", (0, import_kit4.getU16Decoder)()],
628
- ["owner", (0, import_kit4.getAddressDecoder)()],
629
- ["protocolFeeRate", (0, import_kit4.getU32Decoder)()],
630
- ["tradeFeeRate", (0, import_kit4.getU32Decoder)()],
631
- ["tickSpacing", (0, import_kit4.getU16Decoder)()],
632
- ["fundFeeRate", (0, import_kit4.getU32Decoder)()],
633
- ["fundOwner", (0, import_kit4.getAddressDecoder)()]
644
+ return (0, import_kit5.getStructDecoder)([
645
+ ["index", (0, import_kit5.getU16Decoder)()],
646
+ ["owner", (0, import_kit5.getAddressDecoder)()],
647
+ ["protocolFeeRate", (0, import_kit5.getU32Decoder)()],
648
+ ["tradeFeeRate", (0, import_kit5.getU32Decoder)()],
649
+ ["tickSpacing", (0, import_kit5.getU16Decoder)()],
650
+ ["fundFeeRate", (0, import_kit5.getU32Decoder)()],
651
+ ["fundOwner", (0, import_kit5.getAddressDecoder)()]
634
652
  ]);
635
653
  }
636
654
  function getConfigChangeEventCodec() {
637
- return (0, import_kit4.combineCodec)(
655
+ return (0, import_kit5.combineCodec)(
638
656
  getConfigChangeEventEncoder(),
639
657
  getConfigChangeEventDecoder()
640
658
  );
641
659
  }
642
660
 
643
661
  // src/generated/types/createPersonalPositionEvent.ts
644
- var import_kit5 = require("@solana/kit");
662
+ var import_kit6 = require("@solana/kit");
645
663
  function getCreatePersonalPositionEventEncoder() {
646
- return (0, import_kit5.getStructEncoder)([
647
- ["poolState", (0, import_kit5.getAddressEncoder)()],
648
- ["personalPosition", (0, import_kit5.getAddressEncoder)()],
649
- ["nftMint", (0, import_kit5.getAddressEncoder)()],
650
- ["minter", (0, import_kit5.getAddressEncoder)()],
651
- ["nftOwner", (0, import_kit5.getAddressEncoder)()],
652
- ["tickLowerIndex", (0, import_kit5.getI32Encoder)()],
653
- ["tickUpperIndex", (0, import_kit5.getI32Encoder)()],
654
- ["liquidity", (0, import_kit5.getU128Encoder)()],
655
- ["depositAmount0", (0, import_kit5.getU64Encoder)()],
656
- ["depositAmount1", (0, import_kit5.getU64Encoder)()],
657
- ["depositAmount0TransferFee", (0, import_kit5.getU64Encoder)()],
658
- ["depositAmount1TransferFee", (0, import_kit5.getU64Encoder)()]
664
+ return (0, import_kit6.getStructEncoder)([
665
+ ["poolState", (0, import_kit6.getAddressEncoder)()],
666
+ ["personalPosition", (0, import_kit6.getAddressEncoder)()],
667
+ ["nftMint", (0, import_kit6.getAddressEncoder)()],
668
+ ["minter", (0, import_kit6.getAddressEncoder)()],
669
+ ["nftOwner", (0, import_kit6.getAddressEncoder)()],
670
+ ["tickLowerIndex", (0, import_kit6.getI32Encoder)()],
671
+ ["tickUpperIndex", (0, import_kit6.getI32Encoder)()],
672
+ ["liquidity", (0, import_kit6.getU128Encoder)()],
673
+ ["depositAmount0", (0, import_kit6.getU64Encoder)()],
674
+ ["depositAmount1", (0, import_kit6.getU64Encoder)()],
675
+ ["depositAmount0TransferFee", (0, import_kit6.getU64Encoder)()],
676
+ ["depositAmount1TransferFee", (0, import_kit6.getU64Encoder)()]
659
677
  ]);
660
678
  }
661
679
  function getCreatePersonalPositionEventDecoder() {
662
- return (0, import_kit5.getStructDecoder)([
663
- ["poolState", (0, import_kit5.getAddressDecoder)()],
664
- ["personalPosition", (0, import_kit5.getAddressDecoder)()],
665
- ["nftMint", (0, import_kit5.getAddressDecoder)()],
666
- ["minter", (0, import_kit5.getAddressDecoder)()],
667
- ["nftOwner", (0, import_kit5.getAddressDecoder)()],
668
- ["tickLowerIndex", (0, import_kit5.getI32Decoder)()],
669
- ["tickUpperIndex", (0, import_kit5.getI32Decoder)()],
670
- ["liquidity", (0, import_kit5.getU128Decoder)()],
671
- ["depositAmount0", (0, import_kit5.getU64Decoder)()],
672
- ["depositAmount1", (0, import_kit5.getU64Decoder)()],
673
- ["depositAmount0TransferFee", (0, import_kit5.getU64Decoder)()],
674
- ["depositAmount1TransferFee", (0, import_kit5.getU64Decoder)()]
680
+ return (0, import_kit6.getStructDecoder)([
681
+ ["poolState", (0, import_kit6.getAddressDecoder)()],
682
+ ["personalPosition", (0, import_kit6.getAddressDecoder)()],
683
+ ["nftMint", (0, import_kit6.getAddressDecoder)()],
684
+ ["minter", (0, import_kit6.getAddressDecoder)()],
685
+ ["nftOwner", (0, import_kit6.getAddressDecoder)()],
686
+ ["tickLowerIndex", (0, import_kit6.getI32Decoder)()],
687
+ ["tickUpperIndex", (0, import_kit6.getI32Decoder)()],
688
+ ["liquidity", (0, import_kit6.getU128Decoder)()],
689
+ ["depositAmount0", (0, import_kit6.getU64Decoder)()],
690
+ ["depositAmount1", (0, import_kit6.getU64Decoder)()],
691
+ ["depositAmount0TransferFee", (0, import_kit6.getU64Decoder)()],
692
+ ["depositAmount1TransferFee", (0, import_kit6.getU64Decoder)()]
675
693
  ]);
676
694
  }
677
695
  function getCreatePersonalPositionEventCodec() {
678
- return (0, import_kit5.combineCodec)(
696
+ return (0, import_kit6.combineCodec)(
679
697
  getCreatePersonalPositionEventEncoder(),
680
698
  getCreatePersonalPositionEventDecoder()
681
699
  );
682
700
  }
683
701
 
684
702
  // src/generated/types/decreaseLiquidityEvent.ts
685
- var import_kit6 = require("@solana/kit");
703
+ var import_kit7 = require("@solana/kit");
686
704
  function getDecreaseLiquidityEventEncoder() {
687
- return (0, import_kit6.getStructEncoder)([
688
- ["positionNftMint", (0, import_kit6.getAddressEncoder)()],
689
- ["liquidity", (0, import_kit6.getU128Encoder)()],
690
- ["decreaseAmount0", (0, import_kit6.getU64Encoder)()],
691
- ["decreaseAmount1", (0, import_kit6.getU64Encoder)()],
692
- ["feeAmount0", (0, import_kit6.getU64Encoder)()],
693
- ["feeAmount1", (0, import_kit6.getU64Encoder)()],
694
- ["rewardAmounts", (0, import_kit6.getArrayEncoder)((0, import_kit6.getU64Encoder)(), { size: 3 })],
695
- ["transferFee0", (0, import_kit6.getU64Encoder)()],
696
- ["transferFee1", (0, import_kit6.getU64Encoder)()]
705
+ return (0, import_kit7.getStructEncoder)([
706
+ ["positionNftMint", (0, import_kit7.getAddressEncoder)()],
707
+ ["liquidity", (0, import_kit7.getU128Encoder)()],
708
+ ["decreaseAmount0", (0, import_kit7.getU64Encoder)()],
709
+ ["decreaseAmount1", (0, import_kit7.getU64Encoder)()],
710
+ ["feeAmount0", (0, import_kit7.getU64Encoder)()],
711
+ ["feeAmount1", (0, import_kit7.getU64Encoder)()],
712
+ ["rewardAmounts", (0, import_kit7.getArrayEncoder)((0, import_kit7.getU64Encoder)(), { size: 3 })],
713
+ ["transferFee0", (0, import_kit7.getU64Encoder)()],
714
+ ["transferFee1", (0, import_kit7.getU64Encoder)()]
697
715
  ]);
698
716
  }
699
717
  function getDecreaseLiquidityEventDecoder() {
700
- return (0, import_kit6.getStructDecoder)([
701
- ["positionNftMint", (0, import_kit6.getAddressDecoder)()],
702
- ["liquidity", (0, import_kit6.getU128Decoder)()],
703
- ["decreaseAmount0", (0, import_kit6.getU64Decoder)()],
704
- ["decreaseAmount1", (0, import_kit6.getU64Decoder)()],
705
- ["feeAmount0", (0, import_kit6.getU64Decoder)()],
706
- ["feeAmount1", (0, import_kit6.getU64Decoder)()],
707
- ["rewardAmounts", (0, import_kit6.getArrayDecoder)((0, import_kit6.getU64Decoder)(), { size: 3 })],
708
- ["transferFee0", (0, import_kit6.getU64Decoder)()],
709
- ["transferFee1", (0, import_kit6.getU64Decoder)()]
718
+ return (0, import_kit7.getStructDecoder)([
719
+ ["positionNftMint", (0, import_kit7.getAddressDecoder)()],
720
+ ["liquidity", (0, import_kit7.getU128Decoder)()],
721
+ ["decreaseAmount0", (0, import_kit7.getU64Decoder)()],
722
+ ["decreaseAmount1", (0, import_kit7.getU64Decoder)()],
723
+ ["feeAmount0", (0, import_kit7.getU64Decoder)()],
724
+ ["feeAmount1", (0, import_kit7.getU64Decoder)()],
725
+ ["rewardAmounts", (0, import_kit7.getArrayDecoder)((0, import_kit7.getU64Decoder)(), { size: 3 })],
726
+ ["transferFee0", (0, import_kit7.getU64Decoder)()],
727
+ ["transferFee1", (0, import_kit7.getU64Decoder)()]
710
728
  ]);
711
729
  }
712
730
  function getDecreaseLiquidityEventCodec() {
713
- return (0, import_kit6.combineCodec)(
731
+ return (0, import_kit7.combineCodec)(
714
732
  getDecreaseLiquidityEventEncoder(),
715
733
  getDecreaseLiquidityEventDecoder()
716
734
  );
717
735
  }
718
736
 
719
737
  // src/generated/types/increaseLiquidityEvent.ts
720
- var import_kit7 = require("@solana/kit");
738
+ var import_kit8 = require("@solana/kit");
721
739
  function getIncreaseLiquidityEventEncoder() {
722
- return (0, import_kit7.getStructEncoder)([
723
- ["positionNftMint", (0, import_kit7.getAddressEncoder)()],
724
- ["liquidity", (0, import_kit7.getU128Encoder)()],
725
- ["amount0", (0, import_kit7.getU64Encoder)()],
726
- ["amount1", (0, import_kit7.getU64Encoder)()],
727
- ["amount0TransferFee", (0, import_kit7.getU64Encoder)()],
728
- ["amount1TransferFee", (0, import_kit7.getU64Encoder)()]
740
+ return (0, import_kit8.getStructEncoder)([
741
+ ["positionNftMint", (0, import_kit8.getAddressEncoder)()],
742
+ ["liquidity", (0, import_kit8.getU128Encoder)()],
743
+ ["amount0", (0, import_kit8.getU64Encoder)()],
744
+ ["amount1", (0, import_kit8.getU64Encoder)()],
745
+ ["amount0TransferFee", (0, import_kit8.getU64Encoder)()],
746
+ ["amount1TransferFee", (0, import_kit8.getU64Encoder)()]
729
747
  ]);
730
748
  }
731
749
  function getIncreaseLiquidityEventDecoder() {
732
- return (0, import_kit7.getStructDecoder)([
733
- ["positionNftMint", (0, import_kit7.getAddressDecoder)()],
734
- ["liquidity", (0, import_kit7.getU128Decoder)()],
735
- ["amount0", (0, import_kit7.getU64Decoder)()],
736
- ["amount1", (0, import_kit7.getU64Decoder)()],
737
- ["amount0TransferFee", (0, import_kit7.getU64Decoder)()],
738
- ["amount1TransferFee", (0, import_kit7.getU64Decoder)()]
750
+ return (0, import_kit8.getStructDecoder)([
751
+ ["positionNftMint", (0, import_kit8.getAddressDecoder)()],
752
+ ["liquidity", (0, import_kit8.getU128Decoder)()],
753
+ ["amount0", (0, import_kit8.getU64Decoder)()],
754
+ ["amount1", (0, import_kit8.getU64Decoder)()],
755
+ ["amount0TransferFee", (0, import_kit8.getU64Decoder)()],
756
+ ["amount1TransferFee", (0, import_kit8.getU64Decoder)()]
739
757
  ]);
740
758
  }
741
759
  function getIncreaseLiquidityEventCodec() {
742
- return (0, import_kit7.combineCodec)(
760
+ return (0, import_kit8.combineCodec)(
743
761
  getIncreaseLiquidityEventEncoder(),
744
762
  getIncreaseLiquidityEventDecoder()
745
763
  );
746
764
  }
747
765
 
748
766
  // src/generated/types/liquidityCalculateEvent.ts
749
- var import_kit8 = require("@solana/kit");
767
+ var import_kit9 = require("@solana/kit");
750
768
  function getLiquidityCalculateEventEncoder() {
751
- return (0, import_kit8.getStructEncoder)([
752
- ["poolLiquidity", (0, import_kit8.getU128Encoder)()],
753
- ["poolSqrtPriceX64", (0, import_kit8.getU128Encoder)()],
754
- ["poolTick", (0, import_kit8.getI32Encoder)()],
755
- ["calcAmount0", (0, import_kit8.getU64Encoder)()],
756
- ["calcAmount1", (0, import_kit8.getU64Encoder)()],
757
- ["tradeFeeOwed0", (0, import_kit8.getU64Encoder)()],
758
- ["tradeFeeOwed1", (0, import_kit8.getU64Encoder)()],
759
- ["transferFee0", (0, import_kit8.getU64Encoder)()],
760
- ["transferFee1", (0, import_kit8.getU64Encoder)()]
769
+ return (0, import_kit9.getStructEncoder)([
770
+ ["poolLiquidity", (0, import_kit9.getU128Encoder)()],
771
+ ["poolSqrtPriceX64", (0, import_kit9.getU128Encoder)()],
772
+ ["poolTick", (0, import_kit9.getI32Encoder)()],
773
+ ["calcAmount0", (0, import_kit9.getU64Encoder)()],
774
+ ["calcAmount1", (0, import_kit9.getU64Encoder)()],
775
+ ["tradeFeeOwed0", (0, import_kit9.getU64Encoder)()],
776
+ ["tradeFeeOwed1", (0, import_kit9.getU64Encoder)()],
777
+ ["transferFee0", (0, import_kit9.getU64Encoder)()],
778
+ ["transferFee1", (0, import_kit9.getU64Encoder)()]
761
779
  ]);
762
780
  }
763
781
  function getLiquidityCalculateEventDecoder() {
764
- return (0, import_kit8.getStructDecoder)([
765
- ["poolLiquidity", (0, import_kit8.getU128Decoder)()],
766
- ["poolSqrtPriceX64", (0, import_kit8.getU128Decoder)()],
767
- ["poolTick", (0, import_kit8.getI32Decoder)()],
768
- ["calcAmount0", (0, import_kit8.getU64Decoder)()],
769
- ["calcAmount1", (0, import_kit8.getU64Decoder)()],
770
- ["tradeFeeOwed0", (0, import_kit8.getU64Decoder)()],
771
- ["tradeFeeOwed1", (0, import_kit8.getU64Decoder)()],
772
- ["transferFee0", (0, import_kit8.getU64Decoder)()],
773
- ["transferFee1", (0, import_kit8.getU64Decoder)()]
782
+ return (0, import_kit9.getStructDecoder)([
783
+ ["poolLiquidity", (0, import_kit9.getU128Decoder)()],
784
+ ["poolSqrtPriceX64", (0, import_kit9.getU128Decoder)()],
785
+ ["poolTick", (0, import_kit9.getI32Decoder)()],
786
+ ["calcAmount0", (0, import_kit9.getU64Decoder)()],
787
+ ["calcAmount1", (0, import_kit9.getU64Decoder)()],
788
+ ["tradeFeeOwed0", (0, import_kit9.getU64Decoder)()],
789
+ ["tradeFeeOwed1", (0, import_kit9.getU64Decoder)()],
790
+ ["transferFee0", (0, import_kit9.getU64Decoder)()],
791
+ ["transferFee1", (0, import_kit9.getU64Decoder)()]
774
792
  ]);
775
793
  }
776
794
  function getLiquidityCalculateEventCodec() {
777
- return (0, import_kit8.combineCodec)(
795
+ return (0, import_kit9.combineCodec)(
778
796
  getLiquidityCalculateEventEncoder(),
779
797
  getLiquidityCalculateEventDecoder()
780
798
  );
781
799
  }
782
800
 
783
801
  // src/generated/types/liquidityChangeEvent.ts
784
- var import_kit9 = require("@solana/kit");
802
+ var import_kit10 = require("@solana/kit");
785
803
  function getLiquidityChangeEventEncoder() {
786
- return (0, import_kit9.getStructEncoder)([
787
- ["poolState", (0, import_kit9.getAddressEncoder)()],
788
- ["tick", (0, import_kit9.getI32Encoder)()],
789
- ["tickLower", (0, import_kit9.getI32Encoder)()],
790
- ["tickUpper", (0, import_kit9.getI32Encoder)()],
791
- ["liquidityBefore", (0, import_kit9.getU128Encoder)()],
792
- ["liquidityAfter", (0, import_kit9.getU128Encoder)()]
804
+ return (0, import_kit10.getStructEncoder)([
805
+ ["poolState", (0, import_kit10.getAddressEncoder)()],
806
+ ["tick", (0, import_kit10.getI32Encoder)()],
807
+ ["tickLower", (0, import_kit10.getI32Encoder)()],
808
+ ["tickUpper", (0, import_kit10.getI32Encoder)()],
809
+ ["liquidityBefore", (0, import_kit10.getU128Encoder)()],
810
+ ["liquidityAfter", (0, import_kit10.getU128Encoder)()]
793
811
  ]);
794
812
  }
795
813
  function getLiquidityChangeEventDecoder() {
796
- return (0, import_kit9.getStructDecoder)([
797
- ["poolState", (0, import_kit9.getAddressDecoder)()],
798
- ["tick", (0, import_kit9.getI32Decoder)()],
799
- ["tickLower", (0, import_kit9.getI32Decoder)()],
800
- ["tickUpper", (0, import_kit9.getI32Decoder)()],
801
- ["liquidityBefore", (0, import_kit9.getU128Decoder)()],
802
- ["liquidityAfter", (0, import_kit9.getU128Decoder)()]
814
+ return (0, import_kit10.getStructDecoder)([
815
+ ["poolState", (0, import_kit10.getAddressDecoder)()],
816
+ ["tick", (0, import_kit10.getI32Decoder)()],
817
+ ["tickLower", (0, import_kit10.getI32Decoder)()],
818
+ ["tickUpper", (0, import_kit10.getI32Decoder)()],
819
+ ["liquidityBefore", (0, import_kit10.getU128Decoder)()],
820
+ ["liquidityAfter", (0, import_kit10.getU128Decoder)()]
803
821
  ]);
804
822
  }
805
823
  function getLiquidityChangeEventCodec() {
806
- return (0, import_kit9.combineCodec)(
824
+ return (0, import_kit10.combineCodec)(
807
825
  getLiquidityChangeEventEncoder(),
808
826
  getLiquidityChangeEventDecoder()
809
827
  );
810
828
  }
811
829
 
812
830
  // src/generated/types/observation.ts
813
- var import_kit10 = require("@solana/kit");
831
+ var import_kit11 = require("@solana/kit");
814
832
  function getObservationEncoder() {
815
- return (0, import_kit10.getStructEncoder)([
816
- ["blockTimestamp", (0, import_kit10.getU32Encoder)()],
817
- ["tickCumulative", (0, import_kit10.getI64Encoder)()],
818
- ["padding", (0, import_kit10.getArrayEncoder)((0, import_kit10.getU64Encoder)(), { size: 4 })]
833
+ return (0, import_kit11.getStructEncoder)([
834
+ ["blockTimestamp", (0, import_kit11.getU32Encoder)()],
835
+ ["tickCumulative", (0, import_kit11.getI64Encoder)()],
836
+ ["padding", (0, import_kit11.getArrayEncoder)((0, import_kit11.getU64Encoder)(), { size: 4 })]
819
837
  ]);
820
838
  }
821
839
  function getObservationDecoder() {
822
- return (0, import_kit10.getStructDecoder)([
823
- ["blockTimestamp", (0, import_kit10.getU32Decoder)()],
824
- ["tickCumulative", (0, import_kit10.getI64Decoder)()],
825
- ["padding", (0, import_kit10.getArrayDecoder)((0, import_kit10.getU64Decoder)(), { size: 4 })]
840
+ return (0, import_kit11.getStructDecoder)([
841
+ ["blockTimestamp", (0, import_kit11.getU32Decoder)()],
842
+ ["tickCumulative", (0, import_kit11.getI64Decoder)()],
843
+ ["padding", (0, import_kit11.getArrayDecoder)((0, import_kit11.getU64Decoder)(), { size: 4 })]
826
844
  ]);
827
845
  }
828
846
  function getObservationCodec() {
829
- return (0, import_kit10.combineCodec)(getObservationEncoder(), getObservationDecoder());
847
+ return (0, import_kit11.combineCodec)(getObservationEncoder(), getObservationDecoder());
830
848
  }
831
849
 
832
850
  // src/generated/types/poolCreatedEvent.ts
833
- var import_kit11 = require("@solana/kit");
851
+ var import_kit12 = require("@solana/kit");
834
852
  function getPoolCreatedEventEncoder() {
835
- return (0, import_kit11.getStructEncoder)([
836
- ["tokenMint0", (0, import_kit11.getAddressEncoder)()],
837
- ["tokenMint1", (0, import_kit11.getAddressEncoder)()],
838
- ["tickSpacing", (0, import_kit11.getU16Encoder)()],
839
- ["poolState", (0, import_kit11.getAddressEncoder)()],
840
- ["sqrtPriceX64", (0, import_kit11.getU128Encoder)()],
841
- ["tick", (0, import_kit11.getI32Encoder)()],
842
- ["tokenVault0", (0, import_kit11.getAddressEncoder)()],
843
- ["tokenVault1", (0, import_kit11.getAddressEncoder)()],
844
- ["ammConfig", (0, import_kit11.getAddressEncoder)()]
853
+ return (0, import_kit12.getStructEncoder)([
854
+ ["tokenMint0", (0, import_kit12.getAddressEncoder)()],
855
+ ["tokenMint1", (0, import_kit12.getAddressEncoder)()],
856
+ ["tickSpacing", (0, import_kit12.getU16Encoder)()],
857
+ ["poolState", (0, import_kit12.getAddressEncoder)()],
858
+ ["sqrtPriceX64", (0, import_kit12.getU128Encoder)()],
859
+ ["tick", (0, import_kit12.getI32Encoder)()],
860
+ ["tokenVault0", (0, import_kit12.getAddressEncoder)()],
861
+ ["tokenVault1", (0, import_kit12.getAddressEncoder)()],
862
+ ["ammConfig", (0, import_kit12.getAddressEncoder)()]
845
863
  ]);
846
864
  }
847
865
  function getPoolCreatedEventDecoder() {
848
- return (0, import_kit11.getStructDecoder)([
849
- ["tokenMint0", (0, import_kit11.getAddressDecoder)()],
850
- ["tokenMint1", (0, import_kit11.getAddressDecoder)()],
851
- ["tickSpacing", (0, import_kit11.getU16Decoder)()],
852
- ["poolState", (0, import_kit11.getAddressDecoder)()],
853
- ["sqrtPriceX64", (0, import_kit11.getU128Decoder)()],
854
- ["tick", (0, import_kit11.getI32Decoder)()],
855
- ["tokenVault0", (0, import_kit11.getAddressDecoder)()],
856
- ["tokenVault1", (0, import_kit11.getAddressDecoder)()],
857
- ["ammConfig", (0, import_kit11.getAddressDecoder)()]
866
+ return (0, import_kit12.getStructDecoder)([
867
+ ["tokenMint0", (0, import_kit12.getAddressDecoder)()],
868
+ ["tokenMint1", (0, import_kit12.getAddressDecoder)()],
869
+ ["tickSpacing", (0, import_kit12.getU16Decoder)()],
870
+ ["poolState", (0, import_kit12.getAddressDecoder)()],
871
+ ["sqrtPriceX64", (0, import_kit12.getU128Decoder)()],
872
+ ["tick", (0, import_kit12.getI32Decoder)()],
873
+ ["tokenVault0", (0, import_kit12.getAddressDecoder)()],
874
+ ["tokenVault1", (0, import_kit12.getAddressDecoder)()],
875
+ ["ammConfig", (0, import_kit12.getAddressDecoder)()]
858
876
  ]);
859
877
  }
860
878
  function getPoolCreatedEventCodec() {
861
- return (0, import_kit11.combineCodec)(
879
+ return (0, import_kit12.combineCodec)(
862
880
  getPoolCreatedEventEncoder(),
863
881
  getPoolCreatedEventDecoder()
864
882
  );
865
883
  }
866
884
 
867
885
  // src/generated/types/positionRewardInfo.ts
868
- var import_kit12 = require("@solana/kit");
886
+ var import_kit13 = require("@solana/kit");
869
887
  function getPositionRewardInfoEncoder() {
870
- return (0, import_kit12.getStructEncoder)([
871
- ["growthInsideLastX64", (0, import_kit12.getU128Encoder)()],
872
- ["rewardAmountOwed", (0, import_kit12.getU64Encoder)()]
888
+ return (0, import_kit13.getStructEncoder)([
889
+ ["growthInsideLastX64", (0, import_kit13.getU128Encoder)()],
890
+ ["rewardAmountOwed", (0, import_kit13.getU64Encoder)()]
873
891
  ]);
874
892
  }
875
893
  function getPositionRewardInfoDecoder() {
876
- return (0, import_kit12.getStructDecoder)([
877
- ["growthInsideLastX64", (0, import_kit12.getU128Decoder)()],
878
- ["rewardAmountOwed", (0, import_kit12.getU64Decoder)()]
894
+ return (0, import_kit13.getStructDecoder)([
895
+ ["growthInsideLastX64", (0, import_kit13.getU128Decoder)()],
896
+ ["rewardAmountOwed", (0, import_kit13.getU64Decoder)()]
879
897
  ]);
880
898
  }
881
899
  function getPositionRewardInfoCodec() {
882
- return (0, import_kit12.combineCodec)(
900
+ return (0, import_kit13.combineCodec)(
883
901
  getPositionRewardInfoEncoder(),
884
902
  getPositionRewardInfoDecoder()
885
903
  );
886
904
  }
887
905
 
888
906
  // src/generated/types/rewardInfo.ts
889
- var import_kit13 = require("@solana/kit");
907
+ var import_kit14 = require("@solana/kit");
890
908
  function getRewardInfoEncoder() {
891
- return (0, import_kit13.getStructEncoder)([
892
- ["rewardState", (0, import_kit13.getU8Encoder)()],
893
- ["openTime", (0, import_kit13.getU64Encoder)()],
894
- ["endTime", (0, import_kit13.getU64Encoder)()],
895
- ["lastUpdateTime", (0, import_kit13.getU64Encoder)()],
896
- ["emissionsPerSecondX64", (0, import_kit13.getU128Encoder)()],
897
- ["rewardTotalEmissioned", (0, import_kit13.getU64Encoder)()],
898
- ["rewardClaimed", (0, import_kit13.getU64Encoder)()],
899
- ["tokenMint", (0, import_kit13.getAddressEncoder)()],
900
- ["tokenVault", (0, import_kit13.getAddressEncoder)()],
901
- ["authority", (0, import_kit13.getAddressEncoder)()],
902
- ["rewardGrowthGlobalX64", (0, import_kit13.getU128Encoder)()]
909
+ return (0, import_kit14.getStructEncoder)([
910
+ ["rewardState", (0, import_kit14.getU8Encoder)()],
911
+ ["openTime", (0, import_kit14.getU64Encoder)()],
912
+ ["endTime", (0, import_kit14.getU64Encoder)()],
913
+ ["lastUpdateTime", (0, import_kit14.getU64Encoder)()],
914
+ ["emissionsPerSecondX64", (0, import_kit14.getU128Encoder)()],
915
+ ["rewardTotalEmissioned", (0, import_kit14.getU64Encoder)()],
916
+ ["rewardClaimed", (0, import_kit14.getU64Encoder)()],
917
+ ["tokenMint", (0, import_kit14.getAddressEncoder)()],
918
+ ["tokenVault", (0, import_kit14.getAddressEncoder)()],
919
+ ["authority", (0, import_kit14.getAddressEncoder)()],
920
+ ["rewardGrowthGlobalX64", (0, import_kit14.getU128Encoder)()]
903
921
  ]);
904
922
  }
905
923
  function getRewardInfoDecoder() {
906
- return (0, import_kit13.getStructDecoder)([
907
- ["rewardState", (0, import_kit13.getU8Decoder)()],
908
- ["openTime", (0, import_kit13.getU64Decoder)()],
909
- ["endTime", (0, import_kit13.getU64Decoder)()],
910
- ["lastUpdateTime", (0, import_kit13.getU64Decoder)()],
911
- ["emissionsPerSecondX64", (0, import_kit13.getU128Decoder)()],
912
- ["rewardTotalEmissioned", (0, import_kit13.getU64Decoder)()],
913
- ["rewardClaimed", (0, import_kit13.getU64Decoder)()],
914
- ["tokenMint", (0, import_kit13.getAddressDecoder)()],
915
- ["tokenVault", (0, import_kit13.getAddressDecoder)()],
916
- ["authority", (0, import_kit13.getAddressDecoder)()],
917
- ["rewardGrowthGlobalX64", (0, import_kit13.getU128Decoder)()]
924
+ return (0, import_kit14.getStructDecoder)([
925
+ ["rewardState", (0, import_kit14.getU8Decoder)()],
926
+ ["openTime", (0, import_kit14.getU64Decoder)()],
927
+ ["endTime", (0, import_kit14.getU64Decoder)()],
928
+ ["lastUpdateTime", (0, import_kit14.getU64Decoder)()],
929
+ ["emissionsPerSecondX64", (0, import_kit14.getU128Decoder)()],
930
+ ["rewardTotalEmissioned", (0, import_kit14.getU64Decoder)()],
931
+ ["rewardClaimed", (0, import_kit14.getU64Decoder)()],
932
+ ["tokenMint", (0, import_kit14.getAddressDecoder)()],
933
+ ["tokenVault", (0, import_kit14.getAddressDecoder)()],
934
+ ["authority", (0, import_kit14.getAddressDecoder)()],
935
+ ["rewardGrowthGlobalX64", (0, import_kit14.getU128Decoder)()]
918
936
  ]);
919
937
  }
920
938
  function getRewardInfoCodec() {
921
- return (0, import_kit13.combineCodec)(getRewardInfoEncoder(), getRewardInfoDecoder());
939
+ return (0, import_kit14.combineCodec)(getRewardInfoEncoder(), getRewardInfoDecoder());
922
940
  }
923
941
 
924
942
  // src/generated/types/swapEvent.ts
925
- var import_kit14 = require("@solana/kit");
943
+ var import_kit15 = require("@solana/kit");
926
944
  function getSwapEventEncoder() {
927
- return (0, import_kit14.getStructEncoder)([
928
- ["poolState", (0, import_kit14.getAddressEncoder)()],
929
- ["sender", (0, import_kit14.getAddressEncoder)()],
930
- ["tokenAccount0", (0, import_kit14.getAddressEncoder)()],
931
- ["tokenAccount1", (0, import_kit14.getAddressEncoder)()],
932
- ["amount0", (0, import_kit14.getU64Encoder)()],
933
- ["transferFee0", (0, import_kit14.getU64Encoder)()],
934
- ["amount1", (0, import_kit14.getU64Encoder)()],
935
- ["transferFee1", (0, import_kit14.getU64Encoder)()],
936
- ["zeroForOne", (0, import_kit14.getBooleanEncoder)()],
937
- ["sqrtPriceX64", (0, import_kit14.getU128Encoder)()],
938
- ["liquidity", (0, import_kit14.getU128Encoder)()],
939
- ["tick", (0, import_kit14.getI32Encoder)()]
945
+ return (0, import_kit15.getStructEncoder)([
946
+ ["poolState", (0, import_kit15.getAddressEncoder)()],
947
+ ["sender", (0, import_kit15.getAddressEncoder)()],
948
+ ["tokenAccount0", (0, import_kit15.getAddressEncoder)()],
949
+ ["tokenAccount1", (0, import_kit15.getAddressEncoder)()],
950
+ ["amount0", (0, import_kit15.getU64Encoder)()],
951
+ ["transferFee0", (0, import_kit15.getU64Encoder)()],
952
+ ["amount1", (0, import_kit15.getU64Encoder)()],
953
+ ["transferFee1", (0, import_kit15.getU64Encoder)()],
954
+ ["zeroForOne", (0, import_kit15.getBooleanEncoder)()],
955
+ ["sqrtPriceX64", (0, import_kit15.getU128Encoder)()],
956
+ ["liquidity", (0, import_kit15.getU128Encoder)()],
957
+ ["tick", (0, import_kit15.getI32Encoder)()]
940
958
  ]);
941
959
  }
942
960
  function getSwapEventDecoder() {
943
- return (0, import_kit14.getStructDecoder)([
944
- ["poolState", (0, import_kit14.getAddressDecoder)()],
945
- ["sender", (0, import_kit14.getAddressDecoder)()],
946
- ["tokenAccount0", (0, import_kit14.getAddressDecoder)()],
947
- ["tokenAccount1", (0, import_kit14.getAddressDecoder)()],
948
- ["amount0", (0, import_kit14.getU64Decoder)()],
949
- ["transferFee0", (0, import_kit14.getU64Decoder)()],
950
- ["amount1", (0, import_kit14.getU64Decoder)()],
951
- ["transferFee1", (0, import_kit14.getU64Decoder)()],
952
- ["zeroForOne", (0, import_kit14.getBooleanDecoder)()],
953
- ["sqrtPriceX64", (0, import_kit14.getU128Decoder)()],
954
- ["liquidity", (0, import_kit14.getU128Decoder)()],
955
- ["tick", (0, import_kit14.getI32Decoder)()]
961
+ return (0, import_kit15.getStructDecoder)([
962
+ ["poolState", (0, import_kit15.getAddressDecoder)()],
963
+ ["sender", (0, import_kit15.getAddressDecoder)()],
964
+ ["tokenAccount0", (0, import_kit15.getAddressDecoder)()],
965
+ ["tokenAccount1", (0, import_kit15.getAddressDecoder)()],
966
+ ["amount0", (0, import_kit15.getU64Decoder)()],
967
+ ["transferFee0", (0, import_kit15.getU64Decoder)()],
968
+ ["amount1", (0, import_kit15.getU64Decoder)()],
969
+ ["transferFee1", (0, import_kit15.getU64Decoder)()],
970
+ ["zeroForOne", (0, import_kit15.getBooleanDecoder)()],
971
+ ["sqrtPriceX64", (0, import_kit15.getU128Decoder)()],
972
+ ["liquidity", (0, import_kit15.getU128Decoder)()],
973
+ ["tick", (0, import_kit15.getI32Decoder)()]
956
974
  ]);
957
975
  }
958
976
  function getSwapEventCodec() {
959
- return (0, import_kit14.combineCodec)(getSwapEventEncoder(), getSwapEventDecoder());
977
+ return (0, import_kit15.combineCodec)(getSwapEventEncoder(), getSwapEventDecoder());
960
978
  }
961
979
 
962
980
  // src/generated/types/tickState.ts
963
- var import_kit15 = require("@solana/kit");
981
+ var import_kit16 = require("@solana/kit");
964
982
  function getTickStateEncoder() {
965
- return (0, import_kit15.getStructEncoder)([
966
- ["tick", (0, import_kit15.getI32Encoder)()],
967
- ["liquidityNet", (0, import_kit15.getI128Encoder)()],
968
- ["liquidityGross", (0, import_kit15.getU128Encoder)()],
969
- ["feeGrowthOutside0X64", (0, import_kit15.getU128Encoder)()],
970
- ["feeGrowthOutside1X64", (0, import_kit15.getU128Encoder)()],
971
- ["rewardGrowthsOutsideX64", (0, import_kit15.getArrayEncoder)((0, import_kit15.getU128Encoder)(), { size: 3 })],
972
- ["padding", (0, import_kit15.getArrayEncoder)((0, import_kit15.getU32Encoder)(), { size: 13 })]
983
+ return (0, import_kit16.getStructEncoder)([
984
+ ["tick", (0, import_kit16.getI32Encoder)()],
985
+ ["liquidityNet", (0, import_kit16.getI128Encoder)()],
986
+ ["liquidityGross", (0, import_kit16.getU128Encoder)()],
987
+ ["feeGrowthOutside0X64", (0, import_kit16.getU128Encoder)()],
988
+ ["feeGrowthOutside1X64", (0, import_kit16.getU128Encoder)()],
989
+ ["rewardGrowthsOutsideX64", (0, import_kit16.getArrayEncoder)((0, import_kit16.getU128Encoder)(), { size: 3 })],
990
+ ["padding", (0, import_kit16.getArrayEncoder)((0, import_kit16.getU32Encoder)(), { size: 13 })]
973
991
  ]);
974
992
  }
975
993
  function getTickStateDecoder() {
976
- return (0, import_kit15.getStructDecoder)([
977
- ["tick", (0, import_kit15.getI32Decoder)()],
978
- ["liquidityNet", (0, import_kit15.getI128Decoder)()],
979
- ["liquidityGross", (0, import_kit15.getU128Decoder)()],
980
- ["feeGrowthOutside0X64", (0, import_kit15.getU128Decoder)()],
981
- ["feeGrowthOutside1X64", (0, import_kit15.getU128Decoder)()],
982
- ["rewardGrowthsOutsideX64", (0, import_kit15.getArrayDecoder)((0, import_kit15.getU128Decoder)(), { size: 3 })],
983
- ["padding", (0, import_kit15.getArrayDecoder)((0, import_kit15.getU32Decoder)(), { size: 13 })]
994
+ return (0, import_kit16.getStructDecoder)([
995
+ ["tick", (0, import_kit16.getI32Decoder)()],
996
+ ["liquidityNet", (0, import_kit16.getI128Decoder)()],
997
+ ["liquidityGross", (0, import_kit16.getU128Decoder)()],
998
+ ["feeGrowthOutside0X64", (0, import_kit16.getU128Decoder)()],
999
+ ["feeGrowthOutside1X64", (0, import_kit16.getU128Decoder)()],
1000
+ ["rewardGrowthsOutsideX64", (0, import_kit16.getArrayDecoder)((0, import_kit16.getU128Decoder)(), { size: 3 })],
1001
+ ["padding", (0, import_kit16.getArrayDecoder)((0, import_kit16.getU32Decoder)(), { size: 13 })]
984
1002
  ]);
985
1003
  }
986
1004
  function getTickStateCodec() {
987
- return (0, import_kit15.combineCodec)(getTickStateEncoder(), getTickStateDecoder());
1005
+ return (0, import_kit16.combineCodec)(getTickStateEncoder(), getTickStateDecoder());
988
1006
  }
989
1007
 
990
1008
  // src/generated/types/updateRewardInfosEvent.ts
991
- var import_kit16 = require("@solana/kit");
1009
+ var import_kit17 = require("@solana/kit");
992
1010
  function getUpdateRewardInfosEventEncoder() {
993
- return (0, import_kit16.getStructEncoder)([
994
- ["rewardGrowthGlobalX64", (0, import_kit16.getArrayEncoder)((0, import_kit16.getU128Encoder)(), { size: 3 })]
1011
+ return (0, import_kit17.getStructEncoder)([
1012
+ ["rewardGrowthGlobalX64", (0, import_kit17.getArrayEncoder)((0, import_kit17.getU128Encoder)(), { size: 3 })]
995
1013
  ]);
996
1014
  }
997
1015
  function getUpdateRewardInfosEventDecoder() {
998
- return (0, import_kit16.getStructDecoder)([
999
- ["rewardGrowthGlobalX64", (0, import_kit16.getArrayDecoder)((0, import_kit16.getU128Decoder)(), { size: 3 })]
1016
+ return (0, import_kit17.getStructDecoder)([
1017
+ ["rewardGrowthGlobalX64", (0, import_kit17.getArrayDecoder)((0, import_kit17.getU128Decoder)(), { size: 3 })]
1000
1018
  ]);
1001
1019
  }
1002
1020
  function getUpdateRewardInfosEventCodec() {
1003
- return (0, import_kit16.combineCodec)(
1021
+ return (0, import_kit17.combineCodec)(
1004
1022
  getUpdateRewardInfosEventEncoder(),
1005
1023
  getUpdateRewardInfosEventDecoder()
1006
1024
  );
@@ -1018,54 +1036,54 @@ var OBSERVATION_STATE_DISCRIMINATOR = new Uint8Array([
1018
1036
  132
1019
1037
  ]);
1020
1038
  function getObservationStateDiscriminatorBytes() {
1021
- return (0, import_kit17.fixEncoderSize)((0, import_kit17.getBytesEncoder)(), 8).encode(
1039
+ return (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8).encode(
1022
1040
  OBSERVATION_STATE_DISCRIMINATOR
1023
1041
  );
1024
1042
  }
1025
1043
  function getObservationStateEncoder() {
1026
- return (0, import_kit17.transformEncoder)(
1027
- (0, import_kit17.getStructEncoder)([
1028
- ["discriminator", (0, import_kit17.fixEncoderSize)((0, import_kit17.getBytesEncoder)(), 8)],
1029
- ["initialized", (0, import_kit17.getBooleanEncoder)()],
1030
- ["recentEpoch", (0, import_kit17.getU64Encoder)()],
1031
- ["observationIndex", (0, import_kit17.getU16Encoder)()],
1032
- ["poolId", (0, import_kit17.getAddressEncoder)()],
1033
- ["observations", (0, import_kit17.getArrayEncoder)(getObservationEncoder(), { size: 100 })],
1034
- ["padding", (0, import_kit17.getArrayEncoder)((0, import_kit17.getU64Encoder)(), { size: 4 })]
1044
+ return (0, import_kit18.transformEncoder)(
1045
+ (0, import_kit18.getStructEncoder)([
1046
+ ["discriminator", (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8)],
1047
+ ["initialized", (0, import_kit18.getBooleanEncoder)()],
1048
+ ["recentEpoch", (0, import_kit18.getU64Encoder)()],
1049
+ ["observationIndex", (0, import_kit18.getU16Encoder)()],
1050
+ ["poolId", (0, import_kit18.getAddressEncoder)()],
1051
+ ["observations", (0, import_kit18.getArrayEncoder)(getObservationEncoder(), { size: 100 })],
1052
+ ["padding", (0, import_kit18.getArrayEncoder)((0, import_kit18.getU64Encoder)(), { size: 4 })]
1035
1053
  ]),
1036
1054
  (value) => ({ ...value, discriminator: OBSERVATION_STATE_DISCRIMINATOR })
1037
1055
  );
1038
1056
  }
1039
1057
  function getObservationStateDecoder() {
1040
- return (0, import_kit17.getStructDecoder)([
1041
- ["discriminator", (0, import_kit17.fixDecoderSize)((0, import_kit17.getBytesDecoder)(), 8)],
1042
- ["initialized", (0, import_kit17.getBooleanDecoder)()],
1043
- ["recentEpoch", (0, import_kit17.getU64Decoder)()],
1044
- ["observationIndex", (0, import_kit17.getU16Decoder)()],
1045
- ["poolId", (0, import_kit17.getAddressDecoder)()],
1046
- ["observations", (0, import_kit17.getArrayDecoder)(getObservationDecoder(), { size: 100 })],
1047
- ["padding", (0, import_kit17.getArrayDecoder)((0, import_kit17.getU64Decoder)(), { size: 4 })]
1058
+ return (0, import_kit18.getStructDecoder)([
1059
+ ["discriminator", (0, import_kit18.fixDecoderSize)((0, import_kit18.getBytesDecoder)(), 8)],
1060
+ ["initialized", (0, import_kit18.getBooleanDecoder)()],
1061
+ ["recentEpoch", (0, import_kit18.getU64Decoder)()],
1062
+ ["observationIndex", (0, import_kit18.getU16Decoder)()],
1063
+ ["poolId", (0, import_kit18.getAddressDecoder)()],
1064
+ ["observations", (0, import_kit18.getArrayDecoder)(getObservationDecoder(), { size: 100 })],
1065
+ ["padding", (0, import_kit18.getArrayDecoder)((0, import_kit18.getU64Decoder)(), { size: 4 })]
1048
1066
  ]);
1049
1067
  }
1050
1068
  function getObservationStateCodec() {
1051
- return (0, import_kit17.combineCodec)(
1069
+ return (0, import_kit18.combineCodec)(
1052
1070
  getObservationStateEncoder(),
1053
1071
  getObservationStateDecoder()
1054
1072
  );
1055
1073
  }
1056
1074
  function decodeObservationState(encodedAccount) {
1057
- return (0, import_kit17.decodeAccount)(
1075
+ return (0, import_kit18.decodeAccount)(
1058
1076
  encodedAccount,
1059
1077
  getObservationStateDecoder()
1060
1078
  );
1061
1079
  }
1062
1080
  async function fetchObservationState(rpc, address6, config) {
1063
1081
  const maybeAccount = await fetchMaybeObservationState(rpc, address6, config);
1064
- (0, import_kit17.assertAccountExists)(maybeAccount);
1082
+ (0, import_kit18.assertAccountExists)(maybeAccount);
1065
1083
  return maybeAccount;
1066
1084
  }
1067
1085
  async function fetchMaybeObservationState(rpc, address6, config) {
1068
- const maybeAccount = await (0, import_kit17.fetchEncodedAccount)(rpc, address6, config);
1086
+ const maybeAccount = await (0, import_kit18.fetchEncodedAccount)(rpc, address6, config);
1069
1087
  return decodeObservationState(maybeAccount);
1070
1088
  }
1071
1089
  async function fetchAllObservationState(rpc, addresses, config) {
@@ -1074,11 +1092,11 @@ async function fetchAllObservationState(rpc, addresses, config) {
1074
1092
  addresses,
1075
1093
  config
1076
1094
  );
1077
- (0, import_kit17.assertAccountsExist)(maybeAccounts);
1095
+ (0, import_kit18.assertAccountsExist)(maybeAccounts);
1078
1096
  return maybeAccounts;
1079
1097
  }
1080
1098
  async function fetchAllMaybeObservationState(rpc, addresses, config) {
1081
- const maybeAccounts = await (0, import_kit17.fetchEncodedAccounts)(rpc, addresses, config);
1099
+ const maybeAccounts = await (0, import_kit18.fetchEncodedAccounts)(rpc, addresses, config);
1082
1100
  return maybeAccounts.map(
1083
1101
  (maybeAccount) => decodeObservationState(maybeAccount)
1084
1102
  );
@@ -1088,7 +1106,7 @@ function getObservationStateSize() {
1088
1106
  }
1089
1107
 
1090
1108
  // src/generated/accounts/operationState.ts
1091
- var import_kit18 = require("@solana/kit");
1109
+ var import_kit19 = require("@solana/kit");
1092
1110
  var OPERATION_STATE_DISCRIMINATOR = new Uint8Array([
1093
1111
  19,
1094
1112
  236,
@@ -1100,45 +1118,45 @@ var OPERATION_STATE_DISCRIMINATOR = new Uint8Array([
1100
1118
  252
1101
1119
  ]);
1102
1120
  function getOperationStateDiscriminatorBytes() {
1103
- return (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8).encode(
1121
+ return (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8).encode(
1104
1122
  OPERATION_STATE_DISCRIMINATOR
1105
1123
  );
1106
1124
  }
1107
1125
  function getOperationStateEncoder() {
1108
- return (0, import_kit18.transformEncoder)(
1109
- (0, import_kit18.getStructEncoder)([
1110
- ["discriminator", (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8)],
1111
- ["bump", (0, import_kit18.getU8Encoder)()],
1112
- ["operationOwners", (0, import_kit18.getArrayEncoder)((0, import_kit18.getAddressEncoder)(), { size: 10 })],
1113
- ["whitelistMints", (0, import_kit18.getArrayEncoder)((0, import_kit18.getAddressEncoder)(), { size: 100 })]
1126
+ return (0, import_kit19.transformEncoder)(
1127
+ (0, import_kit19.getStructEncoder)([
1128
+ ["discriminator", (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8)],
1129
+ ["bump", (0, import_kit19.getU8Encoder)()],
1130
+ ["operationOwners", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 10 })],
1131
+ ["whitelistMints", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 100 })]
1114
1132
  ]),
1115
1133
  (value) => ({ ...value, discriminator: OPERATION_STATE_DISCRIMINATOR })
1116
1134
  );
1117
1135
  }
1118
1136
  function getOperationStateDecoder() {
1119
- return (0, import_kit18.getStructDecoder)([
1120
- ["discriminator", (0, import_kit18.fixDecoderSize)((0, import_kit18.getBytesDecoder)(), 8)],
1121
- ["bump", (0, import_kit18.getU8Decoder)()],
1122
- ["operationOwners", (0, import_kit18.getArrayDecoder)((0, import_kit18.getAddressDecoder)(), { size: 10 })],
1123
- ["whitelistMints", (0, import_kit18.getArrayDecoder)((0, import_kit18.getAddressDecoder)(), { size: 100 })]
1137
+ return (0, import_kit19.getStructDecoder)([
1138
+ ["discriminator", (0, import_kit19.fixDecoderSize)((0, import_kit19.getBytesDecoder)(), 8)],
1139
+ ["bump", (0, import_kit19.getU8Decoder)()],
1140
+ ["operationOwners", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 10 })],
1141
+ ["whitelistMints", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 100 })]
1124
1142
  ]);
1125
1143
  }
1126
1144
  function getOperationStateCodec() {
1127
- return (0, import_kit18.combineCodec)(getOperationStateEncoder(), getOperationStateDecoder());
1145
+ return (0, import_kit19.combineCodec)(getOperationStateEncoder(), getOperationStateDecoder());
1128
1146
  }
1129
1147
  function decodeOperationState(encodedAccount) {
1130
- return (0, import_kit18.decodeAccount)(
1148
+ return (0, import_kit19.decodeAccount)(
1131
1149
  encodedAccount,
1132
1150
  getOperationStateDecoder()
1133
1151
  );
1134
1152
  }
1135
1153
  async function fetchOperationState(rpc, address6, config) {
1136
1154
  const maybeAccount = await fetchMaybeOperationState(rpc, address6, config);
1137
- (0, import_kit18.assertAccountExists)(maybeAccount);
1155
+ (0, import_kit19.assertAccountExists)(maybeAccount);
1138
1156
  return maybeAccount;
1139
1157
  }
1140
1158
  async function fetchMaybeOperationState(rpc, address6, config) {
1141
- const maybeAccount = await (0, import_kit18.fetchEncodedAccount)(rpc, address6, config);
1159
+ const maybeAccount = await (0, import_kit19.fetchEncodedAccount)(rpc, address6, config);
1142
1160
  return decodeOperationState(maybeAccount);
1143
1161
  }
1144
1162
  async function fetchAllOperationState(rpc, addresses, config) {
@@ -1147,11 +1165,11 @@ async function fetchAllOperationState(rpc, addresses, config) {
1147
1165
  addresses,
1148
1166
  config
1149
1167
  );
1150
- (0, import_kit18.assertAccountsExist)(maybeAccounts);
1168
+ (0, import_kit19.assertAccountsExist)(maybeAccounts);
1151
1169
  return maybeAccounts;
1152
1170
  }
1153
1171
  async function fetchAllMaybeOperationState(rpc, addresses, config) {
1154
- const maybeAccounts = await (0, import_kit18.fetchEncodedAccounts)(rpc, addresses, config);
1172
+ const maybeAccounts = await (0, import_kit19.fetchEncodedAccounts)(rpc, addresses, config);
1155
1173
  return maybeAccounts.map(
1156
1174
  (maybeAccount) => decodeOperationState(maybeAccount)
1157
1175
  );
@@ -1161,7 +1179,7 @@ function getOperationStateSize() {
1161
1179
  }
1162
1180
 
1163
1181
  // src/generated/accounts/personalPositionState.ts
1164
- var import_kit19 = require("@solana/kit");
1182
+ var import_kit20 = require("@solana/kit");
1165
1183
  var PERSONAL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
1166
1184
  70,
1167
1185
  111,
@@ -1173,30 +1191,30 @@ var PERSONAL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
1173
1191
  117
1174
1192
  ]);
1175
1193
  function getPersonalPositionStateDiscriminatorBytes() {
1176
- return (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8).encode(
1194
+ return (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8).encode(
1177
1195
  PERSONAL_POSITION_STATE_DISCRIMINATOR
1178
1196
  );
1179
1197
  }
1180
1198
  function getPersonalPositionStateEncoder() {
1181
- return (0, import_kit19.transformEncoder)(
1182
- (0, import_kit19.getStructEncoder)([
1183
- ["discriminator", (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8)],
1184
- ["bump", (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 1)],
1185
- ["nftMint", (0, import_kit19.getAddressEncoder)()],
1186
- ["poolId", (0, import_kit19.getAddressEncoder)()],
1187
- ["tickLowerIndex", (0, import_kit19.getI32Encoder)()],
1188
- ["tickUpperIndex", (0, import_kit19.getI32Encoder)()],
1189
- ["liquidity", (0, import_kit19.getU128Encoder)()],
1190
- ["feeGrowthInside0LastX64", (0, import_kit19.getU128Encoder)()],
1191
- ["feeGrowthInside1LastX64", (0, import_kit19.getU128Encoder)()],
1192
- ["tokenFeesOwed0", (0, import_kit19.getU64Encoder)()],
1193
- ["tokenFeesOwed1", (0, import_kit19.getU64Encoder)()],
1199
+ return (0, import_kit20.transformEncoder)(
1200
+ (0, import_kit20.getStructEncoder)([
1201
+ ["discriminator", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8)],
1202
+ ["bump", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 1)],
1203
+ ["nftMint", (0, import_kit20.getAddressEncoder)()],
1204
+ ["poolId", (0, import_kit20.getAddressEncoder)()],
1205
+ ["tickLowerIndex", (0, import_kit20.getI32Encoder)()],
1206
+ ["tickUpperIndex", (0, import_kit20.getI32Encoder)()],
1207
+ ["liquidity", (0, import_kit20.getU128Encoder)()],
1208
+ ["feeGrowthInside0LastX64", (0, import_kit20.getU128Encoder)()],
1209
+ ["feeGrowthInside1LastX64", (0, import_kit20.getU128Encoder)()],
1210
+ ["tokenFeesOwed0", (0, import_kit20.getU64Encoder)()],
1211
+ ["tokenFeesOwed1", (0, import_kit20.getU64Encoder)()],
1194
1212
  [
1195
1213
  "rewardInfos",
1196
- (0, import_kit19.getArrayEncoder)(getPositionRewardInfoEncoder(), { size: 3 })
1214
+ (0, import_kit20.getArrayEncoder)(getPositionRewardInfoEncoder(), { size: 3 })
1197
1215
  ],
1198
- ["recentEpoch", (0, import_kit19.getU64Encoder)()],
1199
- ["padding", (0, import_kit19.getArrayEncoder)((0, import_kit19.getU64Encoder)(), { size: 7 })]
1216
+ ["recentEpoch", (0, import_kit20.getU64Encoder)()],
1217
+ ["padding", (0, import_kit20.getArrayEncoder)((0, import_kit20.getU64Encoder)(), { size: 7 })]
1200
1218
  ]),
1201
1219
  (value) => ({
1202
1220
  ...value,
@@ -1205,34 +1223,34 @@ function getPersonalPositionStateEncoder() {
1205
1223
  );
1206
1224
  }
1207
1225
  function getPersonalPositionStateDecoder() {
1208
- return (0, import_kit19.getStructDecoder)([
1209
- ["discriminator", (0, import_kit19.fixDecoderSize)((0, import_kit19.getBytesDecoder)(), 8)],
1210
- ["bump", (0, import_kit19.fixDecoderSize)((0, import_kit19.getBytesDecoder)(), 1)],
1211
- ["nftMint", (0, import_kit19.getAddressDecoder)()],
1212
- ["poolId", (0, import_kit19.getAddressDecoder)()],
1213
- ["tickLowerIndex", (0, import_kit19.getI32Decoder)()],
1214
- ["tickUpperIndex", (0, import_kit19.getI32Decoder)()],
1215
- ["liquidity", (0, import_kit19.getU128Decoder)()],
1216
- ["feeGrowthInside0LastX64", (0, import_kit19.getU128Decoder)()],
1217
- ["feeGrowthInside1LastX64", (0, import_kit19.getU128Decoder)()],
1218
- ["tokenFeesOwed0", (0, import_kit19.getU64Decoder)()],
1219
- ["tokenFeesOwed1", (0, import_kit19.getU64Decoder)()],
1226
+ return (0, import_kit20.getStructDecoder)([
1227
+ ["discriminator", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 8)],
1228
+ ["bump", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 1)],
1229
+ ["nftMint", (0, import_kit20.getAddressDecoder)()],
1230
+ ["poolId", (0, import_kit20.getAddressDecoder)()],
1231
+ ["tickLowerIndex", (0, import_kit20.getI32Decoder)()],
1232
+ ["tickUpperIndex", (0, import_kit20.getI32Decoder)()],
1233
+ ["liquidity", (0, import_kit20.getU128Decoder)()],
1234
+ ["feeGrowthInside0LastX64", (0, import_kit20.getU128Decoder)()],
1235
+ ["feeGrowthInside1LastX64", (0, import_kit20.getU128Decoder)()],
1236
+ ["tokenFeesOwed0", (0, import_kit20.getU64Decoder)()],
1237
+ ["tokenFeesOwed1", (0, import_kit20.getU64Decoder)()],
1220
1238
  [
1221
1239
  "rewardInfos",
1222
- (0, import_kit19.getArrayDecoder)(getPositionRewardInfoDecoder(), { size: 3 })
1240
+ (0, import_kit20.getArrayDecoder)(getPositionRewardInfoDecoder(), { size: 3 })
1223
1241
  ],
1224
- ["recentEpoch", (0, import_kit19.getU64Decoder)()],
1225
- ["padding", (0, import_kit19.getArrayDecoder)((0, import_kit19.getU64Decoder)(), { size: 7 })]
1242
+ ["recentEpoch", (0, import_kit20.getU64Decoder)()],
1243
+ ["padding", (0, import_kit20.getArrayDecoder)((0, import_kit20.getU64Decoder)(), { size: 7 })]
1226
1244
  ]);
1227
1245
  }
1228
1246
  function getPersonalPositionStateCodec() {
1229
- return (0, import_kit19.combineCodec)(
1247
+ return (0, import_kit20.combineCodec)(
1230
1248
  getPersonalPositionStateEncoder(),
1231
1249
  getPersonalPositionStateDecoder()
1232
1250
  );
1233
1251
  }
1234
1252
  function decodePersonalPositionState(encodedAccount) {
1235
- return (0, import_kit19.decodeAccount)(
1253
+ return (0, import_kit20.decodeAccount)(
1236
1254
  encodedAccount,
1237
1255
  getPersonalPositionStateDecoder()
1238
1256
  );
@@ -1243,11 +1261,11 @@ async function fetchPersonalPositionState(rpc, address6, config) {
1243
1261
  address6,
1244
1262
  config
1245
1263
  );
1246
- (0, import_kit19.assertAccountExists)(maybeAccount);
1264
+ (0, import_kit20.assertAccountExists)(maybeAccount);
1247
1265
  return maybeAccount;
1248
1266
  }
1249
1267
  async function fetchMaybePersonalPositionState(rpc, address6, config) {
1250
- const maybeAccount = await (0, import_kit19.fetchEncodedAccount)(rpc, address6, config);
1268
+ const maybeAccount = await (0, import_kit20.fetchEncodedAccount)(rpc, address6, config);
1251
1269
  return decodePersonalPositionState(maybeAccount);
1252
1270
  }
1253
1271
  async function fetchAllPersonalPositionState(rpc, addresses, config) {
@@ -1256,11 +1274,11 @@ async function fetchAllPersonalPositionState(rpc, addresses, config) {
1256
1274
  addresses,
1257
1275
  config
1258
1276
  );
1259
- (0, import_kit19.assertAccountsExist)(maybeAccounts);
1277
+ (0, import_kit20.assertAccountsExist)(maybeAccounts);
1260
1278
  return maybeAccounts;
1261
1279
  }
1262
1280
  async function fetchAllMaybePersonalPositionState(rpc, addresses, config) {
1263
- const maybeAccounts = await (0, import_kit19.fetchEncodedAccounts)(rpc, addresses, config);
1281
+ const maybeAccounts = await (0, import_kit20.fetchEncodedAccounts)(rpc, addresses, config);
1264
1282
  return maybeAccounts.map(
1265
1283
  (maybeAccount) => decodePersonalPositionState(maybeAccount)
1266
1284
  );
@@ -1270,7 +1288,7 @@ function getPersonalPositionStateSize() {
1270
1288
  }
1271
1289
 
1272
1290
  // src/generated/accounts/poolState.ts
1273
- var import_kit20 = require("@solana/kit");
1291
+ var import_kit21 = require("@solana/kit");
1274
1292
  var POOL_STATE_DISCRIMINATOR = new Uint8Array([
1275
1293
  247,
1276
1294
  237,
@@ -1282,122 +1300,122 @@ var POOL_STATE_DISCRIMINATOR = new Uint8Array([
1282
1300
  70
1283
1301
  ]);
1284
1302
  function getPoolStateDiscriminatorBytes() {
1285
- return (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8).encode(POOL_STATE_DISCRIMINATOR);
1303
+ return (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8).encode(POOL_STATE_DISCRIMINATOR);
1286
1304
  }
1287
1305
  function getPoolStateEncoder() {
1288
- return (0, import_kit20.transformEncoder)(
1289
- (0, import_kit20.getStructEncoder)([
1290
- ["discriminator", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8)],
1291
- ["bump", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 1)],
1292
- ["ammConfig", (0, import_kit20.getAddressEncoder)()],
1293
- ["owner", (0, import_kit20.getAddressEncoder)()],
1294
- ["tokenMint0", (0, import_kit20.getAddressEncoder)()],
1295
- ["tokenMint1", (0, import_kit20.getAddressEncoder)()],
1296
- ["tokenVault0", (0, import_kit20.getAddressEncoder)()],
1297
- ["tokenVault1", (0, import_kit20.getAddressEncoder)()],
1298
- ["observationKey", (0, import_kit20.getAddressEncoder)()],
1299
- ["mintDecimals0", (0, import_kit20.getU8Encoder)()],
1300
- ["mintDecimals1", (0, import_kit20.getU8Encoder)()],
1301
- ["tickSpacing", (0, import_kit20.getU16Encoder)()],
1302
- ["liquidity", (0, import_kit20.getU128Encoder)()],
1303
- ["sqrtPriceX64", (0, import_kit20.getU128Encoder)()],
1304
- ["tickCurrent", (0, import_kit20.getI32Encoder)()],
1305
- ["padding3", (0, import_kit20.getU16Encoder)()],
1306
- ["padding4", (0, import_kit20.getU16Encoder)()],
1307
- ["feeGrowthGlobal0X64", (0, import_kit20.getU128Encoder)()],
1308
- ["feeGrowthGlobal1X64", (0, import_kit20.getU128Encoder)()],
1309
- ["protocolFeesToken0", (0, import_kit20.getU64Encoder)()],
1310
- ["protocolFeesToken1", (0, import_kit20.getU64Encoder)()],
1311
- ["swapInAmountToken0", (0, import_kit20.getU128Encoder)()],
1312
- ["swapOutAmountToken1", (0, import_kit20.getU128Encoder)()],
1313
- ["swapInAmountToken1", (0, import_kit20.getU128Encoder)()],
1314
- ["swapOutAmountToken0", (0, import_kit20.getU128Encoder)()],
1315
- ["status", (0, import_kit20.getU8Encoder)()],
1316
- ["padding", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 7)],
1317
- ["rewardInfos", (0, import_kit20.getArrayEncoder)(getRewardInfoEncoder(), { size: 3 })],
1318
- ["tickArrayBitmap", (0, import_kit20.getArrayEncoder)((0, import_kit20.getU64Encoder)(), { size: 16 })],
1319
- ["totalFeesToken0", (0, import_kit20.getU64Encoder)()],
1320
- ["totalFeesClaimedToken0", (0, import_kit20.getU64Encoder)()],
1321
- ["totalFeesToken1", (0, import_kit20.getU64Encoder)()],
1322
- ["totalFeesClaimedToken1", (0, import_kit20.getU64Encoder)()],
1323
- ["fundFeesToken0", (0, import_kit20.getU64Encoder)()],
1324
- ["fundFeesToken1", (0, import_kit20.getU64Encoder)()],
1325
- ["openTime", (0, import_kit20.getU64Encoder)()],
1326
- ["recentEpoch", (0, import_kit20.getU64Encoder)()],
1327
- ["padding1", (0, import_kit20.getArrayEncoder)((0, import_kit20.getU64Encoder)(), { size: 24 })],
1328
- ["padding2", (0, import_kit20.getArrayEncoder)((0, import_kit20.getU64Encoder)(), { size: 32 })]
1306
+ return (0, import_kit21.transformEncoder)(
1307
+ (0, import_kit21.getStructEncoder)([
1308
+ ["discriminator", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8)],
1309
+ ["bump", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 1)],
1310
+ ["ammConfig", (0, import_kit21.getAddressEncoder)()],
1311
+ ["owner", (0, import_kit21.getAddressEncoder)()],
1312
+ ["tokenMint0", (0, import_kit21.getAddressEncoder)()],
1313
+ ["tokenMint1", (0, import_kit21.getAddressEncoder)()],
1314
+ ["tokenVault0", (0, import_kit21.getAddressEncoder)()],
1315
+ ["tokenVault1", (0, import_kit21.getAddressEncoder)()],
1316
+ ["observationKey", (0, import_kit21.getAddressEncoder)()],
1317
+ ["mintDecimals0", (0, import_kit21.getU8Encoder)()],
1318
+ ["mintDecimals1", (0, import_kit21.getU8Encoder)()],
1319
+ ["tickSpacing", (0, import_kit21.getU16Encoder)()],
1320
+ ["liquidity", (0, import_kit21.getU128Encoder)()],
1321
+ ["sqrtPriceX64", (0, import_kit21.getU128Encoder)()],
1322
+ ["tickCurrent", (0, import_kit21.getI32Encoder)()],
1323
+ ["padding3", (0, import_kit21.getU16Encoder)()],
1324
+ ["padding4", (0, import_kit21.getU16Encoder)()],
1325
+ ["feeGrowthGlobal0X64", (0, import_kit21.getU128Encoder)()],
1326
+ ["feeGrowthGlobal1X64", (0, import_kit21.getU128Encoder)()],
1327
+ ["protocolFeesToken0", (0, import_kit21.getU64Encoder)()],
1328
+ ["protocolFeesToken1", (0, import_kit21.getU64Encoder)()],
1329
+ ["swapInAmountToken0", (0, import_kit21.getU128Encoder)()],
1330
+ ["swapOutAmountToken1", (0, import_kit21.getU128Encoder)()],
1331
+ ["swapInAmountToken1", (0, import_kit21.getU128Encoder)()],
1332
+ ["swapOutAmountToken0", (0, import_kit21.getU128Encoder)()],
1333
+ ["status", (0, import_kit21.getU8Encoder)()],
1334
+ ["padding", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 7)],
1335
+ ["rewardInfos", (0, import_kit21.getArrayEncoder)(getRewardInfoEncoder(), { size: 3 })],
1336
+ ["tickArrayBitmap", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 16 })],
1337
+ ["totalFeesToken0", (0, import_kit21.getU64Encoder)()],
1338
+ ["totalFeesClaimedToken0", (0, import_kit21.getU64Encoder)()],
1339
+ ["totalFeesToken1", (0, import_kit21.getU64Encoder)()],
1340
+ ["totalFeesClaimedToken1", (0, import_kit21.getU64Encoder)()],
1341
+ ["fundFeesToken0", (0, import_kit21.getU64Encoder)()],
1342
+ ["fundFeesToken1", (0, import_kit21.getU64Encoder)()],
1343
+ ["openTime", (0, import_kit21.getU64Encoder)()],
1344
+ ["recentEpoch", (0, import_kit21.getU64Encoder)()],
1345
+ ["padding1", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 24 })],
1346
+ ["padding2", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 32 })]
1329
1347
  ]),
1330
1348
  (value) => ({ ...value, discriminator: POOL_STATE_DISCRIMINATOR })
1331
1349
  );
1332
1350
  }
1333
1351
  function getPoolStateDecoder() {
1334
- return (0, import_kit20.getStructDecoder)([
1335
- ["discriminator", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 8)],
1336
- ["bump", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 1)],
1337
- ["ammConfig", (0, import_kit20.getAddressDecoder)()],
1338
- ["owner", (0, import_kit20.getAddressDecoder)()],
1339
- ["tokenMint0", (0, import_kit20.getAddressDecoder)()],
1340
- ["tokenMint1", (0, import_kit20.getAddressDecoder)()],
1341
- ["tokenVault0", (0, import_kit20.getAddressDecoder)()],
1342
- ["tokenVault1", (0, import_kit20.getAddressDecoder)()],
1343
- ["observationKey", (0, import_kit20.getAddressDecoder)()],
1344
- ["mintDecimals0", (0, import_kit20.getU8Decoder)()],
1345
- ["mintDecimals1", (0, import_kit20.getU8Decoder)()],
1346
- ["tickSpacing", (0, import_kit20.getU16Decoder)()],
1347
- ["liquidity", (0, import_kit20.getU128Decoder)()],
1348
- ["sqrtPriceX64", (0, import_kit20.getU128Decoder)()],
1349
- ["tickCurrent", (0, import_kit20.getI32Decoder)()],
1350
- ["padding3", (0, import_kit20.getU16Decoder)()],
1351
- ["padding4", (0, import_kit20.getU16Decoder)()],
1352
- ["feeGrowthGlobal0X64", (0, import_kit20.getU128Decoder)()],
1353
- ["feeGrowthGlobal1X64", (0, import_kit20.getU128Decoder)()],
1354
- ["protocolFeesToken0", (0, import_kit20.getU64Decoder)()],
1355
- ["protocolFeesToken1", (0, import_kit20.getU64Decoder)()],
1356
- ["swapInAmountToken0", (0, import_kit20.getU128Decoder)()],
1357
- ["swapOutAmountToken1", (0, import_kit20.getU128Decoder)()],
1358
- ["swapInAmountToken1", (0, import_kit20.getU128Decoder)()],
1359
- ["swapOutAmountToken0", (0, import_kit20.getU128Decoder)()],
1360
- ["status", (0, import_kit20.getU8Decoder)()],
1361
- ["padding", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 7)],
1362
- ["rewardInfos", (0, import_kit20.getArrayDecoder)(getRewardInfoDecoder(), { size: 3 })],
1363
- ["tickArrayBitmap", (0, import_kit20.getArrayDecoder)((0, import_kit20.getU64Decoder)(), { size: 16 })],
1364
- ["totalFeesToken0", (0, import_kit20.getU64Decoder)()],
1365
- ["totalFeesClaimedToken0", (0, import_kit20.getU64Decoder)()],
1366
- ["totalFeesToken1", (0, import_kit20.getU64Decoder)()],
1367
- ["totalFeesClaimedToken1", (0, import_kit20.getU64Decoder)()],
1368
- ["fundFeesToken0", (0, import_kit20.getU64Decoder)()],
1369
- ["fundFeesToken1", (0, import_kit20.getU64Decoder)()],
1370
- ["openTime", (0, import_kit20.getU64Decoder)()],
1371
- ["recentEpoch", (0, import_kit20.getU64Decoder)()],
1372
- ["padding1", (0, import_kit20.getArrayDecoder)((0, import_kit20.getU64Decoder)(), { size: 24 })],
1373
- ["padding2", (0, import_kit20.getArrayDecoder)((0, import_kit20.getU64Decoder)(), { size: 32 })]
1352
+ return (0, import_kit21.getStructDecoder)([
1353
+ ["discriminator", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 8)],
1354
+ ["bump", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 1)],
1355
+ ["ammConfig", (0, import_kit21.getAddressDecoder)()],
1356
+ ["owner", (0, import_kit21.getAddressDecoder)()],
1357
+ ["tokenMint0", (0, import_kit21.getAddressDecoder)()],
1358
+ ["tokenMint1", (0, import_kit21.getAddressDecoder)()],
1359
+ ["tokenVault0", (0, import_kit21.getAddressDecoder)()],
1360
+ ["tokenVault1", (0, import_kit21.getAddressDecoder)()],
1361
+ ["observationKey", (0, import_kit21.getAddressDecoder)()],
1362
+ ["mintDecimals0", (0, import_kit21.getU8Decoder)()],
1363
+ ["mintDecimals1", (0, import_kit21.getU8Decoder)()],
1364
+ ["tickSpacing", (0, import_kit21.getU16Decoder)()],
1365
+ ["liquidity", (0, import_kit21.getU128Decoder)()],
1366
+ ["sqrtPriceX64", (0, import_kit21.getU128Decoder)()],
1367
+ ["tickCurrent", (0, import_kit21.getI32Decoder)()],
1368
+ ["padding3", (0, import_kit21.getU16Decoder)()],
1369
+ ["padding4", (0, import_kit21.getU16Decoder)()],
1370
+ ["feeGrowthGlobal0X64", (0, import_kit21.getU128Decoder)()],
1371
+ ["feeGrowthGlobal1X64", (0, import_kit21.getU128Decoder)()],
1372
+ ["protocolFeesToken0", (0, import_kit21.getU64Decoder)()],
1373
+ ["protocolFeesToken1", (0, import_kit21.getU64Decoder)()],
1374
+ ["swapInAmountToken0", (0, import_kit21.getU128Decoder)()],
1375
+ ["swapOutAmountToken1", (0, import_kit21.getU128Decoder)()],
1376
+ ["swapInAmountToken1", (0, import_kit21.getU128Decoder)()],
1377
+ ["swapOutAmountToken0", (0, import_kit21.getU128Decoder)()],
1378
+ ["status", (0, import_kit21.getU8Decoder)()],
1379
+ ["padding", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 7)],
1380
+ ["rewardInfos", (0, import_kit21.getArrayDecoder)(getRewardInfoDecoder(), { size: 3 })],
1381
+ ["tickArrayBitmap", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 16 })],
1382
+ ["totalFeesToken0", (0, import_kit21.getU64Decoder)()],
1383
+ ["totalFeesClaimedToken0", (0, import_kit21.getU64Decoder)()],
1384
+ ["totalFeesToken1", (0, import_kit21.getU64Decoder)()],
1385
+ ["totalFeesClaimedToken1", (0, import_kit21.getU64Decoder)()],
1386
+ ["fundFeesToken0", (0, import_kit21.getU64Decoder)()],
1387
+ ["fundFeesToken1", (0, import_kit21.getU64Decoder)()],
1388
+ ["openTime", (0, import_kit21.getU64Decoder)()],
1389
+ ["recentEpoch", (0, import_kit21.getU64Decoder)()],
1390
+ ["padding1", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 24 })],
1391
+ ["padding2", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 32 })]
1374
1392
  ]);
1375
1393
  }
1376
1394
  function getPoolStateCodec() {
1377
- return (0, import_kit20.combineCodec)(getPoolStateEncoder(), getPoolStateDecoder());
1395
+ return (0, import_kit21.combineCodec)(getPoolStateEncoder(), getPoolStateDecoder());
1378
1396
  }
1379
1397
  function decodePoolState(encodedAccount) {
1380
- return (0, import_kit20.decodeAccount)(
1398
+ return (0, import_kit21.decodeAccount)(
1381
1399
  encodedAccount,
1382
1400
  getPoolStateDecoder()
1383
1401
  );
1384
1402
  }
1385
1403
  async function fetchPoolState(rpc, address6, config) {
1386
1404
  const maybeAccount = await fetchMaybePoolState(rpc, address6, config);
1387
- (0, import_kit20.assertAccountExists)(maybeAccount);
1405
+ (0, import_kit21.assertAccountExists)(maybeAccount);
1388
1406
  return maybeAccount;
1389
1407
  }
1390
1408
  async function fetchMaybePoolState(rpc, address6, config) {
1391
- const maybeAccount = await (0, import_kit20.fetchEncodedAccount)(rpc, address6, config);
1409
+ const maybeAccount = await (0, import_kit21.fetchEncodedAccount)(rpc, address6, config);
1392
1410
  return decodePoolState(maybeAccount);
1393
1411
  }
1394
1412
  async function fetchAllPoolState(rpc, addresses, config) {
1395
1413
  const maybeAccounts = await fetchAllMaybePoolState(rpc, addresses, config);
1396
- (0, import_kit20.assertAccountsExist)(maybeAccounts);
1414
+ (0, import_kit21.assertAccountsExist)(maybeAccounts);
1397
1415
  return maybeAccounts;
1398
1416
  }
1399
1417
  async function fetchAllMaybePoolState(rpc, addresses, config) {
1400
- const maybeAccounts = await (0, import_kit20.fetchEncodedAccounts)(rpc, addresses, config);
1418
+ const maybeAccounts = await (0, import_kit21.fetchEncodedAccounts)(rpc, addresses, config);
1401
1419
  return maybeAccounts.map((maybeAccount) => decodePoolState(maybeAccount));
1402
1420
  }
1403
1421
  function getPoolStateSize() {
@@ -1405,7 +1423,7 @@ function getPoolStateSize() {
1405
1423
  }
1406
1424
 
1407
1425
  // src/generated/accounts/protocolPositionState.ts
1408
- var import_kit21 = require("@solana/kit");
1426
+ var import_kit22 = require("@solana/kit");
1409
1427
  var PROTOCOL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
1410
1428
  100,
1411
1429
  226,
@@ -1417,26 +1435,26 @@ var PROTOCOL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
1417
1435
  106
1418
1436
  ]);
1419
1437
  function getProtocolPositionStateDiscriminatorBytes() {
1420
- return (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8).encode(
1438
+ return (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8).encode(
1421
1439
  PROTOCOL_POSITION_STATE_DISCRIMINATOR
1422
1440
  );
1423
1441
  }
1424
1442
  function getProtocolPositionStateEncoder() {
1425
- return (0, import_kit21.transformEncoder)(
1426
- (0, import_kit21.getStructEncoder)([
1427
- ["discriminator", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8)],
1428
- ["bump", (0, import_kit21.getU8Encoder)()],
1429
- ["poolId", (0, import_kit21.getAddressEncoder)()],
1430
- ["tickLowerIndex", (0, import_kit21.getI32Encoder)()],
1431
- ["tickUpperIndex", (0, import_kit21.getI32Encoder)()],
1432
- ["liquidity", (0, import_kit21.getU128Encoder)()],
1433
- ["feeGrowthInside0LastX64", (0, import_kit21.getU128Encoder)()],
1434
- ["feeGrowthInside1LastX64", (0, import_kit21.getU128Encoder)()],
1435
- ["tokenFeesOwed0", (0, import_kit21.getU64Encoder)()],
1436
- ["tokenFeesOwed1", (0, import_kit21.getU64Encoder)()],
1437
- ["rewardGrowthInside", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU128Encoder)(), { size: 3 })],
1438
- ["recentEpoch", (0, import_kit21.getU64Encoder)()],
1439
- ["padding", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 7 })]
1443
+ return (0, import_kit22.transformEncoder)(
1444
+ (0, import_kit22.getStructEncoder)([
1445
+ ["discriminator", (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8)],
1446
+ ["bump", (0, import_kit22.getU8Encoder)()],
1447
+ ["poolId", (0, import_kit22.getAddressEncoder)()],
1448
+ ["tickLowerIndex", (0, import_kit22.getI32Encoder)()],
1449
+ ["tickUpperIndex", (0, import_kit22.getI32Encoder)()],
1450
+ ["liquidity", (0, import_kit22.getU128Encoder)()],
1451
+ ["feeGrowthInside0LastX64", (0, import_kit22.getU128Encoder)()],
1452
+ ["feeGrowthInside1LastX64", (0, import_kit22.getU128Encoder)()],
1453
+ ["tokenFeesOwed0", (0, import_kit22.getU64Encoder)()],
1454
+ ["tokenFeesOwed1", (0, import_kit22.getU64Encoder)()],
1455
+ ["rewardGrowthInside", (0, import_kit22.getArrayEncoder)((0, import_kit22.getU128Encoder)(), { size: 3 })],
1456
+ ["recentEpoch", (0, import_kit22.getU64Encoder)()],
1457
+ ["padding", (0, import_kit22.getArrayEncoder)((0, import_kit22.getU64Encoder)(), { size: 7 })]
1440
1458
  ]),
1441
1459
  (value) => ({
1442
1460
  ...value,
@@ -1445,30 +1463,30 @@ function getProtocolPositionStateEncoder() {
1445
1463
  );
1446
1464
  }
1447
1465
  function getProtocolPositionStateDecoder() {
1448
- return (0, import_kit21.getStructDecoder)([
1449
- ["discriminator", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 8)],
1450
- ["bump", (0, import_kit21.getU8Decoder)()],
1451
- ["poolId", (0, import_kit21.getAddressDecoder)()],
1452
- ["tickLowerIndex", (0, import_kit21.getI32Decoder)()],
1453
- ["tickUpperIndex", (0, import_kit21.getI32Decoder)()],
1454
- ["liquidity", (0, import_kit21.getU128Decoder)()],
1455
- ["feeGrowthInside0LastX64", (0, import_kit21.getU128Decoder)()],
1456
- ["feeGrowthInside1LastX64", (0, import_kit21.getU128Decoder)()],
1457
- ["tokenFeesOwed0", (0, import_kit21.getU64Decoder)()],
1458
- ["tokenFeesOwed1", (0, import_kit21.getU64Decoder)()],
1459
- ["rewardGrowthInside", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU128Decoder)(), { size: 3 })],
1460
- ["recentEpoch", (0, import_kit21.getU64Decoder)()],
1461
- ["padding", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 7 })]
1466
+ return (0, import_kit22.getStructDecoder)([
1467
+ ["discriminator", (0, import_kit22.fixDecoderSize)((0, import_kit22.getBytesDecoder)(), 8)],
1468
+ ["bump", (0, import_kit22.getU8Decoder)()],
1469
+ ["poolId", (0, import_kit22.getAddressDecoder)()],
1470
+ ["tickLowerIndex", (0, import_kit22.getI32Decoder)()],
1471
+ ["tickUpperIndex", (0, import_kit22.getI32Decoder)()],
1472
+ ["liquidity", (0, import_kit22.getU128Decoder)()],
1473
+ ["feeGrowthInside0LastX64", (0, import_kit22.getU128Decoder)()],
1474
+ ["feeGrowthInside1LastX64", (0, import_kit22.getU128Decoder)()],
1475
+ ["tokenFeesOwed0", (0, import_kit22.getU64Decoder)()],
1476
+ ["tokenFeesOwed1", (0, import_kit22.getU64Decoder)()],
1477
+ ["rewardGrowthInside", (0, import_kit22.getArrayDecoder)((0, import_kit22.getU128Decoder)(), { size: 3 })],
1478
+ ["recentEpoch", (0, import_kit22.getU64Decoder)()],
1479
+ ["padding", (0, import_kit22.getArrayDecoder)((0, import_kit22.getU64Decoder)(), { size: 7 })]
1462
1480
  ]);
1463
1481
  }
1464
1482
  function getProtocolPositionStateCodec() {
1465
- return (0, import_kit21.combineCodec)(
1483
+ return (0, import_kit22.combineCodec)(
1466
1484
  getProtocolPositionStateEncoder(),
1467
1485
  getProtocolPositionStateDecoder()
1468
1486
  );
1469
1487
  }
1470
1488
  function decodeProtocolPositionState(encodedAccount) {
1471
- return (0, import_kit21.decodeAccount)(
1489
+ return (0, import_kit22.decodeAccount)(
1472
1490
  encodedAccount,
1473
1491
  getProtocolPositionStateDecoder()
1474
1492
  );
@@ -1479,11 +1497,11 @@ async function fetchProtocolPositionState(rpc, address6, config) {
1479
1497
  address6,
1480
1498
  config
1481
1499
  );
1482
- (0, import_kit21.assertAccountExists)(maybeAccount);
1500
+ (0, import_kit22.assertAccountExists)(maybeAccount);
1483
1501
  return maybeAccount;
1484
1502
  }
1485
1503
  async function fetchMaybeProtocolPositionState(rpc, address6, config) {
1486
- const maybeAccount = await (0, import_kit21.fetchEncodedAccount)(rpc, address6, config);
1504
+ const maybeAccount = await (0, import_kit22.fetchEncodedAccount)(rpc, address6, config);
1487
1505
  return decodeProtocolPositionState(maybeAccount);
1488
1506
  }
1489
1507
  async function fetchAllProtocolPositionState(rpc, addresses, config) {
@@ -1492,11 +1510,11 @@ async function fetchAllProtocolPositionState(rpc, addresses, config) {
1492
1510
  addresses,
1493
1511
  config
1494
1512
  );
1495
- (0, import_kit21.assertAccountsExist)(maybeAccounts);
1513
+ (0, import_kit22.assertAccountsExist)(maybeAccounts);
1496
1514
  return maybeAccounts;
1497
1515
  }
1498
1516
  async function fetchAllMaybeProtocolPositionState(rpc, addresses, config) {
1499
- const maybeAccounts = await (0, import_kit21.fetchEncodedAccounts)(rpc, addresses, config);
1517
+ const maybeAccounts = await (0, import_kit22.fetchEncodedAccounts)(rpc, addresses, config);
1500
1518
  return maybeAccounts.map(
1501
1519
  (maybeAccount) => decodeProtocolPositionState(maybeAccount)
1502
1520
  );
@@ -1506,7 +1524,7 @@ function getProtocolPositionStateSize() {
1506
1524
  }
1507
1525
 
1508
1526
  // src/generated/accounts/supportMintAssociated.ts
1509
- var import_kit22 = require("@solana/kit");
1527
+ var import_kit23 = require("@solana/kit");
1510
1528
  var SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
1511
1529
  134,
1512
1530
  40,
@@ -1518,17 +1536,17 @@ var SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
1518
1536
  53
1519
1537
  ]);
1520
1538
  function getSupportMintAssociatedDiscriminatorBytes() {
1521
- return (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8).encode(
1539
+ return (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8).encode(
1522
1540
  SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
1523
1541
  );
1524
1542
  }
1525
1543
  function getSupportMintAssociatedEncoder() {
1526
- return (0, import_kit22.transformEncoder)(
1527
- (0, import_kit22.getStructEncoder)([
1528
- ["discriminator", (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8)],
1529
- ["bump", (0, import_kit22.getU8Encoder)()],
1530
- ["mint", (0, import_kit22.getAddressEncoder)()],
1531
- ["padding", (0, import_kit22.getArrayEncoder)((0, import_kit22.getU64Encoder)(), { size: 8 })]
1544
+ return (0, import_kit23.transformEncoder)(
1545
+ (0, import_kit23.getStructEncoder)([
1546
+ ["discriminator", (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8)],
1547
+ ["bump", (0, import_kit23.getU8Encoder)()],
1548
+ ["mint", (0, import_kit23.getAddressEncoder)()],
1549
+ ["padding", (0, import_kit23.getArrayEncoder)((0, import_kit23.getU64Encoder)(), { size: 8 })]
1532
1550
  ]),
1533
1551
  (value) => ({
1534
1552
  ...value,
@@ -1537,21 +1555,21 @@ function getSupportMintAssociatedEncoder() {
1537
1555
  );
1538
1556
  }
1539
1557
  function getSupportMintAssociatedDecoder() {
1540
- return (0, import_kit22.getStructDecoder)([
1541
- ["discriminator", (0, import_kit22.fixDecoderSize)((0, import_kit22.getBytesDecoder)(), 8)],
1542
- ["bump", (0, import_kit22.getU8Decoder)()],
1543
- ["mint", (0, import_kit22.getAddressDecoder)()],
1544
- ["padding", (0, import_kit22.getArrayDecoder)((0, import_kit22.getU64Decoder)(), { size: 8 })]
1558
+ return (0, import_kit23.getStructDecoder)([
1559
+ ["discriminator", (0, import_kit23.fixDecoderSize)((0, import_kit23.getBytesDecoder)(), 8)],
1560
+ ["bump", (0, import_kit23.getU8Decoder)()],
1561
+ ["mint", (0, import_kit23.getAddressDecoder)()],
1562
+ ["padding", (0, import_kit23.getArrayDecoder)((0, import_kit23.getU64Decoder)(), { size: 8 })]
1545
1563
  ]);
1546
1564
  }
1547
1565
  function getSupportMintAssociatedCodec() {
1548
- return (0, import_kit22.combineCodec)(
1566
+ return (0, import_kit23.combineCodec)(
1549
1567
  getSupportMintAssociatedEncoder(),
1550
1568
  getSupportMintAssociatedDecoder()
1551
1569
  );
1552
1570
  }
1553
1571
  function decodeSupportMintAssociated(encodedAccount) {
1554
- return (0, import_kit22.decodeAccount)(
1572
+ return (0, import_kit23.decodeAccount)(
1555
1573
  encodedAccount,
1556
1574
  getSupportMintAssociatedDecoder()
1557
1575
  );
@@ -1562,11 +1580,11 @@ async function fetchSupportMintAssociated(rpc, address6, config) {
1562
1580
  address6,
1563
1581
  config
1564
1582
  );
1565
- (0, import_kit22.assertAccountExists)(maybeAccount);
1583
+ (0, import_kit23.assertAccountExists)(maybeAccount);
1566
1584
  return maybeAccount;
1567
1585
  }
1568
1586
  async function fetchMaybeSupportMintAssociated(rpc, address6, config) {
1569
- const maybeAccount = await (0, import_kit22.fetchEncodedAccount)(rpc, address6, config);
1587
+ const maybeAccount = await (0, import_kit23.fetchEncodedAccount)(rpc, address6, config);
1570
1588
  return decodeSupportMintAssociated(maybeAccount);
1571
1589
  }
1572
1590
  async function fetchAllSupportMintAssociated(rpc, addresses, config) {
@@ -1575,11 +1593,11 @@ async function fetchAllSupportMintAssociated(rpc, addresses, config) {
1575
1593
  addresses,
1576
1594
  config
1577
1595
  );
1578
- (0, import_kit22.assertAccountsExist)(maybeAccounts);
1596
+ (0, import_kit23.assertAccountsExist)(maybeAccounts);
1579
1597
  return maybeAccounts;
1580
1598
  }
1581
1599
  async function fetchAllMaybeSupportMintAssociated(rpc, addresses, config) {
1582
- const maybeAccounts = await (0, import_kit22.fetchEncodedAccounts)(rpc, addresses, config);
1600
+ const maybeAccounts = await (0, import_kit23.fetchEncodedAccounts)(rpc, addresses, config);
1583
1601
  return maybeAccounts.map(
1584
1602
  (maybeAccount) => decodeSupportMintAssociated(maybeAccount)
1585
1603
  );
@@ -1589,7 +1607,7 @@ function getSupportMintAssociatedSize() {
1589
1607
  }
1590
1608
 
1591
1609
  // src/generated/accounts/tickArrayBitmapExtension.ts
1592
- var import_kit23 = require("@solana/kit");
1610
+ var import_kit24 = require("@solana/kit");
1593
1611
  var TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR = new Uint8Array([
1594
1612
  60,
1595
1613
  150,
@@ -1601,24 +1619,24 @@ var TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR = new Uint8Array([
1601
1619
  153
1602
1620
  ]);
1603
1621
  function getTickArrayBitmapExtensionDiscriminatorBytes() {
1604
- return (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8).encode(
1622
+ return (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8).encode(
1605
1623
  TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR
1606
1624
  );
1607
1625
  }
1608
1626
  function getTickArrayBitmapExtensionEncoder() {
1609
- return (0, import_kit23.transformEncoder)(
1610
- (0, import_kit23.getStructEncoder)([
1611
- ["discriminator", (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8)],
1612
- ["poolId", (0, import_kit23.getAddressEncoder)()],
1627
+ return (0, import_kit24.transformEncoder)(
1628
+ (0, import_kit24.getStructEncoder)([
1629
+ ["discriminator", (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8)],
1630
+ ["poolId", (0, import_kit24.getAddressEncoder)()],
1613
1631
  [
1614
1632
  "positiveTickArrayBitmap",
1615
- (0, import_kit23.getArrayEncoder)((0, import_kit23.getArrayEncoder)((0, import_kit23.getU64Encoder)(), { size: 8 }), {
1633
+ (0, import_kit24.getArrayEncoder)((0, import_kit24.getArrayEncoder)((0, import_kit24.getU64Encoder)(), { size: 8 }), {
1616
1634
  size: 14
1617
1635
  })
1618
1636
  ],
1619
1637
  [
1620
1638
  "negativeTickArrayBitmap",
1621
- (0, import_kit23.getArrayEncoder)((0, import_kit23.getArrayEncoder)((0, import_kit23.getU64Encoder)(), { size: 8 }), {
1639
+ (0, import_kit24.getArrayEncoder)((0, import_kit24.getArrayEncoder)((0, import_kit24.getU64Encoder)(), { size: 8 }), {
1622
1640
  size: 14
1623
1641
  })
1624
1642
  ]
@@ -1630,31 +1648,31 @@ function getTickArrayBitmapExtensionEncoder() {
1630
1648
  );
1631
1649
  }
1632
1650
  function getTickArrayBitmapExtensionDecoder() {
1633
- return (0, import_kit23.getStructDecoder)([
1634
- ["discriminator", (0, import_kit23.fixDecoderSize)((0, import_kit23.getBytesDecoder)(), 8)],
1635
- ["poolId", (0, import_kit23.getAddressDecoder)()],
1651
+ return (0, import_kit24.getStructDecoder)([
1652
+ ["discriminator", (0, import_kit24.fixDecoderSize)((0, import_kit24.getBytesDecoder)(), 8)],
1653
+ ["poolId", (0, import_kit24.getAddressDecoder)()],
1636
1654
  [
1637
1655
  "positiveTickArrayBitmap",
1638
- (0, import_kit23.getArrayDecoder)((0, import_kit23.getArrayDecoder)((0, import_kit23.getU64Decoder)(), { size: 8 }), {
1656
+ (0, import_kit24.getArrayDecoder)((0, import_kit24.getArrayDecoder)((0, import_kit24.getU64Decoder)(), { size: 8 }), {
1639
1657
  size: 14
1640
1658
  })
1641
1659
  ],
1642
1660
  [
1643
1661
  "negativeTickArrayBitmap",
1644
- (0, import_kit23.getArrayDecoder)((0, import_kit23.getArrayDecoder)((0, import_kit23.getU64Decoder)(), { size: 8 }), {
1662
+ (0, import_kit24.getArrayDecoder)((0, import_kit24.getArrayDecoder)((0, import_kit24.getU64Decoder)(), { size: 8 }), {
1645
1663
  size: 14
1646
1664
  })
1647
1665
  ]
1648
1666
  ]);
1649
1667
  }
1650
1668
  function getTickArrayBitmapExtensionCodec() {
1651
- return (0, import_kit23.combineCodec)(
1669
+ return (0, import_kit24.combineCodec)(
1652
1670
  getTickArrayBitmapExtensionEncoder(),
1653
1671
  getTickArrayBitmapExtensionDecoder()
1654
1672
  );
1655
1673
  }
1656
1674
  function decodeTickArrayBitmapExtension(encodedAccount) {
1657
- return (0, import_kit23.decodeAccount)(
1675
+ return (0, import_kit24.decodeAccount)(
1658
1676
  encodedAccount,
1659
1677
  getTickArrayBitmapExtensionDecoder()
1660
1678
  );
@@ -1665,11 +1683,11 @@ async function fetchTickArrayBitmapExtension(rpc, address6, config) {
1665
1683
  address6,
1666
1684
  config
1667
1685
  );
1668
- (0, import_kit23.assertAccountExists)(maybeAccount);
1686
+ (0, import_kit24.assertAccountExists)(maybeAccount);
1669
1687
  return maybeAccount;
1670
1688
  }
1671
1689
  async function fetchMaybeTickArrayBitmapExtension(rpc, address6, config) {
1672
- const maybeAccount = await (0, import_kit23.fetchEncodedAccount)(rpc, address6, config);
1690
+ const maybeAccount = await (0, import_kit24.fetchEncodedAccount)(rpc, address6, config);
1673
1691
  return decodeTickArrayBitmapExtension(maybeAccount);
1674
1692
  }
1675
1693
  async function fetchAllTickArrayBitmapExtension(rpc, addresses, config) {
@@ -1678,11 +1696,11 @@ async function fetchAllTickArrayBitmapExtension(rpc, addresses, config) {
1678
1696
  addresses,
1679
1697
  config
1680
1698
  );
1681
- (0, import_kit23.assertAccountsExist)(maybeAccounts);
1699
+ (0, import_kit24.assertAccountsExist)(maybeAccounts);
1682
1700
  return maybeAccounts;
1683
1701
  }
1684
1702
  async function fetchAllMaybeTickArrayBitmapExtension(rpc, addresses, config) {
1685
- const maybeAccounts = await (0, import_kit23.fetchEncodedAccounts)(rpc, addresses, config);
1703
+ const maybeAccounts = await (0, import_kit24.fetchEncodedAccounts)(rpc, addresses, config);
1686
1704
  return maybeAccounts.map(
1687
1705
  (maybeAccount) => decodeTickArrayBitmapExtension(maybeAccount)
1688
1706
  );
@@ -1692,7 +1710,7 @@ function getTickArrayBitmapExtensionSize() {
1692
1710
  }
1693
1711
 
1694
1712
  // src/generated/accounts/tickArrayState.ts
1695
- var import_kit24 = require("@solana/kit");
1713
+ var import_kit25 = require("@solana/kit");
1696
1714
  var TICK_ARRAY_STATE_DISCRIMINATOR = new Uint8Array([
1697
1715
  192,
1698
1716
  155,
@@ -1704,51 +1722,51 @@ var TICK_ARRAY_STATE_DISCRIMINATOR = new Uint8Array([
1704
1722
  42
1705
1723
  ]);
1706
1724
  function getTickArrayStateDiscriminatorBytes() {
1707
- return (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8).encode(
1725
+ return (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1708
1726
  TICK_ARRAY_STATE_DISCRIMINATOR
1709
1727
  );
1710
1728
  }
1711
1729
  function getTickArrayStateEncoder() {
1712
- return (0, import_kit24.transformEncoder)(
1713
- (0, import_kit24.getStructEncoder)([
1714
- ["discriminator", (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8)],
1715
- ["poolId", (0, import_kit24.getAddressEncoder)()],
1716
- ["startTickIndex", (0, import_kit24.getI32Encoder)()],
1717
- ["ticks", (0, import_kit24.getArrayEncoder)(getTickStateEncoder(), { size: 60 })],
1718
- ["initializedTickCount", (0, import_kit24.getU8Encoder)()],
1719
- ["recentEpoch", (0, import_kit24.getU64Encoder)()],
1720
- ["padding", (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 107)]
1730
+ return (0, import_kit25.transformEncoder)(
1731
+ (0, import_kit25.getStructEncoder)([
1732
+ ["discriminator", (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8)],
1733
+ ["poolId", (0, import_kit25.getAddressEncoder)()],
1734
+ ["startTickIndex", (0, import_kit25.getI32Encoder)()],
1735
+ ["ticks", (0, import_kit25.getArrayEncoder)(getTickStateEncoder(), { size: 60 })],
1736
+ ["initializedTickCount", (0, import_kit25.getU8Encoder)()],
1737
+ ["recentEpoch", (0, import_kit25.getU64Encoder)()],
1738
+ ["padding", (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 107)]
1721
1739
  ]),
1722
1740
  (value) => ({ ...value, discriminator: TICK_ARRAY_STATE_DISCRIMINATOR })
1723
1741
  );
1724
1742
  }
1725
1743
  function getTickArrayStateDecoder() {
1726
- return (0, import_kit24.getStructDecoder)([
1727
- ["discriminator", (0, import_kit24.fixDecoderSize)((0, import_kit24.getBytesDecoder)(), 8)],
1728
- ["poolId", (0, import_kit24.getAddressDecoder)()],
1729
- ["startTickIndex", (0, import_kit24.getI32Decoder)()],
1730
- ["ticks", (0, import_kit24.getArrayDecoder)(getTickStateDecoder(), { size: 60 })],
1731
- ["initializedTickCount", (0, import_kit24.getU8Decoder)()],
1732
- ["recentEpoch", (0, import_kit24.getU64Decoder)()],
1733
- ["padding", (0, import_kit24.fixDecoderSize)((0, import_kit24.getBytesDecoder)(), 107)]
1744
+ return (0, import_kit25.getStructDecoder)([
1745
+ ["discriminator", (0, import_kit25.fixDecoderSize)((0, import_kit25.getBytesDecoder)(), 8)],
1746
+ ["poolId", (0, import_kit25.getAddressDecoder)()],
1747
+ ["startTickIndex", (0, import_kit25.getI32Decoder)()],
1748
+ ["ticks", (0, import_kit25.getArrayDecoder)(getTickStateDecoder(), { size: 60 })],
1749
+ ["initializedTickCount", (0, import_kit25.getU8Decoder)()],
1750
+ ["recentEpoch", (0, import_kit25.getU64Decoder)()],
1751
+ ["padding", (0, import_kit25.fixDecoderSize)((0, import_kit25.getBytesDecoder)(), 107)]
1734
1752
  ]);
1735
1753
  }
1736
1754
  function getTickArrayStateCodec() {
1737
- return (0, import_kit24.combineCodec)(getTickArrayStateEncoder(), getTickArrayStateDecoder());
1755
+ return (0, import_kit25.combineCodec)(getTickArrayStateEncoder(), getTickArrayStateDecoder());
1738
1756
  }
1739
1757
  function decodeTickArrayState(encodedAccount) {
1740
- return (0, import_kit24.decodeAccount)(
1758
+ return (0, import_kit25.decodeAccount)(
1741
1759
  encodedAccount,
1742
1760
  getTickArrayStateDecoder()
1743
1761
  );
1744
1762
  }
1745
1763
  async function fetchTickArrayState(rpc, address6, config) {
1746
1764
  const maybeAccount = await fetchMaybeTickArrayState(rpc, address6, config);
1747
- (0, import_kit24.assertAccountExists)(maybeAccount);
1765
+ (0, import_kit25.assertAccountExists)(maybeAccount);
1748
1766
  return maybeAccount;
1749
1767
  }
1750
1768
  async function fetchMaybeTickArrayState(rpc, address6, config) {
1751
- const maybeAccount = await (0, import_kit24.fetchEncodedAccount)(rpc, address6, config);
1769
+ const maybeAccount = await (0, import_kit25.fetchEncodedAccount)(rpc, address6, config);
1752
1770
  return decodeTickArrayState(maybeAccount);
1753
1771
  }
1754
1772
  async function fetchAllTickArrayState(rpc, addresses, config) {
@@ -1757,11 +1775,11 @@ async function fetchAllTickArrayState(rpc, addresses, config) {
1757
1775
  addresses,
1758
1776
  config
1759
1777
  );
1760
- (0, import_kit24.assertAccountsExist)(maybeAccounts);
1778
+ (0, import_kit25.assertAccountsExist)(maybeAccounts);
1761
1779
  return maybeAccounts;
1762
1780
  }
1763
1781
  async function fetchAllMaybeTickArrayState(rpc, addresses, config) {
1764
- const maybeAccounts = await (0, import_kit24.fetchEncodedAccounts)(rpc, addresses, config);
1782
+ const maybeAccounts = await (0, import_kit25.fetchEncodedAccounts)(rpc, addresses, config);
1765
1783
  return maybeAccounts.map(
1766
1784
  (maybeAccount) => decodeTickArrayState(maybeAccount)
1767
1785
  );
@@ -1771,10 +1789,10 @@ function getTickArrayStateSize() {
1771
1789
  }
1772
1790
 
1773
1791
  // src/generated/errors/ammV3.ts
1774
- var import_kit26 = require("@solana/kit");
1792
+ var import_kit27 = require("@solana/kit");
1775
1793
 
1776
1794
  // src/generated/programs/ammV3.ts
1777
- var import_kit25 = require("@solana/kit");
1795
+ var import_kit26 = require("@solana/kit");
1778
1796
  var AMM_V3_PROGRAM_ADDRESS = "6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6";
1779
1797
  var AmmV3Account = /* @__PURE__ */ ((AmmV3Account2) => {
1780
1798
  AmmV3Account2[AmmV3Account2["AmmConfig"] = 0] = "AmmConfig";
@@ -1790,81 +1808,81 @@ var AmmV3Account = /* @__PURE__ */ ((AmmV3Account2) => {
1790
1808
  })(AmmV3Account || {});
1791
1809
  function identifyAmmV3Account(account) {
1792
1810
  const data = "data" in account ? account.data : account;
1793
- if ((0, import_kit25.containsBytes)(
1811
+ if ((0, import_kit26.containsBytes)(
1794
1812
  data,
1795
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1813
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1796
1814
  new Uint8Array([218, 244, 33, 104, 203, 203, 43, 111])
1797
1815
  ),
1798
1816
  0
1799
1817
  )) {
1800
1818
  return 0 /* AmmConfig */;
1801
1819
  }
1802
- if ((0, import_kit25.containsBytes)(
1820
+ if ((0, import_kit26.containsBytes)(
1803
1821
  data,
1804
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1822
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1805
1823
  new Uint8Array([122, 174, 197, 53, 129, 9, 165, 132])
1806
1824
  ),
1807
1825
  0
1808
1826
  )) {
1809
1827
  return 1 /* ObservationState */;
1810
1828
  }
1811
- if ((0, import_kit25.containsBytes)(
1829
+ if ((0, import_kit26.containsBytes)(
1812
1830
  data,
1813
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1831
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1814
1832
  new Uint8Array([19, 236, 58, 237, 81, 222, 183, 252])
1815
1833
  ),
1816
1834
  0
1817
1835
  )) {
1818
1836
  return 2 /* OperationState */;
1819
1837
  }
1820
- if ((0, import_kit25.containsBytes)(
1838
+ if ((0, import_kit26.containsBytes)(
1821
1839
  data,
1822
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1840
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1823
1841
  new Uint8Array([70, 111, 150, 126, 230, 15, 25, 117])
1824
1842
  ),
1825
1843
  0
1826
1844
  )) {
1827
1845
  return 3 /* PersonalPositionState */;
1828
1846
  }
1829
- if ((0, import_kit25.containsBytes)(
1847
+ if ((0, import_kit26.containsBytes)(
1830
1848
  data,
1831
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1849
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1832
1850
  new Uint8Array([247, 237, 227, 245, 215, 195, 222, 70])
1833
1851
  ),
1834
1852
  0
1835
1853
  )) {
1836
1854
  return 4 /* PoolState */;
1837
1855
  }
1838
- if ((0, import_kit25.containsBytes)(
1856
+ if ((0, import_kit26.containsBytes)(
1839
1857
  data,
1840
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1858
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1841
1859
  new Uint8Array([100, 226, 145, 99, 146, 218, 160, 106])
1842
1860
  ),
1843
1861
  0
1844
1862
  )) {
1845
1863
  return 5 /* ProtocolPositionState */;
1846
1864
  }
1847
- if ((0, import_kit25.containsBytes)(
1865
+ if ((0, import_kit26.containsBytes)(
1848
1866
  data,
1849
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1867
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1850
1868
  new Uint8Array([134, 40, 183, 79, 12, 112, 162, 53])
1851
1869
  ),
1852
1870
  0
1853
1871
  )) {
1854
1872
  return 6 /* SupportMintAssociated */;
1855
1873
  }
1856
- if ((0, import_kit25.containsBytes)(
1874
+ if ((0, import_kit26.containsBytes)(
1857
1875
  data,
1858
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1876
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1859
1877
  new Uint8Array([60, 150, 36, 219, 97, 128, 139, 153])
1860
1878
  ),
1861
1879
  0
1862
1880
  )) {
1863
1881
  return 7 /* TickArrayBitmapExtension */;
1864
1882
  }
1865
- if ((0, import_kit25.containsBytes)(
1883
+ if ((0, import_kit26.containsBytes)(
1866
1884
  data,
1867
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1885
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1868
1886
  new Uint8Array([192, 155, 85, 205, 49, 249, 129, 42])
1869
1887
  ),
1870
1888
  0
@@ -1901,189 +1919,189 @@ var AmmV3Instruction = /* @__PURE__ */ ((AmmV3Instruction2) => {
1901
1919
  })(AmmV3Instruction || {});
1902
1920
  function identifyAmmV3Instruction(instruction) {
1903
1921
  const data = "data" in instruction ? instruction.data : instruction;
1904
- if ((0, import_kit25.containsBytes)(
1922
+ if ((0, import_kit26.containsBytes)(
1905
1923
  data,
1906
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1924
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1907
1925
  new Uint8Array([123, 134, 81, 0, 49, 68, 98, 98])
1908
1926
  ),
1909
1927
  0
1910
1928
  )) {
1911
1929
  return 0 /* ClosePosition */;
1912
1930
  }
1913
- if ((0, import_kit25.containsBytes)(
1931
+ if ((0, import_kit26.containsBytes)(
1914
1932
  data,
1915
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1933
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1916
1934
  new Uint8Array([201, 117, 152, 144, 85, 85, 108, 178])
1917
1935
  ),
1918
1936
  0
1919
1937
  )) {
1920
1938
  return 1 /* CloseProtocolPosition */;
1921
1939
  }
1922
- if ((0, import_kit25.containsBytes)(
1940
+ if ((0, import_kit26.containsBytes)(
1923
1941
  data,
1924
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1942
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1925
1943
  new Uint8Array([167, 138, 78, 149, 223, 194, 6, 126])
1926
1944
  ),
1927
1945
  0
1928
1946
  )) {
1929
1947
  return 2 /* CollectFundFee */;
1930
1948
  }
1931
- if ((0, import_kit25.containsBytes)(
1949
+ if ((0, import_kit26.containsBytes)(
1932
1950
  data,
1933
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1951
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1934
1952
  new Uint8Array([136, 136, 252, 221, 194, 66, 126, 89])
1935
1953
  ),
1936
1954
  0
1937
1955
  )) {
1938
1956
  return 3 /* CollectProtocolFee */;
1939
1957
  }
1940
- if ((0, import_kit25.containsBytes)(
1958
+ if ((0, import_kit26.containsBytes)(
1941
1959
  data,
1942
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1960
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1943
1961
  new Uint8Array([18, 237, 166, 197, 34, 16, 213, 144])
1944
1962
  ),
1945
1963
  0
1946
1964
  )) {
1947
1965
  return 4 /* CollectRemainingRewards */;
1948
1966
  }
1949
- if ((0, import_kit25.containsBytes)(
1967
+ if ((0, import_kit26.containsBytes)(
1950
1968
  data,
1951
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1969
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1952
1970
  new Uint8Array([137, 52, 237, 212, 215, 117, 108, 104])
1953
1971
  ),
1954
1972
  0
1955
1973
  )) {
1956
1974
  return 5 /* CreateAmmConfig */;
1957
1975
  }
1958
- if ((0, import_kit25.containsBytes)(
1976
+ if ((0, import_kit26.containsBytes)(
1959
1977
  data,
1960
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1978
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1961
1979
  new Uint8Array([63, 87, 148, 33, 109, 35, 8, 104])
1962
1980
  ),
1963
1981
  0
1964
1982
  )) {
1965
1983
  return 6 /* CreateOperationAccount */;
1966
1984
  }
1967
- if ((0, import_kit25.containsBytes)(
1985
+ if ((0, import_kit26.containsBytes)(
1968
1986
  data,
1969
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1987
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1970
1988
  new Uint8Array([233, 146, 209, 142, 207, 104, 64, 188])
1971
1989
  ),
1972
1990
  0
1973
1991
  )) {
1974
1992
  return 7 /* CreatePool */;
1975
1993
  }
1976
- if ((0, import_kit25.containsBytes)(
1994
+ if ((0, import_kit26.containsBytes)(
1977
1995
  data,
1978
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
1996
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1979
1997
  new Uint8Array([17, 251, 65, 92, 136, 242, 14, 169])
1980
1998
  ),
1981
1999
  0
1982
2000
  )) {
1983
2001
  return 8 /* CreateSupportMintAssociated */;
1984
2002
  }
1985
- if ((0, import_kit25.containsBytes)(
2003
+ if ((0, import_kit26.containsBytes)(
1986
2004
  data,
1987
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2005
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1988
2006
  new Uint8Array([58, 127, 188, 62, 79, 82, 196, 96])
1989
2007
  ),
1990
2008
  0
1991
2009
  )) {
1992
2010
  return 9 /* DecreaseLiquidityV2 */;
1993
2011
  }
1994
- if ((0, import_kit25.containsBytes)(
2012
+ if ((0, import_kit26.containsBytes)(
1995
2013
  data,
1996
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2014
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
1997
2015
  new Uint8Array([133, 29, 89, 223, 69, 238, 176, 10])
1998
2016
  ),
1999
2017
  0
2000
2018
  )) {
2001
2019
  return 10 /* IncreaseLiquidityV2 */;
2002
2020
  }
2003
- if ((0, import_kit25.containsBytes)(
2021
+ if ((0, import_kit26.containsBytes)(
2004
2022
  data,
2005
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2023
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2006
2024
  new Uint8Array([95, 135, 192, 196, 242, 129, 230, 68])
2007
2025
  ),
2008
2026
  0
2009
2027
  )) {
2010
2028
  return 11 /* InitializeReward */;
2011
2029
  }
2012
- if ((0, import_kit25.containsBytes)(
2030
+ if ((0, import_kit26.containsBytes)(
2013
2031
  data,
2014
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2032
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2015
2033
  new Uint8Array([77, 255, 174, 82, 125, 29, 201, 46])
2016
2034
  ),
2017
2035
  0
2018
2036
  )) {
2019
2037
  return 12 /* OpenPositionWithToken22Nft */;
2020
2038
  }
2021
- if ((0, import_kit25.containsBytes)(
2039
+ if ((0, import_kit26.containsBytes)(
2022
2040
  data,
2023
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2041
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2024
2042
  new Uint8Array([112, 52, 167, 75, 32, 201, 211, 137])
2025
2043
  ),
2026
2044
  0
2027
2045
  )) {
2028
2046
  return 13 /* SetRewardParams */;
2029
2047
  }
2030
- if ((0, import_kit25.containsBytes)(
2048
+ if ((0, import_kit26.containsBytes)(
2031
2049
  data,
2032
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2050
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2033
2051
  new Uint8Array([69, 125, 115, 218, 245, 186, 242, 196])
2034
2052
  ),
2035
2053
  0
2036
2054
  )) {
2037
2055
  return 14 /* SwapRouterBaseIn */;
2038
2056
  }
2039
- if ((0, import_kit25.containsBytes)(
2057
+ if ((0, import_kit26.containsBytes)(
2040
2058
  data,
2041
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2059
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2042
2060
  new Uint8Array([43, 4, 237, 11, 26, 201, 30, 98])
2043
2061
  ),
2044
2062
  0
2045
2063
  )) {
2046
2064
  return 15 /* SwapV2 */;
2047
2065
  }
2048
- if ((0, import_kit25.containsBytes)(
2066
+ if ((0, import_kit26.containsBytes)(
2049
2067
  data,
2050
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2068
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2051
2069
  new Uint8Array([7, 22, 12, 83, 242, 43, 48, 121])
2052
2070
  ),
2053
2071
  0
2054
2072
  )) {
2055
2073
  return 16 /* TransferRewardOwner */;
2056
2074
  }
2057
- if ((0, import_kit25.containsBytes)(
2075
+ if ((0, import_kit26.containsBytes)(
2058
2076
  data,
2059
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2077
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2060
2078
  new Uint8Array([49, 60, 174, 136, 154, 28, 116, 200])
2061
2079
  ),
2062
2080
  0
2063
2081
  )) {
2064
2082
  return 17 /* UpdateAmmConfig */;
2065
2083
  }
2066
- if ((0, import_kit25.containsBytes)(
2084
+ if ((0, import_kit26.containsBytes)(
2067
2085
  data,
2068
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2086
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2069
2087
  new Uint8Array([127, 70, 119, 40, 188, 227, 61, 7])
2070
2088
  ),
2071
2089
  0
2072
2090
  )) {
2073
2091
  return 18 /* UpdateOperationAccount */;
2074
2092
  }
2075
- if ((0, import_kit25.containsBytes)(
2093
+ if ((0, import_kit26.containsBytes)(
2076
2094
  data,
2077
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2095
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2078
2096
  new Uint8Array([130, 87, 108, 6, 46, 224, 117, 123])
2079
2097
  ),
2080
2098
  0
2081
2099
  )) {
2082
2100
  return 19 /* UpdatePoolStatus */;
2083
2101
  }
2084
- if ((0, import_kit25.containsBytes)(
2102
+ if ((0, import_kit26.containsBytes)(
2085
2103
  data,
2086
- (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
2104
+ (0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
2087
2105
  new Uint8Array([163, 172, 224, 52, 11, 154, 106, 223])
2088
2106
  ),
2089
2107
  0
@@ -2198,7 +2216,7 @@ function getAmmV3ErrorMessage(code) {
2198
2216
  return "Error message not available in production bundles.";
2199
2217
  }
2200
2218
  function isAmmV3Error(error, transactionMessage, code) {
2201
- return (0, import_kit26.isProgramError)(
2219
+ return (0, import_kit27.isProgramError)(
2202
2220
  error,
2203
2221
  transactionMessage,
2204
2222
  AMM_V3_PROGRAM_ADDRESS,
@@ -2207,10 +2225,10 @@ function isAmmV3Error(error, transactionMessage, code) {
2207
2225
  }
2208
2226
 
2209
2227
  // src/generated/instructions/closePosition.ts
2210
- var import_kit28 = require("@solana/kit");
2228
+ var import_kit29 = require("@solana/kit");
2211
2229
 
2212
2230
  // src/generated/shared/index.ts
2213
- var import_kit27 = require("@solana/kit");
2231
+ var import_kit28 = require("@solana/kit");
2214
2232
  function expectSome(value) {
2215
2233
  if (value === null || value === void 0) {
2216
2234
  throw new Error("Expected a value but received null or undefined.");
@@ -2235,19 +2253,19 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
2235
2253
  if (optionalAccountStrategy === "omitted") return;
2236
2254
  return Object.freeze({
2237
2255
  address: programAddress,
2238
- role: import_kit27.AccountRole.READONLY
2256
+ role: import_kit28.AccountRole.READONLY
2239
2257
  });
2240
2258
  }
2241
- const writableRole = account.isWritable ? import_kit27.AccountRole.WRITABLE : import_kit27.AccountRole.READONLY;
2259
+ const writableRole = account.isWritable ? import_kit28.AccountRole.WRITABLE : import_kit28.AccountRole.READONLY;
2242
2260
  return Object.freeze({
2243
2261
  address: expectAddress(account.value),
2244
- role: isTransactionSigner(account.value) ? (0, import_kit27.upgradeRoleToSigner)(writableRole) : writableRole,
2262
+ role: isTransactionSigner(account.value) ? (0, import_kit28.upgradeRoleToSigner)(writableRole) : writableRole,
2245
2263
  ...isTransactionSigner(account.value) ? { signer: account.value } : {}
2246
2264
  });
2247
2265
  };
2248
2266
  }
2249
2267
  function isTransactionSigner(value) {
2250
- return !!value && typeof value === "object" && "address" in value && (0, import_kit27.isTransactionSigner)(value);
2268
+ return !!value && typeof value === "object" && "address" in value && (0, import_kit28.isTransactionSigner)(value);
2251
2269
  }
2252
2270
 
2253
2271
  // src/generated/instructions/closePosition.ts
@@ -2262,23 +2280,23 @@ var CLOSE_POSITION_DISCRIMINATOR = new Uint8Array([
2262
2280
  98
2263
2281
  ]);
2264
2282
  function getClosePositionDiscriminatorBytes() {
2265
- return (0, import_kit28.fixEncoderSize)((0, import_kit28.getBytesEncoder)(), 8).encode(
2283
+ return (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8).encode(
2266
2284
  CLOSE_POSITION_DISCRIMINATOR
2267
2285
  );
2268
2286
  }
2269
2287
  function getClosePositionInstructionDataEncoder() {
2270
- return (0, import_kit28.transformEncoder)(
2271
- (0, import_kit28.getStructEncoder)([["discriminator", (0, import_kit28.fixEncoderSize)((0, import_kit28.getBytesEncoder)(), 8)]]),
2288
+ return (0, import_kit29.transformEncoder)(
2289
+ (0, import_kit29.getStructEncoder)([["discriminator", (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8)]]),
2272
2290
  (value) => ({ ...value, discriminator: CLOSE_POSITION_DISCRIMINATOR })
2273
2291
  );
2274
2292
  }
2275
2293
  function getClosePositionInstructionDataDecoder() {
2276
- return (0, import_kit28.getStructDecoder)([
2277
- ["discriminator", (0, import_kit28.fixDecoderSize)((0, import_kit28.getBytesDecoder)(), 8)]
2294
+ return (0, import_kit29.getStructDecoder)([
2295
+ ["discriminator", (0, import_kit29.fixDecoderSize)((0, import_kit29.getBytesDecoder)(), 8)]
2278
2296
  ]);
2279
2297
  }
2280
2298
  function getClosePositionInstructionDataCodec() {
2281
- return (0, import_kit28.combineCodec)(
2299
+ return (0, import_kit29.combineCodec)(
2282
2300
  getClosePositionInstructionDataEncoder(),
2283
2301
  getClosePositionInstructionDataDecoder()
2284
2302
  );
@@ -2301,13 +2319,13 @@ async function getClosePositionInstructionAsync(input, config) {
2301
2319
  };
2302
2320
  const accounts = originalAccounts;
2303
2321
  if (!accounts.personalPosition.value) {
2304
- accounts.personalPosition.value = await (0, import_kit28.getProgramDerivedAddress)({
2322
+ accounts.personalPosition.value = await (0, import_kit29.getProgramDerivedAddress)({
2305
2323
  programAddress,
2306
2324
  seeds: [
2307
- (0, import_kit28.getBytesEncoder)().encode(
2325
+ (0, import_kit29.getBytesEncoder)().encode(
2308
2326
  new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
2309
2327
  ),
2310
- (0, import_kit28.getAddressEncoder)().encode(
2328
+ (0, import_kit29.getAddressEncoder)().encode(
2311
2329
  expectAddress(accounts.positionNftMint.value)
2312
2330
  )
2313
2331
  ]
@@ -2395,7 +2413,7 @@ function parseClosePositionInstruction(instruction) {
2395
2413
  }
2396
2414
 
2397
2415
  // src/generated/instructions/closeProtocolPosition.ts
2398
- var import_kit29 = require("@solana/kit");
2416
+ var import_kit30 = require("@solana/kit");
2399
2417
  var CLOSE_PROTOCOL_POSITION_DISCRIMINATOR = new Uint8Array([
2400
2418
  201,
2401
2419
  117,
@@ -2407,13 +2425,13 @@ var CLOSE_PROTOCOL_POSITION_DISCRIMINATOR = new Uint8Array([
2407
2425
  178
2408
2426
  ]);
2409
2427
  function getCloseProtocolPositionDiscriminatorBytes() {
2410
- return (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8).encode(
2428
+ return (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8).encode(
2411
2429
  CLOSE_PROTOCOL_POSITION_DISCRIMINATOR
2412
2430
  );
2413
2431
  }
2414
2432
  function getCloseProtocolPositionInstructionDataEncoder() {
2415
- return (0, import_kit29.transformEncoder)(
2416
- (0, import_kit29.getStructEncoder)([["discriminator", (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8)]]),
2433
+ return (0, import_kit30.transformEncoder)(
2434
+ (0, import_kit30.getStructEncoder)([["discriminator", (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8)]]),
2417
2435
  (value) => ({
2418
2436
  ...value,
2419
2437
  discriminator: CLOSE_PROTOCOL_POSITION_DISCRIMINATOR
@@ -2421,12 +2439,12 @@ function getCloseProtocolPositionInstructionDataEncoder() {
2421
2439
  );
2422
2440
  }
2423
2441
  function getCloseProtocolPositionInstructionDataDecoder() {
2424
- return (0, import_kit29.getStructDecoder)([
2425
- ["discriminator", (0, import_kit29.fixDecoderSize)((0, import_kit29.getBytesDecoder)(), 8)]
2442
+ return (0, import_kit30.getStructDecoder)([
2443
+ ["discriminator", (0, import_kit30.fixDecoderSize)((0, import_kit30.getBytesDecoder)(), 8)]
2426
2444
  ]);
2427
2445
  }
2428
2446
  function getCloseProtocolPositionInstructionDataCodec() {
2429
- return (0, import_kit29.combineCodec)(
2447
+ return (0, import_kit30.combineCodec)(
2430
2448
  getCloseProtocolPositionInstructionDataEncoder(),
2431
2449
  getCloseProtocolPositionInstructionDataDecoder()
2432
2450
  );
@@ -2474,7 +2492,7 @@ function parseCloseProtocolPositionInstruction(instruction) {
2474
2492
  }
2475
2493
 
2476
2494
  // src/generated/instructions/collectFundFee.ts
2477
- var import_kit30 = require("@solana/kit");
2495
+ var import_kit31 = require("@solana/kit");
2478
2496
  var COLLECT_FUND_FEE_DISCRIMINATOR = new Uint8Array([
2479
2497
  167,
2480
2498
  138,
@@ -2486,29 +2504,29 @@ var COLLECT_FUND_FEE_DISCRIMINATOR = new Uint8Array([
2486
2504
  126
2487
2505
  ]);
2488
2506
  function getCollectFundFeeDiscriminatorBytes() {
2489
- return (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8).encode(
2507
+ return (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8).encode(
2490
2508
  COLLECT_FUND_FEE_DISCRIMINATOR
2491
2509
  );
2492
2510
  }
2493
2511
  function getCollectFundFeeInstructionDataEncoder() {
2494
- return (0, import_kit30.transformEncoder)(
2495
- (0, import_kit30.getStructEncoder)([
2496
- ["discriminator", (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8)],
2497
- ["amount0Requested", (0, import_kit30.getU64Encoder)()],
2498
- ["amount1Requested", (0, import_kit30.getU64Encoder)()]
2512
+ return (0, import_kit31.transformEncoder)(
2513
+ (0, import_kit31.getStructEncoder)([
2514
+ ["discriminator", (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8)],
2515
+ ["amount0Requested", (0, import_kit31.getU64Encoder)()],
2516
+ ["amount1Requested", (0, import_kit31.getU64Encoder)()]
2499
2517
  ]),
2500
2518
  (value) => ({ ...value, discriminator: COLLECT_FUND_FEE_DISCRIMINATOR })
2501
2519
  );
2502
2520
  }
2503
2521
  function getCollectFundFeeInstructionDataDecoder() {
2504
- return (0, import_kit30.getStructDecoder)([
2505
- ["discriminator", (0, import_kit30.fixDecoderSize)((0, import_kit30.getBytesDecoder)(), 8)],
2506
- ["amount0Requested", (0, import_kit30.getU64Decoder)()],
2507
- ["amount1Requested", (0, import_kit30.getU64Decoder)()]
2522
+ return (0, import_kit31.getStructDecoder)([
2523
+ ["discriminator", (0, import_kit31.fixDecoderSize)((0, import_kit31.getBytesDecoder)(), 8)],
2524
+ ["amount0Requested", (0, import_kit31.getU64Decoder)()],
2525
+ ["amount1Requested", (0, import_kit31.getU64Decoder)()]
2508
2526
  ]);
2509
2527
  }
2510
2528
  function getCollectFundFeeInstructionDataCodec() {
2511
- return (0, import_kit30.combineCodec)(
2529
+ return (0, import_kit31.combineCodec)(
2512
2530
  getCollectFundFeeInstructionDataEncoder(),
2513
2531
  getCollectFundFeeInstructionDataDecoder()
2514
2532
  );
@@ -2596,7 +2614,7 @@ function parseCollectFundFeeInstruction(instruction) {
2596
2614
  }
2597
2615
 
2598
2616
  // src/generated/instructions/collectProtocolFee.ts
2599
- var import_kit31 = require("@solana/kit");
2617
+ var import_kit32 = require("@solana/kit");
2600
2618
  var COLLECT_PROTOCOL_FEE_DISCRIMINATOR = new Uint8Array([
2601
2619
  136,
2602
2620
  136,
@@ -2608,29 +2626,29 @@ var COLLECT_PROTOCOL_FEE_DISCRIMINATOR = new Uint8Array([
2608
2626
  89
2609
2627
  ]);
2610
2628
  function getCollectProtocolFeeDiscriminatorBytes() {
2611
- return (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8).encode(
2629
+ return (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8).encode(
2612
2630
  COLLECT_PROTOCOL_FEE_DISCRIMINATOR
2613
2631
  );
2614
2632
  }
2615
2633
  function getCollectProtocolFeeInstructionDataEncoder() {
2616
- return (0, import_kit31.transformEncoder)(
2617
- (0, import_kit31.getStructEncoder)([
2618
- ["discriminator", (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8)],
2619
- ["amount0Requested", (0, import_kit31.getU64Encoder)()],
2620
- ["amount1Requested", (0, import_kit31.getU64Encoder)()]
2634
+ return (0, import_kit32.transformEncoder)(
2635
+ (0, import_kit32.getStructEncoder)([
2636
+ ["discriminator", (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8)],
2637
+ ["amount0Requested", (0, import_kit32.getU64Encoder)()],
2638
+ ["amount1Requested", (0, import_kit32.getU64Encoder)()]
2621
2639
  ]),
2622
2640
  (value) => ({ ...value, discriminator: COLLECT_PROTOCOL_FEE_DISCRIMINATOR })
2623
2641
  );
2624
2642
  }
2625
2643
  function getCollectProtocolFeeInstructionDataDecoder() {
2626
- return (0, import_kit31.getStructDecoder)([
2627
- ["discriminator", (0, import_kit31.fixDecoderSize)((0, import_kit31.getBytesDecoder)(), 8)],
2628
- ["amount0Requested", (0, import_kit31.getU64Decoder)()],
2629
- ["amount1Requested", (0, import_kit31.getU64Decoder)()]
2644
+ return (0, import_kit32.getStructDecoder)([
2645
+ ["discriminator", (0, import_kit32.fixDecoderSize)((0, import_kit32.getBytesDecoder)(), 8)],
2646
+ ["amount0Requested", (0, import_kit32.getU64Decoder)()],
2647
+ ["amount1Requested", (0, import_kit32.getU64Decoder)()]
2630
2648
  ]);
2631
2649
  }
2632
2650
  function getCollectProtocolFeeInstructionDataCodec() {
2633
- return (0, import_kit31.combineCodec)(
2651
+ return (0, import_kit32.combineCodec)(
2634
2652
  getCollectProtocolFeeInstructionDataEncoder(),
2635
2653
  getCollectProtocolFeeInstructionDataDecoder()
2636
2654
  );
@@ -2720,7 +2738,7 @@ function parseCollectProtocolFeeInstruction(instruction) {
2720
2738
  }
2721
2739
 
2722
2740
  // src/generated/instructions/collectRemainingRewards.ts
2723
- var import_kit32 = require("@solana/kit");
2741
+ var import_kit33 = require("@solana/kit");
2724
2742
  var COLLECT_REMAINING_REWARDS_DISCRIMINATOR = new Uint8Array([
2725
2743
  18,
2726
2744
  237,
@@ -2732,15 +2750,15 @@ var COLLECT_REMAINING_REWARDS_DISCRIMINATOR = new Uint8Array([
2732
2750
  144
2733
2751
  ]);
2734
2752
  function getCollectRemainingRewardsDiscriminatorBytes() {
2735
- return (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8).encode(
2753
+ return (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8).encode(
2736
2754
  COLLECT_REMAINING_REWARDS_DISCRIMINATOR
2737
2755
  );
2738
2756
  }
2739
2757
  function getCollectRemainingRewardsInstructionDataEncoder() {
2740
- return (0, import_kit32.transformEncoder)(
2741
- (0, import_kit32.getStructEncoder)([
2742
- ["discriminator", (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8)],
2743
- ["rewardIndex", (0, import_kit32.getU8Encoder)()]
2758
+ return (0, import_kit33.transformEncoder)(
2759
+ (0, import_kit33.getStructEncoder)([
2760
+ ["discriminator", (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8)],
2761
+ ["rewardIndex", (0, import_kit33.getU8Encoder)()]
2744
2762
  ]),
2745
2763
  (value) => ({
2746
2764
  ...value,
@@ -2749,13 +2767,13 @@ function getCollectRemainingRewardsInstructionDataEncoder() {
2749
2767
  );
2750
2768
  }
2751
2769
  function getCollectRemainingRewardsInstructionDataDecoder() {
2752
- return (0, import_kit32.getStructDecoder)([
2753
- ["discriminator", (0, import_kit32.fixDecoderSize)((0, import_kit32.getBytesDecoder)(), 8)],
2754
- ["rewardIndex", (0, import_kit32.getU8Decoder)()]
2770
+ return (0, import_kit33.getStructDecoder)([
2771
+ ["discriminator", (0, import_kit33.fixDecoderSize)((0, import_kit33.getBytesDecoder)(), 8)],
2772
+ ["rewardIndex", (0, import_kit33.getU8Decoder)()]
2755
2773
  ]);
2756
2774
  }
2757
2775
  function getCollectRemainingRewardsInstructionDataCodec() {
2758
- return (0, import_kit32.combineCodec)(
2776
+ return (0, import_kit33.combineCodec)(
2759
2777
  getCollectRemainingRewardsInstructionDataEncoder(),
2760
2778
  getCollectRemainingRewardsInstructionDataDecoder()
2761
2779
  );
@@ -2842,7 +2860,7 @@ function parseCollectRemainingRewardsInstruction(instruction) {
2842
2860
  }
2843
2861
 
2844
2862
  // src/generated/instructions/createAmmConfig.ts
2845
- var import_kit33 = require("@solana/kit");
2863
+ var import_kit34 = require("@solana/kit");
2846
2864
  var CREATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
2847
2865
  137,
2848
2866
  52,
@@ -2854,35 +2872,35 @@ var CREATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
2854
2872
  104
2855
2873
  ]);
2856
2874
  function getCreateAmmConfigDiscriminatorBytes() {
2857
- return (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8).encode(
2875
+ return (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8).encode(
2858
2876
  CREATE_AMM_CONFIG_DISCRIMINATOR
2859
2877
  );
2860
2878
  }
2861
2879
  function getCreateAmmConfigInstructionDataEncoder() {
2862
- return (0, import_kit33.transformEncoder)(
2863
- (0, import_kit33.getStructEncoder)([
2864
- ["discriminator", (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8)],
2865
- ["index", (0, import_kit33.getU16Encoder)()],
2866
- ["tickSpacing", (0, import_kit33.getU16Encoder)()],
2867
- ["tradeFeeRate", (0, import_kit33.getU32Encoder)()],
2868
- ["protocolFeeRate", (0, import_kit33.getU32Encoder)()],
2869
- ["fundFeeRate", (0, import_kit33.getU32Encoder)()]
2880
+ return (0, import_kit34.transformEncoder)(
2881
+ (0, import_kit34.getStructEncoder)([
2882
+ ["discriminator", (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8)],
2883
+ ["index", (0, import_kit34.getU16Encoder)()],
2884
+ ["tickSpacing", (0, import_kit34.getU16Encoder)()],
2885
+ ["tradeFeeRate", (0, import_kit34.getU32Encoder)()],
2886
+ ["protocolFeeRate", (0, import_kit34.getU32Encoder)()],
2887
+ ["fundFeeRate", (0, import_kit34.getU32Encoder)()]
2870
2888
  ]),
2871
2889
  (value) => ({ ...value, discriminator: CREATE_AMM_CONFIG_DISCRIMINATOR })
2872
2890
  );
2873
2891
  }
2874
2892
  function getCreateAmmConfigInstructionDataDecoder() {
2875
- return (0, import_kit33.getStructDecoder)([
2876
- ["discriminator", (0, import_kit33.fixDecoderSize)((0, import_kit33.getBytesDecoder)(), 8)],
2877
- ["index", (0, import_kit33.getU16Decoder)()],
2878
- ["tickSpacing", (0, import_kit33.getU16Decoder)()],
2879
- ["tradeFeeRate", (0, import_kit33.getU32Decoder)()],
2880
- ["protocolFeeRate", (0, import_kit33.getU32Decoder)()],
2881
- ["fundFeeRate", (0, import_kit33.getU32Decoder)()]
2893
+ return (0, import_kit34.getStructDecoder)([
2894
+ ["discriminator", (0, import_kit34.fixDecoderSize)((0, import_kit34.getBytesDecoder)(), 8)],
2895
+ ["index", (0, import_kit34.getU16Decoder)()],
2896
+ ["tickSpacing", (0, import_kit34.getU16Decoder)()],
2897
+ ["tradeFeeRate", (0, import_kit34.getU32Decoder)()],
2898
+ ["protocolFeeRate", (0, import_kit34.getU32Decoder)()],
2899
+ ["fundFeeRate", (0, import_kit34.getU32Decoder)()]
2882
2900
  ]);
2883
2901
  }
2884
2902
  function getCreateAmmConfigInstructionDataCodec() {
2885
- return (0, import_kit33.combineCodec)(
2903
+ return (0, import_kit34.combineCodec)(
2886
2904
  getCreateAmmConfigInstructionDataEncoder(),
2887
2905
  getCreateAmmConfigInstructionDataDecoder()
2888
2906
  );
@@ -2900,13 +2918,13 @@ async function getCreateAmmConfigInstructionAsync(input, config) {
2900
2918
  accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
2901
2919
  }
2902
2920
  if (!accounts.ammConfig.value) {
2903
- accounts.ammConfig.value = await (0, import_kit33.getProgramDerivedAddress)({
2921
+ accounts.ammConfig.value = await (0, import_kit34.getProgramDerivedAddress)({
2904
2922
  programAddress,
2905
2923
  seeds: [
2906
- (0, import_kit33.getBytesEncoder)().encode(
2924
+ (0, import_kit34.getBytesEncoder)().encode(
2907
2925
  new Uint8Array([97, 109, 109, 95, 99, 111, 110, 102, 105, 103])
2908
2926
  ),
2909
- (0, import_kit33.getU16Encoder)().encode(expectSome(args.index))
2927
+ (0, import_kit34.getU16Encoder)().encode(expectSome(args.index))
2910
2928
  ]
2911
2929
  });
2912
2930
  }
@@ -2976,7 +2994,7 @@ function parseCreateAmmConfigInstruction(instruction) {
2976
2994
  }
2977
2995
 
2978
2996
  // src/generated/instructions/createOperationAccount.ts
2979
- var import_kit34 = require("@solana/kit");
2997
+ var import_kit35 = require("@solana/kit");
2980
2998
  var CREATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
2981
2999
  63,
2982
3000
  87,
@@ -2988,13 +3006,13 @@ var CREATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
2988
3006
  104
2989
3007
  ]);
2990
3008
  function getCreateOperationAccountDiscriminatorBytes() {
2991
- return (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8).encode(
3009
+ return (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8).encode(
2992
3010
  CREATE_OPERATION_ACCOUNT_DISCRIMINATOR
2993
3011
  );
2994
3012
  }
2995
3013
  function getCreateOperationAccountInstructionDataEncoder() {
2996
- return (0, import_kit34.transformEncoder)(
2997
- (0, import_kit34.getStructEncoder)([["discriminator", (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8)]]),
3014
+ return (0, import_kit35.transformEncoder)(
3015
+ (0, import_kit35.getStructEncoder)([["discriminator", (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8)]]),
2998
3016
  (value) => ({
2999
3017
  ...value,
3000
3018
  discriminator: CREATE_OPERATION_ACCOUNT_DISCRIMINATOR
@@ -3002,12 +3020,12 @@ function getCreateOperationAccountInstructionDataEncoder() {
3002
3020
  );
3003
3021
  }
3004
3022
  function getCreateOperationAccountInstructionDataDecoder() {
3005
- return (0, import_kit34.getStructDecoder)([
3006
- ["discriminator", (0, import_kit34.fixDecoderSize)((0, import_kit34.getBytesDecoder)(), 8)]
3023
+ return (0, import_kit35.getStructDecoder)([
3024
+ ["discriminator", (0, import_kit35.fixDecoderSize)((0, import_kit35.getBytesDecoder)(), 8)]
3007
3025
  ]);
3008
3026
  }
3009
3027
  function getCreateOperationAccountInstructionDataCodec() {
3010
- return (0, import_kit34.combineCodec)(
3028
+ return (0, import_kit35.combineCodec)(
3011
3029
  getCreateOperationAccountInstructionDataEncoder(),
3012
3030
  getCreateOperationAccountInstructionDataDecoder()
3013
3031
  );
@@ -3024,10 +3042,10 @@ async function getCreateOperationAccountInstructionAsync(input, config) {
3024
3042
  accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
3025
3043
  }
3026
3044
  if (!accounts.operationState.value) {
3027
- accounts.operationState.value = await (0, import_kit34.getProgramDerivedAddress)({
3045
+ accounts.operationState.value = await (0, import_kit35.getProgramDerivedAddress)({
3028
3046
  programAddress,
3029
3047
  seeds: [
3030
- (0, import_kit34.getBytesEncoder)().encode(
3048
+ (0, import_kit35.getBytesEncoder)().encode(
3031
3049
  new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
3032
3050
  )
3033
3051
  ]
@@ -3096,7 +3114,7 @@ function parseCreateOperationAccountInstruction(instruction) {
3096
3114
  }
3097
3115
 
3098
3116
  // src/generated/instructions/createPool.ts
3099
- var import_kit35 = require("@solana/kit");
3117
+ var import_kit36 = require("@solana/kit");
3100
3118
  var CREATE_POOL_DISCRIMINATOR = new Uint8Array([
3101
3119
  233,
3102
3120
  146,
@@ -3108,27 +3126,27 @@ var CREATE_POOL_DISCRIMINATOR = new Uint8Array([
3108
3126
  188
3109
3127
  ]);
3110
3128
  function getCreatePoolDiscriminatorBytes() {
3111
- return (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8).encode(CREATE_POOL_DISCRIMINATOR);
3129
+ return (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8).encode(CREATE_POOL_DISCRIMINATOR);
3112
3130
  }
3113
3131
  function getCreatePoolInstructionDataEncoder() {
3114
- return (0, import_kit35.transformEncoder)(
3115
- (0, import_kit35.getStructEncoder)([
3116
- ["discriminator", (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8)],
3117
- ["sqrtPriceX64", (0, import_kit35.getU128Encoder)()],
3118
- ["openTime", (0, import_kit35.getU64Encoder)()]
3132
+ return (0, import_kit36.transformEncoder)(
3133
+ (0, import_kit36.getStructEncoder)([
3134
+ ["discriminator", (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8)],
3135
+ ["sqrtPriceX64", (0, import_kit36.getU128Encoder)()],
3136
+ ["openTime", (0, import_kit36.getU64Encoder)()]
3119
3137
  ]),
3120
3138
  (value) => ({ ...value, discriminator: CREATE_POOL_DISCRIMINATOR })
3121
3139
  );
3122
3140
  }
3123
3141
  function getCreatePoolInstructionDataDecoder() {
3124
- return (0, import_kit35.getStructDecoder)([
3125
- ["discriminator", (0, import_kit35.fixDecoderSize)((0, import_kit35.getBytesDecoder)(), 8)],
3126
- ["sqrtPriceX64", (0, import_kit35.getU128Decoder)()],
3127
- ["openTime", (0, import_kit35.getU64Decoder)()]
3142
+ return (0, import_kit36.getStructDecoder)([
3143
+ ["discriminator", (0, import_kit36.fixDecoderSize)((0, import_kit36.getBytesDecoder)(), 8)],
3144
+ ["sqrtPriceX64", (0, import_kit36.getU128Decoder)()],
3145
+ ["openTime", (0, import_kit36.getU64Decoder)()]
3128
3146
  ]);
3129
3147
  }
3130
3148
  function getCreatePoolInstructionDataCodec() {
3131
- return (0, import_kit35.combineCodec)(
3149
+ return (0, import_kit36.combineCodec)(
3132
3150
  getCreatePoolInstructionDataEncoder(),
3133
3151
  getCreatePoolInstructionDataDecoder()
3134
3152
  );
@@ -3156,56 +3174,56 @@ async function getCreatePoolInstructionAsync(input, config) {
3156
3174
  const accounts = originalAccounts;
3157
3175
  const args = { ...input };
3158
3176
  if (!accounts.poolState.value) {
3159
- accounts.poolState.value = await (0, import_kit35.getProgramDerivedAddress)({
3177
+ accounts.poolState.value = await (0, import_kit36.getProgramDerivedAddress)({
3160
3178
  programAddress,
3161
3179
  seeds: [
3162
- (0, import_kit35.getBytesEncoder)().encode(new Uint8Array([112, 111, 111, 108])),
3163
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.ammConfig.value)),
3164
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value)),
3165
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
3180
+ (0, import_kit36.getBytesEncoder)().encode(new Uint8Array([112, 111, 111, 108])),
3181
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.ammConfig.value)),
3182
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value)),
3183
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
3166
3184
  ]
3167
3185
  });
3168
3186
  }
3169
3187
  if (!accounts.tokenVault0.value) {
3170
- accounts.tokenVault0.value = await (0, import_kit35.getProgramDerivedAddress)({
3188
+ accounts.tokenVault0.value = await (0, import_kit36.getProgramDerivedAddress)({
3171
3189
  programAddress,
3172
3190
  seeds: [
3173
- (0, import_kit35.getBytesEncoder)().encode(
3191
+ (0, import_kit36.getBytesEncoder)().encode(
3174
3192
  new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
3175
3193
  ),
3176
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3177
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value))
3194
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3195
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value))
3178
3196
  ]
3179
3197
  });
3180
3198
  }
3181
3199
  if (!accounts.tokenVault1.value) {
3182
- accounts.tokenVault1.value = await (0, import_kit35.getProgramDerivedAddress)({
3200
+ accounts.tokenVault1.value = await (0, import_kit36.getProgramDerivedAddress)({
3183
3201
  programAddress,
3184
3202
  seeds: [
3185
- (0, import_kit35.getBytesEncoder)().encode(
3203
+ (0, import_kit36.getBytesEncoder)().encode(
3186
3204
  new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
3187
3205
  ),
3188
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3189
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
3206
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3207
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
3190
3208
  ]
3191
3209
  });
3192
3210
  }
3193
3211
  if (!accounts.observationState.value) {
3194
- accounts.observationState.value = await (0, import_kit35.getProgramDerivedAddress)({
3212
+ accounts.observationState.value = await (0, import_kit36.getProgramDerivedAddress)({
3195
3213
  programAddress,
3196
3214
  seeds: [
3197
- (0, import_kit35.getBytesEncoder)().encode(
3215
+ (0, import_kit36.getBytesEncoder)().encode(
3198
3216
  new Uint8Array([111, 98, 115, 101, 114, 118, 97, 116, 105, 111, 110])
3199
3217
  ),
3200
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
3218
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
3201
3219
  ]
3202
3220
  });
3203
3221
  }
3204
3222
  if (!accounts.tickArrayBitmap.value) {
3205
- accounts.tickArrayBitmap.value = await (0, import_kit35.getProgramDerivedAddress)({
3223
+ accounts.tickArrayBitmap.value = await (0, import_kit36.getProgramDerivedAddress)({
3206
3224
  programAddress,
3207
3225
  seeds: [
3208
- (0, import_kit35.getBytesEncoder)().encode(
3226
+ (0, import_kit36.getBytesEncoder)().encode(
3209
3227
  new Uint8Array([
3210
3228
  112,
3211
3229
  111,
@@ -3241,7 +3259,7 @@ async function getCreatePoolInstructionAsync(input, config) {
3241
3259
  110
3242
3260
  ])
3243
3261
  ),
3244
- (0, import_kit35.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
3262
+ (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
3245
3263
  ]
3246
3264
  });
3247
3265
  }
@@ -3357,7 +3375,7 @@ function parseCreatePoolInstruction(instruction) {
3357
3375
  }
3358
3376
 
3359
3377
  // src/generated/instructions/createSupportMintAssociated.ts
3360
- var import_kit36 = require("@solana/kit");
3378
+ var import_kit37 = require("@solana/kit");
3361
3379
  var CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
3362
3380
  17,
3363
3381
  251,
@@ -3369,13 +3387,13 @@ var CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
3369
3387
  169
3370
3388
  ]);
3371
3389
  function getCreateSupportMintAssociatedDiscriminatorBytes() {
3372
- return (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8).encode(
3390
+ return (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8).encode(
3373
3391
  CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
3374
3392
  );
3375
3393
  }
3376
3394
  function getCreateSupportMintAssociatedInstructionDataEncoder() {
3377
- return (0, import_kit36.transformEncoder)(
3378
- (0, import_kit36.getStructEncoder)([["discriminator", (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8)]]),
3395
+ return (0, import_kit37.transformEncoder)(
3396
+ (0, import_kit37.getStructEncoder)([["discriminator", (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8)]]),
3379
3397
  (value) => ({
3380
3398
  ...value,
3381
3399
  discriminator: CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
@@ -3383,12 +3401,12 @@ function getCreateSupportMintAssociatedInstructionDataEncoder() {
3383
3401
  );
3384
3402
  }
3385
3403
  function getCreateSupportMintAssociatedInstructionDataDecoder() {
3386
- return (0, import_kit36.getStructDecoder)([
3387
- ["discriminator", (0, import_kit36.fixDecoderSize)((0, import_kit36.getBytesDecoder)(), 8)]
3404
+ return (0, import_kit37.getStructDecoder)([
3405
+ ["discriminator", (0, import_kit37.fixDecoderSize)((0, import_kit37.getBytesDecoder)(), 8)]
3388
3406
  ]);
3389
3407
  }
3390
3408
  function getCreateSupportMintAssociatedInstructionDataCodec() {
3391
- return (0, import_kit36.combineCodec)(
3409
+ return (0, import_kit37.combineCodec)(
3392
3410
  getCreateSupportMintAssociatedInstructionDataEncoder(),
3393
3411
  getCreateSupportMintAssociatedInstructionDataDecoder()
3394
3412
  );
@@ -3406,10 +3424,10 @@ async function getCreateSupportMintAssociatedInstructionAsync(input, config) {
3406
3424
  };
3407
3425
  const accounts = originalAccounts;
3408
3426
  if (!accounts.supportMintAssociated.value) {
3409
- accounts.supportMintAssociated.value = await (0, import_kit36.getProgramDerivedAddress)({
3427
+ accounts.supportMintAssociated.value = await (0, import_kit37.getProgramDerivedAddress)({
3410
3428
  programAddress,
3411
3429
  seeds: [
3412
- (0, import_kit36.getBytesEncoder)().encode(
3430
+ (0, import_kit37.getBytesEncoder)().encode(
3413
3431
  new Uint8Array([
3414
3432
  115,
3415
3433
  117,
@@ -3425,7 +3443,7 @@ async function getCreateSupportMintAssociatedInstructionAsync(input, config) {
3425
3443
  116
3426
3444
  ])
3427
3445
  ),
3428
- (0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint.value))
3446
+ (0, import_kit37.getAddressEncoder)().encode(expectAddress(accounts.tokenMint.value))
3429
3447
  ]
3430
3448
  });
3431
3449
  }
@@ -3496,7 +3514,7 @@ function parseCreateSupportMintAssociatedInstruction(instruction) {
3496
3514
  }
3497
3515
 
3498
3516
  // src/generated/instructions/decreaseLiquidityV2.ts
3499
- var import_kit37 = require("@solana/kit");
3517
+ var import_kit38 = require("@solana/kit");
3500
3518
  var DECREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
3501
3519
  58,
3502
3520
  127,
@@ -3508,17 +3526,17 @@ var DECREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
3508
3526
  96
3509
3527
  ]);
3510
3528
  function getDecreaseLiquidityV2DiscriminatorBytes() {
3511
- return (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8).encode(
3529
+ return (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8).encode(
3512
3530
  DECREASE_LIQUIDITY_V2_DISCRIMINATOR
3513
3531
  );
3514
3532
  }
3515
3533
  function getDecreaseLiquidityV2InstructionDataEncoder() {
3516
- return (0, import_kit37.transformEncoder)(
3517
- (0, import_kit37.getStructEncoder)([
3518
- ["discriminator", (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8)],
3519
- ["liquidity", (0, import_kit37.getU128Encoder)()],
3520
- ["amount0Min", (0, import_kit37.getU64Encoder)()],
3521
- ["amount1Min", (0, import_kit37.getU64Encoder)()]
3534
+ return (0, import_kit38.transformEncoder)(
3535
+ (0, import_kit38.getStructEncoder)([
3536
+ ["discriminator", (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8)],
3537
+ ["liquidity", (0, import_kit38.getU128Encoder)()],
3538
+ ["amount0Min", (0, import_kit38.getU64Encoder)()],
3539
+ ["amount1Min", (0, import_kit38.getU64Encoder)()]
3522
3540
  ]),
3523
3541
  (value) => ({
3524
3542
  ...value,
@@ -3527,15 +3545,15 @@ function getDecreaseLiquidityV2InstructionDataEncoder() {
3527
3545
  );
3528
3546
  }
3529
3547
  function getDecreaseLiquidityV2InstructionDataDecoder() {
3530
- return (0, import_kit37.getStructDecoder)([
3531
- ["discriminator", (0, import_kit37.fixDecoderSize)((0, import_kit37.getBytesDecoder)(), 8)],
3532
- ["liquidity", (0, import_kit37.getU128Decoder)()],
3533
- ["amount0Min", (0, import_kit37.getU64Decoder)()],
3534
- ["amount1Min", (0, import_kit37.getU64Decoder)()]
3548
+ return (0, import_kit38.getStructDecoder)([
3549
+ ["discriminator", (0, import_kit38.fixDecoderSize)((0, import_kit38.getBytesDecoder)(), 8)],
3550
+ ["liquidity", (0, import_kit38.getU128Decoder)()],
3551
+ ["amount0Min", (0, import_kit38.getU64Decoder)()],
3552
+ ["amount1Min", (0, import_kit38.getU64Decoder)()]
3535
3553
  ]);
3536
3554
  }
3537
3555
  function getDecreaseLiquidityV2InstructionDataCodec() {
3538
- return (0, import_kit37.combineCodec)(
3556
+ return (0, import_kit38.combineCodec)(
3539
3557
  getDecreaseLiquidityV2InstructionDataEncoder(),
3540
3558
  getDecreaseLiquidityV2InstructionDataDecoder()
3541
3559
  );
@@ -3649,7 +3667,7 @@ function parseDecreaseLiquidityV2Instruction(instruction) {
3649
3667
  }
3650
3668
 
3651
3669
  // src/generated/instructions/increaseLiquidityV2.ts
3652
- var import_kit38 = require("@solana/kit");
3670
+ var import_kit39 = require("@solana/kit");
3653
3671
  var INCREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
3654
3672
  133,
3655
3673
  29,
@@ -3661,18 +3679,18 @@ var INCREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
3661
3679
  10
3662
3680
  ]);
3663
3681
  function getIncreaseLiquidityV2DiscriminatorBytes() {
3664
- return (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8).encode(
3682
+ return (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8).encode(
3665
3683
  INCREASE_LIQUIDITY_V2_DISCRIMINATOR
3666
3684
  );
3667
3685
  }
3668
3686
  function getIncreaseLiquidityV2InstructionDataEncoder() {
3669
- return (0, import_kit38.transformEncoder)(
3670
- (0, import_kit38.getStructEncoder)([
3671
- ["discriminator", (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8)],
3672
- ["liquidity", (0, import_kit38.getU128Encoder)()],
3673
- ["amount0Max", (0, import_kit38.getU64Encoder)()],
3674
- ["amount1Max", (0, import_kit38.getU64Encoder)()],
3675
- ["baseFlag", (0, import_kit38.getOptionEncoder)((0, import_kit38.getBooleanEncoder)())]
3687
+ return (0, import_kit39.transformEncoder)(
3688
+ (0, import_kit39.getStructEncoder)([
3689
+ ["discriminator", (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8)],
3690
+ ["liquidity", (0, import_kit39.getU128Encoder)()],
3691
+ ["amount0Max", (0, import_kit39.getU64Encoder)()],
3692
+ ["amount1Max", (0, import_kit39.getU64Encoder)()],
3693
+ ["baseFlag", (0, import_kit39.getOptionEncoder)((0, import_kit39.getBooleanEncoder)())]
3676
3694
  ]),
3677
3695
  (value) => ({
3678
3696
  ...value,
@@ -3681,16 +3699,16 @@ function getIncreaseLiquidityV2InstructionDataEncoder() {
3681
3699
  );
3682
3700
  }
3683
3701
  function getIncreaseLiquidityV2InstructionDataDecoder() {
3684
- return (0, import_kit38.getStructDecoder)([
3685
- ["discriminator", (0, import_kit38.fixDecoderSize)((0, import_kit38.getBytesDecoder)(), 8)],
3686
- ["liquidity", (0, import_kit38.getU128Decoder)()],
3687
- ["amount0Max", (0, import_kit38.getU64Decoder)()],
3688
- ["amount1Max", (0, import_kit38.getU64Decoder)()],
3689
- ["baseFlag", (0, import_kit38.getOptionDecoder)((0, import_kit38.getBooleanDecoder)())]
3702
+ return (0, import_kit39.getStructDecoder)([
3703
+ ["discriminator", (0, import_kit39.fixDecoderSize)((0, import_kit39.getBytesDecoder)(), 8)],
3704
+ ["liquidity", (0, import_kit39.getU128Decoder)()],
3705
+ ["amount0Max", (0, import_kit39.getU64Decoder)()],
3706
+ ["amount1Max", (0, import_kit39.getU64Decoder)()],
3707
+ ["baseFlag", (0, import_kit39.getOptionDecoder)((0, import_kit39.getBooleanDecoder)())]
3690
3708
  ]);
3691
3709
  }
3692
3710
  function getIncreaseLiquidityV2InstructionDataCodec() {
3693
- return (0, import_kit38.combineCodec)(
3711
+ return (0, import_kit39.combineCodec)(
3694
3712
  getIncreaseLiquidityV2InstructionDataEncoder(),
3695
3713
  getIncreaseLiquidityV2InstructionDataDecoder()
3696
3714
  );
@@ -3792,7 +3810,7 @@ function parseIncreaseLiquidityV2Instruction(instruction) {
3792
3810
  }
3793
3811
 
3794
3812
  // src/generated/instructions/initializeReward.ts
3795
- var import_kit39 = require("@solana/kit");
3813
+ var import_kit40 = require("@solana/kit");
3796
3814
  var INITIALIZE_REWARD_DISCRIMINATOR = new Uint8Array([
3797
3815
  95,
3798
3816
  135,
@@ -3804,31 +3822,31 @@ var INITIALIZE_REWARD_DISCRIMINATOR = new Uint8Array([
3804
3822
  68
3805
3823
  ]);
3806
3824
  function getInitializeRewardDiscriminatorBytes() {
3807
- return (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8).encode(
3825
+ return (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8).encode(
3808
3826
  INITIALIZE_REWARD_DISCRIMINATOR
3809
3827
  );
3810
3828
  }
3811
3829
  function getInitializeRewardInstructionDataEncoder() {
3812
- return (0, import_kit39.transformEncoder)(
3813
- (0, import_kit39.getStructEncoder)([
3814
- ["discriminator", (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8)],
3815
- ["openTime", (0, import_kit39.getU64Encoder)()],
3816
- ["endTime", (0, import_kit39.getU64Encoder)()],
3817
- ["emissionsPerSecondX64", (0, import_kit39.getU128Encoder)()]
3830
+ return (0, import_kit40.transformEncoder)(
3831
+ (0, import_kit40.getStructEncoder)([
3832
+ ["discriminator", (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8)],
3833
+ ["openTime", (0, import_kit40.getU64Encoder)()],
3834
+ ["endTime", (0, import_kit40.getU64Encoder)()],
3835
+ ["emissionsPerSecondX64", (0, import_kit40.getU128Encoder)()]
3818
3836
  ]),
3819
3837
  (value) => ({ ...value, discriminator: INITIALIZE_REWARD_DISCRIMINATOR })
3820
3838
  );
3821
3839
  }
3822
3840
  function getInitializeRewardInstructionDataDecoder() {
3823
- return (0, import_kit39.getStructDecoder)([
3824
- ["discriminator", (0, import_kit39.fixDecoderSize)((0, import_kit39.getBytesDecoder)(), 8)],
3825
- ["openTime", (0, import_kit39.getU64Decoder)()],
3826
- ["endTime", (0, import_kit39.getU64Decoder)()],
3827
- ["emissionsPerSecondX64", (0, import_kit39.getU128Decoder)()]
3841
+ return (0, import_kit40.getStructDecoder)([
3842
+ ["discriminator", (0, import_kit40.fixDecoderSize)((0, import_kit40.getBytesDecoder)(), 8)],
3843
+ ["openTime", (0, import_kit40.getU64Decoder)()],
3844
+ ["endTime", (0, import_kit40.getU64Decoder)()],
3845
+ ["emissionsPerSecondX64", (0, import_kit40.getU128Decoder)()]
3828
3846
  ]);
3829
3847
  }
3830
3848
  function getInitializeRewardInstructionDataCodec() {
3831
- return (0, import_kit39.combineCodec)(
3849
+ return (0, import_kit40.combineCodec)(
3832
3850
  getInitializeRewardInstructionDataEncoder(),
3833
3851
  getInitializeRewardInstructionDataDecoder()
3834
3852
  );
@@ -3862,20 +3880,20 @@ async function getInitializeRewardInstructionAsync(input, config) {
3862
3880
  const accounts = originalAccounts;
3863
3881
  const args = { ...input };
3864
3882
  if (!accounts.operationState.value) {
3865
- accounts.operationState.value = await (0, import_kit39.getProgramDerivedAddress)({
3883
+ accounts.operationState.value = await (0, import_kit40.getProgramDerivedAddress)({
3866
3884
  programAddress,
3867
3885
  seeds: [
3868
- (0, import_kit39.getBytesEncoder)().encode(
3886
+ (0, import_kit40.getBytesEncoder)().encode(
3869
3887
  new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
3870
3888
  )
3871
3889
  ]
3872
3890
  });
3873
3891
  }
3874
3892
  if (!accounts.rewardTokenVault.value) {
3875
- accounts.rewardTokenVault.value = await (0, import_kit39.getProgramDerivedAddress)({
3893
+ accounts.rewardTokenVault.value = await (0, import_kit40.getProgramDerivedAddress)({
3876
3894
  programAddress,
3877
3895
  seeds: [
3878
- (0, import_kit39.getBytesEncoder)().encode(
3896
+ (0, import_kit40.getBytesEncoder)().encode(
3879
3897
  new Uint8Array([
3880
3898
  112,
3881
3899
  111,
@@ -3896,8 +3914,8 @@ async function getInitializeRewardInstructionAsync(input, config) {
3896
3914
  116
3897
3915
  ])
3898
3916
  ),
3899
- (0, import_kit39.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3900
- (0, import_kit39.getAddressEncoder)().encode(
3917
+ (0, import_kit40.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
3918
+ (0, import_kit40.getAddressEncoder)().encode(
3901
3919
  expectAddress(accounts.rewardTokenMint.value)
3902
3920
  )
3903
3921
  ]
@@ -4012,7 +4030,7 @@ function parseInitializeRewardInstruction(instruction) {
4012
4030
  }
4013
4031
 
4014
4032
  // src/generated/instructions/openPositionWithToken22Nft.ts
4015
- var import_kit40 = require("@solana/kit");
4033
+ var import_kit41 = require("@solana/kit");
4016
4034
  var OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR = new Uint8Array([
4017
4035
  77,
4018
4036
  255,
@@ -4024,23 +4042,23 @@ var OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR = new Uint8Array([
4024
4042
  46
4025
4043
  ]);
4026
4044
  function getOpenPositionWithToken22NftDiscriminatorBytes() {
4027
- return (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8).encode(
4045
+ return (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8).encode(
4028
4046
  OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR
4029
4047
  );
4030
4048
  }
4031
4049
  function getOpenPositionWithToken22NftInstructionDataEncoder() {
4032
- return (0, import_kit40.transformEncoder)(
4033
- (0, import_kit40.getStructEncoder)([
4034
- ["discriminator", (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8)],
4035
- ["tickLowerIndex", (0, import_kit40.getI32Encoder)()],
4036
- ["tickUpperIndex", (0, import_kit40.getI32Encoder)()],
4037
- ["tickArrayLowerStartIndex", (0, import_kit40.getI32Encoder)()],
4038
- ["tickArrayUpperStartIndex", (0, import_kit40.getI32Encoder)()],
4039
- ["liquidity", (0, import_kit40.getU128Encoder)()],
4040
- ["amount0Max", (0, import_kit40.getU64Encoder)()],
4041
- ["amount1Max", (0, import_kit40.getU64Encoder)()],
4042
- ["withMetadata", (0, import_kit40.getBooleanEncoder)()],
4043
- ["baseFlag", (0, import_kit40.getOptionEncoder)((0, import_kit40.getBooleanEncoder)())]
4050
+ return (0, import_kit41.transformEncoder)(
4051
+ (0, import_kit41.getStructEncoder)([
4052
+ ["discriminator", (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8)],
4053
+ ["tickLowerIndex", (0, import_kit41.getI32Encoder)()],
4054
+ ["tickUpperIndex", (0, import_kit41.getI32Encoder)()],
4055
+ ["tickArrayLowerStartIndex", (0, import_kit41.getI32Encoder)()],
4056
+ ["tickArrayUpperStartIndex", (0, import_kit41.getI32Encoder)()],
4057
+ ["liquidity", (0, import_kit41.getU128Encoder)()],
4058
+ ["amount0Max", (0, import_kit41.getU64Encoder)()],
4059
+ ["amount1Max", (0, import_kit41.getU64Encoder)()],
4060
+ ["withMetadata", (0, import_kit41.getBooleanEncoder)()],
4061
+ ["baseFlag", (0, import_kit41.getOptionEncoder)((0, import_kit41.getBooleanEncoder)())]
4044
4062
  ]),
4045
4063
  (value) => ({
4046
4064
  ...value,
@@ -4049,21 +4067,21 @@ function getOpenPositionWithToken22NftInstructionDataEncoder() {
4049
4067
  );
4050
4068
  }
4051
4069
  function getOpenPositionWithToken22NftInstructionDataDecoder() {
4052
- return (0, import_kit40.getStructDecoder)([
4053
- ["discriminator", (0, import_kit40.fixDecoderSize)((0, import_kit40.getBytesDecoder)(), 8)],
4054
- ["tickLowerIndex", (0, import_kit40.getI32Decoder)()],
4055
- ["tickUpperIndex", (0, import_kit40.getI32Decoder)()],
4056
- ["tickArrayLowerStartIndex", (0, import_kit40.getI32Decoder)()],
4057
- ["tickArrayUpperStartIndex", (0, import_kit40.getI32Decoder)()],
4058
- ["liquidity", (0, import_kit40.getU128Decoder)()],
4059
- ["amount0Max", (0, import_kit40.getU64Decoder)()],
4060
- ["amount1Max", (0, import_kit40.getU64Decoder)()],
4061
- ["withMetadata", (0, import_kit40.getBooleanDecoder)()],
4062
- ["baseFlag", (0, import_kit40.getOptionDecoder)((0, import_kit40.getBooleanDecoder)())]
4070
+ return (0, import_kit41.getStructDecoder)([
4071
+ ["discriminator", (0, import_kit41.fixDecoderSize)((0, import_kit41.getBytesDecoder)(), 8)],
4072
+ ["tickLowerIndex", (0, import_kit41.getI32Decoder)()],
4073
+ ["tickUpperIndex", (0, import_kit41.getI32Decoder)()],
4074
+ ["tickArrayLowerStartIndex", (0, import_kit41.getI32Decoder)()],
4075
+ ["tickArrayUpperStartIndex", (0, import_kit41.getI32Decoder)()],
4076
+ ["liquidity", (0, import_kit41.getU128Decoder)()],
4077
+ ["amount0Max", (0, import_kit41.getU64Decoder)()],
4078
+ ["amount1Max", (0, import_kit41.getU64Decoder)()],
4079
+ ["withMetadata", (0, import_kit41.getBooleanDecoder)()],
4080
+ ["baseFlag", (0, import_kit41.getOptionDecoder)((0, import_kit41.getBooleanDecoder)())]
4063
4081
  ]);
4064
4082
  }
4065
4083
  function getOpenPositionWithToken22NftInstructionDataCodec() {
4066
- return (0, import_kit40.combineCodec)(
4084
+ return (0, import_kit41.combineCodec)(
4067
4085
  getOpenPositionWithToken22NftInstructionDataEncoder(),
4068
4086
  getOpenPositionWithToken22NftInstructionDataDecoder()
4069
4087
  );
@@ -4113,37 +4131,37 @@ async function getOpenPositionWithToken22NftInstructionAsync(input, config) {
4113
4131
  const accounts = originalAccounts;
4114
4132
  const args = { ...input };
4115
4133
  if (!accounts.tickArrayLower.value) {
4116
- accounts.tickArrayLower.value = await (0, import_kit40.getProgramDerivedAddress)({
4134
+ accounts.tickArrayLower.value = await (0, import_kit41.getProgramDerivedAddress)({
4117
4135
  programAddress,
4118
4136
  seeds: [
4119
- (0, import_kit40.getBytesEncoder)().encode(
4137
+ (0, import_kit41.getBytesEncoder)().encode(
4120
4138
  new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
4121
4139
  ),
4122
- (0, import_kit40.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
4123
- (0, import_kit40.getI32Encoder)().encode(expectSome(args.tickArrayLowerStartIndex))
4140
+ (0, import_kit41.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
4141
+ (0, import_kit41.getI32Encoder)().encode(expectSome(args.tickArrayLowerStartIndex))
4124
4142
  ]
4125
4143
  });
4126
4144
  }
4127
4145
  if (!accounts.tickArrayUpper.value) {
4128
- accounts.tickArrayUpper.value = await (0, import_kit40.getProgramDerivedAddress)({
4146
+ accounts.tickArrayUpper.value = await (0, import_kit41.getProgramDerivedAddress)({
4129
4147
  programAddress,
4130
4148
  seeds: [
4131
- (0, import_kit40.getBytesEncoder)().encode(
4149
+ (0, import_kit41.getBytesEncoder)().encode(
4132
4150
  new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
4133
4151
  ),
4134
- (0, import_kit40.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
4135
- (0, import_kit40.getI32Encoder)().encode(expectSome(args.tickArrayUpperStartIndex))
4152
+ (0, import_kit41.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
4153
+ (0, import_kit41.getI32Encoder)().encode(expectSome(args.tickArrayUpperStartIndex))
4136
4154
  ]
4137
4155
  });
4138
4156
  }
4139
4157
  if (!accounts.personalPosition.value) {
4140
- accounts.personalPosition.value = await (0, import_kit40.getProgramDerivedAddress)({
4158
+ accounts.personalPosition.value = await (0, import_kit41.getProgramDerivedAddress)({
4141
4159
  programAddress,
4142
4160
  seeds: [
4143
- (0, import_kit40.getBytesEncoder)().encode(
4161
+ (0, import_kit41.getBytesEncoder)().encode(
4144
4162
  new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
4145
4163
  ),
4146
- (0, import_kit40.getAddressEncoder)().encode(
4164
+ (0, import_kit41.getAddressEncoder)().encode(
4147
4165
  expectAddress(accounts.positionNftMint.value)
4148
4166
  )
4149
4167
  ]
@@ -4324,7 +4342,7 @@ function parseOpenPositionWithToken22NftInstruction(instruction) {
4324
4342
  }
4325
4343
 
4326
4344
  // src/generated/instructions/setRewardParams.ts
4327
- var import_kit41 = require("@solana/kit");
4345
+ var import_kit42 = require("@solana/kit");
4328
4346
  var SET_REWARD_PARAMS_DISCRIMINATOR = new Uint8Array([
4329
4347
  112,
4330
4348
  52,
@@ -4336,33 +4354,33 @@ var SET_REWARD_PARAMS_DISCRIMINATOR = new Uint8Array([
4336
4354
  137
4337
4355
  ]);
4338
4356
  function getSetRewardParamsDiscriminatorBytes() {
4339
- return (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8).encode(
4357
+ return (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8).encode(
4340
4358
  SET_REWARD_PARAMS_DISCRIMINATOR
4341
4359
  );
4342
4360
  }
4343
4361
  function getSetRewardParamsInstructionDataEncoder() {
4344
- return (0, import_kit41.transformEncoder)(
4345
- (0, import_kit41.getStructEncoder)([
4346
- ["discriminator", (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8)],
4347
- ["rewardIndex", (0, import_kit41.getU8Encoder)()],
4348
- ["emissionsPerSecondX64", (0, import_kit41.getU128Encoder)()],
4349
- ["openTime", (0, import_kit41.getU64Encoder)()],
4350
- ["endTime", (0, import_kit41.getU64Encoder)()]
4362
+ return (0, import_kit42.transformEncoder)(
4363
+ (0, import_kit42.getStructEncoder)([
4364
+ ["discriminator", (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8)],
4365
+ ["rewardIndex", (0, import_kit42.getU8Encoder)()],
4366
+ ["emissionsPerSecondX64", (0, import_kit42.getU128Encoder)()],
4367
+ ["openTime", (0, import_kit42.getU64Encoder)()],
4368
+ ["endTime", (0, import_kit42.getU64Encoder)()]
4351
4369
  ]),
4352
4370
  (value) => ({ ...value, discriminator: SET_REWARD_PARAMS_DISCRIMINATOR })
4353
4371
  );
4354
4372
  }
4355
4373
  function getSetRewardParamsInstructionDataDecoder() {
4356
- return (0, import_kit41.getStructDecoder)([
4357
- ["discriminator", (0, import_kit41.fixDecoderSize)((0, import_kit41.getBytesDecoder)(), 8)],
4358
- ["rewardIndex", (0, import_kit41.getU8Decoder)()],
4359
- ["emissionsPerSecondX64", (0, import_kit41.getU128Decoder)()],
4360
- ["openTime", (0, import_kit41.getU64Decoder)()],
4361
- ["endTime", (0, import_kit41.getU64Decoder)()]
4374
+ return (0, import_kit42.getStructDecoder)([
4375
+ ["discriminator", (0, import_kit42.fixDecoderSize)((0, import_kit42.getBytesDecoder)(), 8)],
4376
+ ["rewardIndex", (0, import_kit42.getU8Decoder)()],
4377
+ ["emissionsPerSecondX64", (0, import_kit42.getU128Decoder)()],
4378
+ ["openTime", (0, import_kit42.getU64Decoder)()],
4379
+ ["endTime", (0, import_kit42.getU64Decoder)()]
4362
4380
  ]);
4363
4381
  }
4364
4382
  function getSetRewardParamsInstructionDataCodec() {
4365
- return (0, import_kit41.combineCodec)(
4383
+ return (0, import_kit42.combineCodec)(
4366
4384
  getSetRewardParamsInstructionDataEncoder(),
4367
4385
  getSetRewardParamsInstructionDataDecoder()
4368
4386
  );
@@ -4383,10 +4401,10 @@ async function getSetRewardParamsInstructionAsync(input, config) {
4383
4401
  const accounts = originalAccounts;
4384
4402
  const args = { ...input };
4385
4403
  if (!accounts.operationState.value) {
4386
- accounts.operationState.value = await (0, import_kit41.getProgramDerivedAddress)({
4404
+ accounts.operationState.value = await (0, import_kit42.getProgramDerivedAddress)({
4387
4405
  programAddress,
4388
4406
  seeds: [
4389
- (0, import_kit41.getBytesEncoder)().encode(
4407
+ (0, import_kit42.getBytesEncoder)().encode(
4390
4408
  new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
4391
4409
  )
4392
4410
  ]
@@ -4476,7 +4494,7 @@ function parseSetRewardParamsInstruction(instruction) {
4476
4494
  }
4477
4495
 
4478
4496
  // src/generated/instructions/swapRouterBaseIn.ts
4479
- var import_kit42 = require("@solana/kit");
4497
+ var import_kit43 = require("@solana/kit");
4480
4498
  var SWAP_ROUTER_BASE_IN_DISCRIMINATOR = new Uint8Array([
4481
4499
  69,
4482
4500
  125,
@@ -4488,29 +4506,29 @@ var SWAP_ROUTER_BASE_IN_DISCRIMINATOR = new Uint8Array([
4488
4506
  196
4489
4507
  ]);
4490
4508
  function getSwapRouterBaseInDiscriminatorBytes() {
4491
- return (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8).encode(
4509
+ return (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8).encode(
4492
4510
  SWAP_ROUTER_BASE_IN_DISCRIMINATOR
4493
4511
  );
4494
4512
  }
4495
4513
  function getSwapRouterBaseInInstructionDataEncoder() {
4496
- return (0, import_kit42.transformEncoder)(
4497
- (0, import_kit42.getStructEncoder)([
4498
- ["discriminator", (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8)],
4499
- ["amountIn", (0, import_kit42.getU64Encoder)()],
4500
- ["amountOutMinimum", (0, import_kit42.getU64Encoder)()]
4514
+ return (0, import_kit43.transformEncoder)(
4515
+ (0, import_kit43.getStructEncoder)([
4516
+ ["discriminator", (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8)],
4517
+ ["amountIn", (0, import_kit43.getU64Encoder)()],
4518
+ ["amountOutMinimum", (0, import_kit43.getU64Encoder)()]
4501
4519
  ]),
4502
4520
  (value) => ({ ...value, discriminator: SWAP_ROUTER_BASE_IN_DISCRIMINATOR })
4503
4521
  );
4504
4522
  }
4505
4523
  function getSwapRouterBaseInInstructionDataDecoder() {
4506
- return (0, import_kit42.getStructDecoder)([
4507
- ["discriminator", (0, import_kit42.fixDecoderSize)((0, import_kit42.getBytesDecoder)(), 8)],
4508
- ["amountIn", (0, import_kit42.getU64Decoder)()],
4509
- ["amountOutMinimum", (0, import_kit42.getU64Decoder)()]
4524
+ return (0, import_kit43.getStructDecoder)([
4525
+ ["discriminator", (0, import_kit43.fixDecoderSize)((0, import_kit43.getBytesDecoder)(), 8)],
4526
+ ["amountIn", (0, import_kit43.getU64Decoder)()],
4527
+ ["amountOutMinimum", (0, import_kit43.getU64Decoder)()]
4510
4528
  ]);
4511
4529
  }
4512
4530
  function getSwapRouterBaseInInstructionDataCodec() {
4513
- return (0, import_kit42.combineCodec)(
4531
+ return (0, import_kit43.combineCodec)(
4514
4532
  getSwapRouterBaseInInstructionDataEncoder(),
4515
4533
  getSwapRouterBaseInInstructionDataDecoder()
4516
4534
  );
@@ -4583,7 +4601,7 @@ function parseSwapRouterBaseInInstruction(instruction) {
4583
4601
  }
4584
4602
 
4585
4603
  // src/generated/instructions/swapV2.ts
4586
- var import_kit43 = require("@solana/kit");
4604
+ var import_kit44 = require("@solana/kit");
4587
4605
  var SWAP_V2_DISCRIMINATOR = new Uint8Array([
4588
4606
  43,
4589
4607
  4,
@@ -4595,31 +4613,31 @@ var SWAP_V2_DISCRIMINATOR = new Uint8Array([
4595
4613
  98
4596
4614
  ]);
4597
4615
  function getSwapV2DiscriminatorBytes() {
4598
- return (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8).encode(SWAP_V2_DISCRIMINATOR);
4616
+ return (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8).encode(SWAP_V2_DISCRIMINATOR);
4599
4617
  }
4600
4618
  function getSwapV2InstructionDataEncoder() {
4601
- return (0, import_kit43.transformEncoder)(
4602
- (0, import_kit43.getStructEncoder)([
4603
- ["discriminator", (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8)],
4604
- ["amount", (0, import_kit43.getU64Encoder)()],
4605
- ["otherAmountThreshold", (0, import_kit43.getU64Encoder)()],
4606
- ["sqrtPriceLimitX64", (0, import_kit43.getU128Encoder)()],
4607
- ["isBaseInput", (0, import_kit43.getBooleanEncoder)()]
4619
+ return (0, import_kit44.transformEncoder)(
4620
+ (0, import_kit44.getStructEncoder)([
4621
+ ["discriminator", (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8)],
4622
+ ["amount", (0, import_kit44.getU64Encoder)()],
4623
+ ["otherAmountThreshold", (0, import_kit44.getU64Encoder)()],
4624
+ ["sqrtPriceLimitX64", (0, import_kit44.getU128Encoder)()],
4625
+ ["isBaseInput", (0, import_kit44.getBooleanEncoder)()]
4608
4626
  ]),
4609
4627
  (value) => ({ ...value, discriminator: SWAP_V2_DISCRIMINATOR })
4610
4628
  );
4611
4629
  }
4612
4630
  function getSwapV2InstructionDataDecoder() {
4613
- return (0, import_kit43.getStructDecoder)([
4614
- ["discriminator", (0, import_kit43.fixDecoderSize)((0, import_kit43.getBytesDecoder)(), 8)],
4615
- ["amount", (0, import_kit43.getU64Decoder)()],
4616
- ["otherAmountThreshold", (0, import_kit43.getU64Decoder)()],
4617
- ["sqrtPriceLimitX64", (0, import_kit43.getU128Decoder)()],
4618
- ["isBaseInput", (0, import_kit43.getBooleanDecoder)()]
4631
+ return (0, import_kit44.getStructDecoder)([
4632
+ ["discriminator", (0, import_kit44.fixDecoderSize)((0, import_kit44.getBytesDecoder)(), 8)],
4633
+ ["amount", (0, import_kit44.getU64Decoder)()],
4634
+ ["otherAmountThreshold", (0, import_kit44.getU64Decoder)()],
4635
+ ["sqrtPriceLimitX64", (0, import_kit44.getU128Decoder)()],
4636
+ ["isBaseInput", (0, import_kit44.getBooleanDecoder)()]
4619
4637
  ]);
4620
4638
  }
4621
4639
  function getSwapV2InstructionDataCodec() {
4622
- return (0, import_kit43.combineCodec)(
4640
+ return (0, import_kit44.combineCodec)(
4623
4641
  getSwapV2InstructionDataEncoder(),
4624
4642
  getSwapV2InstructionDataDecoder()
4625
4643
  );
@@ -4722,7 +4740,7 @@ function parseSwapV2Instruction(instruction) {
4722
4740
  }
4723
4741
 
4724
4742
  // src/generated/instructions/transferRewardOwner.ts
4725
- var import_kit44 = require("@solana/kit");
4743
+ var import_kit45 = require("@solana/kit");
4726
4744
  var TRANSFER_REWARD_OWNER_DISCRIMINATOR = new Uint8Array([
4727
4745
  7,
4728
4746
  22,
@@ -4734,15 +4752,15 @@ var TRANSFER_REWARD_OWNER_DISCRIMINATOR = new Uint8Array([
4734
4752
  121
4735
4753
  ]);
4736
4754
  function getTransferRewardOwnerDiscriminatorBytes() {
4737
- return (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8).encode(
4755
+ return (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8).encode(
4738
4756
  TRANSFER_REWARD_OWNER_DISCRIMINATOR
4739
4757
  );
4740
4758
  }
4741
4759
  function getTransferRewardOwnerInstructionDataEncoder() {
4742
- return (0, import_kit44.transformEncoder)(
4743
- (0, import_kit44.getStructEncoder)([
4744
- ["discriminator", (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8)],
4745
- ["newOwner", (0, import_kit44.getAddressEncoder)()]
4760
+ return (0, import_kit45.transformEncoder)(
4761
+ (0, import_kit45.getStructEncoder)([
4762
+ ["discriminator", (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8)],
4763
+ ["newOwner", (0, import_kit45.getAddressEncoder)()]
4746
4764
  ]),
4747
4765
  (value) => ({
4748
4766
  ...value,
@@ -4751,13 +4769,13 @@ function getTransferRewardOwnerInstructionDataEncoder() {
4751
4769
  );
4752
4770
  }
4753
4771
  function getTransferRewardOwnerInstructionDataDecoder() {
4754
- return (0, import_kit44.getStructDecoder)([
4755
- ["discriminator", (0, import_kit44.fixDecoderSize)((0, import_kit44.getBytesDecoder)(), 8)],
4756
- ["newOwner", (0, import_kit44.getAddressDecoder)()]
4772
+ return (0, import_kit45.getStructDecoder)([
4773
+ ["discriminator", (0, import_kit45.fixDecoderSize)((0, import_kit45.getBytesDecoder)(), 8)],
4774
+ ["newOwner", (0, import_kit45.getAddressDecoder)()]
4757
4775
  ]);
4758
4776
  }
4759
4777
  function getTransferRewardOwnerInstructionDataCodec() {
4760
- return (0, import_kit44.combineCodec)(
4778
+ return (0, import_kit45.combineCodec)(
4761
4779
  getTransferRewardOwnerInstructionDataEncoder(),
4762
4780
  getTransferRewardOwnerInstructionDataDecoder()
4763
4781
  );
@@ -4805,7 +4823,7 @@ function parseTransferRewardOwnerInstruction(instruction) {
4805
4823
  }
4806
4824
 
4807
4825
  // src/generated/instructions/updateAmmConfig.ts
4808
- var import_kit45 = require("@solana/kit");
4826
+ var import_kit46 = require("@solana/kit");
4809
4827
  var UPDATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
4810
4828
  49,
4811
4829
  60,
@@ -4817,29 +4835,29 @@ var UPDATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
4817
4835
  200
4818
4836
  ]);
4819
4837
  function getUpdateAmmConfigDiscriminatorBytes() {
4820
- return (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8).encode(
4838
+ return (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8).encode(
4821
4839
  UPDATE_AMM_CONFIG_DISCRIMINATOR
4822
4840
  );
4823
4841
  }
4824
4842
  function getUpdateAmmConfigInstructionDataEncoder() {
4825
- return (0, import_kit45.transformEncoder)(
4826
- (0, import_kit45.getStructEncoder)([
4827
- ["discriminator", (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8)],
4828
- ["param", (0, import_kit45.getU8Encoder)()],
4829
- ["value", (0, import_kit45.getU32Encoder)()]
4843
+ return (0, import_kit46.transformEncoder)(
4844
+ (0, import_kit46.getStructEncoder)([
4845
+ ["discriminator", (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8)],
4846
+ ["param", (0, import_kit46.getU8Encoder)()],
4847
+ ["value", (0, import_kit46.getU32Encoder)()]
4830
4848
  ]),
4831
4849
  (value) => ({ ...value, discriminator: UPDATE_AMM_CONFIG_DISCRIMINATOR })
4832
4850
  );
4833
4851
  }
4834
4852
  function getUpdateAmmConfigInstructionDataDecoder() {
4835
- return (0, import_kit45.getStructDecoder)([
4836
- ["discriminator", (0, import_kit45.fixDecoderSize)((0, import_kit45.getBytesDecoder)(), 8)],
4837
- ["param", (0, import_kit45.getU8Decoder)()],
4838
- ["value", (0, import_kit45.getU32Decoder)()]
4853
+ return (0, import_kit46.getStructDecoder)([
4854
+ ["discriminator", (0, import_kit46.fixDecoderSize)((0, import_kit46.getBytesDecoder)(), 8)],
4855
+ ["param", (0, import_kit46.getU8Decoder)()],
4856
+ ["value", (0, import_kit46.getU32Decoder)()]
4839
4857
  ]);
4840
4858
  }
4841
4859
  function getUpdateAmmConfigInstructionDataCodec() {
4842
- return (0, import_kit45.combineCodec)(
4860
+ return (0, import_kit46.combineCodec)(
4843
4861
  getUpdateAmmConfigInstructionDataEncoder(),
4844
4862
  getUpdateAmmConfigInstructionDataDecoder()
4845
4863
  );
@@ -4885,7 +4903,7 @@ function parseUpdateAmmConfigInstruction(instruction) {
4885
4903
  }
4886
4904
 
4887
4905
  // src/generated/instructions/updateOperationAccount.ts
4888
- var import_kit46 = require("@solana/kit");
4906
+ var import_kit47 = require("@solana/kit");
4889
4907
  var UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
4890
4908
  127,
4891
4909
  70,
@@ -4897,16 +4915,16 @@ var UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
4897
4915
  7
4898
4916
  ]);
4899
4917
  function getUpdateOperationAccountDiscriminatorBytes() {
4900
- return (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8).encode(
4918
+ return (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8).encode(
4901
4919
  UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR
4902
4920
  );
4903
4921
  }
4904
4922
  function getUpdateOperationAccountInstructionDataEncoder() {
4905
- return (0, import_kit46.transformEncoder)(
4906
- (0, import_kit46.getStructEncoder)([
4907
- ["discriminator", (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8)],
4908
- ["param", (0, import_kit46.getU8Encoder)()],
4909
- ["keys", (0, import_kit46.getArrayEncoder)((0, import_kit46.getAddressEncoder)())]
4923
+ return (0, import_kit47.transformEncoder)(
4924
+ (0, import_kit47.getStructEncoder)([
4925
+ ["discriminator", (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8)],
4926
+ ["param", (0, import_kit47.getU8Encoder)()],
4927
+ ["keys", (0, import_kit47.getArrayEncoder)((0, import_kit47.getAddressEncoder)())]
4910
4928
  ]),
4911
4929
  (value) => ({
4912
4930
  ...value,
@@ -4915,14 +4933,14 @@ function getUpdateOperationAccountInstructionDataEncoder() {
4915
4933
  );
4916
4934
  }
4917
4935
  function getUpdateOperationAccountInstructionDataDecoder() {
4918
- return (0, import_kit46.getStructDecoder)([
4919
- ["discriminator", (0, import_kit46.fixDecoderSize)((0, import_kit46.getBytesDecoder)(), 8)],
4920
- ["param", (0, import_kit46.getU8Decoder)()],
4921
- ["keys", (0, import_kit46.getArrayDecoder)((0, import_kit46.getAddressDecoder)())]
4936
+ return (0, import_kit47.getStructDecoder)([
4937
+ ["discriminator", (0, import_kit47.fixDecoderSize)((0, import_kit47.getBytesDecoder)(), 8)],
4938
+ ["param", (0, import_kit47.getU8Decoder)()],
4939
+ ["keys", (0, import_kit47.getArrayDecoder)((0, import_kit47.getAddressDecoder)())]
4922
4940
  ]);
4923
4941
  }
4924
4942
  function getUpdateOperationAccountInstructionDataCodec() {
4925
- return (0, import_kit46.combineCodec)(
4943
+ return (0, import_kit47.combineCodec)(
4926
4944
  getUpdateOperationAccountInstructionDataEncoder(),
4927
4945
  getUpdateOperationAccountInstructionDataDecoder()
4928
4946
  );
@@ -4940,10 +4958,10 @@ async function getUpdateOperationAccountInstructionAsync(input, config) {
4940
4958
  accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
4941
4959
  }
4942
4960
  if (!accounts.operationState.value) {
4943
- accounts.operationState.value = await (0, import_kit46.getProgramDerivedAddress)({
4961
+ accounts.operationState.value = await (0, import_kit47.getProgramDerivedAddress)({
4944
4962
  programAddress,
4945
4963
  seeds: [
4946
- (0, import_kit46.getBytesEncoder)().encode(
4964
+ (0, import_kit47.getBytesEncoder)().encode(
4947
4965
  new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
4948
4966
  )
4949
4967
  ]
@@ -5017,7 +5035,7 @@ function parseUpdateOperationAccountInstruction(instruction) {
5017
5035
  }
5018
5036
 
5019
5037
  // src/generated/instructions/updatePoolStatus.ts
5020
- var import_kit47 = require("@solana/kit");
5038
+ var import_kit48 = require("@solana/kit");
5021
5039
  var UPDATE_POOL_STATUS_DISCRIMINATOR = new Uint8Array([
5022
5040
  130,
5023
5041
  87,
@@ -5029,27 +5047,27 @@ var UPDATE_POOL_STATUS_DISCRIMINATOR = new Uint8Array([
5029
5047
  123
5030
5048
  ]);
5031
5049
  function getUpdatePoolStatusDiscriminatorBytes() {
5032
- return (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8).encode(
5050
+ return (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8).encode(
5033
5051
  UPDATE_POOL_STATUS_DISCRIMINATOR
5034
5052
  );
5035
5053
  }
5036
5054
  function getUpdatePoolStatusInstructionDataEncoder() {
5037
- return (0, import_kit47.transformEncoder)(
5038
- (0, import_kit47.getStructEncoder)([
5039
- ["discriminator", (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8)],
5040
- ["status", (0, import_kit47.getU8Encoder)()]
5055
+ return (0, import_kit48.transformEncoder)(
5056
+ (0, import_kit48.getStructEncoder)([
5057
+ ["discriminator", (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8)],
5058
+ ["status", (0, import_kit48.getU8Encoder)()]
5041
5059
  ]),
5042
5060
  (value) => ({ ...value, discriminator: UPDATE_POOL_STATUS_DISCRIMINATOR })
5043
5061
  );
5044
5062
  }
5045
5063
  function getUpdatePoolStatusInstructionDataDecoder() {
5046
- return (0, import_kit47.getStructDecoder)([
5047
- ["discriminator", (0, import_kit47.fixDecoderSize)((0, import_kit47.getBytesDecoder)(), 8)],
5048
- ["status", (0, import_kit47.getU8Decoder)()]
5064
+ return (0, import_kit48.getStructDecoder)([
5065
+ ["discriminator", (0, import_kit48.fixDecoderSize)((0, import_kit48.getBytesDecoder)(), 8)],
5066
+ ["status", (0, import_kit48.getU8Decoder)()]
5049
5067
  ]);
5050
5068
  }
5051
5069
  function getUpdatePoolStatusInstructionDataCodec() {
5052
- return (0, import_kit47.combineCodec)(
5070
+ return (0, import_kit48.combineCodec)(
5053
5071
  getUpdatePoolStatusInstructionDataEncoder(),
5054
5072
  getUpdatePoolStatusInstructionDataDecoder()
5055
5073
  );
@@ -5095,7 +5113,7 @@ function parseUpdatePoolStatusInstruction(instruction) {
5095
5113
  }
5096
5114
 
5097
5115
  // src/generated/instructions/updateRewardInfos.ts
5098
- var import_kit48 = require("@solana/kit");
5116
+ var import_kit49 = require("@solana/kit");
5099
5117
  var UPDATE_REWARD_INFOS_DISCRIMINATOR = new Uint8Array([
5100
5118
  163,
5101
5119
  172,
@@ -5107,23 +5125,23 @@ var UPDATE_REWARD_INFOS_DISCRIMINATOR = new Uint8Array([
5107
5125
  223
5108
5126
  ]);
5109
5127
  function getUpdateRewardInfosDiscriminatorBytes() {
5110
- return (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8).encode(
5128
+ return (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8).encode(
5111
5129
  UPDATE_REWARD_INFOS_DISCRIMINATOR
5112
5130
  );
5113
5131
  }
5114
5132
  function getUpdateRewardInfosInstructionDataEncoder() {
5115
- return (0, import_kit48.transformEncoder)(
5116
- (0, import_kit48.getStructEncoder)([["discriminator", (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8)]]),
5133
+ return (0, import_kit49.transformEncoder)(
5134
+ (0, import_kit49.getStructEncoder)([["discriminator", (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8)]]),
5117
5135
  (value) => ({ ...value, discriminator: UPDATE_REWARD_INFOS_DISCRIMINATOR })
5118
5136
  );
5119
5137
  }
5120
5138
  function getUpdateRewardInfosInstructionDataDecoder() {
5121
- return (0, import_kit48.getStructDecoder)([
5122
- ["discriminator", (0, import_kit48.fixDecoderSize)((0, import_kit48.getBytesDecoder)(), 8)]
5139
+ return (0, import_kit49.getStructDecoder)([
5140
+ ["discriminator", (0, import_kit49.fixDecoderSize)((0, import_kit49.getBytesDecoder)(), 8)]
5123
5141
  ]);
5124
5142
  }
5125
5143
  function getUpdateRewardInfosInstructionDataCodec() {
5126
- return (0, import_kit48.combineCodec)(
5144
+ return (0, import_kit49.combineCodec)(
5127
5145
  getUpdateRewardInfosInstructionDataEncoder(),
5128
5146
  getUpdateRewardInfosInstructionDataDecoder()
5129
5147
  );
@@ -5602,9 +5620,9 @@ async function fetchTickArraysForRange(cluster, poolAddress, tickLower, tickUppe
5602
5620
  }
5603
5621
 
5604
5622
  // src/utils/pda.ts
5605
- var import_kit49 = require("@solana/kit");
5606
- var addressEncoder = (0, import_kit49.getAddressEncoder)();
5607
- var i32Encoder = (0, import_kit49.getI32Encoder)({ endian: import_kit49.Endian.Big });
5623
+ var import_kit50 = require("@solana/kit");
5624
+ var addressEncoder = (0, import_kit50.getAddressEncoder)();
5625
+ var i32Encoder = (0, import_kit50.getI32Encoder)({ endian: import_kit50.Endian.Big });
5608
5626
  var PdaUtils = class {
5609
5627
  /**
5610
5628
  * Derive pool state PDA
@@ -5614,7 +5632,7 @@ var PdaUtils = class {
5614
5632
  * @returns Pool state PDA
5615
5633
  */
5616
5634
  static async getPoolStatePda(ammConfig, tokenMintA, tokenMintB) {
5617
- return await (0, import_kit49.getProgramDerivedAddress)({
5635
+ return await (0, import_kit50.getProgramDerivedAddress)({
5618
5636
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5619
5637
  seeds: [
5620
5638
  PDA_SEEDS.POOL_STATE,
@@ -5630,9 +5648,9 @@ var PdaUtils = class {
5630
5648
  * @returns AMM config PDA
5631
5649
  */
5632
5650
  static async getAmmConfigPda(index) {
5633
- return await (0, import_kit49.getProgramDerivedAddress)({
5651
+ return await (0, import_kit50.getProgramDerivedAddress)({
5634
5652
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5635
- seeds: [PDA_SEEDS.AMM_CONFIG, (0, import_kit49.getU16Encoder)().encode(index)]
5653
+ seeds: [PDA_SEEDS.AMM_CONFIG, (0, import_kit50.getU16Encoder)().encode(index)]
5636
5654
  });
5637
5655
  }
5638
5656
  /**
@@ -5641,7 +5659,7 @@ var PdaUtils = class {
5641
5659
  * @returns Position state PDA
5642
5660
  */
5643
5661
  static async getPositionStatePda(nftMint) {
5644
- return await (0, import_kit49.getProgramDerivedAddress)({
5662
+ return await (0, import_kit50.getProgramDerivedAddress)({
5645
5663
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5646
5664
  seeds: [PDA_SEEDS.POSITION_STATE, addressEncoder.encode(nftMint)]
5647
5665
  });
@@ -5653,7 +5671,7 @@ var PdaUtils = class {
5653
5671
  * @returns Tick array state PDA
5654
5672
  */
5655
5673
  static async getTickArrayStatePda(poolState, startTickIndex) {
5656
- return await (0, import_kit49.getProgramDerivedAddress)({
5674
+ return await (0, import_kit50.getProgramDerivedAddress)({
5657
5675
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5658
5676
  seeds: [
5659
5677
  PDA_SEEDS.TICK_ARRAY_STATE,
@@ -5668,13 +5686,13 @@ var PdaUtils = class {
5668
5686
  * @returns Observation state PDA
5669
5687
  */
5670
5688
  static async getObservationStatePda(poolState) {
5671
- return await (0, import_kit49.getProgramDerivedAddress)({
5689
+ return await (0, import_kit50.getProgramDerivedAddress)({
5672
5690
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5673
5691
  seeds: [PDA_SEEDS.OBSERVATION_STATE, addressEncoder.encode(poolState)]
5674
5692
  });
5675
5693
  }
5676
5694
  static async getPoolVaultIdPda(poolAddress, vaultAddress) {
5677
- return await (0, import_kit49.getProgramDerivedAddress)({
5695
+ return await (0, import_kit50.getProgramDerivedAddress)({
5678
5696
  seeds: [
5679
5697
  PDA_SEEDS.POOL_VAULT,
5680
5698
  addressEncoder.encode(poolAddress),
@@ -5689,7 +5707,7 @@ var PdaUtils = class {
5689
5707
  * @returns Tick array bitmap extension PDA
5690
5708
  */
5691
5709
  static async getTickArrayBitmapExtensionPda(poolState) {
5692
- return await (0, import_kit49.getProgramDerivedAddress)({
5710
+ return await (0, import_kit50.getProgramDerivedAddress)({
5693
5711
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5694
5712
  seeds: [PDA_SEEDS.BITMAP_EXTENSION, addressEncoder.encode(poolState)]
5695
5713
  });
@@ -5741,7 +5759,7 @@ var PdaUtils = class {
5741
5759
  * @returns Protocol position state PDA
5742
5760
  */
5743
5761
  static async getProtocolPositionStatePda(poolState, tickLowerIndex, tickUpperIndex) {
5744
- return await (0, import_kit49.getProgramDerivedAddress)({
5762
+ return await (0, import_kit50.getProgramDerivedAddress)({
5745
5763
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5746
5764
  seeds: [
5747
5765
  PDA_SEEDS.POSITION_STATE,
@@ -5757,20 +5775,20 @@ var PdaUtils = class {
5757
5775
  * @returns Operation state PDA
5758
5776
  */
5759
5777
  static async getOperationStatePda(poolState) {
5760
- return await (0, import_kit49.getProgramDerivedAddress)({
5778
+ return await (0, import_kit50.getProgramDerivedAddress)({
5761
5779
  programAddress: STABBLE_CLMM_PROGRAM_ID,
5762
5780
  seeds: [PDA_SEEDS.OPERATION, addressEncoder.encode(poolState)]
5763
5781
  });
5764
5782
  }
5765
5783
  };
5766
5784
  async function getMetadataPda(mint) {
5767
- return await (0, import_kit49.getProgramDerivedAddress)({
5785
+ return await (0, import_kit50.getProgramDerivedAddress)({
5768
5786
  seeds: [
5769
5787
  "metadata",
5770
- addressEncoder.encode((0, import_kit49.address)(METADATA_PROGRAM_ID)),
5788
+ addressEncoder.encode((0, import_kit50.address)(METADATA_PROGRAM_ID)),
5771
5789
  addressEncoder.encode(mint)
5772
5790
  ],
5773
- programAddress: (0, import_kit49.address)(METADATA_PROGRAM_ID)
5791
+ programAddress: (0, import_kit50.address)(METADATA_PROGRAM_ID)
5774
5792
  });
5775
5793
  }
5776
5794
 
@@ -6557,7 +6575,7 @@ var LiquidityMath = class _LiquidityMath {
6557
6575
  };
6558
6576
  }
6559
6577
  }
6560
- static getAmountsFromLiquidityWithSlippage(sqrtPriceCurrentX64, sqrtPriceX64A, sqrtPriceX64B, liquidity, amountMax, roundUp, amountSlippage) {
6578
+ static getAmountsFromLiquidityWithSlippage(sqrtPriceCurrentX64, sqrtPriceX64A, sqrtPriceX64B, liquidity, add, roundUp, amountSlippage) {
6561
6579
  const { amountA, amountB } = _LiquidityMath.getAmountsFromLiquidity(
6562
6580
  sqrtPriceCurrentX64,
6563
6581
  sqrtPriceX64A,
@@ -6565,7 +6583,7 @@ var LiquidityMath = class _LiquidityMath {
6565
6583
  liquidity,
6566
6584
  roundUp
6567
6585
  );
6568
- const coefficient = amountMax ? 1 + amountSlippage : 1 - amountSlippage;
6586
+ const coefficient = add ? 1 + amountSlippage : 1 - amountSlippage;
6569
6587
  const amount0Slippage = new import_bn3.default(
6570
6588
  new import_decimal2.default(amountA.toString()).mul(coefficient).toFixed(0)
6571
6589
  );
@@ -6573,6 +6591,8 @@ var LiquidityMath = class _LiquidityMath {
6573
6591
  new import_decimal2.default(amountB.toString()).mul(coefficient).toFixed(0)
6574
6592
  );
6575
6593
  return {
6594
+ amountA,
6595
+ amountB,
6576
6596
  amountSlippageA: amount0Slippage,
6577
6597
  amountSlippageB: amount1Slippage
6578
6598
  };
@@ -7452,7 +7472,7 @@ var PoolUtils = class {
7452
7472
  };
7453
7473
 
7454
7474
  // src/utils/index.ts
7455
- var import_kit50 = require("@solana/kit");
7475
+ var import_kit51 = require("@solana/kit");
7456
7476
  function validateAddress(address6, name = "address") {
7457
7477
  if (!address6 || address6.length === 0) {
7458
7478
  throw new ClmmError(
@@ -7524,7 +7544,7 @@ function isValidSolanaAddress(address6) {
7524
7544
  }
7525
7545
  }
7526
7546
  function addresstoBytes(address6) {
7527
- const encoder = (0, import_kit50.getAddressEncoder)();
7547
+ const encoder = (0, import_kit51.getAddressEncoder)();
7528
7548
  return encoder.encode(address6);
7529
7549
  }
7530
7550
  function getFakeSigner(address6) {
@@ -7614,7 +7634,7 @@ var Clmm = class {
7614
7634
  };
7615
7635
 
7616
7636
  // src/pool-manager.ts
7617
- var import_kit51 = require("@solana/kit");
7637
+ var import_kit52 = require("@solana/kit");
7618
7638
  var import_token2 = require("@solana-program/token");
7619
7639
  var import_bn5 = __toESM(require("bn.js"));
7620
7640
  var import_decimal3 = __toESM(require("decimal.js"));
@@ -7653,8 +7673,8 @@ var PoolManager = class {
7653
7673
  mintADecimals,
7654
7674
  mintBDecimals
7655
7675
  } = params;
7656
- const addressA = (0, import_kit51.address)(tokenMintA);
7657
- const addressB = (0, import_kit51.address)(tokenMintB);
7676
+ const addressA = (0, import_kit52.address)(tokenMintA);
7677
+ const addressB = (0, import_kit52.address)(tokenMintB);
7658
7678
  const isAFirst = new import_bn5.default(Buffer.from(addressB)).gt(
7659
7679
  new import_bn5.default(Buffer.from(addressA))
7660
7680
  );
@@ -7880,7 +7900,7 @@ var PoolManager = class {
7880
7900
  };
7881
7901
 
7882
7902
  // src/position-manager.ts
7883
- var import_kit52 = require("@solana/kit");
7903
+ var import_kit53 = require("@solana/kit");
7884
7904
  var import_token4 = require("@solana-program/token");
7885
7905
  var import_token_20222 = require("@solana-program/token-2022");
7886
7906
  var import_bn6 = __toESM(require("bn.js"));
@@ -7895,6 +7915,7 @@ var NATIVE_MINT_2022 = new import_web3.PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5H
7895
7915
 
7896
7916
  // src/position-manager.ts
7897
7917
  var import_system = require("@solana-program/system");
7918
+ var import_decimal4 = __toESM(require("decimal.js"));
7898
7919
  var PositionManager = class {
7899
7920
  constructor(config) {
7900
7921
  this.config = config;
@@ -7902,11 +7923,11 @@ var PositionManager = class {
7902
7923
  buildWrapSolInstructions(params) {
7903
7924
  const { payer, ata, owner, amount } = params;
7904
7925
  return [
7905
- (0, import_token4.getCreateAssociatedTokenInstruction)({
7926
+ (0, import_token4.getCreateAssociatedTokenIdempotentInstruction)({
7906
7927
  payer,
7907
7928
  ata,
7908
7929
  owner,
7909
- mint: (0, import_kit52.address)(NATIVE_MINT.toString()),
7930
+ mint: (0, import_kit53.address)(NATIVE_MINT.toString()),
7910
7931
  tokenProgram: import_token4.TOKEN_PROGRAM_ADDRESS,
7911
7932
  systemProgram: SYSTEM_PROGRAM_ID
7912
7933
  }),
@@ -7918,6 +7939,25 @@ var PositionManager = class {
7918
7939
  (0, import_token4.getSyncNativeInstruction)({ account: ata })
7919
7940
  ];
7920
7941
  }
7942
+ buildUnwrapSolInstruction(params) {
7943
+ const { payer, owner, destination, ata } = params;
7944
+ return [
7945
+ // There's a chance user might have deleted the ATA - create it with idempotent just to be sure.
7946
+ (0, import_token4.getCreateAssociatedTokenIdempotentInstruction)({
7947
+ payer,
7948
+ ata,
7949
+ owner,
7950
+ mint: (0, import_kit53.address)(NATIVE_MINT.toString()),
7951
+ tokenProgram: import_token4.TOKEN_PROGRAM_ADDRESS,
7952
+ systemProgram: SYSTEM_PROGRAM_ID
7953
+ }),
7954
+ (0, import_token4.getCloseAccountInstruction)({
7955
+ account: ata,
7956
+ destination,
7957
+ owner
7958
+ })
7959
+ ];
7960
+ }
7921
7961
  /**
7922
7962
  * Make open position from liquidity instructions
7923
7963
  * Use this when you know the exact liquidity amount you want to provide
@@ -7941,7 +7981,7 @@ var PositionManager = class {
7941
7981
  if (getEphemeralSigners) {
7942
7982
  nftMintAccount = getEphemeralSigners()[0];
7943
7983
  } else {
7944
- let k = await (0, import_kit52.generateKeyPairSigner)();
7984
+ let k = await (0, import_kit53.generateKeyPairSigner)();
7945
7985
  signers.push(k);
7946
7986
  nftMintAccount = k;
7947
7987
  }
@@ -8026,7 +8066,7 @@ var PositionManager = class {
8026
8066
  if (getEphemeralSigners) {
8027
8067
  nftMintAccount = getEphemeralSigners()[0];
8028
8068
  } else {
8029
- let k = await (0, import_kit52.generateKeyPairSigner)();
8069
+ let k = await (0, import_kit53.generateKeyPairSigner)();
8030
8070
  signers.push(k);
8031
8071
  nftMintAccount = k;
8032
8072
  }
@@ -8067,21 +8107,21 @@ var PositionManager = class {
8067
8107
  [tickArrayLowerStartIndex, tickArrayUpperStartIndex]
8068
8108
  );
8069
8109
  const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolAccount.address) : void 0;
8070
- const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit52.AccountRole.WRITABLE }] : [];
8110
+ const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
8071
8111
  let wrapSolInstructions = [];
8072
8112
  if (poolAccount.data.tokenMint0.toString() === NATIVE_MINT.toString()) {
8073
8113
  wrapSolInstructions = this.buildWrapSolInstructions({
8074
8114
  payer: ownerInfo.wallet,
8075
8115
  ata: ownerInfo.tokenAccountA,
8076
8116
  owner: ownerInfo.wallet.address,
8077
- amount: baseAmount
8117
+ amount: amount0Max
8078
8118
  });
8079
8119
  } else if (poolAccount.data.tokenMint1.toString() === NATIVE_MINT.toString()) {
8080
8120
  wrapSolInstructions = this.buildWrapSolInstructions({
8081
8121
  payer: ownerInfo.wallet,
8082
8122
  ata: ownerInfo.tokenAccountB,
8083
8123
  owner: ownerInfo.wallet.address,
8084
- amount: baseAmount
8124
+ amount: amount1Max
8085
8125
  });
8086
8126
  }
8087
8127
  const instruction = await getOpenPositionWithToken22NftInstructionAsync({
@@ -8173,7 +8213,7 @@ var PositionManager = class {
8173
8213
  [ownerPosition.tickLowerIndex, ownerPosition.tickUpperIndex]
8174
8214
  );
8175
8215
  const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolState.address) : void 0;
8176
- const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit52.AccountRole.WRITABLE }] : [];
8216
+ const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
8177
8217
  const instruction = getIncreaseLiquidityV2Instruction({
8178
8218
  nftOwner: ownerInfo.wallet,
8179
8219
  nftAccount: positionNftAccount,
@@ -8258,7 +8298,7 @@ var PositionManager = class {
8258
8298
  [ownerPosition.tickLowerIndex, ownerPosition.tickUpperIndex]
8259
8299
  );
8260
8300
  const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolState.address) : void 0;
8261
- const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit52.AccountRole.WRITABLE }] : [];
8301
+ const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
8262
8302
  const instruction = getDecreaseLiquidityV2Instruction({
8263
8303
  nftOwner: ownerInfo.wallet,
8264
8304
  nftAccount: positionNftAccount,
@@ -8301,7 +8341,7 @@ var PositionManager = class {
8301
8341
  * @returns Instruction result following established pattern
8302
8342
  */
8303
8343
  async makeClosePositionInstructions(params) {
8304
- const { ownerPosition, ownerInfo } = params;
8344
+ const { ownerPosition, ownerInfo, isNative } = params;
8305
8345
  const [personalPosition] = await PdaUtils.getPositionStatePda(
8306
8346
  ownerPosition.nftMint
8307
8347
  );
@@ -8317,8 +8357,23 @@ var PositionManager = class {
8317
8357
  personalPosition,
8318
8358
  tokenProgram: import_token_20222.TOKEN_2022_PROGRAM_ADDRESS
8319
8359
  });
8360
+ let unrwrapWsolInstructions = [];
8361
+ if (isNative) {
8362
+ const ownerWallet = ownerInfo.wallet;
8363
+ const [ata] = await (0, import_token4.findAssociatedTokenPda)({
8364
+ mint: (0, import_kit53.address)(NATIVE_MINT.toString()),
8365
+ owner: ownerWallet.address,
8366
+ tokenProgram: import_token4.TOKEN_PROGRAM_ADDRESS
8367
+ });
8368
+ unrwrapWsolInstructions = this.buildUnwrapSolInstruction({
8369
+ payer: ownerWallet,
8370
+ ata,
8371
+ owner: ownerWallet.address,
8372
+ destination: ownerWallet.address
8373
+ });
8374
+ }
8320
8375
  return {
8321
- instructions: [instruction],
8376
+ instructions: [instruction, ...unrwrapWsolInstructions],
8322
8377
  signers: [],
8323
8378
  instructionTypes: ["ClosePosition"],
8324
8379
  address: { positionNftAccount, personalPosition },
@@ -8363,45 +8418,29 @@ var PositionManager = class {
8363
8418
  position.tickUpperIndex
8364
8419
  );
8365
8420
  const sqrtPriceCurrentX64 = new import_bn6.default(pool.sqrtPriceX64.toString());
8366
- let amount0;
8367
- let amount1;
8368
- const liquidity = new import_bn6.default(position.liquidity.toString());
8369
- if (pool.tickCurrent < position.tickLowerIndex) {
8370
- amount0 = PoolUtils.getAmount0FromLiquidity(
8371
- sqrtPriceLowerX64,
8372
- sqrtPriceUpperX64,
8373
- liquidity
8374
- );
8375
- amount1 = new import_bn6.default(0);
8376
- } else if (pool.tickCurrent >= position.tickUpperIndex) {
8377
- amount0 = new import_bn6.default(0);
8378
- amount1 = PoolUtils.getAmount1FromLiquidity(
8379
- sqrtPriceLowerX64,
8380
- sqrtPriceUpperX64,
8381
- liquidity
8382
- );
8383
- } else {
8384
- amount0 = PoolUtils.getAmount0FromLiquidity(
8385
- sqrtPriceCurrentX64,
8386
- sqrtPriceUpperX64,
8387
- liquidity
8388
- );
8389
- amount1 = PoolUtils.getAmount1FromLiquidity(
8390
- sqrtPriceLowerX64,
8391
- sqrtPriceCurrentX64,
8392
- liquidity
8393
- );
8394
- }
8395
- const priceLower = TickUtils.tickToPrice(
8396
- position.tickLowerIndex,
8397
- pool.mintDecimals0,
8398
- pool.mintDecimals1
8399
- );
8400
- const priceUpper = TickUtils.tickToPrice(
8401
- position.tickUpperIndex,
8402
- pool.mintDecimals0,
8403
- pool.mintDecimals1
8421
+ const { amountA, amountB } = LiquidityMath.getAmountsFromLiquidity(
8422
+ sqrtPriceCurrentX64,
8423
+ sqrtPriceLowerX64,
8424
+ sqrtPriceUpperX64,
8425
+ new import_bn6.default(position.liquidity.toString()),
8426
+ true
8404
8427
  );
8428
+ const [_amountA, _amountB] = [
8429
+ new import_decimal4.default(amountA.toString()).div(10 ** pool.mintDecimals0),
8430
+ new import_decimal4.default(amountB.toString()).div(10 ** pool.mintDecimals1)
8431
+ ];
8432
+ const priceLower = TickUtils.getTickPrice({
8433
+ mintADecimals: pool.mintDecimals0,
8434
+ mintBDecimals: pool.mintDecimals1,
8435
+ tick: position.tickLowerIndex,
8436
+ baseIn: true
8437
+ });
8438
+ const priceUpper = TickUtils.getTickPrice({
8439
+ mintADecimals: pool.mintDecimals0,
8440
+ mintBDecimals: pool.mintDecimals1,
8441
+ tick: position.tickUpperIndex,
8442
+ baseIn: true
8443
+ });
8405
8444
  const inRange = pool.tickCurrent >= position.tickLowerIndex && pool.tickCurrent < position.tickUpperIndex;
8406
8445
  const unclaimedFees = {
8407
8446
  token0: new import_bn6.default(position.tokenFeesOwed0.toString()),
@@ -8412,12 +8451,10 @@ var PositionManager = class {
8412
8451
  ...position,
8413
8452
  tokenMint0: pool.tokenMint0,
8414
8453
  tokenMint1: pool.tokenMint1,
8415
- amount0: BigInt(amount0.toString()),
8416
- amount1: BigInt(amount1.toString()),
8417
- priceRange: {
8418
- lower: priceLower,
8419
- upper: priceUpper
8420
- },
8454
+ amount0: _amountA.toString(),
8455
+ amount1: _amountB.toString(),
8456
+ priceLower,
8457
+ priceUpper,
8421
8458
  inRange,
8422
8459
  ageSeconds,
8423
8460
  unclaimedFees,
@@ -8681,7 +8718,7 @@ var ClmmApi = class {
8681
8718
  var import_token5 = require("@solana-program/token");
8682
8719
 
8683
8720
  // src/managers/pool-data-manager.ts
8684
- var import_kit53 = require("@solana/kit");
8721
+ var import_kit54 = require("@solana/kit");
8685
8722
  var PoolDataManager = class {
8686
8723
  constructor(config, options) {
8687
8724
  this.config = config;
@@ -8847,13 +8884,13 @@ var PoolDataManager = class {
8847
8884
  bump: 0,
8848
8885
  // Not provided by API. This field is only used for on-chain address derivation and is not accessed or required by the SDK; setting to 0 is safe as the SDK never reads or relies on this value.// Not provided by API. This field is only used for on-chain address derivation and is not accessed or required by the SDK; setting to 0 is safe as the SDK never reads or relies on this value.
8849
8886
  index: apiConfig.index,
8850
- owner: (0, import_kit53.address)(apiConfig.owner),
8887
+ owner: (0, import_kit54.address)(apiConfig.owner),
8851
8888
  protocolFeeRate: apiConfig.protocolFeeRate,
8852
8889
  tradeFeeRate: apiConfig.tradeFeeRate,
8853
8890
  tickSpacing: apiConfig.tickSpacing,
8854
8891
  fundFeeRate: apiConfig.fundFeeRate,
8855
8892
  paddingU32: 0,
8856
- fundOwner: (0, import_kit53.address)(apiConfig.fundOwner),
8893
+ fundOwner: (0, import_kit54.address)(apiConfig.fundOwner),
8857
8894
  padding: [0n, 0n, 0n]
8858
8895
  };
8859
8896
  } else {
@@ -8984,7 +9021,7 @@ var PoolDataManager = class {
8984
9021
 
8985
9022
  // src/managers/price-api-client.ts
8986
9023
  var import_axios3 = __toESM(require("axios"));
8987
- var import_decimal4 = __toESM(require("decimal.js"));
9024
+ var import_decimal5 = __toESM(require("decimal.js"));
8988
9025
  var PriceApiClient = class _PriceApiClient {
8989
9026
  client;
8990
9027
  logger;
@@ -9332,7 +9369,7 @@ var PriceApiClient = class _PriceApiClient {
9332
9369
  continue;
9333
9370
  }
9334
9371
  try {
9335
- const price = new import_decimal4.default(data.usdPrice.toString());
9372
+ const price = new import_decimal5.default(data.usdPrice.toString());
9336
9373
  if (!price.isFinite() || price.lte(0)) {
9337
9374
  this.log(
9338
9375
  "warn",
@@ -9451,7 +9488,7 @@ var PriceApiClient = class _PriceApiClient {
9451
9488
 
9452
9489
  // src/swap.ts
9453
9490
  var import_bn7 = __toESM(require("bn.js"));
9454
- var import_decimal5 = __toESM(require("decimal.js"));
9491
+ var import_decimal6 = __toESM(require("decimal.js"));
9455
9492
  var DEFAULT_RETRY_CONFIG = {
9456
9493
  maxRetries: 3,
9457
9494
  baseDelayMs: 100,
@@ -9707,11 +9744,11 @@ var SwapQuoteResult = class {
9707
9744
  * before calculating the rate to avoid precision loss from integer division.
9708
9745
  */
9709
9746
  get executionPrice() {
9710
- const inHuman = new import_decimal5.default(this.quote.amountIn.toString()).div(
9711
- new import_decimal5.default(10).pow(this.decIn)
9747
+ const inHuman = new import_decimal6.default(this.quote.amountIn.toString()).div(
9748
+ new import_decimal6.default(10).pow(this.decIn)
9712
9749
  );
9713
- const outHuman = new import_decimal5.default(this.quote.amountOut.toString()).div(
9714
- new import_decimal5.default(10).pow(this.decOut)
9750
+ const outHuman = new import_decimal6.default(this.quote.amountOut.toString()).div(
9751
+ new import_decimal6.default(10).pow(this.decOut)
9715
9752
  );
9716
9753
  return outHuman.div(inHuman);
9717
9754
  }
@@ -9731,7 +9768,7 @@ var SwapQuoteResult = class {
9731
9768
  return this.quote.fee;
9732
9769
  }
9733
9770
  get feePercent() {
9734
- return new import_decimal5.default(this.quote.fee.toString()).div(new import_decimal5.default(this.quote.amountIn.toString())).mul(100).toNumber();
9771
+ return new import_decimal6.default(this.quote.fee.toString()).div(new import_decimal6.default(this.quote.amountIn.toString())).mul(100).toNumber();
9735
9772
  }
9736
9773
  get hasAcceptableImpact() {
9737
9774
  return this.quote.priceImpact < PRICE_IMPACT_THRESHOLDS.WARNING;
@@ -10459,9 +10496,9 @@ var SwapManager = class {
10459
10496
  calculateOptimalSlippage(quote, options) {
10460
10497
  const { riskTolerance = "medium", maxSlippage = 0.5 } = options || {};
10461
10498
  let baseSlippage = Math.max(quote.priceImpact * 2, 1e-3);
10462
- const tradeSize = new import_decimal5.default(quote.amountIn.toString());
10463
- const sizeRatio = import_decimal5.default.max(1, tradeSize.div(1e6));
10464
- const sizeMultiplier = sizeRatio.ln().div(import_decimal5.default.ln(10)).mul(1e-3).toNumber();
10499
+ const tradeSize = new import_decimal6.default(quote.amountIn.toString());
10500
+ const sizeRatio = import_decimal6.default.max(1, tradeSize.div(1e6));
10501
+ const sizeMultiplier = sizeRatio.ln().div(import_decimal6.default.ln(10)).mul(1e-3).toNumber();
10465
10502
  const riskMultiplier = {
10466
10503
  low: 1.5,
10467
10504
  medium: 1,
@@ -10497,9 +10534,9 @@ var SwapManager = class {
10497
10534
  priceAfter = priceBefore;
10498
10535
  }
10499
10536
  const zeroForOne = params.tokenIn === pool.tokenMint0;
10500
- const dec0 = new import_decimal5.default(10).pow(pool.mintDecimals0);
10501
- const dec1 = new import_decimal5.default(10).pow(pool.mintDecimals1);
10502
- const executionPrice = zeroForOne ? new import_decimal5.default(quote.amountOut.toString()).div(dec1).div(new import_decimal5.default(quote.amountIn.toString()).div(dec0)) : new import_decimal5.default(quote.amountOut.toString()).div(dec0).div(new import_decimal5.default(quote.amountIn.toString()).div(dec1));
10537
+ const dec0 = new import_decimal6.default(10).pow(pool.mintDecimals0);
10538
+ const dec1 = new import_decimal6.default(10).pow(pool.mintDecimals1);
10539
+ const executionPrice = zeroForOne ? new import_decimal6.default(quote.amountOut.toString()).div(dec1).div(new import_decimal6.default(quote.amountIn.toString()).div(dec0)) : new import_decimal6.default(quote.amountOut.toString()).div(dec0).div(new import_decimal6.default(quote.amountIn.toString()).div(dec1));
10503
10540
  const feeImpact = ammConfig.tradeFeeRate / FEE_RATE_DENOMINATOR_NUMBER;
10504
10541
  const pctDifference = executionPrice.minus(priceBefore).div(priceBefore).toNumber();
10505
10542
  return {