@meteora-ag/cp-amm-sdk 1.0.12-rc.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ type CpAmm$1 = {
13
13
  address: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
14
14
  metadata: {
15
15
  name: "cpAmm";
16
- version: "0.1.1";
16
+ version: "0.1.3";
17
17
  spec: "0.1.0";
18
18
  description: "Created with Anchor";
19
19
  };
@@ -130,29 +130,7 @@ type CpAmm$1 = {
130
130
  accounts: [
131
131
  {
132
132
  name: "poolAuthority";
133
- pda: {
134
- seeds: [
135
- {
136
- kind: "const";
137
- value: [
138
- 112,
139
- 111,
140
- 111,
141
- 108,
142
- 95,
143
- 97,
144
- 117,
145
- 116,
146
- 104,
147
- 111,
148
- 114,
149
- 105,
150
- 116,
151
- 121
152
- ];
153
- }
154
- ];
155
- };
133
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
156
134
  },
157
135
  {
158
136
  name: "pool";
@@ -253,29 +231,7 @@ type CpAmm$1 = {
253
231
  accounts: [
254
232
  {
255
233
  name: "poolAuthority";
256
- pda: {
257
- seeds: [
258
- {
259
- kind: "const";
260
- value: [
261
- 112,
262
- 111,
263
- 111,
264
- 108,
265
- 95,
266
- 97,
267
- 117,
268
- 116,
269
- 104,
270
- 111,
271
- 114,
272
- 105,
273
- 116,
274
- 121
275
- ];
276
- }
277
- ];
278
- };
234
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
279
235
  },
280
236
  {
281
237
  name: "pool";
@@ -375,29 +331,7 @@ type CpAmm$1 = {
375
331
  accounts: [
376
332
  {
377
333
  name: "poolAuthority";
378
- pda: {
379
- seeds: [
380
- {
381
- kind: "const";
382
- value: [
383
- 112,
384
- 111,
385
- 111,
386
- 108,
387
- 95,
388
- 97,
389
- 117,
390
- 116,
391
- 104,
392
- 111,
393
- 114,
394
- 105,
395
- 116,
396
- 121
397
- ];
398
- }
399
- ];
400
- };
334
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
401
335
  },
402
336
  {
403
337
  name: "pool";
@@ -658,7 +592,16 @@ type CpAmm$1 = {
658
592
  name: "program";
659
593
  }
660
594
  ];
661
- args: [];
595
+ args: [
596
+ {
597
+ name: "maxAmountA";
598
+ type: "u64";
599
+ },
600
+ {
601
+ name: "maxAmountB";
602
+ type: "u64";
603
+ }
604
+ ];
662
605
  },
663
606
  {
664
607
  name: "claimReward";
@@ -666,29 +609,7 @@ type CpAmm$1 = {
666
609
  accounts: [
667
610
  {
668
611
  name: "poolAuthority";
669
- pda: {
670
- seeds: [
671
- {
672
- kind: "const";
673
- value: [
674
- 112,
675
- 111,
676
- 111,
677
- 108,
678
- 95,
679
- 97,
680
- 117,
681
- 116,
682
- 104,
683
- 111,
684
- 114,
685
- 105,
686
- 116,
687
- 121
688
- ];
689
- }
690
- ];
691
- };
612
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
692
613
  },
693
614
  {
694
615
  name: "pool";
@@ -760,6 +681,10 @@ type CpAmm$1 = {
760
681
  {
761
682
  name: "rewardIndex";
762
683
  type: "u8";
684
+ },
685
+ {
686
+ name: "skipReward";
687
+ type: "u8";
763
688
  }
764
689
  ];
765
690
  },
@@ -891,15 +816,38 @@ type CpAmm$1 = {
891
816
  },
892
817
  {
893
818
  name: "poolAuthority";
819
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
820
+ },
821
+ {
822
+ name: "rentReceiver";
823
+ writable: true;
824
+ },
825
+ {
826
+ name: "owner";
827
+ docs: ["Owner of position"];
828
+ signer: true;
829
+ },
830
+ {
831
+ name: "tokenProgram";
832
+ docs: [
833
+ "Program to create NFT mint/token account and transfer for token22 account"
834
+ ];
835
+ address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
836
+ },
837
+ {
838
+ name: "eventAuthority";
894
839
  pda: {
895
840
  seeds: [
896
841
  {
897
842
  kind: "const";
898
843
  value: [
899
- 112,
900
- 111,
901
- 111,
902
- 108,
844
+ 95,
845
+ 95,
846
+ 101,
847
+ 118,
848
+ 101,
849
+ 110,
850
+ 116,
903
851
  95,
904
852
  97,
905
853
  117,
@@ -916,20 +864,27 @@ type CpAmm$1 = {
916
864
  };
917
865
  },
918
866
  {
919
- name: "rentReceiver";
867
+ name: "program";
868
+ }
869
+ ];
870
+ args: [];
871
+ },
872
+ {
873
+ name: "closeTokenBadge";
874
+ discriminator: [108, 146, 86, 110, 179, 254, 10, 104];
875
+ accounts: [
876
+ {
877
+ name: "tokenBadge";
920
878
  writable: true;
921
879
  },
922
880
  {
923
- name: "owner";
924
- docs: ["Owner of position"];
881
+ name: "admin";
882
+ writable: true;
925
883
  signer: true;
926
884
  },
927
885
  {
928
- name: "tokenProgram";
929
- docs: [
930
- "Program to create NFT mint/token account and transfer for token22 account"
931
- ];
932
- address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
886
+ name: "rentReceiver";
887
+ writable: true;
933
888
  },
934
889
  {
935
890
  name: "eventAuthority";
@@ -1261,29 +1216,7 @@ type CpAmm$1 = {
1261
1216
  },
1262
1217
  {
1263
1218
  name: "poolAuthority";
1264
- pda: {
1265
- seeds: [
1266
- {
1267
- kind: "const";
1268
- value: [
1269
- 112,
1270
- 111,
1271
- 111,
1272
- 108,
1273
- 95,
1274
- 97,
1275
- 117,
1276
- 116,
1277
- 104,
1278
- 111,
1279
- 114,
1280
- 105,
1281
- 116,
1282
- 121
1283
- ];
1284
- }
1285
- ];
1286
- };
1219
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
1287
1220
  },
1288
1221
  {
1289
1222
  name: "payer";
@@ -1537,29 +1470,7 @@ type CpAmm$1 = {
1537
1470
  },
1538
1471
  {
1539
1472
  name: "poolAuthority";
1540
- pda: {
1541
- seeds: [
1542
- {
1543
- kind: "const";
1544
- value: [
1545
- 112,
1546
- 111,
1547
- 111,
1548
- 108,
1549
- 95,
1550
- 97,
1551
- 117,
1552
- 116,
1553
- 104,
1554
- 111,
1555
- 114,
1556
- 105,
1557
- 116,
1558
- 121
1559
- ];
1560
- }
1561
- ];
1562
- };
1473
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
1563
1474
  },
1564
1475
  {
1565
1476
  name: "pool";
@@ -1769,29 +1680,7 @@ type CpAmm$1 = {
1769
1680
  },
1770
1681
  {
1771
1682
  name: "poolAuthority";
1772
- pda: {
1773
- seeds: [
1774
- {
1775
- kind: "const";
1776
- value: [
1777
- 112,
1778
- 111,
1779
- 111,
1780
- 108,
1781
- 95,
1782
- 97,
1783
- 117,
1784
- 116,
1785
- 104,
1786
- 111,
1787
- 114,
1788
- 105,
1789
- 116,
1790
- 121
1791
- ];
1792
- }
1793
- ];
1794
- };
1683
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
1795
1684
  },
1796
1685
  {
1797
1686
  name: "pool";
@@ -2005,29 +1894,7 @@ type CpAmm$1 = {
2005
1894
  },
2006
1895
  {
2007
1896
  name: "poolAuthority";
2008
- pda: {
2009
- seeds: [
2010
- {
2011
- kind: "const";
2012
- value: [
2013
- 112,
2014
- 111,
2015
- 111,
2016
- 108,
2017
- 95,
2018
- 97,
2019
- 117,
2020
- 116,
2021
- 104,
2022
- 111,
2023
- 114,
2024
- 105,
2025
- 116,
2026
- 121
2027
- ];
2028
- }
2029
- ];
2030
- };
1897
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
2031
1898
  },
2032
1899
  {
2033
1900
  name: "pool";
@@ -2179,29 +2046,7 @@ type CpAmm$1 = {
2179
2046
  accounts: [
2180
2047
  {
2181
2048
  name: "poolAuthority";
2182
- pda: {
2183
- seeds: [
2184
- {
2185
- kind: "const";
2186
- value: [
2187
- 112,
2188
- 111,
2189
- 111,
2190
- 108,
2191
- 95,
2192
- 97,
2193
- 117,
2194
- 116,
2195
- 104,
2196
- 111,
2197
- 114,
2198
- 105,
2199
- 116,
2200
- 121
2201
- ];
2202
- }
2203
- ];
2204
- };
2049
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
2205
2050
  },
2206
2051
  {
2207
2052
  name: "pool";
@@ -2244,7 +2089,11 @@ type CpAmm$1 = {
2244
2089
  name: "rewardMint";
2245
2090
  },
2246
2091
  {
2247
- name: "admin";
2092
+ name: "signer";
2093
+ signer: true;
2094
+ },
2095
+ {
2096
+ name: "payer";
2248
2097
  writable: true;
2249
2098
  signer: true;
2250
2099
  },
@@ -2472,29 +2321,7 @@ type CpAmm$1 = {
2472
2321
  accounts: [
2473
2322
  {
2474
2323
  name: "poolAuthority";
2475
- pda: {
2476
- seeds: [
2477
- {
2478
- kind: "const";
2479
- value: [
2480
- 112,
2481
- 111,
2482
- 111,
2483
- 108,
2484
- 95,
2485
- 97,
2486
- 117,
2487
- 116,
2488
- 104,
2489
- 111,
2490
- 114,
2491
- 105,
2492
- 116,
2493
- 121
2494
- ];
2495
- }
2496
- ];
2497
- };
2324
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
2498
2325
  },
2499
2326
  {
2500
2327
  name: "pool";
@@ -2604,29 +2431,7 @@ type CpAmm$1 = {
2604
2431
  accounts: [
2605
2432
  {
2606
2433
  name: "poolAuthority";
2607
- pda: {
2608
- seeds: [
2609
- {
2610
- kind: "const";
2611
- value: [
2612
- 112,
2613
- 111,
2614
- 111,
2615
- 108,
2616
- 95,
2617
- 97,
2618
- 117,
2619
- 116,
2620
- 104,
2621
- 111,
2622
- 114,
2623
- 105,
2624
- 116,
2625
- 121
2626
- ];
2627
- }
2628
- ];
2629
- };
2434
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
2630
2435
  },
2631
2436
  {
2632
2437
  name: "pool";
@@ -2783,20 +2588,56 @@ type CpAmm$1 = {
2783
2588
  ];
2784
2589
  },
2785
2590
  {
2786
- name: "swap";
2787
- discriminator: [248, 198, 158, 145, 225, 117, 135, 200];
2591
+ name: "splitPosition";
2592
+ discriminator: [172, 241, 221, 138, 161, 29, 253, 42];
2788
2593
  accounts: [
2789
2594
  {
2790
- name: "poolAuthority";
2595
+ name: "pool";
2596
+ writable: true;
2597
+ relations: ["firstPosition", "secondPosition"];
2598
+ },
2599
+ {
2600
+ name: "firstPosition";
2601
+ docs: ["The first position"];
2602
+ writable: true;
2603
+ },
2604
+ {
2605
+ name: "firstPositionNftAccount";
2606
+ docs: ["The token account for position nft"];
2607
+ },
2608
+ {
2609
+ name: "secondPosition";
2610
+ docs: ["The second position"];
2611
+ writable: true;
2612
+ },
2613
+ {
2614
+ name: "secondPositionNftAccount";
2615
+ docs: ["The token account for position nft"];
2616
+ },
2617
+ {
2618
+ name: "firstOwner";
2619
+ docs: ["Owner of first position"];
2620
+ signer: true;
2621
+ },
2622
+ {
2623
+ name: "secondOwner";
2624
+ docs: ["Owner of second position"];
2625
+ signer: true;
2626
+ },
2627
+ {
2628
+ name: "eventAuthority";
2791
2629
  pda: {
2792
2630
  seeds: [
2793
2631
  {
2794
2632
  kind: "const";
2795
2633
  value: [
2796
- 112,
2797
- 111,
2798
- 111,
2799
- 108,
2634
+ 95,
2635
+ 95,
2636
+ 101,
2637
+ 118,
2638
+ 101,
2639
+ 110,
2640
+ 116,
2800
2641
  95,
2801
2642
  97,
2802
2643
  117,
@@ -2812,6 +2653,29 @@ type CpAmm$1 = {
2812
2653
  ];
2813
2654
  };
2814
2655
  },
2656
+ {
2657
+ name: "program";
2658
+ }
2659
+ ];
2660
+ args: [
2661
+ {
2662
+ name: "params";
2663
+ type: {
2664
+ defined: {
2665
+ name: "splitPositionParameters";
2666
+ };
2667
+ };
2668
+ }
2669
+ ];
2670
+ },
2671
+ {
2672
+ name: "swap";
2673
+ discriminator: [248, 198, 158, 145, 225, 117, 135, 200];
2674
+ accounts: [
2675
+ {
2676
+ name: "poolAuthority";
2677
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
2678
+ },
2815
2679
  {
2816
2680
  name: "pool";
2817
2681
  docs: ["Pool account"];
@@ -2919,7 +2783,7 @@ type CpAmm$1 = {
2919
2783
  writable: true;
2920
2784
  },
2921
2785
  {
2922
- name: "admin";
2786
+ name: "signer";
2923
2787
  signer: true;
2924
2788
  },
2925
2789
  {
@@ -2975,7 +2839,7 @@ type CpAmm$1 = {
2975
2839
  writable: true;
2976
2840
  },
2977
2841
  {
2978
- name: "admin";
2842
+ name: "signer";
2979
2843
  signer: true;
2980
2844
  },
2981
2845
  {
@@ -3028,29 +2892,7 @@ type CpAmm$1 = {
3028
2892
  accounts: [
3029
2893
  {
3030
2894
  name: "poolAuthority";
3031
- pda: {
3032
- seeds: [
3033
- {
3034
- kind: "const";
3035
- value: [
3036
- 112,
3037
- 111,
3038
- 111,
3039
- 108,
3040
- 95,
3041
- 97,
3042
- 117,
3043
- 116,
3044
- 104,
3045
- 111,
3046
- 114,
3047
- 105,
3048
- 116,
3049
- 121
3050
- ];
3051
- }
3052
- ];
3053
- };
2895
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC";
3054
2896
  },
3055
2897
  {
3056
2898
  name: "pool";
@@ -3222,6 +3064,10 @@ type CpAmm$1 = {
3222
3064
  name: "evtSetPoolStatus";
3223
3065
  discriminator: [100, 213, 74, 3, 95, 91, 228, 146];
3224
3066
  },
3067
+ {
3068
+ name: "evtSplitPosition";
3069
+ discriminator: [182, 138, 42, 254, 27, 94, 82, 221];
3070
+ },
3225
3071
  {
3226
3072
  name: "evtSwap";
3227
3073
  discriminator: [27, 60, 21, 213, 138, 170, 187, 147];
@@ -3449,6 +3295,31 @@ type CpAmm$1 = {
3449
3295
  code: 6041;
3450
3296
  name: "invalidConfigType";
3451
3297
  msg: "Invalid config type";
3298
+ },
3299
+ {
3300
+ code: 6042;
3301
+ name: "invalidPoolCreator";
3302
+ msg: "Invalid pool creator";
3303
+ },
3304
+ {
3305
+ code: 6043;
3306
+ name: "rewardVaultFrozenSkipRequired";
3307
+ msg: "Reward vault is frozen, must skip reward to proceed";
3308
+ },
3309
+ {
3310
+ code: 6044;
3311
+ name: "invalidSplitPositionParameters";
3312
+ msg: "Invalid parameters for split position";
3313
+ },
3314
+ {
3315
+ code: 6045;
3316
+ name: "unsupportPositionHasVestingLock";
3317
+ msg: "Unsupported split position has vesting lock";
3318
+ },
3319
+ {
3320
+ code: 6046;
3321
+ name: "samePosition";
3322
+ msg: "Same position";
3452
3323
  }
3453
3324
  ];
3454
3325
  types: [
@@ -4207,6 +4078,18 @@ type CpAmm$1 = {
4207
4078
  {
4208
4079
  name: "transferFeeExcludedAmountIn";
4209
4080
  type: "u64";
4081
+ },
4082
+ {
4083
+ name: "rewardDurationEnd";
4084
+ type: "u64";
4085
+ },
4086
+ {
4087
+ name: "preRewardRate";
4088
+ type: "u128";
4089
+ },
4090
+ {
4091
+ name: "postRewardRate";
4092
+ type: "u128";
4210
4093
  }
4211
4094
  ];
4212
4095
  };
@@ -4324,6 +4207,10 @@ type CpAmm$1 = {
4324
4207
  name: "funder";
4325
4208
  type: "pubkey";
4326
4209
  },
4210
+ {
4211
+ name: "creator";
4212
+ type: "pubkey";
4213
+ },
4327
4214
  {
4328
4215
  name: "rewardIndex";
4329
4216
  type: "u8";
@@ -4455,6 +4342,70 @@ type CpAmm$1 = {
4455
4342
  ];
4456
4343
  };
4457
4344
  },
4345
+ {
4346
+ name: "evtSplitPosition";
4347
+ type: {
4348
+ kind: "struct";
4349
+ fields: [
4350
+ {
4351
+ name: "pool";
4352
+ type: "pubkey";
4353
+ },
4354
+ {
4355
+ name: "firstOwner";
4356
+ type: "pubkey";
4357
+ },
4358
+ {
4359
+ name: "secondOwner";
4360
+ type: "pubkey";
4361
+ },
4362
+ {
4363
+ name: "firstPosition";
4364
+ type: "pubkey";
4365
+ },
4366
+ {
4367
+ name: "secondPosition";
4368
+ type: "pubkey";
4369
+ },
4370
+ {
4371
+ name: "currentSqrtPrice";
4372
+ type: "u128";
4373
+ },
4374
+ {
4375
+ name: "amountSplits";
4376
+ type: {
4377
+ defined: {
4378
+ name: "splitAmountInfo";
4379
+ };
4380
+ };
4381
+ },
4382
+ {
4383
+ name: "firstPositionInfo";
4384
+ type: {
4385
+ defined: {
4386
+ name: "splitPositionInfo";
4387
+ };
4388
+ };
4389
+ },
4390
+ {
4391
+ name: "secondPositionInfo";
4392
+ type: {
4393
+ defined: {
4394
+ name: "splitPositionInfo";
4395
+ };
4396
+ };
4397
+ },
4398
+ {
4399
+ name: "splitPositionParameters";
4400
+ type: {
4401
+ defined: {
4402
+ name: "splitPositionParameters";
4403
+ };
4404
+ };
4405
+ }
4406
+ ];
4407
+ };
4408
+ },
4458
4409
  {
4459
4410
  name: "evtSwap";
4460
4411
  type: {
@@ -4823,11 +4774,16 @@ type CpAmm$1 = {
4823
4774
  };
4824
4775
  };
4825
4776
  },
4777
+ {
4778
+ name: "creator";
4779
+ docs: ["pool creator"];
4780
+ type: "pubkey";
4781
+ },
4826
4782
  {
4827
4783
  name: "padding1";
4828
4784
  docs: ["Padding for further use"];
4829
4785
  type: {
4830
- array: ["u64", 10];
4786
+ array: ["u64", 6];
4831
4787
  };
4832
4788
  },
4833
4789
  {
@@ -4855,27 +4811,19 @@ type CpAmm$1 = {
4855
4811
  fields: [
4856
4812
  {
4857
4813
  name: "baseFee";
4858
- docs: ["Base fee"];
4859
- type: {
4860
- defined: {
4861
- name: "baseFeeParameters";
4862
- };
4863
- };
4864
- },
4865
- {
4866
- name: "protocolFeePercent";
4867
- docs: ["Protocol trade fee percent"];
4868
- type: "u8";
4869
- },
4870
- {
4871
- name: "partnerFeePercent";
4872
- docs: ["partner fee percent"];
4873
- type: "u8";
4814
+ docs: ["Base fee"];
4815
+ type: {
4816
+ defined: {
4817
+ name: "baseFeeParameters";
4818
+ };
4819
+ };
4874
4820
  },
4875
4821
  {
4876
- name: "referralFeePercent";
4877
- docs: ["referral fee percent"];
4878
- type: "u8";
4822
+ name: "padding";
4823
+ docs: ["padding"];
4824
+ type: {
4825
+ array: ["u8", 3];
4826
+ };
4879
4827
  },
4880
4828
  {
4881
4829
  name: "dynamicFee";
@@ -5282,6 +5230,123 @@ type CpAmm$1 = {
5282
5230
  ];
5283
5231
  };
5284
5232
  },
5233
+ {
5234
+ name: "splitAmountInfo";
5235
+ type: {
5236
+ kind: "struct";
5237
+ fields: [
5238
+ {
5239
+ name: "permanentLockedLiquidity";
5240
+ type: "u128";
5241
+ },
5242
+ {
5243
+ name: "unlockedLiquidity";
5244
+ type: "u128";
5245
+ },
5246
+ {
5247
+ name: "feeA";
5248
+ type: "u64";
5249
+ },
5250
+ {
5251
+ name: "feeB";
5252
+ type: "u64";
5253
+ },
5254
+ {
5255
+ name: "reward0";
5256
+ type: "u64";
5257
+ },
5258
+ {
5259
+ name: "reward1";
5260
+ type: "u64";
5261
+ }
5262
+ ];
5263
+ };
5264
+ },
5265
+ {
5266
+ name: "splitPositionInfo";
5267
+ type: {
5268
+ kind: "struct";
5269
+ fields: [
5270
+ {
5271
+ name: "liquidity";
5272
+ type: "u128";
5273
+ },
5274
+ {
5275
+ name: "feeA";
5276
+ type: "u64";
5277
+ },
5278
+ {
5279
+ name: "feeB";
5280
+ type: "u64";
5281
+ },
5282
+ {
5283
+ name: "reward0";
5284
+ type: "u64";
5285
+ },
5286
+ {
5287
+ name: "reward1";
5288
+ type: "u64";
5289
+ }
5290
+ ];
5291
+ };
5292
+ },
5293
+ {
5294
+ name: "splitPositionParameters";
5295
+ type: {
5296
+ kind: "struct";
5297
+ fields: [
5298
+ {
5299
+ name: "unlockedLiquidityPercentage";
5300
+ docs: [
5301
+ "Percentage of unlocked liquidity to split to the second position"
5302
+ ];
5303
+ type: "u8";
5304
+ },
5305
+ {
5306
+ name: "permanentLockedLiquidityPercentage";
5307
+ docs: [
5308
+ "Percentage of permanent locked liquidity to split to the second position"
5309
+ ];
5310
+ type: "u8";
5311
+ },
5312
+ {
5313
+ name: "feeAPercentage";
5314
+ docs: [
5315
+ "Percentage of fee A pending to split to the second position"
5316
+ ];
5317
+ type: "u8";
5318
+ },
5319
+ {
5320
+ name: "feeBPercentage";
5321
+ docs: [
5322
+ "Percentage of fee B pending to split to the second position"
5323
+ ];
5324
+ type: "u8";
5325
+ },
5326
+ {
5327
+ name: "reward0Percentage";
5328
+ docs: [
5329
+ "Percentage of reward 0 pending to split to the second position"
5330
+ ];
5331
+ type: "u8";
5332
+ },
5333
+ {
5334
+ name: "reward1Percentage";
5335
+ docs: [
5336
+ "Percentage of reward 1 pending to split to the second position"
5337
+ ];
5338
+ type: "u8";
5339
+ },
5340
+ {
5341
+ name: "padding";
5342
+ docs: ["padding for future"];
5343
+ type: {
5344
+ array: ["u8", 16];
5345
+ };
5346
+ }
5347
+ ];
5348
+ };
5349
+ },
5285
5350
  {
5286
5351
  name: "staticConfigParameters";
5287
5352
  type: {
@@ -5564,9 +5629,7 @@ type BaseFee = {
5564
5629
  };
5565
5630
  type PoolFeesParams = {
5566
5631
  baseFee: BaseFee;
5567
- protocolFeePercent: number;
5568
- partnerFeePercent: number;
5569
- referralFeePercent: number;
5632
+ padding: number[];
5570
5633
  dynamicFee: DynamicFee | null;
5571
5634
  };
5572
5635
  type PrepareTokenAccountParams = {
@@ -6007,6 +6070,7 @@ type ClaimRewardParams = {
6007
6070
  positionState: PositionState;
6008
6071
  positionNftAccount: PublicKey;
6009
6072
  rewardIndex: number;
6073
+ skipReward: number;
6010
6074
  feePayer?: PublicKey;
6011
6075
  };
6012
6076
  type RefreshVestingParams = {
@@ -6068,6 +6132,21 @@ type DynamicFeeParams = {
6068
6132
  binStep: number;
6069
6133
  variableFeeControl: number;
6070
6134
  };
6135
+ type SplitPositionParams = {
6136
+ firstPositionOwner: PublicKey;
6137
+ secondPositionOwner: PublicKey;
6138
+ pool: PublicKey;
6139
+ firstPosition: PublicKey;
6140
+ firstPositionNftAccount: PublicKey;
6141
+ secondPosition: PublicKey;
6142
+ secondPositionNftAccount: PublicKey;
6143
+ permanentLockedLiquidityPercentage: number;
6144
+ unlockedLiquidityPercentage: number;
6145
+ feeAPercentage: number;
6146
+ feeBPercentage: number;
6147
+ reward0Percentage: number;
6148
+ reward1Percentage: number;
6149
+ };
6071
6150
 
6072
6151
  /**
6073
6152
  * CpAmm SDK class to interact with the DAMM-V2
@@ -6475,10 +6554,11 @@ declare class CpAmm {
6475
6554
  * @returns Transaction builder.
6476
6555
  */
6477
6556
  claimReward(params: ClaimRewardParams): TxBuilder;
6557
+ splitPosition(params: SplitPositionParams): TxBuilder;
6478
6558
  }
6479
6559
 
6480
- declare function getFirstKey(key1: PublicKey, key2: PublicKey): Buffer<ArrayBufferLike>;
6481
- declare function getSecondKey(key1: PublicKey, key2: PublicKey): Buffer<ArrayBufferLike>;
6560
+ declare function getFirstKey(key1: PublicKey, key2: PublicKey): Buffer;
6561
+ declare function getSecondKey(key1: PublicKey, key2: PublicKey): Buffer;
6482
6562
  declare function derivePoolAuthority(): PublicKey;
6483
6563
  declare function deriveConfigAddress(index: BN): PublicKey;
6484
6564
  declare function derivePoolAddress(config: PublicKey, tokenAMint: PublicKey, tokenBMint: PublicKey): PublicKey;
@@ -6761,7 +6841,7 @@ declare function decimalToQ64(num: Decimal): BN;
6761
6841
  var address = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
6762
6842
  var metadata = {
6763
6843
  name: "cp_amm",
6764
- version: "0.1.1",
6844
+ version: "0.1.3",
6765
6845
  spec: "0.1.0",
6766
6846
  description: "Created with Anchor"
6767
6847
  };
@@ -6926,29 +7006,7 @@ var instructions = [
6926
7006
  accounts: [
6927
7007
  {
6928
7008
  name: "pool_authority",
6929
- pda: {
6930
- seeds: [
6931
- {
6932
- kind: "const",
6933
- value: [
6934
- 112,
6935
- 111,
6936
- 111,
6937
- 108,
6938
- 95,
6939
- 97,
6940
- 117,
6941
- 116,
6942
- 104,
6943
- 111,
6944
- 114,
6945
- 105,
6946
- 116,
6947
- 121
6948
- ]
6949
- }
6950
- ]
6951
- }
7009
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
6952
7010
  },
6953
7011
  {
6954
7012
  name: "pool",
@@ -7084,29 +7142,7 @@ var instructions = [
7084
7142
  accounts: [
7085
7143
  {
7086
7144
  name: "pool_authority",
7087
- pda: {
7088
- seeds: [
7089
- {
7090
- kind: "const",
7091
- value: [
7092
- 112,
7093
- 111,
7094
- 111,
7095
- 108,
7096
- 95,
7097
- 97,
7098
- 117,
7099
- 116,
7100
- 104,
7101
- 111,
7102
- 114,
7103
- 105,
7104
- 116,
7105
- 121
7106
- ]
7107
- }
7108
- ]
7109
- }
7145
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
7110
7146
  },
7111
7147
  {
7112
7148
  name: "pool",
@@ -7246,29 +7282,7 @@ var instructions = [
7246
7282
  accounts: [
7247
7283
  {
7248
7284
  name: "pool_authority",
7249
- pda: {
7250
- seeds: [
7251
- {
7252
- kind: "const",
7253
- value: [
7254
- 112,
7255
- 111,
7256
- 111,
7257
- 108,
7258
- 95,
7259
- 97,
7260
- 117,
7261
- 116,
7262
- 104,
7263
- 111,
7264
- 114,
7265
- 105,
7266
- 116,
7267
- 121
7268
- ]
7269
- }
7270
- ]
7271
- }
7285
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
7272
7286
  },
7273
7287
  {
7274
7288
  name: "pool",
@@ -7560,6 +7574,14 @@ var instructions = [
7560
7574
  }
7561
7575
  ],
7562
7576
  args: [
7577
+ {
7578
+ name: "max_amount_a",
7579
+ type: "u64"
7580
+ },
7581
+ {
7582
+ name: "max_amount_b",
7583
+ type: "u64"
7584
+ }
7563
7585
  ]
7564
7586
  },
7565
7587
  {
@@ -7577,29 +7599,7 @@ var instructions = [
7577
7599
  accounts: [
7578
7600
  {
7579
7601
  name: "pool_authority",
7580
- pda: {
7581
- seeds: [
7582
- {
7583
- kind: "const",
7584
- value: [
7585
- 112,
7586
- 111,
7587
- 111,
7588
- 108,
7589
- 95,
7590
- 97,
7591
- 117,
7592
- 116,
7593
- 104,
7594
- 111,
7595
- 114,
7596
- 105,
7597
- 116,
7598
- 121
7599
- ]
7600
- }
7601
- ]
7602
- }
7602
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
7603
7603
  },
7604
7604
  {
7605
7605
  name: "pool",
@@ -7679,6 +7679,10 @@ var instructions = [
7679
7679
  {
7680
7680
  name: "reward_index",
7681
7681
  type: "u8"
7682
+ },
7683
+ {
7684
+ name: "skip_reward",
7685
+ type: "u8"
7682
7686
  }
7683
7687
  ]
7684
7688
  },
@@ -7845,15 +7849,40 @@ var instructions = [
7845
7849
  },
7846
7850
  {
7847
7851
  name: "pool_authority",
7852
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
7853
+ },
7854
+ {
7855
+ name: "rent_receiver",
7856
+ writable: true
7857
+ },
7858
+ {
7859
+ name: "owner",
7860
+ docs: [
7861
+ "Owner of position"
7862
+ ],
7863
+ signer: true
7864
+ },
7865
+ {
7866
+ name: "token_program",
7867
+ docs: [
7868
+ "Program to create NFT mint/token account and transfer for token22 account"
7869
+ ],
7870
+ address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
7871
+ },
7872
+ {
7873
+ name: "event_authority",
7848
7874
  pda: {
7849
7875
  seeds: [
7850
7876
  {
7851
7877
  kind: "const",
7852
7878
  value: [
7853
- 112,
7854
- 111,
7855
- 111,
7856
- 108,
7879
+ 95,
7880
+ 95,
7881
+ 101,
7882
+ 118,
7883
+ 101,
7884
+ 110,
7885
+ 116,
7857
7886
  95,
7858
7887
  97,
7859
7888
  117,
@@ -7870,22 +7899,37 @@ var instructions = [
7870
7899
  }
7871
7900
  },
7872
7901
  {
7873
- name: "rent_receiver",
7902
+ name: "program"
7903
+ }
7904
+ ],
7905
+ args: [
7906
+ ]
7907
+ },
7908
+ {
7909
+ name: "close_token_badge",
7910
+ discriminator: [
7911
+ 108,
7912
+ 146,
7913
+ 86,
7914
+ 110,
7915
+ 179,
7916
+ 254,
7917
+ 10,
7918
+ 104
7919
+ ],
7920
+ accounts: [
7921
+ {
7922
+ name: "token_badge",
7874
7923
  writable: true
7875
7924
  },
7876
7925
  {
7877
- name: "owner",
7878
- docs: [
7879
- "Owner of position"
7880
- ],
7926
+ name: "admin",
7927
+ writable: true,
7881
7928
  signer: true
7882
7929
  },
7883
7930
  {
7884
- name: "token_program",
7885
- docs: [
7886
- "Program to create NFT mint/token account and transfer for token22 account"
7887
- ],
7888
- address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
7931
+ name: "rent_receiver",
7932
+ writable: true
7889
7933
  },
7890
7934
  {
7891
7935
  name: "event_authority",
@@ -8296,29 +8340,7 @@ var instructions = [
8296
8340
  },
8297
8341
  {
8298
8342
  name: "pool_authority",
8299
- pda: {
8300
- seeds: [
8301
- {
8302
- kind: "const",
8303
- value: [
8304
- 112,
8305
- 111,
8306
- 111,
8307
- 108,
8308
- 95,
8309
- 97,
8310
- 117,
8311
- 116,
8312
- 104,
8313
- 111,
8314
- 114,
8315
- 105,
8316
- 116,
8317
- 121
8318
- ]
8319
- }
8320
- ]
8321
- }
8343
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
8322
8344
  },
8323
8345
  {
8324
8346
  name: "payer",
@@ -8621,29 +8643,7 @@ var instructions = [
8621
8643
  },
8622
8644
  {
8623
8645
  name: "pool_authority",
8624
- pda: {
8625
- seeds: [
8626
- {
8627
- kind: "const",
8628
- value: [
8629
- 112,
8630
- 111,
8631
- 111,
8632
- 108,
8633
- 95,
8634
- 97,
8635
- 117,
8636
- 116,
8637
- 104,
8638
- 111,
8639
- 114,
8640
- 105,
8641
- 116,
8642
- 121
8643
- ]
8644
- }
8645
- ]
8646
- }
8646
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
8647
8647
  },
8648
8648
  {
8649
8649
  name: "pool",
@@ -8923,29 +8923,7 @@ var instructions = [
8923
8923
  },
8924
8924
  {
8925
8925
  name: "pool_authority",
8926
- pda: {
8927
- seeds: [
8928
- {
8929
- kind: "const",
8930
- value: [
8931
- 112,
8932
- 111,
8933
- 111,
8934
- 108,
8935
- 95,
8936
- 97,
8937
- 117,
8938
- 116,
8939
- 104,
8940
- 111,
8941
- 114,
8942
- 105,
8943
- 116,
8944
- 121
8945
- ]
8946
- }
8947
- ]
8948
- }
8926
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
8949
8927
  },
8950
8928
  {
8951
8929
  name: "pool",
@@ -9229,29 +9207,7 @@ var instructions = [
9229
9207
  },
9230
9208
  {
9231
9209
  name: "pool_authority",
9232
- pda: {
9233
- seeds: [
9234
- {
9235
- kind: "const",
9236
- value: [
9237
- 112,
9238
- 111,
9239
- 111,
9240
- 108,
9241
- 95,
9242
- 97,
9243
- 117,
9244
- 116,
9245
- 104,
9246
- 111,
9247
- 114,
9248
- 105,
9249
- 116,
9250
- 121
9251
- ]
9252
- }
9253
- ]
9254
- }
9210
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
9255
9211
  },
9256
9212
  {
9257
9213
  name: "pool",
@@ -9463,29 +9419,7 @@ var instructions = [
9463
9419
  accounts: [
9464
9420
  {
9465
9421
  name: "pool_authority",
9466
- pda: {
9467
- seeds: [
9468
- {
9469
- kind: "const",
9470
- value: [
9471
- 112,
9472
- 111,
9473
- 111,
9474
- 108,
9475
- 95,
9476
- 97,
9477
- 117,
9478
- 116,
9479
- 104,
9480
- 111,
9481
- 114,
9482
- 105,
9483
- 116,
9484
- 121
9485
- ]
9486
- }
9487
- ]
9488
- }
9422
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
9489
9423
  },
9490
9424
  {
9491
9425
  name: "pool",
@@ -9528,7 +9462,11 @@ var instructions = [
9528
9462
  name: "reward_mint"
9529
9463
  },
9530
9464
  {
9531
- name: "admin",
9465
+ name: "signer",
9466
+ signer: true
9467
+ },
9468
+ {
9469
+ name: "payer",
9532
9470
  writable: true,
9533
9471
  signer: true
9534
9472
  },
@@ -9809,29 +9747,7 @@ var instructions = [
9809
9747
  accounts: [
9810
9748
  {
9811
9749
  name: "pool_authority",
9812
- pda: {
9813
- seeds: [
9814
- {
9815
- kind: "const",
9816
- value: [
9817
- 112,
9818
- 111,
9819
- 111,
9820
- 108,
9821
- 95,
9822
- 97,
9823
- 117,
9824
- 116,
9825
- 104,
9826
- 111,
9827
- 114,
9828
- 105,
9829
- 116,
9830
- 121
9831
- ]
9832
- }
9833
- ]
9834
- }
9750
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
9835
9751
  },
9836
9752
  {
9837
9753
  name: "pool",
@@ -9980,29 +9896,7 @@ var instructions = [
9980
9896
  accounts: [
9981
9897
  {
9982
9898
  name: "pool_authority",
9983
- pda: {
9984
- seeds: [
9985
- {
9986
- kind: "const",
9987
- value: [
9988
- 112,
9989
- 111,
9990
- 111,
9991
- 108,
9992
- 95,
9993
- 97,
9994
- 117,
9995
- 116,
9996
- 104,
9997
- 111,
9998
- 114,
9999
- 105,
10000
- 116,
10001
- 121
10002
- ]
10003
- }
10004
- ]
10005
- }
9899
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
10006
9900
  },
10007
9901
  {
10008
9902
  name: "pool",
@@ -10198,29 +10092,80 @@ var instructions = [
10198
10092
  ]
10199
10093
  },
10200
10094
  {
10201
- name: "swap",
10095
+ name: "split_position",
10202
10096
  discriminator: [
10203
- 248,
10204
- 198,
10205
- 158,
10206
- 145,
10207
- 225,
10208
- 117,
10209
- 135,
10210
- 200
10097
+ 172,
10098
+ 241,
10099
+ 221,
10100
+ 138,
10101
+ 161,
10102
+ 29,
10103
+ 253,
10104
+ 42
10211
10105
  ],
10212
10106
  accounts: [
10213
10107
  {
10214
- name: "pool_authority",
10108
+ name: "pool",
10109
+ writable: true,
10110
+ relations: [
10111
+ "first_position",
10112
+ "second_position"
10113
+ ]
10114
+ },
10115
+ {
10116
+ name: "first_position",
10117
+ docs: [
10118
+ "The first position"
10119
+ ],
10120
+ writable: true
10121
+ },
10122
+ {
10123
+ name: "first_position_nft_account",
10124
+ docs: [
10125
+ "The token account for position nft"
10126
+ ]
10127
+ },
10128
+ {
10129
+ name: "second_position",
10130
+ docs: [
10131
+ "The second position"
10132
+ ],
10133
+ writable: true
10134
+ },
10135
+ {
10136
+ name: "second_position_nft_account",
10137
+ docs: [
10138
+ "The token account for position nft"
10139
+ ]
10140
+ },
10141
+ {
10142
+ name: "first_owner",
10143
+ docs: [
10144
+ "Owner of first position"
10145
+ ],
10146
+ signer: true
10147
+ },
10148
+ {
10149
+ name: "second_owner",
10150
+ docs: [
10151
+ "Owner of second position"
10152
+ ],
10153
+ signer: true
10154
+ },
10155
+ {
10156
+ name: "event_authority",
10215
10157
  pda: {
10216
10158
  seeds: [
10217
10159
  {
10218
10160
  kind: "const",
10219
10161
  value: [
10220
- 112,
10221
- 111,
10222
- 111,
10223
- 108,
10162
+ 95,
10163
+ 95,
10164
+ 101,
10165
+ 118,
10166
+ 101,
10167
+ 110,
10168
+ 116,
10224
10169
  95,
10225
10170
  97,
10226
10171
  117,
@@ -10236,6 +10181,38 @@ var instructions = [
10236
10181
  ]
10237
10182
  }
10238
10183
  },
10184
+ {
10185
+ name: "program"
10186
+ }
10187
+ ],
10188
+ args: [
10189
+ {
10190
+ name: "params",
10191
+ type: {
10192
+ defined: {
10193
+ name: "SplitPositionParameters"
10194
+ }
10195
+ }
10196
+ }
10197
+ ]
10198
+ },
10199
+ {
10200
+ name: "swap",
10201
+ discriminator: [
10202
+ 248,
10203
+ 198,
10204
+ 158,
10205
+ 145,
10206
+ 225,
10207
+ 117,
10208
+ 135,
10209
+ 200
10210
+ ],
10211
+ accounts: [
10212
+ {
10213
+ name: "pool_authority",
10214
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
10215
+ },
10239
10216
  {
10240
10217
  name: "pool",
10241
10218
  docs: [
@@ -10378,7 +10355,7 @@ var instructions = [
10378
10355
  writable: true
10379
10356
  },
10380
10357
  {
10381
- name: "admin",
10358
+ name: "signer",
10382
10359
  signer: true
10383
10360
  },
10384
10361
  {
@@ -10443,7 +10420,7 @@ var instructions = [
10443
10420
  writable: true
10444
10421
  },
10445
10422
  {
10446
- name: "admin",
10423
+ name: "signer",
10447
10424
  signer: true
10448
10425
  },
10449
10426
  {
@@ -10505,29 +10482,7 @@ var instructions = [
10505
10482
  accounts: [
10506
10483
  {
10507
10484
  name: "pool_authority",
10508
- pda: {
10509
- seeds: [
10510
- {
10511
- kind: "const",
10512
- value: [
10513
- 112,
10514
- 111,
10515
- 111,
10516
- 108,
10517
- 95,
10518
- 97,
10519
- 117,
10520
- 116,
10521
- 104,
10522
- 111,
10523
- 114,
10524
- 105,
10525
- 116,
10526
- 121
10527
- ]
10528
- }
10529
- ]
10530
- }
10485
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
10531
10486
  },
10532
10487
  {
10533
10488
  name: "pool",
@@ -10933,6 +10888,19 @@ var events = [
10933
10888
  146
10934
10889
  ]
10935
10890
  },
10891
+ {
10892
+ name: "EvtSplitPosition",
10893
+ discriminator: [
10894
+ 182,
10895
+ 138,
10896
+ 42,
10897
+ 254,
10898
+ 27,
10899
+ 94,
10900
+ 82,
10901
+ 221
10902
+ ]
10903
+ },
10936
10904
  {
10937
10905
  name: "EvtSwap",
10938
10906
  discriminator: [
@@ -11196,6 +11164,31 @@ var errors = [
11196
11164
  code: 6041,
11197
11165
  name: "InvalidConfigType",
11198
11166
  msg: "Invalid config type"
11167
+ },
11168
+ {
11169
+ code: 6042,
11170
+ name: "InvalidPoolCreator",
11171
+ msg: "Invalid pool creator"
11172
+ },
11173
+ {
11174
+ code: 6043,
11175
+ name: "RewardVaultFrozenSkipRequired",
11176
+ msg: "Reward vault is frozen, must skip reward to proceed"
11177
+ },
11178
+ {
11179
+ code: 6044,
11180
+ name: "InvalidSplitPositionParameters",
11181
+ msg: "Invalid parameters for split position"
11182
+ },
11183
+ {
11184
+ code: 6045,
11185
+ name: "UnsupportPositionHasVestingLock",
11186
+ msg: "Unsupported split position has vesting lock"
11187
+ },
11188
+ {
11189
+ code: 6046,
11190
+ name: "SamePosition",
11191
+ msg: "Same position"
11199
11192
  }
11200
11193
  ];
11201
11194
  var types = [
@@ -12027,6 +12020,18 @@ var types = [
12027
12020
  {
12028
12021
  name: "transfer_fee_excluded_amount_in",
12029
12022
  type: "u64"
12023
+ },
12024
+ {
12025
+ name: "reward_duration_end",
12026
+ type: "u64"
12027
+ },
12028
+ {
12029
+ name: "pre_reward_rate",
12030
+ type: "u128"
12031
+ },
12032
+ {
12033
+ name: "post_reward_rate",
12034
+ type: "u128"
12030
12035
  }
12031
12036
  ]
12032
12037
  }
@@ -12144,6 +12149,10 @@ var types = [
12144
12149
  name: "funder",
12145
12150
  type: "pubkey"
12146
12151
  },
12152
+ {
12153
+ name: "creator",
12154
+ type: "pubkey"
12155
+ },
12147
12156
  {
12148
12157
  name: "reward_index",
12149
12158
  type: "u8"
@@ -12275,6 +12284,70 @@ var types = [
12275
12284
  ]
12276
12285
  }
12277
12286
  },
12287
+ {
12288
+ name: "EvtSplitPosition",
12289
+ type: {
12290
+ kind: "struct",
12291
+ fields: [
12292
+ {
12293
+ name: "pool",
12294
+ type: "pubkey"
12295
+ },
12296
+ {
12297
+ name: "first_owner",
12298
+ type: "pubkey"
12299
+ },
12300
+ {
12301
+ name: "second_owner",
12302
+ type: "pubkey"
12303
+ },
12304
+ {
12305
+ name: "first_position",
12306
+ type: "pubkey"
12307
+ },
12308
+ {
12309
+ name: "second_position",
12310
+ type: "pubkey"
12311
+ },
12312
+ {
12313
+ name: "current_sqrt_price",
12314
+ type: "u128"
12315
+ },
12316
+ {
12317
+ name: "amount_splits",
12318
+ type: {
12319
+ defined: {
12320
+ name: "SplitAmountInfo"
12321
+ }
12322
+ }
12323
+ },
12324
+ {
12325
+ name: "first_position_info",
12326
+ type: {
12327
+ defined: {
12328
+ name: "SplitPositionInfo"
12329
+ }
12330
+ }
12331
+ },
12332
+ {
12333
+ name: "second_position_info",
12334
+ type: {
12335
+ defined: {
12336
+ name: "SplitPositionInfo"
12337
+ }
12338
+ }
12339
+ },
12340
+ {
12341
+ name: "split_position_parameters",
12342
+ type: {
12343
+ defined: {
12344
+ name: "SplitPositionParameters"
12345
+ }
12346
+ }
12347
+ }
12348
+ ]
12349
+ }
12350
+ },
12278
12351
  {
12279
12352
  name: "EvtSwap",
12280
12353
  type: {
@@ -12720,6 +12793,13 @@ var types = [
12720
12793
  }
12721
12794
  }
12722
12795
  },
12796
+ {
12797
+ name: "creator",
12798
+ docs: [
12799
+ "pool creator"
12800
+ ],
12801
+ type: "pubkey"
12802
+ },
12723
12803
  {
12724
12804
  name: "_padding_1",
12725
12805
  docs: [
@@ -12728,7 +12808,7 @@ var types = [
12728
12808
  type: {
12729
12809
  array: [
12730
12810
  "u64",
12731
- 10
12811
+ 6
12732
12812
  ]
12733
12813
  }
12734
12814
  },
@@ -12771,25 +12851,16 @@ var types = [
12771
12851
  }
12772
12852
  },
12773
12853
  {
12774
- name: "protocol_fee_percent",
12775
- docs: [
12776
- "Protocol trade fee percent"
12777
- ],
12778
- type: "u8"
12779
- },
12780
- {
12781
- name: "partner_fee_percent",
12782
- docs: [
12783
- "partner fee percent"
12784
- ],
12785
- type: "u8"
12786
- },
12787
- {
12788
- name: "referral_fee_percent",
12854
+ name: "padding",
12789
12855
  docs: [
12790
- "referral fee percent"
12856
+ "padding"
12791
12857
  ],
12792
- type: "u8"
12858
+ type: {
12859
+ array: [
12860
+ "u8",
12861
+ 3
12862
+ ]
12863
+ }
12793
12864
  },
12794
12865
  {
12795
12866
  name: "dynamic_fee",
@@ -13292,6 +13363,128 @@ var types = [
13292
13363
  ]
13293
13364
  }
13294
13365
  },
13366
+ {
13367
+ name: "SplitAmountInfo",
13368
+ type: {
13369
+ kind: "struct",
13370
+ fields: [
13371
+ {
13372
+ name: "permanent_locked_liquidity",
13373
+ type: "u128"
13374
+ },
13375
+ {
13376
+ name: "unlocked_liquidity",
13377
+ type: "u128"
13378
+ },
13379
+ {
13380
+ name: "fee_a",
13381
+ type: "u64"
13382
+ },
13383
+ {
13384
+ name: "fee_b",
13385
+ type: "u64"
13386
+ },
13387
+ {
13388
+ name: "reward_0",
13389
+ type: "u64"
13390
+ },
13391
+ {
13392
+ name: "reward_1",
13393
+ type: "u64"
13394
+ }
13395
+ ]
13396
+ }
13397
+ },
13398
+ {
13399
+ name: "SplitPositionInfo",
13400
+ type: {
13401
+ kind: "struct",
13402
+ fields: [
13403
+ {
13404
+ name: "liquidity",
13405
+ type: "u128"
13406
+ },
13407
+ {
13408
+ name: "fee_a",
13409
+ type: "u64"
13410
+ },
13411
+ {
13412
+ name: "fee_b",
13413
+ type: "u64"
13414
+ },
13415
+ {
13416
+ name: "reward_0",
13417
+ type: "u64"
13418
+ },
13419
+ {
13420
+ name: "reward_1",
13421
+ type: "u64"
13422
+ }
13423
+ ]
13424
+ }
13425
+ },
13426
+ {
13427
+ name: "SplitPositionParameters",
13428
+ type: {
13429
+ kind: "struct",
13430
+ fields: [
13431
+ {
13432
+ name: "unlocked_liquidity_percentage",
13433
+ docs: [
13434
+ "Percentage of unlocked liquidity to split to the second position"
13435
+ ],
13436
+ type: "u8"
13437
+ },
13438
+ {
13439
+ name: "permanent_locked_liquidity_percentage",
13440
+ docs: [
13441
+ "Percentage of permanent locked liquidity to split to the second position"
13442
+ ],
13443
+ type: "u8"
13444
+ },
13445
+ {
13446
+ name: "fee_a_percentage",
13447
+ docs: [
13448
+ "Percentage of fee A pending to split to the second position"
13449
+ ],
13450
+ type: "u8"
13451
+ },
13452
+ {
13453
+ name: "fee_b_percentage",
13454
+ docs: [
13455
+ "Percentage of fee B pending to split to the second position"
13456
+ ],
13457
+ type: "u8"
13458
+ },
13459
+ {
13460
+ name: "reward_0_percentage",
13461
+ docs: [
13462
+ "Percentage of reward 0 pending to split to the second position"
13463
+ ],
13464
+ type: "u8"
13465
+ },
13466
+ {
13467
+ name: "reward_1_percentage",
13468
+ docs: [
13469
+ "Percentage of reward 1 pending to split to the second position"
13470
+ ],
13471
+ type: "u8"
13472
+ },
13473
+ {
13474
+ name: "padding",
13475
+ docs: [
13476
+ "padding for future"
13477
+ ],
13478
+ type: {
13479
+ array: [
13480
+ "u8",
13481
+ 16
13482
+ ]
13483
+ }
13484
+ }
13485
+ ]
13486
+ }
13487
+ },
13295
13488
  {
13296
13489
  name: "StaticConfigParameters",
13297
13490
  type: {
@@ -13554,4 +13747,4 @@ var CpAmmIDL = {
13554
13747
  types: types
13555
13748
  };
13556
13749
 
13557
- export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteExactOutParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type QuoteExactOutResult, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SetupFeeClaimAccountsParams, type SwapAmount, type SwapParams, type SwapQuotes, type SwapResult, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getBaseFeeParams, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getFeeMode, getFeeNumerator, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getNextSqrtPriceFromAmountARoundingDown, getNextSqrtPriceFromAmountBRoundingUp, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getSwapResultFromOutAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };
13750
+ export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteExactOutParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type QuoteExactOutResult, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SetupFeeClaimAccountsParams, type SplitPositionParams, type SwapAmount, type SwapParams, type SwapQuotes, type SwapResult, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getBaseFeeParams, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getFeeMode, getFeeNumerator, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getNextSqrtPriceFromAmountARoundingDown, getNextSqrtPriceFromAmountBRoundingUp, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getSwapResultFromOutAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };