@stabbleorg/mclmm-sdk 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/idl/stabble_clmm.json +28 -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 +1047 -1010
- package/lib/index.mjs +531 -487
- package/lib/position-manager.d.ts +2 -0
- package/lib/position-manager.d.ts.map +1 -1
- package/lib/types.d.ts +6 -7
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/math.d.ts +3 -1
- package/lib/utils/math.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -137,6 +137,9 @@ __export(generated_exports, {
|
|
|
137
137
|
getAmmConfigSize: () => getAmmConfigSize,
|
|
138
138
|
getAmmV3ErrorMessage: () => getAmmV3ErrorMessage,
|
|
139
139
|
getClosePositionDiscriminatorBytes: () => getClosePositionDiscriminatorBytes,
|
|
140
|
+
getClosePositionEventCodec: () => getClosePositionEventCodec,
|
|
141
|
+
getClosePositionEventDecoder: () => getClosePositionEventDecoder,
|
|
142
|
+
getClosePositionEventEncoder: () => getClosePositionEventEncoder,
|
|
140
143
|
getClosePositionInstruction: () => getClosePositionInstruction,
|
|
141
144
|
getClosePositionInstructionAsync: () => getClosePositionInstructionAsync,
|
|
142
145
|
getClosePositionInstructionDataCodec: () => getClosePositionInstructionDataCodec,
|
|
@@ -470,22 +473,22 @@ function getAmmConfigSize() {
|
|
|
470
473
|
import {
|
|
471
474
|
assertAccountExists as assertAccountExists2,
|
|
472
475
|
assertAccountsExist as assertAccountsExist2,
|
|
473
|
-
combineCodec as
|
|
476
|
+
combineCodec as combineCodec18,
|
|
474
477
|
decodeAccount as decodeAccount2,
|
|
475
478
|
fetchEncodedAccount as fetchEncodedAccount2,
|
|
476
479
|
fetchEncodedAccounts as fetchEncodedAccounts2,
|
|
477
480
|
fixDecoderSize as fixDecoderSize2,
|
|
478
481
|
fixEncoderSize as fixEncoderSize2,
|
|
479
|
-
getAddressDecoder as
|
|
480
|
-
getAddressEncoder as
|
|
482
|
+
getAddressDecoder as getAddressDecoder13,
|
|
483
|
+
getAddressEncoder as getAddressEncoder13,
|
|
481
484
|
getArrayDecoder as getArrayDecoder6,
|
|
482
485
|
getArrayEncoder as getArrayEncoder6,
|
|
483
486
|
getBooleanDecoder as getBooleanDecoder2,
|
|
484
487
|
getBooleanEncoder as getBooleanEncoder2,
|
|
485
488
|
getBytesDecoder as getBytesDecoder2,
|
|
486
489
|
getBytesEncoder as getBytesEncoder2,
|
|
487
|
-
getStructDecoder as
|
|
488
|
-
getStructEncoder as
|
|
490
|
+
getStructDecoder as getStructDecoder18,
|
|
491
|
+
getStructEncoder as getStructEncoder18,
|
|
489
492
|
getU16Decoder as getU16Decoder4,
|
|
490
493
|
getU16Encoder as getU16Encoder4,
|
|
491
494
|
getU64Decoder as getU64Decoder12,
|
|
@@ -493,36 +496,57 @@ import {
|
|
|
493
496
|
transformEncoder as transformEncoder2
|
|
494
497
|
} from "@solana/kit";
|
|
495
498
|
|
|
496
|
-
// src/generated/types/
|
|
499
|
+
// src/generated/types/closePositionEvent.ts
|
|
497
500
|
import {
|
|
498
501
|
combineCodec as combineCodec2,
|
|
499
502
|
getAddressDecoder as getAddressDecoder2,
|
|
500
503
|
getAddressEncoder as getAddressEncoder2,
|
|
501
504
|
getStructDecoder as getStructDecoder2,
|
|
502
|
-
getStructEncoder as getStructEncoder2
|
|
505
|
+
getStructEncoder as getStructEncoder2
|
|
506
|
+
} from "@solana/kit";
|
|
507
|
+
function getClosePositionEventEncoder() {
|
|
508
|
+
return getStructEncoder2([["positionKey", getAddressEncoder2()]]);
|
|
509
|
+
}
|
|
510
|
+
function getClosePositionEventDecoder() {
|
|
511
|
+
return getStructDecoder2([["positionKey", getAddressDecoder2()]]);
|
|
512
|
+
}
|
|
513
|
+
function getClosePositionEventCodec() {
|
|
514
|
+
return combineCodec2(
|
|
515
|
+
getClosePositionEventEncoder(),
|
|
516
|
+
getClosePositionEventDecoder()
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// src/generated/types/collectPersonalFeeEvent.ts
|
|
521
|
+
import {
|
|
522
|
+
combineCodec as combineCodec3,
|
|
523
|
+
getAddressDecoder as getAddressDecoder3,
|
|
524
|
+
getAddressEncoder as getAddressEncoder3,
|
|
525
|
+
getStructDecoder as getStructDecoder3,
|
|
526
|
+
getStructEncoder as getStructEncoder3,
|
|
503
527
|
getU64Decoder as getU64Decoder2,
|
|
504
528
|
getU64Encoder as getU64Encoder2
|
|
505
529
|
} from "@solana/kit";
|
|
506
530
|
function getCollectPersonalFeeEventEncoder() {
|
|
507
|
-
return
|
|
508
|
-
["positionNftMint",
|
|
509
|
-
["recipientTokenAccount0",
|
|
510
|
-
["recipientTokenAccount1",
|
|
531
|
+
return getStructEncoder3([
|
|
532
|
+
["positionNftMint", getAddressEncoder3()],
|
|
533
|
+
["recipientTokenAccount0", getAddressEncoder3()],
|
|
534
|
+
["recipientTokenAccount1", getAddressEncoder3()],
|
|
511
535
|
["amount0", getU64Encoder2()],
|
|
512
536
|
["amount1", getU64Encoder2()]
|
|
513
537
|
]);
|
|
514
538
|
}
|
|
515
539
|
function getCollectPersonalFeeEventDecoder() {
|
|
516
|
-
return
|
|
517
|
-
["positionNftMint",
|
|
518
|
-
["recipientTokenAccount0",
|
|
519
|
-
["recipientTokenAccount1",
|
|
540
|
+
return getStructDecoder3([
|
|
541
|
+
["positionNftMint", getAddressDecoder3()],
|
|
542
|
+
["recipientTokenAccount0", getAddressDecoder3()],
|
|
543
|
+
["recipientTokenAccount1", getAddressDecoder3()],
|
|
520
544
|
["amount0", getU64Decoder2()],
|
|
521
545
|
["amount1", getU64Decoder2()]
|
|
522
546
|
]);
|
|
523
547
|
}
|
|
524
548
|
function getCollectPersonalFeeEventCodec() {
|
|
525
|
-
return
|
|
549
|
+
return combineCodec3(
|
|
526
550
|
getCollectPersonalFeeEventEncoder(),
|
|
527
551
|
getCollectPersonalFeeEventDecoder()
|
|
528
552
|
);
|
|
@@ -530,34 +554,34 @@ function getCollectPersonalFeeEventCodec() {
|
|
|
530
554
|
|
|
531
555
|
// src/generated/types/collectProtocolFeeEvent.ts
|
|
532
556
|
import {
|
|
533
|
-
combineCodec as
|
|
534
|
-
getAddressDecoder as
|
|
535
|
-
getAddressEncoder as
|
|
536
|
-
getStructDecoder as
|
|
537
|
-
getStructEncoder as
|
|
557
|
+
combineCodec as combineCodec4,
|
|
558
|
+
getAddressDecoder as getAddressDecoder4,
|
|
559
|
+
getAddressEncoder as getAddressEncoder4,
|
|
560
|
+
getStructDecoder as getStructDecoder4,
|
|
561
|
+
getStructEncoder as getStructEncoder4,
|
|
538
562
|
getU64Decoder as getU64Decoder3,
|
|
539
563
|
getU64Encoder as getU64Encoder3
|
|
540
564
|
} from "@solana/kit";
|
|
541
565
|
function getCollectProtocolFeeEventEncoder() {
|
|
542
|
-
return
|
|
543
|
-
["poolState",
|
|
544
|
-
["recipientTokenAccount0",
|
|
545
|
-
["recipientTokenAccount1",
|
|
566
|
+
return getStructEncoder4([
|
|
567
|
+
["poolState", getAddressEncoder4()],
|
|
568
|
+
["recipientTokenAccount0", getAddressEncoder4()],
|
|
569
|
+
["recipientTokenAccount1", getAddressEncoder4()],
|
|
546
570
|
["amount0", getU64Encoder3()],
|
|
547
571
|
["amount1", getU64Encoder3()]
|
|
548
572
|
]);
|
|
549
573
|
}
|
|
550
574
|
function getCollectProtocolFeeEventDecoder() {
|
|
551
|
-
return
|
|
552
|
-
["poolState",
|
|
553
|
-
["recipientTokenAccount0",
|
|
554
|
-
["recipientTokenAccount1",
|
|
575
|
+
return getStructDecoder4([
|
|
576
|
+
["poolState", getAddressDecoder4()],
|
|
577
|
+
["recipientTokenAccount0", getAddressDecoder4()],
|
|
578
|
+
["recipientTokenAccount1", getAddressDecoder4()],
|
|
555
579
|
["amount0", getU64Decoder3()],
|
|
556
580
|
["amount1", getU64Decoder3()]
|
|
557
581
|
]);
|
|
558
582
|
}
|
|
559
583
|
function getCollectProtocolFeeEventCodec() {
|
|
560
|
-
return
|
|
584
|
+
return combineCodec4(
|
|
561
585
|
getCollectProtocolFeeEventEncoder(),
|
|
562
586
|
getCollectProtocolFeeEventDecoder()
|
|
563
587
|
);
|
|
@@ -565,40 +589,40 @@ function getCollectProtocolFeeEventCodec() {
|
|
|
565
589
|
|
|
566
590
|
// src/generated/types/configChangeEvent.ts
|
|
567
591
|
import {
|
|
568
|
-
combineCodec as
|
|
569
|
-
getAddressDecoder as
|
|
570
|
-
getAddressEncoder as
|
|
571
|
-
getStructDecoder as
|
|
572
|
-
getStructEncoder as
|
|
592
|
+
combineCodec as combineCodec5,
|
|
593
|
+
getAddressDecoder as getAddressDecoder5,
|
|
594
|
+
getAddressEncoder as getAddressEncoder5,
|
|
595
|
+
getStructDecoder as getStructDecoder5,
|
|
596
|
+
getStructEncoder as getStructEncoder5,
|
|
573
597
|
getU16Decoder as getU16Decoder2,
|
|
574
598
|
getU16Encoder as getU16Encoder2,
|
|
575
599
|
getU32Decoder as getU32Decoder2,
|
|
576
600
|
getU32Encoder as getU32Encoder2
|
|
577
601
|
} from "@solana/kit";
|
|
578
602
|
function getConfigChangeEventEncoder() {
|
|
579
|
-
return
|
|
603
|
+
return getStructEncoder5([
|
|
580
604
|
["index", getU16Encoder2()],
|
|
581
|
-
["owner",
|
|
605
|
+
["owner", getAddressEncoder5()],
|
|
582
606
|
["protocolFeeRate", getU32Encoder2()],
|
|
583
607
|
["tradeFeeRate", getU32Encoder2()],
|
|
584
608
|
["tickSpacing", getU16Encoder2()],
|
|
585
609
|
["fundFeeRate", getU32Encoder2()],
|
|
586
|
-
["fundOwner",
|
|
610
|
+
["fundOwner", getAddressEncoder5()]
|
|
587
611
|
]);
|
|
588
612
|
}
|
|
589
613
|
function getConfigChangeEventDecoder() {
|
|
590
|
-
return
|
|
614
|
+
return getStructDecoder5([
|
|
591
615
|
["index", getU16Decoder2()],
|
|
592
|
-
["owner",
|
|
616
|
+
["owner", getAddressDecoder5()],
|
|
593
617
|
["protocolFeeRate", getU32Decoder2()],
|
|
594
618
|
["tradeFeeRate", getU32Decoder2()],
|
|
595
619
|
["tickSpacing", getU16Decoder2()],
|
|
596
620
|
["fundFeeRate", getU32Decoder2()],
|
|
597
|
-
["fundOwner",
|
|
621
|
+
["fundOwner", getAddressDecoder5()]
|
|
598
622
|
]);
|
|
599
623
|
}
|
|
600
624
|
function getConfigChangeEventCodec() {
|
|
601
|
-
return
|
|
625
|
+
return combineCodec5(
|
|
602
626
|
getConfigChangeEventEncoder(),
|
|
603
627
|
getConfigChangeEventDecoder()
|
|
604
628
|
);
|
|
@@ -606,25 +630,25 @@ function getConfigChangeEventCodec() {
|
|
|
606
630
|
|
|
607
631
|
// src/generated/types/createPersonalPositionEvent.ts
|
|
608
632
|
import {
|
|
609
|
-
combineCodec as
|
|
610
|
-
getAddressDecoder as
|
|
611
|
-
getAddressEncoder as
|
|
633
|
+
combineCodec as combineCodec6,
|
|
634
|
+
getAddressDecoder as getAddressDecoder6,
|
|
635
|
+
getAddressEncoder as getAddressEncoder6,
|
|
612
636
|
getI32Decoder,
|
|
613
637
|
getI32Encoder,
|
|
614
|
-
getStructDecoder as
|
|
615
|
-
getStructEncoder as
|
|
638
|
+
getStructDecoder as getStructDecoder6,
|
|
639
|
+
getStructEncoder as getStructEncoder6,
|
|
616
640
|
getU128Decoder,
|
|
617
641
|
getU128Encoder,
|
|
618
642
|
getU64Decoder as getU64Decoder4,
|
|
619
643
|
getU64Encoder as getU64Encoder4
|
|
620
644
|
} from "@solana/kit";
|
|
621
645
|
function getCreatePersonalPositionEventEncoder() {
|
|
622
|
-
return
|
|
623
|
-
["poolState",
|
|
624
|
-
["personalPosition",
|
|
625
|
-
["nftMint",
|
|
626
|
-
["minter",
|
|
627
|
-
["nftOwner",
|
|
646
|
+
return getStructEncoder6([
|
|
647
|
+
["poolState", getAddressEncoder6()],
|
|
648
|
+
["personalPosition", getAddressEncoder6()],
|
|
649
|
+
["nftMint", getAddressEncoder6()],
|
|
650
|
+
["minter", getAddressEncoder6()],
|
|
651
|
+
["nftOwner", getAddressEncoder6()],
|
|
628
652
|
["tickLowerIndex", getI32Encoder()],
|
|
629
653
|
["tickUpperIndex", getI32Encoder()],
|
|
630
654
|
["liquidity", getU128Encoder()],
|
|
@@ -635,12 +659,12 @@ function getCreatePersonalPositionEventEncoder() {
|
|
|
635
659
|
]);
|
|
636
660
|
}
|
|
637
661
|
function getCreatePersonalPositionEventDecoder() {
|
|
638
|
-
return
|
|
639
|
-
["poolState",
|
|
640
|
-
["personalPosition",
|
|
641
|
-
["nftMint",
|
|
642
|
-
["minter",
|
|
643
|
-
["nftOwner",
|
|
662
|
+
return getStructDecoder6([
|
|
663
|
+
["poolState", getAddressDecoder6()],
|
|
664
|
+
["personalPosition", getAddressDecoder6()],
|
|
665
|
+
["nftMint", getAddressDecoder6()],
|
|
666
|
+
["minter", getAddressDecoder6()],
|
|
667
|
+
["nftOwner", getAddressDecoder6()],
|
|
644
668
|
["tickLowerIndex", getI32Decoder()],
|
|
645
669
|
["tickUpperIndex", getI32Decoder()],
|
|
646
670
|
["liquidity", getU128Decoder()],
|
|
@@ -651,7 +675,7 @@ function getCreatePersonalPositionEventDecoder() {
|
|
|
651
675
|
]);
|
|
652
676
|
}
|
|
653
677
|
function getCreatePersonalPositionEventCodec() {
|
|
654
|
-
return
|
|
678
|
+
return combineCodec6(
|
|
655
679
|
getCreatePersonalPositionEventEncoder(),
|
|
656
680
|
getCreatePersonalPositionEventDecoder()
|
|
657
681
|
);
|
|
@@ -659,21 +683,21 @@ function getCreatePersonalPositionEventCodec() {
|
|
|
659
683
|
|
|
660
684
|
// src/generated/types/decreaseLiquidityEvent.ts
|
|
661
685
|
import {
|
|
662
|
-
combineCodec as
|
|
663
|
-
getAddressDecoder as
|
|
664
|
-
getAddressEncoder as
|
|
686
|
+
combineCodec as combineCodec7,
|
|
687
|
+
getAddressDecoder as getAddressDecoder7,
|
|
688
|
+
getAddressEncoder as getAddressEncoder7,
|
|
665
689
|
getArrayDecoder as getArrayDecoder2,
|
|
666
690
|
getArrayEncoder as getArrayEncoder2,
|
|
667
|
-
getStructDecoder as
|
|
668
|
-
getStructEncoder as
|
|
691
|
+
getStructDecoder as getStructDecoder7,
|
|
692
|
+
getStructEncoder as getStructEncoder7,
|
|
669
693
|
getU128Decoder as getU128Decoder2,
|
|
670
694
|
getU128Encoder as getU128Encoder2,
|
|
671
695
|
getU64Decoder as getU64Decoder5,
|
|
672
696
|
getU64Encoder as getU64Encoder5
|
|
673
697
|
} from "@solana/kit";
|
|
674
698
|
function getDecreaseLiquidityEventEncoder() {
|
|
675
|
-
return
|
|
676
|
-
["positionNftMint",
|
|
699
|
+
return getStructEncoder7([
|
|
700
|
+
["positionNftMint", getAddressEncoder7()],
|
|
677
701
|
["liquidity", getU128Encoder2()],
|
|
678
702
|
["decreaseAmount0", getU64Encoder5()],
|
|
679
703
|
["decreaseAmount1", getU64Encoder5()],
|
|
@@ -685,8 +709,8 @@ function getDecreaseLiquidityEventEncoder() {
|
|
|
685
709
|
]);
|
|
686
710
|
}
|
|
687
711
|
function getDecreaseLiquidityEventDecoder() {
|
|
688
|
-
return
|
|
689
|
-
["positionNftMint",
|
|
712
|
+
return getStructDecoder7([
|
|
713
|
+
["positionNftMint", getAddressDecoder7()],
|
|
690
714
|
["liquidity", getU128Decoder2()],
|
|
691
715
|
["decreaseAmount0", getU64Decoder5()],
|
|
692
716
|
["decreaseAmount1", getU64Decoder5()],
|
|
@@ -698,7 +722,7 @@ function getDecreaseLiquidityEventDecoder() {
|
|
|
698
722
|
]);
|
|
699
723
|
}
|
|
700
724
|
function getDecreaseLiquidityEventCodec() {
|
|
701
|
-
return
|
|
725
|
+
return combineCodec7(
|
|
702
726
|
getDecreaseLiquidityEventEncoder(),
|
|
703
727
|
getDecreaseLiquidityEventDecoder()
|
|
704
728
|
);
|
|
@@ -706,19 +730,19 @@ function getDecreaseLiquidityEventCodec() {
|
|
|
706
730
|
|
|
707
731
|
// src/generated/types/increaseLiquidityEvent.ts
|
|
708
732
|
import {
|
|
709
|
-
combineCodec as
|
|
710
|
-
getAddressDecoder as
|
|
711
|
-
getAddressEncoder as
|
|
712
|
-
getStructDecoder as
|
|
713
|
-
getStructEncoder as
|
|
733
|
+
combineCodec as combineCodec8,
|
|
734
|
+
getAddressDecoder as getAddressDecoder8,
|
|
735
|
+
getAddressEncoder as getAddressEncoder8,
|
|
736
|
+
getStructDecoder as getStructDecoder8,
|
|
737
|
+
getStructEncoder as getStructEncoder8,
|
|
714
738
|
getU128Decoder as getU128Decoder3,
|
|
715
739
|
getU128Encoder as getU128Encoder3,
|
|
716
740
|
getU64Decoder as getU64Decoder6,
|
|
717
741
|
getU64Encoder as getU64Encoder6
|
|
718
742
|
} from "@solana/kit";
|
|
719
743
|
function getIncreaseLiquidityEventEncoder() {
|
|
720
|
-
return
|
|
721
|
-
["positionNftMint",
|
|
744
|
+
return getStructEncoder8([
|
|
745
|
+
["positionNftMint", getAddressEncoder8()],
|
|
722
746
|
["liquidity", getU128Encoder3()],
|
|
723
747
|
["amount0", getU64Encoder6()],
|
|
724
748
|
["amount1", getU64Encoder6()],
|
|
@@ -727,8 +751,8 @@ function getIncreaseLiquidityEventEncoder() {
|
|
|
727
751
|
]);
|
|
728
752
|
}
|
|
729
753
|
function getIncreaseLiquidityEventDecoder() {
|
|
730
|
-
return
|
|
731
|
-
["positionNftMint",
|
|
754
|
+
return getStructDecoder8([
|
|
755
|
+
["positionNftMint", getAddressDecoder8()],
|
|
732
756
|
["liquidity", getU128Decoder3()],
|
|
733
757
|
["amount0", getU64Decoder6()],
|
|
734
758
|
["amount1", getU64Decoder6()],
|
|
@@ -737,7 +761,7 @@ function getIncreaseLiquidityEventDecoder() {
|
|
|
737
761
|
]);
|
|
738
762
|
}
|
|
739
763
|
function getIncreaseLiquidityEventCodec() {
|
|
740
|
-
return
|
|
764
|
+
return combineCodec8(
|
|
741
765
|
getIncreaseLiquidityEventEncoder(),
|
|
742
766
|
getIncreaseLiquidityEventDecoder()
|
|
743
767
|
);
|
|
@@ -745,18 +769,18 @@ function getIncreaseLiquidityEventCodec() {
|
|
|
745
769
|
|
|
746
770
|
// src/generated/types/liquidityCalculateEvent.ts
|
|
747
771
|
import {
|
|
748
|
-
combineCodec as
|
|
772
|
+
combineCodec as combineCodec9,
|
|
749
773
|
getI32Decoder as getI32Decoder2,
|
|
750
774
|
getI32Encoder as getI32Encoder2,
|
|
751
|
-
getStructDecoder as
|
|
752
|
-
getStructEncoder as
|
|
775
|
+
getStructDecoder as getStructDecoder9,
|
|
776
|
+
getStructEncoder as getStructEncoder9,
|
|
753
777
|
getU128Decoder as getU128Decoder4,
|
|
754
778
|
getU128Encoder as getU128Encoder4,
|
|
755
779
|
getU64Decoder as getU64Decoder7,
|
|
756
780
|
getU64Encoder as getU64Encoder7
|
|
757
781
|
} from "@solana/kit";
|
|
758
782
|
function getLiquidityCalculateEventEncoder() {
|
|
759
|
-
return
|
|
783
|
+
return getStructEncoder9([
|
|
760
784
|
["poolLiquidity", getU128Encoder4()],
|
|
761
785
|
["poolSqrtPriceX64", getU128Encoder4()],
|
|
762
786
|
["poolTick", getI32Encoder2()],
|
|
@@ -769,7 +793,7 @@ function getLiquidityCalculateEventEncoder() {
|
|
|
769
793
|
]);
|
|
770
794
|
}
|
|
771
795
|
function getLiquidityCalculateEventDecoder() {
|
|
772
|
-
return
|
|
796
|
+
return getStructDecoder9([
|
|
773
797
|
["poolLiquidity", getU128Decoder4()],
|
|
774
798
|
["poolSqrtPriceX64", getU128Decoder4()],
|
|
775
799
|
["poolTick", getI32Decoder2()],
|
|
@@ -782,7 +806,7 @@ function getLiquidityCalculateEventDecoder() {
|
|
|
782
806
|
]);
|
|
783
807
|
}
|
|
784
808
|
function getLiquidityCalculateEventCodec() {
|
|
785
|
-
return
|
|
809
|
+
return combineCodec9(
|
|
786
810
|
getLiquidityCalculateEventEncoder(),
|
|
787
811
|
getLiquidityCalculateEventDecoder()
|
|
788
812
|
);
|
|
@@ -790,19 +814,19 @@ function getLiquidityCalculateEventCodec() {
|
|
|
790
814
|
|
|
791
815
|
// src/generated/types/liquidityChangeEvent.ts
|
|
792
816
|
import {
|
|
793
|
-
combineCodec as
|
|
794
|
-
getAddressDecoder as
|
|
795
|
-
getAddressEncoder as
|
|
817
|
+
combineCodec as combineCodec10,
|
|
818
|
+
getAddressDecoder as getAddressDecoder9,
|
|
819
|
+
getAddressEncoder as getAddressEncoder9,
|
|
796
820
|
getI32Decoder as getI32Decoder3,
|
|
797
821
|
getI32Encoder as getI32Encoder3,
|
|
798
|
-
getStructDecoder as
|
|
799
|
-
getStructEncoder as
|
|
822
|
+
getStructDecoder as getStructDecoder10,
|
|
823
|
+
getStructEncoder as getStructEncoder10,
|
|
800
824
|
getU128Decoder as getU128Decoder5,
|
|
801
825
|
getU128Encoder as getU128Encoder5
|
|
802
826
|
} from "@solana/kit";
|
|
803
827
|
function getLiquidityChangeEventEncoder() {
|
|
804
|
-
return
|
|
805
|
-
["poolState",
|
|
828
|
+
return getStructEncoder10([
|
|
829
|
+
["poolState", getAddressEncoder9()],
|
|
806
830
|
["tick", getI32Encoder3()],
|
|
807
831
|
["tickLower", getI32Encoder3()],
|
|
808
832
|
["tickUpper", getI32Encoder3()],
|
|
@@ -811,8 +835,8 @@ function getLiquidityChangeEventEncoder() {
|
|
|
811
835
|
]);
|
|
812
836
|
}
|
|
813
837
|
function getLiquidityChangeEventDecoder() {
|
|
814
|
-
return
|
|
815
|
-
["poolState",
|
|
838
|
+
return getStructDecoder10([
|
|
839
|
+
["poolState", getAddressDecoder9()],
|
|
816
840
|
["tick", getI32Decoder3()],
|
|
817
841
|
["tickLower", getI32Decoder3()],
|
|
818
842
|
["tickUpper", getI32Decoder3()],
|
|
@@ -821,7 +845,7 @@ function getLiquidityChangeEventDecoder() {
|
|
|
821
845
|
]);
|
|
822
846
|
}
|
|
823
847
|
function getLiquidityChangeEventCodec() {
|
|
824
|
-
return
|
|
848
|
+
return combineCodec10(
|
|
825
849
|
getLiquidityChangeEventEncoder(),
|
|
826
850
|
getLiquidityChangeEventDecoder()
|
|
827
851
|
);
|
|
@@ -829,78 +853,78 @@ function getLiquidityChangeEventCodec() {
|
|
|
829
853
|
|
|
830
854
|
// src/generated/types/observation.ts
|
|
831
855
|
import {
|
|
832
|
-
combineCodec as
|
|
856
|
+
combineCodec as combineCodec11,
|
|
833
857
|
getArrayDecoder as getArrayDecoder3,
|
|
834
858
|
getArrayEncoder as getArrayEncoder3,
|
|
835
859
|
getI64Decoder,
|
|
836
860
|
getI64Encoder,
|
|
837
|
-
getStructDecoder as
|
|
838
|
-
getStructEncoder as
|
|
861
|
+
getStructDecoder as getStructDecoder11,
|
|
862
|
+
getStructEncoder as getStructEncoder11,
|
|
839
863
|
getU32Decoder as getU32Decoder3,
|
|
840
864
|
getU32Encoder as getU32Encoder3,
|
|
841
865
|
getU64Decoder as getU64Decoder8,
|
|
842
866
|
getU64Encoder as getU64Encoder8
|
|
843
867
|
} from "@solana/kit";
|
|
844
868
|
function getObservationEncoder() {
|
|
845
|
-
return
|
|
869
|
+
return getStructEncoder11([
|
|
846
870
|
["blockTimestamp", getU32Encoder3()],
|
|
847
871
|
["tickCumulative", getI64Encoder()],
|
|
848
872
|
["padding", getArrayEncoder3(getU64Encoder8(), { size: 4 })]
|
|
849
873
|
]);
|
|
850
874
|
}
|
|
851
875
|
function getObservationDecoder() {
|
|
852
|
-
return
|
|
876
|
+
return getStructDecoder11([
|
|
853
877
|
["blockTimestamp", getU32Decoder3()],
|
|
854
878
|
["tickCumulative", getI64Decoder()],
|
|
855
879
|
["padding", getArrayDecoder3(getU64Decoder8(), { size: 4 })]
|
|
856
880
|
]);
|
|
857
881
|
}
|
|
858
882
|
function getObservationCodec() {
|
|
859
|
-
return
|
|
883
|
+
return combineCodec11(getObservationEncoder(), getObservationDecoder());
|
|
860
884
|
}
|
|
861
885
|
|
|
862
886
|
// src/generated/types/poolCreatedEvent.ts
|
|
863
887
|
import {
|
|
864
|
-
combineCodec as
|
|
865
|
-
getAddressDecoder as
|
|
866
|
-
getAddressEncoder as
|
|
888
|
+
combineCodec as combineCodec12,
|
|
889
|
+
getAddressDecoder as getAddressDecoder10,
|
|
890
|
+
getAddressEncoder as getAddressEncoder10,
|
|
867
891
|
getI32Decoder as getI32Decoder4,
|
|
868
892
|
getI32Encoder as getI32Encoder4,
|
|
869
|
-
getStructDecoder as
|
|
870
|
-
getStructEncoder as
|
|
893
|
+
getStructDecoder as getStructDecoder12,
|
|
894
|
+
getStructEncoder as getStructEncoder12,
|
|
871
895
|
getU128Decoder as getU128Decoder6,
|
|
872
896
|
getU128Encoder as getU128Encoder6,
|
|
873
897
|
getU16Decoder as getU16Decoder3,
|
|
874
898
|
getU16Encoder as getU16Encoder3
|
|
875
899
|
} from "@solana/kit";
|
|
876
900
|
function getPoolCreatedEventEncoder() {
|
|
877
|
-
return
|
|
878
|
-
["tokenMint0",
|
|
879
|
-
["tokenMint1",
|
|
901
|
+
return getStructEncoder12([
|
|
902
|
+
["tokenMint0", getAddressEncoder10()],
|
|
903
|
+
["tokenMint1", getAddressEncoder10()],
|
|
880
904
|
["tickSpacing", getU16Encoder3()],
|
|
881
|
-
["poolState",
|
|
905
|
+
["poolState", getAddressEncoder10()],
|
|
882
906
|
["sqrtPriceX64", getU128Encoder6()],
|
|
883
907
|
["tick", getI32Encoder4()],
|
|
884
|
-
["tokenVault0",
|
|
885
|
-
["tokenVault1",
|
|
886
|
-
["ammConfig",
|
|
908
|
+
["tokenVault0", getAddressEncoder10()],
|
|
909
|
+
["tokenVault1", getAddressEncoder10()],
|
|
910
|
+
["ammConfig", getAddressEncoder10()]
|
|
887
911
|
]);
|
|
888
912
|
}
|
|
889
913
|
function getPoolCreatedEventDecoder() {
|
|
890
|
-
return
|
|
891
|
-
["tokenMint0",
|
|
892
|
-
["tokenMint1",
|
|
914
|
+
return getStructDecoder12([
|
|
915
|
+
["tokenMint0", getAddressDecoder10()],
|
|
916
|
+
["tokenMint1", getAddressDecoder10()],
|
|
893
917
|
["tickSpacing", getU16Decoder3()],
|
|
894
|
-
["poolState",
|
|
918
|
+
["poolState", getAddressDecoder10()],
|
|
895
919
|
["sqrtPriceX64", getU128Decoder6()],
|
|
896
920
|
["tick", getI32Decoder4()],
|
|
897
|
-
["tokenVault0",
|
|
898
|
-
["tokenVault1",
|
|
899
|
-
["ammConfig",
|
|
921
|
+
["tokenVault0", getAddressDecoder10()],
|
|
922
|
+
["tokenVault1", getAddressDecoder10()],
|
|
923
|
+
["ammConfig", getAddressDecoder10()]
|
|
900
924
|
]);
|
|
901
925
|
}
|
|
902
926
|
function getPoolCreatedEventCodec() {
|
|
903
|
-
return
|
|
927
|
+
return combineCodec12(
|
|
904
928
|
getPoolCreatedEventEncoder(),
|
|
905
929
|
getPoolCreatedEventDecoder()
|
|
906
930
|
);
|
|
@@ -908,28 +932,28 @@ function getPoolCreatedEventCodec() {
|
|
|
908
932
|
|
|
909
933
|
// src/generated/types/positionRewardInfo.ts
|
|
910
934
|
import {
|
|
911
|
-
combineCodec as
|
|
912
|
-
getStructDecoder as
|
|
913
|
-
getStructEncoder as
|
|
935
|
+
combineCodec as combineCodec13,
|
|
936
|
+
getStructDecoder as getStructDecoder13,
|
|
937
|
+
getStructEncoder as getStructEncoder13,
|
|
914
938
|
getU128Decoder as getU128Decoder7,
|
|
915
939
|
getU128Encoder as getU128Encoder7,
|
|
916
940
|
getU64Decoder as getU64Decoder9,
|
|
917
941
|
getU64Encoder as getU64Encoder9
|
|
918
942
|
} from "@solana/kit";
|
|
919
943
|
function getPositionRewardInfoEncoder() {
|
|
920
|
-
return
|
|
944
|
+
return getStructEncoder13([
|
|
921
945
|
["growthInsideLastX64", getU128Encoder7()],
|
|
922
946
|
["rewardAmountOwed", getU64Encoder9()]
|
|
923
947
|
]);
|
|
924
948
|
}
|
|
925
949
|
function getPositionRewardInfoDecoder() {
|
|
926
|
-
return
|
|
950
|
+
return getStructDecoder13([
|
|
927
951
|
["growthInsideLastX64", getU128Decoder7()],
|
|
928
952
|
["rewardAmountOwed", getU64Decoder9()]
|
|
929
953
|
]);
|
|
930
954
|
}
|
|
931
955
|
function getPositionRewardInfoCodec() {
|
|
932
|
-
return
|
|
956
|
+
return combineCodec13(
|
|
933
957
|
getPositionRewardInfoEncoder(),
|
|
934
958
|
getPositionRewardInfoDecoder()
|
|
935
959
|
);
|
|
@@ -937,11 +961,11 @@ function getPositionRewardInfoCodec() {
|
|
|
937
961
|
|
|
938
962
|
// src/generated/types/rewardInfo.ts
|
|
939
963
|
import {
|
|
940
|
-
combineCodec as
|
|
941
|
-
getAddressDecoder as
|
|
942
|
-
getAddressEncoder as
|
|
943
|
-
getStructDecoder as
|
|
944
|
-
getStructEncoder as
|
|
964
|
+
combineCodec as combineCodec14,
|
|
965
|
+
getAddressDecoder as getAddressDecoder11,
|
|
966
|
+
getAddressEncoder as getAddressEncoder11,
|
|
967
|
+
getStructDecoder as getStructDecoder14,
|
|
968
|
+
getStructEncoder as getStructEncoder14,
|
|
945
969
|
getU128Decoder as getU128Decoder8,
|
|
946
970
|
getU128Encoder as getU128Encoder8,
|
|
947
971
|
getU64Decoder as getU64Decoder10,
|
|
@@ -950,7 +974,7 @@ import {
|
|
|
950
974
|
getU8Encoder as getU8Encoder2
|
|
951
975
|
} from "@solana/kit";
|
|
952
976
|
function getRewardInfoEncoder() {
|
|
953
|
-
return
|
|
977
|
+
return getStructEncoder14([
|
|
954
978
|
["rewardState", getU8Encoder2()],
|
|
955
979
|
["openTime", getU64Encoder10()],
|
|
956
980
|
["endTime", getU64Encoder10()],
|
|
@@ -958,14 +982,14 @@ function getRewardInfoEncoder() {
|
|
|
958
982
|
["emissionsPerSecondX64", getU128Encoder8()],
|
|
959
983
|
["rewardTotalEmissioned", getU64Encoder10()],
|
|
960
984
|
["rewardClaimed", getU64Encoder10()],
|
|
961
|
-
["tokenMint",
|
|
962
|
-
["tokenVault",
|
|
963
|
-
["authority",
|
|
985
|
+
["tokenMint", getAddressEncoder11()],
|
|
986
|
+
["tokenVault", getAddressEncoder11()],
|
|
987
|
+
["authority", getAddressEncoder11()],
|
|
964
988
|
["rewardGrowthGlobalX64", getU128Encoder8()]
|
|
965
989
|
]);
|
|
966
990
|
}
|
|
967
991
|
function getRewardInfoDecoder() {
|
|
968
|
-
return
|
|
992
|
+
return getStructDecoder14([
|
|
969
993
|
["rewardState", getU8Decoder2()],
|
|
970
994
|
["openTime", getU64Decoder10()],
|
|
971
995
|
["endTime", getU64Decoder10()],
|
|
@@ -973,38 +997,38 @@ function getRewardInfoDecoder() {
|
|
|
973
997
|
["emissionsPerSecondX64", getU128Decoder8()],
|
|
974
998
|
["rewardTotalEmissioned", getU64Decoder10()],
|
|
975
999
|
["rewardClaimed", getU64Decoder10()],
|
|
976
|
-
["tokenMint",
|
|
977
|
-
["tokenVault",
|
|
978
|
-
["authority",
|
|
1000
|
+
["tokenMint", getAddressDecoder11()],
|
|
1001
|
+
["tokenVault", getAddressDecoder11()],
|
|
1002
|
+
["authority", getAddressDecoder11()],
|
|
979
1003
|
["rewardGrowthGlobalX64", getU128Decoder8()]
|
|
980
1004
|
]);
|
|
981
1005
|
}
|
|
982
1006
|
function getRewardInfoCodec() {
|
|
983
|
-
return
|
|
1007
|
+
return combineCodec14(getRewardInfoEncoder(), getRewardInfoDecoder());
|
|
984
1008
|
}
|
|
985
1009
|
|
|
986
1010
|
// src/generated/types/swapEvent.ts
|
|
987
1011
|
import {
|
|
988
|
-
combineCodec as
|
|
989
|
-
getAddressDecoder as
|
|
990
|
-
getAddressEncoder as
|
|
1012
|
+
combineCodec as combineCodec15,
|
|
1013
|
+
getAddressDecoder as getAddressDecoder12,
|
|
1014
|
+
getAddressEncoder as getAddressEncoder12,
|
|
991
1015
|
getBooleanDecoder,
|
|
992
1016
|
getBooleanEncoder,
|
|
993
1017
|
getI32Decoder as getI32Decoder5,
|
|
994
1018
|
getI32Encoder as getI32Encoder5,
|
|
995
|
-
getStructDecoder as
|
|
996
|
-
getStructEncoder as
|
|
1019
|
+
getStructDecoder as getStructDecoder15,
|
|
1020
|
+
getStructEncoder as getStructEncoder15,
|
|
997
1021
|
getU128Decoder as getU128Decoder9,
|
|
998
1022
|
getU128Encoder as getU128Encoder9,
|
|
999
1023
|
getU64Decoder as getU64Decoder11,
|
|
1000
1024
|
getU64Encoder as getU64Encoder11
|
|
1001
1025
|
} from "@solana/kit";
|
|
1002
1026
|
function getSwapEventEncoder() {
|
|
1003
|
-
return
|
|
1004
|
-
["poolState",
|
|
1005
|
-
["sender",
|
|
1006
|
-
["tokenAccount0",
|
|
1007
|
-
["tokenAccount1",
|
|
1027
|
+
return getStructEncoder15([
|
|
1028
|
+
["poolState", getAddressEncoder12()],
|
|
1029
|
+
["sender", getAddressEncoder12()],
|
|
1030
|
+
["tokenAccount0", getAddressEncoder12()],
|
|
1031
|
+
["tokenAccount1", getAddressEncoder12()],
|
|
1008
1032
|
["amount0", getU64Encoder11()],
|
|
1009
1033
|
["transferFee0", getU64Encoder11()],
|
|
1010
1034
|
["amount1", getU64Encoder11()],
|
|
@@ -1016,11 +1040,11 @@ function getSwapEventEncoder() {
|
|
|
1016
1040
|
]);
|
|
1017
1041
|
}
|
|
1018
1042
|
function getSwapEventDecoder() {
|
|
1019
|
-
return
|
|
1020
|
-
["poolState",
|
|
1021
|
-
["sender",
|
|
1022
|
-
["tokenAccount0",
|
|
1023
|
-
["tokenAccount1",
|
|
1043
|
+
return getStructDecoder15([
|
|
1044
|
+
["poolState", getAddressDecoder12()],
|
|
1045
|
+
["sender", getAddressDecoder12()],
|
|
1046
|
+
["tokenAccount0", getAddressDecoder12()],
|
|
1047
|
+
["tokenAccount1", getAddressDecoder12()],
|
|
1024
1048
|
["amount0", getU64Decoder11()],
|
|
1025
1049
|
["transferFee0", getU64Decoder11()],
|
|
1026
1050
|
["amount1", getU64Decoder11()],
|
|
@@ -1032,27 +1056,27 @@ function getSwapEventDecoder() {
|
|
|
1032
1056
|
]);
|
|
1033
1057
|
}
|
|
1034
1058
|
function getSwapEventCodec() {
|
|
1035
|
-
return
|
|
1059
|
+
return combineCodec15(getSwapEventEncoder(), getSwapEventDecoder());
|
|
1036
1060
|
}
|
|
1037
1061
|
|
|
1038
1062
|
// src/generated/types/tickState.ts
|
|
1039
1063
|
import {
|
|
1040
|
-
combineCodec as
|
|
1064
|
+
combineCodec as combineCodec16,
|
|
1041
1065
|
getArrayDecoder as getArrayDecoder4,
|
|
1042
1066
|
getArrayEncoder as getArrayEncoder4,
|
|
1043
1067
|
getI128Decoder,
|
|
1044
1068
|
getI128Encoder,
|
|
1045
1069
|
getI32Decoder as getI32Decoder6,
|
|
1046
1070
|
getI32Encoder as getI32Encoder6,
|
|
1047
|
-
getStructDecoder as
|
|
1048
|
-
getStructEncoder as
|
|
1071
|
+
getStructDecoder as getStructDecoder16,
|
|
1072
|
+
getStructEncoder as getStructEncoder16,
|
|
1049
1073
|
getU128Decoder as getU128Decoder10,
|
|
1050
1074
|
getU128Encoder as getU128Encoder10,
|
|
1051
1075
|
getU32Decoder as getU32Decoder4,
|
|
1052
1076
|
getU32Encoder as getU32Encoder4
|
|
1053
1077
|
} from "@solana/kit";
|
|
1054
1078
|
function getTickStateEncoder() {
|
|
1055
|
-
return
|
|
1079
|
+
return getStructEncoder16([
|
|
1056
1080
|
["tick", getI32Encoder6()],
|
|
1057
1081
|
["liquidityNet", getI128Encoder()],
|
|
1058
1082
|
["liquidityGross", getU128Encoder10()],
|
|
@@ -1063,7 +1087,7 @@ function getTickStateEncoder() {
|
|
|
1063
1087
|
]);
|
|
1064
1088
|
}
|
|
1065
1089
|
function getTickStateDecoder() {
|
|
1066
|
-
return
|
|
1090
|
+
return getStructDecoder16([
|
|
1067
1091
|
["tick", getI32Decoder6()],
|
|
1068
1092
|
["liquidityNet", getI128Decoder()],
|
|
1069
1093
|
["liquidityGross", getU128Decoder10()],
|
|
@@ -1074,31 +1098,31 @@ function getTickStateDecoder() {
|
|
|
1074
1098
|
]);
|
|
1075
1099
|
}
|
|
1076
1100
|
function getTickStateCodec() {
|
|
1077
|
-
return
|
|
1101
|
+
return combineCodec16(getTickStateEncoder(), getTickStateDecoder());
|
|
1078
1102
|
}
|
|
1079
1103
|
|
|
1080
1104
|
// src/generated/types/updateRewardInfosEvent.ts
|
|
1081
1105
|
import {
|
|
1082
|
-
combineCodec as
|
|
1106
|
+
combineCodec as combineCodec17,
|
|
1083
1107
|
getArrayDecoder as getArrayDecoder5,
|
|
1084
1108
|
getArrayEncoder as getArrayEncoder5,
|
|
1085
|
-
getStructDecoder as
|
|
1086
|
-
getStructEncoder as
|
|
1109
|
+
getStructDecoder as getStructDecoder17,
|
|
1110
|
+
getStructEncoder as getStructEncoder17,
|
|
1087
1111
|
getU128Decoder as getU128Decoder11,
|
|
1088
1112
|
getU128Encoder as getU128Encoder11
|
|
1089
1113
|
} from "@solana/kit";
|
|
1090
1114
|
function getUpdateRewardInfosEventEncoder() {
|
|
1091
|
-
return
|
|
1115
|
+
return getStructEncoder17([
|
|
1092
1116
|
["rewardGrowthGlobalX64", getArrayEncoder5(getU128Encoder11(), { size: 3 })]
|
|
1093
1117
|
]);
|
|
1094
1118
|
}
|
|
1095
1119
|
function getUpdateRewardInfosEventDecoder() {
|
|
1096
|
-
return
|
|
1120
|
+
return getStructDecoder17([
|
|
1097
1121
|
["rewardGrowthGlobalX64", getArrayDecoder5(getU128Decoder11(), { size: 3 })]
|
|
1098
1122
|
]);
|
|
1099
1123
|
}
|
|
1100
1124
|
function getUpdateRewardInfosEventCodec() {
|
|
1101
|
-
return
|
|
1125
|
+
return combineCodec17(
|
|
1102
1126
|
getUpdateRewardInfosEventEncoder(),
|
|
1103
1127
|
getUpdateRewardInfosEventDecoder()
|
|
1104
1128
|
);
|
|
@@ -1122,12 +1146,12 @@ function getObservationStateDiscriminatorBytes() {
|
|
|
1122
1146
|
}
|
|
1123
1147
|
function getObservationStateEncoder() {
|
|
1124
1148
|
return transformEncoder2(
|
|
1125
|
-
|
|
1149
|
+
getStructEncoder18([
|
|
1126
1150
|
["discriminator", fixEncoderSize2(getBytesEncoder2(), 8)],
|
|
1127
1151
|
["initialized", getBooleanEncoder2()],
|
|
1128
1152
|
["recentEpoch", getU64Encoder12()],
|
|
1129
1153
|
["observationIndex", getU16Encoder4()],
|
|
1130
|
-
["poolId",
|
|
1154
|
+
["poolId", getAddressEncoder13()],
|
|
1131
1155
|
["observations", getArrayEncoder6(getObservationEncoder(), { size: 100 })],
|
|
1132
1156
|
["padding", getArrayEncoder6(getU64Encoder12(), { size: 4 })]
|
|
1133
1157
|
]),
|
|
@@ -1135,18 +1159,18 @@ function getObservationStateEncoder() {
|
|
|
1135
1159
|
);
|
|
1136
1160
|
}
|
|
1137
1161
|
function getObservationStateDecoder() {
|
|
1138
|
-
return
|
|
1162
|
+
return getStructDecoder18([
|
|
1139
1163
|
["discriminator", fixDecoderSize2(getBytesDecoder2(), 8)],
|
|
1140
1164
|
["initialized", getBooleanDecoder2()],
|
|
1141
1165
|
["recentEpoch", getU64Decoder12()],
|
|
1142
1166
|
["observationIndex", getU16Decoder4()],
|
|
1143
|
-
["poolId",
|
|
1167
|
+
["poolId", getAddressDecoder13()],
|
|
1144
1168
|
["observations", getArrayDecoder6(getObservationDecoder(), { size: 100 })],
|
|
1145
1169
|
["padding", getArrayDecoder6(getU64Decoder12(), { size: 4 })]
|
|
1146
1170
|
]);
|
|
1147
1171
|
}
|
|
1148
1172
|
function getObservationStateCodec() {
|
|
1149
|
-
return
|
|
1173
|
+
return combineCodec18(
|
|
1150
1174
|
getObservationStateEncoder(),
|
|
1151
1175
|
getObservationStateDecoder()
|
|
1152
1176
|
);
|
|
@@ -1189,20 +1213,20 @@ function getObservationStateSize() {
|
|
|
1189
1213
|
import {
|
|
1190
1214
|
assertAccountExists as assertAccountExists3,
|
|
1191
1215
|
assertAccountsExist as assertAccountsExist3,
|
|
1192
|
-
combineCodec as
|
|
1216
|
+
combineCodec as combineCodec19,
|
|
1193
1217
|
decodeAccount as decodeAccount3,
|
|
1194
1218
|
fetchEncodedAccount as fetchEncodedAccount3,
|
|
1195
1219
|
fetchEncodedAccounts as fetchEncodedAccounts3,
|
|
1196
1220
|
fixDecoderSize as fixDecoderSize3,
|
|
1197
1221
|
fixEncoderSize as fixEncoderSize3,
|
|
1198
|
-
getAddressDecoder as
|
|
1199
|
-
getAddressEncoder as
|
|
1222
|
+
getAddressDecoder as getAddressDecoder14,
|
|
1223
|
+
getAddressEncoder as getAddressEncoder14,
|
|
1200
1224
|
getArrayDecoder as getArrayDecoder7,
|
|
1201
1225
|
getArrayEncoder as getArrayEncoder7,
|
|
1202
1226
|
getBytesDecoder as getBytesDecoder3,
|
|
1203
1227
|
getBytesEncoder as getBytesEncoder3,
|
|
1204
|
-
getStructDecoder as
|
|
1205
|
-
getStructEncoder as
|
|
1228
|
+
getStructDecoder as getStructDecoder19,
|
|
1229
|
+
getStructEncoder as getStructEncoder19,
|
|
1206
1230
|
getU8Decoder as getU8Decoder3,
|
|
1207
1231
|
getU8Encoder as getU8Encoder3,
|
|
1208
1232
|
transformEncoder as transformEncoder3
|
|
@@ -1224,25 +1248,25 @@ function getOperationStateDiscriminatorBytes() {
|
|
|
1224
1248
|
}
|
|
1225
1249
|
function getOperationStateEncoder() {
|
|
1226
1250
|
return transformEncoder3(
|
|
1227
|
-
|
|
1251
|
+
getStructEncoder19([
|
|
1228
1252
|
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
1229
1253
|
["bump", getU8Encoder3()],
|
|
1230
|
-
["operationOwners", getArrayEncoder7(
|
|
1231
|
-
["whitelistMints", getArrayEncoder7(
|
|
1254
|
+
["operationOwners", getArrayEncoder7(getAddressEncoder14(), { size: 10 })],
|
|
1255
|
+
["whitelistMints", getArrayEncoder7(getAddressEncoder14(), { size: 100 })]
|
|
1232
1256
|
]),
|
|
1233
1257
|
(value) => ({ ...value, discriminator: OPERATION_STATE_DISCRIMINATOR })
|
|
1234
1258
|
);
|
|
1235
1259
|
}
|
|
1236
1260
|
function getOperationStateDecoder() {
|
|
1237
|
-
return
|
|
1261
|
+
return getStructDecoder19([
|
|
1238
1262
|
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
1239
1263
|
["bump", getU8Decoder3()],
|
|
1240
|
-
["operationOwners", getArrayDecoder7(
|
|
1241
|
-
["whitelistMints", getArrayDecoder7(
|
|
1264
|
+
["operationOwners", getArrayDecoder7(getAddressDecoder14(), { size: 10 })],
|
|
1265
|
+
["whitelistMints", getArrayDecoder7(getAddressDecoder14(), { size: 100 })]
|
|
1242
1266
|
]);
|
|
1243
1267
|
}
|
|
1244
1268
|
function getOperationStateCodec() {
|
|
1245
|
-
return
|
|
1269
|
+
return combineCodec19(getOperationStateEncoder(), getOperationStateDecoder());
|
|
1246
1270
|
}
|
|
1247
1271
|
function decodeOperationState(encodedAccount) {
|
|
1248
1272
|
return decodeAccount3(
|
|
@@ -1282,22 +1306,22 @@ function getOperationStateSize() {
|
|
|
1282
1306
|
import {
|
|
1283
1307
|
assertAccountExists as assertAccountExists4,
|
|
1284
1308
|
assertAccountsExist as assertAccountsExist4,
|
|
1285
|
-
combineCodec as
|
|
1309
|
+
combineCodec as combineCodec20,
|
|
1286
1310
|
decodeAccount as decodeAccount4,
|
|
1287
1311
|
fetchEncodedAccount as fetchEncodedAccount4,
|
|
1288
1312
|
fetchEncodedAccounts as fetchEncodedAccounts4,
|
|
1289
1313
|
fixDecoderSize as fixDecoderSize4,
|
|
1290
1314
|
fixEncoderSize as fixEncoderSize4,
|
|
1291
|
-
getAddressDecoder as
|
|
1292
|
-
getAddressEncoder as
|
|
1315
|
+
getAddressDecoder as getAddressDecoder15,
|
|
1316
|
+
getAddressEncoder as getAddressEncoder15,
|
|
1293
1317
|
getArrayDecoder as getArrayDecoder8,
|
|
1294
1318
|
getArrayEncoder as getArrayEncoder8,
|
|
1295
1319
|
getBytesDecoder as getBytesDecoder4,
|
|
1296
1320
|
getBytesEncoder as getBytesEncoder4,
|
|
1297
1321
|
getI32Decoder as getI32Decoder7,
|
|
1298
1322
|
getI32Encoder as getI32Encoder7,
|
|
1299
|
-
getStructDecoder as
|
|
1300
|
-
getStructEncoder as
|
|
1323
|
+
getStructDecoder as getStructDecoder20,
|
|
1324
|
+
getStructEncoder as getStructEncoder20,
|
|
1301
1325
|
getU128Decoder as getU128Decoder12,
|
|
1302
1326
|
getU128Encoder as getU128Encoder12,
|
|
1303
1327
|
getU64Decoder as getU64Decoder13,
|
|
@@ -1321,11 +1345,11 @@ function getPersonalPositionStateDiscriminatorBytes() {
|
|
|
1321
1345
|
}
|
|
1322
1346
|
function getPersonalPositionStateEncoder() {
|
|
1323
1347
|
return transformEncoder4(
|
|
1324
|
-
|
|
1348
|
+
getStructEncoder20([
|
|
1325
1349
|
["discriminator", fixEncoderSize4(getBytesEncoder4(), 8)],
|
|
1326
1350
|
["bump", fixEncoderSize4(getBytesEncoder4(), 1)],
|
|
1327
|
-
["nftMint",
|
|
1328
|
-
["poolId",
|
|
1351
|
+
["nftMint", getAddressEncoder15()],
|
|
1352
|
+
["poolId", getAddressEncoder15()],
|
|
1329
1353
|
["tickLowerIndex", getI32Encoder7()],
|
|
1330
1354
|
["tickUpperIndex", getI32Encoder7()],
|
|
1331
1355
|
["liquidity", getU128Encoder12()],
|
|
@@ -1347,11 +1371,11 @@ function getPersonalPositionStateEncoder() {
|
|
|
1347
1371
|
);
|
|
1348
1372
|
}
|
|
1349
1373
|
function getPersonalPositionStateDecoder() {
|
|
1350
|
-
return
|
|
1374
|
+
return getStructDecoder20([
|
|
1351
1375
|
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
1352
1376
|
["bump", fixDecoderSize4(getBytesDecoder4(), 1)],
|
|
1353
|
-
["nftMint",
|
|
1354
|
-
["poolId",
|
|
1377
|
+
["nftMint", getAddressDecoder15()],
|
|
1378
|
+
["poolId", getAddressDecoder15()],
|
|
1355
1379
|
["tickLowerIndex", getI32Decoder7()],
|
|
1356
1380
|
["tickUpperIndex", getI32Decoder7()],
|
|
1357
1381
|
["liquidity", getU128Decoder12()],
|
|
@@ -1368,7 +1392,7 @@ function getPersonalPositionStateDecoder() {
|
|
|
1368
1392
|
]);
|
|
1369
1393
|
}
|
|
1370
1394
|
function getPersonalPositionStateCodec() {
|
|
1371
|
-
return
|
|
1395
|
+
return combineCodec20(
|
|
1372
1396
|
getPersonalPositionStateEncoder(),
|
|
1373
1397
|
getPersonalPositionStateDecoder()
|
|
1374
1398
|
);
|
|
@@ -1415,22 +1439,22 @@ function getPersonalPositionStateSize() {
|
|
|
1415
1439
|
import {
|
|
1416
1440
|
assertAccountExists as assertAccountExists5,
|
|
1417
1441
|
assertAccountsExist as assertAccountsExist5,
|
|
1418
|
-
combineCodec as
|
|
1442
|
+
combineCodec as combineCodec21,
|
|
1419
1443
|
decodeAccount as decodeAccount5,
|
|
1420
1444
|
fetchEncodedAccount as fetchEncodedAccount5,
|
|
1421
1445
|
fetchEncodedAccounts as fetchEncodedAccounts5,
|
|
1422
1446
|
fixDecoderSize as fixDecoderSize5,
|
|
1423
1447
|
fixEncoderSize as fixEncoderSize5,
|
|
1424
|
-
getAddressDecoder as
|
|
1425
|
-
getAddressEncoder as
|
|
1448
|
+
getAddressDecoder as getAddressDecoder16,
|
|
1449
|
+
getAddressEncoder as getAddressEncoder16,
|
|
1426
1450
|
getArrayDecoder as getArrayDecoder9,
|
|
1427
1451
|
getArrayEncoder as getArrayEncoder9,
|
|
1428
1452
|
getBytesDecoder as getBytesDecoder5,
|
|
1429
1453
|
getBytesEncoder as getBytesEncoder5,
|
|
1430
1454
|
getI32Decoder as getI32Decoder8,
|
|
1431
1455
|
getI32Encoder as getI32Encoder8,
|
|
1432
|
-
getStructDecoder as
|
|
1433
|
-
getStructEncoder as
|
|
1456
|
+
getStructDecoder as getStructDecoder21,
|
|
1457
|
+
getStructEncoder as getStructEncoder21,
|
|
1434
1458
|
getU128Decoder as getU128Decoder13,
|
|
1435
1459
|
getU128Encoder as getU128Encoder13,
|
|
1436
1460
|
getU16Decoder as getU16Decoder5,
|
|
@@ -1456,16 +1480,16 @@ function getPoolStateDiscriminatorBytes() {
|
|
|
1456
1480
|
}
|
|
1457
1481
|
function getPoolStateEncoder() {
|
|
1458
1482
|
return transformEncoder5(
|
|
1459
|
-
|
|
1483
|
+
getStructEncoder21([
|
|
1460
1484
|
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
1461
1485
|
["bump", fixEncoderSize5(getBytesEncoder5(), 1)],
|
|
1462
|
-
["ammConfig",
|
|
1463
|
-
["owner",
|
|
1464
|
-
["tokenMint0",
|
|
1465
|
-
["tokenMint1",
|
|
1466
|
-
["tokenVault0",
|
|
1467
|
-
["tokenVault1",
|
|
1468
|
-
["observationKey",
|
|
1486
|
+
["ammConfig", getAddressEncoder16()],
|
|
1487
|
+
["owner", getAddressEncoder16()],
|
|
1488
|
+
["tokenMint0", getAddressEncoder16()],
|
|
1489
|
+
["tokenMint1", getAddressEncoder16()],
|
|
1490
|
+
["tokenVault0", getAddressEncoder16()],
|
|
1491
|
+
["tokenVault1", getAddressEncoder16()],
|
|
1492
|
+
["observationKey", getAddressEncoder16()],
|
|
1469
1493
|
["mintDecimals0", getU8Encoder4()],
|
|
1470
1494
|
["mintDecimals1", getU8Encoder4()],
|
|
1471
1495
|
["tickSpacing", getU16Encoder5()],
|
|
@@ -1501,16 +1525,16 @@ function getPoolStateEncoder() {
|
|
|
1501
1525
|
);
|
|
1502
1526
|
}
|
|
1503
1527
|
function getPoolStateDecoder() {
|
|
1504
|
-
return
|
|
1528
|
+
return getStructDecoder21([
|
|
1505
1529
|
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)],
|
|
1506
1530
|
["bump", fixDecoderSize5(getBytesDecoder5(), 1)],
|
|
1507
|
-
["ammConfig",
|
|
1508
|
-
["owner",
|
|
1509
|
-
["tokenMint0",
|
|
1510
|
-
["tokenMint1",
|
|
1511
|
-
["tokenVault0",
|
|
1512
|
-
["tokenVault1",
|
|
1513
|
-
["observationKey",
|
|
1531
|
+
["ammConfig", getAddressDecoder16()],
|
|
1532
|
+
["owner", getAddressDecoder16()],
|
|
1533
|
+
["tokenMint0", getAddressDecoder16()],
|
|
1534
|
+
["tokenMint1", getAddressDecoder16()],
|
|
1535
|
+
["tokenVault0", getAddressDecoder16()],
|
|
1536
|
+
["tokenVault1", getAddressDecoder16()],
|
|
1537
|
+
["observationKey", getAddressDecoder16()],
|
|
1514
1538
|
["mintDecimals0", getU8Decoder4()],
|
|
1515
1539
|
["mintDecimals1", getU8Decoder4()],
|
|
1516
1540
|
["tickSpacing", getU16Decoder5()],
|
|
@@ -1544,7 +1568,7 @@ function getPoolStateDecoder() {
|
|
|
1544
1568
|
]);
|
|
1545
1569
|
}
|
|
1546
1570
|
function getPoolStateCodec() {
|
|
1547
|
-
return
|
|
1571
|
+
return combineCodec21(getPoolStateEncoder(), getPoolStateDecoder());
|
|
1548
1572
|
}
|
|
1549
1573
|
function decodePoolState(encodedAccount) {
|
|
1550
1574
|
return decodeAccount5(
|
|
@@ -1578,22 +1602,22 @@ function getPoolStateSize() {
|
|
|
1578
1602
|
import {
|
|
1579
1603
|
assertAccountExists as assertAccountExists6,
|
|
1580
1604
|
assertAccountsExist as assertAccountsExist6,
|
|
1581
|
-
combineCodec as
|
|
1605
|
+
combineCodec as combineCodec22,
|
|
1582
1606
|
decodeAccount as decodeAccount6,
|
|
1583
1607
|
fetchEncodedAccount as fetchEncodedAccount6,
|
|
1584
1608
|
fetchEncodedAccounts as fetchEncodedAccounts6,
|
|
1585
1609
|
fixDecoderSize as fixDecoderSize6,
|
|
1586
1610
|
fixEncoderSize as fixEncoderSize6,
|
|
1587
|
-
getAddressDecoder as
|
|
1588
|
-
getAddressEncoder as
|
|
1611
|
+
getAddressDecoder as getAddressDecoder17,
|
|
1612
|
+
getAddressEncoder as getAddressEncoder17,
|
|
1589
1613
|
getArrayDecoder as getArrayDecoder10,
|
|
1590
1614
|
getArrayEncoder as getArrayEncoder10,
|
|
1591
1615
|
getBytesDecoder as getBytesDecoder6,
|
|
1592
1616
|
getBytesEncoder as getBytesEncoder6,
|
|
1593
1617
|
getI32Decoder as getI32Decoder9,
|
|
1594
1618
|
getI32Encoder as getI32Encoder9,
|
|
1595
|
-
getStructDecoder as
|
|
1596
|
-
getStructEncoder as
|
|
1619
|
+
getStructDecoder as getStructDecoder22,
|
|
1620
|
+
getStructEncoder as getStructEncoder22,
|
|
1597
1621
|
getU128Decoder as getU128Decoder14,
|
|
1598
1622
|
getU128Encoder as getU128Encoder14,
|
|
1599
1623
|
getU64Decoder as getU64Decoder15,
|
|
@@ -1619,10 +1643,10 @@ function getProtocolPositionStateDiscriminatorBytes() {
|
|
|
1619
1643
|
}
|
|
1620
1644
|
function getProtocolPositionStateEncoder() {
|
|
1621
1645
|
return transformEncoder6(
|
|
1622
|
-
|
|
1646
|
+
getStructEncoder22([
|
|
1623
1647
|
["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)],
|
|
1624
1648
|
["bump", getU8Encoder5()],
|
|
1625
|
-
["poolId",
|
|
1649
|
+
["poolId", getAddressEncoder17()],
|
|
1626
1650
|
["tickLowerIndex", getI32Encoder9()],
|
|
1627
1651
|
["tickUpperIndex", getI32Encoder9()],
|
|
1628
1652
|
["liquidity", getU128Encoder14()],
|
|
@@ -1641,10 +1665,10 @@ function getProtocolPositionStateEncoder() {
|
|
|
1641
1665
|
);
|
|
1642
1666
|
}
|
|
1643
1667
|
function getProtocolPositionStateDecoder() {
|
|
1644
|
-
return
|
|
1668
|
+
return getStructDecoder22([
|
|
1645
1669
|
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)],
|
|
1646
1670
|
["bump", getU8Decoder5()],
|
|
1647
|
-
["poolId",
|
|
1671
|
+
["poolId", getAddressDecoder17()],
|
|
1648
1672
|
["tickLowerIndex", getI32Decoder9()],
|
|
1649
1673
|
["tickUpperIndex", getI32Decoder9()],
|
|
1650
1674
|
["liquidity", getU128Decoder14()],
|
|
@@ -1658,7 +1682,7 @@ function getProtocolPositionStateDecoder() {
|
|
|
1658
1682
|
]);
|
|
1659
1683
|
}
|
|
1660
1684
|
function getProtocolPositionStateCodec() {
|
|
1661
|
-
return
|
|
1685
|
+
return combineCodec22(
|
|
1662
1686
|
getProtocolPositionStateEncoder(),
|
|
1663
1687
|
getProtocolPositionStateDecoder()
|
|
1664
1688
|
);
|
|
@@ -1705,20 +1729,20 @@ function getProtocolPositionStateSize() {
|
|
|
1705
1729
|
import {
|
|
1706
1730
|
assertAccountExists as assertAccountExists7,
|
|
1707
1731
|
assertAccountsExist as assertAccountsExist7,
|
|
1708
|
-
combineCodec as
|
|
1732
|
+
combineCodec as combineCodec23,
|
|
1709
1733
|
decodeAccount as decodeAccount7,
|
|
1710
1734
|
fetchEncodedAccount as fetchEncodedAccount7,
|
|
1711
1735
|
fetchEncodedAccounts as fetchEncodedAccounts7,
|
|
1712
1736
|
fixDecoderSize as fixDecoderSize7,
|
|
1713
1737
|
fixEncoderSize as fixEncoderSize7,
|
|
1714
|
-
getAddressDecoder as
|
|
1715
|
-
getAddressEncoder as
|
|
1738
|
+
getAddressDecoder as getAddressDecoder18,
|
|
1739
|
+
getAddressEncoder as getAddressEncoder18,
|
|
1716
1740
|
getArrayDecoder as getArrayDecoder11,
|
|
1717
1741
|
getArrayEncoder as getArrayEncoder11,
|
|
1718
1742
|
getBytesDecoder as getBytesDecoder7,
|
|
1719
1743
|
getBytesEncoder as getBytesEncoder7,
|
|
1720
|
-
getStructDecoder as
|
|
1721
|
-
getStructEncoder as
|
|
1744
|
+
getStructDecoder as getStructDecoder23,
|
|
1745
|
+
getStructEncoder as getStructEncoder23,
|
|
1722
1746
|
getU64Decoder as getU64Decoder16,
|
|
1723
1747
|
getU64Encoder as getU64Encoder16,
|
|
1724
1748
|
getU8Decoder as getU8Decoder6,
|
|
@@ -1742,10 +1766,10 @@ function getSupportMintAssociatedDiscriminatorBytes() {
|
|
|
1742
1766
|
}
|
|
1743
1767
|
function getSupportMintAssociatedEncoder() {
|
|
1744
1768
|
return transformEncoder7(
|
|
1745
|
-
|
|
1769
|
+
getStructEncoder23([
|
|
1746
1770
|
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
1747
1771
|
["bump", getU8Encoder6()],
|
|
1748
|
-
["mint",
|
|
1772
|
+
["mint", getAddressEncoder18()],
|
|
1749
1773
|
["padding", getArrayEncoder11(getU64Encoder16(), { size: 8 })]
|
|
1750
1774
|
]),
|
|
1751
1775
|
(value) => ({
|
|
@@ -1755,15 +1779,15 @@ function getSupportMintAssociatedEncoder() {
|
|
|
1755
1779
|
);
|
|
1756
1780
|
}
|
|
1757
1781
|
function getSupportMintAssociatedDecoder() {
|
|
1758
|
-
return
|
|
1782
|
+
return getStructDecoder23([
|
|
1759
1783
|
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
1760
1784
|
["bump", getU8Decoder6()],
|
|
1761
|
-
["mint",
|
|
1785
|
+
["mint", getAddressDecoder18()],
|
|
1762
1786
|
["padding", getArrayDecoder11(getU64Decoder16(), { size: 8 })]
|
|
1763
1787
|
]);
|
|
1764
1788
|
}
|
|
1765
1789
|
function getSupportMintAssociatedCodec() {
|
|
1766
|
-
return
|
|
1790
|
+
return combineCodec23(
|
|
1767
1791
|
getSupportMintAssociatedEncoder(),
|
|
1768
1792
|
getSupportMintAssociatedDecoder()
|
|
1769
1793
|
);
|
|
@@ -1810,20 +1834,20 @@ function getSupportMintAssociatedSize() {
|
|
|
1810
1834
|
import {
|
|
1811
1835
|
assertAccountExists as assertAccountExists8,
|
|
1812
1836
|
assertAccountsExist as assertAccountsExist8,
|
|
1813
|
-
combineCodec as
|
|
1837
|
+
combineCodec as combineCodec24,
|
|
1814
1838
|
decodeAccount as decodeAccount8,
|
|
1815
1839
|
fetchEncodedAccount as fetchEncodedAccount8,
|
|
1816
1840
|
fetchEncodedAccounts as fetchEncodedAccounts8,
|
|
1817
1841
|
fixDecoderSize as fixDecoderSize8,
|
|
1818
1842
|
fixEncoderSize as fixEncoderSize8,
|
|
1819
|
-
getAddressDecoder as
|
|
1820
|
-
getAddressEncoder as
|
|
1843
|
+
getAddressDecoder as getAddressDecoder19,
|
|
1844
|
+
getAddressEncoder as getAddressEncoder19,
|
|
1821
1845
|
getArrayDecoder as getArrayDecoder12,
|
|
1822
1846
|
getArrayEncoder as getArrayEncoder12,
|
|
1823
1847
|
getBytesDecoder as getBytesDecoder8,
|
|
1824
1848
|
getBytesEncoder as getBytesEncoder8,
|
|
1825
|
-
getStructDecoder as
|
|
1826
|
-
getStructEncoder as
|
|
1849
|
+
getStructDecoder as getStructDecoder24,
|
|
1850
|
+
getStructEncoder as getStructEncoder24,
|
|
1827
1851
|
getU64Decoder as getU64Decoder17,
|
|
1828
1852
|
getU64Encoder as getU64Encoder17,
|
|
1829
1853
|
transformEncoder as transformEncoder8
|
|
@@ -1845,9 +1869,9 @@ function getTickArrayBitmapExtensionDiscriminatorBytes() {
|
|
|
1845
1869
|
}
|
|
1846
1870
|
function getTickArrayBitmapExtensionEncoder() {
|
|
1847
1871
|
return transformEncoder8(
|
|
1848
|
-
|
|
1872
|
+
getStructEncoder24([
|
|
1849
1873
|
["discriminator", fixEncoderSize8(getBytesEncoder8(), 8)],
|
|
1850
|
-
["poolId",
|
|
1874
|
+
["poolId", getAddressEncoder19()],
|
|
1851
1875
|
[
|
|
1852
1876
|
"positiveTickArrayBitmap",
|
|
1853
1877
|
getArrayEncoder12(getArrayEncoder12(getU64Encoder17(), { size: 8 }), {
|
|
@@ -1868,9 +1892,9 @@ function getTickArrayBitmapExtensionEncoder() {
|
|
|
1868
1892
|
);
|
|
1869
1893
|
}
|
|
1870
1894
|
function getTickArrayBitmapExtensionDecoder() {
|
|
1871
|
-
return
|
|
1895
|
+
return getStructDecoder24([
|
|
1872
1896
|
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
1873
|
-
["poolId",
|
|
1897
|
+
["poolId", getAddressDecoder19()],
|
|
1874
1898
|
[
|
|
1875
1899
|
"positiveTickArrayBitmap",
|
|
1876
1900
|
getArrayDecoder12(getArrayDecoder12(getU64Decoder17(), { size: 8 }), {
|
|
@@ -1886,7 +1910,7 @@ function getTickArrayBitmapExtensionDecoder() {
|
|
|
1886
1910
|
]);
|
|
1887
1911
|
}
|
|
1888
1912
|
function getTickArrayBitmapExtensionCodec() {
|
|
1889
|
-
return
|
|
1913
|
+
return combineCodec24(
|
|
1890
1914
|
getTickArrayBitmapExtensionEncoder(),
|
|
1891
1915
|
getTickArrayBitmapExtensionDecoder()
|
|
1892
1916
|
);
|
|
@@ -1933,22 +1957,22 @@ function getTickArrayBitmapExtensionSize() {
|
|
|
1933
1957
|
import {
|
|
1934
1958
|
assertAccountExists as assertAccountExists9,
|
|
1935
1959
|
assertAccountsExist as assertAccountsExist9,
|
|
1936
|
-
combineCodec as
|
|
1960
|
+
combineCodec as combineCodec25,
|
|
1937
1961
|
decodeAccount as decodeAccount9,
|
|
1938
1962
|
fetchEncodedAccount as fetchEncodedAccount9,
|
|
1939
1963
|
fetchEncodedAccounts as fetchEncodedAccounts9,
|
|
1940
1964
|
fixDecoderSize as fixDecoderSize9,
|
|
1941
1965
|
fixEncoderSize as fixEncoderSize9,
|
|
1942
|
-
getAddressDecoder as
|
|
1943
|
-
getAddressEncoder as
|
|
1966
|
+
getAddressDecoder as getAddressDecoder20,
|
|
1967
|
+
getAddressEncoder as getAddressEncoder20,
|
|
1944
1968
|
getArrayDecoder as getArrayDecoder13,
|
|
1945
1969
|
getArrayEncoder as getArrayEncoder13,
|
|
1946
1970
|
getBytesDecoder as getBytesDecoder9,
|
|
1947
1971
|
getBytesEncoder as getBytesEncoder9,
|
|
1948
1972
|
getI32Decoder as getI32Decoder10,
|
|
1949
1973
|
getI32Encoder as getI32Encoder10,
|
|
1950
|
-
getStructDecoder as
|
|
1951
|
-
getStructEncoder as
|
|
1974
|
+
getStructDecoder as getStructDecoder25,
|
|
1975
|
+
getStructEncoder as getStructEncoder25,
|
|
1952
1976
|
getU64Decoder as getU64Decoder18,
|
|
1953
1977
|
getU64Encoder as getU64Encoder18,
|
|
1954
1978
|
getU8Decoder as getU8Decoder7,
|
|
@@ -1972,9 +1996,9 @@ function getTickArrayStateDiscriminatorBytes() {
|
|
|
1972
1996
|
}
|
|
1973
1997
|
function getTickArrayStateEncoder() {
|
|
1974
1998
|
return transformEncoder9(
|
|
1975
|
-
|
|
1999
|
+
getStructEncoder25([
|
|
1976
2000
|
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
1977
|
-
["poolId",
|
|
2001
|
+
["poolId", getAddressEncoder20()],
|
|
1978
2002
|
["startTickIndex", getI32Encoder10()],
|
|
1979
2003
|
["ticks", getArrayEncoder13(getTickStateEncoder(), { size: 60 })],
|
|
1980
2004
|
["initializedTickCount", getU8Encoder7()],
|
|
@@ -1985,9 +2009,9 @@ function getTickArrayStateEncoder() {
|
|
|
1985
2009
|
);
|
|
1986
2010
|
}
|
|
1987
2011
|
function getTickArrayStateDecoder() {
|
|
1988
|
-
return
|
|
2012
|
+
return getStructDecoder25([
|
|
1989
2013
|
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
1990
|
-
["poolId",
|
|
2014
|
+
["poolId", getAddressDecoder20()],
|
|
1991
2015
|
["startTickIndex", getI32Decoder10()],
|
|
1992
2016
|
["ticks", getArrayDecoder13(getTickStateDecoder(), { size: 60 })],
|
|
1993
2017
|
["initializedTickCount", getU8Decoder7()],
|
|
@@ -1996,7 +2020,7 @@ function getTickArrayStateDecoder() {
|
|
|
1996
2020
|
]);
|
|
1997
2021
|
}
|
|
1998
2022
|
function getTickArrayStateCodec() {
|
|
1999
|
-
return
|
|
2023
|
+
return combineCodec25(getTickArrayStateEncoder(), getTickArrayStateDecoder());
|
|
2000
2024
|
}
|
|
2001
2025
|
function decodeTickArrayState(encodedAccount) {
|
|
2002
2026
|
return decodeAccount9(
|
|
@@ -2476,15 +2500,15 @@ function isAmmV3Error(error, transactionMessage, code) {
|
|
|
2476
2500
|
|
|
2477
2501
|
// src/generated/instructions/closePosition.ts
|
|
2478
2502
|
import {
|
|
2479
|
-
combineCodec as
|
|
2503
|
+
combineCodec as combineCodec26,
|
|
2480
2504
|
fixDecoderSize as fixDecoderSize10,
|
|
2481
2505
|
fixEncoderSize as fixEncoderSize11,
|
|
2482
|
-
getAddressEncoder as
|
|
2506
|
+
getAddressEncoder as getAddressEncoder21,
|
|
2483
2507
|
getBytesDecoder as getBytesDecoder10,
|
|
2484
2508
|
getBytesEncoder as getBytesEncoder11,
|
|
2485
2509
|
getProgramDerivedAddress,
|
|
2486
|
-
getStructDecoder as
|
|
2487
|
-
getStructEncoder as
|
|
2510
|
+
getStructDecoder as getStructDecoder26,
|
|
2511
|
+
getStructEncoder as getStructEncoder26,
|
|
2488
2512
|
transformEncoder as transformEncoder10
|
|
2489
2513
|
} from "@solana/kit";
|
|
2490
2514
|
|
|
@@ -2552,17 +2576,17 @@ function getClosePositionDiscriminatorBytes() {
|
|
|
2552
2576
|
}
|
|
2553
2577
|
function getClosePositionInstructionDataEncoder() {
|
|
2554
2578
|
return transformEncoder10(
|
|
2555
|
-
|
|
2579
|
+
getStructEncoder26([["discriminator", fixEncoderSize11(getBytesEncoder11(), 8)]]),
|
|
2556
2580
|
(value) => ({ ...value, discriminator: CLOSE_POSITION_DISCRIMINATOR })
|
|
2557
2581
|
);
|
|
2558
2582
|
}
|
|
2559
2583
|
function getClosePositionInstructionDataDecoder() {
|
|
2560
|
-
return
|
|
2584
|
+
return getStructDecoder26([
|
|
2561
2585
|
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)]
|
|
2562
2586
|
]);
|
|
2563
2587
|
}
|
|
2564
2588
|
function getClosePositionInstructionDataCodec() {
|
|
2565
|
-
return
|
|
2589
|
+
return combineCodec26(
|
|
2566
2590
|
getClosePositionInstructionDataEncoder(),
|
|
2567
2591
|
getClosePositionInstructionDataDecoder()
|
|
2568
2592
|
);
|
|
@@ -2591,7 +2615,7 @@ async function getClosePositionInstructionAsync(input, config) {
|
|
|
2591
2615
|
getBytesEncoder11().encode(
|
|
2592
2616
|
new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
|
|
2593
2617
|
),
|
|
2594
|
-
|
|
2618
|
+
getAddressEncoder21().encode(
|
|
2595
2619
|
expectAddress(accounts.positionNftMint.value)
|
|
2596
2620
|
)
|
|
2597
2621
|
]
|
|
@@ -2680,13 +2704,13 @@ function parseClosePositionInstruction(instruction) {
|
|
|
2680
2704
|
|
|
2681
2705
|
// src/generated/instructions/closeProtocolPosition.ts
|
|
2682
2706
|
import {
|
|
2683
|
-
combineCodec as
|
|
2707
|
+
combineCodec as combineCodec27,
|
|
2684
2708
|
fixDecoderSize as fixDecoderSize11,
|
|
2685
2709
|
fixEncoderSize as fixEncoderSize12,
|
|
2686
2710
|
getBytesDecoder as getBytesDecoder11,
|
|
2687
2711
|
getBytesEncoder as getBytesEncoder12,
|
|
2688
|
-
getStructDecoder as
|
|
2689
|
-
getStructEncoder as
|
|
2712
|
+
getStructDecoder as getStructDecoder27,
|
|
2713
|
+
getStructEncoder as getStructEncoder27,
|
|
2690
2714
|
transformEncoder as transformEncoder11
|
|
2691
2715
|
} from "@solana/kit";
|
|
2692
2716
|
var CLOSE_PROTOCOL_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
@@ -2706,7 +2730,7 @@ function getCloseProtocolPositionDiscriminatorBytes() {
|
|
|
2706
2730
|
}
|
|
2707
2731
|
function getCloseProtocolPositionInstructionDataEncoder() {
|
|
2708
2732
|
return transformEncoder11(
|
|
2709
|
-
|
|
2733
|
+
getStructEncoder27([["discriminator", fixEncoderSize12(getBytesEncoder12(), 8)]]),
|
|
2710
2734
|
(value) => ({
|
|
2711
2735
|
...value,
|
|
2712
2736
|
discriminator: CLOSE_PROTOCOL_POSITION_DISCRIMINATOR
|
|
@@ -2714,12 +2738,12 @@ function getCloseProtocolPositionInstructionDataEncoder() {
|
|
|
2714
2738
|
);
|
|
2715
2739
|
}
|
|
2716
2740
|
function getCloseProtocolPositionInstructionDataDecoder() {
|
|
2717
|
-
return
|
|
2741
|
+
return getStructDecoder27([
|
|
2718
2742
|
["discriminator", fixDecoderSize11(getBytesDecoder11(), 8)]
|
|
2719
2743
|
]);
|
|
2720
2744
|
}
|
|
2721
2745
|
function getCloseProtocolPositionInstructionDataCodec() {
|
|
2722
|
-
return
|
|
2746
|
+
return combineCodec27(
|
|
2723
2747
|
getCloseProtocolPositionInstructionDataEncoder(),
|
|
2724
2748
|
getCloseProtocolPositionInstructionDataDecoder()
|
|
2725
2749
|
);
|
|
@@ -2768,13 +2792,13 @@ function parseCloseProtocolPositionInstruction(instruction) {
|
|
|
2768
2792
|
|
|
2769
2793
|
// src/generated/instructions/collectFundFee.ts
|
|
2770
2794
|
import {
|
|
2771
|
-
combineCodec as
|
|
2795
|
+
combineCodec as combineCodec28,
|
|
2772
2796
|
fixDecoderSize as fixDecoderSize12,
|
|
2773
2797
|
fixEncoderSize as fixEncoderSize13,
|
|
2774
2798
|
getBytesDecoder as getBytesDecoder12,
|
|
2775
2799
|
getBytesEncoder as getBytesEncoder13,
|
|
2776
|
-
getStructDecoder as
|
|
2777
|
-
getStructEncoder as
|
|
2800
|
+
getStructDecoder as getStructDecoder28,
|
|
2801
|
+
getStructEncoder as getStructEncoder28,
|
|
2778
2802
|
getU64Decoder as getU64Decoder19,
|
|
2779
2803
|
getU64Encoder as getU64Encoder19,
|
|
2780
2804
|
transformEncoder as transformEncoder12
|
|
@@ -2796,7 +2820,7 @@ function getCollectFundFeeDiscriminatorBytes() {
|
|
|
2796
2820
|
}
|
|
2797
2821
|
function getCollectFundFeeInstructionDataEncoder() {
|
|
2798
2822
|
return transformEncoder12(
|
|
2799
|
-
|
|
2823
|
+
getStructEncoder28([
|
|
2800
2824
|
["discriminator", fixEncoderSize13(getBytesEncoder13(), 8)],
|
|
2801
2825
|
["amount0Requested", getU64Encoder19()],
|
|
2802
2826
|
["amount1Requested", getU64Encoder19()]
|
|
@@ -2805,14 +2829,14 @@ function getCollectFundFeeInstructionDataEncoder() {
|
|
|
2805
2829
|
);
|
|
2806
2830
|
}
|
|
2807
2831
|
function getCollectFundFeeInstructionDataDecoder() {
|
|
2808
|
-
return
|
|
2832
|
+
return getStructDecoder28([
|
|
2809
2833
|
["discriminator", fixDecoderSize12(getBytesDecoder12(), 8)],
|
|
2810
2834
|
["amount0Requested", getU64Decoder19()],
|
|
2811
2835
|
["amount1Requested", getU64Decoder19()]
|
|
2812
2836
|
]);
|
|
2813
2837
|
}
|
|
2814
2838
|
function getCollectFundFeeInstructionDataCodec() {
|
|
2815
|
-
return
|
|
2839
|
+
return combineCodec28(
|
|
2816
2840
|
getCollectFundFeeInstructionDataEncoder(),
|
|
2817
2841
|
getCollectFundFeeInstructionDataDecoder()
|
|
2818
2842
|
);
|
|
@@ -2901,13 +2925,13 @@ function parseCollectFundFeeInstruction(instruction) {
|
|
|
2901
2925
|
|
|
2902
2926
|
// src/generated/instructions/collectProtocolFee.ts
|
|
2903
2927
|
import {
|
|
2904
|
-
combineCodec as
|
|
2928
|
+
combineCodec as combineCodec29,
|
|
2905
2929
|
fixDecoderSize as fixDecoderSize13,
|
|
2906
2930
|
fixEncoderSize as fixEncoderSize14,
|
|
2907
2931
|
getBytesDecoder as getBytesDecoder13,
|
|
2908
2932
|
getBytesEncoder as getBytesEncoder14,
|
|
2909
|
-
getStructDecoder as
|
|
2910
|
-
getStructEncoder as
|
|
2933
|
+
getStructDecoder as getStructDecoder29,
|
|
2934
|
+
getStructEncoder as getStructEncoder29,
|
|
2911
2935
|
getU64Decoder as getU64Decoder20,
|
|
2912
2936
|
getU64Encoder as getU64Encoder20,
|
|
2913
2937
|
transformEncoder as transformEncoder13
|
|
@@ -2929,7 +2953,7 @@ function getCollectProtocolFeeDiscriminatorBytes() {
|
|
|
2929
2953
|
}
|
|
2930
2954
|
function getCollectProtocolFeeInstructionDataEncoder() {
|
|
2931
2955
|
return transformEncoder13(
|
|
2932
|
-
|
|
2956
|
+
getStructEncoder29([
|
|
2933
2957
|
["discriminator", fixEncoderSize14(getBytesEncoder14(), 8)],
|
|
2934
2958
|
["amount0Requested", getU64Encoder20()],
|
|
2935
2959
|
["amount1Requested", getU64Encoder20()]
|
|
@@ -2938,14 +2962,14 @@ function getCollectProtocolFeeInstructionDataEncoder() {
|
|
|
2938
2962
|
);
|
|
2939
2963
|
}
|
|
2940
2964
|
function getCollectProtocolFeeInstructionDataDecoder() {
|
|
2941
|
-
return
|
|
2965
|
+
return getStructDecoder29([
|
|
2942
2966
|
["discriminator", fixDecoderSize13(getBytesDecoder13(), 8)],
|
|
2943
2967
|
["amount0Requested", getU64Decoder20()],
|
|
2944
2968
|
["amount1Requested", getU64Decoder20()]
|
|
2945
2969
|
]);
|
|
2946
2970
|
}
|
|
2947
2971
|
function getCollectProtocolFeeInstructionDataCodec() {
|
|
2948
|
-
return
|
|
2972
|
+
return combineCodec29(
|
|
2949
2973
|
getCollectProtocolFeeInstructionDataEncoder(),
|
|
2950
2974
|
getCollectProtocolFeeInstructionDataDecoder()
|
|
2951
2975
|
);
|
|
@@ -3036,13 +3060,13 @@ function parseCollectProtocolFeeInstruction(instruction) {
|
|
|
3036
3060
|
|
|
3037
3061
|
// src/generated/instructions/collectRemainingRewards.ts
|
|
3038
3062
|
import {
|
|
3039
|
-
combineCodec as
|
|
3063
|
+
combineCodec as combineCodec30,
|
|
3040
3064
|
fixDecoderSize as fixDecoderSize14,
|
|
3041
3065
|
fixEncoderSize as fixEncoderSize15,
|
|
3042
3066
|
getBytesDecoder as getBytesDecoder14,
|
|
3043
3067
|
getBytesEncoder as getBytesEncoder15,
|
|
3044
|
-
getStructDecoder as
|
|
3045
|
-
getStructEncoder as
|
|
3068
|
+
getStructDecoder as getStructDecoder30,
|
|
3069
|
+
getStructEncoder as getStructEncoder30,
|
|
3046
3070
|
getU8Decoder as getU8Decoder8,
|
|
3047
3071
|
getU8Encoder as getU8Encoder8,
|
|
3048
3072
|
transformEncoder as transformEncoder14
|
|
@@ -3064,7 +3088,7 @@ function getCollectRemainingRewardsDiscriminatorBytes() {
|
|
|
3064
3088
|
}
|
|
3065
3089
|
function getCollectRemainingRewardsInstructionDataEncoder() {
|
|
3066
3090
|
return transformEncoder14(
|
|
3067
|
-
|
|
3091
|
+
getStructEncoder30([
|
|
3068
3092
|
["discriminator", fixEncoderSize15(getBytesEncoder15(), 8)],
|
|
3069
3093
|
["rewardIndex", getU8Encoder8()]
|
|
3070
3094
|
]),
|
|
@@ -3075,13 +3099,13 @@ function getCollectRemainingRewardsInstructionDataEncoder() {
|
|
|
3075
3099
|
);
|
|
3076
3100
|
}
|
|
3077
3101
|
function getCollectRemainingRewardsInstructionDataDecoder() {
|
|
3078
|
-
return
|
|
3102
|
+
return getStructDecoder30([
|
|
3079
3103
|
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)],
|
|
3080
3104
|
["rewardIndex", getU8Decoder8()]
|
|
3081
3105
|
]);
|
|
3082
3106
|
}
|
|
3083
3107
|
function getCollectRemainingRewardsInstructionDataCodec() {
|
|
3084
|
-
return
|
|
3108
|
+
return combineCodec30(
|
|
3085
3109
|
getCollectRemainingRewardsInstructionDataEncoder(),
|
|
3086
3110
|
getCollectRemainingRewardsInstructionDataDecoder()
|
|
3087
3111
|
);
|
|
@@ -3169,14 +3193,14 @@ function parseCollectRemainingRewardsInstruction(instruction) {
|
|
|
3169
3193
|
|
|
3170
3194
|
// src/generated/instructions/createAmmConfig.ts
|
|
3171
3195
|
import {
|
|
3172
|
-
combineCodec as
|
|
3196
|
+
combineCodec as combineCodec31,
|
|
3173
3197
|
fixDecoderSize as fixDecoderSize15,
|
|
3174
3198
|
fixEncoderSize as fixEncoderSize16,
|
|
3175
3199
|
getBytesDecoder as getBytesDecoder15,
|
|
3176
3200
|
getBytesEncoder as getBytesEncoder16,
|
|
3177
3201
|
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
3178
|
-
getStructDecoder as
|
|
3179
|
-
getStructEncoder as
|
|
3202
|
+
getStructDecoder as getStructDecoder31,
|
|
3203
|
+
getStructEncoder as getStructEncoder31,
|
|
3180
3204
|
getU16Decoder as getU16Decoder6,
|
|
3181
3205
|
getU16Encoder as getU16Encoder6,
|
|
3182
3206
|
getU32Decoder as getU32Decoder5,
|
|
@@ -3200,7 +3224,7 @@ function getCreateAmmConfigDiscriminatorBytes() {
|
|
|
3200
3224
|
}
|
|
3201
3225
|
function getCreateAmmConfigInstructionDataEncoder() {
|
|
3202
3226
|
return transformEncoder15(
|
|
3203
|
-
|
|
3227
|
+
getStructEncoder31([
|
|
3204
3228
|
["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)],
|
|
3205
3229
|
["index", getU16Encoder6()],
|
|
3206
3230
|
["tickSpacing", getU16Encoder6()],
|
|
@@ -3212,7 +3236,7 @@ function getCreateAmmConfigInstructionDataEncoder() {
|
|
|
3212
3236
|
);
|
|
3213
3237
|
}
|
|
3214
3238
|
function getCreateAmmConfigInstructionDataDecoder() {
|
|
3215
|
-
return
|
|
3239
|
+
return getStructDecoder31([
|
|
3216
3240
|
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)],
|
|
3217
3241
|
["index", getU16Decoder6()],
|
|
3218
3242
|
["tickSpacing", getU16Decoder6()],
|
|
@@ -3222,7 +3246,7 @@ function getCreateAmmConfigInstructionDataDecoder() {
|
|
|
3222
3246
|
]);
|
|
3223
3247
|
}
|
|
3224
3248
|
function getCreateAmmConfigInstructionDataCodec() {
|
|
3225
|
-
return
|
|
3249
|
+
return combineCodec31(
|
|
3226
3250
|
getCreateAmmConfigInstructionDataEncoder(),
|
|
3227
3251
|
getCreateAmmConfigInstructionDataDecoder()
|
|
3228
3252
|
);
|
|
@@ -3317,14 +3341,14 @@ function parseCreateAmmConfigInstruction(instruction) {
|
|
|
3317
3341
|
|
|
3318
3342
|
// src/generated/instructions/createOperationAccount.ts
|
|
3319
3343
|
import {
|
|
3320
|
-
combineCodec as
|
|
3344
|
+
combineCodec as combineCodec32,
|
|
3321
3345
|
fixDecoderSize as fixDecoderSize16,
|
|
3322
3346
|
fixEncoderSize as fixEncoderSize17,
|
|
3323
3347
|
getBytesDecoder as getBytesDecoder16,
|
|
3324
3348
|
getBytesEncoder as getBytesEncoder17,
|
|
3325
3349
|
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
3326
|
-
getStructDecoder as
|
|
3327
|
-
getStructEncoder as
|
|
3350
|
+
getStructDecoder as getStructDecoder32,
|
|
3351
|
+
getStructEncoder as getStructEncoder32,
|
|
3328
3352
|
transformEncoder as transformEncoder16
|
|
3329
3353
|
} from "@solana/kit";
|
|
3330
3354
|
var CREATE_OPERATION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3344,7 +3368,7 @@ function getCreateOperationAccountDiscriminatorBytes() {
|
|
|
3344
3368
|
}
|
|
3345
3369
|
function getCreateOperationAccountInstructionDataEncoder() {
|
|
3346
3370
|
return transformEncoder16(
|
|
3347
|
-
|
|
3371
|
+
getStructEncoder32([["discriminator", fixEncoderSize17(getBytesEncoder17(), 8)]]),
|
|
3348
3372
|
(value) => ({
|
|
3349
3373
|
...value,
|
|
3350
3374
|
discriminator: CREATE_OPERATION_ACCOUNT_DISCRIMINATOR
|
|
@@ -3352,12 +3376,12 @@ function getCreateOperationAccountInstructionDataEncoder() {
|
|
|
3352
3376
|
);
|
|
3353
3377
|
}
|
|
3354
3378
|
function getCreateOperationAccountInstructionDataDecoder() {
|
|
3355
|
-
return
|
|
3379
|
+
return getStructDecoder32([
|
|
3356
3380
|
["discriminator", fixDecoderSize16(getBytesDecoder16(), 8)]
|
|
3357
3381
|
]);
|
|
3358
3382
|
}
|
|
3359
3383
|
function getCreateOperationAccountInstructionDataCodec() {
|
|
3360
|
-
return
|
|
3384
|
+
return combineCodec32(
|
|
3361
3385
|
getCreateOperationAccountInstructionDataEncoder(),
|
|
3362
3386
|
getCreateOperationAccountInstructionDataDecoder()
|
|
3363
3387
|
);
|
|
@@ -3447,15 +3471,15 @@ function parseCreateOperationAccountInstruction(instruction) {
|
|
|
3447
3471
|
|
|
3448
3472
|
// src/generated/instructions/createPool.ts
|
|
3449
3473
|
import {
|
|
3450
|
-
combineCodec as
|
|
3474
|
+
combineCodec as combineCodec33,
|
|
3451
3475
|
fixDecoderSize as fixDecoderSize17,
|
|
3452
3476
|
fixEncoderSize as fixEncoderSize18,
|
|
3453
|
-
getAddressEncoder as
|
|
3477
|
+
getAddressEncoder as getAddressEncoder22,
|
|
3454
3478
|
getBytesDecoder as getBytesDecoder17,
|
|
3455
3479
|
getBytesEncoder as getBytesEncoder18,
|
|
3456
3480
|
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
3457
|
-
getStructDecoder as
|
|
3458
|
-
getStructEncoder as
|
|
3481
|
+
getStructDecoder as getStructDecoder33,
|
|
3482
|
+
getStructEncoder as getStructEncoder33,
|
|
3459
3483
|
getU128Decoder as getU128Decoder15,
|
|
3460
3484
|
getU128Encoder as getU128Encoder15,
|
|
3461
3485
|
getU64Decoder as getU64Decoder21,
|
|
@@ -3477,7 +3501,7 @@ function getCreatePoolDiscriminatorBytes() {
|
|
|
3477
3501
|
}
|
|
3478
3502
|
function getCreatePoolInstructionDataEncoder() {
|
|
3479
3503
|
return transformEncoder17(
|
|
3480
|
-
|
|
3504
|
+
getStructEncoder33([
|
|
3481
3505
|
["discriminator", fixEncoderSize18(getBytesEncoder18(), 8)],
|
|
3482
3506
|
["sqrtPriceX64", getU128Encoder15()],
|
|
3483
3507
|
["openTime", getU64Encoder21()]
|
|
@@ -3486,14 +3510,14 @@ function getCreatePoolInstructionDataEncoder() {
|
|
|
3486
3510
|
);
|
|
3487
3511
|
}
|
|
3488
3512
|
function getCreatePoolInstructionDataDecoder() {
|
|
3489
|
-
return
|
|
3513
|
+
return getStructDecoder33([
|
|
3490
3514
|
["discriminator", fixDecoderSize17(getBytesDecoder17(), 8)],
|
|
3491
3515
|
["sqrtPriceX64", getU128Decoder15()],
|
|
3492
3516
|
["openTime", getU64Decoder21()]
|
|
3493
3517
|
]);
|
|
3494
3518
|
}
|
|
3495
3519
|
function getCreatePoolInstructionDataCodec() {
|
|
3496
|
-
return
|
|
3520
|
+
return combineCodec33(
|
|
3497
3521
|
getCreatePoolInstructionDataEncoder(),
|
|
3498
3522
|
getCreatePoolInstructionDataDecoder()
|
|
3499
3523
|
);
|
|
@@ -3525,9 +3549,9 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3525
3549
|
programAddress,
|
|
3526
3550
|
seeds: [
|
|
3527
3551
|
getBytesEncoder18().encode(new Uint8Array([112, 111, 111, 108])),
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3552
|
+
getAddressEncoder22().encode(expectAddress(accounts.ammConfig.value)),
|
|
3553
|
+
getAddressEncoder22().encode(expectAddress(accounts.tokenMint0.value)),
|
|
3554
|
+
getAddressEncoder22().encode(expectAddress(accounts.tokenMint1.value))
|
|
3531
3555
|
]
|
|
3532
3556
|
});
|
|
3533
3557
|
}
|
|
@@ -3538,8 +3562,8 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3538
3562
|
getBytesEncoder18().encode(
|
|
3539
3563
|
new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
|
|
3540
3564
|
),
|
|
3541
|
-
|
|
3542
|
-
|
|
3565
|
+
getAddressEncoder22().encode(expectAddress(accounts.poolState.value)),
|
|
3566
|
+
getAddressEncoder22().encode(expectAddress(accounts.tokenMint0.value))
|
|
3543
3567
|
]
|
|
3544
3568
|
});
|
|
3545
3569
|
}
|
|
@@ -3550,8 +3574,8 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3550
3574
|
getBytesEncoder18().encode(
|
|
3551
3575
|
new Uint8Array([112, 111, 111, 108, 95, 118, 97, 117, 108, 116])
|
|
3552
3576
|
),
|
|
3553
|
-
|
|
3554
|
-
|
|
3577
|
+
getAddressEncoder22().encode(expectAddress(accounts.poolState.value)),
|
|
3578
|
+
getAddressEncoder22().encode(expectAddress(accounts.tokenMint1.value))
|
|
3555
3579
|
]
|
|
3556
3580
|
});
|
|
3557
3581
|
}
|
|
@@ -3562,7 +3586,7 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3562
3586
|
getBytesEncoder18().encode(
|
|
3563
3587
|
new Uint8Array([111, 98, 115, 101, 114, 118, 97, 116, 105, 111, 110])
|
|
3564
3588
|
),
|
|
3565
|
-
|
|
3589
|
+
getAddressEncoder22().encode(expectAddress(accounts.poolState.value))
|
|
3566
3590
|
]
|
|
3567
3591
|
});
|
|
3568
3592
|
}
|
|
@@ -3606,7 +3630,7 @@ async function getCreatePoolInstructionAsync(input, config) {
|
|
|
3606
3630
|
110
|
|
3607
3631
|
])
|
|
3608
3632
|
),
|
|
3609
|
-
|
|
3633
|
+
getAddressEncoder22().encode(expectAddress(accounts.poolState.value))
|
|
3610
3634
|
]
|
|
3611
3635
|
});
|
|
3612
3636
|
}
|
|
@@ -3723,15 +3747,15 @@ function parseCreatePoolInstruction(instruction) {
|
|
|
3723
3747
|
|
|
3724
3748
|
// src/generated/instructions/createSupportMintAssociated.ts
|
|
3725
3749
|
import {
|
|
3726
|
-
combineCodec as
|
|
3750
|
+
combineCodec as combineCodec34,
|
|
3727
3751
|
fixDecoderSize as fixDecoderSize18,
|
|
3728
3752
|
fixEncoderSize as fixEncoderSize19,
|
|
3729
|
-
getAddressEncoder as
|
|
3753
|
+
getAddressEncoder as getAddressEncoder23,
|
|
3730
3754
|
getBytesDecoder as getBytesDecoder18,
|
|
3731
3755
|
getBytesEncoder as getBytesEncoder19,
|
|
3732
3756
|
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
3733
|
-
getStructDecoder as
|
|
3734
|
-
getStructEncoder as
|
|
3757
|
+
getStructDecoder as getStructDecoder34,
|
|
3758
|
+
getStructEncoder as getStructEncoder34,
|
|
3735
3759
|
transformEncoder as transformEncoder18
|
|
3736
3760
|
} from "@solana/kit";
|
|
3737
3761
|
var CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3751,7 +3775,7 @@ function getCreateSupportMintAssociatedDiscriminatorBytes() {
|
|
|
3751
3775
|
}
|
|
3752
3776
|
function getCreateSupportMintAssociatedInstructionDataEncoder() {
|
|
3753
3777
|
return transformEncoder18(
|
|
3754
|
-
|
|
3778
|
+
getStructEncoder34([["discriminator", fixEncoderSize19(getBytesEncoder19(), 8)]]),
|
|
3755
3779
|
(value) => ({
|
|
3756
3780
|
...value,
|
|
3757
3781
|
discriminator: CREATE_SUPPORT_MINT_ASSOCIATED_DISCRIMINATOR
|
|
@@ -3759,12 +3783,12 @@ function getCreateSupportMintAssociatedInstructionDataEncoder() {
|
|
|
3759
3783
|
);
|
|
3760
3784
|
}
|
|
3761
3785
|
function getCreateSupportMintAssociatedInstructionDataDecoder() {
|
|
3762
|
-
return
|
|
3786
|
+
return getStructDecoder34([
|
|
3763
3787
|
["discriminator", fixDecoderSize18(getBytesDecoder18(), 8)]
|
|
3764
3788
|
]);
|
|
3765
3789
|
}
|
|
3766
3790
|
function getCreateSupportMintAssociatedInstructionDataCodec() {
|
|
3767
|
-
return
|
|
3791
|
+
return combineCodec34(
|
|
3768
3792
|
getCreateSupportMintAssociatedInstructionDataEncoder(),
|
|
3769
3793
|
getCreateSupportMintAssociatedInstructionDataDecoder()
|
|
3770
3794
|
);
|
|
@@ -3801,7 +3825,7 @@ async function getCreateSupportMintAssociatedInstructionAsync(input, config) {
|
|
|
3801
3825
|
116
|
|
3802
3826
|
])
|
|
3803
3827
|
),
|
|
3804
|
-
|
|
3828
|
+
getAddressEncoder23().encode(expectAddress(accounts.tokenMint.value))
|
|
3805
3829
|
]
|
|
3806
3830
|
});
|
|
3807
3831
|
}
|
|
@@ -3873,13 +3897,13 @@ function parseCreateSupportMintAssociatedInstruction(instruction) {
|
|
|
3873
3897
|
|
|
3874
3898
|
// src/generated/instructions/decreaseLiquidityV2.ts
|
|
3875
3899
|
import {
|
|
3876
|
-
combineCodec as
|
|
3900
|
+
combineCodec as combineCodec35,
|
|
3877
3901
|
fixDecoderSize as fixDecoderSize19,
|
|
3878
3902
|
fixEncoderSize as fixEncoderSize20,
|
|
3879
3903
|
getBytesDecoder as getBytesDecoder19,
|
|
3880
3904
|
getBytesEncoder as getBytesEncoder20,
|
|
3881
|
-
getStructDecoder as
|
|
3882
|
-
getStructEncoder as
|
|
3905
|
+
getStructDecoder as getStructDecoder35,
|
|
3906
|
+
getStructEncoder as getStructEncoder35,
|
|
3883
3907
|
getU128Decoder as getU128Decoder16,
|
|
3884
3908
|
getU128Encoder as getU128Encoder16,
|
|
3885
3909
|
getU64Decoder as getU64Decoder22,
|
|
@@ -3903,7 +3927,7 @@ function getDecreaseLiquidityV2DiscriminatorBytes() {
|
|
|
3903
3927
|
}
|
|
3904
3928
|
function getDecreaseLiquidityV2InstructionDataEncoder() {
|
|
3905
3929
|
return transformEncoder19(
|
|
3906
|
-
|
|
3930
|
+
getStructEncoder35([
|
|
3907
3931
|
["discriminator", fixEncoderSize20(getBytesEncoder20(), 8)],
|
|
3908
3932
|
["liquidity", getU128Encoder16()],
|
|
3909
3933
|
["amount0Min", getU64Encoder22()],
|
|
@@ -3916,7 +3940,7 @@ function getDecreaseLiquidityV2InstructionDataEncoder() {
|
|
|
3916
3940
|
);
|
|
3917
3941
|
}
|
|
3918
3942
|
function getDecreaseLiquidityV2InstructionDataDecoder() {
|
|
3919
|
-
return
|
|
3943
|
+
return getStructDecoder35([
|
|
3920
3944
|
["discriminator", fixDecoderSize19(getBytesDecoder19(), 8)],
|
|
3921
3945
|
["liquidity", getU128Decoder16()],
|
|
3922
3946
|
["amount0Min", getU64Decoder22()],
|
|
@@ -3924,7 +3948,7 @@ function getDecreaseLiquidityV2InstructionDataDecoder() {
|
|
|
3924
3948
|
]);
|
|
3925
3949
|
}
|
|
3926
3950
|
function getDecreaseLiquidityV2InstructionDataCodec() {
|
|
3927
|
-
return
|
|
3951
|
+
return combineCodec35(
|
|
3928
3952
|
getDecreaseLiquidityV2InstructionDataEncoder(),
|
|
3929
3953
|
getDecreaseLiquidityV2InstructionDataDecoder()
|
|
3930
3954
|
);
|
|
@@ -4039,7 +4063,7 @@ function parseDecreaseLiquidityV2Instruction(instruction) {
|
|
|
4039
4063
|
|
|
4040
4064
|
// src/generated/instructions/increaseLiquidityV2.ts
|
|
4041
4065
|
import {
|
|
4042
|
-
combineCodec as
|
|
4066
|
+
combineCodec as combineCodec36,
|
|
4043
4067
|
fixDecoderSize as fixDecoderSize20,
|
|
4044
4068
|
fixEncoderSize as fixEncoderSize21,
|
|
4045
4069
|
getBooleanDecoder as getBooleanDecoder3,
|
|
@@ -4048,8 +4072,8 @@ import {
|
|
|
4048
4072
|
getBytesEncoder as getBytesEncoder21,
|
|
4049
4073
|
getOptionDecoder,
|
|
4050
4074
|
getOptionEncoder,
|
|
4051
|
-
getStructDecoder as
|
|
4052
|
-
getStructEncoder as
|
|
4075
|
+
getStructDecoder as getStructDecoder36,
|
|
4076
|
+
getStructEncoder as getStructEncoder36,
|
|
4053
4077
|
getU128Decoder as getU128Decoder17,
|
|
4054
4078
|
getU128Encoder as getU128Encoder17,
|
|
4055
4079
|
getU64Decoder as getU64Decoder23,
|
|
@@ -4073,7 +4097,7 @@ function getIncreaseLiquidityV2DiscriminatorBytes() {
|
|
|
4073
4097
|
}
|
|
4074
4098
|
function getIncreaseLiquidityV2InstructionDataEncoder() {
|
|
4075
4099
|
return transformEncoder20(
|
|
4076
|
-
|
|
4100
|
+
getStructEncoder36([
|
|
4077
4101
|
["discriminator", fixEncoderSize21(getBytesEncoder21(), 8)],
|
|
4078
4102
|
["liquidity", getU128Encoder17()],
|
|
4079
4103
|
["amount0Max", getU64Encoder23()],
|
|
@@ -4087,7 +4111,7 @@ function getIncreaseLiquidityV2InstructionDataEncoder() {
|
|
|
4087
4111
|
);
|
|
4088
4112
|
}
|
|
4089
4113
|
function getIncreaseLiquidityV2InstructionDataDecoder() {
|
|
4090
|
-
return
|
|
4114
|
+
return getStructDecoder36([
|
|
4091
4115
|
["discriminator", fixDecoderSize20(getBytesDecoder20(), 8)],
|
|
4092
4116
|
["liquidity", getU128Decoder17()],
|
|
4093
4117
|
["amount0Max", getU64Decoder23()],
|
|
@@ -4096,7 +4120,7 @@ function getIncreaseLiquidityV2InstructionDataDecoder() {
|
|
|
4096
4120
|
]);
|
|
4097
4121
|
}
|
|
4098
4122
|
function getIncreaseLiquidityV2InstructionDataCodec() {
|
|
4099
|
-
return
|
|
4123
|
+
return combineCodec36(
|
|
4100
4124
|
getIncreaseLiquidityV2InstructionDataEncoder(),
|
|
4101
4125
|
getIncreaseLiquidityV2InstructionDataDecoder()
|
|
4102
4126
|
);
|
|
@@ -4199,15 +4223,15 @@ function parseIncreaseLiquidityV2Instruction(instruction) {
|
|
|
4199
4223
|
|
|
4200
4224
|
// src/generated/instructions/initializeReward.ts
|
|
4201
4225
|
import {
|
|
4202
|
-
combineCodec as
|
|
4226
|
+
combineCodec as combineCodec37,
|
|
4203
4227
|
fixDecoderSize as fixDecoderSize21,
|
|
4204
4228
|
fixEncoderSize as fixEncoderSize22,
|
|
4205
|
-
getAddressEncoder as
|
|
4229
|
+
getAddressEncoder as getAddressEncoder24,
|
|
4206
4230
|
getBytesDecoder as getBytesDecoder21,
|
|
4207
4231
|
getBytesEncoder as getBytesEncoder22,
|
|
4208
4232
|
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
4209
|
-
getStructDecoder as
|
|
4210
|
-
getStructEncoder as
|
|
4233
|
+
getStructDecoder as getStructDecoder37,
|
|
4234
|
+
getStructEncoder as getStructEncoder37,
|
|
4211
4235
|
getU128Decoder as getU128Decoder18,
|
|
4212
4236
|
getU128Encoder as getU128Encoder18,
|
|
4213
4237
|
getU64Decoder as getU64Decoder24,
|
|
@@ -4231,7 +4255,7 @@ function getInitializeRewardDiscriminatorBytes() {
|
|
|
4231
4255
|
}
|
|
4232
4256
|
function getInitializeRewardInstructionDataEncoder() {
|
|
4233
4257
|
return transformEncoder21(
|
|
4234
|
-
|
|
4258
|
+
getStructEncoder37([
|
|
4235
4259
|
["discriminator", fixEncoderSize22(getBytesEncoder22(), 8)],
|
|
4236
4260
|
["openTime", getU64Encoder24()],
|
|
4237
4261
|
["endTime", getU64Encoder24()],
|
|
@@ -4241,7 +4265,7 @@ function getInitializeRewardInstructionDataEncoder() {
|
|
|
4241
4265
|
);
|
|
4242
4266
|
}
|
|
4243
4267
|
function getInitializeRewardInstructionDataDecoder() {
|
|
4244
|
-
return
|
|
4268
|
+
return getStructDecoder37([
|
|
4245
4269
|
["discriminator", fixDecoderSize21(getBytesDecoder21(), 8)],
|
|
4246
4270
|
["openTime", getU64Decoder24()],
|
|
4247
4271
|
["endTime", getU64Decoder24()],
|
|
@@ -4249,7 +4273,7 @@ function getInitializeRewardInstructionDataDecoder() {
|
|
|
4249
4273
|
]);
|
|
4250
4274
|
}
|
|
4251
4275
|
function getInitializeRewardInstructionDataCodec() {
|
|
4252
|
-
return
|
|
4276
|
+
return combineCodec37(
|
|
4253
4277
|
getInitializeRewardInstructionDataEncoder(),
|
|
4254
4278
|
getInitializeRewardInstructionDataDecoder()
|
|
4255
4279
|
);
|
|
@@ -4317,8 +4341,8 @@ async function getInitializeRewardInstructionAsync(input, config) {
|
|
|
4317
4341
|
116
|
|
4318
4342
|
])
|
|
4319
4343
|
),
|
|
4320
|
-
|
|
4321
|
-
|
|
4344
|
+
getAddressEncoder24().encode(expectAddress(accounts.poolState.value)),
|
|
4345
|
+
getAddressEncoder24().encode(
|
|
4322
4346
|
expectAddress(accounts.rewardTokenMint.value)
|
|
4323
4347
|
)
|
|
4324
4348
|
]
|
|
@@ -4434,10 +4458,10 @@ function parseInitializeRewardInstruction(instruction) {
|
|
|
4434
4458
|
|
|
4435
4459
|
// src/generated/instructions/openPositionWithToken22Nft.ts
|
|
4436
4460
|
import {
|
|
4437
|
-
combineCodec as
|
|
4461
|
+
combineCodec as combineCodec38,
|
|
4438
4462
|
fixDecoderSize as fixDecoderSize22,
|
|
4439
4463
|
fixEncoderSize as fixEncoderSize23,
|
|
4440
|
-
getAddressEncoder as
|
|
4464
|
+
getAddressEncoder as getAddressEncoder25,
|
|
4441
4465
|
getBooleanDecoder as getBooleanDecoder4,
|
|
4442
4466
|
getBooleanEncoder as getBooleanEncoder4,
|
|
4443
4467
|
getBytesDecoder as getBytesDecoder22,
|
|
@@ -4447,8 +4471,8 @@ import {
|
|
|
4447
4471
|
getOptionDecoder as getOptionDecoder2,
|
|
4448
4472
|
getOptionEncoder as getOptionEncoder2,
|
|
4449
4473
|
getProgramDerivedAddress as getProgramDerivedAddress7,
|
|
4450
|
-
getStructDecoder as
|
|
4451
|
-
getStructEncoder as
|
|
4474
|
+
getStructDecoder as getStructDecoder38,
|
|
4475
|
+
getStructEncoder as getStructEncoder38,
|
|
4452
4476
|
getU128Decoder as getU128Decoder19,
|
|
4453
4477
|
getU128Encoder as getU128Encoder19,
|
|
4454
4478
|
getU64Decoder as getU64Decoder25,
|
|
@@ -4472,7 +4496,7 @@ function getOpenPositionWithToken22NftDiscriminatorBytes() {
|
|
|
4472
4496
|
}
|
|
4473
4497
|
function getOpenPositionWithToken22NftInstructionDataEncoder() {
|
|
4474
4498
|
return transformEncoder22(
|
|
4475
|
-
|
|
4499
|
+
getStructEncoder38([
|
|
4476
4500
|
["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)],
|
|
4477
4501
|
["tickLowerIndex", getI32Encoder11()],
|
|
4478
4502
|
["tickUpperIndex", getI32Encoder11()],
|
|
@@ -4491,7 +4515,7 @@ function getOpenPositionWithToken22NftInstructionDataEncoder() {
|
|
|
4491
4515
|
);
|
|
4492
4516
|
}
|
|
4493
4517
|
function getOpenPositionWithToken22NftInstructionDataDecoder() {
|
|
4494
|
-
return
|
|
4518
|
+
return getStructDecoder38([
|
|
4495
4519
|
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)],
|
|
4496
4520
|
["tickLowerIndex", getI32Decoder11()],
|
|
4497
4521
|
["tickUpperIndex", getI32Decoder11()],
|
|
@@ -4505,7 +4529,7 @@ function getOpenPositionWithToken22NftInstructionDataDecoder() {
|
|
|
4505
4529
|
]);
|
|
4506
4530
|
}
|
|
4507
4531
|
function getOpenPositionWithToken22NftInstructionDataCodec() {
|
|
4508
|
-
return
|
|
4532
|
+
return combineCodec38(
|
|
4509
4533
|
getOpenPositionWithToken22NftInstructionDataEncoder(),
|
|
4510
4534
|
getOpenPositionWithToken22NftInstructionDataDecoder()
|
|
4511
4535
|
);
|
|
@@ -4561,7 +4585,7 @@ async function getOpenPositionWithToken22NftInstructionAsync(input, config) {
|
|
|
4561
4585
|
getBytesEncoder23().encode(
|
|
4562
4586
|
new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
|
|
4563
4587
|
),
|
|
4564
|
-
|
|
4588
|
+
getAddressEncoder25().encode(expectAddress(accounts.poolState.value)),
|
|
4565
4589
|
getI32Encoder11().encode(expectSome(args.tickArrayLowerStartIndex))
|
|
4566
4590
|
]
|
|
4567
4591
|
});
|
|
@@ -4573,7 +4597,7 @@ async function getOpenPositionWithToken22NftInstructionAsync(input, config) {
|
|
|
4573
4597
|
getBytesEncoder23().encode(
|
|
4574
4598
|
new Uint8Array([116, 105, 99, 107, 95, 97, 114, 114, 97, 121])
|
|
4575
4599
|
),
|
|
4576
|
-
|
|
4600
|
+
getAddressEncoder25().encode(expectAddress(accounts.poolState.value)),
|
|
4577
4601
|
getI32Encoder11().encode(expectSome(args.tickArrayUpperStartIndex))
|
|
4578
4602
|
]
|
|
4579
4603
|
});
|
|
@@ -4585,7 +4609,7 @@ async function getOpenPositionWithToken22NftInstructionAsync(input, config) {
|
|
|
4585
4609
|
getBytesEncoder23().encode(
|
|
4586
4610
|
new Uint8Array([112, 111, 115, 105, 116, 105, 111, 110])
|
|
4587
4611
|
),
|
|
4588
|
-
|
|
4612
|
+
getAddressEncoder25().encode(
|
|
4589
4613
|
expectAddress(accounts.positionNftMint.value)
|
|
4590
4614
|
)
|
|
4591
4615
|
]
|
|
@@ -4767,14 +4791,14 @@ function parseOpenPositionWithToken22NftInstruction(instruction) {
|
|
|
4767
4791
|
|
|
4768
4792
|
// src/generated/instructions/setRewardParams.ts
|
|
4769
4793
|
import {
|
|
4770
|
-
combineCodec as
|
|
4794
|
+
combineCodec as combineCodec39,
|
|
4771
4795
|
fixDecoderSize as fixDecoderSize23,
|
|
4772
4796
|
fixEncoderSize as fixEncoderSize24,
|
|
4773
4797
|
getBytesDecoder as getBytesDecoder23,
|
|
4774
4798
|
getBytesEncoder as getBytesEncoder24,
|
|
4775
4799
|
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4776
|
-
getStructDecoder as
|
|
4777
|
-
getStructEncoder as
|
|
4800
|
+
getStructDecoder as getStructDecoder39,
|
|
4801
|
+
getStructEncoder as getStructEncoder39,
|
|
4778
4802
|
getU128Decoder as getU128Decoder20,
|
|
4779
4803
|
getU128Encoder as getU128Encoder20,
|
|
4780
4804
|
getU64Decoder as getU64Decoder26,
|
|
@@ -4800,7 +4824,7 @@ function getSetRewardParamsDiscriminatorBytes() {
|
|
|
4800
4824
|
}
|
|
4801
4825
|
function getSetRewardParamsInstructionDataEncoder() {
|
|
4802
4826
|
return transformEncoder23(
|
|
4803
|
-
|
|
4827
|
+
getStructEncoder39([
|
|
4804
4828
|
["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)],
|
|
4805
4829
|
["rewardIndex", getU8Encoder9()],
|
|
4806
4830
|
["emissionsPerSecondX64", getU128Encoder20()],
|
|
@@ -4811,7 +4835,7 @@ function getSetRewardParamsInstructionDataEncoder() {
|
|
|
4811
4835
|
);
|
|
4812
4836
|
}
|
|
4813
4837
|
function getSetRewardParamsInstructionDataDecoder() {
|
|
4814
|
-
return
|
|
4838
|
+
return getStructDecoder39([
|
|
4815
4839
|
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)],
|
|
4816
4840
|
["rewardIndex", getU8Decoder9()],
|
|
4817
4841
|
["emissionsPerSecondX64", getU128Decoder20()],
|
|
@@ -4820,7 +4844,7 @@ function getSetRewardParamsInstructionDataDecoder() {
|
|
|
4820
4844
|
]);
|
|
4821
4845
|
}
|
|
4822
4846
|
function getSetRewardParamsInstructionDataCodec() {
|
|
4823
|
-
return
|
|
4847
|
+
return combineCodec39(
|
|
4824
4848
|
getSetRewardParamsInstructionDataEncoder(),
|
|
4825
4849
|
getSetRewardParamsInstructionDataDecoder()
|
|
4826
4850
|
);
|
|
@@ -4935,13 +4959,13 @@ function parseSetRewardParamsInstruction(instruction) {
|
|
|
4935
4959
|
|
|
4936
4960
|
// src/generated/instructions/swapRouterBaseIn.ts
|
|
4937
4961
|
import {
|
|
4938
|
-
combineCodec as
|
|
4962
|
+
combineCodec as combineCodec40,
|
|
4939
4963
|
fixDecoderSize as fixDecoderSize24,
|
|
4940
4964
|
fixEncoderSize as fixEncoderSize25,
|
|
4941
4965
|
getBytesDecoder as getBytesDecoder24,
|
|
4942
4966
|
getBytesEncoder as getBytesEncoder25,
|
|
4943
|
-
getStructDecoder as
|
|
4944
|
-
getStructEncoder as
|
|
4967
|
+
getStructDecoder as getStructDecoder40,
|
|
4968
|
+
getStructEncoder as getStructEncoder40,
|
|
4945
4969
|
getU64Decoder as getU64Decoder27,
|
|
4946
4970
|
getU64Encoder as getU64Encoder27,
|
|
4947
4971
|
transformEncoder as transformEncoder24
|
|
@@ -4963,7 +4987,7 @@ function getSwapRouterBaseInDiscriminatorBytes() {
|
|
|
4963
4987
|
}
|
|
4964
4988
|
function getSwapRouterBaseInInstructionDataEncoder() {
|
|
4965
4989
|
return transformEncoder24(
|
|
4966
|
-
|
|
4990
|
+
getStructEncoder40([
|
|
4967
4991
|
["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)],
|
|
4968
4992
|
["amountIn", getU64Encoder27()],
|
|
4969
4993
|
["amountOutMinimum", getU64Encoder27()]
|
|
@@ -4972,14 +4996,14 @@ function getSwapRouterBaseInInstructionDataEncoder() {
|
|
|
4972
4996
|
);
|
|
4973
4997
|
}
|
|
4974
4998
|
function getSwapRouterBaseInInstructionDataDecoder() {
|
|
4975
|
-
return
|
|
4999
|
+
return getStructDecoder40([
|
|
4976
5000
|
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)],
|
|
4977
5001
|
["amountIn", getU64Decoder27()],
|
|
4978
5002
|
["amountOutMinimum", getU64Decoder27()]
|
|
4979
5003
|
]);
|
|
4980
5004
|
}
|
|
4981
5005
|
function getSwapRouterBaseInInstructionDataCodec() {
|
|
4982
|
-
return
|
|
5006
|
+
return combineCodec40(
|
|
4983
5007
|
getSwapRouterBaseInInstructionDataEncoder(),
|
|
4984
5008
|
getSwapRouterBaseInInstructionDataDecoder()
|
|
4985
5009
|
);
|
|
@@ -5053,15 +5077,15 @@ function parseSwapRouterBaseInInstruction(instruction) {
|
|
|
5053
5077
|
|
|
5054
5078
|
// src/generated/instructions/swapV2.ts
|
|
5055
5079
|
import {
|
|
5056
|
-
combineCodec as
|
|
5080
|
+
combineCodec as combineCodec41,
|
|
5057
5081
|
fixDecoderSize as fixDecoderSize25,
|
|
5058
5082
|
fixEncoderSize as fixEncoderSize26,
|
|
5059
5083
|
getBooleanDecoder as getBooleanDecoder5,
|
|
5060
5084
|
getBooleanEncoder as getBooleanEncoder5,
|
|
5061
5085
|
getBytesDecoder as getBytesDecoder25,
|
|
5062
5086
|
getBytesEncoder as getBytesEncoder26,
|
|
5063
|
-
getStructDecoder as
|
|
5064
|
-
getStructEncoder as
|
|
5087
|
+
getStructDecoder as getStructDecoder41,
|
|
5088
|
+
getStructEncoder as getStructEncoder41,
|
|
5065
5089
|
getU128Decoder as getU128Decoder21,
|
|
5066
5090
|
getU128Encoder as getU128Encoder21,
|
|
5067
5091
|
getU64Decoder as getU64Decoder28,
|
|
@@ -5083,7 +5107,7 @@ function getSwapV2DiscriminatorBytes() {
|
|
|
5083
5107
|
}
|
|
5084
5108
|
function getSwapV2InstructionDataEncoder() {
|
|
5085
5109
|
return transformEncoder25(
|
|
5086
|
-
|
|
5110
|
+
getStructEncoder41([
|
|
5087
5111
|
["discriminator", fixEncoderSize26(getBytesEncoder26(), 8)],
|
|
5088
5112
|
["amount", getU64Encoder28()],
|
|
5089
5113
|
["otherAmountThreshold", getU64Encoder28()],
|
|
@@ -5094,7 +5118,7 @@ function getSwapV2InstructionDataEncoder() {
|
|
|
5094
5118
|
);
|
|
5095
5119
|
}
|
|
5096
5120
|
function getSwapV2InstructionDataDecoder() {
|
|
5097
|
-
return
|
|
5121
|
+
return getStructDecoder41([
|
|
5098
5122
|
["discriminator", fixDecoderSize25(getBytesDecoder25(), 8)],
|
|
5099
5123
|
["amount", getU64Decoder28()],
|
|
5100
5124
|
["otherAmountThreshold", getU64Decoder28()],
|
|
@@ -5103,7 +5127,7 @@ function getSwapV2InstructionDataDecoder() {
|
|
|
5103
5127
|
]);
|
|
5104
5128
|
}
|
|
5105
5129
|
function getSwapV2InstructionDataCodec() {
|
|
5106
|
-
return
|
|
5130
|
+
return combineCodec41(
|
|
5107
5131
|
getSwapV2InstructionDataEncoder(),
|
|
5108
5132
|
getSwapV2InstructionDataDecoder()
|
|
5109
5133
|
);
|
|
@@ -5207,15 +5231,15 @@ function parseSwapV2Instruction(instruction) {
|
|
|
5207
5231
|
|
|
5208
5232
|
// src/generated/instructions/transferRewardOwner.ts
|
|
5209
5233
|
import {
|
|
5210
|
-
combineCodec as
|
|
5234
|
+
combineCodec as combineCodec42,
|
|
5211
5235
|
fixDecoderSize as fixDecoderSize26,
|
|
5212
5236
|
fixEncoderSize as fixEncoderSize27,
|
|
5213
|
-
getAddressDecoder as
|
|
5214
|
-
getAddressEncoder as
|
|
5237
|
+
getAddressDecoder as getAddressDecoder21,
|
|
5238
|
+
getAddressEncoder as getAddressEncoder26,
|
|
5215
5239
|
getBytesDecoder as getBytesDecoder26,
|
|
5216
5240
|
getBytesEncoder as getBytesEncoder27,
|
|
5217
|
-
getStructDecoder as
|
|
5218
|
-
getStructEncoder as
|
|
5241
|
+
getStructDecoder as getStructDecoder42,
|
|
5242
|
+
getStructEncoder as getStructEncoder42,
|
|
5219
5243
|
transformEncoder as transformEncoder26
|
|
5220
5244
|
} from "@solana/kit";
|
|
5221
5245
|
var TRANSFER_REWARD_OWNER_DISCRIMINATOR = new Uint8Array([
|
|
@@ -5235,9 +5259,9 @@ function getTransferRewardOwnerDiscriminatorBytes() {
|
|
|
5235
5259
|
}
|
|
5236
5260
|
function getTransferRewardOwnerInstructionDataEncoder() {
|
|
5237
5261
|
return transformEncoder26(
|
|
5238
|
-
|
|
5262
|
+
getStructEncoder42([
|
|
5239
5263
|
["discriminator", fixEncoderSize27(getBytesEncoder27(), 8)],
|
|
5240
|
-
["newOwner",
|
|
5264
|
+
["newOwner", getAddressEncoder26()]
|
|
5241
5265
|
]),
|
|
5242
5266
|
(value) => ({
|
|
5243
5267
|
...value,
|
|
@@ -5246,13 +5270,13 @@ function getTransferRewardOwnerInstructionDataEncoder() {
|
|
|
5246
5270
|
);
|
|
5247
5271
|
}
|
|
5248
5272
|
function getTransferRewardOwnerInstructionDataDecoder() {
|
|
5249
|
-
return
|
|
5273
|
+
return getStructDecoder42([
|
|
5250
5274
|
["discriminator", fixDecoderSize26(getBytesDecoder26(), 8)],
|
|
5251
|
-
["newOwner",
|
|
5275
|
+
["newOwner", getAddressDecoder21()]
|
|
5252
5276
|
]);
|
|
5253
5277
|
}
|
|
5254
5278
|
function getTransferRewardOwnerInstructionDataCodec() {
|
|
5255
|
-
return
|
|
5279
|
+
return combineCodec42(
|
|
5256
5280
|
getTransferRewardOwnerInstructionDataEncoder(),
|
|
5257
5281
|
getTransferRewardOwnerInstructionDataDecoder()
|
|
5258
5282
|
);
|
|
@@ -5301,13 +5325,13 @@ function parseTransferRewardOwnerInstruction(instruction) {
|
|
|
5301
5325
|
|
|
5302
5326
|
// src/generated/instructions/updateAmmConfig.ts
|
|
5303
5327
|
import {
|
|
5304
|
-
combineCodec as
|
|
5328
|
+
combineCodec as combineCodec43,
|
|
5305
5329
|
fixDecoderSize as fixDecoderSize27,
|
|
5306
5330
|
fixEncoderSize as fixEncoderSize28,
|
|
5307
5331
|
getBytesDecoder as getBytesDecoder27,
|
|
5308
5332
|
getBytesEncoder as getBytesEncoder28,
|
|
5309
|
-
getStructDecoder as
|
|
5310
|
-
getStructEncoder as
|
|
5333
|
+
getStructDecoder as getStructDecoder43,
|
|
5334
|
+
getStructEncoder as getStructEncoder43,
|
|
5311
5335
|
getU32Decoder as getU32Decoder6,
|
|
5312
5336
|
getU32Encoder as getU32Encoder6,
|
|
5313
5337
|
getU8Decoder as getU8Decoder10,
|
|
@@ -5331,7 +5355,7 @@ function getUpdateAmmConfigDiscriminatorBytes() {
|
|
|
5331
5355
|
}
|
|
5332
5356
|
function getUpdateAmmConfigInstructionDataEncoder() {
|
|
5333
5357
|
return transformEncoder27(
|
|
5334
|
-
|
|
5358
|
+
getStructEncoder43([
|
|
5335
5359
|
["discriminator", fixEncoderSize28(getBytesEncoder28(), 8)],
|
|
5336
5360
|
["param", getU8Encoder10()],
|
|
5337
5361
|
["value", getU32Encoder6()]
|
|
@@ -5340,14 +5364,14 @@ function getUpdateAmmConfigInstructionDataEncoder() {
|
|
|
5340
5364
|
);
|
|
5341
5365
|
}
|
|
5342
5366
|
function getUpdateAmmConfigInstructionDataDecoder() {
|
|
5343
|
-
return
|
|
5367
|
+
return getStructDecoder43([
|
|
5344
5368
|
["discriminator", fixDecoderSize27(getBytesDecoder27(), 8)],
|
|
5345
5369
|
["param", getU8Decoder10()],
|
|
5346
5370
|
["value", getU32Decoder6()]
|
|
5347
5371
|
]);
|
|
5348
5372
|
}
|
|
5349
5373
|
function getUpdateAmmConfigInstructionDataCodec() {
|
|
5350
|
-
return
|
|
5374
|
+
return combineCodec43(
|
|
5351
5375
|
getUpdateAmmConfigInstructionDataEncoder(),
|
|
5352
5376
|
getUpdateAmmConfigInstructionDataDecoder()
|
|
5353
5377
|
);
|
|
@@ -5394,18 +5418,18 @@ function parseUpdateAmmConfigInstruction(instruction) {
|
|
|
5394
5418
|
|
|
5395
5419
|
// src/generated/instructions/updateOperationAccount.ts
|
|
5396
5420
|
import {
|
|
5397
|
-
combineCodec as
|
|
5421
|
+
combineCodec as combineCodec44,
|
|
5398
5422
|
fixDecoderSize as fixDecoderSize28,
|
|
5399
5423
|
fixEncoderSize as fixEncoderSize29,
|
|
5400
|
-
getAddressDecoder as
|
|
5401
|
-
getAddressEncoder as
|
|
5424
|
+
getAddressDecoder as getAddressDecoder22,
|
|
5425
|
+
getAddressEncoder as getAddressEncoder27,
|
|
5402
5426
|
getArrayDecoder as getArrayDecoder14,
|
|
5403
5427
|
getArrayEncoder as getArrayEncoder14,
|
|
5404
5428
|
getBytesDecoder as getBytesDecoder28,
|
|
5405
5429
|
getBytesEncoder as getBytesEncoder29,
|
|
5406
5430
|
getProgramDerivedAddress as getProgramDerivedAddress9,
|
|
5407
|
-
getStructDecoder as
|
|
5408
|
-
getStructEncoder as
|
|
5431
|
+
getStructDecoder as getStructDecoder44,
|
|
5432
|
+
getStructEncoder as getStructEncoder44,
|
|
5409
5433
|
getU8Decoder as getU8Decoder11,
|
|
5410
5434
|
getU8Encoder as getU8Encoder11,
|
|
5411
5435
|
transformEncoder as transformEncoder28
|
|
@@ -5427,10 +5451,10 @@ function getUpdateOperationAccountDiscriminatorBytes() {
|
|
|
5427
5451
|
}
|
|
5428
5452
|
function getUpdateOperationAccountInstructionDataEncoder() {
|
|
5429
5453
|
return transformEncoder28(
|
|
5430
|
-
|
|
5454
|
+
getStructEncoder44([
|
|
5431
5455
|
["discriminator", fixEncoderSize29(getBytesEncoder29(), 8)],
|
|
5432
5456
|
["param", getU8Encoder11()],
|
|
5433
|
-
["keys", getArrayEncoder14(
|
|
5457
|
+
["keys", getArrayEncoder14(getAddressEncoder27())]
|
|
5434
5458
|
]),
|
|
5435
5459
|
(value) => ({
|
|
5436
5460
|
...value,
|
|
@@ -5439,14 +5463,14 @@ function getUpdateOperationAccountInstructionDataEncoder() {
|
|
|
5439
5463
|
);
|
|
5440
5464
|
}
|
|
5441
5465
|
function getUpdateOperationAccountInstructionDataDecoder() {
|
|
5442
|
-
return
|
|
5466
|
+
return getStructDecoder44([
|
|
5443
5467
|
["discriminator", fixDecoderSize28(getBytesDecoder28(), 8)],
|
|
5444
5468
|
["param", getU8Decoder11()],
|
|
5445
|
-
["keys", getArrayDecoder14(
|
|
5469
|
+
["keys", getArrayDecoder14(getAddressDecoder22())]
|
|
5446
5470
|
]);
|
|
5447
5471
|
}
|
|
5448
5472
|
function getUpdateOperationAccountInstructionDataCodec() {
|
|
5449
|
-
return
|
|
5473
|
+
return combineCodec44(
|
|
5450
5474
|
getUpdateOperationAccountInstructionDataEncoder(),
|
|
5451
5475
|
getUpdateOperationAccountInstructionDataDecoder()
|
|
5452
5476
|
);
|
|
@@ -5542,13 +5566,13 @@ function parseUpdateOperationAccountInstruction(instruction) {
|
|
|
5542
5566
|
|
|
5543
5567
|
// src/generated/instructions/updatePoolStatus.ts
|
|
5544
5568
|
import {
|
|
5545
|
-
combineCodec as
|
|
5569
|
+
combineCodec as combineCodec45,
|
|
5546
5570
|
fixDecoderSize as fixDecoderSize29,
|
|
5547
5571
|
fixEncoderSize as fixEncoderSize30,
|
|
5548
5572
|
getBytesDecoder as getBytesDecoder29,
|
|
5549
5573
|
getBytesEncoder as getBytesEncoder30,
|
|
5550
|
-
getStructDecoder as
|
|
5551
|
-
getStructEncoder as
|
|
5574
|
+
getStructDecoder as getStructDecoder45,
|
|
5575
|
+
getStructEncoder as getStructEncoder45,
|
|
5552
5576
|
getU8Decoder as getU8Decoder12,
|
|
5553
5577
|
getU8Encoder as getU8Encoder12,
|
|
5554
5578
|
transformEncoder as transformEncoder29
|
|
@@ -5570,7 +5594,7 @@ function getUpdatePoolStatusDiscriminatorBytes() {
|
|
|
5570
5594
|
}
|
|
5571
5595
|
function getUpdatePoolStatusInstructionDataEncoder() {
|
|
5572
5596
|
return transformEncoder29(
|
|
5573
|
-
|
|
5597
|
+
getStructEncoder45([
|
|
5574
5598
|
["discriminator", fixEncoderSize30(getBytesEncoder30(), 8)],
|
|
5575
5599
|
["status", getU8Encoder12()]
|
|
5576
5600
|
]),
|
|
@@ -5578,13 +5602,13 @@ function getUpdatePoolStatusInstructionDataEncoder() {
|
|
|
5578
5602
|
);
|
|
5579
5603
|
}
|
|
5580
5604
|
function getUpdatePoolStatusInstructionDataDecoder() {
|
|
5581
|
-
return
|
|
5605
|
+
return getStructDecoder45([
|
|
5582
5606
|
["discriminator", fixDecoderSize29(getBytesDecoder29(), 8)],
|
|
5583
5607
|
["status", getU8Decoder12()]
|
|
5584
5608
|
]);
|
|
5585
5609
|
}
|
|
5586
5610
|
function getUpdatePoolStatusInstructionDataCodec() {
|
|
5587
|
-
return
|
|
5611
|
+
return combineCodec45(
|
|
5588
5612
|
getUpdatePoolStatusInstructionDataEncoder(),
|
|
5589
5613
|
getUpdatePoolStatusInstructionDataDecoder()
|
|
5590
5614
|
);
|
|
@@ -5631,13 +5655,13 @@ function parseUpdatePoolStatusInstruction(instruction) {
|
|
|
5631
5655
|
|
|
5632
5656
|
// src/generated/instructions/updateRewardInfos.ts
|
|
5633
5657
|
import {
|
|
5634
|
-
combineCodec as
|
|
5658
|
+
combineCodec as combineCodec46,
|
|
5635
5659
|
fixDecoderSize as fixDecoderSize30,
|
|
5636
5660
|
fixEncoderSize as fixEncoderSize31,
|
|
5637
5661
|
getBytesDecoder as getBytesDecoder30,
|
|
5638
5662
|
getBytesEncoder as getBytesEncoder31,
|
|
5639
|
-
getStructDecoder as
|
|
5640
|
-
getStructEncoder as
|
|
5663
|
+
getStructDecoder as getStructDecoder46,
|
|
5664
|
+
getStructEncoder as getStructEncoder46,
|
|
5641
5665
|
transformEncoder as transformEncoder30
|
|
5642
5666
|
} from "@solana/kit";
|
|
5643
5667
|
var UPDATE_REWARD_INFOS_DISCRIMINATOR = new Uint8Array([
|
|
@@ -5657,17 +5681,17 @@ function getUpdateRewardInfosDiscriminatorBytes() {
|
|
|
5657
5681
|
}
|
|
5658
5682
|
function getUpdateRewardInfosInstructionDataEncoder() {
|
|
5659
5683
|
return transformEncoder30(
|
|
5660
|
-
|
|
5684
|
+
getStructEncoder46([["discriminator", fixEncoderSize31(getBytesEncoder31(), 8)]]),
|
|
5661
5685
|
(value) => ({ ...value, discriminator: UPDATE_REWARD_INFOS_DISCRIMINATOR })
|
|
5662
5686
|
);
|
|
5663
5687
|
}
|
|
5664
5688
|
function getUpdateRewardInfosInstructionDataDecoder() {
|
|
5665
|
-
return
|
|
5689
|
+
return getStructDecoder46([
|
|
5666
5690
|
["discriminator", fixDecoderSize30(getBytesDecoder30(), 8)]
|
|
5667
5691
|
]);
|
|
5668
5692
|
}
|
|
5669
5693
|
function getUpdateRewardInfosInstructionDataCodec() {
|
|
5670
|
-
return
|
|
5694
|
+
return combineCodec46(
|
|
5671
5695
|
getUpdateRewardInfosInstructionDataEncoder(),
|
|
5672
5696
|
getUpdateRewardInfosInstructionDataDecoder()
|
|
5673
5697
|
);
|
|
@@ -6148,13 +6172,13 @@ async function fetchTickArraysForRange(cluster, poolAddress, tickLower, tickUppe
|
|
|
6148
6172
|
// src/utils/pda.ts
|
|
6149
6173
|
import {
|
|
6150
6174
|
getProgramDerivedAddress as getProgramDerivedAddress10,
|
|
6151
|
-
getAddressEncoder as
|
|
6175
|
+
getAddressEncoder as getAddressEncoder28,
|
|
6152
6176
|
getU16Encoder as getU16Encoder7,
|
|
6153
6177
|
address,
|
|
6154
6178
|
getI32Encoder as getI32Encoder12,
|
|
6155
6179
|
Endian
|
|
6156
6180
|
} from "@solana/kit";
|
|
6157
|
-
var addressEncoder =
|
|
6181
|
+
var addressEncoder = getAddressEncoder28();
|
|
6158
6182
|
var i32Encoder = getI32Encoder12({ endian: Endian.Big });
|
|
6159
6183
|
var PdaUtils = class {
|
|
6160
6184
|
/**
|
|
@@ -7108,7 +7132,7 @@ var LiquidityMath = class _LiquidityMath {
|
|
|
7108
7132
|
};
|
|
7109
7133
|
}
|
|
7110
7134
|
}
|
|
7111
|
-
static getAmountsFromLiquidityWithSlippage(sqrtPriceCurrentX64, sqrtPriceX64A, sqrtPriceX64B, liquidity,
|
|
7135
|
+
static getAmountsFromLiquidityWithSlippage(sqrtPriceCurrentX64, sqrtPriceX64A, sqrtPriceX64B, liquidity, add, roundUp, amountSlippage) {
|
|
7112
7136
|
const { amountA, amountB } = _LiquidityMath.getAmountsFromLiquidity(
|
|
7113
7137
|
sqrtPriceCurrentX64,
|
|
7114
7138
|
sqrtPriceX64A,
|
|
@@ -7116,7 +7140,7 @@ var LiquidityMath = class _LiquidityMath {
|
|
|
7116
7140
|
liquidity,
|
|
7117
7141
|
roundUp
|
|
7118
7142
|
);
|
|
7119
|
-
const coefficient =
|
|
7143
|
+
const coefficient = add ? 1 + amountSlippage : 1 - amountSlippage;
|
|
7120
7144
|
const amount0Slippage = new BN3(
|
|
7121
7145
|
new Decimal2(amountA.toString()).mul(coefficient).toFixed(0)
|
|
7122
7146
|
);
|
|
@@ -7124,6 +7148,8 @@ var LiquidityMath = class _LiquidityMath {
|
|
|
7124
7148
|
new Decimal2(amountB.toString()).mul(coefficient).toFixed(0)
|
|
7125
7149
|
);
|
|
7126
7150
|
return {
|
|
7151
|
+
amountA,
|
|
7152
|
+
amountB,
|
|
7127
7153
|
amountSlippageA: amount0Slippage,
|
|
7128
7154
|
amountSlippageB: amount1Slippage
|
|
7129
7155
|
};
|
|
@@ -8004,7 +8030,7 @@ var PoolUtils = class {
|
|
|
8004
8030
|
|
|
8005
8031
|
// src/utils/index.ts
|
|
8006
8032
|
import {
|
|
8007
|
-
getAddressEncoder as
|
|
8033
|
+
getAddressEncoder as getAddressEncoder29
|
|
8008
8034
|
} from "@solana/kit";
|
|
8009
8035
|
function validateAddress(address6, name = "address") {
|
|
8010
8036
|
if (!address6 || address6.length === 0) {
|
|
@@ -8077,7 +8103,7 @@ function isValidSolanaAddress(address6) {
|
|
|
8077
8103
|
}
|
|
8078
8104
|
}
|
|
8079
8105
|
function addresstoBytes(address6) {
|
|
8080
|
-
const encoder =
|
|
8106
|
+
const encoder = getAddressEncoder29();
|
|
8081
8107
|
return encoder.encode(address6);
|
|
8082
8108
|
}
|
|
8083
8109
|
function getFakeSigner(address6) {
|
|
@@ -8444,10 +8470,11 @@ import {
|
|
|
8444
8470
|
address as address4
|
|
8445
8471
|
} from "@solana/kit";
|
|
8446
8472
|
import {
|
|
8447
|
-
getCreateAssociatedTokenInstruction,
|
|
8448
8473
|
getSyncNativeInstruction,
|
|
8449
8474
|
findAssociatedTokenPda,
|
|
8450
|
-
TOKEN_PROGRAM_ADDRESS as TOKEN_PROGRAM_ADDRESS3
|
|
8475
|
+
TOKEN_PROGRAM_ADDRESS as TOKEN_PROGRAM_ADDRESS3,
|
|
8476
|
+
getCreateAssociatedTokenIdempotentInstruction,
|
|
8477
|
+
getCloseAccountInstruction
|
|
8451
8478
|
} from "@solana-program/token";
|
|
8452
8479
|
import { TOKEN_2022_PROGRAM_ADDRESS as TOKEN_2022_PROGRAM_ADDRESS2 } from "@solana-program/token-2022";
|
|
8453
8480
|
import BN6 from "bn.js";
|
|
@@ -8462,6 +8489,7 @@ var NATIVE_MINT_2022 = new PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXe
|
|
|
8462
8489
|
|
|
8463
8490
|
// src/position-manager.ts
|
|
8464
8491
|
import { getTransferSolInstruction } from "@solana-program/system";
|
|
8492
|
+
import Decimal4 from "decimal.js";
|
|
8465
8493
|
var PositionManager = class {
|
|
8466
8494
|
constructor(config) {
|
|
8467
8495
|
this.config = config;
|
|
@@ -8469,7 +8497,7 @@ var PositionManager = class {
|
|
|
8469
8497
|
buildWrapSolInstructions(params) {
|
|
8470
8498
|
const { payer, ata, owner, amount } = params;
|
|
8471
8499
|
return [
|
|
8472
|
-
|
|
8500
|
+
getCreateAssociatedTokenIdempotentInstruction({
|
|
8473
8501
|
payer,
|
|
8474
8502
|
ata,
|
|
8475
8503
|
owner,
|
|
@@ -8485,6 +8513,25 @@ var PositionManager = class {
|
|
|
8485
8513
|
getSyncNativeInstruction({ account: ata })
|
|
8486
8514
|
];
|
|
8487
8515
|
}
|
|
8516
|
+
buildUnwrapSolInstruction(params) {
|
|
8517
|
+
const { payer, owner, destination, ata } = params;
|
|
8518
|
+
return [
|
|
8519
|
+
// There's a chance user might have deleted the ATA - create it with idempotent just to be sure.
|
|
8520
|
+
getCreateAssociatedTokenIdempotentInstruction({
|
|
8521
|
+
payer,
|
|
8522
|
+
ata,
|
|
8523
|
+
owner,
|
|
8524
|
+
mint: address4(NATIVE_MINT.toString()),
|
|
8525
|
+
tokenProgram: TOKEN_PROGRAM_ADDRESS3,
|
|
8526
|
+
systemProgram: SYSTEM_PROGRAM_ID
|
|
8527
|
+
}),
|
|
8528
|
+
getCloseAccountInstruction({
|
|
8529
|
+
account: ata,
|
|
8530
|
+
destination,
|
|
8531
|
+
owner
|
|
8532
|
+
})
|
|
8533
|
+
];
|
|
8534
|
+
}
|
|
8488
8535
|
/**
|
|
8489
8536
|
* Make open position from liquidity instructions
|
|
8490
8537
|
* Use this when you know the exact liquidity amount you want to provide
|
|
@@ -8641,14 +8688,14 @@ var PositionManager = class {
|
|
|
8641
8688
|
payer: ownerInfo.wallet,
|
|
8642
8689
|
ata: ownerInfo.tokenAccountA,
|
|
8643
8690
|
owner: ownerInfo.wallet.address,
|
|
8644
|
-
amount:
|
|
8691
|
+
amount: amount0Max
|
|
8645
8692
|
});
|
|
8646
8693
|
} else if (poolAccount.data.tokenMint1.toString() === NATIVE_MINT.toString()) {
|
|
8647
8694
|
wrapSolInstructions = this.buildWrapSolInstructions({
|
|
8648
8695
|
payer: ownerInfo.wallet,
|
|
8649
8696
|
ata: ownerInfo.tokenAccountB,
|
|
8650
8697
|
owner: ownerInfo.wallet.address,
|
|
8651
|
-
amount:
|
|
8698
|
+
amount: amount1Max
|
|
8652
8699
|
});
|
|
8653
8700
|
}
|
|
8654
8701
|
const instruction = await getOpenPositionWithToken22NftInstructionAsync({
|
|
@@ -8868,7 +8915,7 @@ var PositionManager = class {
|
|
|
8868
8915
|
* @returns Instruction result following established pattern
|
|
8869
8916
|
*/
|
|
8870
8917
|
async makeClosePositionInstructions(params) {
|
|
8871
|
-
const { ownerPosition, ownerInfo } = params;
|
|
8918
|
+
const { ownerPosition, ownerInfo, isNative } = params;
|
|
8872
8919
|
const [personalPosition] = await PdaUtils.getPositionStatePda(
|
|
8873
8920
|
ownerPosition.nftMint
|
|
8874
8921
|
);
|
|
@@ -8884,8 +8931,23 @@ var PositionManager = class {
|
|
|
8884
8931
|
personalPosition,
|
|
8885
8932
|
tokenProgram: TOKEN_2022_PROGRAM_ADDRESS2
|
|
8886
8933
|
});
|
|
8934
|
+
let unrwrapWsolInstructions = [];
|
|
8935
|
+
if (isNative) {
|
|
8936
|
+
const ownerWallet = ownerInfo.wallet;
|
|
8937
|
+
const [ata] = await findAssociatedTokenPda({
|
|
8938
|
+
mint: address4(NATIVE_MINT.toString()),
|
|
8939
|
+
owner: ownerWallet.address,
|
|
8940
|
+
tokenProgram: TOKEN_PROGRAM_ADDRESS3
|
|
8941
|
+
});
|
|
8942
|
+
unrwrapWsolInstructions = this.buildUnwrapSolInstruction({
|
|
8943
|
+
payer: ownerWallet,
|
|
8944
|
+
ata,
|
|
8945
|
+
owner: ownerWallet.address,
|
|
8946
|
+
destination: ownerWallet.address
|
|
8947
|
+
});
|
|
8948
|
+
}
|
|
8887
8949
|
return {
|
|
8888
|
-
instructions: [instruction],
|
|
8950
|
+
instructions: [instruction, ...unrwrapWsolInstructions],
|
|
8889
8951
|
signers: [],
|
|
8890
8952
|
instructionTypes: ["ClosePosition"],
|
|
8891
8953
|
address: { positionNftAccount, personalPosition },
|
|
@@ -8930,45 +8992,29 @@ var PositionManager = class {
|
|
|
8930
8992
|
position.tickUpperIndex
|
|
8931
8993
|
);
|
|
8932
8994
|
const sqrtPriceCurrentX64 = new BN6(pool.sqrtPriceX64.toString());
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
sqrtPriceUpperX64,
|
|
8940
|
-
liquidity
|
|
8941
|
-
);
|
|
8942
|
-
amount1 = new BN6(0);
|
|
8943
|
-
} else if (pool.tickCurrent >= position.tickUpperIndex) {
|
|
8944
|
-
amount0 = new BN6(0);
|
|
8945
|
-
amount1 = PoolUtils.getAmount1FromLiquidity(
|
|
8946
|
-
sqrtPriceLowerX64,
|
|
8947
|
-
sqrtPriceUpperX64,
|
|
8948
|
-
liquidity
|
|
8949
|
-
);
|
|
8950
|
-
} else {
|
|
8951
|
-
amount0 = PoolUtils.getAmount0FromLiquidity(
|
|
8952
|
-
sqrtPriceCurrentX64,
|
|
8953
|
-
sqrtPriceUpperX64,
|
|
8954
|
-
liquidity
|
|
8955
|
-
);
|
|
8956
|
-
amount1 = PoolUtils.getAmount1FromLiquidity(
|
|
8957
|
-
sqrtPriceLowerX64,
|
|
8958
|
-
sqrtPriceCurrentX64,
|
|
8959
|
-
liquidity
|
|
8960
|
-
);
|
|
8961
|
-
}
|
|
8962
|
-
const priceLower = TickUtils.tickToPrice(
|
|
8963
|
-
position.tickLowerIndex,
|
|
8964
|
-
pool.mintDecimals0,
|
|
8965
|
-
pool.mintDecimals1
|
|
8966
|
-
);
|
|
8967
|
-
const priceUpper = TickUtils.tickToPrice(
|
|
8968
|
-
position.tickUpperIndex,
|
|
8969
|
-
pool.mintDecimals0,
|
|
8970
|
-
pool.mintDecimals1
|
|
8995
|
+
const { amountA, amountB } = LiquidityMath.getAmountsFromLiquidity(
|
|
8996
|
+
sqrtPriceCurrentX64,
|
|
8997
|
+
sqrtPriceLowerX64,
|
|
8998
|
+
sqrtPriceUpperX64,
|
|
8999
|
+
new BN6(position.liquidity.toString()),
|
|
9000
|
+
true
|
|
8971
9001
|
);
|
|
9002
|
+
const [_amountA, _amountB] = [
|
|
9003
|
+
new Decimal4(amountA.toString()).div(10 ** pool.mintDecimals0),
|
|
9004
|
+
new Decimal4(amountB.toString()).div(10 ** pool.mintDecimals1)
|
|
9005
|
+
];
|
|
9006
|
+
const priceLower = TickUtils.getTickPrice({
|
|
9007
|
+
mintADecimals: pool.mintDecimals0,
|
|
9008
|
+
mintBDecimals: pool.mintDecimals1,
|
|
9009
|
+
tick: position.tickLowerIndex,
|
|
9010
|
+
baseIn: true
|
|
9011
|
+
});
|
|
9012
|
+
const priceUpper = TickUtils.getTickPrice({
|
|
9013
|
+
mintADecimals: pool.mintDecimals0,
|
|
9014
|
+
mintBDecimals: pool.mintDecimals1,
|
|
9015
|
+
tick: position.tickUpperIndex,
|
|
9016
|
+
baseIn: true
|
|
9017
|
+
});
|
|
8972
9018
|
const inRange = pool.tickCurrent >= position.tickLowerIndex && pool.tickCurrent < position.tickUpperIndex;
|
|
8973
9019
|
const unclaimedFees = {
|
|
8974
9020
|
token0: new BN6(position.tokenFeesOwed0.toString()),
|
|
@@ -8979,12 +9025,10 @@ var PositionManager = class {
|
|
|
8979
9025
|
...position,
|
|
8980
9026
|
tokenMint0: pool.tokenMint0,
|
|
8981
9027
|
tokenMint1: pool.tokenMint1,
|
|
8982
|
-
amount0:
|
|
8983
|
-
amount1:
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
upper: priceUpper
|
|
8987
|
-
},
|
|
9028
|
+
amount0: _amountA.toString(),
|
|
9029
|
+
amount1: _amountB.toString(),
|
|
9030
|
+
priceLower,
|
|
9031
|
+
priceUpper,
|
|
8988
9032
|
inRange,
|
|
8989
9033
|
ageSeconds,
|
|
8990
9034
|
unclaimedFees,
|
|
@@ -9554,7 +9598,7 @@ var PoolDataManager = class {
|
|
|
9554
9598
|
|
|
9555
9599
|
// src/managers/price-api-client.ts
|
|
9556
9600
|
import axios3 from "axios";
|
|
9557
|
-
import
|
|
9601
|
+
import Decimal5 from "decimal.js";
|
|
9558
9602
|
var PriceApiClient = class _PriceApiClient {
|
|
9559
9603
|
client;
|
|
9560
9604
|
logger;
|
|
@@ -9902,7 +9946,7 @@ var PriceApiClient = class _PriceApiClient {
|
|
|
9902
9946
|
continue;
|
|
9903
9947
|
}
|
|
9904
9948
|
try {
|
|
9905
|
-
const price = new
|
|
9949
|
+
const price = new Decimal5(data.usdPrice.toString());
|
|
9906
9950
|
if (!price.isFinite() || price.lte(0)) {
|
|
9907
9951
|
this.log(
|
|
9908
9952
|
"warn",
|
|
@@ -10021,7 +10065,7 @@ var PriceApiClient = class _PriceApiClient {
|
|
|
10021
10065
|
|
|
10022
10066
|
// src/swap.ts
|
|
10023
10067
|
import BN7 from "bn.js";
|
|
10024
|
-
import
|
|
10068
|
+
import Decimal6 from "decimal.js";
|
|
10025
10069
|
var DEFAULT_RETRY_CONFIG = {
|
|
10026
10070
|
maxRetries: 3,
|
|
10027
10071
|
baseDelayMs: 100,
|
|
@@ -10277,11 +10321,11 @@ var SwapQuoteResult = class {
|
|
|
10277
10321
|
* before calculating the rate to avoid precision loss from integer division.
|
|
10278
10322
|
*/
|
|
10279
10323
|
get executionPrice() {
|
|
10280
|
-
const inHuman = new
|
|
10281
|
-
new
|
|
10324
|
+
const inHuman = new Decimal6(this.quote.amountIn.toString()).div(
|
|
10325
|
+
new Decimal6(10).pow(this.decIn)
|
|
10282
10326
|
);
|
|
10283
|
-
const outHuman = new
|
|
10284
|
-
new
|
|
10327
|
+
const outHuman = new Decimal6(this.quote.amountOut.toString()).div(
|
|
10328
|
+
new Decimal6(10).pow(this.decOut)
|
|
10285
10329
|
);
|
|
10286
10330
|
return outHuman.div(inHuman);
|
|
10287
10331
|
}
|
|
@@ -10301,7 +10345,7 @@ var SwapQuoteResult = class {
|
|
|
10301
10345
|
return this.quote.fee;
|
|
10302
10346
|
}
|
|
10303
10347
|
get feePercent() {
|
|
10304
|
-
return new
|
|
10348
|
+
return new Decimal6(this.quote.fee.toString()).div(new Decimal6(this.quote.amountIn.toString())).mul(100).toNumber();
|
|
10305
10349
|
}
|
|
10306
10350
|
get hasAcceptableImpact() {
|
|
10307
10351
|
return this.quote.priceImpact < PRICE_IMPACT_THRESHOLDS.WARNING;
|
|
@@ -11029,9 +11073,9 @@ var SwapManager = class {
|
|
|
11029
11073
|
calculateOptimalSlippage(quote, options) {
|
|
11030
11074
|
const { riskTolerance = "medium", maxSlippage = 0.5 } = options || {};
|
|
11031
11075
|
let baseSlippage = Math.max(quote.priceImpact * 2, 1e-3);
|
|
11032
|
-
const tradeSize = new
|
|
11033
|
-
const sizeRatio =
|
|
11034
|
-
const sizeMultiplier = sizeRatio.ln().div(
|
|
11076
|
+
const tradeSize = new Decimal6(quote.amountIn.toString());
|
|
11077
|
+
const sizeRatio = Decimal6.max(1, tradeSize.div(1e6));
|
|
11078
|
+
const sizeMultiplier = sizeRatio.ln().div(Decimal6.ln(10)).mul(1e-3).toNumber();
|
|
11035
11079
|
const riskMultiplier = {
|
|
11036
11080
|
low: 1.5,
|
|
11037
11081
|
medium: 1,
|
|
@@ -11067,9 +11111,9 @@ var SwapManager = class {
|
|
|
11067
11111
|
priceAfter = priceBefore;
|
|
11068
11112
|
}
|
|
11069
11113
|
const zeroForOne = params.tokenIn === pool.tokenMint0;
|
|
11070
|
-
const dec0 = new
|
|
11071
|
-
const dec1 = new
|
|
11072
|
-
const executionPrice = zeroForOne ? new
|
|
11114
|
+
const dec0 = new Decimal6(10).pow(pool.mintDecimals0);
|
|
11115
|
+
const dec1 = new Decimal6(10).pow(pool.mintDecimals1);
|
|
11116
|
+
const executionPrice = zeroForOne ? new Decimal6(quote.amountOut.toString()).div(dec1).div(new Decimal6(quote.amountIn.toString()).div(dec0)) : new Decimal6(quote.amountOut.toString()).div(dec0).div(new Decimal6(quote.amountIn.toString()).div(dec1));
|
|
11073
11117
|
const feeImpact = ammConfig.tradeFeeRate / FEE_RATE_DENOMINATOR_NUMBER;
|
|
11074
11118
|
const pctDifference = executionPrice.minus(priceBefore).div(priceBefore).toNumber();
|
|
11075
11119
|
return {
|