@meteora-ag/cp-amm-sdk 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +735 -1798
- package/dist/index.d.ts +735 -1798
- package/dist/index.js +478 -907
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +478 -907
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,6 +41,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41
41
|
|
|
42
42
|
// src/CpAmm.ts
|
|
43
43
|
var _anchor = require('@coral-xyz/anchor');
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
44
48
|
var _spltoken = require('@solana/spl-token');
|
|
45
49
|
var _invariant = require('invariant'); var _invariant2 = _interopRequireDefault(_invariant);
|
|
46
50
|
|
|
@@ -49,7 +53,7 @@ var cp_amm_default = {
|
|
|
49
53
|
address: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG",
|
|
50
54
|
metadata: {
|
|
51
55
|
name: "cp_amm",
|
|
52
|
-
version: "0.2.
|
|
56
|
+
version: "0.2.2",
|
|
53
57
|
spec: "0.1.0",
|
|
54
58
|
description: "Created with Anchor"
|
|
55
59
|
},
|
|
@@ -137,9 +141,9 @@ var cp_amm_default = {
|
|
|
137
141
|
]
|
|
138
142
|
},
|
|
139
143
|
{
|
|
140
|
-
name: "
|
|
144
|
+
name: "signer",
|
|
141
145
|
docs: [
|
|
142
|
-
"
|
|
146
|
+
"Signer"
|
|
143
147
|
],
|
|
144
148
|
signer: true
|
|
145
149
|
},
|
|
@@ -156,33 +160,7 @@ var cp_amm_default = {
|
|
|
156
160
|
]
|
|
157
161
|
},
|
|
158
162
|
{
|
|
159
|
-
name: "event_authority"
|
|
160
|
-
pda: {
|
|
161
|
-
seeds: [
|
|
162
|
-
{
|
|
163
|
-
kind: "const",
|
|
164
|
-
value: [
|
|
165
|
-
95,
|
|
166
|
-
95,
|
|
167
|
-
101,
|
|
168
|
-
118,
|
|
169
|
-
101,
|
|
170
|
-
110,
|
|
171
|
-
116,
|
|
172
|
-
95,
|
|
173
|
-
97,
|
|
174
|
-
117,
|
|
175
|
-
116,
|
|
176
|
-
104,
|
|
177
|
-
111,
|
|
178
|
-
114,
|
|
179
|
-
105,
|
|
180
|
-
116,
|
|
181
|
-
121
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
}
|
|
163
|
+
name: "event_authority"
|
|
186
164
|
},
|
|
187
165
|
{
|
|
188
166
|
name: "program"
|
|
@@ -285,9 +263,9 @@ var cp_amm_default = {
|
|
|
285
263
|
]
|
|
286
264
|
},
|
|
287
265
|
{
|
|
288
|
-
name: "
|
|
266
|
+
name: "signer",
|
|
289
267
|
docs: [
|
|
290
|
-
"
|
|
268
|
+
"Signer"
|
|
291
269
|
],
|
|
292
270
|
signer: true
|
|
293
271
|
},
|
|
@@ -304,33 +282,7 @@ var cp_amm_default = {
|
|
|
304
282
|
]
|
|
305
283
|
},
|
|
306
284
|
{
|
|
307
|
-
name: "event_authority"
|
|
308
|
-
pda: {
|
|
309
|
-
seeds: [
|
|
310
|
-
{
|
|
311
|
-
kind: "const",
|
|
312
|
-
value: [
|
|
313
|
-
95,
|
|
314
|
-
95,
|
|
315
|
-
101,
|
|
316
|
-
118,
|
|
317
|
-
101,
|
|
318
|
-
110,
|
|
319
|
-
116,
|
|
320
|
-
95,
|
|
321
|
-
97,
|
|
322
|
-
117,
|
|
323
|
-
116,
|
|
324
|
-
104,
|
|
325
|
-
111,
|
|
326
|
-
114,
|
|
327
|
-
105,
|
|
328
|
-
116,
|
|
329
|
-
121
|
|
330
|
-
]
|
|
331
|
-
}
|
|
332
|
-
]
|
|
333
|
-
}
|
|
285
|
+
name: "event_authority"
|
|
334
286
|
},
|
|
335
287
|
{
|
|
336
288
|
name: "program"
|
|
@@ -431,33 +383,7 @@ var cp_amm_default = {
|
|
|
431
383
|
]
|
|
432
384
|
},
|
|
433
385
|
{
|
|
434
|
-
name: "event_authority"
|
|
435
|
-
pda: {
|
|
436
|
-
seeds: [
|
|
437
|
-
{
|
|
438
|
-
kind: "const",
|
|
439
|
-
value: [
|
|
440
|
-
95,
|
|
441
|
-
95,
|
|
442
|
-
101,
|
|
443
|
-
118,
|
|
444
|
-
101,
|
|
445
|
-
110,
|
|
446
|
-
116,
|
|
447
|
-
95,
|
|
448
|
-
97,
|
|
449
|
-
117,
|
|
450
|
-
116,
|
|
451
|
-
104,
|
|
452
|
-
111,
|
|
453
|
-
114,
|
|
454
|
-
105,
|
|
455
|
-
116,
|
|
456
|
-
121
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
]
|
|
460
|
-
}
|
|
386
|
+
name: "event_authority"
|
|
461
387
|
},
|
|
462
388
|
{
|
|
463
389
|
name: "program"
|
|
@@ -474,6 +400,79 @@ var cp_amm_default = {
|
|
|
474
400
|
}
|
|
475
401
|
]
|
|
476
402
|
},
|
|
403
|
+
{
|
|
404
|
+
name: "claim_protocol_fee2",
|
|
405
|
+
discriminator: [
|
|
406
|
+
235,
|
|
407
|
+
194,
|
|
408
|
+
54,
|
|
409
|
+
69,
|
|
410
|
+
65,
|
|
411
|
+
10,
|
|
412
|
+
236,
|
|
413
|
+
112
|
|
414
|
+
],
|
|
415
|
+
accounts: [
|
|
416
|
+
{
|
|
417
|
+
name: "receiver_token_account",
|
|
418
|
+
docs: [
|
|
419
|
+
"receiver token account for the claimed token. validated through the protocol_fee program"
|
|
420
|
+
],
|
|
421
|
+
writable: true
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
name: "token_a_mint",
|
|
425
|
+
relations: [
|
|
426
|
+
"pool"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "token_b_mint",
|
|
431
|
+
relations: [
|
|
432
|
+
"pool"
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: "token_a_program"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "token_b_program"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: "pool",
|
|
443
|
+
writable: true
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
name: "token_a_vault",
|
|
447
|
+
writable: true,
|
|
448
|
+
relations: [
|
|
449
|
+
"pool"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: "token_b_vault",
|
|
454
|
+
writable: true,
|
|
455
|
+
relations: [
|
|
456
|
+
"pool"
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
name: "pool_authority",
|
|
461
|
+
address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "signer",
|
|
465
|
+
signer: true,
|
|
466
|
+
address: "FkU5rQCWQM131skHCpcEbK8P1JrQGsBgqXe55w525SSF"
|
|
467
|
+
}
|
|
468
|
+
],
|
|
469
|
+
args: [
|
|
470
|
+
{
|
|
471
|
+
name: "max_amount",
|
|
472
|
+
type: "u64"
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
},
|
|
477
476
|
{
|
|
478
477
|
name: "claim_reward",
|
|
479
478
|
discriminator: [
|
|
@@ -523,9 +522,9 @@ var cp_amm_default = {
|
|
|
523
522
|
]
|
|
524
523
|
},
|
|
525
524
|
{
|
|
526
|
-
name: "
|
|
525
|
+
name: "signer",
|
|
527
526
|
docs: [
|
|
528
|
-
"
|
|
527
|
+
"Signer"
|
|
529
528
|
],
|
|
530
529
|
signer: true
|
|
531
530
|
},
|
|
@@ -533,33 +532,7 @@ var cp_amm_default = {
|
|
|
533
532
|
name: "token_program"
|
|
534
533
|
},
|
|
535
534
|
{
|
|
536
|
-
name: "event_authority"
|
|
537
|
-
pda: {
|
|
538
|
-
seeds: [
|
|
539
|
-
{
|
|
540
|
-
kind: "const",
|
|
541
|
-
value: [
|
|
542
|
-
95,
|
|
543
|
-
95,
|
|
544
|
-
101,
|
|
545
|
-
118,
|
|
546
|
-
101,
|
|
547
|
-
110,
|
|
548
|
-
116,
|
|
549
|
-
95,
|
|
550
|
-
97,
|
|
551
|
-
117,
|
|
552
|
-
116,
|
|
553
|
-
104,
|
|
554
|
-
111,
|
|
555
|
-
114,
|
|
556
|
-
105,
|
|
557
|
-
116,
|
|
558
|
-
121
|
|
559
|
-
]
|
|
560
|
-
}
|
|
561
|
-
]
|
|
562
|
-
}
|
|
535
|
+
name: "event_authority"
|
|
563
536
|
},
|
|
564
537
|
{
|
|
565
538
|
name: "program"
|
|
@@ -605,33 +578,7 @@ var cp_amm_default = {
|
|
|
605
578
|
writable: true
|
|
606
579
|
},
|
|
607
580
|
{
|
|
608
|
-
name: "event_authority"
|
|
609
|
-
pda: {
|
|
610
|
-
seeds: [
|
|
611
|
-
{
|
|
612
|
-
kind: "const",
|
|
613
|
-
value: [
|
|
614
|
-
95,
|
|
615
|
-
95,
|
|
616
|
-
101,
|
|
617
|
-
118,
|
|
618
|
-
101,
|
|
619
|
-
110,
|
|
620
|
-
116,
|
|
621
|
-
95,
|
|
622
|
-
97,
|
|
623
|
-
117,
|
|
624
|
-
116,
|
|
625
|
-
104,
|
|
626
|
-
111,
|
|
627
|
-
114,
|
|
628
|
-
105,
|
|
629
|
-
116,
|
|
630
|
-
121
|
|
631
|
-
]
|
|
632
|
-
}
|
|
633
|
-
]
|
|
634
|
-
}
|
|
581
|
+
name: "event_authority"
|
|
635
582
|
},
|
|
636
583
|
{
|
|
637
584
|
name: "program"
|
|
@@ -665,33 +612,7 @@ var cp_amm_default = {
|
|
|
665
612
|
writable: true
|
|
666
613
|
},
|
|
667
614
|
{
|
|
668
|
-
name: "event_authority"
|
|
669
|
-
pda: {
|
|
670
|
-
seeds: [
|
|
671
|
-
{
|
|
672
|
-
kind: "const",
|
|
673
|
-
value: [
|
|
674
|
-
95,
|
|
675
|
-
95,
|
|
676
|
-
101,
|
|
677
|
-
118,
|
|
678
|
-
101,
|
|
679
|
-
110,
|
|
680
|
-
116,
|
|
681
|
-
95,
|
|
682
|
-
97,
|
|
683
|
-
117,
|
|
684
|
-
116,
|
|
685
|
-
104,
|
|
686
|
-
111,
|
|
687
|
-
114,
|
|
688
|
-
105,
|
|
689
|
-
116,
|
|
690
|
-
121
|
|
691
|
-
]
|
|
692
|
-
}
|
|
693
|
-
]
|
|
694
|
-
}
|
|
615
|
+
name: "event_authority"
|
|
695
616
|
},
|
|
696
617
|
{
|
|
697
618
|
name: "program"
|
|
@@ -760,33 +681,7 @@ var cp_amm_default = {
|
|
|
760
681
|
address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
761
682
|
},
|
|
762
683
|
{
|
|
763
|
-
name: "event_authority"
|
|
764
|
-
pda: {
|
|
765
|
-
seeds: [
|
|
766
|
-
{
|
|
767
|
-
kind: "const",
|
|
768
|
-
value: [
|
|
769
|
-
95,
|
|
770
|
-
95,
|
|
771
|
-
101,
|
|
772
|
-
118,
|
|
773
|
-
101,
|
|
774
|
-
110,
|
|
775
|
-
116,
|
|
776
|
-
95,
|
|
777
|
-
97,
|
|
778
|
-
117,
|
|
779
|
-
116,
|
|
780
|
-
104,
|
|
781
|
-
111,
|
|
782
|
-
114,
|
|
783
|
-
105,
|
|
784
|
-
116,
|
|
785
|
-
121
|
|
786
|
-
]
|
|
787
|
-
}
|
|
788
|
-
]
|
|
789
|
-
}
|
|
684
|
+
name: "event_authority"
|
|
790
685
|
},
|
|
791
686
|
{
|
|
792
687
|
name: "program"
|
|
@@ -823,33 +718,7 @@ var cp_amm_default = {
|
|
|
823
718
|
writable: true
|
|
824
719
|
},
|
|
825
720
|
{
|
|
826
|
-
name: "event_authority"
|
|
827
|
-
pda: {
|
|
828
|
-
seeds: [
|
|
829
|
-
{
|
|
830
|
-
kind: "const",
|
|
831
|
-
value: [
|
|
832
|
-
95,
|
|
833
|
-
95,
|
|
834
|
-
101,
|
|
835
|
-
118,
|
|
836
|
-
101,
|
|
837
|
-
110,
|
|
838
|
-
116,
|
|
839
|
-
95,
|
|
840
|
-
97,
|
|
841
|
-
117,
|
|
842
|
-
116,
|
|
843
|
-
104,
|
|
844
|
-
111,
|
|
845
|
-
114,
|
|
846
|
-
105,
|
|
847
|
-
116,
|
|
848
|
-
121
|
|
849
|
-
]
|
|
850
|
-
}
|
|
851
|
-
]
|
|
852
|
-
}
|
|
721
|
+
name: "event_authority"
|
|
853
722
|
},
|
|
854
723
|
{
|
|
855
724
|
name: "program"
|
|
@@ -913,33 +782,7 @@ var cp_amm_default = {
|
|
|
913
782
|
address: "11111111111111111111111111111111"
|
|
914
783
|
},
|
|
915
784
|
{
|
|
916
|
-
name: "event_authority"
|
|
917
|
-
pda: {
|
|
918
|
-
seeds: [
|
|
919
|
-
{
|
|
920
|
-
kind: "const",
|
|
921
|
-
value: [
|
|
922
|
-
95,
|
|
923
|
-
95,
|
|
924
|
-
101,
|
|
925
|
-
118,
|
|
926
|
-
101,
|
|
927
|
-
110,
|
|
928
|
-
116,
|
|
929
|
-
95,
|
|
930
|
-
97,
|
|
931
|
-
117,
|
|
932
|
-
116,
|
|
933
|
-
104,
|
|
934
|
-
111,
|
|
935
|
-
114,
|
|
936
|
-
105,
|
|
937
|
-
116,
|
|
938
|
-
121
|
|
939
|
-
]
|
|
940
|
-
}
|
|
941
|
-
]
|
|
942
|
-
}
|
|
785
|
+
name: "event_authority"
|
|
943
786
|
},
|
|
944
787
|
{
|
|
945
788
|
name: "program"
|
|
@@ -1013,33 +856,7 @@ var cp_amm_default = {
|
|
|
1013
856
|
address: "11111111111111111111111111111111"
|
|
1014
857
|
},
|
|
1015
858
|
{
|
|
1016
|
-
name: "event_authority"
|
|
1017
|
-
pda: {
|
|
1018
|
-
seeds: [
|
|
1019
|
-
{
|
|
1020
|
-
kind: "const",
|
|
1021
|
-
value: [
|
|
1022
|
-
95,
|
|
1023
|
-
95,
|
|
1024
|
-
101,
|
|
1025
|
-
118,
|
|
1026
|
-
101,
|
|
1027
|
-
110,
|
|
1028
|
-
116,
|
|
1029
|
-
95,
|
|
1030
|
-
97,
|
|
1031
|
-
117,
|
|
1032
|
-
116,
|
|
1033
|
-
104,
|
|
1034
|
-
111,
|
|
1035
|
-
114,
|
|
1036
|
-
105,
|
|
1037
|
-
116,
|
|
1038
|
-
121
|
|
1039
|
-
]
|
|
1040
|
-
}
|
|
1041
|
-
]
|
|
1042
|
-
}
|
|
859
|
+
name: "event_authority"
|
|
1043
860
|
},
|
|
1044
861
|
{
|
|
1045
862
|
name: "program"
|
|
@@ -1118,33 +935,7 @@ var cp_amm_default = {
|
|
|
1118
935
|
address: "11111111111111111111111111111111"
|
|
1119
936
|
},
|
|
1120
937
|
{
|
|
1121
|
-
name: "event_authority"
|
|
1122
|
-
pda: {
|
|
1123
|
-
seeds: [
|
|
1124
|
-
{
|
|
1125
|
-
kind: "const",
|
|
1126
|
-
value: [
|
|
1127
|
-
95,
|
|
1128
|
-
95,
|
|
1129
|
-
101,
|
|
1130
|
-
118,
|
|
1131
|
-
101,
|
|
1132
|
-
110,
|
|
1133
|
-
116,
|
|
1134
|
-
95,
|
|
1135
|
-
97,
|
|
1136
|
-
117,
|
|
1137
|
-
116,
|
|
1138
|
-
104,
|
|
1139
|
-
111,
|
|
1140
|
-
114,
|
|
1141
|
-
105,
|
|
1142
|
-
116,
|
|
1143
|
-
121
|
|
1144
|
-
]
|
|
1145
|
-
}
|
|
1146
|
-
]
|
|
1147
|
-
}
|
|
938
|
+
name: "event_authority"
|
|
1148
939
|
},
|
|
1149
940
|
{
|
|
1150
941
|
name: "program"
|
|
@@ -1274,33 +1065,7 @@ var cp_amm_default = {
|
|
|
1274
1065
|
address: "11111111111111111111111111111111"
|
|
1275
1066
|
},
|
|
1276
1067
|
{
|
|
1277
|
-
name: "event_authority"
|
|
1278
|
-
pda: {
|
|
1279
|
-
seeds: [
|
|
1280
|
-
{
|
|
1281
|
-
kind: "const",
|
|
1282
|
-
value: [
|
|
1283
|
-
95,
|
|
1284
|
-
95,
|
|
1285
|
-
101,
|
|
1286
|
-
118,
|
|
1287
|
-
101,
|
|
1288
|
-
110,
|
|
1289
|
-
116,
|
|
1290
|
-
95,
|
|
1291
|
-
97,
|
|
1292
|
-
117,
|
|
1293
|
-
116,
|
|
1294
|
-
104,
|
|
1295
|
-
111,
|
|
1296
|
-
114,
|
|
1297
|
-
105,
|
|
1298
|
-
116,
|
|
1299
|
-
121
|
|
1300
|
-
]
|
|
1301
|
-
}
|
|
1302
|
-
]
|
|
1303
|
-
}
|
|
1068
|
+
name: "event_authority"
|
|
1304
1069
|
},
|
|
1305
1070
|
{
|
|
1306
1071
|
name: "program"
|
|
@@ -1369,33 +1134,7 @@ var cp_amm_default = {
|
|
|
1369
1134
|
address: "11111111111111111111111111111111"
|
|
1370
1135
|
},
|
|
1371
1136
|
{
|
|
1372
|
-
name: "event_authority"
|
|
1373
|
-
pda: {
|
|
1374
|
-
seeds: [
|
|
1375
|
-
{
|
|
1376
|
-
kind: "const",
|
|
1377
|
-
value: [
|
|
1378
|
-
95,
|
|
1379
|
-
95,
|
|
1380
|
-
101,
|
|
1381
|
-
118,
|
|
1382
|
-
101,
|
|
1383
|
-
110,
|
|
1384
|
-
116,
|
|
1385
|
-
95,
|
|
1386
|
-
97,
|
|
1387
|
-
117,
|
|
1388
|
-
116,
|
|
1389
|
-
104,
|
|
1390
|
-
111,
|
|
1391
|
-
114,
|
|
1392
|
-
105,
|
|
1393
|
-
116,
|
|
1394
|
-
121
|
|
1395
|
-
]
|
|
1396
|
-
}
|
|
1397
|
-
]
|
|
1398
|
-
}
|
|
1137
|
+
name: "event_authority"
|
|
1399
1138
|
},
|
|
1400
1139
|
{
|
|
1401
1140
|
name: "program"
|
|
@@ -1572,33 +1311,7 @@ var cp_amm_default = {
|
|
|
1572
1311
|
name: "token_program"
|
|
1573
1312
|
},
|
|
1574
1313
|
{
|
|
1575
|
-
name: "event_authority"
|
|
1576
|
-
pda: {
|
|
1577
|
-
seeds: [
|
|
1578
|
-
{
|
|
1579
|
-
kind: "const",
|
|
1580
|
-
value: [
|
|
1581
|
-
95,
|
|
1582
|
-
95,
|
|
1583
|
-
101,
|
|
1584
|
-
118,
|
|
1585
|
-
101,
|
|
1586
|
-
110,
|
|
1587
|
-
116,
|
|
1588
|
-
95,
|
|
1589
|
-
97,
|
|
1590
|
-
117,
|
|
1591
|
-
116,
|
|
1592
|
-
104,
|
|
1593
|
-
111,
|
|
1594
|
-
114,
|
|
1595
|
-
105,
|
|
1596
|
-
116,
|
|
1597
|
-
121
|
|
1598
|
-
]
|
|
1599
|
-
}
|
|
1600
|
-
]
|
|
1601
|
-
}
|
|
1314
|
+
name: "event_authority"
|
|
1602
1315
|
},
|
|
1603
1316
|
{
|
|
1604
1317
|
name: "program"
|
|
@@ -1847,33 +1560,7 @@ var cp_amm_default = {
|
|
|
1847
1560
|
address: "11111111111111111111111111111111"
|
|
1848
1561
|
},
|
|
1849
1562
|
{
|
|
1850
|
-
name: "event_authority"
|
|
1851
|
-
pda: {
|
|
1852
|
-
seeds: [
|
|
1853
|
-
{
|
|
1854
|
-
kind: "const",
|
|
1855
|
-
value: [
|
|
1856
|
-
95,
|
|
1857
|
-
95,
|
|
1858
|
-
101,
|
|
1859
|
-
118,
|
|
1860
|
-
101,
|
|
1861
|
-
110,
|
|
1862
|
-
116,
|
|
1863
|
-
95,
|
|
1864
|
-
97,
|
|
1865
|
-
117,
|
|
1866
|
-
116,
|
|
1867
|
-
104,
|
|
1868
|
-
111,
|
|
1869
|
-
114,
|
|
1870
|
-
105,
|
|
1871
|
-
116,
|
|
1872
|
-
121
|
|
1873
|
-
]
|
|
1874
|
-
}
|
|
1875
|
-
]
|
|
1876
|
-
}
|
|
1563
|
+
name: "event_authority"
|
|
1877
1564
|
},
|
|
1878
1565
|
{
|
|
1879
1566
|
name: "program"
|
|
@@ -2127,33 +1814,7 @@ var cp_amm_default = {
|
|
|
2127
1814
|
address: "11111111111111111111111111111111"
|
|
2128
1815
|
},
|
|
2129
1816
|
{
|
|
2130
|
-
name: "event_authority"
|
|
2131
|
-
pda: {
|
|
2132
|
-
seeds: [
|
|
2133
|
-
{
|
|
2134
|
-
kind: "const",
|
|
2135
|
-
value: [
|
|
2136
|
-
95,
|
|
2137
|
-
95,
|
|
2138
|
-
101,
|
|
2139
|
-
118,
|
|
2140
|
-
101,
|
|
2141
|
-
110,
|
|
2142
|
-
116,
|
|
2143
|
-
95,
|
|
2144
|
-
97,
|
|
2145
|
-
117,
|
|
2146
|
-
116,
|
|
2147
|
-
104,
|
|
2148
|
-
111,
|
|
2149
|
-
114,
|
|
2150
|
-
105,
|
|
2151
|
-
116,
|
|
2152
|
-
121
|
|
2153
|
-
]
|
|
2154
|
-
}
|
|
2155
|
-
]
|
|
2156
|
-
}
|
|
1817
|
+
name: "event_authority"
|
|
2157
1818
|
},
|
|
2158
1819
|
{
|
|
2159
1820
|
name: "program"
|
|
@@ -2411,33 +2072,7 @@ var cp_amm_default = {
|
|
|
2411
2072
|
address: "11111111111111111111111111111111"
|
|
2412
2073
|
},
|
|
2413
2074
|
{
|
|
2414
|
-
name: "event_authority"
|
|
2415
|
-
pda: {
|
|
2416
|
-
seeds: [
|
|
2417
|
-
{
|
|
2418
|
-
kind: "const",
|
|
2419
|
-
value: [
|
|
2420
|
-
95,
|
|
2421
|
-
95,
|
|
2422
|
-
101,
|
|
2423
|
-
118,
|
|
2424
|
-
101,
|
|
2425
|
-
110,
|
|
2426
|
-
116,
|
|
2427
|
-
95,
|
|
2428
|
-
97,
|
|
2429
|
-
117,
|
|
2430
|
-
116,
|
|
2431
|
-
104,
|
|
2432
|
-
111,
|
|
2433
|
-
114,
|
|
2434
|
-
105,
|
|
2435
|
-
116,
|
|
2436
|
-
121
|
|
2437
|
-
]
|
|
2438
|
-
}
|
|
2439
|
-
]
|
|
2440
|
-
}
|
|
2075
|
+
name: "event_authority"
|
|
2441
2076
|
},
|
|
2442
2077
|
{
|
|
2443
2078
|
name: "program"
|
|
@@ -2528,33 +2163,7 @@ var cp_amm_default = {
|
|
|
2528
2163
|
address: "11111111111111111111111111111111"
|
|
2529
2164
|
},
|
|
2530
2165
|
{
|
|
2531
|
-
name: "event_authority"
|
|
2532
|
-
pda: {
|
|
2533
|
-
seeds: [
|
|
2534
|
-
{
|
|
2535
|
-
kind: "const",
|
|
2536
|
-
value: [
|
|
2537
|
-
95,
|
|
2538
|
-
95,
|
|
2539
|
-
101,
|
|
2540
|
-
118,
|
|
2541
|
-
101,
|
|
2542
|
-
110,
|
|
2543
|
-
116,
|
|
2544
|
-
95,
|
|
2545
|
-
97,
|
|
2546
|
-
117,
|
|
2547
|
-
116,
|
|
2548
|
-
104,
|
|
2549
|
-
111,
|
|
2550
|
-
114,
|
|
2551
|
-
105,
|
|
2552
|
-
116,
|
|
2553
|
-
121
|
|
2554
|
-
]
|
|
2555
|
-
}
|
|
2556
|
-
]
|
|
2557
|
-
}
|
|
2166
|
+
name: "event_authority"
|
|
2558
2167
|
},
|
|
2559
2168
|
{
|
|
2560
2169
|
name: "program"
|
|
@@ -2605,40 +2214,14 @@ var cp_amm_default = {
|
|
|
2605
2214
|
]
|
|
2606
2215
|
},
|
|
2607
2216
|
{
|
|
2608
|
-
name: "
|
|
2217
|
+
name: "signer",
|
|
2609
2218
|
docs: [
|
|
2610
|
-
"
|
|
2219
|
+
"Signer"
|
|
2611
2220
|
],
|
|
2612
2221
|
signer: true
|
|
2613
2222
|
},
|
|
2614
2223
|
{
|
|
2615
|
-
name: "event_authority"
|
|
2616
|
-
pda: {
|
|
2617
|
-
seeds: [
|
|
2618
|
-
{
|
|
2619
|
-
kind: "const",
|
|
2620
|
-
value: [
|
|
2621
|
-
95,
|
|
2622
|
-
95,
|
|
2623
|
-
101,
|
|
2624
|
-
118,
|
|
2625
|
-
101,
|
|
2626
|
-
110,
|
|
2627
|
-
116,
|
|
2628
|
-
95,
|
|
2629
|
-
97,
|
|
2630
|
-
117,
|
|
2631
|
-
116,
|
|
2632
|
-
104,
|
|
2633
|
-
111,
|
|
2634
|
-
114,
|
|
2635
|
-
105,
|
|
2636
|
-
116,
|
|
2637
|
-
121
|
|
2638
|
-
]
|
|
2639
|
-
}
|
|
2640
|
-
]
|
|
2641
|
-
}
|
|
2224
|
+
name: "event_authority"
|
|
2642
2225
|
},
|
|
2643
2226
|
{
|
|
2644
2227
|
name: "program"
|
|
@@ -2690,9 +2273,9 @@ var cp_amm_default = {
|
|
|
2690
2273
|
]
|
|
2691
2274
|
},
|
|
2692
2275
|
{
|
|
2693
|
-
name: "
|
|
2276
|
+
name: "signer",
|
|
2694
2277
|
docs: [
|
|
2695
|
-
"
|
|
2278
|
+
"Signer"
|
|
2696
2279
|
],
|
|
2697
2280
|
signer: true
|
|
2698
2281
|
},
|
|
@@ -2706,33 +2289,7 @@ var cp_amm_default = {
|
|
|
2706
2289
|
address: "11111111111111111111111111111111"
|
|
2707
2290
|
},
|
|
2708
2291
|
{
|
|
2709
|
-
name: "event_authority"
|
|
2710
|
-
pda: {
|
|
2711
|
-
seeds: [
|
|
2712
|
-
{
|
|
2713
|
-
kind: "const",
|
|
2714
|
-
value: [
|
|
2715
|
-
95,
|
|
2716
|
-
95,
|
|
2717
|
-
101,
|
|
2718
|
-
118,
|
|
2719
|
-
101,
|
|
2720
|
-
110,
|
|
2721
|
-
116,
|
|
2722
|
-
95,
|
|
2723
|
-
97,
|
|
2724
|
-
117,
|
|
2725
|
-
116,
|
|
2726
|
-
104,
|
|
2727
|
-
111,
|
|
2728
|
-
114,
|
|
2729
|
-
105,
|
|
2730
|
-
116,
|
|
2731
|
-
121
|
|
2732
|
-
]
|
|
2733
|
-
}
|
|
2734
|
-
]
|
|
2735
|
-
}
|
|
2292
|
+
name: "event_authority"
|
|
2736
2293
|
},
|
|
2737
2294
|
{
|
|
2738
2295
|
name: "program"
|
|
@@ -2780,40 +2337,14 @@ var cp_amm_default = {
|
|
|
2780
2337
|
]
|
|
2781
2338
|
},
|
|
2782
2339
|
{
|
|
2783
|
-
name: "
|
|
2340
|
+
name: "signer",
|
|
2784
2341
|
docs: [
|
|
2785
|
-
"
|
|
2342
|
+
"Signer"
|
|
2786
2343
|
],
|
|
2787
2344
|
signer: true
|
|
2788
2345
|
},
|
|
2789
2346
|
{
|
|
2790
|
-
name: "event_authority"
|
|
2791
|
-
pda: {
|
|
2792
|
-
seeds: [
|
|
2793
|
-
{
|
|
2794
|
-
kind: "const",
|
|
2795
|
-
value: [
|
|
2796
|
-
95,
|
|
2797
|
-
95,
|
|
2798
|
-
101,
|
|
2799
|
-
118,
|
|
2800
|
-
101,
|
|
2801
|
-
110,
|
|
2802
|
-
116,
|
|
2803
|
-
95,
|
|
2804
|
-
97,
|
|
2805
|
-
117,
|
|
2806
|
-
116,
|
|
2807
|
-
104,
|
|
2808
|
-
111,
|
|
2809
|
-
114,
|
|
2810
|
-
105,
|
|
2811
|
-
116,
|
|
2812
|
-
121
|
|
2813
|
-
]
|
|
2814
|
-
}
|
|
2815
|
-
]
|
|
2816
|
-
}
|
|
2347
|
+
name: "event_authority"
|
|
2817
2348
|
},
|
|
2818
2349
|
{
|
|
2819
2350
|
name: "program"
|
|
@@ -2948,9 +2479,9 @@ var cp_amm_default = {
|
|
|
2948
2479
|
]
|
|
2949
2480
|
},
|
|
2950
2481
|
{
|
|
2951
|
-
name: "
|
|
2482
|
+
name: "signer",
|
|
2952
2483
|
docs: [
|
|
2953
|
-
"
|
|
2484
|
+
"Signer"
|
|
2954
2485
|
],
|
|
2955
2486
|
signer: true
|
|
2956
2487
|
},
|
|
@@ -2967,33 +2498,7 @@ var cp_amm_default = {
|
|
|
2967
2498
|
]
|
|
2968
2499
|
},
|
|
2969
2500
|
{
|
|
2970
|
-
name: "event_authority"
|
|
2971
|
-
pda: {
|
|
2972
|
-
seeds: [
|
|
2973
|
-
{
|
|
2974
|
-
kind: "const",
|
|
2975
|
-
value: [
|
|
2976
|
-
95,
|
|
2977
|
-
95,
|
|
2978
|
-
101,
|
|
2979
|
-
118,
|
|
2980
|
-
101,
|
|
2981
|
-
110,
|
|
2982
|
-
116,
|
|
2983
|
-
95,
|
|
2984
|
-
97,
|
|
2985
|
-
117,
|
|
2986
|
-
116,
|
|
2987
|
-
104,
|
|
2988
|
-
111,
|
|
2989
|
-
114,
|
|
2990
|
-
105,
|
|
2991
|
-
116,
|
|
2992
|
-
121
|
|
2993
|
-
]
|
|
2994
|
-
}
|
|
2995
|
-
]
|
|
2996
|
-
}
|
|
2501
|
+
name: "event_authority"
|
|
2997
2502
|
},
|
|
2998
2503
|
{
|
|
2999
2504
|
name: "program"
|
|
@@ -3097,9 +2602,9 @@ var cp_amm_default = {
|
|
|
3097
2602
|
]
|
|
3098
2603
|
},
|
|
3099
2604
|
{
|
|
3100
|
-
name: "
|
|
2605
|
+
name: "signer",
|
|
3101
2606
|
docs: [
|
|
3102
|
-
"
|
|
2607
|
+
"Signer"
|
|
3103
2608
|
],
|
|
3104
2609
|
signer: true
|
|
3105
2610
|
},
|
|
@@ -3116,33 +2621,7 @@ var cp_amm_default = {
|
|
|
3116
2621
|
]
|
|
3117
2622
|
},
|
|
3118
2623
|
{
|
|
3119
|
-
name: "event_authority"
|
|
3120
|
-
pda: {
|
|
3121
|
-
seeds: [
|
|
3122
|
-
{
|
|
3123
|
-
kind: "const",
|
|
3124
|
-
value: [
|
|
3125
|
-
95,
|
|
3126
|
-
95,
|
|
3127
|
-
101,
|
|
3128
|
-
118,
|
|
3129
|
-
101,
|
|
3130
|
-
110,
|
|
3131
|
-
116,
|
|
3132
|
-
95,
|
|
3133
|
-
97,
|
|
3134
|
-
117,
|
|
3135
|
-
116,
|
|
3136
|
-
104,
|
|
3137
|
-
111,
|
|
3138
|
-
114,
|
|
3139
|
-
105,
|
|
3140
|
-
116,
|
|
3141
|
-
121
|
|
3142
|
-
]
|
|
3143
|
-
}
|
|
3144
|
-
]
|
|
3145
|
-
}
|
|
2624
|
+
name: "event_authority"
|
|
3146
2625
|
},
|
|
3147
2626
|
{
|
|
3148
2627
|
name: "program"
|
|
@@ -3184,33 +2663,7 @@ var cp_amm_default = {
|
|
|
3184
2663
|
signer: true
|
|
3185
2664
|
},
|
|
3186
2665
|
{
|
|
3187
|
-
name: "event_authority"
|
|
3188
|
-
pda: {
|
|
3189
|
-
seeds: [
|
|
3190
|
-
{
|
|
3191
|
-
kind: "const",
|
|
3192
|
-
value: [
|
|
3193
|
-
95,
|
|
3194
|
-
95,
|
|
3195
|
-
101,
|
|
3196
|
-
118,
|
|
3197
|
-
101,
|
|
3198
|
-
110,
|
|
3199
|
-
116,
|
|
3200
|
-
95,
|
|
3201
|
-
97,
|
|
3202
|
-
117,
|
|
3203
|
-
116,
|
|
3204
|
-
104,
|
|
3205
|
-
111,
|
|
3206
|
-
114,
|
|
3207
|
-
105,
|
|
3208
|
-
116,
|
|
3209
|
-
121
|
|
3210
|
-
]
|
|
3211
|
-
}
|
|
3212
|
-
]
|
|
3213
|
-
}
|
|
2666
|
+
name: "event_authority"
|
|
3214
2667
|
},
|
|
3215
2668
|
{
|
|
3216
2669
|
name: "program"
|
|
@@ -3285,33 +2738,7 @@ var cp_amm_default = {
|
|
|
3285
2738
|
signer: true
|
|
3286
2739
|
},
|
|
3287
2740
|
{
|
|
3288
|
-
name: "event_authority"
|
|
3289
|
-
pda: {
|
|
3290
|
-
seeds: [
|
|
3291
|
-
{
|
|
3292
|
-
kind: "const",
|
|
3293
|
-
value: [
|
|
3294
|
-
95,
|
|
3295
|
-
95,
|
|
3296
|
-
101,
|
|
3297
|
-
118,
|
|
3298
|
-
101,
|
|
3299
|
-
110,
|
|
3300
|
-
116,
|
|
3301
|
-
95,
|
|
3302
|
-
97,
|
|
3303
|
-
117,
|
|
3304
|
-
116,
|
|
3305
|
-
104,
|
|
3306
|
-
111,
|
|
3307
|
-
114,
|
|
3308
|
-
105,
|
|
3309
|
-
116,
|
|
3310
|
-
121
|
|
3311
|
-
]
|
|
3312
|
-
}
|
|
3313
|
-
]
|
|
3314
|
-
}
|
|
2741
|
+
name: "event_authority"
|
|
3315
2742
|
},
|
|
3316
2743
|
{
|
|
3317
2744
|
name: "program"
|
|
@@ -3390,33 +2817,7 @@ var cp_amm_default = {
|
|
|
3390
2817
|
signer: true
|
|
3391
2818
|
},
|
|
3392
2819
|
{
|
|
3393
|
-
name: "event_authority"
|
|
3394
|
-
pda: {
|
|
3395
|
-
seeds: [
|
|
3396
|
-
{
|
|
3397
|
-
kind: "const",
|
|
3398
|
-
value: [
|
|
3399
|
-
95,
|
|
3400
|
-
95,
|
|
3401
|
-
101,
|
|
3402
|
-
118,
|
|
3403
|
-
101,
|
|
3404
|
-
110,
|
|
3405
|
-
116,
|
|
3406
|
-
95,
|
|
3407
|
-
97,
|
|
3408
|
-
117,
|
|
3409
|
-
116,
|
|
3410
|
-
104,
|
|
3411
|
-
111,
|
|
3412
|
-
114,
|
|
3413
|
-
105,
|
|
3414
|
-
116,
|
|
3415
|
-
121
|
|
3416
|
-
]
|
|
3417
|
-
}
|
|
3418
|
-
]
|
|
3419
|
-
}
|
|
2820
|
+
name: "event_authority"
|
|
3420
2821
|
},
|
|
3421
2822
|
{
|
|
3422
2823
|
name: "program"
|
|
@@ -3527,33 +2928,7 @@ var cp_amm_default = {
|
|
|
3527
2928
|
optional: true
|
|
3528
2929
|
},
|
|
3529
2930
|
{
|
|
3530
|
-
name: "event_authority"
|
|
3531
|
-
pda: {
|
|
3532
|
-
seeds: [
|
|
3533
|
-
{
|
|
3534
|
-
kind: "const",
|
|
3535
|
-
value: [
|
|
3536
|
-
95,
|
|
3537
|
-
95,
|
|
3538
|
-
101,
|
|
3539
|
-
118,
|
|
3540
|
-
101,
|
|
3541
|
-
110,
|
|
3542
|
-
116,
|
|
3543
|
-
95,
|
|
3544
|
-
97,
|
|
3545
|
-
117,
|
|
3546
|
-
116,
|
|
3547
|
-
104,
|
|
3548
|
-
111,
|
|
3549
|
-
114,
|
|
3550
|
-
105,
|
|
3551
|
-
116,
|
|
3552
|
-
121
|
|
3553
|
-
]
|
|
3554
|
-
}
|
|
3555
|
-
]
|
|
3556
|
-
}
|
|
2931
|
+
name: "event_authority"
|
|
3557
2932
|
},
|
|
3558
2933
|
{
|
|
3559
2934
|
name: "program"
|
|
@@ -3668,33 +3043,7 @@ var cp_amm_default = {
|
|
|
3668
3043
|
optional: true
|
|
3669
3044
|
},
|
|
3670
3045
|
{
|
|
3671
|
-
name: "event_authority"
|
|
3672
|
-
pda: {
|
|
3673
|
-
seeds: [
|
|
3674
|
-
{
|
|
3675
|
-
kind: "const",
|
|
3676
|
-
value: [
|
|
3677
|
-
95,
|
|
3678
|
-
95,
|
|
3679
|
-
101,
|
|
3680
|
-
118,
|
|
3681
|
-
101,
|
|
3682
|
-
110,
|
|
3683
|
-
116,
|
|
3684
|
-
95,
|
|
3685
|
-
97,
|
|
3686
|
-
117,
|
|
3687
|
-
116,
|
|
3688
|
-
104,
|
|
3689
|
-
111,
|
|
3690
|
-
114,
|
|
3691
|
-
105,
|
|
3692
|
-
116,
|
|
3693
|
-
121
|
|
3694
|
-
]
|
|
3695
|
-
}
|
|
3696
|
-
]
|
|
3697
|
-
}
|
|
3046
|
+
name: "event_authority"
|
|
3698
3047
|
},
|
|
3699
3048
|
{
|
|
3700
3049
|
name: "program"
|
|
@@ -3711,6 +3060,47 @@ var cp_amm_default = {
|
|
|
3711
3060
|
}
|
|
3712
3061
|
]
|
|
3713
3062
|
},
|
|
3063
|
+
{
|
|
3064
|
+
name: "update_delegate_permission",
|
|
3065
|
+
discriminator: [
|
|
3066
|
+
175,
|
|
3067
|
+
165,
|
|
3068
|
+
56,
|
|
3069
|
+
64,
|
|
3070
|
+
0,
|
|
3071
|
+
251,
|
|
3072
|
+
89,
|
|
3073
|
+
47
|
|
3074
|
+
],
|
|
3075
|
+
accounts: [
|
|
3076
|
+
{
|
|
3077
|
+
name: "position",
|
|
3078
|
+
writable: true
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
name: "position_nft_account",
|
|
3082
|
+
docs: [
|
|
3083
|
+
"The token account for nft"
|
|
3084
|
+
]
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
name: "owner",
|
|
3088
|
+
signer: true
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
name: "event_authority"
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
name: "program"
|
|
3095
|
+
}
|
|
3096
|
+
],
|
|
3097
|
+
args: [
|
|
3098
|
+
{
|
|
3099
|
+
name: "permission",
|
|
3100
|
+
type: "u32"
|
|
3101
|
+
}
|
|
3102
|
+
]
|
|
3103
|
+
},
|
|
3714
3104
|
{
|
|
3715
3105
|
name: "update_pool_fees",
|
|
3716
3106
|
discriminator: [
|
|
@@ -3736,33 +3126,7 @@ var cp_amm_default = {
|
|
|
3736
3126
|
signer: true
|
|
3737
3127
|
},
|
|
3738
3128
|
{
|
|
3739
|
-
name: "event_authority"
|
|
3740
|
-
pda: {
|
|
3741
|
-
seeds: [
|
|
3742
|
-
{
|
|
3743
|
-
kind: "const",
|
|
3744
|
-
value: [
|
|
3745
|
-
95,
|
|
3746
|
-
95,
|
|
3747
|
-
101,
|
|
3748
|
-
118,
|
|
3749
|
-
101,
|
|
3750
|
-
110,
|
|
3751
|
-
116,
|
|
3752
|
-
95,
|
|
3753
|
-
97,
|
|
3754
|
-
117,
|
|
3755
|
-
116,
|
|
3756
|
-
104,
|
|
3757
|
-
111,
|
|
3758
|
-
114,
|
|
3759
|
-
105,
|
|
3760
|
-
116,
|
|
3761
|
-
121
|
|
3762
|
-
]
|
|
3763
|
-
}
|
|
3764
|
-
]
|
|
3765
|
-
}
|
|
3129
|
+
name: "event_authority"
|
|
3766
3130
|
},
|
|
3767
3131
|
{
|
|
3768
3132
|
name: "program"
|
|
@@ -3801,33 +3165,7 @@ var cp_amm_default = {
|
|
|
3801
3165
|
signer: true
|
|
3802
3166
|
},
|
|
3803
3167
|
{
|
|
3804
|
-
name: "event_authority"
|
|
3805
|
-
pda: {
|
|
3806
|
-
seeds: [
|
|
3807
|
-
{
|
|
3808
|
-
kind: "const",
|
|
3809
|
-
value: [
|
|
3810
|
-
95,
|
|
3811
|
-
95,
|
|
3812
|
-
101,
|
|
3813
|
-
118,
|
|
3814
|
-
101,
|
|
3815
|
-
110,
|
|
3816
|
-
116,
|
|
3817
|
-
95,
|
|
3818
|
-
97,
|
|
3819
|
-
117,
|
|
3820
|
-
116,
|
|
3821
|
-
104,
|
|
3822
|
-
111,
|
|
3823
|
-
114,
|
|
3824
|
-
105,
|
|
3825
|
-
116,
|
|
3826
|
-
121
|
|
3827
|
-
]
|
|
3828
|
-
}
|
|
3829
|
-
]
|
|
3830
|
-
}
|
|
3168
|
+
name: "event_authority"
|
|
3831
3169
|
},
|
|
3832
3170
|
{
|
|
3833
3171
|
name: "program"
|
|
@@ -3862,37 +3200,68 @@ var cp_amm_default = {
|
|
|
3862
3200
|
writable: true
|
|
3863
3201
|
},
|
|
3864
3202
|
{
|
|
3865
|
-
name: "signer",
|
|
3203
|
+
name: "signer",
|
|
3204
|
+
signer: true
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
name: "event_authority"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
name: "program"
|
|
3211
|
+
}
|
|
3212
|
+
],
|
|
3213
|
+
args: [
|
|
3214
|
+
{
|
|
3215
|
+
name: "reward_index",
|
|
3216
|
+
type: "u8"
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
name: "new_funder",
|
|
3220
|
+
type: "pubkey"
|
|
3221
|
+
}
|
|
3222
|
+
]
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
name: "withdraw_dead_liquidity_reward",
|
|
3226
|
+
discriminator: [
|
|
3227
|
+
121,
|
|
3228
|
+
99,
|
|
3229
|
+
224,
|
|
3230
|
+
91,
|
|
3231
|
+
178,
|
|
3232
|
+
14,
|
|
3233
|
+
22,
|
|
3234
|
+
132
|
|
3235
|
+
],
|
|
3236
|
+
accounts: [
|
|
3237
|
+
{
|
|
3238
|
+
name: "pool_authority",
|
|
3239
|
+
address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
name: "pool",
|
|
3243
|
+
writable: true
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
name: "reward_vault",
|
|
3247
|
+
writable: true
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
name: "reward_mint"
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
name: "funder_token_account",
|
|
3254
|
+
writable: true
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
name: "funder",
|
|
3866
3258
|
signer: true
|
|
3867
3259
|
},
|
|
3868
3260
|
{
|
|
3869
|
-
name: "
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
kind: "const",
|
|
3874
|
-
value: [
|
|
3875
|
-
95,
|
|
3876
|
-
95,
|
|
3877
|
-
101,
|
|
3878
|
-
118,
|
|
3879
|
-
101,
|
|
3880
|
-
110,
|
|
3881
|
-
116,
|
|
3882
|
-
95,
|
|
3883
|
-
97,
|
|
3884
|
-
117,
|
|
3885
|
-
116,
|
|
3886
|
-
104,
|
|
3887
|
-
111,
|
|
3888
|
-
114,
|
|
3889
|
-
105,
|
|
3890
|
-
116,
|
|
3891
|
-
121
|
|
3892
|
-
]
|
|
3893
|
-
}
|
|
3894
|
-
]
|
|
3895
|
-
}
|
|
3261
|
+
name: "token_program"
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
name: "event_authority"
|
|
3896
3265
|
},
|
|
3897
3266
|
{
|
|
3898
3267
|
name: "program"
|
|
@@ -3902,10 +3271,6 @@ var cp_amm_default = {
|
|
|
3902
3271
|
{
|
|
3903
3272
|
name: "reward_index",
|
|
3904
3273
|
type: "u8"
|
|
3905
|
-
},
|
|
3906
|
-
{
|
|
3907
|
-
name: "new_funder",
|
|
3908
|
-
type: "pubkey"
|
|
3909
3274
|
}
|
|
3910
3275
|
]
|
|
3911
3276
|
},
|
|
@@ -3949,33 +3314,7 @@ var cp_amm_default = {
|
|
|
3949
3314
|
name: "token_program"
|
|
3950
3315
|
},
|
|
3951
3316
|
{
|
|
3952
|
-
name: "event_authority"
|
|
3953
|
-
pda: {
|
|
3954
|
-
seeds: [
|
|
3955
|
-
{
|
|
3956
|
-
kind: "const",
|
|
3957
|
-
value: [
|
|
3958
|
-
95,
|
|
3959
|
-
95,
|
|
3960
|
-
101,
|
|
3961
|
-
118,
|
|
3962
|
-
101,
|
|
3963
|
-
110,
|
|
3964
|
-
116,
|
|
3965
|
-
95,
|
|
3966
|
-
97,
|
|
3967
|
-
117,
|
|
3968
|
-
116,
|
|
3969
|
-
104,
|
|
3970
|
-
111,
|
|
3971
|
-
114,
|
|
3972
|
-
105,
|
|
3973
|
-
116,
|
|
3974
|
-
121
|
|
3975
|
-
]
|
|
3976
|
-
}
|
|
3977
|
-
]
|
|
3978
|
-
}
|
|
3317
|
+
name: "event_authority"
|
|
3979
3318
|
},
|
|
3980
3319
|
{
|
|
3981
3320
|
name: "program"
|
|
@@ -4198,6 +3537,19 @@ var cp_amm_default = {
|
|
|
4198
3537
|
33
|
|
4199
3538
|
]
|
|
4200
3539
|
},
|
|
3540
|
+
{
|
|
3541
|
+
name: "EvtClaimProtocolFee2",
|
|
3542
|
+
discriminator: [
|
|
3543
|
+
187,
|
|
3544
|
+
133,
|
|
3545
|
+
66,
|
|
3546
|
+
9,
|
|
3547
|
+
205,
|
|
3548
|
+
161,
|
|
3549
|
+
84,
|
|
3550
|
+
13
|
|
3551
|
+
]
|
|
3552
|
+
},
|
|
4201
3553
|
{
|
|
4202
3554
|
name: "EvtClaimReward",
|
|
4203
3555
|
discriminator: [
|
|
@@ -4419,6 +3771,19 @@ var cp_amm_default = {
|
|
|
4419
3771
|
153
|
|
4420
3772
|
]
|
|
4421
3773
|
},
|
|
3774
|
+
{
|
|
3775
|
+
name: "EvtUpdateDelegatePermission",
|
|
3776
|
+
discriminator: [
|
|
3777
|
+
66,
|
|
3778
|
+
188,
|
|
3779
|
+
75,
|
|
3780
|
+
151,
|
|
3781
|
+
150,
|
|
3782
|
+
232,
|
|
3783
|
+
87,
|
|
3784
|
+
93
|
|
3785
|
+
]
|
|
3786
|
+
},
|
|
4422
3787
|
{
|
|
4423
3788
|
name: "EvtUpdatePoolFees",
|
|
4424
3789
|
discriminator: [
|
|
@@ -4458,6 +3823,19 @@ var cp_amm_default = {
|
|
|
4458
3823
|
146
|
|
4459
3824
|
]
|
|
4460
3825
|
},
|
|
3826
|
+
{
|
|
3827
|
+
name: "EvtWithdrawDeadLiquidityReward",
|
|
3828
|
+
discriminator: [
|
|
3829
|
+
228,
|
|
3830
|
+
66,
|
|
3831
|
+
150,
|
|
3832
|
+
195,
|
|
3833
|
+
42,
|
|
3834
|
+
62,
|
|
3835
|
+
163,
|
|
3836
|
+
13
|
|
3837
|
+
]
|
|
3838
|
+
},
|
|
4461
3839
|
{
|
|
4462
3840
|
name: "EvtWithdrawIneligibleReward",
|
|
4463
3841
|
discriminator: [
|
|
@@ -4812,6 +4190,21 @@ var cp_amm_default = {
|
|
|
4812
4190
|
code: 6067,
|
|
4813
4191
|
name: "InvalidCompoundingFeeBps",
|
|
4814
4192
|
msg: "Invalid compounding fee bps"
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
code: 6068,
|
|
4196
|
+
name: "InvalidClaimProtocolFeeAccounts",
|
|
4197
|
+
msg: "Invalid claim protocol fee accounts"
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
code: 6069,
|
|
4201
|
+
name: "TransferFeeExcludedAmountIsZero",
|
|
4202
|
+
msg: "Transfer fee excluded amount is zero"
|
|
4203
|
+
},
|
|
4204
|
+
{
|
|
4205
|
+
code: 6070,
|
|
4206
|
+
name: "DelegatedAmountNonZero",
|
|
4207
|
+
msg: "Delegated amount is not zero"
|
|
4815
4208
|
}
|
|
4816
4209
|
],
|
|
4817
4210
|
types: [
|
|
@@ -5374,6 +4767,30 @@ var cp_amm_default = {
|
|
|
5374
4767
|
]
|
|
5375
4768
|
}
|
|
5376
4769
|
},
|
|
4770
|
+
{
|
|
4771
|
+
name: "EvtClaimProtocolFee2",
|
|
4772
|
+
type: {
|
|
4773
|
+
kind: "struct",
|
|
4774
|
+
fields: [
|
|
4775
|
+
{
|
|
4776
|
+
name: "pool",
|
|
4777
|
+
type: "pubkey"
|
|
4778
|
+
},
|
|
4779
|
+
{
|
|
4780
|
+
name: "receiver_token_account",
|
|
4781
|
+
type: "pubkey"
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
name: "token_mint",
|
|
4785
|
+
type: "pubkey"
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
name: "amount",
|
|
4789
|
+
type: "u64"
|
|
4790
|
+
}
|
|
4791
|
+
]
|
|
4792
|
+
}
|
|
4793
|
+
},
|
|
5377
4794
|
{
|
|
5378
4795
|
name: "EvtClaimReward",
|
|
5379
4796
|
type: {
|
|
@@ -6076,6 +5493,32 @@ var cp_amm_default = {
|
|
|
6076
5493
|
]
|
|
6077
5494
|
}
|
|
6078
5495
|
},
|
|
5496
|
+
{
|
|
5497
|
+
name: "EvtUpdateDelegatePermission",
|
|
5498
|
+
type: {
|
|
5499
|
+
kind: "struct",
|
|
5500
|
+
fields: [
|
|
5501
|
+
{
|
|
5502
|
+
name: "position",
|
|
5503
|
+
type: "pubkey"
|
|
5504
|
+
},
|
|
5505
|
+
{
|
|
5506
|
+
name: "owner",
|
|
5507
|
+
type: "pubkey"
|
|
5508
|
+
},
|
|
5509
|
+
{
|
|
5510
|
+
name: "permission",
|
|
5511
|
+
type: "u32"
|
|
5512
|
+
},
|
|
5513
|
+
{
|
|
5514
|
+
name: "delegate",
|
|
5515
|
+
type: {
|
|
5516
|
+
option: "pubkey"
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
]
|
|
5520
|
+
}
|
|
5521
|
+
},
|
|
6079
5522
|
{
|
|
6080
5523
|
name: "EvtUpdatePoolFees",
|
|
6081
5524
|
type: {
|
|
@@ -6148,6 +5591,26 @@ var cp_amm_default = {
|
|
|
6148
5591
|
]
|
|
6149
5592
|
}
|
|
6150
5593
|
},
|
|
5594
|
+
{
|
|
5595
|
+
name: "EvtWithdrawDeadLiquidityReward",
|
|
5596
|
+
type: {
|
|
5597
|
+
kind: "struct",
|
|
5598
|
+
fields: [
|
|
5599
|
+
{
|
|
5600
|
+
name: "pool",
|
|
5601
|
+
type: "pubkey"
|
|
5602
|
+
},
|
|
5603
|
+
{
|
|
5604
|
+
name: "reward_mint",
|
|
5605
|
+
type: "pubkey"
|
|
5606
|
+
},
|
|
5607
|
+
{
|
|
5608
|
+
name: "amount",
|
|
5609
|
+
type: "u64"
|
|
5610
|
+
}
|
|
5611
|
+
]
|
|
5612
|
+
}
|
|
5613
|
+
},
|
|
6151
5614
|
{
|
|
6152
5615
|
name: "EvtWithdrawIneligibleReward",
|
|
6153
5616
|
type: {
|
|
@@ -7139,12 +6602,24 @@ var cp_amm_default = {
|
|
|
7139
6602
|
}
|
|
7140
6603
|
}
|
|
7141
6604
|
},
|
|
6605
|
+
{
|
|
6606
|
+
name: "delegate_permission",
|
|
6607
|
+
docs: [
|
|
6608
|
+
"delegate permission bitmask (paired with SPL token Approve)"
|
|
6609
|
+
],
|
|
6610
|
+
type: "u32"
|
|
6611
|
+
},
|
|
7142
6612
|
{
|
|
7143
6613
|
name: "padding",
|
|
7144
6614
|
docs: [
|
|
7145
6615
|
"padding for future usage"
|
|
7146
6616
|
],
|
|
7147
|
-
type:
|
|
6617
|
+
type: {
|
|
6618
|
+
array: [
|
|
6619
|
+
"u8",
|
|
6620
|
+
12
|
|
6621
|
+
]
|
|
6622
|
+
}
|
|
7148
6623
|
}
|
|
7149
6624
|
]
|
|
7150
6625
|
}
|
|
@@ -7237,16 +6712,11 @@ var cp_amm_default = {
|
|
|
7237
6712
|
}
|
|
7238
6713
|
},
|
|
7239
6714
|
{
|
|
7240
|
-
name: "
|
|
6715
|
+
name: "dead_liquidity_reward_checkpoint",
|
|
7241
6716
|
docs: [
|
|
7242
|
-
"
|
|
6717
|
+
"Cumulative dead-liquidity reward (Compounding Pool only)"
|
|
7243
6718
|
],
|
|
7244
|
-
type:
|
|
7245
|
-
array: [
|
|
7246
|
-
"u8",
|
|
7247
|
-
8
|
|
7248
|
-
]
|
|
7249
|
-
}
|
|
6719
|
+
type: "u64"
|
|
7250
6720
|
},
|
|
7251
6721
|
{
|
|
7252
6722
|
name: "mint",
|
|
@@ -7783,6 +7253,17 @@ var cp_amm_default = {
|
|
|
7783
7253
|
}
|
|
7784
7254
|
}
|
|
7785
7255
|
}
|
|
7256
|
+
},
|
|
7257
|
+
{
|
|
7258
|
+
name: "compounding_fee_bps",
|
|
7259
|
+
docs: [
|
|
7260
|
+
"Compounding fee update mode:",
|
|
7261
|
+
"- None: skip compounding fee update",
|
|
7262
|
+
"- Some: update compounding_fee_bps; pool must use CollectFeeMode::Compounding"
|
|
7263
|
+
],
|
|
7264
|
+
type: {
|
|
7265
|
+
option: "u16"
|
|
7266
|
+
}
|
|
7786
7267
|
}
|
|
7787
7268
|
]
|
|
7788
7269
|
}
|
|
@@ -8222,6 +7703,17 @@ var SwapMode = /* @__PURE__ */ ((SwapMode2) => {
|
|
|
8222
7703
|
SwapMode2[SwapMode2["ExactOut"] = 2] = "ExactOut";
|
|
8223
7704
|
return SwapMode2;
|
|
8224
7705
|
})(SwapMode || {});
|
|
7706
|
+
var PositionDelegatePermission = /* @__PURE__ */ ((PositionDelegatePermission2) => {
|
|
7707
|
+
PositionDelegatePermission2[PositionDelegatePermission2["AddLiquidity"] = 0] = "AddLiquidity";
|
|
7708
|
+
PositionDelegatePermission2[PositionDelegatePermission2["RemoveLiquidity"] = 1] = "RemoveLiquidity";
|
|
7709
|
+
PositionDelegatePermission2[PositionDelegatePermission2["RemoveLiquidityToOwner"] = 2] = "RemoveLiquidityToOwner";
|
|
7710
|
+
PositionDelegatePermission2[PositionDelegatePermission2["ClaimPositionFee"] = 3] = "ClaimPositionFee";
|
|
7711
|
+
PositionDelegatePermission2[PositionDelegatePermission2["ClaimPositionFeeToOwner"] = 4] = "ClaimPositionFeeToOwner";
|
|
7712
|
+
PositionDelegatePermission2[PositionDelegatePermission2["ClaimReward"] = 5] = "ClaimReward";
|
|
7713
|
+
PositionDelegatePermission2[PositionDelegatePermission2["ClaimRewardToOwner"] = 6] = "ClaimRewardToOwner";
|
|
7714
|
+
PositionDelegatePermission2[PositionDelegatePermission2["LockPosition"] = 7] = "LockPosition";
|
|
7715
|
+
return PositionDelegatePermission2;
|
|
7716
|
+
})(PositionDelegatePermission || {});
|
|
8225
7717
|
|
|
8226
7718
|
// src/pda.ts
|
|
8227
7719
|
|
|
@@ -12049,6 +11541,11 @@ function getDynamicFeeParams(baseFeeBps, maxPriceChangeBps = MAX_PRICE_CHANGE_BP
|
|
|
12049
11541
|
};
|
|
12050
11542
|
}
|
|
12051
11543
|
|
|
11544
|
+
// src/helpers/codec.ts
|
|
11545
|
+
function encodeDelegatePermissions(permissions) {
|
|
11546
|
+
return permissions.reduce((acc, p) => acc | 1 << p, 0);
|
|
11547
|
+
}
|
|
11548
|
+
|
|
12052
11549
|
// src/CpAmm.ts
|
|
12053
11550
|
|
|
12054
11551
|
var CpAmm = class {
|
|
@@ -12159,7 +11656,7 @@ var CpAmm = class {
|
|
|
12159
11656
|
pool,
|
|
12160
11657
|
position,
|
|
12161
11658
|
positionNftAccount,
|
|
12162
|
-
owner,
|
|
11659
|
+
signer: owner,
|
|
12163
11660
|
tokenAAccount,
|
|
12164
11661
|
tokenBAccount,
|
|
12165
11662
|
tokenAMint,
|
|
@@ -12201,7 +11698,7 @@ var CpAmm = class {
|
|
|
12201
11698
|
pool,
|
|
12202
11699
|
position,
|
|
12203
11700
|
positionNftAccount,
|
|
12204
|
-
owner,
|
|
11701
|
+
signer: owner,
|
|
12205
11702
|
tokenAAccount,
|
|
12206
11703
|
tokenBAccount,
|
|
12207
11704
|
tokenAMint,
|
|
@@ -12238,7 +11735,7 @@ var CpAmm = class {
|
|
|
12238
11735
|
} = params;
|
|
12239
11736
|
return yield this._program.methods.claimPositionFee().accountsPartial({
|
|
12240
11737
|
poolAuthority,
|
|
12241
|
-
owner,
|
|
11738
|
+
signer: owner,
|
|
12242
11739
|
pool,
|
|
12243
11740
|
position,
|
|
12244
11741
|
positionNftAccount,
|
|
@@ -13292,7 +12789,7 @@ var CpAmm = class {
|
|
|
13292
12789
|
position,
|
|
13293
12790
|
positionNftAccount,
|
|
13294
12791
|
pool,
|
|
13295
|
-
|
|
12792
|
+
signer: creator
|
|
13296
12793
|
}).instruction();
|
|
13297
12794
|
postInstruction.push(permanentLockIx);
|
|
13298
12795
|
}
|
|
@@ -13392,7 +12889,7 @@ var CpAmm = class {
|
|
|
13392
12889
|
position,
|
|
13393
12890
|
positionNftAccount,
|
|
13394
12891
|
pool,
|
|
13395
|
-
|
|
12892
|
+
signer: creator
|
|
13396
12893
|
}).instruction();
|
|
13397
12894
|
postInstruction.push(permanentLockIx);
|
|
13398
12895
|
}
|
|
@@ -13499,7 +12996,7 @@ var CpAmm = class {
|
|
|
13499
12996
|
position,
|
|
13500
12997
|
positionNftAccount,
|
|
13501
12998
|
pool,
|
|
13502
|
-
|
|
12999
|
+
signer: creator
|
|
13503
13000
|
}).instruction();
|
|
13504
13001
|
postInstruction.push(permanentLockIx);
|
|
13505
13002
|
}
|
|
@@ -13548,6 +13045,46 @@ var CpAmm = class {
|
|
|
13548
13045
|
return new (0, _web3js.Transaction)().add(ix);
|
|
13549
13046
|
});
|
|
13550
13047
|
}
|
|
13048
|
+
/**
|
|
13049
|
+
* Builds a transaction that assigns a delegate to a position and sets its
|
|
13050
|
+
* onchain permissions in a single transaction.
|
|
13051
|
+
*
|
|
13052
|
+
* This performs two actions:
|
|
13053
|
+
* 1. SPL-approves `delegate` on the position NFT account (so the program
|
|
13054
|
+
* recognizes it as the position's delegate), and
|
|
13055
|
+
* 2. sets the on-chain delegate permission bitmask via the
|
|
13056
|
+
* `updateDelegatePermission` instruction.
|
|
13057
|
+
*
|
|
13058
|
+
* Both are kept together so the approved delegate and the granted
|
|
13059
|
+
* permissions never drift out of sync. To revoke, pass an empty permission
|
|
13060
|
+
* set (`permission: 0`).
|
|
13061
|
+
*
|
|
13062
|
+
* @param {UpdateDelegatePermissionParams} params - Parameters for delegate permission update.
|
|
13063
|
+
* @returns Transaction builder.
|
|
13064
|
+
*/
|
|
13065
|
+
updateDelegatePermission(params) {
|
|
13066
|
+
return __async(this, null, function* () {
|
|
13067
|
+
const { owner, positionNft, delegate, permission } = params;
|
|
13068
|
+
const position = derivePositionAddress(positionNft);
|
|
13069
|
+
const positionNftAccount = derivePositionNftAccount(positionNft);
|
|
13070
|
+
const updateDelegatePermissionIx = yield this._program.methods.updateDelegatePermission(permission).accountsPartial({
|
|
13071
|
+
position,
|
|
13072
|
+
positionNftAccount,
|
|
13073
|
+
owner
|
|
13074
|
+
}).instruction();
|
|
13075
|
+
const transaction = new (0, _web3js.Transaction)().add(
|
|
13076
|
+
_spltoken.createApproveInstruction.call(void 0,
|
|
13077
|
+
positionNftAccount,
|
|
13078
|
+
delegate,
|
|
13079
|
+
owner,
|
|
13080
|
+
0,
|
|
13081
|
+
[],
|
|
13082
|
+
_spltoken.TOKEN_2022_PROGRAM_ID
|
|
13083
|
+
)
|
|
13084
|
+
).add(updateDelegatePermissionIx);
|
|
13085
|
+
return transaction;
|
|
13086
|
+
});
|
|
13087
|
+
}
|
|
13551
13088
|
/**
|
|
13552
13089
|
* Builds a transaction to add liquidity to an existing position.
|
|
13553
13090
|
* @param {AddLiquidityParams} params - Parameters for adding liquidity.
|
|
@@ -13798,7 +13335,7 @@ var CpAmm = class {
|
|
|
13798
13335
|
pool,
|
|
13799
13336
|
position,
|
|
13800
13337
|
positionNftAccount,
|
|
13801
|
-
owner,
|
|
13338
|
+
signer: owner,
|
|
13802
13339
|
tokenAAccount,
|
|
13803
13340
|
tokenBAccount,
|
|
13804
13341
|
tokenAMint,
|
|
@@ -14149,7 +13686,7 @@ var CpAmm = class {
|
|
|
14149
13686
|
pool,
|
|
14150
13687
|
position,
|
|
14151
13688
|
positionNftAccount,
|
|
14152
|
-
owner
|
|
13689
|
+
signer: owner
|
|
14153
13690
|
}).transaction();
|
|
14154
13691
|
} else {
|
|
14155
13692
|
return yield this._program.methods.lockPosition({
|
|
@@ -14163,7 +13700,7 @@ var CpAmm = class {
|
|
|
14163
13700
|
positionNftAccount,
|
|
14164
13701
|
vesting: vestingAccount,
|
|
14165
13702
|
pool,
|
|
14166
|
-
owner,
|
|
13703
|
+
signer: owner,
|
|
14167
13704
|
payer,
|
|
14168
13705
|
systemProgram: _web3js.SystemProgram.programId
|
|
14169
13706
|
}).transaction();
|
|
@@ -14182,7 +13719,7 @@ var CpAmm = class {
|
|
|
14182
13719
|
position,
|
|
14183
13720
|
positionNftAccount,
|
|
14184
13721
|
pool,
|
|
14185
|
-
owner
|
|
13722
|
+
signer: owner
|
|
14186
13723
|
}).transaction();
|
|
14187
13724
|
});
|
|
14188
13725
|
}
|
|
@@ -14666,6 +14203,38 @@ var CpAmm = class {
|
|
|
14666
14203
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
14667
14204
|
});
|
|
14668
14205
|
}
|
|
14206
|
+
/**
|
|
14207
|
+
* Builds a transaction to withdraw dead liquidity rewards from a pool.
|
|
14208
|
+
* @param {WithdrawDeadLiquidityRewardParams} params - Parameters for withdrawal.
|
|
14209
|
+
* @returns Transaction builder.
|
|
14210
|
+
*/
|
|
14211
|
+
withdrawDeadLiquidityReward(params) {
|
|
14212
|
+
return __async(this, null, function* () {
|
|
14213
|
+
validateRewardIndex(params.rewardIndex);
|
|
14214
|
+
const { rewardIndex, pool, funder } = params;
|
|
14215
|
+
const poolState = yield this.fetchPoolState(pool);
|
|
14216
|
+
const rewardInfo = poolState.rewardInfos[rewardIndex];
|
|
14217
|
+
const { mint, vault, rewardTokenFlag } = rewardInfo;
|
|
14218
|
+
const tokenProgram = getTokenProgram(rewardTokenFlag);
|
|
14219
|
+
const preInstructions = [];
|
|
14220
|
+
const postInstructions = [];
|
|
14221
|
+
const { ataPubkey: funderTokenAccount, ix: createFunderTokenAccountIx } = yield getOrCreateATAInstruction(mint, funder, funder, true, tokenProgram);
|
|
14222
|
+
createFunderTokenAccountIx && preInstructions.push(createFunderTokenAccountIx);
|
|
14223
|
+
if (mint.equals(_spltoken.NATIVE_MINT)) {
|
|
14224
|
+
const closeWrappedSOLIx = yield unwrapSOLInstruction(funder);
|
|
14225
|
+
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
14226
|
+
}
|
|
14227
|
+
return yield this._program.methods.withdrawDeadLiquidityReward(rewardIndex).accountsPartial({
|
|
14228
|
+
pool,
|
|
14229
|
+
rewardVault: vault,
|
|
14230
|
+
rewardMint: mint,
|
|
14231
|
+
poolAuthority: this.poolAuthority,
|
|
14232
|
+
funderTokenAccount,
|
|
14233
|
+
funder,
|
|
14234
|
+
tokenProgram
|
|
14235
|
+
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
14236
|
+
});
|
|
14237
|
+
}
|
|
14669
14238
|
/**
|
|
14670
14239
|
* Builds a transaction to claim position fee rewards.
|
|
14671
14240
|
* @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
|
|
@@ -14838,7 +14407,7 @@ var CpAmm = class {
|
|
|
14838
14407
|
poolAuthority: this.poolAuthority,
|
|
14839
14408
|
position,
|
|
14840
14409
|
userTokenAccount,
|
|
14841
|
-
|
|
14410
|
+
signer: user,
|
|
14842
14411
|
tokenProgram
|
|
14843
14412
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
14844
14413
|
});
|
|
@@ -15190,5 +14759,7 @@ var CpAmm = class {
|
|
|
15190
14759
|
|
|
15191
14760
|
|
|
15192
14761
|
|
|
15193
|
-
exports.ActivationPoint = ActivationPoint; exports.ActivationType = ActivationType; exports.AmountIsZeroError = AmountIsZeroError; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; exports.CP_AMM_PROGRAM_ID = CP_AMM_PROGRAM_ID; exports.CURRENT_POOL_VERSION = CURRENT_POOL_VERSION; exports.CollectFeeMode = CollectFeeMode; exports.CompoundingLiquidityHandler = CompoundingLiquidityHandler; exports.ConcentratedLiquidityHandler = ConcentratedLiquidityHandler; exports.CpAmm = CpAmm; exports.CpAmmIdl = cp_amm_default; exports.DEAD_LIQUIDITY = DEAD_LIQUIDITY; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DepositTokenNotAcceptedError = DepositTokenNotAcceptedError; exports.ExceedMaxFeeBpsError = ExceedMaxFeeBpsError; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeMarketCapScheduler = FeeMarketCapScheduler; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeTimeScheduler = FeeTimeScheduler; exports.InsufficientLiquidityError = InsufficientLiquidityError; exports.InvalidActivationTypeError = InvalidActivationTypeError; exports.InvalidBaseFeeModeError = InvalidBaseFeeModeError; exports.InvalidCollectFeeModeError = InvalidCollectFeeModeError; exports.InvalidCompoundingFeeBpsError = InvalidCompoundingFeeBpsError; exports.InvalidDynamicFeeParametersError = InvalidDynamicFeeParametersError; exports.InvalidFeeError = InvalidFeeError; exports.InvalidFeeMarketCapSchedulerError = InvalidFeeMarketCapSchedulerError; exports.InvalidFeeRateLimiterError = InvalidFeeRateLimiterError; exports.InvalidFeeTimeSchedulerError = InvalidFeeTimeSchedulerError; exports.InvalidInputError = InvalidInputError; exports.InvalidMinimumLiquidityError = InvalidMinimumLiquidityError; exports.InvalidParametersError = InvalidParametersError; exports.InvalidPoolVersionError = InvalidPoolVersionError; exports.InvalidPriceRangeError = InvalidPriceRangeError; exports.InvalidRewardDurationError = InvalidRewardDurationError; exports.InvalidRewardIndexError = InvalidRewardIndexError; exports.InvalidSplitPositionParametersError = InvalidSplitPositionParametersError; exports.InvalidVestingInfoError = InvalidVestingInfoError; exports.LIQUIDITY_SCALE = LIQUIDITY_SCALE; exports.LayoutVersion = LayoutVersion; exports.MAX = MAX; exports.MAX_CU_BUFFER = MAX_CU_BUFFER; exports.MAX_EXPONENTIAL = MAX_EXPONENTIAL; exports.MAX_FEE_BPS_V0 = MAX_FEE_BPS_V0; exports.MAX_FEE_BPS_V1 = MAX_FEE_BPS_V1; exports.MAX_FEE_NUMERATOR_V0 = MAX_FEE_NUMERATOR_V0; exports.MAX_FEE_NUMERATOR_V1 = MAX_FEE_NUMERATOR_V1; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_REWARD_DURATION = MAX_REWARD_DURATION; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MIN_CU_BUFFER = MIN_CU_BUFFER; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_REWARD_DURATION = MIN_REWARD_DURATION; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MathOverflowError = MathOverflowError; exports.NUM_REWARDS = NUM_REWARDS; exports.ONE_Q64 = ONE_Q64; exports.PoolStatus = PoolStatus; exports.PriceRangeViolationError = PriceRangeViolationError; exports.Rounding = Rounding; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SPLIT_POSITION_DENOMINATOR = SPLIT_POSITION_DENOMINATOR; exports.SameTokenMintsError = SameTokenMintsError; exports.SwapDisabledError = SwapDisabledError; exports.SwapMode = SwapMode; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U24_MAX = U24_MAX; exports.U64_MAX = U64_MAX; exports.applySwapResult = applySwapResult; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.calculateAtoBFromAmountInForCompoundingLiquidity = calculateAtoBFromAmountInForCompoundingLiquidity; exports.calculateAtoBFromAmountInForConcentratedLiquidity = calculateAtoBFromAmountInForConcentratedLiquidity; exports.calculateAtoBFromAmountOutForCompoundingLiquidity = calculateAtoBFromAmountOutForCompoundingLiquidity; exports.calculateAtoBFromAmountOutForConcentratedLiquidity = calculateAtoBFromAmountOutForConcentratedLiquidity; exports.calculateAtoBFromPartialAmountInForCompoundingLiquidity = calculateAtoBFromPartialAmountInForCompoundingLiquidity; exports.calculateAtoBFromPartialAmountInForConcentratedLiquidity = calculateAtoBFromPartialAmountInForConcentratedLiquidity; exports.calculateBtoAFromAmountInForCompoundingLiquidity = calculateBtoAFromAmountInForCompoundingLiquidity; exports.calculateBtoAFromAmountInForConcentratedLiquidity = calculateBtoAFromAmountInForConcentratedLiquidity; exports.calculateBtoAFromAmountOutForCompoundingLiquidity = calculateBtoAFromAmountOutForCompoundingLiquidity; exports.calculateBtoAFromAmountOutForConcentratedLiquidity = calculateBtoAFromAmountOutForConcentratedLiquidity; exports.calculateBtoAFromPartialAmountInForCompoundingLiquidity = calculateBtoAFromPartialAmountInForCompoundingLiquidity; exports.calculateBtoAFromPartialAmountInForConcentratedLiquidity = calculateBtoAFromPartialAmountInForConcentratedLiquidity; exports.calculateInitSqrtPrice = calculateInitSqrtPrice; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.computeSqrtPriceStepBps = computeSqrtPriceStepBps; exports.convertToFeeSchedulerSecondFactor = convertToFeeSchedulerSecondFactor; exports.convertToLamports = convertToLamports; exports.convertToRateLimiterSecondFactor = convertToRateLimiterSecondFactor; exports.cpAmmCoder = cpAmmCoder; exports.decimalToQ64 = decimalToQ64; exports.decodeFeeMarketCapSchedulerParams = decodeFeeMarketCapSchedulerParams; exports.decodeFeeRateLimiterParams = decodeFeeRateLimiterParams; exports.decodeFeeTimeSchedulerParams = decodeFeeTimeSchedulerParams; exports.decodePodAlignedFeeMarketCapScheduler = decodePodAlignedFeeMarketCapScheduler; exports.decodePodAlignedFeeRateLimiter = decodePodAlignedFeeRateLimiter; exports.decodePodAlignedFeeTimeScheduler = decodePodAlignedFeeTimeScheduler; exports.deriveClaimFeeOperatorAddress = deriveClaimFeeOperatorAddress; exports.deriveConfigAddress = deriveConfigAddress; exports.deriveCustomizablePoolAddress = deriveCustomizablePoolAddress; exports.deriveOperatorAddress = deriveOperatorAddress; exports.derivePoolAddress = derivePoolAddress; exports.derivePoolAuthority = derivePoolAuthority; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveRewardVaultAddress = deriveRewardVaultAddress; exports.deriveTokenBadgeAddress = deriveTokenBadgeAddress; exports.deriveTokenVaultAddress = deriveTokenVaultAddress; exports.encodeFeeMarketCapSchedulerParams = encodeFeeMarketCapSchedulerParams; exports.encodeFeeRateLimiterParams = encodeFeeRateLimiterParams; exports.encodeFeeTimeSchedulerParams = encodeFeeTimeSchedulerParams; exports.feeNumeratorToBps = feeNumeratorToBps; exports.fromDecimalToBN = fromDecimalToBN; exports.getAllPositionNftAccountByOwner = getAllPositionNftAccountByOwner; exports.getAllUserPositionNftAccount = getAllUserPositionNftAccount; exports.getAmountAFromLiquidityDelta = getAmountAFromLiquidityDelta; exports.getAmountAFromLiquidityDeltaForCompoundingLiquidity = getAmountAFromLiquidityDeltaForCompoundingLiquidity; exports.getAmountAFromLiquidityDeltaForConcentratedLiquidity = getAmountAFromLiquidityDeltaForConcentratedLiquidity; exports.getAmountBFromLiquidityDelta = getAmountBFromLiquidityDelta; exports.getAmountBFromLiquidityDeltaForCompoundingLiquidity = getAmountBFromLiquidityDeltaForCompoundingLiquidity; exports.getAmountBFromLiquidityDeltaForConcentratedLiquidity = getAmountBFromLiquidityDeltaForConcentratedLiquidity; exports.getAmountWithSlippage = getAmountWithSlippage; exports.getAmountsForModifyForCompoundingLiquidity = getAmountsForModifyForCompoundingLiquidity; exports.getAmountsForModifyForConcentratedLiquidity = getAmountsForModifyForConcentratedLiquidity; exports.getAvailableVestingLiquidity = getAvailableVestingLiquidity; exports.getBaseFeeHandlerFromBorshData = getBaseFeeHandlerFromBorshData; exports.getBaseFeeHandlerFromPodAlignedData = getBaseFeeHandlerFromPodAlignedData; exports.getBaseFeeParams = getBaseFeeParams; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getDynamicFeeNumerator = getDynamicFeeNumerator; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExcludedFeeAmountFromIncludedFeeAmount = getExcludedFeeAmountFromIncludedFeeAmount; exports.getFeeInPeriod = getFeeInPeriod; exports.getFeeMarketCapBaseFeeNumerator = getFeeMarketCapBaseFeeNumerator; exports.getFeeMarketCapBaseFeeNumeratorByPeriod = getFeeMarketCapBaseFeeNumeratorByPeriod; exports.getFeeMarketCapMinBaseFeeNumerator = getFeeMarketCapMinBaseFeeNumerator; exports.getFeeMarketCapSchedulerParams = getFeeMarketCapSchedulerParams; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedFeeAmount = getFeeNumeratorFromExcludedFeeAmount; exports.getFeeNumeratorFromIncludedFeeAmount = getFeeNumeratorFromIncludedFeeAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeTimeBaseFeeNumerator = getFeeTimeBaseFeeNumerator; exports.getFeeTimeBaseFeeNumeratorByPeriod = getFeeTimeBaseFeeNumeratorByPeriod; exports.getFeeTimeMinBaseFeeNumerator = getFeeTimeMinBaseFeeNumerator; exports.getFeeTimeSchedulerParams = getFeeTimeSchedulerParams; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialCompoundingPoolInformation = getInitialCompoundingPoolInformation; exports.getInitialConcentratedLiquidityPoolInformation = getInitialConcentratedLiquidityPoolInformation; exports.getInitialPoolInformation = getInitialPoolInformation; exports.getLiquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA; exports.getLiquidityDeltaFromAmountAForCompoundingLiquidity = getLiquidityDeltaFromAmountAForCompoundingLiquidity; exports.getLiquidityDeltaFromAmountAForConcentratedLiquidity = getLiquidityDeltaFromAmountAForConcentratedLiquidity; exports.getLiquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB; exports.getLiquidityDeltaFromAmountBForCompoundingLiquidity = getLiquidityDeltaFromAmountBForCompoundingLiquidity; exports.getLiquidityDeltaFromAmountBForConcentratedLiquidity = getLiquidityDeltaFromAmountBForConcentratedLiquidity; exports.getLiquidityHandler = getLiquidityHandler; exports.getMaxAmountWithSlippage = getMaxAmountWithSlippage; exports.getMaxBaseFeeNumerator = getMaxBaseFeeNumerator; exports.getMaxFeeBps = getMaxFeeBps; exports.getMaxFeeNumerator = getMaxFeeNumerator; exports.getMaxIndex = getMaxIndex; exports.getNextSqrtPriceForCompoundingLiquidity = getNextSqrtPriceForCompoundingLiquidity; exports.getNextSqrtPriceFromAmountInARoundingUp = getNextSqrtPriceFromAmountInARoundingUp; exports.getNextSqrtPriceFromAmountInBRoundingDown = getNextSqrtPriceFromAmountInBRoundingDown; exports.getNextSqrtPriceFromAmountOutARoundingUp = getNextSqrtPriceFromAmountOutARoundingUp; exports.getNextSqrtPriceFromAmountOutBRoundingDown = getNextSqrtPriceFromAmountOutBRoundingDown; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPoolCreationAmountAFromLiquidityDeltaForCompoundingLiquidity = getPoolCreationAmountAFromLiquidityDeltaForCompoundingLiquidity; exports.getPoolCreationAmountBFromLiquidityDeltaForCompoundingLiquidity = getPoolCreationAmountBFromLiquidityDeltaForCompoundingLiquidity; exports.getPoolCreationLiquidityDeltaFromAmountAForCompoundingLiquidity = getPoolCreationLiquidityDeltaFromAmountAForCompoundingLiquidity; exports.getPoolCreationLiquidityDeltaFromAmountBForCompoundingLiquidity = getPoolCreationLiquidityDeltaFromAmountBForCompoundingLiquidity; exports.getPriceChange = getPriceChange; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getPriceImpact = getPriceImpact; exports.getRateLimiterMaxBaseFeeNumerator = getRateLimiterMaxBaseFeeNumerator; exports.getRateLimiterMinBaseFeeNumerator = getRateLimiterMinBaseFeeNumerator; exports.getRateLimiterParams = getRateLimiterParams; exports.getReservesAmountForCompoundingLiquidity = getReservesAmountForCompoundingLiquidity; exports.getReservesAmountForConcentratedLiquidity = getReservesAmountForConcentratedLiquidity; exports.getRewardInfo = getRewardInfo; exports.getSecondKey = getSecondKey; exports.getSimulationComputeUnits = getSimulationComputeUnits; exports.getSqrtPriceFromAmountsForCompoundingLiquidity = getSqrtPriceFromAmountsForCompoundingLiquidity; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalLockedLiquidity = getTotalLockedLiquidity; exports.getTotalTradingFeeFromExcludedFeeAmount = getTotalTradingFeeFromExcludedFeeAmount; exports.getTotalTradingFeeFromIncludedFeeAmount = getTotalTradingFeeFromIncludedFeeAmount; exports.getUnClaimLpFee = getUnClaimLpFee; exports.getUserRewardPending = getUserRewardPending; exports.hasTransferHookExtension = hasTransferHookExtension; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isSwapEnabled = isSwapEnabled; exports.isVestingComplete = isVestingComplete; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.offsetBasedFilter = offsetBasedFilter; exports.parseFeeSchedulerSecondFactor = parseFeeSchedulerSecondFactor; exports.parseRateLimiterSecondFactor = parseRateLimiterSecondFactor; exports.positionByPoolFilter = positionByPoolFilter; exports.pow = pow; exports.q64ToDecimal = q64ToDecimal; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuoteExactInput = swapQuoteExactInput; exports.swapQuoteExactOutput = swapQuoteExactOutput; exports.swapQuotePartialInput = swapQuotePartialInput; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateAddLiquidityParams = validateAddLiquidityParams; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateCompoundingFee = validateCompoundingFee; exports.validateCreatePoolParams = validateCreatePoolParams; exports.validateCustomizablePoolParams = validateCustomizablePoolParams; exports.validateDynamicFee = validateDynamicFee; exports.validateFeeFraction = validateFeeFraction; exports.validateFeeMarketCapBaseFeeIsStatic = validateFeeMarketCapBaseFeeIsStatic; exports.validateFeeMarketCapScheduler = validateFeeMarketCapScheduler; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeRateLimiterBaseFeeIsStatic = validateFeeRateLimiterBaseFeeIsStatic; exports.validateFeeTimeScheduler = validateFeeTimeScheduler; exports.validateFeeTimeSchedulerBaseFeeIsStatic = validateFeeTimeSchedulerBaseFeeIsStatic; exports.validateInitialSqrtPrice = validateInitialSqrtPrice; exports.validateLockPositionParams = validateLockPositionParams; exports.validateNoTransferHook = validateNoTransferHook; exports.validatePoolFees = validatePoolFees; exports.validatePriceRange = validatePriceRange; exports.validateRemoveLiquidityParams = validateRemoveLiquidityParams; exports.validateRewardDuration = validateRewardDuration; exports.validateRewardIndex = validateRewardIndex; exports.validateSplitPosition2Params = validateSplitPosition2Params; exports.validateSplitPositionParams = validateSplitPositionParams; exports.validateTokenMints = validateTokenMints; exports.vestingByPositionFilter = vestingByPositionFilter; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
14762
|
+
|
|
14763
|
+
|
|
14764
|
+
exports.ActivationPoint = ActivationPoint; exports.ActivationType = ActivationType; exports.AmountIsZeroError = AmountIsZeroError; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; exports.CP_AMM_PROGRAM_ID = CP_AMM_PROGRAM_ID; exports.CURRENT_POOL_VERSION = CURRENT_POOL_VERSION; exports.CollectFeeMode = CollectFeeMode; exports.CompoundingLiquidityHandler = CompoundingLiquidityHandler; exports.ConcentratedLiquidityHandler = ConcentratedLiquidityHandler; exports.CpAmm = CpAmm; exports.CpAmmIdl = cp_amm_default; exports.DEAD_LIQUIDITY = DEAD_LIQUIDITY; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DepositTokenNotAcceptedError = DepositTokenNotAcceptedError; exports.ExceedMaxFeeBpsError = ExceedMaxFeeBpsError; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeMarketCapScheduler = FeeMarketCapScheduler; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeTimeScheduler = FeeTimeScheduler; exports.InsufficientLiquidityError = InsufficientLiquidityError; exports.InvalidActivationTypeError = InvalidActivationTypeError; exports.InvalidBaseFeeModeError = InvalidBaseFeeModeError; exports.InvalidCollectFeeModeError = InvalidCollectFeeModeError; exports.InvalidCompoundingFeeBpsError = InvalidCompoundingFeeBpsError; exports.InvalidDynamicFeeParametersError = InvalidDynamicFeeParametersError; exports.InvalidFeeError = InvalidFeeError; exports.InvalidFeeMarketCapSchedulerError = InvalidFeeMarketCapSchedulerError; exports.InvalidFeeRateLimiterError = InvalidFeeRateLimiterError; exports.InvalidFeeTimeSchedulerError = InvalidFeeTimeSchedulerError; exports.InvalidInputError = InvalidInputError; exports.InvalidMinimumLiquidityError = InvalidMinimumLiquidityError; exports.InvalidParametersError = InvalidParametersError; exports.InvalidPoolVersionError = InvalidPoolVersionError; exports.InvalidPriceRangeError = InvalidPriceRangeError; exports.InvalidRewardDurationError = InvalidRewardDurationError; exports.InvalidRewardIndexError = InvalidRewardIndexError; exports.InvalidSplitPositionParametersError = InvalidSplitPositionParametersError; exports.InvalidVestingInfoError = InvalidVestingInfoError; exports.LIQUIDITY_SCALE = LIQUIDITY_SCALE; exports.LayoutVersion = LayoutVersion; exports.MAX = MAX; exports.MAX_CU_BUFFER = MAX_CU_BUFFER; exports.MAX_EXPONENTIAL = MAX_EXPONENTIAL; exports.MAX_FEE_BPS_V0 = MAX_FEE_BPS_V0; exports.MAX_FEE_BPS_V1 = MAX_FEE_BPS_V1; exports.MAX_FEE_NUMERATOR_V0 = MAX_FEE_NUMERATOR_V0; exports.MAX_FEE_NUMERATOR_V1 = MAX_FEE_NUMERATOR_V1; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_REWARD_DURATION = MAX_REWARD_DURATION; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MIN_CU_BUFFER = MIN_CU_BUFFER; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_REWARD_DURATION = MIN_REWARD_DURATION; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MathOverflowError = MathOverflowError; exports.NUM_REWARDS = NUM_REWARDS; exports.ONE_Q64 = ONE_Q64; exports.PoolStatus = PoolStatus; exports.PositionDelegatePermission = PositionDelegatePermission; exports.PriceRangeViolationError = PriceRangeViolationError; exports.Rounding = Rounding; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SPLIT_POSITION_DENOMINATOR = SPLIT_POSITION_DENOMINATOR; exports.SameTokenMintsError = SameTokenMintsError; exports.SwapDisabledError = SwapDisabledError; exports.SwapMode = SwapMode; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U24_MAX = U24_MAX; exports.U64_MAX = U64_MAX; exports.applySwapResult = applySwapResult; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.calculateAtoBFromAmountInForCompoundingLiquidity = calculateAtoBFromAmountInForCompoundingLiquidity; exports.calculateAtoBFromAmountInForConcentratedLiquidity = calculateAtoBFromAmountInForConcentratedLiquidity; exports.calculateAtoBFromAmountOutForCompoundingLiquidity = calculateAtoBFromAmountOutForCompoundingLiquidity; exports.calculateAtoBFromAmountOutForConcentratedLiquidity = calculateAtoBFromAmountOutForConcentratedLiquidity; exports.calculateAtoBFromPartialAmountInForCompoundingLiquidity = calculateAtoBFromPartialAmountInForCompoundingLiquidity; exports.calculateAtoBFromPartialAmountInForConcentratedLiquidity = calculateAtoBFromPartialAmountInForConcentratedLiquidity; exports.calculateBtoAFromAmountInForCompoundingLiquidity = calculateBtoAFromAmountInForCompoundingLiquidity; exports.calculateBtoAFromAmountInForConcentratedLiquidity = calculateBtoAFromAmountInForConcentratedLiquidity; exports.calculateBtoAFromAmountOutForCompoundingLiquidity = calculateBtoAFromAmountOutForCompoundingLiquidity; exports.calculateBtoAFromAmountOutForConcentratedLiquidity = calculateBtoAFromAmountOutForConcentratedLiquidity; exports.calculateBtoAFromPartialAmountInForCompoundingLiquidity = calculateBtoAFromPartialAmountInForCompoundingLiquidity; exports.calculateBtoAFromPartialAmountInForConcentratedLiquidity = calculateBtoAFromPartialAmountInForConcentratedLiquidity; exports.calculateInitSqrtPrice = calculateInitSqrtPrice; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.computeSqrtPriceStepBps = computeSqrtPriceStepBps; exports.convertToFeeSchedulerSecondFactor = convertToFeeSchedulerSecondFactor; exports.convertToLamports = convertToLamports; exports.convertToRateLimiterSecondFactor = convertToRateLimiterSecondFactor; exports.cpAmmCoder = cpAmmCoder; exports.decimalToQ64 = decimalToQ64; exports.decodeFeeMarketCapSchedulerParams = decodeFeeMarketCapSchedulerParams; exports.decodeFeeRateLimiterParams = decodeFeeRateLimiterParams; exports.decodeFeeTimeSchedulerParams = decodeFeeTimeSchedulerParams; exports.decodePodAlignedFeeMarketCapScheduler = decodePodAlignedFeeMarketCapScheduler; exports.decodePodAlignedFeeRateLimiter = decodePodAlignedFeeRateLimiter; exports.decodePodAlignedFeeTimeScheduler = decodePodAlignedFeeTimeScheduler; exports.deriveClaimFeeOperatorAddress = deriveClaimFeeOperatorAddress; exports.deriveConfigAddress = deriveConfigAddress; exports.deriveCustomizablePoolAddress = deriveCustomizablePoolAddress; exports.deriveOperatorAddress = deriveOperatorAddress; exports.derivePoolAddress = derivePoolAddress; exports.derivePoolAuthority = derivePoolAuthority; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveRewardVaultAddress = deriveRewardVaultAddress; exports.deriveTokenBadgeAddress = deriveTokenBadgeAddress; exports.deriveTokenVaultAddress = deriveTokenVaultAddress; exports.encodeDelegatePermissions = encodeDelegatePermissions; exports.encodeFeeMarketCapSchedulerParams = encodeFeeMarketCapSchedulerParams; exports.encodeFeeRateLimiterParams = encodeFeeRateLimiterParams; exports.encodeFeeTimeSchedulerParams = encodeFeeTimeSchedulerParams; exports.feeNumeratorToBps = feeNumeratorToBps; exports.fromDecimalToBN = fromDecimalToBN; exports.getAllPositionNftAccountByOwner = getAllPositionNftAccountByOwner; exports.getAllUserPositionNftAccount = getAllUserPositionNftAccount; exports.getAmountAFromLiquidityDelta = getAmountAFromLiquidityDelta; exports.getAmountAFromLiquidityDeltaForCompoundingLiquidity = getAmountAFromLiquidityDeltaForCompoundingLiquidity; exports.getAmountAFromLiquidityDeltaForConcentratedLiquidity = getAmountAFromLiquidityDeltaForConcentratedLiquidity; exports.getAmountBFromLiquidityDelta = getAmountBFromLiquidityDelta; exports.getAmountBFromLiquidityDeltaForCompoundingLiquidity = getAmountBFromLiquidityDeltaForCompoundingLiquidity; exports.getAmountBFromLiquidityDeltaForConcentratedLiquidity = getAmountBFromLiquidityDeltaForConcentratedLiquidity; exports.getAmountWithSlippage = getAmountWithSlippage; exports.getAmountsForModifyForCompoundingLiquidity = getAmountsForModifyForCompoundingLiquidity; exports.getAmountsForModifyForConcentratedLiquidity = getAmountsForModifyForConcentratedLiquidity; exports.getAvailableVestingLiquidity = getAvailableVestingLiquidity; exports.getBaseFeeHandlerFromBorshData = getBaseFeeHandlerFromBorshData; exports.getBaseFeeHandlerFromPodAlignedData = getBaseFeeHandlerFromPodAlignedData; exports.getBaseFeeParams = getBaseFeeParams; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getDynamicFeeNumerator = getDynamicFeeNumerator; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExcludedFeeAmountFromIncludedFeeAmount = getExcludedFeeAmountFromIncludedFeeAmount; exports.getFeeInPeriod = getFeeInPeriod; exports.getFeeMarketCapBaseFeeNumerator = getFeeMarketCapBaseFeeNumerator; exports.getFeeMarketCapBaseFeeNumeratorByPeriod = getFeeMarketCapBaseFeeNumeratorByPeriod; exports.getFeeMarketCapMinBaseFeeNumerator = getFeeMarketCapMinBaseFeeNumerator; exports.getFeeMarketCapSchedulerParams = getFeeMarketCapSchedulerParams; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedFeeAmount = getFeeNumeratorFromExcludedFeeAmount; exports.getFeeNumeratorFromIncludedFeeAmount = getFeeNumeratorFromIncludedFeeAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeTimeBaseFeeNumerator = getFeeTimeBaseFeeNumerator; exports.getFeeTimeBaseFeeNumeratorByPeriod = getFeeTimeBaseFeeNumeratorByPeriod; exports.getFeeTimeMinBaseFeeNumerator = getFeeTimeMinBaseFeeNumerator; exports.getFeeTimeSchedulerParams = getFeeTimeSchedulerParams; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialCompoundingPoolInformation = getInitialCompoundingPoolInformation; exports.getInitialConcentratedLiquidityPoolInformation = getInitialConcentratedLiquidityPoolInformation; exports.getInitialPoolInformation = getInitialPoolInformation; exports.getLiquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA; exports.getLiquidityDeltaFromAmountAForCompoundingLiquidity = getLiquidityDeltaFromAmountAForCompoundingLiquidity; exports.getLiquidityDeltaFromAmountAForConcentratedLiquidity = getLiquidityDeltaFromAmountAForConcentratedLiquidity; exports.getLiquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB; exports.getLiquidityDeltaFromAmountBForCompoundingLiquidity = getLiquidityDeltaFromAmountBForCompoundingLiquidity; exports.getLiquidityDeltaFromAmountBForConcentratedLiquidity = getLiquidityDeltaFromAmountBForConcentratedLiquidity; exports.getLiquidityHandler = getLiquidityHandler; exports.getMaxAmountWithSlippage = getMaxAmountWithSlippage; exports.getMaxBaseFeeNumerator = getMaxBaseFeeNumerator; exports.getMaxFeeBps = getMaxFeeBps; exports.getMaxFeeNumerator = getMaxFeeNumerator; exports.getMaxIndex = getMaxIndex; exports.getNextSqrtPriceForCompoundingLiquidity = getNextSqrtPriceForCompoundingLiquidity; exports.getNextSqrtPriceFromAmountInARoundingUp = getNextSqrtPriceFromAmountInARoundingUp; exports.getNextSqrtPriceFromAmountInBRoundingDown = getNextSqrtPriceFromAmountInBRoundingDown; exports.getNextSqrtPriceFromAmountOutARoundingUp = getNextSqrtPriceFromAmountOutARoundingUp; exports.getNextSqrtPriceFromAmountOutBRoundingDown = getNextSqrtPriceFromAmountOutBRoundingDown; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPoolCreationAmountAFromLiquidityDeltaForCompoundingLiquidity = getPoolCreationAmountAFromLiquidityDeltaForCompoundingLiquidity; exports.getPoolCreationAmountBFromLiquidityDeltaForCompoundingLiquidity = getPoolCreationAmountBFromLiquidityDeltaForCompoundingLiquidity; exports.getPoolCreationLiquidityDeltaFromAmountAForCompoundingLiquidity = getPoolCreationLiquidityDeltaFromAmountAForCompoundingLiquidity; exports.getPoolCreationLiquidityDeltaFromAmountBForCompoundingLiquidity = getPoolCreationLiquidityDeltaFromAmountBForCompoundingLiquidity; exports.getPriceChange = getPriceChange; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getPriceImpact = getPriceImpact; exports.getRateLimiterMaxBaseFeeNumerator = getRateLimiterMaxBaseFeeNumerator; exports.getRateLimiterMinBaseFeeNumerator = getRateLimiterMinBaseFeeNumerator; exports.getRateLimiterParams = getRateLimiterParams; exports.getReservesAmountForCompoundingLiquidity = getReservesAmountForCompoundingLiquidity; exports.getReservesAmountForConcentratedLiquidity = getReservesAmountForConcentratedLiquidity; exports.getRewardInfo = getRewardInfo; exports.getSecondKey = getSecondKey; exports.getSimulationComputeUnits = getSimulationComputeUnits; exports.getSqrtPriceFromAmountsForCompoundingLiquidity = getSqrtPriceFromAmountsForCompoundingLiquidity; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalLockedLiquidity = getTotalLockedLiquidity; exports.getTotalTradingFeeFromExcludedFeeAmount = getTotalTradingFeeFromExcludedFeeAmount; exports.getTotalTradingFeeFromIncludedFeeAmount = getTotalTradingFeeFromIncludedFeeAmount; exports.getUnClaimLpFee = getUnClaimLpFee; exports.getUserRewardPending = getUserRewardPending; exports.hasTransferHookExtension = hasTransferHookExtension; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isSwapEnabled = isSwapEnabled; exports.isVestingComplete = isVestingComplete; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.offsetBasedFilter = offsetBasedFilter; exports.parseFeeSchedulerSecondFactor = parseFeeSchedulerSecondFactor; exports.parseRateLimiterSecondFactor = parseRateLimiterSecondFactor; exports.positionByPoolFilter = positionByPoolFilter; exports.pow = pow; exports.q64ToDecimal = q64ToDecimal; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuoteExactInput = swapQuoteExactInput; exports.swapQuoteExactOutput = swapQuoteExactOutput; exports.swapQuotePartialInput = swapQuotePartialInput; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateAddLiquidityParams = validateAddLiquidityParams; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateCompoundingFee = validateCompoundingFee; exports.validateCreatePoolParams = validateCreatePoolParams; exports.validateCustomizablePoolParams = validateCustomizablePoolParams; exports.validateDynamicFee = validateDynamicFee; exports.validateFeeFraction = validateFeeFraction; exports.validateFeeMarketCapBaseFeeIsStatic = validateFeeMarketCapBaseFeeIsStatic; exports.validateFeeMarketCapScheduler = validateFeeMarketCapScheduler; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeRateLimiterBaseFeeIsStatic = validateFeeRateLimiterBaseFeeIsStatic; exports.validateFeeTimeScheduler = validateFeeTimeScheduler; exports.validateFeeTimeSchedulerBaseFeeIsStatic = validateFeeTimeSchedulerBaseFeeIsStatic; exports.validateInitialSqrtPrice = validateInitialSqrtPrice; exports.validateLockPositionParams = validateLockPositionParams; exports.validateNoTransferHook = validateNoTransferHook; exports.validatePoolFees = validatePoolFees; exports.validatePriceRange = validatePriceRange; exports.validateRemoveLiquidityParams = validateRemoveLiquidityParams; exports.validateRewardDuration = validateRewardDuration; exports.validateRewardIndex = validateRewardIndex; exports.validateSplitPosition2Params = validateSplitPosition2Params; exports.validateSplitPositionParams = validateSplitPositionParams; exports.validateTokenMints = validateTokenMints; exports.vestingByPositionFilter = vestingByPositionFilter; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
15194
14765
|
//# sourceMappingURL=index.js.map
|