@stabbleorg/mclmm-sdk 0.1.12 → 0.1.14
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/idl/stabble_clmm.json +28 -0
- package/lib/generated/types/closePositionEvent.d.ts +16 -0
- package/lib/generated/types/closePositionEvent.d.ts.map +1 -0
- package/lib/generated/types/decreaseLiquidityEvent.d.ts +2 -0
- package/lib/generated/types/decreaseLiquidityEvent.d.ts.map +1 -1
- package/lib/generated/types/index.d.ts +1 -0
- package/lib/generated/types/index.d.ts.map +1 -1
- package/lib/index.js +974 -960
- package/lib/index.mjs +460 -440
- package/lib/position-manager.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -240,6 +240,9 @@ __export(generated_exports, {
|
|
|
240
240
|
getAmmConfigSize: () => getAmmConfigSize,
|
|
241
241
|
getAmmV3ErrorMessage: () => getAmmV3ErrorMessage,
|
|
242
242
|
getClosePositionDiscriminatorBytes: () => getClosePositionDiscriminatorBytes,
|
|
243
|
+
getClosePositionEventCodec: () => getClosePositionEventCodec,
|
|
244
|
+
getClosePositionEventDecoder: () => getClosePositionEventDecoder,
|
|
245
|
+
getClosePositionEventEncoder: () => getClosePositionEventEncoder,
|
|
243
246
|
getClosePositionInstruction: () => getClosePositionInstruction,
|
|
244
247
|
getClosePositionInstructionAsync: () => getClosePositionInstructionAsync,
|
|
245
248
|
getClosePositionInstructionDataCodec: () => getClosePositionInstructionDataCodec,
|
|
@@ -544,454 +547,469 @@ function getAmmConfigSize() {
|
|
|
544
547
|
}
|
|
545
548
|
|
|
546
549
|
// src/generated/accounts/observationState.ts
|
|
547
|
-
var
|
|
550
|
+
var import_kit18 = require("@solana/kit");
|
|
548
551
|
|
|
549
|
-
// src/generated/types/
|
|
552
|
+
// src/generated/types/closePositionEvent.ts
|
|
550
553
|
var import_kit2 = require("@solana/kit");
|
|
551
|
-
function
|
|
552
|
-
return (0, import_kit2.getStructEncoder)([
|
|
553
|
-
["positionNftMint", (0, import_kit2.getAddressEncoder)()],
|
|
554
|
-
["recipientTokenAccount0", (0, import_kit2.getAddressEncoder)()],
|
|
555
|
-
["recipientTokenAccount1", (0, import_kit2.getAddressEncoder)()],
|
|
556
|
-
["amount0", (0, import_kit2.getU64Encoder)()],
|
|
557
|
-
["amount1", (0, import_kit2.getU64Encoder)()]
|
|
558
|
-
]);
|
|
554
|
+
function getClosePositionEventEncoder() {
|
|
555
|
+
return (0, import_kit2.getStructEncoder)([["positionKey", (0, import_kit2.getAddressEncoder)()]]);
|
|
559
556
|
}
|
|
560
|
-
function
|
|
561
|
-
return (0, import_kit2.getStructDecoder)([
|
|
562
|
-
["positionNftMint", (0, import_kit2.getAddressDecoder)()],
|
|
563
|
-
["recipientTokenAccount0", (0, import_kit2.getAddressDecoder)()],
|
|
564
|
-
["recipientTokenAccount1", (0, import_kit2.getAddressDecoder)()],
|
|
565
|
-
["amount0", (0, import_kit2.getU64Decoder)()],
|
|
566
|
-
["amount1", (0, import_kit2.getU64Decoder)()]
|
|
567
|
-
]);
|
|
557
|
+
function getClosePositionEventDecoder() {
|
|
558
|
+
return (0, import_kit2.getStructDecoder)([["positionKey", (0, import_kit2.getAddressDecoder)()]]);
|
|
568
559
|
}
|
|
569
|
-
function
|
|
560
|
+
function getClosePositionEventCodec() {
|
|
570
561
|
return (0, import_kit2.combineCodec)(
|
|
571
|
-
|
|
572
|
-
|
|
562
|
+
getClosePositionEventEncoder(),
|
|
563
|
+
getClosePositionEventDecoder()
|
|
573
564
|
);
|
|
574
565
|
}
|
|
575
566
|
|
|
576
|
-
// src/generated/types/
|
|
567
|
+
// src/generated/types/collectPersonalFeeEvent.ts
|
|
577
568
|
var import_kit3 = require("@solana/kit");
|
|
578
|
-
function
|
|
569
|
+
function getCollectPersonalFeeEventEncoder() {
|
|
579
570
|
return (0, import_kit3.getStructEncoder)([
|
|
580
|
-
["
|
|
571
|
+
["positionNftMint", (0, import_kit3.getAddressEncoder)()],
|
|
581
572
|
["recipientTokenAccount0", (0, import_kit3.getAddressEncoder)()],
|
|
582
573
|
["recipientTokenAccount1", (0, import_kit3.getAddressEncoder)()],
|
|
583
574
|
["amount0", (0, import_kit3.getU64Encoder)()],
|
|
584
575
|
["amount1", (0, import_kit3.getU64Encoder)()]
|
|
585
576
|
]);
|
|
586
577
|
}
|
|
587
|
-
function
|
|
578
|
+
function getCollectPersonalFeeEventDecoder() {
|
|
588
579
|
return (0, import_kit3.getStructDecoder)([
|
|
589
|
-
["
|
|
580
|
+
["positionNftMint", (0, import_kit3.getAddressDecoder)()],
|
|
590
581
|
["recipientTokenAccount0", (0, import_kit3.getAddressDecoder)()],
|
|
591
582
|
["recipientTokenAccount1", (0, import_kit3.getAddressDecoder)()],
|
|
592
583
|
["amount0", (0, import_kit3.getU64Decoder)()],
|
|
593
584
|
["amount1", (0, import_kit3.getU64Decoder)()]
|
|
594
585
|
]);
|
|
595
586
|
}
|
|
596
|
-
function
|
|
587
|
+
function getCollectPersonalFeeEventCodec() {
|
|
597
588
|
return (0, import_kit3.combineCodec)(
|
|
589
|
+
getCollectPersonalFeeEventEncoder(),
|
|
590
|
+
getCollectPersonalFeeEventDecoder()
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// src/generated/types/collectProtocolFeeEvent.ts
|
|
595
|
+
var import_kit4 = require("@solana/kit");
|
|
596
|
+
function getCollectProtocolFeeEventEncoder() {
|
|
597
|
+
return (0, import_kit4.getStructEncoder)([
|
|
598
|
+
["poolState", (0, import_kit4.getAddressEncoder)()],
|
|
599
|
+
["recipientTokenAccount0", (0, import_kit4.getAddressEncoder)()],
|
|
600
|
+
["recipientTokenAccount1", (0, import_kit4.getAddressEncoder)()],
|
|
601
|
+
["amount0", (0, import_kit4.getU64Encoder)()],
|
|
602
|
+
["amount1", (0, import_kit4.getU64Encoder)()]
|
|
603
|
+
]);
|
|
604
|
+
}
|
|
605
|
+
function getCollectProtocolFeeEventDecoder() {
|
|
606
|
+
return (0, import_kit4.getStructDecoder)([
|
|
607
|
+
["poolState", (0, import_kit4.getAddressDecoder)()],
|
|
608
|
+
["recipientTokenAccount0", (0, import_kit4.getAddressDecoder)()],
|
|
609
|
+
["recipientTokenAccount1", (0, import_kit4.getAddressDecoder)()],
|
|
610
|
+
["amount0", (0, import_kit4.getU64Decoder)()],
|
|
611
|
+
["amount1", (0, import_kit4.getU64Decoder)()]
|
|
612
|
+
]);
|
|
613
|
+
}
|
|
614
|
+
function getCollectProtocolFeeEventCodec() {
|
|
615
|
+
return (0, import_kit4.combineCodec)(
|
|
598
616
|
getCollectProtocolFeeEventEncoder(),
|
|
599
617
|
getCollectProtocolFeeEventDecoder()
|
|
600
618
|
);
|
|
601
619
|
}
|
|
602
620
|
|
|
603
621
|
// src/generated/types/configChangeEvent.ts
|
|
604
|
-
var
|
|
622
|
+
var import_kit5 = require("@solana/kit");
|
|
605
623
|
function getConfigChangeEventEncoder() {
|
|
606
|
-
return (0,
|
|
607
|
-
["index", (0,
|
|
608
|
-
["owner", (0,
|
|
609
|
-
["protocolFeeRate", (0,
|
|
610
|
-
["tradeFeeRate", (0,
|
|
611
|
-
["tickSpacing", (0,
|
|
612
|
-
["fundFeeRate", (0,
|
|
613
|
-
["fundOwner", (0,
|
|
624
|
+
return (0, import_kit5.getStructEncoder)([
|
|
625
|
+
["index", (0, import_kit5.getU16Encoder)()],
|
|
626
|
+
["owner", (0, import_kit5.getAddressEncoder)()],
|
|
627
|
+
["protocolFeeRate", (0, import_kit5.getU32Encoder)()],
|
|
628
|
+
["tradeFeeRate", (0, import_kit5.getU32Encoder)()],
|
|
629
|
+
["tickSpacing", (0, import_kit5.getU16Encoder)()],
|
|
630
|
+
["fundFeeRate", (0, import_kit5.getU32Encoder)()],
|
|
631
|
+
["fundOwner", (0, import_kit5.getAddressEncoder)()]
|
|
614
632
|
]);
|
|
615
633
|
}
|
|
616
634
|
function getConfigChangeEventDecoder() {
|
|
617
|
-
return (0,
|
|
618
|
-
["index", (0,
|
|
619
|
-
["owner", (0,
|
|
620
|
-
["protocolFeeRate", (0,
|
|
621
|
-
["tradeFeeRate", (0,
|
|
622
|
-
["tickSpacing", (0,
|
|
623
|
-
["fundFeeRate", (0,
|
|
624
|
-
["fundOwner", (0,
|
|
635
|
+
return (0, import_kit5.getStructDecoder)([
|
|
636
|
+
["index", (0, import_kit5.getU16Decoder)()],
|
|
637
|
+
["owner", (0, import_kit5.getAddressDecoder)()],
|
|
638
|
+
["protocolFeeRate", (0, import_kit5.getU32Decoder)()],
|
|
639
|
+
["tradeFeeRate", (0, import_kit5.getU32Decoder)()],
|
|
640
|
+
["tickSpacing", (0, import_kit5.getU16Decoder)()],
|
|
641
|
+
["fundFeeRate", (0, import_kit5.getU32Decoder)()],
|
|
642
|
+
["fundOwner", (0, import_kit5.getAddressDecoder)()]
|
|
625
643
|
]);
|
|
626
644
|
}
|
|
627
645
|
function getConfigChangeEventCodec() {
|
|
628
|
-
return (0,
|
|
646
|
+
return (0, import_kit5.combineCodec)(
|
|
629
647
|
getConfigChangeEventEncoder(),
|
|
630
648
|
getConfigChangeEventDecoder()
|
|
631
649
|
);
|
|
632
650
|
}
|
|
633
651
|
|
|
634
652
|
// src/generated/types/createPersonalPositionEvent.ts
|
|
635
|
-
var
|
|
653
|
+
var import_kit6 = require("@solana/kit");
|
|
636
654
|
function getCreatePersonalPositionEventEncoder() {
|
|
637
|
-
return (0,
|
|
638
|
-
["poolState", (0,
|
|
639
|
-
["personalPosition", (0,
|
|
640
|
-
["nftMint", (0,
|
|
641
|
-
["minter", (0,
|
|
642
|
-
["nftOwner", (0,
|
|
643
|
-
["tickLowerIndex", (0,
|
|
644
|
-
["tickUpperIndex", (0,
|
|
645
|
-
["liquidity", (0,
|
|
646
|
-
["depositAmount0", (0,
|
|
647
|
-
["depositAmount1", (0,
|
|
648
|
-
["depositAmount0TransferFee", (0,
|
|
649
|
-
["depositAmount1TransferFee", (0,
|
|
655
|
+
return (0, import_kit6.getStructEncoder)([
|
|
656
|
+
["poolState", (0, import_kit6.getAddressEncoder)()],
|
|
657
|
+
["personalPosition", (0, import_kit6.getAddressEncoder)()],
|
|
658
|
+
["nftMint", (0, import_kit6.getAddressEncoder)()],
|
|
659
|
+
["minter", (0, import_kit6.getAddressEncoder)()],
|
|
660
|
+
["nftOwner", (0, import_kit6.getAddressEncoder)()],
|
|
661
|
+
["tickLowerIndex", (0, import_kit6.getI32Encoder)()],
|
|
662
|
+
["tickUpperIndex", (0, import_kit6.getI32Encoder)()],
|
|
663
|
+
["liquidity", (0, import_kit6.getU128Encoder)()],
|
|
664
|
+
["depositAmount0", (0, import_kit6.getU64Encoder)()],
|
|
665
|
+
["depositAmount1", (0, import_kit6.getU64Encoder)()],
|
|
666
|
+
["depositAmount0TransferFee", (0, import_kit6.getU64Encoder)()],
|
|
667
|
+
["depositAmount1TransferFee", (0, import_kit6.getU64Encoder)()]
|
|
650
668
|
]);
|
|
651
669
|
}
|
|
652
670
|
function getCreatePersonalPositionEventDecoder() {
|
|
653
|
-
return (0,
|
|
654
|
-
["poolState", (0,
|
|
655
|
-
["personalPosition", (0,
|
|
656
|
-
["nftMint", (0,
|
|
657
|
-
["minter", (0,
|
|
658
|
-
["nftOwner", (0,
|
|
659
|
-
["tickLowerIndex", (0,
|
|
660
|
-
["tickUpperIndex", (0,
|
|
661
|
-
["liquidity", (0,
|
|
662
|
-
["depositAmount0", (0,
|
|
663
|
-
["depositAmount1", (0,
|
|
664
|
-
["depositAmount0TransferFee", (0,
|
|
665
|
-
["depositAmount1TransferFee", (0,
|
|
671
|
+
return (0, import_kit6.getStructDecoder)([
|
|
672
|
+
["poolState", (0, import_kit6.getAddressDecoder)()],
|
|
673
|
+
["personalPosition", (0, import_kit6.getAddressDecoder)()],
|
|
674
|
+
["nftMint", (0, import_kit6.getAddressDecoder)()],
|
|
675
|
+
["minter", (0, import_kit6.getAddressDecoder)()],
|
|
676
|
+
["nftOwner", (0, import_kit6.getAddressDecoder)()],
|
|
677
|
+
["tickLowerIndex", (0, import_kit6.getI32Decoder)()],
|
|
678
|
+
["tickUpperIndex", (0, import_kit6.getI32Decoder)()],
|
|
679
|
+
["liquidity", (0, import_kit6.getU128Decoder)()],
|
|
680
|
+
["depositAmount0", (0, import_kit6.getU64Decoder)()],
|
|
681
|
+
["depositAmount1", (0, import_kit6.getU64Decoder)()],
|
|
682
|
+
["depositAmount0TransferFee", (0, import_kit6.getU64Decoder)()],
|
|
683
|
+
["depositAmount1TransferFee", (0, import_kit6.getU64Decoder)()]
|
|
666
684
|
]);
|
|
667
685
|
}
|
|
668
686
|
function getCreatePersonalPositionEventCodec() {
|
|
669
|
-
return (0,
|
|
687
|
+
return (0, import_kit6.combineCodec)(
|
|
670
688
|
getCreatePersonalPositionEventEncoder(),
|
|
671
689
|
getCreatePersonalPositionEventDecoder()
|
|
672
690
|
);
|
|
673
691
|
}
|
|
674
692
|
|
|
675
693
|
// src/generated/types/decreaseLiquidityEvent.ts
|
|
676
|
-
var
|
|
694
|
+
var import_kit7 = require("@solana/kit");
|
|
677
695
|
function getDecreaseLiquidityEventEncoder() {
|
|
678
|
-
return (0,
|
|
679
|
-
["positionNftMint", (0,
|
|
680
|
-
["liquidity", (0,
|
|
681
|
-
["decreaseAmount0", (0,
|
|
682
|
-
["decreaseAmount1", (0,
|
|
683
|
-
["feeAmount0", (0,
|
|
684
|
-
["feeAmount1", (0,
|
|
685
|
-
["rewardAmounts", (0,
|
|
686
|
-
["transferFee0", (0,
|
|
687
|
-
["transferFee1", (0,
|
|
696
|
+
return (0, import_kit7.getStructEncoder)([
|
|
697
|
+
["positionNftMint", (0, import_kit7.getAddressEncoder)()],
|
|
698
|
+
["liquidity", (0, import_kit7.getU128Encoder)()],
|
|
699
|
+
["decreaseAmount0", (0, import_kit7.getU64Encoder)()],
|
|
700
|
+
["decreaseAmount1", (0, import_kit7.getU64Encoder)()],
|
|
701
|
+
["feeAmount0", (0, import_kit7.getU64Encoder)()],
|
|
702
|
+
["feeAmount1", (0, import_kit7.getU64Encoder)()],
|
|
703
|
+
["rewardAmounts", (0, import_kit7.getArrayEncoder)((0, import_kit7.getU64Encoder)(), { size: 3 })],
|
|
704
|
+
["transferFee0", (0, import_kit7.getU64Encoder)()],
|
|
705
|
+
["transferFee1", (0, import_kit7.getU64Encoder)()]
|
|
688
706
|
]);
|
|
689
707
|
}
|
|
690
708
|
function getDecreaseLiquidityEventDecoder() {
|
|
691
|
-
return (0,
|
|
692
|
-
["positionNftMint", (0,
|
|
693
|
-
["liquidity", (0,
|
|
694
|
-
["decreaseAmount0", (0,
|
|
695
|
-
["decreaseAmount1", (0,
|
|
696
|
-
["feeAmount0", (0,
|
|
697
|
-
["feeAmount1", (0,
|
|
698
|
-
["rewardAmounts", (0,
|
|
699
|
-
["transferFee0", (0,
|
|
700
|
-
["transferFee1", (0,
|
|
709
|
+
return (0, import_kit7.getStructDecoder)([
|
|
710
|
+
["positionNftMint", (0, import_kit7.getAddressDecoder)()],
|
|
711
|
+
["liquidity", (0, import_kit7.getU128Decoder)()],
|
|
712
|
+
["decreaseAmount0", (0, import_kit7.getU64Decoder)()],
|
|
713
|
+
["decreaseAmount1", (0, import_kit7.getU64Decoder)()],
|
|
714
|
+
["feeAmount0", (0, import_kit7.getU64Decoder)()],
|
|
715
|
+
["feeAmount1", (0, import_kit7.getU64Decoder)()],
|
|
716
|
+
["rewardAmounts", (0, import_kit7.getArrayDecoder)((0, import_kit7.getU64Decoder)(), { size: 3 })],
|
|
717
|
+
["transferFee0", (0, import_kit7.getU64Decoder)()],
|
|
718
|
+
["transferFee1", (0, import_kit7.getU64Decoder)()]
|
|
701
719
|
]);
|
|
702
720
|
}
|
|
703
721
|
function getDecreaseLiquidityEventCodec() {
|
|
704
|
-
return (0,
|
|
722
|
+
return (0, import_kit7.combineCodec)(
|
|
705
723
|
getDecreaseLiquidityEventEncoder(),
|
|
706
724
|
getDecreaseLiquidityEventDecoder()
|
|
707
725
|
);
|
|
708
726
|
}
|
|
709
727
|
|
|
710
728
|
// src/generated/types/increaseLiquidityEvent.ts
|
|
711
|
-
var
|
|
729
|
+
var import_kit8 = require("@solana/kit");
|
|
712
730
|
function getIncreaseLiquidityEventEncoder() {
|
|
713
|
-
return (0,
|
|
714
|
-
["positionNftMint", (0,
|
|
715
|
-
["liquidity", (0,
|
|
716
|
-
["amount0", (0,
|
|
717
|
-
["amount1", (0,
|
|
718
|
-
["amount0TransferFee", (0,
|
|
719
|
-
["amount1TransferFee", (0,
|
|
731
|
+
return (0, import_kit8.getStructEncoder)([
|
|
732
|
+
["positionNftMint", (0, import_kit8.getAddressEncoder)()],
|
|
733
|
+
["liquidity", (0, import_kit8.getU128Encoder)()],
|
|
734
|
+
["amount0", (0, import_kit8.getU64Encoder)()],
|
|
735
|
+
["amount1", (0, import_kit8.getU64Encoder)()],
|
|
736
|
+
["amount0TransferFee", (0, import_kit8.getU64Encoder)()],
|
|
737
|
+
["amount1TransferFee", (0, import_kit8.getU64Encoder)()]
|
|
720
738
|
]);
|
|
721
739
|
}
|
|
722
740
|
function getIncreaseLiquidityEventDecoder() {
|
|
723
|
-
return (0,
|
|
724
|
-
["positionNftMint", (0,
|
|
725
|
-
["liquidity", (0,
|
|
726
|
-
["amount0", (0,
|
|
727
|
-
["amount1", (0,
|
|
728
|
-
["amount0TransferFee", (0,
|
|
729
|
-
["amount1TransferFee", (0,
|
|
741
|
+
return (0, import_kit8.getStructDecoder)([
|
|
742
|
+
["positionNftMint", (0, import_kit8.getAddressDecoder)()],
|
|
743
|
+
["liquidity", (0, import_kit8.getU128Decoder)()],
|
|
744
|
+
["amount0", (0, import_kit8.getU64Decoder)()],
|
|
745
|
+
["amount1", (0, import_kit8.getU64Decoder)()],
|
|
746
|
+
["amount0TransferFee", (0, import_kit8.getU64Decoder)()],
|
|
747
|
+
["amount1TransferFee", (0, import_kit8.getU64Decoder)()]
|
|
730
748
|
]);
|
|
731
749
|
}
|
|
732
750
|
function getIncreaseLiquidityEventCodec() {
|
|
733
|
-
return (0,
|
|
751
|
+
return (0, import_kit8.combineCodec)(
|
|
734
752
|
getIncreaseLiquidityEventEncoder(),
|
|
735
753
|
getIncreaseLiquidityEventDecoder()
|
|
736
754
|
);
|
|
737
755
|
}
|
|
738
756
|
|
|
739
757
|
// src/generated/types/liquidityCalculateEvent.ts
|
|
740
|
-
var
|
|
758
|
+
var import_kit9 = require("@solana/kit");
|
|
741
759
|
function getLiquidityCalculateEventEncoder() {
|
|
742
|
-
return (0,
|
|
743
|
-
["poolLiquidity", (0,
|
|
744
|
-
["poolSqrtPriceX64", (0,
|
|
745
|
-
["poolTick", (0,
|
|
746
|
-
["calcAmount0", (0,
|
|
747
|
-
["calcAmount1", (0,
|
|
748
|
-
["tradeFeeOwed0", (0,
|
|
749
|
-
["tradeFeeOwed1", (0,
|
|
750
|
-
["transferFee0", (0,
|
|
751
|
-
["transferFee1", (0,
|
|
760
|
+
return (0, import_kit9.getStructEncoder)([
|
|
761
|
+
["poolLiquidity", (0, import_kit9.getU128Encoder)()],
|
|
762
|
+
["poolSqrtPriceX64", (0, import_kit9.getU128Encoder)()],
|
|
763
|
+
["poolTick", (0, import_kit9.getI32Encoder)()],
|
|
764
|
+
["calcAmount0", (0, import_kit9.getU64Encoder)()],
|
|
765
|
+
["calcAmount1", (0, import_kit9.getU64Encoder)()],
|
|
766
|
+
["tradeFeeOwed0", (0, import_kit9.getU64Encoder)()],
|
|
767
|
+
["tradeFeeOwed1", (0, import_kit9.getU64Encoder)()],
|
|
768
|
+
["transferFee0", (0, import_kit9.getU64Encoder)()],
|
|
769
|
+
["transferFee1", (0, import_kit9.getU64Encoder)()]
|
|
752
770
|
]);
|
|
753
771
|
}
|
|
754
772
|
function getLiquidityCalculateEventDecoder() {
|
|
755
|
-
return (0,
|
|
756
|
-
["poolLiquidity", (0,
|
|
757
|
-
["poolSqrtPriceX64", (0,
|
|
758
|
-
["poolTick", (0,
|
|
759
|
-
["calcAmount0", (0,
|
|
760
|
-
["calcAmount1", (0,
|
|
761
|
-
["tradeFeeOwed0", (0,
|
|
762
|
-
["tradeFeeOwed1", (0,
|
|
763
|
-
["transferFee0", (0,
|
|
764
|
-
["transferFee1", (0,
|
|
773
|
+
return (0, import_kit9.getStructDecoder)([
|
|
774
|
+
["poolLiquidity", (0, import_kit9.getU128Decoder)()],
|
|
775
|
+
["poolSqrtPriceX64", (0, import_kit9.getU128Decoder)()],
|
|
776
|
+
["poolTick", (0, import_kit9.getI32Decoder)()],
|
|
777
|
+
["calcAmount0", (0, import_kit9.getU64Decoder)()],
|
|
778
|
+
["calcAmount1", (0, import_kit9.getU64Decoder)()],
|
|
779
|
+
["tradeFeeOwed0", (0, import_kit9.getU64Decoder)()],
|
|
780
|
+
["tradeFeeOwed1", (0, import_kit9.getU64Decoder)()],
|
|
781
|
+
["transferFee0", (0, import_kit9.getU64Decoder)()],
|
|
782
|
+
["transferFee1", (0, import_kit9.getU64Decoder)()]
|
|
765
783
|
]);
|
|
766
784
|
}
|
|
767
785
|
function getLiquidityCalculateEventCodec() {
|
|
768
|
-
return (0,
|
|
786
|
+
return (0, import_kit9.combineCodec)(
|
|
769
787
|
getLiquidityCalculateEventEncoder(),
|
|
770
788
|
getLiquidityCalculateEventDecoder()
|
|
771
789
|
);
|
|
772
790
|
}
|
|
773
791
|
|
|
774
792
|
// src/generated/types/liquidityChangeEvent.ts
|
|
775
|
-
var
|
|
793
|
+
var import_kit10 = require("@solana/kit");
|
|
776
794
|
function getLiquidityChangeEventEncoder() {
|
|
777
|
-
return (0,
|
|
778
|
-
["poolState", (0,
|
|
779
|
-
["tick", (0,
|
|
780
|
-
["tickLower", (0,
|
|
781
|
-
["tickUpper", (0,
|
|
782
|
-
["liquidityBefore", (0,
|
|
783
|
-
["liquidityAfter", (0,
|
|
795
|
+
return (0, import_kit10.getStructEncoder)([
|
|
796
|
+
["poolState", (0, import_kit10.getAddressEncoder)()],
|
|
797
|
+
["tick", (0, import_kit10.getI32Encoder)()],
|
|
798
|
+
["tickLower", (0, import_kit10.getI32Encoder)()],
|
|
799
|
+
["tickUpper", (0, import_kit10.getI32Encoder)()],
|
|
800
|
+
["liquidityBefore", (0, import_kit10.getU128Encoder)()],
|
|
801
|
+
["liquidityAfter", (0, import_kit10.getU128Encoder)()]
|
|
784
802
|
]);
|
|
785
803
|
}
|
|
786
804
|
function getLiquidityChangeEventDecoder() {
|
|
787
|
-
return (0,
|
|
788
|
-
["poolState", (0,
|
|
789
|
-
["tick", (0,
|
|
790
|
-
["tickLower", (0,
|
|
791
|
-
["tickUpper", (0,
|
|
792
|
-
["liquidityBefore", (0,
|
|
793
|
-
["liquidityAfter", (0,
|
|
805
|
+
return (0, import_kit10.getStructDecoder)([
|
|
806
|
+
["poolState", (0, import_kit10.getAddressDecoder)()],
|
|
807
|
+
["tick", (0, import_kit10.getI32Decoder)()],
|
|
808
|
+
["tickLower", (0, import_kit10.getI32Decoder)()],
|
|
809
|
+
["tickUpper", (0, import_kit10.getI32Decoder)()],
|
|
810
|
+
["liquidityBefore", (0, import_kit10.getU128Decoder)()],
|
|
811
|
+
["liquidityAfter", (0, import_kit10.getU128Decoder)()]
|
|
794
812
|
]);
|
|
795
813
|
}
|
|
796
814
|
function getLiquidityChangeEventCodec() {
|
|
797
|
-
return (0,
|
|
815
|
+
return (0, import_kit10.combineCodec)(
|
|
798
816
|
getLiquidityChangeEventEncoder(),
|
|
799
817
|
getLiquidityChangeEventDecoder()
|
|
800
818
|
);
|
|
801
819
|
}
|
|
802
820
|
|
|
803
821
|
// src/generated/types/observation.ts
|
|
804
|
-
var
|
|
822
|
+
var import_kit11 = require("@solana/kit");
|
|
805
823
|
function getObservationEncoder() {
|
|
806
|
-
return (0,
|
|
807
|
-
["blockTimestamp", (0,
|
|
808
|
-
["tickCumulative", (0,
|
|
809
|
-
["padding", (0,
|
|
824
|
+
return (0, import_kit11.getStructEncoder)([
|
|
825
|
+
["blockTimestamp", (0, import_kit11.getU32Encoder)()],
|
|
826
|
+
["tickCumulative", (0, import_kit11.getI64Encoder)()],
|
|
827
|
+
["padding", (0, import_kit11.getArrayEncoder)((0, import_kit11.getU64Encoder)(), { size: 4 })]
|
|
810
828
|
]);
|
|
811
829
|
}
|
|
812
830
|
function getObservationDecoder() {
|
|
813
|
-
return (0,
|
|
814
|
-
["blockTimestamp", (0,
|
|
815
|
-
["tickCumulative", (0,
|
|
816
|
-
["padding", (0,
|
|
831
|
+
return (0, import_kit11.getStructDecoder)([
|
|
832
|
+
["blockTimestamp", (0, import_kit11.getU32Decoder)()],
|
|
833
|
+
["tickCumulative", (0, import_kit11.getI64Decoder)()],
|
|
834
|
+
["padding", (0, import_kit11.getArrayDecoder)((0, import_kit11.getU64Decoder)(), { size: 4 })]
|
|
817
835
|
]);
|
|
818
836
|
}
|
|
819
837
|
function getObservationCodec() {
|
|
820
|
-
return (0,
|
|
838
|
+
return (0, import_kit11.combineCodec)(getObservationEncoder(), getObservationDecoder());
|
|
821
839
|
}
|
|
822
840
|
|
|
823
841
|
// src/generated/types/poolCreatedEvent.ts
|
|
824
|
-
var
|
|
842
|
+
var import_kit12 = require("@solana/kit");
|
|
825
843
|
function getPoolCreatedEventEncoder() {
|
|
826
|
-
return (0,
|
|
827
|
-
["tokenMint0", (0,
|
|
828
|
-
["tokenMint1", (0,
|
|
829
|
-
["tickSpacing", (0,
|
|
830
|
-
["poolState", (0,
|
|
831
|
-
["sqrtPriceX64", (0,
|
|
832
|
-
["tick", (0,
|
|
833
|
-
["tokenVault0", (0,
|
|
834
|
-
["tokenVault1", (0,
|
|
835
|
-
["ammConfig", (0,
|
|
844
|
+
return (0, import_kit12.getStructEncoder)([
|
|
845
|
+
["tokenMint0", (0, import_kit12.getAddressEncoder)()],
|
|
846
|
+
["tokenMint1", (0, import_kit12.getAddressEncoder)()],
|
|
847
|
+
["tickSpacing", (0, import_kit12.getU16Encoder)()],
|
|
848
|
+
["poolState", (0, import_kit12.getAddressEncoder)()],
|
|
849
|
+
["sqrtPriceX64", (0, import_kit12.getU128Encoder)()],
|
|
850
|
+
["tick", (0, import_kit12.getI32Encoder)()],
|
|
851
|
+
["tokenVault0", (0, import_kit12.getAddressEncoder)()],
|
|
852
|
+
["tokenVault1", (0, import_kit12.getAddressEncoder)()],
|
|
853
|
+
["ammConfig", (0, import_kit12.getAddressEncoder)()]
|
|
836
854
|
]);
|
|
837
855
|
}
|
|
838
856
|
function getPoolCreatedEventDecoder() {
|
|
839
|
-
return (0,
|
|
840
|
-
["tokenMint0", (0,
|
|
841
|
-
["tokenMint1", (0,
|
|
842
|
-
["tickSpacing", (0,
|
|
843
|
-
["poolState", (0,
|
|
844
|
-
["sqrtPriceX64", (0,
|
|
845
|
-
["tick", (0,
|
|
846
|
-
["tokenVault0", (0,
|
|
847
|
-
["tokenVault1", (0,
|
|
848
|
-
["ammConfig", (0,
|
|
857
|
+
return (0, import_kit12.getStructDecoder)([
|
|
858
|
+
["tokenMint0", (0, import_kit12.getAddressDecoder)()],
|
|
859
|
+
["tokenMint1", (0, import_kit12.getAddressDecoder)()],
|
|
860
|
+
["tickSpacing", (0, import_kit12.getU16Decoder)()],
|
|
861
|
+
["poolState", (0, import_kit12.getAddressDecoder)()],
|
|
862
|
+
["sqrtPriceX64", (0, import_kit12.getU128Decoder)()],
|
|
863
|
+
["tick", (0, import_kit12.getI32Decoder)()],
|
|
864
|
+
["tokenVault0", (0, import_kit12.getAddressDecoder)()],
|
|
865
|
+
["tokenVault1", (0, import_kit12.getAddressDecoder)()],
|
|
866
|
+
["ammConfig", (0, import_kit12.getAddressDecoder)()]
|
|
849
867
|
]);
|
|
850
868
|
}
|
|
851
869
|
function getPoolCreatedEventCodec() {
|
|
852
|
-
return (0,
|
|
870
|
+
return (0, import_kit12.combineCodec)(
|
|
853
871
|
getPoolCreatedEventEncoder(),
|
|
854
872
|
getPoolCreatedEventDecoder()
|
|
855
873
|
);
|
|
856
874
|
}
|
|
857
875
|
|
|
858
876
|
// src/generated/types/positionRewardInfo.ts
|
|
859
|
-
var
|
|
877
|
+
var import_kit13 = require("@solana/kit");
|
|
860
878
|
function getPositionRewardInfoEncoder() {
|
|
861
|
-
return (0,
|
|
862
|
-
["growthInsideLastX64", (0,
|
|
863
|
-
["rewardAmountOwed", (0,
|
|
879
|
+
return (0, import_kit13.getStructEncoder)([
|
|
880
|
+
["growthInsideLastX64", (0, import_kit13.getU128Encoder)()],
|
|
881
|
+
["rewardAmountOwed", (0, import_kit13.getU64Encoder)()]
|
|
864
882
|
]);
|
|
865
883
|
}
|
|
866
884
|
function getPositionRewardInfoDecoder() {
|
|
867
|
-
return (0,
|
|
868
|
-
["growthInsideLastX64", (0,
|
|
869
|
-
["rewardAmountOwed", (0,
|
|
885
|
+
return (0, import_kit13.getStructDecoder)([
|
|
886
|
+
["growthInsideLastX64", (0, import_kit13.getU128Decoder)()],
|
|
887
|
+
["rewardAmountOwed", (0, import_kit13.getU64Decoder)()]
|
|
870
888
|
]);
|
|
871
889
|
}
|
|
872
890
|
function getPositionRewardInfoCodec() {
|
|
873
|
-
return (0,
|
|
891
|
+
return (0, import_kit13.combineCodec)(
|
|
874
892
|
getPositionRewardInfoEncoder(),
|
|
875
893
|
getPositionRewardInfoDecoder()
|
|
876
894
|
);
|
|
877
895
|
}
|
|
878
896
|
|
|
879
897
|
// src/generated/types/rewardInfo.ts
|
|
880
|
-
var
|
|
898
|
+
var import_kit14 = require("@solana/kit");
|
|
881
899
|
function getRewardInfoEncoder() {
|
|
882
|
-
return (0,
|
|
883
|
-
["rewardState", (0,
|
|
884
|
-
["openTime", (0,
|
|
885
|
-
["endTime", (0,
|
|
886
|
-
["lastUpdateTime", (0,
|
|
887
|
-
["emissionsPerSecondX64", (0,
|
|
888
|
-
["rewardTotalEmissioned", (0,
|
|
889
|
-
["rewardClaimed", (0,
|
|
890
|
-
["tokenMint", (0,
|
|
891
|
-
["tokenVault", (0,
|
|
892
|
-
["authority", (0,
|
|
893
|
-
["rewardGrowthGlobalX64", (0,
|
|
900
|
+
return (0, import_kit14.getStructEncoder)([
|
|
901
|
+
["rewardState", (0, import_kit14.getU8Encoder)()],
|
|
902
|
+
["openTime", (0, import_kit14.getU64Encoder)()],
|
|
903
|
+
["endTime", (0, import_kit14.getU64Encoder)()],
|
|
904
|
+
["lastUpdateTime", (0, import_kit14.getU64Encoder)()],
|
|
905
|
+
["emissionsPerSecondX64", (0, import_kit14.getU128Encoder)()],
|
|
906
|
+
["rewardTotalEmissioned", (0, import_kit14.getU64Encoder)()],
|
|
907
|
+
["rewardClaimed", (0, import_kit14.getU64Encoder)()],
|
|
908
|
+
["tokenMint", (0, import_kit14.getAddressEncoder)()],
|
|
909
|
+
["tokenVault", (0, import_kit14.getAddressEncoder)()],
|
|
910
|
+
["authority", (0, import_kit14.getAddressEncoder)()],
|
|
911
|
+
["rewardGrowthGlobalX64", (0, import_kit14.getU128Encoder)()]
|
|
894
912
|
]);
|
|
895
913
|
}
|
|
896
914
|
function getRewardInfoDecoder() {
|
|
897
|
-
return (0,
|
|
898
|
-
["rewardState", (0,
|
|
899
|
-
["openTime", (0,
|
|
900
|
-
["endTime", (0,
|
|
901
|
-
["lastUpdateTime", (0,
|
|
902
|
-
["emissionsPerSecondX64", (0,
|
|
903
|
-
["rewardTotalEmissioned", (0,
|
|
904
|
-
["rewardClaimed", (0,
|
|
905
|
-
["tokenMint", (0,
|
|
906
|
-
["tokenVault", (0,
|
|
907
|
-
["authority", (0,
|
|
908
|
-
["rewardGrowthGlobalX64", (0,
|
|
915
|
+
return (0, import_kit14.getStructDecoder)([
|
|
916
|
+
["rewardState", (0, import_kit14.getU8Decoder)()],
|
|
917
|
+
["openTime", (0, import_kit14.getU64Decoder)()],
|
|
918
|
+
["endTime", (0, import_kit14.getU64Decoder)()],
|
|
919
|
+
["lastUpdateTime", (0, import_kit14.getU64Decoder)()],
|
|
920
|
+
["emissionsPerSecondX64", (0, import_kit14.getU128Decoder)()],
|
|
921
|
+
["rewardTotalEmissioned", (0, import_kit14.getU64Decoder)()],
|
|
922
|
+
["rewardClaimed", (0, import_kit14.getU64Decoder)()],
|
|
923
|
+
["tokenMint", (0, import_kit14.getAddressDecoder)()],
|
|
924
|
+
["tokenVault", (0, import_kit14.getAddressDecoder)()],
|
|
925
|
+
["authority", (0, import_kit14.getAddressDecoder)()],
|
|
926
|
+
["rewardGrowthGlobalX64", (0, import_kit14.getU128Decoder)()]
|
|
909
927
|
]);
|
|
910
928
|
}
|
|
911
929
|
function getRewardInfoCodec() {
|
|
912
|
-
return (0,
|
|
930
|
+
return (0, import_kit14.combineCodec)(getRewardInfoEncoder(), getRewardInfoDecoder());
|
|
913
931
|
}
|
|
914
932
|
|
|
915
933
|
// src/generated/types/swapEvent.ts
|
|
916
|
-
var
|
|
934
|
+
var import_kit15 = require("@solana/kit");
|
|
917
935
|
function getSwapEventEncoder() {
|
|
918
|
-
return (0,
|
|
919
|
-
["poolState", (0,
|
|
920
|
-
["sender", (0,
|
|
921
|
-
["tokenAccount0", (0,
|
|
922
|
-
["tokenAccount1", (0,
|
|
923
|
-
["amount0", (0,
|
|
924
|
-
["transferFee0", (0,
|
|
925
|
-
["amount1", (0,
|
|
926
|
-
["transferFee1", (0,
|
|
927
|
-
["zeroForOne", (0,
|
|
928
|
-
["sqrtPriceX64", (0,
|
|
929
|
-
["liquidity", (0,
|
|
930
|
-
["tick", (0,
|
|
936
|
+
return (0, import_kit15.getStructEncoder)([
|
|
937
|
+
["poolState", (0, import_kit15.getAddressEncoder)()],
|
|
938
|
+
["sender", (0, import_kit15.getAddressEncoder)()],
|
|
939
|
+
["tokenAccount0", (0, import_kit15.getAddressEncoder)()],
|
|
940
|
+
["tokenAccount1", (0, import_kit15.getAddressEncoder)()],
|
|
941
|
+
["amount0", (0, import_kit15.getU64Encoder)()],
|
|
942
|
+
["transferFee0", (0, import_kit15.getU64Encoder)()],
|
|
943
|
+
["amount1", (0, import_kit15.getU64Encoder)()],
|
|
944
|
+
["transferFee1", (0, import_kit15.getU64Encoder)()],
|
|
945
|
+
["zeroForOne", (0, import_kit15.getBooleanEncoder)()],
|
|
946
|
+
["sqrtPriceX64", (0, import_kit15.getU128Encoder)()],
|
|
947
|
+
["liquidity", (0, import_kit15.getU128Encoder)()],
|
|
948
|
+
["tick", (0, import_kit15.getI32Encoder)()]
|
|
931
949
|
]);
|
|
932
950
|
}
|
|
933
951
|
function getSwapEventDecoder() {
|
|
934
|
-
return (0,
|
|
935
|
-
["poolState", (0,
|
|
936
|
-
["sender", (0,
|
|
937
|
-
["tokenAccount0", (0,
|
|
938
|
-
["tokenAccount1", (0,
|
|
939
|
-
["amount0", (0,
|
|
940
|
-
["transferFee0", (0,
|
|
941
|
-
["amount1", (0,
|
|
942
|
-
["transferFee1", (0,
|
|
943
|
-
["zeroForOne", (0,
|
|
944
|
-
["sqrtPriceX64", (0,
|
|
945
|
-
["liquidity", (0,
|
|
946
|
-
["tick", (0,
|
|
952
|
+
return (0, import_kit15.getStructDecoder)([
|
|
953
|
+
["poolState", (0, import_kit15.getAddressDecoder)()],
|
|
954
|
+
["sender", (0, import_kit15.getAddressDecoder)()],
|
|
955
|
+
["tokenAccount0", (0, import_kit15.getAddressDecoder)()],
|
|
956
|
+
["tokenAccount1", (0, import_kit15.getAddressDecoder)()],
|
|
957
|
+
["amount0", (0, import_kit15.getU64Decoder)()],
|
|
958
|
+
["transferFee0", (0, import_kit15.getU64Decoder)()],
|
|
959
|
+
["amount1", (0, import_kit15.getU64Decoder)()],
|
|
960
|
+
["transferFee1", (0, import_kit15.getU64Decoder)()],
|
|
961
|
+
["zeroForOne", (0, import_kit15.getBooleanDecoder)()],
|
|
962
|
+
["sqrtPriceX64", (0, import_kit15.getU128Decoder)()],
|
|
963
|
+
["liquidity", (0, import_kit15.getU128Decoder)()],
|
|
964
|
+
["tick", (0, import_kit15.getI32Decoder)()]
|
|
947
965
|
]);
|
|
948
966
|
}
|
|
949
967
|
function getSwapEventCodec() {
|
|
950
|
-
return (0,
|
|
968
|
+
return (0, import_kit15.combineCodec)(getSwapEventEncoder(), getSwapEventDecoder());
|
|
951
969
|
}
|
|
952
970
|
|
|
953
971
|
// src/generated/types/tickState.ts
|
|
954
|
-
var
|
|
972
|
+
var import_kit16 = require("@solana/kit");
|
|
955
973
|
function getTickStateEncoder() {
|
|
956
|
-
return (0,
|
|
957
|
-
["tick", (0,
|
|
958
|
-
["liquidityNet", (0,
|
|
959
|
-
["liquidityGross", (0,
|
|
960
|
-
["feeGrowthOutside0X64", (0,
|
|
961
|
-
["feeGrowthOutside1X64", (0,
|
|
962
|
-
["rewardGrowthsOutsideX64", (0,
|
|
963
|
-
["padding", (0,
|
|
974
|
+
return (0, import_kit16.getStructEncoder)([
|
|
975
|
+
["tick", (0, import_kit16.getI32Encoder)()],
|
|
976
|
+
["liquidityNet", (0, import_kit16.getI128Encoder)()],
|
|
977
|
+
["liquidityGross", (0, import_kit16.getU128Encoder)()],
|
|
978
|
+
["feeGrowthOutside0X64", (0, import_kit16.getU128Encoder)()],
|
|
979
|
+
["feeGrowthOutside1X64", (0, import_kit16.getU128Encoder)()],
|
|
980
|
+
["rewardGrowthsOutsideX64", (0, import_kit16.getArrayEncoder)((0, import_kit16.getU128Encoder)(), { size: 3 })],
|
|
981
|
+
["padding", (0, import_kit16.getArrayEncoder)((0, import_kit16.getU32Encoder)(), { size: 13 })]
|
|
964
982
|
]);
|
|
965
983
|
}
|
|
966
984
|
function getTickStateDecoder() {
|
|
967
|
-
return (0,
|
|
968
|
-
["tick", (0,
|
|
969
|
-
["liquidityNet", (0,
|
|
970
|
-
["liquidityGross", (0,
|
|
971
|
-
["feeGrowthOutside0X64", (0,
|
|
972
|
-
["feeGrowthOutside1X64", (0,
|
|
973
|
-
["rewardGrowthsOutsideX64", (0,
|
|
974
|
-
["padding", (0,
|
|
985
|
+
return (0, import_kit16.getStructDecoder)([
|
|
986
|
+
["tick", (0, import_kit16.getI32Decoder)()],
|
|
987
|
+
["liquidityNet", (0, import_kit16.getI128Decoder)()],
|
|
988
|
+
["liquidityGross", (0, import_kit16.getU128Decoder)()],
|
|
989
|
+
["feeGrowthOutside0X64", (0, import_kit16.getU128Decoder)()],
|
|
990
|
+
["feeGrowthOutside1X64", (0, import_kit16.getU128Decoder)()],
|
|
991
|
+
["rewardGrowthsOutsideX64", (0, import_kit16.getArrayDecoder)((0, import_kit16.getU128Decoder)(), { size: 3 })],
|
|
992
|
+
["padding", (0, import_kit16.getArrayDecoder)((0, import_kit16.getU32Decoder)(), { size: 13 })]
|
|
975
993
|
]);
|
|
976
994
|
}
|
|
977
995
|
function getTickStateCodec() {
|
|
978
|
-
return (0,
|
|
996
|
+
return (0, import_kit16.combineCodec)(getTickStateEncoder(), getTickStateDecoder());
|
|
979
997
|
}
|
|
980
998
|
|
|
981
999
|
// src/generated/types/updateRewardInfosEvent.ts
|
|
982
|
-
var
|
|
1000
|
+
var import_kit17 = require("@solana/kit");
|
|
983
1001
|
function getUpdateRewardInfosEventEncoder() {
|
|
984
|
-
return (0,
|
|
985
|
-
["rewardGrowthGlobalX64", (0,
|
|
1002
|
+
return (0, import_kit17.getStructEncoder)([
|
|
1003
|
+
["rewardGrowthGlobalX64", (0, import_kit17.getArrayEncoder)((0, import_kit17.getU128Encoder)(), { size: 3 })]
|
|
986
1004
|
]);
|
|
987
1005
|
}
|
|
988
1006
|
function getUpdateRewardInfosEventDecoder() {
|
|
989
|
-
return (0,
|
|
990
|
-
["rewardGrowthGlobalX64", (0,
|
|
1007
|
+
return (0, import_kit17.getStructDecoder)([
|
|
1008
|
+
["rewardGrowthGlobalX64", (0, import_kit17.getArrayDecoder)((0, import_kit17.getU128Decoder)(), { size: 3 })]
|
|
991
1009
|
]);
|
|
992
1010
|
}
|
|
993
1011
|
function getUpdateRewardInfosEventCodec() {
|
|
994
|
-
return (0,
|
|
1012
|
+
return (0, import_kit17.combineCodec)(
|
|
995
1013
|
getUpdateRewardInfosEventEncoder(),
|
|
996
1014
|
getUpdateRewardInfosEventDecoder()
|
|
997
1015
|
);
|
|
@@ -1009,54 +1027,54 @@ var OBSERVATION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1009
1027
|
132
|
|
1010
1028
|
]);
|
|
1011
1029
|
function getObservationStateDiscriminatorBytes() {
|
|
1012
|
-
return (0,
|
|
1030
|
+
return (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8).encode(
|
|
1013
1031
|
OBSERVATION_STATE_DISCRIMINATOR
|
|
1014
1032
|
);
|
|
1015
1033
|
}
|
|
1016
1034
|
function getObservationStateEncoder() {
|
|
1017
|
-
return (0,
|
|
1018
|
-
(0,
|
|
1019
|
-
["discriminator", (0,
|
|
1020
|
-
["initialized", (0,
|
|
1021
|
-
["recentEpoch", (0,
|
|
1022
|
-
["observationIndex", (0,
|
|
1023
|
-
["poolId", (0,
|
|
1024
|
-
["observations", (0,
|
|
1025
|
-
["padding", (0,
|
|
1035
|
+
return (0, import_kit18.transformEncoder)(
|
|
1036
|
+
(0, import_kit18.getStructEncoder)([
|
|
1037
|
+
["discriminator", (0, import_kit18.fixEncoderSize)((0, import_kit18.getBytesEncoder)(), 8)],
|
|
1038
|
+
["initialized", (0, import_kit18.getBooleanEncoder)()],
|
|
1039
|
+
["recentEpoch", (0, import_kit18.getU64Encoder)()],
|
|
1040
|
+
["observationIndex", (0, import_kit18.getU16Encoder)()],
|
|
1041
|
+
["poolId", (0, import_kit18.getAddressEncoder)()],
|
|
1042
|
+
["observations", (0, import_kit18.getArrayEncoder)(getObservationEncoder(), { size: 100 })],
|
|
1043
|
+
["padding", (0, import_kit18.getArrayEncoder)((0, import_kit18.getU64Encoder)(), { size: 4 })]
|
|
1026
1044
|
]),
|
|
1027
1045
|
(value) => ({ ...value, discriminator: OBSERVATION_STATE_DISCRIMINATOR })
|
|
1028
1046
|
);
|
|
1029
1047
|
}
|
|
1030
1048
|
function getObservationStateDecoder() {
|
|
1031
|
-
return (0,
|
|
1032
|
-
["discriminator", (0,
|
|
1033
|
-
["initialized", (0,
|
|
1034
|
-
["recentEpoch", (0,
|
|
1035
|
-
["observationIndex", (0,
|
|
1036
|
-
["poolId", (0,
|
|
1037
|
-
["observations", (0,
|
|
1038
|
-
["padding", (0,
|
|
1049
|
+
return (0, import_kit18.getStructDecoder)([
|
|
1050
|
+
["discriminator", (0, import_kit18.fixDecoderSize)((0, import_kit18.getBytesDecoder)(), 8)],
|
|
1051
|
+
["initialized", (0, import_kit18.getBooleanDecoder)()],
|
|
1052
|
+
["recentEpoch", (0, import_kit18.getU64Decoder)()],
|
|
1053
|
+
["observationIndex", (0, import_kit18.getU16Decoder)()],
|
|
1054
|
+
["poolId", (0, import_kit18.getAddressDecoder)()],
|
|
1055
|
+
["observations", (0, import_kit18.getArrayDecoder)(getObservationDecoder(), { size: 100 })],
|
|
1056
|
+
["padding", (0, import_kit18.getArrayDecoder)((0, import_kit18.getU64Decoder)(), { size: 4 })]
|
|
1039
1057
|
]);
|
|
1040
1058
|
}
|
|
1041
1059
|
function getObservationStateCodec() {
|
|
1042
|
-
return (0,
|
|
1060
|
+
return (0, import_kit18.combineCodec)(
|
|
1043
1061
|
getObservationStateEncoder(),
|
|
1044
1062
|
getObservationStateDecoder()
|
|
1045
1063
|
);
|
|
1046
1064
|
}
|
|
1047
1065
|
function decodeObservationState(encodedAccount) {
|
|
1048
|
-
return (0,
|
|
1066
|
+
return (0, import_kit18.decodeAccount)(
|
|
1049
1067
|
encodedAccount,
|
|
1050
1068
|
getObservationStateDecoder()
|
|
1051
1069
|
);
|
|
1052
1070
|
}
|
|
1053
1071
|
async function fetchObservationState(rpc, address5, config) {
|
|
1054
1072
|
const maybeAccount = await fetchMaybeObservationState(rpc, address5, config);
|
|
1055
|
-
(0,
|
|
1073
|
+
(0, import_kit18.assertAccountExists)(maybeAccount);
|
|
1056
1074
|
return maybeAccount;
|
|
1057
1075
|
}
|
|
1058
1076
|
async function fetchMaybeObservationState(rpc, address5, config) {
|
|
1059
|
-
const maybeAccount = await (0,
|
|
1077
|
+
const maybeAccount = await (0, import_kit18.fetchEncodedAccount)(rpc, address5, config);
|
|
1060
1078
|
return decodeObservationState(maybeAccount);
|
|
1061
1079
|
}
|
|
1062
1080
|
async function fetchAllObservationState(rpc, addresses, config) {
|
|
@@ -1065,11 +1083,11 @@ async function fetchAllObservationState(rpc, addresses, config) {
|
|
|
1065
1083
|
addresses,
|
|
1066
1084
|
config
|
|
1067
1085
|
);
|
|
1068
|
-
(0,
|
|
1086
|
+
(0, import_kit18.assertAccountsExist)(maybeAccounts);
|
|
1069
1087
|
return maybeAccounts;
|
|
1070
1088
|
}
|
|
1071
1089
|
async function fetchAllMaybeObservationState(rpc, addresses, config) {
|
|
1072
|
-
const maybeAccounts = await (0,
|
|
1090
|
+
const maybeAccounts = await (0, import_kit18.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1073
1091
|
return maybeAccounts.map(
|
|
1074
1092
|
(maybeAccount) => decodeObservationState(maybeAccount)
|
|
1075
1093
|
);
|
|
@@ -1079,7 +1097,7 @@ function getObservationStateSize() {
|
|
|
1079
1097
|
}
|
|
1080
1098
|
|
|
1081
1099
|
// src/generated/accounts/operationState.ts
|
|
1082
|
-
var
|
|
1100
|
+
var import_kit19 = require("@solana/kit");
|
|
1083
1101
|
var OPERATION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
1084
1102
|
19,
|
|
1085
1103
|
236,
|
|
@@ -1091,45 +1109,45 @@ var OPERATION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1091
1109
|
252
|
|
1092
1110
|
]);
|
|
1093
1111
|
function getOperationStateDiscriminatorBytes() {
|
|
1094
|
-
return (0,
|
|
1112
|
+
return (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8).encode(
|
|
1095
1113
|
OPERATION_STATE_DISCRIMINATOR
|
|
1096
1114
|
);
|
|
1097
1115
|
}
|
|
1098
1116
|
function getOperationStateEncoder() {
|
|
1099
|
-
return (0,
|
|
1100
|
-
(0,
|
|
1101
|
-
["discriminator", (0,
|
|
1102
|
-
["bump", (0,
|
|
1103
|
-
["operationOwners", (0,
|
|
1104
|
-
["whitelistMints", (0,
|
|
1117
|
+
return (0, import_kit19.transformEncoder)(
|
|
1118
|
+
(0, import_kit19.getStructEncoder)([
|
|
1119
|
+
["discriminator", (0, import_kit19.fixEncoderSize)((0, import_kit19.getBytesEncoder)(), 8)],
|
|
1120
|
+
["bump", (0, import_kit19.getU8Encoder)()],
|
|
1121
|
+
["operationOwners", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 10 })],
|
|
1122
|
+
["whitelistMints", (0, import_kit19.getArrayEncoder)((0, import_kit19.getAddressEncoder)(), { size: 100 })]
|
|
1105
1123
|
]),
|
|
1106
1124
|
(value) => ({ ...value, discriminator: OPERATION_STATE_DISCRIMINATOR })
|
|
1107
1125
|
);
|
|
1108
1126
|
}
|
|
1109
1127
|
function getOperationStateDecoder() {
|
|
1110
|
-
return (0,
|
|
1111
|
-
["discriminator", (0,
|
|
1112
|
-
["bump", (0,
|
|
1113
|
-
["operationOwners", (0,
|
|
1114
|
-
["whitelistMints", (0,
|
|
1128
|
+
return (0, import_kit19.getStructDecoder)([
|
|
1129
|
+
["discriminator", (0, import_kit19.fixDecoderSize)((0, import_kit19.getBytesDecoder)(), 8)],
|
|
1130
|
+
["bump", (0, import_kit19.getU8Decoder)()],
|
|
1131
|
+
["operationOwners", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 10 })],
|
|
1132
|
+
["whitelistMints", (0, import_kit19.getArrayDecoder)((0, import_kit19.getAddressDecoder)(), { size: 100 })]
|
|
1115
1133
|
]);
|
|
1116
1134
|
}
|
|
1117
1135
|
function getOperationStateCodec() {
|
|
1118
|
-
return (0,
|
|
1136
|
+
return (0, import_kit19.combineCodec)(getOperationStateEncoder(), getOperationStateDecoder());
|
|
1119
1137
|
}
|
|
1120
1138
|
function decodeOperationState(encodedAccount) {
|
|
1121
|
-
return (0,
|
|
1139
|
+
return (0, import_kit19.decodeAccount)(
|
|
1122
1140
|
encodedAccount,
|
|
1123
1141
|
getOperationStateDecoder()
|
|
1124
1142
|
);
|
|
1125
1143
|
}
|
|
1126
1144
|
async function fetchOperationState(rpc, address5, config) {
|
|
1127
1145
|
const maybeAccount = await fetchMaybeOperationState(rpc, address5, config);
|
|
1128
|
-
(0,
|
|
1146
|
+
(0, import_kit19.assertAccountExists)(maybeAccount);
|
|
1129
1147
|
return maybeAccount;
|
|
1130
1148
|
}
|
|
1131
1149
|
async function fetchMaybeOperationState(rpc, address5, config) {
|
|
1132
|
-
const maybeAccount = await (0,
|
|
1150
|
+
const maybeAccount = await (0, import_kit19.fetchEncodedAccount)(rpc, address5, config);
|
|
1133
1151
|
return decodeOperationState(maybeAccount);
|
|
1134
1152
|
}
|
|
1135
1153
|
async function fetchAllOperationState(rpc, addresses, config) {
|
|
@@ -1138,11 +1156,11 @@ async function fetchAllOperationState(rpc, addresses, config) {
|
|
|
1138
1156
|
addresses,
|
|
1139
1157
|
config
|
|
1140
1158
|
);
|
|
1141
|
-
(0,
|
|
1159
|
+
(0, import_kit19.assertAccountsExist)(maybeAccounts);
|
|
1142
1160
|
return maybeAccounts;
|
|
1143
1161
|
}
|
|
1144
1162
|
async function fetchAllMaybeOperationState(rpc, addresses, config) {
|
|
1145
|
-
const maybeAccounts = await (0,
|
|
1163
|
+
const maybeAccounts = await (0, import_kit19.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1146
1164
|
return maybeAccounts.map(
|
|
1147
1165
|
(maybeAccount) => decodeOperationState(maybeAccount)
|
|
1148
1166
|
);
|
|
@@ -1152,7 +1170,7 @@ function getOperationStateSize() {
|
|
|
1152
1170
|
}
|
|
1153
1171
|
|
|
1154
1172
|
// src/generated/accounts/personalPositionState.ts
|
|
1155
|
-
var
|
|
1173
|
+
var import_kit20 = require("@solana/kit");
|
|
1156
1174
|
var PERSONAL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
1157
1175
|
70,
|
|
1158
1176
|
111,
|
|
@@ -1164,30 +1182,30 @@ var PERSONAL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1164
1182
|
117
|
|
1165
1183
|
]);
|
|
1166
1184
|
function getPersonalPositionStateDiscriminatorBytes() {
|
|
1167
|
-
return (0,
|
|
1185
|
+
return (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8).encode(
|
|
1168
1186
|
PERSONAL_POSITION_STATE_DISCRIMINATOR
|
|
1169
1187
|
);
|
|
1170
1188
|
}
|
|
1171
1189
|
function getPersonalPositionStateEncoder() {
|
|
1172
|
-
return (0,
|
|
1173
|
-
(0,
|
|
1174
|
-
["discriminator", (0,
|
|
1175
|
-
["bump", (0,
|
|
1176
|
-
["nftMint", (0,
|
|
1177
|
-
["poolId", (0,
|
|
1178
|
-
["tickLowerIndex", (0,
|
|
1179
|
-
["tickUpperIndex", (0,
|
|
1180
|
-
["liquidity", (0,
|
|
1181
|
-
["feeGrowthInside0LastX64", (0,
|
|
1182
|
-
["feeGrowthInside1LastX64", (0,
|
|
1183
|
-
["tokenFeesOwed0", (0,
|
|
1184
|
-
["tokenFeesOwed1", (0,
|
|
1190
|
+
return (0, import_kit20.transformEncoder)(
|
|
1191
|
+
(0, import_kit20.getStructEncoder)([
|
|
1192
|
+
["discriminator", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 8)],
|
|
1193
|
+
["bump", (0, import_kit20.fixEncoderSize)((0, import_kit20.getBytesEncoder)(), 1)],
|
|
1194
|
+
["nftMint", (0, import_kit20.getAddressEncoder)()],
|
|
1195
|
+
["poolId", (0, import_kit20.getAddressEncoder)()],
|
|
1196
|
+
["tickLowerIndex", (0, import_kit20.getI32Encoder)()],
|
|
1197
|
+
["tickUpperIndex", (0, import_kit20.getI32Encoder)()],
|
|
1198
|
+
["liquidity", (0, import_kit20.getU128Encoder)()],
|
|
1199
|
+
["feeGrowthInside0LastX64", (0, import_kit20.getU128Encoder)()],
|
|
1200
|
+
["feeGrowthInside1LastX64", (0, import_kit20.getU128Encoder)()],
|
|
1201
|
+
["tokenFeesOwed0", (0, import_kit20.getU64Encoder)()],
|
|
1202
|
+
["tokenFeesOwed1", (0, import_kit20.getU64Encoder)()],
|
|
1185
1203
|
[
|
|
1186
1204
|
"rewardInfos",
|
|
1187
|
-
(0,
|
|
1205
|
+
(0, import_kit20.getArrayEncoder)(getPositionRewardInfoEncoder(), { size: 3 })
|
|
1188
1206
|
],
|
|
1189
|
-
["recentEpoch", (0,
|
|
1190
|
-
["padding", (0,
|
|
1207
|
+
["recentEpoch", (0, import_kit20.getU64Encoder)()],
|
|
1208
|
+
["padding", (0, import_kit20.getArrayEncoder)((0, import_kit20.getU64Encoder)(), { size: 7 })]
|
|
1191
1209
|
]),
|
|
1192
1210
|
(value) => ({
|
|
1193
1211
|
...value,
|
|
@@ -1196,34 +1214,34 @@ function getPersonalPositionStateEncoder() {
|
|
|
1196
1214
|
);
|
|
1197
1215
|
}
|
|
1198
1216
|
function getPersonalPositionStateDecoder() {
|
|
1199
|
-
return (0,
|
|
1200
|
-
["discriminator", (0,
|
|
1201
|
-
["bump", (0,
|
|
1202
|
-
["nftMint", (0,
|
|
1203
|
-
["poolId", (0,
|
|
1204
|
-
["tickLowerIndex", (0,
|
|
1205
|
-
["tickUpperIndex", (0,
|
|
1206
|
-
["liquidity", (0,
|
|
1207
|
-
["feeGrowthInside0LastX64", (0,
|
|
1208
|
-
["feeGrowthInside1LastX64", (0,
|
|
1209
|
-
["tokenFeesOwed0", (0,
|
|
1210
|
-
["tokenFeesOwed1", (0,
|
|
1217
|
+
return (0, import_kit20.getStructDecoder)([
|
|
1218
|
+
["discriminator", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 8)],
|
|
1219
|
+
["bump", (0, import_kit20.fixDecoderSize)((0, import_kit20.getBytesDecoder)(), 1)],
|
|
1220
|
+
["nftMint", (0, import_kit20.getAddressDecoder)()],
|
|
1221
|
+
["poolId", (0, import_kit20.getAddressDecoder)()],
|
|
1222
|
+
["tickLowerIndex", (0, import_kit20.getI32Decoder)()],
|
|
1223
|
+
["tickUpperIndex", (0, import_kit20.getI32Decoder)()],
|
|
1224
|
+
["liquidity", (0, import_kit20.getU128Decoder)()],
|
|
1225
|
+
["feeGrowthInside0LastX64", (0, import_kit20.getU128Decoder)()],
|
|
1226
|
+
["feeGrowthInside1LastX64", (0, import_kit20.getU128Decoder)()],
|
|
1227
|
+
["tokenFeesOwed0", (0, import_kit20.getU64Decoder)()],
|
|
1228
|
+
["tokenFeesOwed1", (0, import_kit20.getU64Decoder)()],
|
|
1211
1229
|
[
|
|
1212
1230
|
"rewardInfos",
|
|
1213
|
-
(0,
|
|
1231
|
+
(0, import_kit20.getArrayDecoder)(getPositionRewardInfoDecoder(), { size: 3 })
|
|
1214
1232
|
],
|
|
1215
|
-
["recentEpoch", (0,
|
|
1216
|
-
["padding", (0,
|
|
1233
|
+
["recentEpoch", (0, import_kit20.getU64Decoder)()],
|
|
1234
|
+
["padding", (0, import_kit20.getArrayDecoder)((0, import_kit20.getU64Decoder)(), { size: 7 })]
|
|
1217
1235
|
]);
|
|
1218
1236
|
}
|
|
1219
1237
|
function getPersonalPositionStateCodec() {
|
|
1220
|
-
return (0,
|
|
1238
|
+
return (0, import_kit20.combineCodec)(
|
|
1221
1239
|
getPersonalPositionStateEncoder(),
|
|
1222
1240
|
getPersonalPositionStateDecoder()
|
|
1223
1241
|
);
|
|
1224
1242
|
}
|
|
1225
1243
|
function decodePersonalPositionState(encodedAccount) {
|
|
1226
|
-
return (0,
|
|
1244
|
+
return (0, import_kit20.decodeAccount)(
|
|
1227
1245
|
encodedAccount,
|
|
1228
1246
|
getPersonalPositionStateDecoder()
|
|
1229
1247
|
);
|
|
@@ -1234,11 +1252,11 @@ async function fetchPersonalPositionState(rpc, address5, config) {
|
|
|
1234
1252
|
address5,
|
|
1235
1253
|
config
|
|
1236
1254
|
);
|
|
1237
|
-
(0,
|
|
1255
|
+
(0, import_kit20.assertAccountExists)(maybeAccount);
|
|
1238
1256
|
return maybeAccount;
|
|
1239
1257
|
}
|
|
1240
1258
|
async function fetchMaybePersonalPositionState(rpc, address5, config) {
|
|
1241
|
-
const maybeAccount = await (0,
|
|
1259
|
+
const maybeAccount = await (0, import_kit20.fetchEncodedAccount)(rpc, address5, config);
|
|
1242
1260
|
return decodePersonalPositionState(maybeAccount);
|
|
1243
1261
|
}
|
|
1244
1262
|
async function fetchAllPersonalPositionState(rpc, addresses, config) {
|
|
@@ -1247,11 +1265,11 @@ async function fetchAllPersonalPositionState(rpc, addresses, config) {
|
|
|
1247
1265
|
addresses,
|
|
1248
1266
|
config
|
|
1249
1267
|
);
|
|
1250
|
-
(0,
|
|
1268
|
+
(0, import_kit20.assertAccountsExist)(maybeAccounts);
|
|
1251
1269
|
return maybeAccounts;
|
|
1252
1270
|
}
|
|
1253
1271
|
async function fetchAllMaybePersonalPositionState(rpc, addresses, config) {
|
|
1254
|
-
const maybeAccounts = await (0,
|
|
1272
|
+
const maybeAccounts = await (0, import_kit20.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1255
1273
|
return maybeAccounts.map(
|
|
1256
1274
|
(maybeAccount) => decodePersonalPositionState(maybeAccount)
|
|
1257
1275
|
);
|
|
@@ -1261,7 +1279,7 @@ function getPersonalPositionStateSize() {
|
|
|
1261
1279
|
}
|
|
1262
1280
|
|
|
1263
1281
|
// src/generated/accounts/poolState.ts
|
|
1264
|
-
var
|
|
1282
|
+
var import_kit21 = require("@solana/kit");
|
|
1265
1283
|
var POOL_STATE_DISCRIMINATOR = new Uint8Array([
|
|
1266
1284
|
247,
|
|
1267
1285
|
237,
|
|
@@ -1273,122 +1291,122 @@ var POOL_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1273
1291
|
70
|
|
1274
1292
|
]);
|
|
1275
1293
|
function getPoolStateDiscriminatorBytes() {
|
|
1276
|
-
return (0,
|
|
1294
|
+
return (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8).encode(POOL_STATE_DISCRIMINATOR);
|
|
1277
1295
|
}
|
|
1278
1296
|
function getPoolStateEncoder() {
|
|
1279
|
-
return (0,
|
|
1280
|
-
(0,
|
|
1281
|
-
["discriminator", (0,
|
|
1282
|
-
["bump", (0,
|
|
1283
|
-
["ammConfig", (0,
|
|
1284
|
-
["owner", (0,
|
|
1285
|
-
["tokenMint0", (0,
|
|
1286
|
-
["tokenMint1", (0,
|
|
1287
|
-
["tokenVault0", (0,
|
|
1288
|
-
["tokenVault1", (0,
|
|
1289
|
-
["observationKey", (0,
|
|
1290
|
-
["mintDecimals0", (0,
|
|
1291
|
-
["mintDecimals1", (0,
|
|
1292
|
-
["tickSpacing", (0,
|
|
1293
|
-
["liquidity", (0,
|
|
1294
|
-
["sqrtPriceX64", (0,
|
|
1295
|
-
["tickCurrent", (0,
|
|
1296
|
-
["padding3", (0,
|
|
1297
|
-
["padding4", (0,
|
|
1298
|
-
["feeGrowthGlobal0X64", (0,
|
|
1299
|
-
["feeGrowthGlobal1X64", (0,
|
|
1300
|
-
["protocolFeesToken0", (0,
|
|
1301
|
-
["protocolFeesToken1", (0,
|
|
1302
|
-
["swapInAmountToken0", (0,
|
|
1303
|
-
["swapOutAmountToken1", (0,
|
|
1304
|
-
["swapInAmountToken1", (0,
|
|
1305
|
-
["swapOutAmountToken0", (0,
|
|
1306
|
-
["status", (0,
|
|
1307
|
-
["padding", (0,
|
|
1308
|
-
["rewardInfos", (0,
|
|
1309
|
-
["tickArrayBitmap", (0,
|
|
1310
|
-
["totalFeesToken0", (0,
|
|
1311
|
-
["totalFeesClaimedToken0", (0,
|
|
1312
|
-
["totalFeesToken1", (0,
|
|
1313
|
-
["totalFeesClaimedToken1", (0,
|
|
1314
|
-
["fundFeesToken0", (0,
|
|
1315
|
-
["fundFeesToken1", (0,
|
|
1316
|
-
["openTime", (0,
|
|
1317
|
-
["recentEpoch", (0,
|
|
1318
|
-
["padding1", (0,
|
|
1319
|
-
["padding2", (0,
|
|
1297
|
+
return (0, import_kit21.transformEncoder)(
|
|
1298
|
+
(0, import_kit21.getStructEncoder)([
|
|
1299
|
+
["discriminator", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 8)],
|
|
1300
|
+
["bump", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 1)],
|
|
1301
|
+
["ammConfig", (0, import_kit21.getAddressEncoder)()],
|
|
1302
|
+
["owner", (0, import_kit21.getAddressEncoder)()],
|
|
1303
|
+
["tokenMint0", (0, import_kit21.getAddressEncoder)()],
|
|
1304
|
+
["tokenMint1", (0, import_kit21.getAddressEncoder)()],
|
|
1305
|
+
["tokenVault0", (0, import_kit21.getAddressEncoder)()],
|
|
1306
|
+
["tokenVault1", (0, import_kit21.getAddressEncoder)()],
|
|
1307
|
+
["observationKey", (0, import_kit21.getAddressEncoder)()],
|
|
1308
|
+
["mintDecimals0", (0, import_kit21.getU8Encoder)()],
|
|
1309
|
+
["mintDecimals1", (0, import_kit21.getU8Encoder)()],
|
|
1310
|
+
["tickSpacing", (0, import_kit21.getU16Encoder)()],
|
|
1311
|
+
["liquidity", (0, import_kit21.getU128Encoder)()],
|
|
1312
|
+
["sqrtPriceX64", (0, import_kit21.getU128Encoder)()],
|
|
1313
|
+
["tickCurrent", (0, import_kit21.getI32Encoder)()],
|
|
1314
|
+
["padding3", (0, import_kit21.getU16Encoder)()],
|
|
1315
|
+
["padding4", (0, import_kit21.getU16Encoder)()],
|
|
1316
|
+
["feeGrowthGlobal0X64", (0, import_kit21.getU128Encoder)()],
|
|
1317
|
+
["feeGrowthGlobal1X64", (0, import_kit21.getU128Encoder)()],
|
|
1318
|
+
["protocolFeesToken0", (0, import_kit21.getU64Encoder)()],
|
|
1319
|
+
["protocolFeesToken1", (0, import_kit21.getU64Encoder)()],
|
|
1320
|
+
["swapInAmountToken0", (0, import_kit21.getU128Encoder)()],
|
|
1321
|
+
["swapOutAmountToken1", (0, import_kit21.getU128Encoder)()],
|
|
1322
|
+
["swapInAmountToken1", (0, import_kit21.getU128Encoder)()],
|
|
1323
|
+
["swapOutAmountToken0", (0, import_kit21.getU128Encoder)()],
|
|
1324
|
+
["status", (0, import_kit21.getU8Encoder)()],
|
|
1325
|
+
["padding", (0, import_kit21.fixEncoderSize)((0, import_kit21.getBytesEncoder)(), 7)],
|
|
1326
|
+
["rewardInfos", (0, import_kit21.getArrayEncoder)(getRewardInfoEncoder(), { size: 3 })],
|
|
1327
|
+
["tickArrayBitmap", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 16 })],
|
|
1328
|
+
["totalFeesToken0", (0, import_kit21.getU64Encoder)()],
|
|
1329
|
+
["totalFeesClaimedToken0", (0, import_kit21.getU64Encoder)()],
|
|
1330
|
+
["totalFeesToken1", (0, import_kit21.getU64Encoder)()],
|
|
1331
|
+
["totalFeesClaimedToken1", (0, import_kit21.getU64Encoder)()],
|
|
1332
|
+
["fundFeesToken0", (0, import_kit21.getU64Encoder)()],
|
|
1333
|
+
["fundFeesToken1", (0, import_kit21.getU64Encoder)()],
|
|
1334
|
+
["openTime", (0, import_kit21.getU64Encoder)()],
|
|
1335
|
+
["recentEpoch", (0, import_kit21.getU64Encoder)()],
|
|
1336
|
+
["padding1", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 24 })],
|
|
1337
|
+
["padding2", (0, import_kit21.getArrayEncoder)((0, import_kit21.getU64Encoder)(), { size: 32 })]
|
|
1320
1338
|
]),
|
|
1321
1339
|
(value) => ({ ...value, discriminator: POOL_STATE_DISCRIMINATOR })
|
|
1322
1340
|
);
|
|
1323
1341
|
}
|
|
1324
1342
|
function getPoolStateDecoder() {
|
|
1325
|
-
return (0,
|
|
1326
|
-
["discriminator", (0,
|
|
1327
|
-
["bump", (0,
|
|
1328
|
-
["ammConfig", (0,
|
|
1329
|
-
["owner", (0,
|
|
1330
|
-
["tokenMint0", (0,
|
|
1331
|
-
["tokenMint1", (0,
|
|
1332
|
-
["tokenVault0", (0,
|
|
1333
|
-
["tokenVault1", (0,
|
|
1334
|
-
["observationKey", (0,
|
|
1335
|
-
["mintDecimals0", (0,
|
|
1336
|
-
["mintDecimals1", (0,
|
|
1337
|
-
["tickSpacing", (0,
|
|
1338
|
-
["liquidity", (0,
|
|
1339
|
-
["sqrtPriceX64", (0,
|
|
1340
|
-
["tickCurrent", (0,
|
|
1341
|
-
["padding3", (0,
|
|
1342
|
-
["padding4", (0,
|
|
1343
|
-
["feeGrowthGlobal0X64", (0,
|
|
1344
|
-
["feeGrowthGlobal1X64", (0,
|
|
1345
|
-
["protocolFeesToken0", (0,
|
|
1346
|
-
["protocolFeesToken1", (0,
|
|
1347
|
-
["swapInAmountToken0", (0,
|
|
1348
|
-
["swapOutAmountToken1", (0,
|
|
1349
|
-
["swapInAmountToken1", (0,
|
|
1350
|
-
["swapOutAmountToken0", (0,
|
|
1351
|
-
["status", (0,
|
|
1352
|
-
["padding", (0,
|
|
1353
|
-
["rewardInfos", (0,
|
|
1354
|
-
["tickArrayBitmap", (0,
|
|
1355
|
-
["totalFeesToken0", (0,
|
|
1356
|
-
["totalFeesClaimedToken0", (0,
|
|
1357
|
-
["totalFeesToken1", (0,
|
|
1358
|
-
["totalFeesClaimedToken1", (0,
|
|
1359
|
-
["fundFeesToken0", (0,
|
|
1360
|
-
["fundFeesToken1", (0,
|
|
1361
|
-
["openTime", (0,
|
|
1362
|
-
["recentEpoch", (0,
|
|
1363
|
-
["padding1", (0,
|
|
1364
|
-
["padding2", (0,
|
|
1343
|
+
return (0, import_kit21.getStructDecoder)([
|
|
1344
|
+
["discriminator", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 8)],
|
|
1345
|
+
["bump", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 1)],
|
|
1346
|
+
["ammConfig", (0, import_kit21.getAddressDecoder)()],
|
|
1347
|
+
["owner", (0, import_kit21.getAddressDecoder)()],
|
|
1348
|
+
["tokenMint0", (0, import_kit21.getAddressDecoder)()],
|
|
1349
|
+
["tokenMint1", (0, import_kit21.getAddressDecoder)()],
|
|
1350
|
+
["tokenVault0", (0, import_kit21.getAddressDecoder)()],
|
|
1351
|
+
["tokenVault1", (0, import_kit21.getAddressDecoder)()],
|
|
1352
|
+
["observationKey", (0, import_kit21.getAddressDecoder)()],
|
|
1353
|
+
["mintDecimals0", (0, import_kit21.getU8Decoder)()],
|
|
1354
|
+
["mintDecimals1", (0, import_kit21.getU8Decoder)()],
|
|
1355
|
+
["tickSpacing", (0, import_kit21.getU16Decoder)()],
|
|
1356
|
+
["liquidity", (0, import_kit21.getU128Decoder)()],
|
|
1357
|
+
["sqrtPriceX64", (0, import_kit21.getU128Decoder)()],
|
|
1358
|
+
["tickCurrent", (0, import_kit21.getI32Decoder)()],
|
|
1359
|
+
["padding3", (0, import_kit21.getU16Decoder)()],
|
|
1360
|
+
["padding4", (0, import_kit21.getU16Decoder)()],
|
|
1361
|
+
["feeGrowthGlobal0X64", (0, import_kit21.getU128Decoder)()],
|
|
1362
|
+
["feeGrowthGlobal1X64", (0, import_kit21.getU128Decoder)()],
|
|
1363
|
+
["protocolFeesToken0", (0, import_kit21.getU64Decoder)()],
|
|
1364
|
+
["protocolFeesToken1", (0, import_kit21.getU64Decoder)()],
|
|
1365
|
+
["swapInAmountToken0", (0, import_kit21.getU128Decoder)()],
|
|
1366
|
+
["swapOutAmountToken1", (0, import_kit21.getU128Decoder)()],
|
|
1367
|
+
["swapInAmountToken1", (0, import_kit21.getU128Decoder)()],
|
|
1368
|
+
["swapOutAmountToken0", (0, import_kit21.getU128Decoder)()],
|
|
1369
|
+
["status", (0, import_kit21.getU8Decoder)()],
|
|
1370
|
+
["padding", (0, import_kit21.fixDecoderSize)((0, import_kit21.getBytesDecoder)(), 7)],
|
|
1371
|
+
["rewardInfos", (0, import_kit21.getArrayDecoder)(getRewardInfoDecoder(), { size: 3 })],
|
|
1372
|
+
["tickArrayBitmap", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 16 })],
|
|
1373
|
+
["totalFeesToken0", (0, import_kit21.getU64Decoder)()],
|
|
1374
|
+
["totalFeesClaimedToken0", (0, import_kit21.getU64Decoder)()],
|
|
1375
|
+
["totalFeesToken1", (0, import_kit21.getU64Decoder)()],
|
|
1376
|
+
["totalFeesClaimedToken1", (0, import_kit21.getU64Decoder)()],
|
|
1377
|
+
["fundFeesToken0", (0, import_kit21.getU64Decoder)()],
|
|
1378
|
+
["fundFeesToken1", (0, import_kit21.getU64Decoder)()],
|
|
1379
|
+
["openTime", (0, import_kit21.getU64Decoder)()],
|
|
1380
|
+
["recentEpoch", (0, import_kit21.getU64Decoder)()],
|
|
1381
|
+
["padding1", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 24 })],
|
|
1382
|
+
["padding2", (0, import_kit21.getArrayDecoder)((0, import_kit21.getU64Decoder)(), { size: 32 })]
|
|
1365
1383
|
]);
|
|
1366
1384
|
}
|
|
1367
1385
|
function getPoolStateCodec() {
|
|
1368
|
-
return (0,
|
|
1386
|
+
return (0, import_kit21.combineCodec)(getPoolStateEncoder(), getPoolStateDecoder());
|
|
1369
1387
|
}
|
|
1370
1388
|
function decodePoolState(encodedAccount) {
|
|
1371
|
-
return (0,
|
|
1389
|
+
return (0, import_kit21.decodeAccount)(
|
|
1372
1390
|
encodedAccount,
|
|
1373
1391
|
getPoolStateDecoder()
|
|
1374
1392
|
);
|
|
1375
1393
|
}
|
|
1376
1394
|
async function fetchPoolState(rpc, address5, config) {
|
|
1377
1395
|
const maybeAccount = await fetchMaybePoolState(rpc, address5, config);
|
|
1378
|
-
(0,
|
|
1396
|
+
(0, import_kit21.assertAccountExists)(maybeAccount);
|
|
1379
1397
|
return maybeAccount;
|
|
1380
1398
|
}
|
|
1381
1399
|
async function fetchMaybePoolState(rpc, address5, config) {
|
|
1382
|
-
const maybeAccount = await (0,
|
|
1400
|
+
const maybeAccount = await (0, import_kit21.fetchEncodedAccount)(rpc, address5, config);
|
|
1383
1401
|
return decodePoolState(maybeAccount);
|
|
1384
1402
|
}
|
|
1385
1403
|
async function fetchAllPoolState(rpc, addresses, config) {
|
|
1386
1404
|
const maybeAccounts = await fetchAllMaybePoolState(rpc, addresses, config);
|
|
1387
|
-
(0,
|
|
1405
|
+
(0, import_kit21.assertAccountsExist)(maybeAccounts);
|
|
1388
1406
|
return maybeAccounts;
|
|
1389
1407
|
}
|
|
1390
1408
|
async function fetchAllMaybePoolState(rpc, addresses, config) {
|
|
1391
|
-
const maybeAccounts = await (0,
|
|
1409
|
+
const maybeAccounts = await (0, import_kit21.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1392
1410
|
return maybeAccounts.map((maybeAccount) => decodePoolState(maybeAccount));
|
|
1393
1411
|
}
|
|
1394
1412
|
function getPoolStateSize() {
|
|
@@ -1396,7 +1414,7 @@ function getPoolStateSize() {
|
|
|
1396
1414
|
}
|
|
1397
1415
|
|
|
1398
1416
|
// src/generated/accounts/protocolPositionState.ts
|
|
1399
|
-
var
|
|
1417
|
+
var import_kit22 = require("@solana/kit");
|
|
1400
1418
|
var PROTOCOL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
1401
1419
|
100,
|
|
1402
1420
|
226,
|
|
@@ -1408,26 +1426,26 @@ var PROTOCOL_POSITION_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1408
1426
|
106
|
|
1409
1427
|
]);
|
|
1410
1428
|
function getProtocolPositionStateDiscriminatorBytes() {
|
|
1411
|
-
return (0,
|
|
1429
|
+
return (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8).encode(
|
|
1412
1430
|
PROTOCOL_POSITION_STATE_DISCRIMINATOR
|
|
1413
1431
|
);
|
|
1414
1432
|
}
|
|
1415
1433
|
function getProtocolPositionStateEncoder() {
|
|
1416
|
-
return (0,
|
|
1417
|
-
(0,
|
|
1418
|
-
["discriminator", (0,
|
|
1419
|
-
["bump", (0,
|
|
1420
|
-
["poolId", (0,
|
|
1421
|
-
["tickLowerIndex", (0,
|
|
1422
|
-
["tickUpperIndex", (0,
|
|
1423
|
-
["liquidity", (0,
|
|
1424
|
-
["feeGrowthInside0LastX64", (0,
|
|
1425
|
-
["feeGrowthInside1LastX64", (0,
|
|
1426
|
-
["tokenFeesOwed0", (0,
|
|
1427
|
-
["tokenFeesOwed1", (0,
|
|
1428
|
-
["rewardGrowthInside", (0,
|
|
1429
|
-
["recentEpoch", (0,
|
|
1430
|
-
["padding", (0,
|
|
1434
|
+
return (0, import_kit22.transformEncoder)(
|
|
1435
|
+
(0, import_kit22.getStructEncoder)([
|
|
1436
|
+
["discriminator", (0, import_kit22.fixEncoderSize)((0, import_kit22.getBytesEncoder)(), 8)],
|
|
1437
|
+
["bump", (0, import_kit22.getU8Encoder)()],
|
|
1438
|
+
["poolId", (0, import_kit22.getAddressEncoder)()],
|
|
1439
|
+
["tickLowerIndex", (0, import_kit22.getI32Encoder)()],
|
|
1440
|
+
["tickUpperIndex", (0, import_kit22.getI32Encoder)()],
|
|
1441
|
+
["liquidity", (0, import_kit22.getU128Encoder)()],
|
|
1442
|
+
["feeGrowthInside0LastX64", (0, import_kit22.getU128Encoder)()],
|
|
1443
|
+
["feeGrowthInside1LastX64", (0, import_kit22.getU128Encoder)()],
|
|
1444
|
+
["tokenFeesOwed0", (0, import_kit22.getU64Encoder)()],
|
|
1445
|
+
["tokenFeesOwed1", (0, import_kit22.getU64Encoder)()],
|
|
1446
|
+
["rewardGrowthInside", (0, import_kit22.getArrayEncoder)((0, import_kit22.getU128Encoder)(), { size: 3 })],
|
|
1447
|
+
["recentEpoch", (0, import_kit22.getU64Encoder)()],
|
|
1448
|
+
["padding", (0, import_kit22.getArrayEncoder)((0, import_kit22.getU64Encoder)(), { size: 7 })]
|
|
1431
1449
|
]),
|
|
1432
1450
|
(value) => ({
|
|
1433
1451
|
...value,
|
|
@@ -1436,30 +1454,30 @@ function getProtocolPositionStateEncoder() {
|
|
|
1436
1454
|
);
|
|
1437
1455
|
}
|
|
1438
1456
|
function getProtocolPositionStateDecoder() {
|
|
1439
|
-
return (0,
|
|
1440
|
-
["discriminator", (0,
|
|
1441
|
-
["bump", (0,
|
|
1442
|
-
["poolId", (0,
|
|
1443
|
-
["tickLowerIndex", (0,
|
|
1444
|
-
["tickUpperIndex", (0,
|
|
1445
|
-
["liquidity", (0,
|
|
1446
|
-
["feeGrowthInside0LastX64", (0,
|
|
1447
|
-
["feeGrowthInside1LastX64", (0,
|
|
1448
|
-
["tokenFeesOwed0", (0,
|
|
1449
|
-
["tokenFeesOwed1", (0,
|
|
1450
|
-
["rewardGrowthInside", (0,
|
|
1451
|
-
["recentEpoch", (0,
|
|
1452
|
-
["padding", (0,
|
|
1457
|
+
return (0, import_kit22.getStructDecoder)([
|
|
1458
|
+
["discriminator", (0, import_kit22.fixDecoderSize)((0, import_kit22.getBytesDecoder)(), 8)],
|
|
1459
|
+
["bump", (0, import_kit22.getU8Decoder)()],
|
|
1460
|
+
["poolId", (0, import_kit22.getAddressDecoder)()],
|
|
1461
|
+
["tickLowerIndex", (0, import_kit22.getI32Decoder)()],
|
|
1462
|
+
["tickUpperIndex", (0, import_kit22.getI32Decoder)()],
|
|
1463
|
+
["liquidity", (0, import_kit22.getU128Decoder)()],
|
|
1464
|
+
["feeGrowthInside0LastX64", (0, import_kit22.getU128Decoder)()],
|
|
1465
|
+
["feeGrowthInside1LastX64", (0, import_kit22.getU128Decoder)()],
|
|
1466
|
+
["tokenFeesOwed0", (0, import_kit22.getU64Decoder)()],
|
|
1467
|
+
["tokenFeesOwed1", (0, import_kit22.getU64Decoder)()],
|
|
1468
|
+
["rewardGrowthInside", (0, import_kit22.getArrayDecoder)((0, import_kit22.getU128Decoder)(), { size: 3 })],
|
|
1469
|
+
["recentEpoch", (0, import_kit22.getU64Decoder)()],
|
|
1470
|
+
["padding", (0, import_kit22.getArrayDecoder)((0, import_kit22.getU64Decoder)(), { size: 7 })]
|
|
1453
1471
|
]);
|
|
1454
1472
|
}
|
|
1455
1473
|
function getProtocolPositionStateCodec() {
|
|
1456
|
-
return (0,
|
|
1474
|
+
return (0, import_kit22.combineCodec)(
|
|
1457
1475
|
getProtocolPositionStateEncoder(),
|
|
1458
1476
|
getProtocolPositionStateDecoder()
|
|
1459
1477
|
);
|
|
1460
1478
|
}
|
|
1461
1479
|
function decodeProtocolPositionState(encodedAccount) {
|
|
1462
|
-
return (0,
|
|
1480
|
+
return (0, import_kit22.decodeAccount)(
|
|
1463
1481
|
encodedAccount,
|
|
1464
1482
|
getProtocolPositionStateDecoder()
|
|
1465
1483
|
);
|
|
@@ -1470,11 +1488,11 @@ async function fetchProtocolPositionState(rpc, address5, config) {
|
|
|
1470
1488
|
address5,
|
|
1471
1489
|
config
|
|
1472
1490
|
);
|
|
1473
|
-
(0,
|
|
1491
|
+
(0, import_kit22.assertAccountExists)(maybeAccount);
|
|
1474
1492
|
return maybeAccount;
|
|
1475
1493
|
}
|
|
1476
1494
|
async function fetchMaybeProtocolPositionState(rpc, address5, config) {
|
|
1477
|
-
const maybeAccount = await (0,
|
|
1495
|
+
const maybeAccount = await (0, import_kit22.fetchEncodedAccount)(rpc, address5, config);
|
|
1478
1496
|
return decodeProtocolPositionState(maybeAccount);
|
|
1479
1497
|
}
|
|
1480
1498
|
async function fetchAllProtocolPositionState(rpc, addresses, config) {
|
|
@@ -1483,11 +1501,11 @@ async function fetchAllProtocolPositionState(rpc, addresses, config) {
|
|
|
1483
1501
|
addresses,
|
|
1484
1502
|
config
|
|
1485
1503
|
);
|
|
1486
|
-
(0,
|
|
1504
|
+
(0, import_kit22.assertAccountsExist)(maybeAccounts);
|
|
1487
1505
|
return maybeAccounts;
|
|
1488
1506
|
}
|
|
1489
1507
|
async function fetchAllMaybeProtocolPositionState(rpc, addresses, config) {
|
|
1490
|
-
const maybeAccounts = await (0,
|
|
1508
|
+
const maybeAccounts = await (0, import_kit22.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1491
1509
|
return maybeAccounts.map(
|
|
1492
1510
|
(maybeAccount) => decodeProtocolPositionState(maybeAccount)
|
|
1493
1511
|
);
|
|
@@ -1497,7 +1515,7 @@ function getProtocolPositionStateSize() {
|
|
|
1497
1515
|
}
|
|
1498
1516
|
|
|
1499
1517
|
// src/generated/accounts/supportMintAssociated.ts
|
|
1500
|
-
var
|
|
1518
|
+
var import_kit23 = require("@solana/kit");
|
|
1501
1519
|
var SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
|
|
1502
1520
|
134,
|
|
1503
1521
|
40,
|
|
@@ -1509,17 +1527,17 @@ var SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
|
|
|
1509
1527
|
53
|
|
1510
1528
|
]);
|
|
1511
1529
|
function getSupportMintAssociatedDiscriminatorBytes() {
|
|
1512
|
-
return (0,
|
|
1530
|
+
return (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8).encode(
|
|
1513
1531
|
SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
|
|
1514
1532
|
);
|
|
1515
1533
|
}
|
|
1516
1534
|
function getSupportMintAssociatedEncoder() {
|
|
1517
|
-
return (0,
|
|
1518
|
-
(0,
|
|
1519
|
-
["discriminator", (0,
|
|
1520
|
-
["bump", (0,
|
|
1521
|
-
["mint", (0,
|
|
1522
|
-
["padding", (0,
|
|
1535
|
+
return (0, import_kit23.transformEncoder)(
|
|
1536
|
+
(0, import_kit23.getStructEncoder)([
|
|
1537
|
+
["discriminator", (0, import_kit23.fixEncoderSize)((0, import_kit23.getBytesEncoder)(), 8)],
|
|
1538
|
+
["bump", (0, import_kit23.getU8Encoder)()],
|
|
1539
|
+
["mint", (0, import_kit23.getAddressEncoder)()],
|
|
1540
|
+
["padding", (0, import_kit23.getArrayEncoder)((0, import_kit23.getU64Encoder)(), { size: 8 })]
|
|
1523
1541
|
]),
|
|
1524
1542
|
(value) => ({
|
|
1525
1543
|
...value,
|
|
@@ -1528,21 +1546,21 @@ function getSupportMintAssociatedEncoder() {
|
|
|
1528
1546
|
);
|
|
1529
1547
|
}
|
|
1530
1548
|
function getSupportMintAssociatedDecoder() {
|
|
1531
|
-
return (0,
|
|
1532
|
-
["discriminator", (0,
|
|
1533
|
-
["bump", (0,
|
|
1534
|
-
["mint", (0,
|
|
1535
|
-
["padding", (0,
|
|
1549
|
+
return (0, import_kit23.getStructDecoder)([
|
|
1550
|
+
["discriminator", (0, import_kit23.fixDecoderSize)((0, import_kit23.getBytesDecoder)(), 8)],
|
|
1551
|
+
["bump", (0, import_kit23.getU8Decoder)()],
|
|
1552
|
+
["mint", (0, import_kit23.getAddressDecoder)()],
|
|
1553
|
+
["padding", (0, import_kit23.getArrayDecoder)((0, import_kit23.getU64Decoder)(), { size: 8 })]
|
|
1536
1554
|
]);
|
|
1537
1555
|
}
|
|
1538
1556
|
function getSupportMintAssociatedCodec() {
|
|
1539
|
-
return (0,
|
|
1557
|
+
return (0, import_kit23.combineCodec)(
|
|
1540
1558
|
getSupportMintAssociatedEncoder(),
|
|
1541
1559
|
getSupportMintAssociatedDecoder()
|
|
1542
1560
|
);
|
|
1543
1561
|
}
|
|
1544
1562
|
function decodeSupportMintAssociated(encodedAccount) {
|
|
1545
|
-
return (0,
|
|
1563
|
+
return (0, import_kit23.decodeAccount)(
|
|
1546
1564
|
encodedAccount,
|
|
1547
1565
|
getSupportMintAssociatedDecoder()
|
|
1548
1566
|
);
|
|
@@ -1553,11 +1571,11 @@ async function fetchSupportMintAssociated(rpc, address5, config) {
|
|
|
1553
1571
|
address5,
|
|
1554
1572
|
config
|
|
1555
1573
|
);
|
|
1556
|
-
(0,
|
|
1574
|
+
(0, import_kit23.assertAccountExists)(maybeAccount);
|
|
1557
1575
|
return maybeAccount;
|
|
1558
1576
|
}
|
|
1559
1577
|
async function fetchMaybeSupportMintAssociated(rpc, address5, config) {
|
|
1560
|
-
const maybeAccount = await (0,
|
|
1578
|
+
const maybeAccount = await (0, import_kit23.fetchEncodedAccount)(rpc, address5, config);
|
|
1561
1579
|
return decodeSupportMintAssociated(maybeAccount);
|
|
1562
1580
|
}
|
|
1563
1581
|
async function fetchAllSupportMintAssociated(rpc, addresses, config) {
|
|
@@ -1566,11 +1584,11 @@ async function fetchAllSupportMintAssociated(rpc, addresses, config) {
|
|
|
1566
1584
|
addresses,
|
|
1567
1585
|
config
|
|
1568
1586
|
);
|
|
1569
|
-
(0,
|
|
1587
|
+
(0, import_kit23.assertAccountsExist)(maybeAccounts);
|
|
1570
1588
|
return maybeAccounts;
|
|
1571
1589
|
}
|
|
1572
1590
|
async function fetchAllMaybeSupportMintAssociated(rpc, addresses, config) {
|
|
1573
|
-
const maybeAccounts = await (0,
|
|
1591
|
+
const maybeAccounts = await (0, import_kit23.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1574
1592
|
return maybeAccounts.map(
|
|
1575
1593
|
(maybeAccount) => decodeSupportMintAssociated(maybeAccount)
|
|
1576
1594
|
);
|
|
@@ -1580,7 +1598,7 @@ function getSupportMintAssociatedSize() {
|
|
|
1580
1598
|
}
|
|
1581
1599
|
|
|
1582
1600
|
// src/generated/accounts/tickArrayBitmapExtension.ts
|
|
1583
|
-
var
|
|
1601
|
+
var import_kit24 = require("@solana/kit");
|
|
1584
1602
|
var TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR = new Uint8Array([
|
|
1585
1603
|
60,
|
|
1586
1604
|
150,
|
|
@@ -1592,24 +1610,24 @@ var TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR = new Uint8Array([
|
|
|
1592
1610
|
153
|
|
1593
1611
|
]);
|
|
1594
1612
|
function getTickArrayBitmapExtensionDiscriminatorBytes() {
|
|
1595
|
-
return (0,
|
|
1613
|
+
return (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8).encode(
|
|
1596
1614
|
TICK_ARRAY_BITMAP_EXTENSION_DISCRIMINATOR
|
|
1597
1615
|
);
|
|
1598
1616
|
}
|
|
1599
1617
|
function getTickArrayBitmapExtensionEncoder() {
|
|
1600
|
-
return (0,
|
|
1601
|
-
(0,
|
|
1602
|
-
["discriminator", (0,
|
|
1603
|
-
["poolId", (0,
|
|
1618
|
+
return (0, import_kit24.transformEncoder)(
|
|
1619
|
+
(0, import_kit24.getStructEncoder)([
|
|
1620
|
+
["discriminator", (0, import_kit24.fixEncoderSize)((0, import_kit24.getBytesEncoder)(), 8)],
|
|
1621
|
+
["poolId", (0, import_kit24.getAddressEncoder)()],
|
|
1604
1622
|
[
|
|
1605
1623
|
"positiveTickArrayBitmap",
|
|
1606
|
-
(0,
|
|
1624
|
+
(0, import_kit24.getArrayEncoder)((0, import_kit24.getArrayEncoder)((0, import_kit24.getU64Encoder)(), { size: 8 }), {
|
|
1607
1625
|
size: 14
|
|
1608
1626
|
})
|
|
1609
1627
|
],
|
|
1610
1628
|
[
|
|
1611
1629
|
"negativeTickArrayBitmap",
|
|
1612
|
-
(0,
|
|
1630
|
+
(0, import_kit24.getArrayEncoder)((0, import_kit24.getArrayEncoder)((0, import_kit24.getU64Encoder)(), { size: 8 }), {
|
|
1613
1631
|
size: 14
|
|
1614
1632
|
})
|
|
1615
1633
|
]
|
|
@@ -1621,31 +1639,31 @@ function getTickArrayBitmapExtensionEncoder() {
|
|
|
1621
1639
|
);
|
|
1622
1640
|
}
|
|
1623
1641
|
function getTickArrayBitmapExtensionDecoder() {
|
|
1624
|
-
return (0,
|
|
1625
|
-
["discriminator", (0,
|
|
1626
|
-
["poolId", (0,
|
|
1642
|
+
return (0, import_kit24.getStructDecoder)([
|
|
1643
|
+
["discriminator", (0, import_kit24.fixDecoderSize)((0, import_kit24.getBytesDecoder)(), 8)],
|
|
1644
|
+
["poolId", (0, import_kit24.getAddressDecoder)()],
|
|
1627
1645
|
[
|
|
1628
1646
|
"positiveTickArrayBitmap",
|
|
1629
|
-
(0,
|
|
1647
|
+
(0, import_kit24.getArrayDecoder)((0, import_kit24.getArrayDecoder)((0, import_kit24.getU64Decoder)(), { size: 8 }), {
|
|
1630
1648
|
size: 14
|
|
1631
1649
|
})
|
|
1632
1650
|
],
|
|
1633
1651
|
[
|
|
1634
1652
|
"negativeTickArrayBitmap",
|
|
1635
|
-
(0,
|
|
1653
|
+
(0, import_kit24.getArrayDecoder)((0, import_kit24.getArrayDecoder)((0, import_kit24.getU64Decoder)(), { size: 8 }), {
|
|
1636
1654
|
size: 14
|
|
1637
1655
|
})
|
|
1638
1656
|
]
|
|
1639
1657
|
]);
|
|
1640
1658
|
}
|
|
1641
1659
|
function getTickArrayBitmapExtensionCodec() {
|
|
1642
|
-
return (0,
|
|
1660
|
+
return (0, import_kit24.combineCodec)(
|
|
1643
1661
|
getTickArrayBitmapExtensionEncoder(),
|
|
1644
1662
|
getTickArrayBitmapExtensionDecoder()
|
|
1645
1663
|
);
|
|
1646
1664
|
}
|
|
1647
1665
|
function decodeTickArrayBitmapExtension(encodedAccount) {
|
|
1648
|
-
return (0,
|
|
1666
|
+
return (0, import_kit24.decodeAccount)(
|
|
1649
1667
|
encodedAccount,
|
|
1650
1668
|
getTickArrayBitmapExtensionDecoder()
|
|
1651
1669
|
);
|
|
@@ -1656,11 +1674,11 @@ async function fetchTickArrayBitmapExtension(rpc, address5, config) {
|
|
|
1656
1674
|
address5,
|
|
1657
1675
|
config
|
|
1658
1676
|
);
|
|
1659
|
-
(0,
|
|
1677
|
+
(0, import_kit24.assertAccountExists)(maybeAccount);
|
|
1660
1678
|
return maybeAccount;
|
|
1661
1679
|
}
|
|
1662
1680
|
async function fetchMaybeTickArrayBitmapExtension(rpc, address5, config) {
|
|
1663
|
-
const maybeAccount = await (0,
|
|
1681
|
+
const maybeAccount = await (0, import_kit24.fetchEncodedAccount)(rpc, address5, config);
|
|
1664
1682
|
return decodeTickArrayBitmapExtension(maybeAccount);
|
|
1665
1683
|
}
|
|
1666
1684
|
async function fetchAllTickArrayBitmapExtension(rpc, addresses, config) {
|
|
@@ -1669,11 +1687,11 @@ async function fetchAllTickArrayBitmapExtension(rpc, addresses, config) {
|
|
|
1669
1687
|
addresses,
|
|
1670
1688
|
config
|
|
1671
1689
|
);
|
|
1672
|
-
(0,
|
|
1690
|
+
(0, import_kit24.assertAccountsExist)(maybeAccounts);
|
|
1673
1691
|
return maybeAccounts;
|
|
1674
1692
|
}
|
|
1675
1693
|
async function fetchAllMaybeTickArrayBitmapExtension(rpc, addresses, config) {
|
|
1676
|
-
const maybeAccounts = await (0,
|
|
1694
|
+
const maybeAccounts = await (0, import_kit24.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1677
1695
|
return maybeAccounts.map(
|
|
1678
1696
|
(maybeAccount) => decodeTickArrayBitmapExtension(maybeAccount)
|
|
1679
1697
|
);
|
|
@@ -1683,7 +1701,7 @@ function getTickArrayBitmapExtensionSize() {
|
|
|
1683
1701
|
}
|
|
1684
1702
|
|
|
1685
1703
|
// src/generated/accounts/tickArrayState.ts
|
|
1686
|
-
var
|
|
1704
|
+
var import_kit25 = require("@solana/kit");
|
|
1687
1705
|
var TICK_ARRAY_STATE_DISCRIMINATOR = new Uint8Array([
|
|
1688
1706
|
192,
|
|
1689
1707
|
155,
|
|
@@ -1695,51 +1713,51 @@ var TICK_ARRAY_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
1695
1713
|
42
|
|
1696
1714
|
]);
|
|
1697
1715
|
function getTickArrayStateDiscriminatorBytes() {
|
|
1698
|
-
return (0,
|
|
1716
|
+
return (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8).encode(
|
|
1699
1717
|
TICK_ARRAY_STATE_DISCRIMINATOR
|
|
1700
1718
|
);
|
|
1701
1719
|
}
|
|
1702
1720
|
function getTickArrayStateEncoder() {
|
|
1703
|
-
return (0,
|
|
1704
|
-
(0,
|
|
1705
|
-
["discriminator", (0,
|
|
1706
|
-
["poolId", (0,
|
|
1707
|
-
["startTickIndex", (0,
|
|
1708
|
-
["ticks", (0,
|
|
1709
|
-
["initializedTickCount", (0,
|
|
1710
|
-
["recentEpoch", (0,
|
|
1711
|
-
["padding", (0,
|
|
1721
|
+
return (0, import_kit25.transformEncoder)(
|
|
1722
|
+
(0, import_kit25.getStructEncoder)([
|
|
1723
|
+
["discriminator", (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 8)],
|
|
1724
|
+
["poolId", (0, import_kit25.getAddressEncoder)()],
|
|
1725
|
+
["startTickIndex", (0, import_kit25.getI32Encoder)()],
|
|
1726
|
+
["ticks", (0, import_kit25.getArrayEncoder)(getTickStateEncoder(), { size: 60 })],
|
|
1727
|
+
["initializedTickCount", (0, import_kit25.getU8Encoder)()],
|
|
1728
|
+
["recentEpoch", (0, import_kit25.getU64Encoder)()],
|
|
1729
|
+
["padding", (0, import_kit25.fixEncoderSize)((0, import_kit25.getBytesEncoder)(), 107)]
|
|
1712
1730
|
]),
|
|
1713
1731
|
(value) => ({ ...value, discriminator: TICK_ARRAY_STATE_DISCRIMINATOR })
|
|
1714
1732
|
);
|
|
1715
1733
|
}
|
|
1716
1734
|
function getTickArrayStateDecoder() {
|
|
1717
|
-
return (0,
|
|
1718
|
-
["discriminator", (0,
|
|
1719
|
-
["poolId", (0,
|
|
1720
|
-
["startTickIndex", (0,
|
|
1721
|
-
["ticks", (0,
|
|
1722
|
-
["initializedTickCount", (0,
|
|
1723
|
-
["recentEpoch", (0,
|
|
1724
|
-
["padding", (0,
|
|
1735
|
+
return (0, import_kit25.getStructDecoder)([
|
|
1736
|
+
["discriminator", (0, import_kit25.fixDecoderSize)((0, import_kit25.getBytesDecoder)(), 8)],
|
|
1737
|
+
["poolId", (0, import_kit25.getAddressDecoder)()],
|
|
1738
|
+
["startTickIndex", (0, import_kit25.getI32Decoder)()],
|
|
1739
|
+
["ticks", (0, import_kit25.getArrayDecoder)(getTickStateDecoder(), { size: 60 })],
|
|
1740
|
+
["initializedTickCount", (0, import_kit25.getU8Decoder)()],
|
|
1741
|
+
["recentEpoch", (0, import_kit25.getU64Decoder)()],
|
|
1742
|
+
["padding", (0, import_kit25.fixDecoderSize)((0, import_kit25.getBytesDecoder)(), 107)]
|
|
1725
1743
|
]);
|
|
1726
1744
|
}
|
|
1727
1745
|
function getTickArrayStateCodec() {
|
|
1728
|
-
return (0,
|
|
1746
|
+
return (0, import_kit25.combineCodec)(getTickArrayStateEncoder(), getTickArrayStateDecoder());
|
|
1729
1747
|
}
|
|
1730
1748
|
function decodeTickArrayState(encodedAccount) {
|
|
1731
|
-
return (0,
|
|
1749
|
+
return (0, import_kit25.decodeAccount)(
|
|
1732
1750
|
encodedAccount,
|
|
1733
1751
|
getTickArrayStateDecoder()
|
|
1734
1752
|
);
|
|
1735
1753
|
}
|
|
1736
1754
|
async function fetchTickArrayState(rpc, address5, config) {
|
|
1737
1755
|
const maybeAccount = await fetchMaybeTickArrayState(rpc, address5, config);
|
|
1738
|
-
(0,
|
|
1756
|
+
(0, import_kit25.assertAccountExists)(maybeAccount);
|
|
1739
1757
|
return maybeAccount;
|
|
1740
1758
|
}
|
|
1741
1759
|
async function fetchMaybeTickArrayState(rpc, address5, config) {
|
|
1742
|
-
const maybeAccount = await (0,
|
|
1760
|
+
const maybeAccount = await (0, import_kit25.fetchEncodedAccount)(rpc, address5, config);
|
|
1743
1761
|
return decodeTickArrayState(maybeAccount);
|
|
1744
1762
|
}
|
|
1745
1763
|
async function fetchAllTickArrayState(rpc, addresses, config) {
|
|
@@ -1748,11 +1766,11 @@ async function fetchAllTickArrayState(rpc, addresses, config) {
|
|
|
1748
1766
|
addresses,
|
|
1749
1767
|
config
|
|
1750
1768
|
);
|
|
1751
|
-
(0,
|
|
1769
|
+
(0, import_kit25.assertAccountsExist)(maybeAccounts);
|
|
1752
1770
|
return maybeAccounts;
|
|
1753
1771
|
}
|
|
1754
1772
|
async function fetchAllMaybeTickArrayState(rpc, addresses, config) {
|
|
1755
|
-
const maybeAccounts = await (0,
|
|
1773
|
+
const maybeAccounts = await (0, import_kit25.fetchEncodedAccounts)(rpc, addresses, config);
|
|
1756
1774
|
return maybeAccounts.map(
|
|
1757
1775
|
(maybeAccount) => decodeTickArrayState(maybeAccount)
|
|
1758
1776
|
);
|
|
@@ -1762,10 +1780,10 @@ function getTickArrayStateSize() {
|
|
|
1762
1780
|
}
|
|
1763
1781
|
|
|
1764
1782
|
// src/generated/errors/ammV3.ts
|
|
1765
|
-
var
|
|
1783
|
+
var import_kit27 = require("@solana/kit");
|
|
1766
1784
|
|
|
1767
1785
|
// src/generated/programs/ammV3.ts
|
|
1768
|
-
var
|
|
1786
|
+
var import_kit26 = require("@solana/kit");
|
|
1769
1787
|
var AMM_V3_PROGRAM_ADDRESS = "6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6";
|
|
1770
1788
|
var AmmV3Account = /* @__PURE__ */ ((AmmV3Account2) => {
|
|
1771
1789
|
AmmV3Account2[AmmV3Account2["AmmConfig"] = 0] = "AmmConfig";
|
|
@@ -1781,81 +1799,81 @@ var AmmV3Account = /* @__PURE__ */ ((AmmV3Account2) => {
|
|
|
1781
1799
|
})(AmmV3Account || {});
|
|
1782
1800
|
function identifyAmmV3Account(account) {
|
|
1783
1801
|
const data = "data" in account ? account.data : account;
|
|
1784
|
-
if ((0,
|
|
1802
|
+
if ((0, import_kit26.containsBytes)(
|
|
1785
1803
|
data,
|
|
1786
|
-
(0,
|
|
1804
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1787
1805
|
new Uint8Array([218, 244, 33, 104, 203, 203, 43, 111])
|
|
1788
1806
|
),
|
|
1789
1807
|
0
|
|
1790
1808
|
)) {
|
|
1791
1809
|
return 0 /* AmmConfig */;
|
|
1792
1810
|
}
|
|
1793
|
-
if ((0,
|
|
1811
|
+
if ((0, import_kit26.containsBytes)(
|
|
1794
1812
|
data,
|
|
1795
|
-
(0,
|
|
1813
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1796
1814
|
new Uint8Array([122, 174, 197, 53, 129, 9, 165, 132])
|
|
1797
1815
|
),
|
|
1798
1816
|
0
|
|
1799
1817
|
)) {
|
|
1800
1818
|
return 1 /* ObservationState */;
|
|
1801
1819
|
}
|
|
1802
|
-
if ((0,
|
|
1820
|
+
if ((0, import_kit26.containsBytes)(
|
|
1803
1821
|
data,
|
|
1804
|
-
(0,
|
|
1822
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1805
1823
|
new Uint8Array([19, 236, 58, 237, 81, 222, 183, 252])
|
|
1806
1824
|
),
|
|
1807
1825
|
0
|
|
1808
1826
|
)) {
|
|
1809
1827
|
return 2 /* OperationState */;
|
|
1810
1828
|
}
|
|
1811
|
-
if ((0,
|
|
1829
|
+
if ((0, import_kit26.containsBytes)(
|
|
1812
1830
|
data,
|
|
1813
|
-
(0,
|
|
1831
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1814
1832
|
new Uint8Array([70, 111, 150, 126, 230, 15, 25, 117])
|
|
1815
1833
|
),
|
|
1816
1834
|
0
|
|
1817
1835
|
)) {
|
|
1818
1836
|
return 3 /* PersonalPositionState */;
|
|
1819
1837
|
}
|
|
1820
|
-
if ((0,
|
|
1838
|
+
if ((0, import_kit26.containsBytes)(
|
|
1821
1839
|
data,
|
|
1822
|
-
(0,
|
|
1840
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1823
1841
|
new Uint8Array([247, 237, 227, 245, 215, 195, 222, 70])
|
|
1824
1842
|
),
|
|
1825
1843
|
0
|
|
1826
1844
|
)) {
|
|
1827
1845
|
return 4 /* PoolState */;
|
|
1828
1846
|
}
|
|
1829
|
-
if ((0,
|
|
1847
|
+
if ((0, import_kit26.containsBytes)(
|
|
1830
1848
|
data,
|
|
1831
|
-
(0,
|
|
1849
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1832
1850
|
new Uint8Array([100, 226, 145, 99, 146, 218, 160, 106])
|
|
1833
1851
|
),
|
|
1834
1852
|
0
|
|
1835
1853
|
)) {
|
|
1836
1854
|
return 5 /* ProtocolPositionState */;
|
|
1837
1855
|
}
|
|
1838
|
-
if ((0,
|
|
1856
|
+
if ((0, import_kit26.containsBytes)(
|
|
1839
1857
|
data,
|
|
1840
|
-
(0,
|
|
1858
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1841
1859
|
new Uint8Array([134, 40, 183, 79, 12, 112, 162, 53])
|
|
1842
1860
|
),
|
|
1843
1861
|
0
|
|
1844
1862
|
)) {
|
|
1845
1863
|
return 6 /* SupportMintAssociated */;
|
|
1846
1864
|
}
|
|
1847
|
-
if ((0,
|
|
1865
|
+
if ((0, import_kit26.containsBytes)(
|
|
1848
1866
|
data,
|
|
1849
|
-
(0,
|
|
1867
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1850
1868
|
new Uint8Array([60, 150, 36, 219, 97, 128, 139, 153])
|
|
1851
1869
|
),
|
|
1852
1870
|
0
|
|
1853
1871
|
)) {
|
|
1854
1872
|
return 7 /* TickArrayBitmapExtension */;
|
|
1855
1873
|
}
|
|
1856
|
-
if ((0,
|
|
1874
|
+
if ((0, import_kit26.containsBytes)(
|
|
1857
1875
|
data,
|
|
1858
|
-
(0,
|
|
1876
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1859
1877
|
new Uint8Array([192, 155, 85, 205, 49, 249, 129, 42])
|
|
1860
1878
|
),
|
|
1861
1879
|
0
|
|
@@ -1892,189 +1910,189 @@ var AmmV3Instruction = /* @__PURE__ */ ((AmmV3Instruction2) => {
|
|
|
1892
1910
|
})(AmmV3Instruction || {});
|
|
1893
1911
|
function identifyAmmV3Instruction(instruction) {
|
|
1894
1912
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
1895
|
-
if ((0,
|
|
1913
|
+
if ((0, import_kit26.containsBytes)(
|
|
1896
1914
|
data,
|
|
1897
|
-
(0,
|
|
1915
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1898
1916
|
new Uint8Array([123, 134, 81, 0, 49, 68, 98, 98])
|
|
1899
1917
|
),
|
|
1900
1918
|
0
|
|
1901
1919
|
)) {
|
|
1902
1920
|
return 0 /* ClosePosition */;
|
|
1903
1921
|
}
|
|
1904
|
-
if ((0,
|
|
1922
|
+
if ((0, import_kit26.containsBytes)(
|
|
1905
1923
|
data,
|
|
1906
|
-
(0,
|
|
1924
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1907
1925
|
new Uint8Array([201, 117, 152, 144, 85, 85, 108, 178])
|
|
1908
1926
|
),
|
|
1909
1927
|
0
|
|
1910
1928
|
)) {
|
|
1911
1929
|
return 1 /* CloseProtocolPosition */;
|
|
1912
1930
|
}
|
|
1913
|
-
if ((0,
|
|
1931
|
+
if ((0, import_kit26.containsBytes)(
|
|
1914
1932
|
data,
|
|
1915
|
-
(0,
|
|
1933
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1916
1934
|
new Uint8Array([167, 138, 78, 149, 223, 194, 6, 126])
|
|
1917
1935
|
),
|
|
1918
1936
|
0
|
|
1919
1937
|
)) {
|
|
1920
1938
|
return 2 /* CollectFundFee */;
|
|
1921
1939
|
}
|
|
1922
|
-
if ((0,
|
|
1940
|
+
if ((0, import_kit26.containsBytes)(
|
|
1923
1941
|
data,
|
|
1924
|
-
(0,
|
|
1942
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1925
1943
|
new Uint8Array([136, 136, 252, 221, 194, 66, 126, 89])
|
|
1926
1944
|
),
|
|
1927
1945
|
0
|
|
1928
1946
|
)) {
|
|
1929
1947
|
return 3 /* CollectProtocolFee */;
|
|
1930
1948
|
}
|
|
1931
|
-
if ((0,
|
|
1949
|
+
if ((0, import_kit26.containsBytes)(
|
|
1932
1950
|
data,
|
|
1933
|
-
(0,
|
|
1951
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1934
1952
|
new Uint8Array([18, 237, 166, 197, 34, 16, 213, 144])
|
|
1935
1953
|
),
|
|
1936
1954
|
0
|
|
1937
1955
|
)) {
|
|
1938
1956
|
return 4 /* CollectRemainingRewards */;
|
|
1939
1957
|
}
|
|
1940
|
-
if ((0,
|
|
1958
|
+
if ((0, import_kit26.containsBytes)(
|
|
1941
1959
|
data,
|
|
1942
|
-
(0,
|
|
1960
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1943
1961
|
new Uint8Array([137, 52, 237, 212, 215, 117, 108, 104])
|
|
1944
1962
|
),
|
|
1945
1963
|
0
|
|
1946
1964
|
)) {
|
|
1947
1965
|
return 5 /* CreateAmmConfig */;
|
|
1948
1966
|
}
|
|
1949
|
-
if ((0,
|
|
1967
|
+
if ((0, import_kit26.containsBytes)(
|
|
1950
1968
|
data,
|
|
1951
|
-
(0,
|
|
1969
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1952
1970
|
new Uint8Array([63, 87, 148, 33, 109, 35, 8, 104])
|
|
1953
1971
|
),
|
|
1954
1972
|
0
|
|
1955
1973
|
)) {
|
|
1956
1974
|
return 6 /* CreateOperationAccount */;
|
|
1957
1975
|
}
|
|
1958
|
-
if ((0,
|
|
1976
|
+
if ((0, import_kit26.containsBytes)(
|
|
1959
1977
|
data,
|
|
1960
|
-
(0,
|
|
1978
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1961
1979
|
new Uint8Array([233, 146, 209, 142, 207, 104, 64, 188])
|
|
1962
1980
|
),
|
|
1963
1981
|
0
|
|
1964
1982
|
)) {
|
|
1965
1983
|
return 7 /* CreatePool */;
|
|
1966
1984
|
}
|
|
1967
|
-
if ((0,
|
|
1985
|
+
if ((0, import_kit26.containsBytes)(
|
|
1968
1986
|
data,
|
|
1969
|
-
(0,
|
|
1987
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1970
1988
|
new Uint8Array([17, 251, 65, 92, 136, 242, 14, 169])
|
|
1971
1989
|
),
|
|
1972
1990
|
0
|
|
1973
1991
|
)) {
|
|
1974
1992
|
return 8 /* CreateSupportMintAssociated */;
|
|
1975
1993
|
}
|
|
1976
|
-
if ((0,
|
|
1994
|
+
if ((0, import_kit26.containsBytes)(
|
|
1977
1995
|
data,
|
|
1978
|
-
(0,
|
|
1996
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1979
1997
|
new Uint8Array([58, 127, 188, 62, 79, 82, 196, 96])
|
|
1980
1998
|
),
|
|
1981
1999
|
0
|
|
1982
2000
|
)) {
|
|
1983
2001
|
return 9 /* DecreaseLiquidityV2 */;
|
|
1984
2002
|
}
|
|
1985
|
-
if ((0,
|
|
2003
|
+
if ((0, import_kit26.containsBytes)(
|
|
1986
2004
|
data,
|
|
1987
|
-
(0,
|
|
2005
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1988
2006
|
new Uint8Array([133, 29, 89, 223, 69, 238, 176, 10])
|
|
1989
2007
|
),
|
|
1990
2008
|
0
|
|
1991
2009
|
)) {
|
|
1992
2010
|
return 10 /* IncreaseLiquidityV2 */;
|
|
1993
2011
|
}
|
|
1994
|
-
if ((0,
|
|
2012
|
+
if ((0, import_kit26.containsBytes)(
|
|
1995
2013
|
data,
|
|
1996
|
-
(0,
|
|
2014
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
1997
2015
|
new Uint8Array([95, 135, 192, 196, 242, 129, 230, 68])
|
|
1998
2016
|
),
|
|
1999
2017
|
0
|
|
2000
2018
|
)) {
|
|
2001
2019
|
return 11 /* InitializeReward */;
|
|
2002
2020
|
}
|
|
2003
|
-
if ((0,
|
|
2021
|
+
if ((0, import_kit26.containsBytes)(
|
|
2004
2022
|
data,
|
|
2005
|
-
(0,
|
|
2023
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2006
2024
|
new Uint8Array([77, 255, 174, 82, 125, 29, 201, 46])
|
|
2007
2025
|
),
|
|
2008
2026
|
0
|
|
2009
2027
|
)) {
|
|
2010
2028
|
return 12 /* OpenPositionWithToken22Nft */;
|
|
2011
2029
|
}
|
|
2012
|
-
if ((0,
|
|
2030
|
+
if ((0, import_kit26.containsBytes)(
|
|
2013
2031
|
data,
|
|
2014
|
-
(0,
|
|
2032
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2015
2033
|
new Uint8Array([112, 52, 167, 75, 32, 201, 211, 137])
|
|
2016
2034
|
),
|
|
2017
2035
|
0
|
|
2018
2036
|
)) {
|
|
2019
2037
|
return 13 /* SetRewardParams */;
|
|
2020
2038
|
}
|
|
2021
|
-
if ((0,
|
|
2039
|
+
if ((0, import_kit26.containsBytes)(
|
|
2022
2040
|
data,
|
|
2023
|
-
(0,
|
|
2041
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2024
2042
|
new Uint8Array([69, 125, 115, 218, 245, 186, 242, 196])
|
|
2025
2043
|
),
|
|
2026
2044
|
0
|
|
2027
2045
|
)) {
|
|
2028
2046
|
return 14 /* SwapRouterBaseIn */;
|
|
2029
2047
|
}
|
|
2030
|
-
if ((0,
|
|
2048
|
+
if ((0, import_kit26.containsBytes)(
|
|
2031
2049
|
data,
|
|
2032
|
-
(0,
|
|
2050
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2033
2051
|
new Uint8Array([43, 4, 237, 11, 26, 201, 30, 98])
|
|
2034
2052
|
),
|
|
2035
2053
|
0
|
|
2036
2054
|
)) {
|
|
2037
2055
|
return 15 /* SwapV2 */;
|
|
2038
2056
|
}
|
|
2039
|
-
if ((0,
|
|
2057
|
+
if ((0, import_kit26.containsBytes)(
|
|
2040
2058
|
data,
|
|
2041
|
-
(0,
|
|
2059
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2042
2060
|
new Uint8Array([7, 22, 12, 83, 242, 43, 48, 121])
|
|
2043
2061
|
),
|
|
2044
2062
|
0
|
|
2045
2063
|
)) {
|
|
2046
2064
|
return 16 /* TransferRewardOwner */;
|
|
2047
2065
|
}
|
|
2048
|
-
if ((0,
|
|
2066
|
+
if ((0, import_kit26.containsBytes)(
|
|
2049
2067
|
data,
|
|
2050
|
-
(0,
|
|
2068
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2051
2069
|
new Uint8Array([49, 60, 174, 136, 154, 28, 116, 200])
|
|
2052
2070
|
),
|
|
2053
2071
|
0
|
|
2054
2072
|
)) {
|
|
2055
2073
|
return 17 /* UpdateAmmConfig */;
|
|
2056
2074
|
}
|
|
2057
|
-
if ((0,
|
|
2075
|
+
if ((0, import_kit26.containsBytes)(
|
|
2058
2076
|
data,
|
|
2059
|
-
(0,
|
|
2077
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2060
2078
|
new Uint8Array([127, 70, 119, 40, 188, 227, 61, 7])
|
|
2061
2079
|
),
|
|
2062
2080
|
0
|
|
2063
2081
|
)) {
|
|
2064
2082
|
return 18 /* UpdateOperationAccount */;
|
|
2065
2083
|
}
|
|
2066
|
-
if ((0,
|
|
2084
|
+
if ((0, import_kit26.containsBytes)(
|
|
2067
2085
|
data,
|
|
2068
|
-
(0,
|
|
2086
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2069
2087
|
new Uint8Array([130, 87, 108, 6, 46, 224, 117, 123])
|
|
2070
2088
|
),
|
|
2071
2089
|
0
|
|
2072
2090
|
)) {
|
|
2073
2091
|
return 19 /* UpdatePoolStatus */;
|
|
2074
2092
|
}
|
|
2075
|
-
if ((0,
|
|
2093
|
+
if ((0, import_kit26.containsBytes)(
|
|
2076
2094
|
data,
|
|
2077
|
-
(0,
|
|
2095
|
+
(0, import_kit26.fixEncoderSize)((0, import_kit26.getBytesEncoder)(), 8).encode(
|
|
2078
2096
|
new Uint8Array([163, 172, 224, 52, 11, 154, 106, 223])
|
|
2079
2097
|
),
|
|
2080
2098
|
0
|
|
@@ -2189,7 +2207,7 @@ function getAmmV3ErrorMessage(code) {
|
|
|
2189
2207
|
return "Error message not available in production bundles.";
|
|
2190
2208
|
}
|
|
2191
2209
|
function isAmmV3Error(error, transactionMessage, code) {
|
|
2192
|
-
return (0,
|
|
2210
|
+
return (0, import_kit27.isProgramError)(
|
|
2193
2211
|
error,
|
|
2194
2212
|
transactionMessage,
|
|
2195
2213
|
AMM_V3_PROGRAM_ADDRESS,
|
|
@@ -2198,10 +2216,10 @@ function isAmmV3Error(error, transactionMessage, code) {
|
|
|
2198
2216
|
}
|
|
2199
2217
|
|
|
2200
2218
|
// src/generated/instructions/closePosition.ts
|
|
2201
|
-
var
|
|
2219
|
+
var import_kit29 = require("@solana/kit");
|
|
2202
2220
|
|
|
2203
2221
|
// src/generated/shared/index.ts
|
|
2204
|
-
var
|
|
2222
|
+
var import_kit28 = require("@solana/kit");
|
|
2205
2223
|
function expectSome(value) {
|
|
2206
2224
|
if (value === null || value === void 0) {
|
|
2207
2225
|
throw new Error("Expected a value but received null or undefined.");
|
|
@@ -2226,19 +2244,19 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
|
2226
2244
|
if (optionalAccountStrategy === "omitted") return;
|
|
2227
2245
|
return Object.freeze({
|
|
2228
2246
|
address: programAddress,
|
|
2229
|
-
role:
|
|
2247
|
+
role: import_kit28.AccountRole.READONLY
|
|
2230
2248
|
});
|
|
2231
2249
|
}
|
|
2232
|
-
const writableRole = account.isWritable ?
|
|
2250
|
+
const writableRole = account.isWritable ? import_kit28.AccountRole.WRITABLE : import_kit28.AccountRole.READONLY;
|
|
2233
2251
|
return Object.freeze({
|
|
2234
2252
|
address: expectAddress(account.value),
|
|
2235
|
-
role: isTransactionSigner(account.value) ? (0,
|
|
2253
|
+
role: isTransactionSigner(account.value) ? (0, import_kit28.upgradeRoleToSigner)(writableRole) : writableRole,
|
|
2236
2254
|
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
2237
2255
|
});
|
|
2238
2256
|
};
|
|
2239
2257
|
}
|
|
2240
2258
|
function isTransactionSigner(value) {
|
|
2241
|
-
return !!value && typeof value === "object" && "address" in value && (0,
|
|
2259
|
+
return !!value && typeof value === "object" && "address" in value && (0, import_kit28.isTransactionSigner)(value);
|
|
2242
2260
|
}
|
|
2243
2261
|
|
|
2244
2262
|
// src/generated/instructions/closePosition.ts
|
|
@@ -2253,23 +2271,23 @@ var CLOSE_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
|
2253
2271
|
98
|
|
2254
2272
|
]);
|
|
2255
2273
|
function getClosePositionDiscriminatorBytes() {
|
|
2256
|
-
return (0,
|
|
2274
|
+
return (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8).encode(
|
|
2257
2275
|
CLOSE_POSITION_DISCRIMINATOR
|
|
2258
2276
|
);
|
|
2259
2277
|
}
|
|
2260
2278
|
function getClosePositionInstructionDataEncoder() {
|
|
2261
|
-
return (0,
|
|
2262
|
-
(0,
|
|
2279
|
+
return (0, import_kit29.transformEncoder)(
|
|
2280
|
+
(0, import_kit29.getStructEncoder)([["discriminator", (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 8)]]),
|
|
2263
2281
|
(value) => ({ ...value, discriminator: CLOSE_POSITION_DISCRIMINATOR })
|
|
2264
2282
|
);
|
|
2265
2283
|
}
|
|
2266
2284
|
function getClosePositionInstructionDataDecoder() {
|
|
2267
|
-
return (0,
|
|
2268
|
-
["discriminator", (0,
|
|
2285
|
+
return (0, import_kit29.getStructDecoder)([
|
|
2286
|
+
["discriminator", (0, import_kit29.fixDecoderSize)((0, import_kit29.getBytesDecoder)(), 8)]
|
|
2269
2287
|
]);
|
|
2270
2288
|
}
|
|
2271
2289
|
function getClosePositionInstructionDataCodec() {
|
|
2272
|
-
return (0,
|
|
2290
|
+
return (0, import_kit29.combineCodec)(
|
|
2273
2291
|
getClosePositionInstructionDataEncoder(),
|
|
2274
2292
|
getClosePositionInstructionDataDecoder()
|
|
2275
2293
|
);
|
|
@@ -2292,13 +2310,13 @@ async function getClosePositionInstructionAsync(input, config) {
|
|
|
2292
2310
|
};
|
|
2293
2311
|
const accounts = originalAccounts;
|
|
2294
2312
|
if (!accounts.personalPosition.value) {
|
|
2295
|
-
accounts.personalPosition.value = await (0,
|
|
2313
|
+
accounts.personalPosition.value = await (0, import_kit29.getProgramDerivedAddress)({
|
|
2296
2314
|
programAddress,
|
|
2297
2315
|
seeds: [
|
|
2298
|
-
(0,
|
|
2316
|
+
(0, import_kit29.getBytesEncoder)().encode(
|
|
2299
2317
|
new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
|
|
2300
2318
|
),
|
|
2301
|
-
(0,
|
|
2319
|
+
(0, import_kit29.getAddressEncoder)().encode(
|
|
2302
2320
|
expectAddress(accounts.positionNftMint.value)
|
|
2303
2321
|
)
|
|
2304
2322
|
]
|
|
@@ -2386,7 +2404,7 @@ function parseClosePositionInstruction(instruction) {
|
|
|
2386
2404
|
}
|
|
2387
2405
|
|
|
2388
2406
|
// src/generated/instructions/closeProtocolPosition.ts
|
|
2389
|
-
var
|
|
2407
|
+
var import_kit30 = require("@solana/kit");
|
|
2390
2408
|
var CLOSE_PROTOCOL_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
2391
2409
|
201,
|
|
2392
2410
|
117,
|
|
@@ -2398,13 +2416,13 @@ var CLOSE_PROTOCOL_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
|
2398
2416
|
178
|
|
2399
2417
|
]);
|
|
2400
2418
|
function getCloseProtocolPositionDiscriminatorBytes() {
|
|
2401
|
-
return (0,
|
|
2419
|
+
return (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8).encode(
|
|
2402
2420
|
CLOSE_PROTOCOL_POSITION_DISCRIMINATOR
|
|
2403
2421
|
);
|
|
2404
2422
|
}
|
|
2405
2423
|
function getCloseProtocolPositionInstructionDataEncoder() {
|
|
2406
|
-
return (0,
|
|
2407
|
-
(0,
|
|
2424
|
+
return (0, import_kit30.transformEncoder)(
|
|
2425
|
+
(0, import_kit30.getStructEncoder)([["discriminator", (0, import_kit30.fixEncoderSize)((0, import_kit30.getBytesEncoder)(), 8)]]),
|
|
2408
2426
|
(value) => ({
|
|
2409
2427
|
...value,
|
|
2410
2428
|
discriminator: CLOSE_PROTOCOL_POSITION_DISCRIMINATOR
|
|
@@ -2412,12 +2430,12 @@ function getCloseProtocolPositionInstructionDataEncoder() {
|
|
|
2412
2430
|
);
|
|
2413
2431
|
}
|
|
2414
2432
|
function getCloseProtocolPositionInstructionDataDecoder() {
|
|
2415
|
-
return (0,
|
|
2416
|
-
["discriminator", (0,
|
|
2433
|
+
return (0, import_kit30.getStructDecoder)([
|
|
2434
|
+
["discriminator", (0, import_kit30.fixDecoderSize)((0, import_kit30.getBytesDecoder)(), 8)]
|
|
2417
2435
|
]);
|
|
2418
2436
|
}
|
|
2419
2437
|
function getCloseProtocolPositionInstructionDataCodec() {
|
|
2420
|
-
return (0,
|
|
2438
|
+
return (0, import_kit30.combineCodec)(
|
|
2421
2439
|
getCloseProtocolPositionInstructionDataEncoder(),
|
|
2422
2440
|
getCloseProtocolPositionInstructionDataDecoder()
|
|
2423
2441
|
);
|
|
@@ -2465,7 +2483,7 @@ function parseCloseProtocolPositionInstruction(instruction) {
|
|
|
2465
2483
|
}
|
|
2466
2484
|
|
|
2467
2485
|
// src/generated/instructions/collectFundFee.ts
|
|
2468
|
-
var
|
|
2486
|
+
var import_kit31 = require("@solana/kit");
|
|
2469
2487
|
var COLLECT_FUND_FEE_DISCRIMINATOR = new Uint8Array([
|
|
2470
2488
|
167,
|
|
2471
2489
|
138,
|
|
@@ -2477,29 +2495,29 @@ var COLLECT_FUND_FEE_DISCRIMINATOR = new Uint8Array([
|
|
|
2477
2495
|
126
|
|
2478
2496
|
]);
|
|
2479
2497
|
function getCollectFundFeeDiscriminatorBytes() {
|
|
2480
|
-
return (0,
|
|
2498
|
+
return (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8).encode(
|
|
2481
2499
|
COLLECT_FUND_FEE_DISCRIMINATOR
|
|
2482
2500
|
);
|
|
2483
2501
|
}
|
|
2484
2502
|
function getCollectFundFeeInstructionDataEncoder() {
|
|
2485
|
-
return (0,
|
|
2486
|
-
(0,
|
|
2487
|
-
["discriminator", (0,
|
|
2488
|
-
["amount0Requested", (0,
|
|
2489
|
-
["amount1Requested", (0,
|
|
2503
|
+
return (0, import_kit31.transformEncoder)(
|
|
2504
|
+
(0, import_kit31.getStructEncoder)([
|
|
2505
|
+
["discriminator", (0, import_kit31.fixEncoderSize)((0, import_kit31.getBytesEncoder)(), 8)],
|
|
2506
|
+
["amount0Requested", (0, import_kit31.getU64Encoder)()],
|
|
2507
|
+
["amount1Requested", (0, import_kit31.getU64Encoder)()]
|
|
2490
2508
|
]),
|
|
2491
2509
|
(value) => ({ ...value, discriminator: COLLECT_FUND_FEE_DISCRIMINATOR })
|
|
2492
2510
|
);
|
|
2493
2511
|
}
|
|
2494
2512
|
function getCollectFundFeeInstructionDataDecoder() {
|
|
2495
|
-
return (0,
|
|
2496
|
-
["discriminator", (0,
|
|
2497
|
-
["amount0Requested", (0,
|
|
2498
|
-
["amount1Requested", (0,
|
|
2513
|
+
return (0, import_kit31.getStructDecoder)([
|
|
2514
|
+
["discriminator", (0, import_kit31.fixDecoderSize)((0, import_kit31.getBytesDecoder)(), 8)],
|
|
2515
|
+
["amount0Requested", (0, import_kit31.getU64Decoder)()],
|
|
2516
|
+
["amount1Requested", (0, import_kit31.getU64Decoder)()]
|
|
2499
2517
|
]);
|
|
2500
2518
|
}
|
|
2501
2519
|
function getCollectFundFeeInstructionDataCodec() {
|
|
2502
|
-
return (0,
|
|
2520
|
+
return (0, import_kit31.combineCodec)(
|
|
2503
2521
|
getCollectFundFeeInstructionDataEncoder(),
|
|
2504
2522
|
getCollectFundFeeInstructionDataDecoder()
|
|
2505
2523
|
);
|
|
@@ -2587,7 +2605,7 @@ function parseCollectFundFeeInstruction(instruction) {
|
|
|
2587
2605
|
}
|
|
2588
2606
|
|
|
2589
2607
|
// src/generated/instructions/collectProtocolFee.ts
|
|
2590
|
-
var
|
|
2608
|
+
var import_kit32 = require("@solana/kit");
|
|
2591
2609
|
var COLLECT_PROTOCOL_FEE_DISCRIMINATOR = new Uint8Array([
|
|
2592
2610
|
136,
|
|
2593
2611
|
136,
|
|
@@ -2599,29 +2617,29 @@ var COLLECT_PROTOCOL_FEE_DISCRIMINATOR = new Uint8Array([
|
|
|
2599
2617
|
89
|
|
2600
2618
|
]);
|
|
2601
2619
|
function getCollectProtocolFeeDiscriminatorBytes() {
|
|
2602
|
-
return (0,
|
|
2620
|
+
return (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8).encode(
|
|
2603
2621
|
COLLECT_PROTOCOL_FEE_DISCRIMINATOR
|
|
2604
2622
|
);
|
|
2605
2623
|
}
|
|
2606
2624
|
function getCollectProtocolFeeInstructionDataEncoder() {
|
|
2607
|
-
return (0,
|
|
2608
|
-
(0,
|
|
2609
|
-
["discriminator", (0,
|
|
2610
|
-
["amount0Requested", (0,
|
|
2611
|
-
["amount1Requested", (0,
|
|
2625
|
+
return (0, import_kit32.transformEncoder)(
|
|
2626
|
+
(0, import_kit32.getStructEncoder)([
|
|
2627
|
+
["discriminator", (0, import_kit32.fixEncoderSize)((0, import_kit32.getBytesEncoder)(), 8)],
|
|
2628
|
+
["amount0Requested", (0, import_kit32.getU64Encoder)()],
|
|
2629
|
+
["amount1Requested", (0, import_kit32.getU64Encoder)()]
|
|
2612
2630
|
]),
|
|
2613
2631
|
(value) => ({ ...value, discriminator: COLLECT_PROTOCOL_FEE_DISCRIMINATOR })
|
|
2614
2632
|
);
|
|
2615
2633
|
}
|
|
2616
2634
|
function getCollectProtocolFeeInstructionDataDecoder() {
|
|
2617
|
-
return (0,
|
|
2618
|
-
["discriminator", (0,
|
|
2619
|
-
["amount0Requested", (0,
|
|
2620
|
-
["amount1Requested", (0,
|
|
2635
|
+
return (0, import_kit32.getStructDecoder)([
|
|
2636
|
+
["discriminator", (0, import_kit32.fixDecoderSize)((0, import_kit32.getBytesDecoder)(), 8)],
|
|
2637
|
+
["amount0Requested", (0, import_kit32.getU64Decoder)()],
|
|
2638
|
+
["amount1Requested", (0, import_kit32.getU64Decoder)()]
|
|
2621
2639
|
]);
|
|
2622
2640
|
}
|
|
2623
2641
|
function getCollectProtocolFeeInstructionDataCodec() {
|
|
2624
|
-
return (0,
|
|
2642
|
+
return (0, import_kit32.combineCodec)(
|
|
2625
2643
|
getCollectProtocolFeeInstructionDataEncoder(),
|
|
2626
2644
|
getCollectProtocolFeeInstructionDataDecoder()
|
|
2627
2645
|
);
|
|
@@ -2711,7 +2729,7 @@ function parseCollectProtocolFeeInstruction(instruction) {
|
|
|
2711
2729
|
}
|
|
2712
2730
|
|
|
2713
2731
|
// src/generated/instructions/collectRemainingRewards.ts
|
|
2714
|
-
var
|
|
2732
|
+
var import_kit33 = require("@solana/kit");
|
|
2715
2733
|
var COLLECT_REMAINING_REWARDS_DISCRIMINATOR = new Uint8Array([
|
|
2716
2734
|
18,
|
|
2717
2735
|
237,
|
|
@@ -2723,15 +2741,15 @@ var COLLECT_REMAINING_REWARDS_DISCRIMINATOR = new Uint8Array([
|
|
|
2723
2741
|
144
|
|
2724
2742
|
]);
|
|
2725
2743
|
function getCollectRemainingRewardsDiscriminatorBytes() {
|
|
2726
|
-
return (0,
|
|
2744
|
+
return (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8).encode(
|
|
2727
2745
|
COLLECT_REMAINING_REWARDS_DISCRIMINATOR
|
|
2728
2746
|
);
|
|
2729
2747
|
}
|
|
2730
2748
|
function getCollectRemainingRewardsInstructionDataEncoder() {
|
|
2731
|
-
return (0,
|
|
2732
|
-
(0,
|
|
2733
|
-
["discriminator", (0,
|
|
2734
|
-
["rewardIndex", (0,
|
|
2749
|
+
return (0, import_kit33.transformEncoder)(
|
|
2750
|
+
(0, import_kit33.getStructEncoder)([
|
|
2751
|
+
["discriminator", (0, import_kit33.fixEncoderSize)((0, import_kit33.getBytesEncoder)(), 8)],
|
|
2752
|
+
["rewardIndex", (0, import_kit33.getU8Encoder)()]
|
|
2735
2753
|
]),
|
|
2736
2754
|
(value) => ({
|
|
2737
2755
|
...value,
|
|
@@ -2740,13 +2758,13 @@ function getCollectRemainingRewardsInstructionDataEncoder() {
|
|
|
2740
2758
|
);
|
|
2741
2759
|
}
|
|
2742
2760
|
function getCollectRemainingRewardsInstructionDataDecoder() {
|
|
2743
|
-
return (0,
|
|
2744
|
-
["discriminator", (0,
|
|
2745
|
-
["rewardIndex", (0,
|
|
2761
|
+
return (0, import_kit33.getStructDecoder)([
|
|
2762
|
+
["discriminator", (0, import_kit33.fixDecoderSize)((0, import_kit33.getBytesDecoder)(), 8)],
|
|
2763
|
+
["rewardIndex", (0, import_kit33.getU8Decoder)()]
|
|
2746
2764
|
]);
|
|
2747
2765
|
}
|
|
2748
2766
|
function getCollectRemainingRewardsInstructionDataCodec() {
|
|
2749
|
-
return (0,
|
|
2767
|
+
return (0, import_kit33.combineCodec)(
|
|
2750
2768
|
getCollectRemainingRewardsInstructionDataEncoder(),
|
|
2751
2769
|
getCollectRemainingRewardsInstructionDataDecoder()
|
|
2752
2770
|
);
|
|
@@ -2833,7 +2851,7 @@ function parseCollectRemainingRewardsInstruction(instruction) {
|
|
|
2833
2851
|
}
|
|
2834
2852
|
|
|
2835
2853
|
// src/generated/instructions/createAmmConfig.ts
|
|
2836
|
-
var
|
|
2854
|
+
var import_kit34 = require("@solana/kit");
|
|
2837
2855
|
var CREATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
2838
2856
|
137,
|
|
2839
2857
|
52,
|
|
@@ -2845,35 +2863,35 @@ var CREATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
2845
2863
|
104
|
|
2846
2864
|
]);
|
|
2847
2865
|
function getCreateAmmConfigDiscriminatorBytes() {
|
|
2848
|
-
return (0,
|
|
2866
|
+
return (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8).encode(
|
|
2849
2867
|
CREATE_AMM_CONFIG_DISCRIMINATOR
|
|
2850
2868
|
);
|
|
2851
2869
|
}
|
|
2852
2870
|
function getCreateAmmConfigInstructionDataEncoder() {
|
|
2853
|
-
return (0,
|
|
2854
|
-
(0,
|
|
2855
|
-
["discriminator", (0,
|
|
2856
|
-
["index", (0,
|
|
2857
|
-
["tickSpacing", (0,
|
|
2858
|
-
["tradeFeeRate", (0,
|
|
2859
|
-
["protocolFeeRate", (0,
|
|
2860
|
-
["fundFeeRate", (0,
|
|
2871
|
+
return (0, import_kit34.transformEncoder)(
|
|
2872
|
+
(0, import_kit34.getStructEncoder)([
|
|
2873
|
+
["discriminator", (0, import_kit34.fixEncoderSize)((0, import_kit34.getBytesEncoder)(), 8)],
|
|
2874
|
+
["index", (0, import_kit34.getU16Encoder)()],
|
|
2875
|
+
["tickSpacing", (0, import_kit34.getU16Encoder)()],
|
|
2876
|
+
["tradeFeeRate", (0, import_kit34.getU32Encoder)()],
|
|
2877
|
+
["protocolFeeRate", (0, import_kit34.getU32Encoder)()],
|
|
2878
|
+
["fundFeeRate", (0, import_kit34.getU32Encoder)()]
|
|
2861
2879
|
]),
|
|
2862
2880
|
(value) => ({ ...value, discriminator: CREATE_AMM_CONFIG_DISCRIMINATOR })
|
|
2863
2881
|
);
|
|
2864
2882
|
}
|
|
2865
2883
|
function getCreateAmmConfigInstructionDataDecoder() {
|
|
2866
|
-
return (0,
|
|
2867
|
-
["discriminator", (0,
|
|
2868
|
-
["index", (0,
|
|
2869
|
-
["tickSpacing", (0,
|
|
2870
|
-
["tradeFeeRate", (0,
|
|
2871
|
-
["protocolFeeRate", (0,
|
|
2872
|
-
["fundFeeRate", (0,
|
|
2884
|
+
return (0, import_kit34.getStructDecoder)([
|
|
2885
|
+
["discriminator", (0, import_kit34.fixDecoderSize)((0, import_kit34.getBytesDecoder)(), 8)],
|
|
2886
|
+
["index", (0, import_kit34.getU16Decoder)()],
|
|
2887
|
+
["tickSpacing", (0, import_kit34.getU16Decoder)()],
|
|
2888
|
+
["tradeFeeRate", (0, import_kit34.getU32Decoder)()],
|
|
2889
|
+
["protocolFeeRate", (0, import_kit34.getU32Decoder)()],
|
|
2890
|
+
["fundFeeRate", (0, import_kit34.getU32Decoder)()]
|
|
2873
2891
|
]);
|
|
2874
2892
|
}
|
|
2875
2893
|
function getCreateAmmConfigInstructionDataCodec() {
|
|
2876
|
-
return (0,
|
|
2894
|
+
return (0, import_kit34.combineCodec)(
|
|
2877
2895
|
getCreateAmmConfigInstructionDataEncoder(),
|
|
2878
2896
|
getCreateAmmConfigInstructionDataDecoder()
|
|
2879
2897
|
);
|
|
@@ -2891,13 +2909,13 @@ async function getCreateAmmConfigInstructionAsync(input, config) {
|
|
|
2891
2909
|
accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
|
|
2892
2910
|
}
|
|
2893
2911
|
if (!accounts.ammConfig.value) {
|
|
2894
|
-
accounts.ammConfig.value = await (0,
|
|
2912
|
+
accounts.ammConfig.value = await (0, import_kit34.getProgramDerivedAddress)({
|
|
2895
2913
|
programAddress,
|
|
2896
2914
|
seeds: [
|
|
2897
|
-
(0,
|
|
2915
|
+
(0, import_kit34.getBytesEncoder)().encode(
|
|
2898
2916
|
new Uint8Array([97, 109, 109, 95, 99, 111, 110, 102, 105, 103])
|
|
2899
2917
|
),
|
|
2900
|
-
(0,
|
|
2918
|
+
(0, import_kit34.getU16Encoder)().encode(expectSome(args.index))
|
|
2901
2919
|
]
|
|
2902
2920
|
});
|
|
2903
2921
|
}
|
|
@@ -2967,7 +2985,7 @@ function parseCreateAmmConfigInstruction(instruction) {
|
|
|
2967
2985
|
}
|
|
2968
2986
|
|
|
2969
2987
|
// src/generated/instructions/createOperationAccount.ts
|
|
2970
|
-
var
|
|
2988
|
+
var import_kit35 = require("@solana/kit");
|
|
2971
2989
|
var CREATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
2972
2990
|
63,
|
|
2973
2991
|
87,
|
|
@@ -2979,13 +2997,13 @@ var CREATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
2979
2997
|
104
|
|
2980
2998
|
]);
|
|
2981
2999
|
function getCreateOperationAccountDiscriminatorBytes() {
|
|
2982
|
-
return (0,
|
|
3000
|
+
return (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8).encode(
|
|
2983
3001
|
CREATE_OPERATION_ACCOUNT_DISCRIMINATOR
|
|
2984
3002
|
);
|
|
2985
3003
|
}
|
|
2986
3004
|
function getCreateOperationAccountInstructionDataEncoder() {
|
|
2987
|
-
return (0,
|
|
2988
|
-
(0,
|
|
3005
|
+
return (0, import_kit35.transformEncoder)(
|
|
3006
|
+
(0, import_kit35.getStructEncoder)([["discriminator", (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8)]]),
|
|
2989
3007
|
(value) => ({
|
|
2990
3008
|
...value,
|
|
2991
3009
|
discriminator: CREATE_OPERATION_ACCOUNT_DISCRIMINATOR
|
|
@@ -2993,12 +3011,12 @@ function getCreateOperationAccountInstructionDataEncoder() {
|
|
|
2993
3011
|
);
|
|
2994
3012
|
}
|
|
2995
3013
|
function getCreateOperationAccountInstructionDataDecoder() {
|
|
2996
|
-
return (0,
|
|
2997
|
-
["discriminator", (0,
|
|
3014
|
+
return (0, import_kit35.getStructDecoder)([
|
|
3015
|
+
["discriminator", (0, import_kit35.fixDecoderSize)((0, import_kit35.getBytesDecoder)(), 8)]
|
|
2998
3016
|
]);
|
|
2999
3017
|
}
|
|
3000
3018
|
function getCreateOperationAccountInstructionDataCodec() {
|
|
3001
|
-
return (0,
|
|
3019
|
+
return (0, import_kit35.combineCodec)(
|
|
3002
3020
|
getCreateOperationAccountInstructionDataEncoder(),
|
|
3003
3021
|
getCreateOperationAccountInstructionDataDecoder()
|
|
3004
3022
|
);
|
|
@@ -3015,10 +3033,10 @@ async function getCreateOperationAccountInstructionAsync(input, config) {
|
|
|
3015
3033
|
accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
|
|
3016
3034
|
}
|
|
3017
3035
|
if (!accounts.operationState.value) {
|
|
3018
|
-
accounts.operationState.value = await (0,
|
|
3036
|
+
accounts.operationState.value = await (0, import_kit35.getProgramDerivedAddress)({
|
|
3019
3037
|
programAddress,
|
|
3020
3038
|
seeds: [
|
|
3021
|
-
(0,
|
|
3039
|
+
(0, import_kit35.getBytesEncoder)().encode(
|
|
3022
3040
|
new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
|
|
3023
3041
|
)
|
|
3024
3042
|
]
|
|
@@ -3087,7 +3105,7 @@ function parseCreateOperationAccountInstruction(instruction) {
|
|
|
3087
3105
|
}
|
|
3088
3106
|
|
|
3089
3107
|
// src/generated/instructions/createPool.ts
|
|
3090
|
-
var
|
|
3108
|
+
var import_kit36 = require("@solana/kit");
|
|
3091
3109
|
var CREATE_POOL_DISCRIMINATOR = new Uint8Array([
|
|
3092
3110
|
233,
|
|
3093
3111
|
146,
|
|
@@ -3099,27 +3117,27 @@ var CREATE_POOL_DISCRIMINATOR = new Uint8Array([
|
|
|
3099
3117
|
188
|
|
3100
3118
|
]);
|
|
3101
3119
|
function getCreatePoolDiscriminatorBytes() {
|
|
3102
|
-
return (0,
|
|
3120
|
+
return (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8).encode(CREATE_POOL_DISCRIMINATOR);
|
|
3103
3121
|
}
|
|
3104
3122
|
function getCreatePoolInstructionDataEncoder() {
|
|
3105
|
-
return (0,
|
|
3106
|
-
(0,
|
|
3107
|
-
["discriminator", (0,
|
|
3108
|
-
["sqrtPriceX64", (0,
|
|
3109
|
-
["openTime", (0,
|
|
3123
|
+
return (0, import_kit36.transformEncoder)(
|
|
3124
|
+
(0, import_kit36.getStructEncoder)([
|
|
3125
|
+
["discriminator", (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8)],
|
|
3126
|
+
["sqrtPriceX64", (0, import_kit36.getU128Encoder)()],
|
|
3127
|
+
["openTime", (0, import_kit36.getU64Encoder)()]
|
|
3110
3128
|
]),
|
|
3111
3129
|
(value) => ({ ...value, discriminator: CREATE_POOL_DISCRIMINATOR })
|
|
3112
3130
|
);
|
|
3113
3131
|
}
|
|
3114
3132
|
function getCreatePoolInstructionDataDecoder() {
|
|
3115
|
-
return (0,
|
|
3116
|
-
["discriminator", (0,
|
|
3117
|
-
["sqrtPriceX64", (0,
|
|
3118
|
-
["openTime", (0,
|
|
3133
|
+
return (0, import_kit36.getStructDecoder)([
|
|
3134
|
+
["discriminator", (0, import_kit36.fixDecoderSize)((0, import_kit36.getBytesDecoder)(), 8)],
|
|
3135
|
+
["sqrtPriceX64", (0, import_kit36.getU128Decoder)()],
|
|
3136
|
+
["openTime", (0, import_kit36.getU64Decoder)()]
|
|
3119
3137
|
]);
|
|
3120
3138
|
}
|
|
3121
3139
|
function getCreatePoolInstructionDataCodec() {
|
|
3122
|
-
return (0,
|
|
3140
|
+
return (0, import_kit36.combineCodec)(
|
|
3123
3141
|
getCreatePoolInstructionDataEncoder(),
|
|
3124
3142
|
getCreatePoolInstructionDataDecoder()
|
|
3125
3143
|
);
|
|
@@ -3147,56 +3165,56 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3147
3165
|
const accounts = originalAccounts;
|
|
3148
3166
|
const args = { ...input };
|
|
3149
3167
|
if (!accounts.poolState.value) {
|
|
3150
|
-
accounts.poolState.value = await (0,
|
|
3168
|
+
accounts.poolState.value = await (0, import_kit36.getProgramDerivedAddress)({
|
|
3151
3169
|
programAddress,
|
|
3152
3170
|
seeds: [
|
|
3153
|
-
(0,
|
|
3154
|
-
(0,
|
|
3155
|
-
(0,
|
|
3156
|
-
(0,
|
|
3171
|
+
(0, import_kit36.getBytesEncoder)().encode(new Uint8Array([112, 111, 111, 108])),
|
|
3172
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.ammConfig.value)),
|
|
3173
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value)),
|
|
3174
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
|
|
3157
3175
|
]
|
|
3158
3176
|
});
|
|
3159
3177
|
}
|
|
3160
3178
|
if (!accounts.tokenVault0.value) {
|
|
3161
|
-
accounts.tokenVault0.value = await (0,
|
|
3179
|
+
accounts.tokenVault0.value = await (0, import_kit36.getProgramDerivedAddress)({
|
|
3162
3180
|
programAddress,
|
|
3163
3181
|
seeds: [
|
|
3164
|
-
(0,
|
|
3182
|
+
(0, import_kit36.getBytesEncoder)().encode(
|
|
3165
3183
|
new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
|
|
3166
3184
|
),
|
|
3167
|
-
(0,
|
|
3168
|
-
(0,
|
|
3185
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
|
|
3186
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint0.value))
|
|
3169
3187
|
]
|
|
3170
3188
|
});
|
|
3171
3189
|
}
|
|
3172
3190
|
if (!accounts.tokenVault1.value) {
|
|
3173
|
-
accounts.tokenVault1.value = await (0,
|
|
3191
|
+
accounts.tokenVault1.value = await (0, import_kit36.getProgramDerivedAddress)({
|
|
3174
3192
|
programAddress,
|
|
3175
3193
|
seeds: [
|
|
3176
|
-
(0,
|
|
3194
|
+
(0, import_kit36.getBytesEncoder)().encode(
|
|
3177
3195
|
new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
|
|
3178
3196
|
),
|
|
3179
|
-
(0,
|
|
3180
|
-
(0,
|
|
3197
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
|
|
3198
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.tokenMint1.value))
|
|
3181
3199
|
]
|
|
3182
3200
|
});
|
|
3183
3201
|
}
|
|
3184
3202
|
if (!accounts.observationState.value) {
|
|
3185
|
-
accounts.observationState.value = await (0,
|
|
3203
|
+
accounts.observationState.value = await (0, import_kit36.getProgramDerivedAddress)({
|
|
3186
3204
|
programAddress,
|
|
3187
3205
|
seeds: [
|
|
3188
|
-
(0,
|
|
3206
|
+
(0, import_kit36.getBytesEncoder)().encode(
|
|
3189
3207
|
new Uint8Array([111, 98, 115, 101, 114, 118, 97, 116, 105, 111, 110])
|
|
3190
3208
|
),
|
|
3191
|
-
(0,
|
|
3209
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
|
|
3192
3210
|
]
|
|
3193
3211
|
});
|
|
3194
3212
|
}
|
|
3195
3213
|
if (!accounts.tickArrayBitmap.value) {
|
|
3196
|
-
accounts.tickArrayBitmap.value = await (0,
|
|
3214
|
+
accounts.tickArrayBitmap.value = await (0, import_kit36.getProgramDerivedAddress)({
|
|
3197
3215
|
programAddress,
|
|
3198
3216
|
seeds: [
|
|
3199
|
-
(0,
|
|
3217
|
+
(0, import_kit36.getBytesEncoder)().encode(
|
|
3200
3218
|
new Uint8Array([
|
|
3201
3219
|
112,
|
|
3202
3220
|
111,
|
|
@@ -3232,7 +3250,7 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3232
3250
|
110
|
|
3233
3251
|
])
|
|
3234
3252
|
),
|
|
3235
|
-
(0,
|
|
3253
|
+
(0, import_kit36.getAddressEncoder)().encode(expectAddress(accounts.poolState.value))
|
|
3236
3254
|
]
|
|
3237
3255
|
});
|
|
3238
3256
|
}
|
|
@@ -3348,7 +3366,7 @@ function parseCreatePoolInstruction(instruction) {
|
|
|
3348
3366
|
}
|
|
3349
3367
|
|
|
3350
3368
|
// src/generated/instructions/createSupportMintAssociated.ts
|
|
3351
|
-
var
|
|
3369
|
+
var import_kit37 = require("@solana/kit");
|
|
3352
3370
|
var CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
|
|
3353
3371
|
17,
|
|
3354
3372
|
251,
|
|
@@ -3360,13 +3378,13 @@ var CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
|
|
|
3360
3378
|
169
|
|
3361
3379
|
]);
|
|
3362
3380
|
function getCreateSupportMintAssociatedDiscriminatorBytes() {
|
|
3363
|
-
return (0,
|
|
3381
|
+
return (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8).encode(
|
|
3364
3382
|
CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
|
|
3365
3383
|
);
|
|
3366
3384
|
}
|
|
3367
3385
|
function getCreateSupportMintAssociatedInstructionDataEncoder() {
|
|
3368
|
-
return (0,
|
|
3369
|
-
(0,
|
|
3386
|
+
return (0, import_kit37.transformEncoder)(
|
|
3387
|
+
(0, import_kit37.getStructEncoder)([["discriminator", (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8)]]),
|
|
3370
3388
|
(value) => ({
|
|
3371
3389
|
...value,
|
|
3372
3390
|
discriminator: CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
|
|
@@ -3374,12 +3392,12 @@ function getCreateSupportMintAssociatedInstructionDataEncoder() {
|
|
|
3374
3392
|
);
|
|
3375
3393
|
}
|
|
3376
3394
|
function getCreateSupportMintAssociatedInstructionDataDecoder() {
|
|
3377
|
-
return (0,
|
|
3378
|
-
["discriminator", (0,
|
|
3395
|
+
return (0, import_kit37.getStructDecoder)([
|
|
3396
|
+
["discriminator", (0, import_kit37.fixDecoderSize)((0, import_kit37.getBytesDecoder)(), 8)]
|
|
3379
3397
|
]);
|
|
3380
3398
|
}
|
|
3381
3399
|
function getCreateSupportMintAssociatedInstructionDataCodec() {
|
|
3382
|
-
return (0,
|
|
3400
|
+
return (0, import_kit37.combineCodec)(
|
|
3383
3401
|
getCreateSupportMintAssociatedInstructionDataEncoder(),
|
|
3384
3402
|
getCreateSupportMintAssociatedInstructionDataDecoder()
|
|
3385
3403
|
);
|
|
@@ -3397,10 +3415,10 @@ async function getCreateSupportMintAssociatedInstructionAsync(input, config) {
|
|
|
3397
3415
|
};
|
|
3398
3416
|
const accounts = originalAccounts;
|
|
3399
3417
|
if (!accounts.supportMintAssociated.value) {
|
|
3400
|
-
accounts.supportMintAssociated.value = await (0,
|
|
3418
|
+
accounts.supportMintAssociated.value = await (0, import_kit37.getProgramDerivedAddress)({
|
|
3401
3419
|
programAddress,
|
|
3402
3420
|
seeds: [
|
|
3403
|
-
(0,
|
|
3421
|
+
(0, import_kit37.getBytesEncoder)().encode(
|
|
3404
3422
|
new Uint8Array([
|
|
3405
3423
|
115,
|
|
3406
3424
|
117,
|
|
@@ -3416,7 +3434,7 @@ async function getCreateSupportMintAssociatedInstructionAsync(input, config) {
|
|
|
3416
3434
|
116
|
|
3417
3435
|
])
|
|
3418
3436
|
),
|
|
3419
|
-
(0,
|
|
3437
|
+
(0, import_kit37.getAddressEncoder)().encode(expectAddress(accounts.tokenMint.value))
|
|
3420
3438
|
]
|
|
3421
3439
|
});
|
|
3422
3440
|
}
|
|
@@ -3487,7 +3505,7 @@ function parseCreateSupportMintAssociatedInstruction(instruction) {
|
|
|
3487
3505
|
}
|
|
3488
3506
|
|
|
3489
3507
|
// src/generated/instructions/decreaseLiquidityV2.ts
|
|
3490
|
-
var
|
|
3508
|
+
var import_kit38 = require("@solana/kit");
|
|
3491
3509
|
var DECREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
|
|
3492
3510
|
58,
|
|
3493
3511
|
127,
|
|
@@ -3499,17 +3517,17 @@ var DECREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
|
|
|
3499
3517
|
96
|
|
3500
3518
|
]);
|
|
3501
3519
|
function getDecreaseLiquidityV2DiscriminatorBytes() {
|
|
3502
|
-
return (0,
|
|
3520
|
+
return (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8).encode(
|
|
3503
3521
|
DECREASE_LIQUIDITY_V2_DISCRIMINATOR
|
|
3504
3522
|
);
|
|
3505
3523
|
}
|
|
3506
3524
|
function getDecreaseLiquidityV2InstructionDataEncoder() {
|
|
3507
|
-
return (0,
|
|
3508
|
-
(0,
|
|
3509
|
-
["discriminator", (0,
|
|
3510
|
-
["liquidity", (0,
|
|
3511
|
-
["amount0Min", (0,
|
|
3512
|
-
["amount1Min", (0,
|
|
3525
|
+
return (0, import_kit38.transformEncoder)(
|
|
3526
|
+
(0, import_kit38.getStructEncoder)([
|
|
3527
|
+
["discriminator", (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8)],
|
|
3528
|
+
["liquidity", (0, import_kit38.getU128Encoder)()],
|
|
3529
|
+
["amount0Min", (0, import_kit38.getU64Encoder)()],
|
|
3530
|
+
["amount1Min", (0, import_kit38.getU64Encoder)()]
|
|
3513
3531
|
]),
|
|
3514
3532
|
(value) => ({
|
|
3515
3533
|
...value,
|
|
@@ -3518,15 +3536,15 @@ function getDecreaseLiquidityV2InstructionDataEncoder() {
|
|
|
3518
3536
|
);
|
|
3519
3537
|
}
|
|
3520
3538
|
function getDecreaseLiquidityV2InstructionDataDecoder() {
|
|
3521
|
-
return (0,
|
|
3522
|
-
["discriminator", (0,
|
|
3523
|
-
["liquidity", (0,
|
|
3524
|
-
["amount0Min", (0,
|
|
3525
|
-
["amount1Min", (0,
|
|
3539
|
+
return (0, import_kit38.getStructDecoder)([
|
|
3540
|
+
["discriminator", (0, import_kit38.fixDecoderSize)((0, import_kit38.getBytesDecoder)(), 8)],
|
|
3541
|
+
["liquidity", (0, import_kit38.getU128Decoder)()],
|
|
3542
|
+
["amount0Min", (0, import_kit38.getU64Decoder)()],
|
|
3543
|
+
["amount1Min", (0, import_kit38.getU64Decoder)()]
|
|
3526
3544
|
]);
|
|
3527
3545
|
}
|
|
3528
3546
|
function getDecreaseLiquidityV2InstructionDataCodec() {
|
|
3529
|
-
return (0,
|
|
3547
|
+
return (0, import_kit38.combineCodec)(
|
|
3530
3548
|
getDecreaseLiquidityV2InstructionDataEncoder(),
|
|
3531
3549
|
getDecreaseLiquidityV2InstructionDataDecoder()
|
|
3532
3550
|
);
|
|
@@ -3640,7 +3658,7 @@ function parseDecreaseLiquidityV2Instruction(instruction) {
|
|
|
3640
3658
|
}
|
|
3641
3659
|
|
|
3642
3660
|
// src/generated/instructions/increaseLiquidityV2.ts
|
|
3643
|
-
var
|
|
3661
|
+
var import_kit39 = require("@solana/kit");
|
|
3644
3662
|
var INCREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
|
|
3645
3663
|
133,
|
|
3646
3664
|
29,
|
|
@@ -3652,18 +3670,18 @@ var INCREASE_LIQUIDITY_V2_DISCRIMINATOR = new Uint8Array([
|
|
|
3652
3670
|
10
|
|
3653
3671
|
]);
|
|
3654
3672
|
function getIncreaseLiquidityV2DiscriminatorBytes() {
|
|
3655
|
-
return (0,
|
|
3673
|
+
return (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8).encode(
|
|
3656
3674
|
INCREASE_LIQUIDITY_V2_DISCRIMINATOR
|
|
3657
3675
|
);
|
|
3658
3676
|
}
|
|
3659
3677
|
function getIncreaseLiquidityV2InstructionDataEncoder() {
|
|
3660
|
-
return (0,
|
|
3661
|
-
(0,
|
|
3662
|
-
["discriminator", (0,
|
|
3663
|
-
["liquidity", (0,
|
|
3664
|
-
["amount0Max", (0,
|
|
3665
|
-
["amount1Max", (0,
|
|
3666
|
-
["baseFlag", (0,
|
|
3678
|
+
return (0, import_kit39.transformEncoder)(
|
|
3679
|
+
(0, import_kit39.getStructEncoder)([
|
|
3680
|
+
["discriminator", (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8)],
|
|
3681
|
+
["liquidity", (0, import_kit39.getU128Encoder)()],
|
|
3682
|
+
["amount0Max", (0, import_kit39.getU64Encoder)()],
|
|
3683
|
+
["amount1Max", (0, import_kit39.getU64Encoder)()],
|
|
3684
|
+
["baseFlag", (0, import_kit39.getOptionEncoder)((0, import_kit39.getBooleanEncoder)())]
|
|
3667
3685
|
]),
|
|
3668
3686
|
(value) => ({
|
|
3669
3687
|
...value,
|
|
@@ -3672,16 +3690,16 @@ function getIncreaseLiquidityV2InstructionDataEncoder() {
|
|
|
3672
3690
|
);
|
|
3673
3691
|
}
|
|
3674
3692
|
function getIncreaseLiquidityV2InstructionDataDecoder() {
|
|
3675
|
-
return (0,
|
|
3676
|
-
["discriminator", (0,
|
|
3677
|
-
["liquidity", (0,
|
|
3678
|
-
["amount0Max", (0,
|
|
3679
|
-
["amount1Max", (0,
|
|
3680
|
-
["baseFlag", (0,
|
|
3693
|
+
return (0, import_kit39.getStructDecoder)([
|
|
3694
|
+
["discriminator", (0, import_kit39.fixDecoderSize)((0, import_kit39.getBytesDecoder)(), 8)],
|
|
3695
|
+
["liquidity", (0, import_kit39.getU128Decoder)()],
|
|
3696
|
+
["amount0Max", (0, import_kit39.getU64Decoder)()],
|
|
3697
|
+
["amount1Max", (0, import_kit39.getU64Decoder)()],
|
|
3698
|
+
["baseFlag", (0, import_kit39.getOptionDecoder)((0, import_kit39.getBooleanDecoder)())]
|
|
3681
3699
|
]);
|
|
3682
3700
|
}
|
|
3683
3701
|
function getIncreaseLiquidityV2InstructionDataCodec() {
|
|
3684
|
-
return (0,
|
|
3702
|
+
return (0, import_kit39.combineCodec)(
|
|
3685
3703
|
getIncreaseLiquidityV2InstructionDataEncoder(),
|
|
3686
3704
|
getIncreaseLiquidityV2InstructionDataDecoder()
|
|
3687
3705
|
);
|
|
@@ -3783,7 +3801,7 @@ function parseIncreaseLiquidityV2Instruction(instruction) {
|
|
|
3783
3801
|
}
|
|
3784
3802
|
|
|
3785
3803
|
// src/generated/instructions/initializeReward.ts
|
|
3786
|
-
var
|
|
3804
|
+
var import_kit40 = require("@solana/kit");
|
|
3787
3805
|
var INITIALIZE_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
3788
3806
|
95,
|
|
3789
3807
|
135,
|
|
@@ -3795,31 +3813,31 @@ var INITIALIZE_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
|
3795
3813
|
68
|
|
3796
3814
|
]);
|
|
3797
3815
|
function getInitializeRewardDiscriminatorBytes() {
|
|
3798
|
-
return (0,
|
|
3816
|
+
return (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8).encode(
|
|
3799
3817
|
INITIALIZE_REWARD_DISCRIMINATOR
|
|
3800
3818
|
);
|
|
3801
3819
|
}
|
|
3802
3820
|
function getInitializeRewardInstructionDataEncoder() {
|
|
3803
|
-
return (0,
|
|
3804
|
-
(0,
|
|
3805
|
-
["discriminator", (0,
|
|
3806
|
-
["openTime", (0,
|
|
3807
|
-
["endTime", (0,
|
|
3808
|
-
["emissionsPerSecondX64", (0,
|
|
3821
|
+
return (0, import_kit40.transformEncoder)(
|
|
3822
|
+
(0, import_kit40.getStructEncoder)([
|
|
3823
|
+
["discriminator", (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8)],
|
|
3824
|
+
["openTime", (0, import_kit40.getU64Encoder)()],
|
|
3825
|
+
["endTime", (0, import_kit40.getU64Encoder)()],
|
|
3826
|
+
["emissionsPerSecondX64", (0, import_kit40.getU128Encoder)()]
|
|
3809
3827
|
]),
|
|
3810
3828
|
(value) => ({ ...value, discriminator: INITIALIZE_REWARD_DISCRIMINATOR })
|
|
3811
3829
|
);
|
|
3812
3830
|
}
|
|
3813
3831
|
function getInitializeRewardInstructionDataDecoder() {
|
|
3814
|
-
return (0,
|
|
3815
|
-
["discriminator", (0,
|
|
3816
|
-
["openTime", (0,
|
|
3817
|
-
["endTime", (0,
|
|
3818
|
-
["emissionsPerSecondX64", (0,
|
|
3832
|
+
return (0, import_kit40.getStructDecoder)([
|
|
3833
|
+
["discriminator", (0, import_kit40.fixDecoderSize)((0, import_kit40.getBytesDecoder)(), 8)],
|
|
3834
|
+
["openTime", (0, import_kit40.getU64Decoder)()],
|
|
3835
|
+
["endTime", (0, import_kit40.getU64Decoder)()],
|
|
3836
|
+
["emissionsPerSecondX64", (0, import_kit40.getU128Decoder)()]
|
|
3819
3837
|
]);
|
|
3820
3838
|
}
|
|
3821
3839
|
function getInitializeRewardInstructionDataCodec() {
|
|
3822
|
-
return (0,
|
|
3840
|
+
return (0, import_kit40.combineCodec)(
|
|
3823
3841
|
getInitializeRewardInstructionDataEncoder(),
|
|
3824
3842
|
getInitializeRewardInstructionDataDecoder()
|
|
3825
3843
|
);
|
|
@@ -3853,20 +3871,20 @@ async function getInitializeRewardInstructionAsync(input, config) {
|
|
|
3853
3871
|
const accounts = originalAccounts;
|
|
3854
3872
|
const args = { ...input };
|
|
3855
3873
|
if (!accounts.operationState.value) {
|
|
3856
|
-
accounts.operationState.value = await (0,
|
|
3874
|
+
accounts.operationState.value = await (0, import_kit40.getProgramDerivedAddress)({
|
|
3857
3875
|
programAddress,
|
|
3858
3876
|
seeds: [
|
|
3859
|
-
(0,
|
|
3877
|
+
(0, import_kit40.getBytesEncoder)().encode(
|
|
3860
3878
|
new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
|
|
3861
3879
|
)
|
|
3862
3880
|
]
|
|
3863
3881
|
});
|
|
3864
3882
|
}
|
|
3865
3883
|
if (!accounts.rewardTokenVault.value) {
|
|
3866
|
-
accounts.rewardTokenVault.value = await (0,
|
|
3884
|
+
accounts.rewardTokenVault.value = await (0, import_kit40.getProgramDerivedAddress)({
|
|
3867
3885
|
programAddress,
|
|
3868
3886
|
seeds: [
|
|
3869
|
-
(0,
|
|
3887
|
+
(0, import_kit40.getBytesEncoder)().encode(
|
|
3870
3888
|
new Uint8Array([
|
|
3871
3889
|
112,
|
|
3872
3890
|
111,
|
|
@@ -3887,8 +3905,8 @@ async function getInitializeRewardInstructionAsync(input, config) {
|
|
|
3887
3905
|
116
|
|
3888
3906
|
])
|
|
3889
3907
|
),
|
|
3890
|
-
(0,
|
|
3891
|
-
(0,
|
|
3908
|
+
(0, import_kit40.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
|
|
3909
|
+
(0, import_kit40.getAddressEncoder)().encode(
|
|
3892
3910
|
expectAddress(accounts.rewardTokenMint.value)
|
|
3893
3911
|
)
|
|
3894
3912
|
]
|
|
@@ -4003,7 +4021,7 @@ function parseInitializeRewardInstruction(instruction) {
|
|
|
4003
4021
|
}
|
|
4004
4022
|
|
|
4005
4023
|
// src/generated/instructions/openPositionWithToken22Nft.ts
|
|
4006
|
-
var
|
|
4024
|
+
var import_kit41 = require("@solana/kit");
|
|
4007
4025
|
var OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR = new Uint8Array([
|
|
4008
4026
|
77,
|
|
4009
4027
|
255,
|
|
@@ -4015,23 +4033,23 @@ var OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR = new Uint8Array([
|
|
|
4015
4033
|
46
|
|
4016
4034
|
]);
|
|
4017
4035
|
function getOpenPositionWithToken22NftDiscriminatorBytes() {
|
|
4018
|
-
return (0,
|
|
4036
|
+
return (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8).encode(
|
|
4019
4037
|
OPEN_POSITION_WITH_TOKEN22_NFT_DISCRIMINATOR
|
|
4020
4038
|
);
|
|
4021
4039
|
}
|
|
4022
4040
|
function getOpenPositionWithToken22NftInstructionDataEncoder() {
|
|
4023
|
-
return (0,
|
|
4024
|
-
(0,
|
|
4025
|
-
["discriminator", (0,
|
|
4026
|
-
["tickLowerIndex", (0,
|
|
4027
|
-
["tickUpperIndex", (0,
|
|
4028
|
-
["tickArrayLowerStartIndex", (0,
|
|
4029
|
-
["tickArrayUpperStartIndex", (0,
|
|
4030
|
-
["liquidity", (0,
|
|
4031
|
-
["amount0Max", (0,
|
|
4032
|
-
["amount1Max", (0,
|
|
4033
|
-
["withMetadata", (0,
|
|
4034
|
-
["baseFlag", (0,
|
|
4041
|
+
return (0, import_kit41.transformEncoder)(
|
|
4042
|
+
(0, import_kit41.getStructEncoder)([
|
|
4043
|
+
["discriminator", (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8)],
|
|
4044
|
+
["tickLowerIndex", (0, import_kit41.getI32Encoder)()],
|
|
4045
|
+
["tickUpperIndex", (0, import_kit41.getI32Encoder)()],
|
|
4046
|
+
["tickArrayLowerStartIndex", (0, import_kit41.getI32Encoder)()],
|
|
4047
|
+
["tickArrayUpperStartIndex", (0, import_kit41.getI32Encoder)()],
|
|
4048
|
+
["liquidity", (0, import_kit41.getU128Encoder)()],
|
|
4049
|
+
["amount0Max", (0, import_kit41.getU64Encoder)()],
|
|
4050
|
+
["amount1Max", (0, import_kit41.getU64Encoder)()],
|
|
4051
|
+
["withMetadata", (0, import_kit41.getBooleanEncoder)()],
|
|
4052
|
+
["baseFlag", (0, import_kit41.getOptionEncoder)((0, import_kit41.getBooleanEncoder)())]
|
|
4035
4053
|
]),
|
|
4036
4054
|
(value) => ({
|
|
4037
4055
|
...value,
|
|
@@ -4040,21 +4058,21 @@ function getOpenPositionWithToken22NftInstructionDataEncoder() {
|
|
|
4040
4058
|
);
|
|
4041
4059
|
}
|
|
4042
4060
|
function getOpenPositionWithToken22NftInstructionDataDecoder() {
|
|
4043
|
-
return (0,
|
|
4044
|
-
["discriminator", (0,
|
|
4045
|
-
["tickLowerIndex", (0,
|
|
4046
|
-
["tickUpperIndex", (0,
|
|
4047
|
-
["tickArrayLowerStartIndex", (0,
|
|
4048
|
-
["tickArrayUpperStartIndex", (0,
|
|
4049
|
-
["liquidity", (0,
|
|
4050
|
-
["amount0Max", (0,
|
|
4051
|
-
["amount1Max", (0,
|
|
4052
|
-
["withMetadata", (0,
|
|
4053
|
-
["baseFlag", (0,
|
|
4061
|
+
return (0, import_kit41.getStructDecoder)([
|
|
4062
|
+
["discriminator", (0, import_kit41.fixDecoderSize)((0, import_kit41.getBytesDecoder)(), 8)],
|
|
4063
|
+
["tickLowerIndex", (0, import_kit41.getI32Decoder)()],
|
|
4064
|
+
["tickUpperIndex", (0, import_kit41.getI32Decoder)()],
|
|
4065
|
+
["tickArrayLowerStartIndex", (0, import_kit41.getI32Decoder)()],
|
|
4066
|
+
["tickArrayUpperStartIndex", (0, import_kit41.getI32Decoder)()],
|
|
4067
|
+
["liquidity", (0, import_kit41.getU128Decoder)()],
|
|
4068
|
+
["amount0Max", (0, import_kit41.getU64Decoder)()],
|
|
4069
|
+
["amount1Max", (0, import_kit41.getU64Decoder)()],
|
|
4070
|
+
["withMetadata", (0, import_kit41.getBooleanDecoder)()],
|
|
4071
|
+
["baseFlag", (0, import_kit41.getOptionDecoder)((0, import_kit41.getBooleanDecoder)())]
|
|
4054
4072
|
]);
|
|
4055
4073
|
}
|
|
4056
4074
|
function getOpenPositionWithToken22NftInstructionDataCodec() {
|
|
4057
|
-
return (0,
|
|
4075
|
+
return (0, import_kit41.combineCodec)(
|
|
4058
4076
|
getOpenPositionWithToken22NftInstructionDataEncoder(),
|
|
4059
4077
|
getOpenPositionWithToken22NftInstructionDataDecoder()
|
|
4060
4078
|
);
|
|
@@ -4104,37 +4122,37 @@ async function getOpenPositionWithToken22NftInstructionAsync(input, config) {
|
|
|
4104
4122
|
const accounts = originalAccounts;
|
|
4105
4123
|
const args = { ...input };
|
|
4106
4124
|
if (!accounts.tickArrayLower.value) {
|
|
4107
|
-
accounts.tickArrayLower.value = await (0,
|
|
4125
|
+
accounts.tickArrayLower.value = await (0, import_kit41.getProgramDerivedAddress)({
|
|
4108
4126
|
programAddress,
|
|
4109
4127
|
seeds: [
|
|
4110
|
-
(0,
|
|
4128
|
+
(0, import_kit41.getBytesEncoder)().encode(
|
|
4111
4129
|
new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
|
|
4112
4130
|
),
|
|
4113
|
-
(0,
|
|
4114
|
-
(0,
|
|
4131
|
+
(0, import_kit41.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
|
|
4132
|
+
(0, import_kit41.getI32Encoder)().encode(expectSome(args.tickArrayLowerStartIndex))
|
|
4115
4133
|
]
|
|
4116
4134
|
});
|
|
4117
4135
|
}
|
|
4118
4136
|
if (!accounts.tickArrayUpper.value) {
|
|
4119
|
-
accounts.tickArrayUpper.value = await (0,
|
|
4137
|
+
accounts.tickArrayUpper.value = await (0, import_kit41.getProgramDerivedAddress)({
|
|
4120
4138
|
programAddress,
|
|
4121
4139
|
seeds: [
|
|
4122
|
-
(0,
|
|
4140
|
+
(0, import_kit41.getBytesEncoder)().encode(
|
|
4123
4141
|
new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
|
|
4124
4142
|
),
|
|
4125
|
-
(0,
|
|
4126
|
-
(0,
|
|
4143
|
+
(0, import_kit41.getAddressEncoder)().encode(expectAddress(accounts.poolState.value)),
|
|
4144
|
+
(0, import_kit41.getI32Encoder)().encode(expectSome(args.tickArrayUpperStartIndex))
|
|
4127
4145
|
]
|
|
4128
4146
|
});
|
|
4129
4147
|
}
|
|
4130
4148
|
if (!accounts.personalPosition.value) {
|
|
4131
|
-
accounts.personalPosition.value = await (0,
|
|
4149
|
+
accounts.personalPosition.value = await (0, import_kit41.getProgramDerivedAddress)({
|
|
4132
4150
|
programAddress,
|
|
4133
4151
|
seeds: [
|
|
4134
|
-
(0,
|
|
4152
|
+
(0, import_kit41.getBytesEncoder)().encode(
|
|
4135
4153
|
new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
|
|
4136
4154
|
),
|
|
4137
|
-
(0,
|
|
4155
|
+
(0, import_kit41.getAddressEncoder)().encode(
|
|
4138
4156
|
expectAddress(accounts.positionNftMint.value)
|
|
4139
4157
|
)
|
|
4140
4158
|
]
|
|
@@ -4315,7 +4333,7 @@ function parseOpenPositionWithToken22NftInstruction(instruction) {
|
|
|
4315
4333
|
}
|
|
4316
4334
|
|
|
4317
4335
|
// src/generated/instructions/setRewardParams.ts
|
|
4318
|
-
var
|
|
4336
|
+
var import_kit42 = require("@solana/kit");
|
|
4319
4337
|
var SET_REWARD_PARAMS_DISCRIMINATOR = new Uint8Array([
|
|
4320
4338
|
112,
|
|
4321
4339
|
52,
|
|
@@ -4327,33 +4345,33 @@ var SET_REWARD_PARAMS_DISCRIMINATOR = new Uint8Array([
|
|
|
4327
4345
|
137
|
|
4328
4346
|
]);
|
|
4329
4347
|
function getSetRewardParamsDiscriminatorBytes() {
|
|
4330
|
-
return (0,
|
|
4348
|
+
return (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8).encode(
|
|
4331
4349
|
SET_REWARD_PARAMS_DISCRIMINATOR
|
|
4332
4350
|
);
|
|
4333
4351
|
}
|
|
4334
4352
|
function getSetRewardParamsInstructionDataEncoder() {
|
|
4335
|
-
return (0,
|
|
4336
|
-
(0,
|
|
4337
|
-
["discriminator", (0,
|
|
4338
|
-
["rewardIndex", (0,
|
|
4339
|
-
["emissionsPerSecondX64", (0,
|
|
4340
|
-
["openTime", (0,
|
|
4341
|
-
["endTime", (0,
|
|
4353
|
+
return (0, import_kit42.transformEncoder)(
|
|
4354
|
+
(0, import_kit42.getStructEncoder)([
|
|
4355
|
+
["discriminator", (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8)],
|
|
4356
|
+
["rewardIndex", (0, import_kit42.getU8Encoder)()],
|
|
4357
|
+
["emissionsPerSecondX64", (0, import_kit42.getU128Encoder)()],
|
|
4358
|
+
["openTime", (0, import_kit42.getU64Encoder)()],
|
|
4359
|
+
["endTime", (0, import_kit42.getU64Encoder)()]
|
|
4342
4360
|
]),
|
|
4343
4361
|
(value) => ({ ...value, discriminator: SET_REWARD_PARAMS_DISCRIMINATOR })
|
|
4344
4362
|
);
|
|
4345
4363
|
}
|
|
4346
4364
|
function getSetRewardParamsInstructionDataDecoder() {
|
|
4347
|
-
return (0,
|
|
4348
|
-
["discriminator", (0,
|
|
4349
|
-
["rewardIndex", (0,
|
|
4350
|
-
["emissionsPerSecondX64", (0,
|
|
4351
|
-
["openTime", (0,
|
|
4352
|
-
["endTime", (0,
|
|
4365
|
+
return (0, import_kit42.getStructDecoder)([
|
|
4366
|
+
["discriminator", (0, import_kit42.fixDecoderSize)((0, import_kit42.getBytesDecoder)(), 8)],
|
|
4367
|
+
["rewardIndex", (0, import_kit42.getU8Decoder)()],
|
|
4368
|
+
["emissionsPerSecondX64", (0, import_kit42.getU128Decoder)()],
|
|
4369
|
+
["openTime", (0, import_kit42.getU64Decoder)()],
|
|
4370
|
+
["endTime", (0, import_kit42.getU64Decoder)()]
|
|
4353
4371
|
]);
|
|
4354
4372
|
}
|
|
4355
4373
|
function getSetRewardParamsInstructionDataCodec() {
|
|
4356
|
-
return (0,
|
|
4374
|
+
return (0, import_kit42.combineCodec)(
|
|
4357
4375
|
getSetRewardParamsInstructionDataEncoder(),
|
|
4358
4376
|
getSetRewardParamsInstructionDataDecoder()
|
|
4359
4377
|
);
|
|
@@ -4374,10 +4392,10 @@ async function getSetRewardParamsInstructionAsync(input, config) {
|
|
|
4374
4392
|
const accounts = originalAccounts;
|
|
4375
4393
|
const args = { ...input };
|
|
4376
4394
|
if (!accounts.operationState.value) {
|
|
4377
|
-
accounts.operationState.value = await (0,
|
|
4395
|
+
accounts.operationState.value = await (0, import_kit42.getProgramDerivedAddress)({
|
|
4378
4396
|
programAddress,
|
|
4379
4397
|
seeds: [
|
|
4380
|
-
(0,
|
|
4398
|
+
(0, import_kit42.getBytesEncoder)().encode(
|
|
4381
4399
|
new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
|
|
4382
4400
|
)
|
|
4383
4401
|
]
|
|
@@ -4467,7 +4485,7 @@ function parseSetRewardParamsInstruction(instruction) {
|
|
|
4467
4485
|
}
|
|
4468
4486
|
|
|
4469
4487
|
// src/generated/instructions/swapRouterBaseIn.ts
|
|
4470
|
-
var
|
|
4488
|
+
var import_kit43 = require("@solana/kit");
|
|
4471
4489
|
var SWAP_ROUTER_BASE_IN_DISCRIMINATOR = new Uint8Array([
|
|
4472
4490
|
69,
|
|
4473
4491
|
125,
|
|
@@ -4479,29 +4497,29 @@ var SWAP_ROUTER_BASE_IN_DISCRIMINATOR = new Uint8Array([
|
|
|
4479
4497
|
196
|
|
4480
4498
|
]);
|
|
4481
4499
|
function getSwapRouterBaseInDiscriminatorBytes() {
|
|
4482
|
-
return (0,
|
|
4500
|
+
return (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8).encode(
|
|
4483
4501
|
SWAP_ROUTER_BASE_IN_DISCRIMINATOR
|
|
4484
4502
|
);
|
|
4485
4503
|
}
|
|
4486
4504
|
function getSwapRouterBaseInInstructionDataEncoder() {
|
|
4487
|
-
return (0,
|
|
4488
|
-
(0,
|
|
4489
|
-
["discriminator", (0,
|
|
4490
|
-
["amountIn", (0,
|
|
4491
|
-
["amountOutMinimum", (0,
|
|
4505
|
+
return (0, import_kit43.transformEncoder)(
|
|
4506
|
+
(0, import_kit43.getStructEncoder)([
|
|
4507
|
+
["discriminator", (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8)],
|
|
4508
|
+
["amountIn", (0, import_kit43.getU64Encoder)()],
|
|
4509
|
+
["amountOutMinimum", (0, import_kit43.getU64Encoder)()]
|
|
4492
4510
|
]),
|
|
4493
4511
|
(value) => ({ ...value, discriminator: SWAP_ROUTER_BASE_IN_DISCRIMINATOR })
|
|
4494
4512
|
);
|
|
4495
4513
|
}
|
|
4496
4514
|
function getSwapRouterBaseInInstructionDataDecoder() {
|
|
4497
|
-
return (0,
|
|
4498
|
-
["discriminator", (0,
|
|
4499
|
-
["amountIn", (0,
|
|
4500
|
-
["amountOutMinimum", (0,
|
|
4515
|
+
return (0, import_kit43.getStructDecoder)([
|
|
4516
|
+
["discriminator", (0, import_kit43.fixDecoderSize)((0, import_kit43.getBytesDecoder)(), 8)],
|
|
4517
|
+
["amountIn", (0, import_kit43.getU64Decoder)()],
|
|
4518
|
+
["amountOutMinimum", (0, import_kit43.getU64Decoder)()]
|
|
4501
4519
|
]);
|
|
4502
4520
|
}
|
|
4503
4521
|
function getSwapRouterBaseInInstructionDataCodec() {
|
|
4504
|
-
return (0,
|
|
4522
|
+
return (0, import_kit43.combineCodec)(
|
|
4505
4523
|
getSwapRouterBaseInInstructionDataEncoder(),
|
|
4506
4524
|
getSwapRouterBaseInInstructionDataDecoder()
|
|
4507
4525
|
);
|
|
@@ -4574,7 +4592,7 @@ function parseSwapRouterBaseInInstruction(instruction) {
|
|
|
4574
4592
|
}
|
|
4575
4593
|
|
|
4576
4594
|
// src/generated/instructions/swapV2.ts
|
|
4577
|
-
var
|
|
4595
|
+
var import_kit44 = require("@solana/kit");
|
|
4578
4596
|
var SWAP_V2_DISCRIMINATOR = new Uint8Array([
|
|
4579
4597
|
43,
|
|
4580
4598
|
4,
|
|
@@ -4586,31 +4604,31 @@ var SWAP_V2_DISCRIMINATOR = new Uint8Array([
|
|
|
4586
4604
|
98
|
|
4587
4605
|
]);
|
|
4588
4606
|
function getSwapV2DiscriminatorBytes() {
|
|
4589
|
-
return (0,
|
|
4607
|
+
return (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8).encode(SWAP_V2_DISCRIMINATOR);
|
|
4590
4608
|
}
|
|
4591
4609
|
function getSwapV2InstructionDataEncoder() {
|
|
4592
|
-
return (0,
|
|
4593
|
-
(0,
|
|
4594
|
-
["discriminator", (0,
|
|
4595
|
-
["amount", (0,
|
|
4596
|
-
["otherAmountThreshold", (0,
|
|
4597
|
-
["sqrtPriceLimitX64", (0,
|
|
4598
|
-
["isBaseInput", (0,
|
|
4610
|
+
return (0, import_kit44.transformEncoder)(
|
|
4611
|
+
(0, import_kit44.getStructEncoder)([
|
|
4612
|
+
["discriminator", (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8)],
|
|
4613
|
+
["amount", (0, import_kit44.getU64Encoder)()],
|
|
4614
|
+
["otherAmountThreshold", (0, import_kit44.getU64Encoder)()],
|
|
4615
|
+
["sqrtPriceLimitX64", (0, import_kit44.getU128Encoder)()],
|
|
4616
|
+
["isBaseInput", (0, import_kit44.getBooleanEncoder)()]
|
|
4599
4617
|
]),
|
|
4600
4618
|
(value) => ({ ...value, discriminator: SWAP_V2_DISCRIMINATOR })
|
|
4601
4619
|
);
|
|
4602
4620
|
}
|
|
4603
4621
|
function getSwapV2InstructionDataDecoder() {
|
|
4604
|
-
return (0,
|
|
4605
|
-
["discriminator", (0,
|
|
4606
|
-
["amount", (0,
|
|
4607
|
-
["otherAmountThreshold", (0,
|
|
4608
|
-
["sqrtPriceLimitX64", (0,
|
|
4609
|
-
["isBaseInput", (0,
|
|
4622
|
+
return (0, import_kit44.getStructDecoder)([
|
|
4623
|
+
["discriminator", (0, import_kit44.fixDecoderSize)((0, import_kit44.getBytesDecoder)(), 8)],
|
|
4624
|
+
["amount", (0, import_kit44.getU64Decoder)()],
|
|
4625
|
+
["otherAmountThreshold", (0, import_kit44.getU64Decoder)()],
|
|
4626
|
+
["sqrtPriceLimitX64", (0, import_kit44.getU128Decoder)()],
|
|
4627
|
+
["isBaseInput", (0, import_kit44.getBooleanDecoder)()]
|
|
4610
4628
|
]);
|
|
4611
4629
|
}
|
|
4612
4630
|
function getSwapV2InstructionDataCodec() {
|
|
4613
|
-
return (0,
|
|
4631
|
+
return (0, import_kit44.combineCodec)(
|
|
4614
4632
|
getSwapV2InstructionDataEncoder(),
|
|
4615
4633
|
getSwapV2InstructionDataDecoder()
|
|
4616
4634
|
);
|
|
@@ -4713,7 +4731,7 @@ function parseSwapV2Instruction(instruction) {
|
|
|
4713
4731
|
}
|
|
4714
4732
|
|
|
4715
4733
|
// src/generated/instructions/transferRewardOwner.ts
|
|
4716
|
-
var
|
|
4734
|
+
var import_kit45 = require("@solana/kit");
|
|
4717
4735
|
var TRANSFER_REWARD_OWNER_DISCRIMINATOR = new Uint8Array([
|
|
4718
4736
|
7,
|
|
4719
4737
|
22,
|
|
@@ -4725,15 +4743,15 @@ var TRANSFER_REWARD_OWNER_DISCRIMINATOR = new Uint8Array([
|
|
|
4725
4743
|
121
|
|
4726
4744
|
]);
|
|
4727
4745
|
function getTransferRewardOwnerDiscriminatorBytes() {
|
|
4728
|
-
return (0,
|
|
4746
|
+
return (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8).encode(
|
|
4729
4747
|
TRANSFER_REWARD_OWNER_DISCRIMINATOR
|
|
4730
4748
|
);
|
|
4731
4749
|
}
|
|
4732
4750
|
function getTransferRewardOwnerInstructionDataEncoder() {
|
|
4733
|
-
return (0,
|
|
4734
|
-
(0,
|
|
4735
|
-
["discriminator", (0,
|
|
4736
|
-
["newOwner", (0,
|
|
4751
|
+
return (0, import_kit45.transformEncoder)(
|
|
4752
|
+
(0, import_kit45.getStructEncoder)([
|
|
4753
|
+
["discriminator", (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8)],
|
|
4754
|
+
["newOwner", (0, import_kit45.getAddressEncoder)()]
|
|
4737
4755
|
]),
|
|
4738
4756
|
(value) => ({
|
|
4739
4757
|
...value,
|
|
@@ -4742,13 +4760,13 @@ function getTransferRewardOwnerInstructionDataEncoder() {
|
|
|
4742
4760
|
);
|
|
4743
4761
|
}
|
|
4744
4762
|
function getTransferRewardOwnerInstructionDataDecoder() {
|
|
4745
|
-
return (0,
|
|
4746
|
-
["discriminator", (0,
|
|
4747
|
-
["newOwner", (0,
|
|
4763
|
+
return (0, import_kit45.getStructDecoder)([
|
|
4764
|
+
["discriminator", (0, import_kit45.fixDecoderSize)((0, import_kit45.getBytesDecoder)(), 8)],
|
|
4765
|
+
["newOwner", (0, import_kit45.getAddressDecoder)()]
|
|
4748
4766
|
]);
|
|
4749
4767
|
}
|
|
4750
4768
|
function getTransferRewardOwnerInstructionDataCodec() {
|
|
4751
|
-
return (0,
|
|
4769
|
+
return (0, import_kit45.combineCodec)(
|
|
4752
4770
|
getTransferRewardOwnerInstructionDataEncoder(),
|
|
4753
4771
|
getTransferRewardOwnerInstructionDataDecoder()
|
|
4754
4772
|
);
|
|
@@ -4796,7 +4814,7 @@ function parseTransferRewardOwnerInstruction(instruction) {
|
|
|
4796
4814
|
}
|
|
4797
4815
|
|
|
4798
4816
|
// src/generated/instructions/updateAmmConfig.ts
|
|
4799
|
-
var
|
|
4817
|
+
var import_kit46 = require("@solana/kit");
|
|
4800
4818
|
var UPDATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
4801
4819
|
49,
|
|
4802
4820
|
60,
|
|
@@ -4808,29 +4826,29 @@ var UPDATE_AMM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
4808
4826
|
200
|
|
4809
4827
|
]);
|
|
4810
4828
|
function getUpdateAmmConfigDiscriminatorBytes() {
|
|
4811
|
-
return (0,
|
|
4829
|
+
return (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8).encode(
|
|
4812
4830
|
UPDATE_AMM_CONFIG_DISCRIMINATOR
|
|
4813
4831
|
);
|
|
4814
4832
|
}
|
|
4815
4833
|
function getUpdateAmmConfigInstructionDataEncoder() {
|
|
4816
|
-
return (0,
|
|
4817
|
-
(0,
|
|
4818
|
-
["discriminator", (0,
|
|
4819
|
-
["param", (0,
|
|
4820
|
-
["value", (0,
|
|
4834
|
+
return (0, import_kit46.transformEncoder)(
|
|
4835
|
+
(0, import_kit46.getStructEncoder)([
|
|
4836
|
+
["discriminator", (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8)],
|
|
4837
|
+
["param", (0, import_kit46.getU8Encoder)()],
|
|
4838
|
+
["value", (0, import_kit46.getU32Encoder)()]
|
|
4821
4839
|
]),
|
|
4822
4840
|
(value) => ({ ...value, discriminator: UPDATE_AMM_CONFIG_DISCRIMINATOR })
|
|
4823
4841
|
);
|
|
4824
4842
|
}
|
|
4825
4843
|
function getUpdateAmmConfigInstructionDataDecoder() {
|
|
4826
|
-
return (0,
|
|
4827
|
-
["discriminator", (0,
|
|
4828
|
-
["param", (0,
|
|
4829
|
-
["value", (0,
|
|
4844
|
+
return (0, import_kit46.getStructDecoder)([
|
|
4845
|
+
["discriminator", (0, import_kit46.fixDecoderSize)((0, import_kit46.getBytesDecoder)(), 8)],
|
|
4846
|
+
["param", (0, import_kit46.getU8Decoder)()],
|
|
4847
|
+
["value", (0, import_kit46.getU32Decoder)()]
|
|
4830
4848
|
]);
|
|
4831
4849
|
}
|
|
4832
4850
|
function getUpdateAmmConfigInstructionDataCodec() {
|
|
4833
|
-
return (0,
|
|
4851
|
+
return (0, import_kit46.combineCodec)(
|
|
4834
4852
|
getUpdateAmmConfigInstructionDataEncoder(),
|
|
4835
4853
|
getUpdateAmmConfigInstructionDataDecoder()
|
|
4836
4854
|
);
|
|
@@ -4876,7 +4894,7 @@ function parseUpdateAmmConfigInstruction(instruction) {
|
|
|
4876
4894
|
}
|
|
4877
4895
|
|
|
4878
4896
|
// src/generated/instructions/updateOperationAccount.ts
|
|
4879
|
-
var
|
|
4897
|
+
var import_kit47 = require("@solana/kit");
|
|
4880
4898
|
var UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4881
4899
|
127,
|
|
4882
4900
|
70,
|
|
@@ -4888,16 +4906,16 @@ var UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
4888
4906
|
7
|
|
4889
4907
|
]);
|
|
4890
4908
|
function getUpdateOperationAccountDiscriminatorBytes() {
|
|
4891
|
-
return (0,
|
|
4909
|
+
return (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8).encode(
|
|
4892
4910
|
UPDATE_OPERATION_ACCOUNT_DISCRIMINATOR
|
|
4893
4911
|
);
|
|
4894
4912
|
}
|
|
4895
4913
|
function getUpdateOperationAccountInstructionDataEncoder() {
|
|
4896
|
-
return (0,
|
|
4897
|
-
(0,
|
|
4898
|
-
["discriminator", (0,
|
|
4899
|
-
["param", (0,
|
|
4900
|
-
["keys", (0,
|
|
4914
|
+
return (0, import_kit47.transformEncoder)(
|
|
4915
|
+
(0, import_kit47.getStructEncoder)([
|
|
4916
|
+
["discriminator", (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8)],
|
|
4917
|
+
["param", (0, import_kit47.getU8Encoder)()],
|
|
4918
|
+
["keys", (0, import_kit47.getArrayEncoder)((0, import_kit47.getAddressEncoder)())]
|
|
4901
4919
|
]),
|
|
4902
4920
|
(value) => ({
|
|
4903
4921
|
...value,
|
|
@@ -4906,14 +4924,14 @@ function getUpdateOperationAccountInstructionDataEncoder() {
|
|
|
4906
4924
|
);
|
|
4907
4925
|
}
|
|
4908
4926
|
function getUpdateOperationAccountInstructionDataDecoder() {
|
|
4909
|
-
return (0,
|
|
4910
|
-
["discriminator", (0,
|
|
4911
|
-
["param", (0,
|
|
4912
|
-
["keys", (0,
|
|
4927
|
+
return (0, import_kit47.getStructDecoder)([
|
|
4928
|
+
["discriminator", (0, import_kit47.fixDecoderSize)((0, import_kit47.getBytesDecoder)(), 8)],
|
|
4929
|
+
["param", (0, import_kit47.getU8Decoder)()],
|
|
4930
|
+
["keys", (0, import_kit47.getArrayDecoder)((0, import_kit47.getAddressDecoder)())]
|
|
4913
4931
|
]);
|
|
4914
4932
|
}
|
|
4915
4933
|
function getUpdateOperationAccountInstructionDataCodec() {
|
|
4916
|
-
return (0,
|
|
4934
|
+
return (0, import_kit47.combineCodec)(
|
|
4917
4935
|
getUpdateOperationAccountInstructionDataEncoder(),
|
|
4918
4936
|
getUpdateOperationAccountInstructionDataDecoder()
|
|
4919
4937
|
);
|
|
@@ -4931,10 +4949,10 @@ async function getUpdateOperationAccountInstructionAsync(input, config) {
|
|
|
4931
4949
|
accounts.owner.value = "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2";
|
|
4932
4950
|
}
|
|
4933
4951
|
if (!accounts.operationState.value) {
|
|
4934
|
-
accounts.operationState.value = await (0,
|
|
4952
|
+
accounts.operationState.value = await (0, import_kit47.getProgramDerivedAddress)({
|
|
4935
4953
|
programAddress,
|
|
4936
4954
|
seeds: [
|
|
4937
|
-
(0,
|
|
4955
|
+
(0, import_kit47.getBytesEncoder)().encode(
|
|
4938
4956
|
new Uint8Array([111, 112, 101, 114, 97, 116, 105, 111, 110])
|
|
4939
4957
|
)
|
|
4940
4958
|
]
|
|
@@ -5008,7 +5026,7 @@ function parseUpdateOperationAccountInstruction(instruction) {
|
|
|
5008
5026
|
}
|
|
5009
5027
|
|
|
5010
5028
|
// src/generated/instructions/updatePoolStatus.ts
|
|
5011
|
-
var
|
|
5029
|
+
var import_kit48 = require("@solana/kit");
|
|
5012
5030
|
var UPDATE_POOL_STATUS_DISCRIMINATOR = new Uint8Array([
|
|
5013
5031
|
130,
|
|
5014
5032
|
87,
|
|
@@ -5020,27 +5038,27 @@ var UPDATE_POOL_STATUS_DISCRIMINATOR = new Uint8Array([
|
|
|
5020
5038
|
123
|
|
5021
5039
|
]);
|
|
5022
5040
|
function getUpdatePoolStatusDiscriminatorBytes() {
|
|
5023
|
-
return (0,
|
|
5041
|
+
return (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8).encode(
|
|
5024
5042
|
UPDATE_POOL_STATUS_DISCRIMINATOR
|
|
5025
5043
|
);
|
|
5026
5044
|
}
|
|
5027
5045
|
function getUpdatePoolStatusInstructionDataEncoder() {
|
|
5028
|
-
return (0,
|
|
5029
|
-
(0,
|
|
5030
|
-
["discriminator", (0,
|
|
5031
|
-
["status", (0,
|
|
5046
|
+
return (0, import_kit48.transformEncoder)(
|
|
5047
|
+
(0, import_kit48.getStructEncoder)([
|
|
5048
|
+
["discriminator", (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8)],
|
|
5049
|
+
["status", (0, import_kit48.getU8Encoder)()]
|
|
5032
5050
|
]),
|
|
5033
5051
|
(value) => ({ ...value, discriminator: UPDATE_POOL_STATUS_DISCRIMINATOR })
|
|
5034
5052
|
);
|
|
5035
5053
|
}
|
|
5036
5054
|
function getUpdatePoolStatusInstructionDataDecoder() {
|
|
5037
|
-
return (0,
|
|
5038
|
-
["discriminator", (0,
|
|
5039
|
-
["status", (0,
|
|
5055
|
+
return (0, import_kit48.getStructDecoder)([
|
|
5056
|
+
["discriminator", (0, import_kit48.fixDecoderSize)((0, import_kit48.getBytesDecoder)(), 8)],
|
|
5057
|
+
["status", (0, import_kit48.getU8Decoder)()]
|
|
5040
5058
|
]);
|
|
5041
5059
|
}
|
|
5042
5060
|
function getUpdatePoolStatusInstructionDataCodec() {
|
|
5043
|
-
return (0,
|
|
5061
|
+
return (0, import_kit48.combineCodec)(
|
|
5044
5062
|
getUpdatePoolStatusInstructionDataEncoder(),
|
|
5045
5063
|
getUpdatePoolStatusInstructionDataDecoder()
|
|
5046
5064
|
);
|
|
@@ -5086,7 +5104,7 @@ function parseUpdatePoolStatusInstruction(instruction) {
|
|
|
5086
5104
|
}
|
|
5087
5105
|
|
|
5088
5106
|
// src/generated/instructions/updateRewardInfos.ts
|
|
5089
|
-
var
|
|
5107
|
+
var import_kit49 = require("@solana/kit");
|
|
5090
5108
|
var UPDATE_REWARD_INFOS_DISCRIMINATOR = new Uint8Array([
|
|
5091
5109
|
163,
|
|
5092
5110
|
172,
|
|
@@ -5098,23 +5116,23 @@ var UPDATE_REWARD_INFOS_DISCRIMINATOR = new Uint8Array([
|
|
|
5098
5116
|
223
|
|
5099
5117
|
]);
|
|
5100
5118
|
function getUpdateRewardInfosDiscriminatorBytes() {
|
|
5101
|
-
return (0,
|
|
5119
|
+
return (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8).encode(
|
|
5102
5120
|
UPDATE_REWARD_INFOS_DISCRIMINATOR
|
|
5103
5121
|
);
|
|
5104
5122
|
}
|
|
5105
5123
|
function getUpdateRewardInfosInstructionDataEncoder() {
|
|
5106
|
-
return (0,
|
|
5107
|
-
(0,
|
|
5124
|
+
return (0, import_kit49.transformEncoder)(
|
|
5125
|
+
(0, import_kit49.getStructEncoder)([["discriminator", (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8)]]),
|
|
5108
5126
|
(value) => ({ ...value, discriminator: UPDATE_REWARD_INFOS_DISCRIMINATOR })
|
|
5109
5127
|
);
|
|
5110
5128
|
}
|
|
5111
5129
|
function getUpdateRewardInfosInstructionDataDecoder() {
|
|
5112
|
-
return (0,
|
|
5113
|
-
["discriminator", (0,
|
|
5130
|
+
return (0, import_kit49.getStructDecoder)([
|
|
5131
|
+
["discriminator", (0, import_kit49.fixDecoderSize)((0, import_kit49.getBytesDecoder)(), 8)]
|
|
5114
5132
|
]);
|
|
5115
5133
|
}
|
|
5116
5134
|
function getUpdateRewardInfosInstructionDataCodec() {
|
|
5117
|
-
return (0,
|
|
5135
|
+
return (0, import_kit49.combineCodec)(
|
|
5118
5136
|
getUpdateRewardInfosInstructionDataEncoder(),
|
|
5119
5137
|
getUpdateRewardInfosInstructionDataDecoder()
|
|
5120
5138
|
);
|
|
@@ -5721,9 +5739,9 @@ var LiquidityMath = class _LiquidityMath {
|
|
|
5721
5739
|
};
|
|
5722
5740
|
|
|
5723
5741
|
// src/utils/pda.ts
|
|
5724
|
-
var
|
|
5725
|
-
var addressEncoder = (0,
|
|
5726
|
-
var i32Encoder = (0,
|
|
5742
|
+
var import_kit50 = require("@solana/kit");
|
|
5743
|
+
var addressEncoder = (0, import_kit50.getAddressEncoder)();
|
|
5744
|
+
var i32Encoder = (0, import_kit50.getI32Encoder)({ endian: import_kit50.Endian.Big });
|
|
5727
5745
|
var PdaUtils = class {
|
|
5728
5746
|
/**
|
|
5729
5747
|
* Derive pool state PDA
|
|
@@ -5733,7 +5751,7 @@ var PdaUtils = class {
|
|
|
5733
5751
|
* @returns Pool state PDA
|
|
5734
5752
|
*/
|
|
5735
5753
|
static async getPoolStatePda(ammConfig, tokenMintA, tokenMintB) {
|
|
5736
|
-
return await (0,
|
|
5754
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5737
5755
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5738
5756
|
seeds: [
|
|
5739
5757
|
PDA_SEEDS.POOL_STATE,
|
|
@@ -5749,9 +5767,9 @@ var PdaUtils = class {
|
|
|
5749
5767
|
* @returns AMM config PDA
|
|
5750
5768
|
*/
|
|
5751
5769
|
static async getAmmConfigPda(index) {
|
|
5752
|
-
return await (0,
|
|
5770
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5753
5771
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5754
|
-
seeds: [PDA_SEEDS.AMM_CONFIG, (0,
|
|
5772
|
+
seeds: [PDA_SEEDS.AMM_CONFIG, (0, import_kit50.getU16Encoder)().encode(index)]
|
|
5755
5773
|
});
|
|
5756
5774
|
}
|
|
5757
5775
|
/**
|
|
@@ -5760,7 +5778,7 @@ var PdaUtils = class {
|
|
|
5760
5778
|
* @returns Position state PDA
|
|
5761
5779
|
*/
|
|
5762
5780
|
static async getPositionStatePda(nftMint) {
|
|
5763
|
-
return await (0,
|
|
5781
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5764
5782
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5765
5783
|
seeds: [PDA_SEEDS.POSITION_STATE, addressEncoder.encode(nftMint)]
|
|
5766
5784
|
});
|
|
@@ -5772,7 +5790,7 @@ var PdaUtils = class {
|
|
|
5772
5790
|
* @returns Tick array state PDA
|
|
5773
5791
|
*/
|
|
5774
5792
|
static async getTickArrayStatePda(poolState, startTickIndex) {
|
|
5775
|
-
return await (0,
|
|
5793
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5776
5794
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5777
5795
|
seeds: [
|
|
5778
5796
|
PDA_SEEDS.TICK_ARRAY_STATE,
|
|
@@ -5787,13 +5805,13 @@ var PdaUtils = class {
|
|
|
5787
5805
|
* @returns Observation state PDA
|
|
5788
5806
|
*/
|
|
5789
5807
|
static async getObservationStatePda(poolState) {
|
|
5790
|
-
return await (0,
|
|
5808
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5791
5809
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5792
5810
|
seeds: [PDA_SEEDS.OBSERVATION_STATE, addressEncoder.encode(poolState)]
|
|
5793
5811
|
});
|
|
5794
5812
|
}
|
|
5795
5813
|
static async getPoolVaultIdPda(poolAddress, vaultAddress) {
|
|
5796
|
-
return await (0,
|
|
5814
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5797
5815
|
seeds: [
|
|
5798
5816
|
PDA_SEEDS.POOL_VAULT,
|
|
5799
5817
|
addressEncoder.encode(poolAddress),
|
|
@@ -5808,7 +5826,7 @@ var PdaUtils = class {
|
|
|
5808
5826
|
* @returns Tick array bitmap extension PDA
|
|
5809
5827
|
*/
|
|
5810
5828
|
static async getTickArrayBitmapExtensionPda(poolState) {
|
|
5811
|
-
return await (0,
|
|
5829
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5812
5830
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5813
5831
|
seeds: [PDA_SEEDS.BITMAP_EXTENSION, addressEncoder.encode(poolState)]
|
|
5814
5832
|
});
|
|
@@ -5860,7 +5878,7 @@ var PdaUtils = class {
|
|
|
5860
5878
|
* @returns Protocol position state PDA
|
|
5861
5879
|
*/
|
|
5862
5880
|
static async getProtocolPositionStatePda(poolState, tickLowerIndex, tickUpperIndex) {
|
|
5863
|
-
return await (0,
|
|
5881
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5864
5882
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5865
5883
|
seeds: [
|
|
5866
5884
|
PDA_SEEDS.POSITION_STATE,
|
|
@@ -5876,20 +5894,20 @@ var PdaUtils = class {
|
|
|
5876
5894
|
* @returns Operation state PDA
|
|
5877
5895
|
*/
|
|
5878
5896
|
static async getOperationStatePda(poolState) {
|
|
5879
|
-
return await (0,
|
|
5897
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5880
5898
|
programAddress: STABBLE_CLMM_PROGRAM_ID,
|
|
5881
5899
|
seeds: [PDA_SEEDS.OPERATION, addressEncoder.encode(poolState)]
|
|
5882
5900
|
});
|
|
5883
5901
|
}
|
|
5884
5902
|
};
|
|
5885
5903
|
async function getMetadataPda(mint) {
|
|
5886
|
-
return await (0,
|
|
5904
|
+
return await (0, import_kit50.getProgramDerivedAddress)({
|
|
5887
5905
|
seeds: [
|
|
5888
5906
|
"metadata",
|
|
5889
|
-
addressEncoder.encode((0,
|
|
5907
|
+
addressEncoder.encode((0, import_kit50.address)(METADATA_PROGRAM_ID)),
|
|
5890
5908
|
addressEncoder.encode(mint)
|
|
5891
5909
|
],
|
|
5892
|
-
programAddress: (0,
|
|
5910
|
+
programAddress: (0, import_kit50.address)(METADATA_PROGRAM_ID)
|
|
5893
5911
|
});
|
|
5894
5912
|
}
|
|
5895
5913
|
|
|
@@ -6947,7 +6965,7 @@ var PoolUtils = class {
|
|
|
6947
6965
|
};
|
|
6948
6966
|
|
|
6949
6967
|
// src/utils/index.ts
|
|
6950
|
-
var
|
|
6968
|
+
var import_kit51 = require("@solana/kit");
|
|
6951
6969
|
function validateAddress(address5, name = "address") {
|
|
6952
6970
|
if (!address5 || address5.length === 0) {
|
|
6953
6971
|
throw new ClmmError(
|
|
@@ -7019,7 +7037,7 @@ function isValidSolanaAddress(address5) {
|
|
|
7019
7037
|
}
|
|
7020
7038
|
}
|
|
7021
7039
|
function addresstoBytes(address5) {
|
|
7022
|
-
const encoder = (0,
|
|
7040
|
+
const encoder = (0, import_kit51.getAddressEncoder)();
|
|
7023
7041
|
return encoder.encode(address5);
|
|
7024
7042
|
}
|
|
7025
7043
|
function getFakeSigner(address5) {
|
|
@@ -7109,7 +7127,7 @@ var Clmm = class {
|
|
|
7109
7127
|
};
|
|
7110
7128
|
|
|
7111
7129
|
// src/pool-manager.ts
|
|
7112
|
-
var
|
|
7130
|
+
var import_kit52 = require("@solana/kit");
|
|
7113
7131
|
var import_token2 = require("@solana-program/token");
|
|
7114
7132
|
var import_bn5 = __toESM(require("bn.js"));
|
|
7115
7133
|
var import_decimal3 = __toESM(require("decimal.js"));
|
|
@@ -7148,8 +7166,8 @@ var PoolManager = class {
|
|
|
7148
7166
|
mintADecimals,
|
|
7149
7167
|
mintBDecimals
|
|
7150
7168
|
} = params;
|
|
7151
|
-
const addressA = (0,
|
|
7152
|
-
const addressB = (0,
|
|
7169
|
+
const addressA = (0, import_kit52.address)(tokenMintA);
|
|
7170
|
+
const addressB = (0, import_kit52.address)(tokenMintB);
|
|
7153
7171
|
const isAFirst = new import_bn5.default(Buffer.from(addressB)).gt(
|
|
7154
7172
|
new import_bn5.default(Buffer.from(addressA))
|
|
7155
7173
|
);
|
|
@@ -7375,7 +7393,7 @@ var PoolManager = class {
|
|
|
7375
7393
|
};
|
|
7376
7394
|
|
|
7377
7395
|
// src/position-manager.ts
|
|
7378
|
-
var
|
|
7396
|
+
var import_kit53 = require("@solana/kit");
|
|
7379
7397
|
var import_token4 = require("@solana-program/token");
|
|
7380
7398
|
var import_token_20222 = require("@solana-program/token-2022");
|
|
7381
7399
|
var import_bn6 = __toESM(require("bn.js"));
|
|
@@ -7397,11 +7415,11 @@ var PositionManager = class {
|
|
|
7397
7415
|
buildWrapSolInstructions(params) {
|
|
7398
7416
|
const { payer, ata, owner, amount } = params;
|
|
7399
7417
|
return [
|
|
7400
|
-
(0, import_token4.
|
|
7418
|
+
(0, import_token4.getCreateAssociatedTokenIdempotentInstruction)({
|
|
7401
7419
|
payer,
|
|
7402
7420
|
ata,
|
|
7403
7421
|
owner,
|
|
7404
|
-
mint: (0,
|
|
7422
|
+
mint: (0, import_kit53.address)(NATIVE_MINT.toString()),
|
|
7405
7423
|
tokenProgram: import_token4.TOKEN_PROGRAM_ADDRESS,
|
|
7406
7424
|
systemProgram: SYSTEM_PROGRAM_ID
|
|
7407
7425
|
}),
|
|
@@ -7436,7 +7454,7 @@ var PositionManager = class {
|
|
|
7436
7454
|
if (getEphemeralSigners) {
|
|
7437
7455
|
nftMintAccount = getEphemeralSigners()[0];
|
|
7438
7456
|
} else {
|
|
7439
|
-
let k = await (0,
|
|
7457
|
+
let k = await (0, import_kit53.generateKeyPairSigner)();
|
|
7440
7458
|
signers.push(k);
|
|
7441
7459
|
nftMintAccount = k;
|
|
7442
7460
|
}
|
|
@@ -7521,7 +7539,7 @@ var PositionManager = class {
|
|
|
7521
7539
|
if (getEphemeralSigners) {
|
|
7522
7540
|
nftMintAccount = getEphemeralSigners()[0];
|
|
7523
7541
|
} else {
|
|
7524
|
-
let k = await (0,
|
|
7542
|
+
let k = await (0, import_kit53.generateKeyPairSigner)();
|
|
7525
7543
|
signers.push(k);
|
|
7526
7544
|
nftMintAccount = k;
|
|
7527
7545
|
}
|
|
@@ -7562,26 +7580,22 @@ var PositionManager = class {
|
|
|
7562
7580
|
[tickArrayLowerStartIndex, tickArrayUpperStartIndex]
|
|
7563
7581
|
);
|
|
7564
7582
|
const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolAccount.address) : void 0;
|
|
7565
|
-
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role:
|
|
7566
|
-
|
|
7583
|
+
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
|
|
7584
|
+
let wrapSolInstructions = [];
|
|
7567
7585
|
if (poolAccount.data.tokenMint0.toString() === NATIVE_MINT.toString()) {
|
|
7568
|
-
wrapSolInstructions.
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
})
|
|
7575
|
-
);
|
|
7586
|
+
wrapSolInstructions = this.buildWrapSolInstructions({
|
|
7587
|
+
payer: ownerInfo.wallet,
|
|
7588
|
+
ata: ownerInfo.tokenAccountA,
|
|
7589
|
+
owner: ownerInfo.wallet.address,
|
|
7590
|
+
amount: amount0Max
|
|
7591
|
+
});
|
|
7576
7592
|
} else if (poolAccount.data.tokenMint1.toString() === NATIVE_MINT.toString()) {
|
|
7577
|
-
wrapSolInstructions.
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
})
|
|
7584
|
-
);
|
|
7593
|
+
wrapSolInstructions = this.buildWrapSolInstructions({
|
|
7594
|
+
payer: ownerInfo.wallet,
|
|
7595
|
+
ata: ownerInfo.tokenAccountB,
|
|
7596
|
+
owner: ownerInfo.wallet.address,
|
|
7597
|
+
amount: amount1Max
|
|
7598
|
+
});
|
|
7585
7599
|
}
|
|
7586
7600
|
const instruction = await getOpenPositionWithToken22NftInstructionAsync({
|
|
7587
7601
|
payer: ownerInfo.wallet,
|
|
@@ -7672,7 +7686,7 @@ var PositionManager = class {
|
|
|
7672
7686
|
[ownerPosition.tickLowerIndex, ownerPosition.tickUpperIndex]
|
|
7673
7687
|
);
|
|
7674
7688
|
const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolState.address) : void 0;
|
|
7675
|
-
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role:
|
|
7689
|
+
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
|
|
7676
7690
|
const instruction = getIncreaseLiquidityV2Instruction({
|
|
7677
7691
|
nftOwner: ownerInfo.wallet,
|
|
7678
7692
|
nftAccount: positionNftAccount,
|
|
@@ -7757,7 +7771,7 @@ var PositionManager = class {
|
|
|
7757
7771
|
[ownerPosition.tickLowerIndex, ownerPosition.tickUpperIndex]
|
|
7758
7772
|
);
|
|
7759
7773
|
const extBitmapAccount = isOverflow ? await PdaUtils.getTickArrayBitmapExtensionPda(poolState.address) : void 0;
|
|
7760
|
-
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role:
|
|
7774
|
+
const remAccounts = extBitmapAccount ? [{ address: extBitmapAccount[0], role: import_kit53.AccountRole.WRITABLE }] : [];
|
|
7761
7775
|
const instruction = getDecreaseLiquidityV2Instruction({
|
|
7762
7776
|
nftOwner: ownerInfo.wallet,
|
|
7763
7777
|
nftAccount: positionNftAccount,
|