@meteora-ag/cp-amm-sdk 1.2.4 → 1.2.6-rc.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.mts +1828 -979
- package/dist/index.d.ts +1828 -979
- package/dist/index.js +1567 -704
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1670 -807
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey, Transaction, Connection, TransactionInstruction, AddressLookupTableAccount, Commitment, GetProgramAccountsFilter } from '@solana/web3.js';
|
|
2
|
-
import { Program, IdlAccounts, BN, IdlTypes } from '@coral-xyz/anchor';
|
|
2
|
+
import { Program, IdlAccounts, BN, IdlTypes, BorshCoder } from '@coral-xyz/anchor';
|
|
3
3
|
import { Mint } from '@solana/spl-token';
|
|
4
4
|
import Decimal from 'decimal.js';
|
|
5
5
|
import BN$1 from 'bn.js';
|
|
@@ -14,7 +14,7 @@ type CpAmm$1 = {
|
|
|
14
14
|
address: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
|
|
15
15
|
metadata: {
|
|
16
16
|
name: "cpAmm";
|
|
17
|
-
version: "0.1.
|
|
17
|
+
version: "0.1.6";
|
|
18
18
|
spec: "0.1.0";
|
|
19
19
|
description: "Created with Anchor";
|
|
20
20
|
};
|
|
@@ -543,14 +543,14 @@ type CpAmm$1 = {
|
|
|
543
543
|
};
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
|
-
name: "
|
|
546
|
+
name: "operator";
|
|
547
547
|
docs: ["Claim fee operator"];
|
|
548
548
|
},
|
|
549
549
|
{
|
|
550
|
-
name: "
|
|
551
|
-
docs: ["
|
|
550
|
+
name: "whitelistedAddress";
|
|
551
|
+
docs: ["operator"];
|
|
552
552
|
signer: true;
|
|
553
|
-
relations: ["
|
|
553
|
+
relations: ["operator"];
|
|
554
554
|
},
|
|
555
555
|
{
|
|
556
556
|
name: "tokenAProgram";
|
|
@@ -690,20 +690,24 @@ type CpAmm$1 = {
|
|
|
690
690
|
];
|
|
691
691
|
},
|
|
692
692
|
{
|
|
693
|
-
name: "
|
|
694
|
-
discriminator: [
|
|
693
|
+
name: "closeConfig";
|
|
694
|
+
discriminator: [145, 9, 72, 157, 95, 125, 61, 85];
|
|
695
695
|
accounts: [
|
|
696
696
|
{
|
|
697
|
-
name: "
|
|
697
|
+
name: "config";
|
|
698
698
|
writable: true;
|
|
699
699
|
},
|
|
700
700
|
{
|
|
701
|
-
name: "
|
|
702
|
-
writable: true;
|
|
701
|
+
name: "operator";
|
|
703
702
|
},
|
|
704
703
|
{
|
|
705
|
-
name: "
|
|
704
|
+
name: "whitelistedAddress";
|
|
706
705
|
signer: true;
|
|
706
|
+
relations: ["operator"];
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: "rentReceiver";
|
|
710
|
+
writable: true;
|
|
707
711
|
},
|
|
708
712
|
{
|
|
709
713
|
name: "eventAuthority";
|
|
@@ -741,16 +745,15 @@ type CpAmm$1 = {
|
|
|
741
745
|
args: [];
|
|
742
746
|
},
|
|
743
747
|
{
|
|
744
|
-
name: "
|
|
745
|
-
discriminator: [
|
|
748
|
+
name: "closeOperatorAccount";
|
|
749
|
+
discriminator: [171, 9, 213, 74, 120, 23, 3, 29];
|
|
746
750
|
accounts: [
|
|
747
751
|
{
|
|
748
|
-
name: "
|
|
752
|
+
name: "operator";
|
|
749
753
|
writable: true;
|
|
750
754
|
},
|
|
751
755
|
{
|
|
752
756
|
name: "admin";
|
|
753
|
-
writable: true;
|
|
754
757
|
signer: true;
|
|
755
758
|
},
|
|
756
759
|
{
|
|
@@ -879,9 +882,12 @@ type CpAmm$1 = {
|
|
|
879
882
|
writable: true;
|
|
880
883
|
},
|
|
881
884
|
{
|
|
882
|
-
name: "
|
|
883
|
-
|
|
885
|
+
name: "operator";
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: "whitelistedAddress";
|
|
884
889
|
signer: true;
|
|
890
|
+
relations: ["operator"];
|
|
885
891
|
},
|
|
886
892
|
{
|
|
887
893
|
name: "rentReceiver";
|
|
@@ -923,21 +929,22 @@ type CpAmm$1 = {
|
|
|
923
929
|
args: [];
|
|
924
930
|
},
|
|
925
931
|
{
|
|
926
|
-
name: "
|
|
927
|
-
|
|
932
|
+
name: "createConfig";
|
|
933
|
+
docs: ["OPERATOR FUNCTIONS /////"];
|
|
934
|
+
discriminator: [201, 207, 243, 114, 75, 111, 47, 189];
|
|
928
935
|
accounts: [
|
|
929
936
|
{
|
|
930
|
-
name: "
|
|
937
|
+
name: "config";
|
|
931
938
|
writable: true;
|
|
932
939
|
pda: {
|
|
933
940
|
seeds: [
|
|
934
941
|
{
|
|
935
942
|
kind: "const";
|
|
936
|
-
value: [99,
|
|
943
|
+
value: [99, 111, 110, 102, 105, 103];
|
|
937
944
|
},
|
|
938
945
|
{
|
|
939
|
-
kind: "
|
|
940
|
-
path: "
|
|
946
|
+
kind: "arg";
|
|
947
|
+
path: "index";
|
|
941
948
|
}
|
|
942
949
|
];
|
|
943
950
|
};
|
|
@@ -946,7 +953,12 @@ type CpAmm$1 = {
|
|
|
946
953
|
name: "operator";
|
|
947
954
|
},
|
|
948
955
|
{
|
|
949
|
-
name: "
|
|
956
|
+
name: "whitelistedAddress";
|
|
957
|
+
signer: true;
|
|
958
|
+
relations: ["operator"];
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
name: "payer";
|
|
950
962
|
writable: true;
|
|
951
963
|
signer: true;
|
|
952
964
|
},
|
|
@@ -987,12 +999,24 @@ type CpAmm$1 = {
|
|
|
987
999
|
name: "program";
|
|
988
1000
|
}
|
|
989
1001
|
];
|
|
990
|
-
args: [
|
|
1002
|
+
args: [
|
|
1003
|
+
{
|
|
1004
|
+
name: "index";
|
|
1005
|
+
type: "u64";
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: "configParameters";
|
|
1009
|
+
type: {
|
|
1010
|
+
defined: {
|
|
1011
|
+
name: "staticConfigParameters";
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
];
|
|
991
1016
|
},
|
|
992
1017
|
{
|
|
993
|
-
name: "
|
|
994
|
-
|
|
995
|
-
discriminator: [201, 207, 243, 114, 75, 111, 47, 189];
|
|
1018
|
+
name: "createDynamicConfig";
|
|
1019
|
+
discriminator: [81, 251, 122, 78, 66, 57, 208, 82];
|
|
996
1020
|
accounts: [
|
|
997
1021
|
{
|
|
998
1022
|
name: "config";
|
|
@@ -1011,7 +1035,15 @@ type CpAmm$1 = {
|
|
|
1011
1035
|
};
|
|
1012
1036
|
},
|
|
1013
1037
|
{
|
|
1014
|
-
name: "
|
|
1038
|
+
name: "operator";
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: "whitelistedAddress";
|
|
1042
|
+
signer: true;
|
|
1043
|
+
relations: ["operator"];
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
name: "payer";
|
|
1015
1047
|
writable: true;
|
|
1016
1048
|
signer: true;
|
|
1017
1049
|
},
|
|
@@ -1061,34 +1093,42 @@ type CpAmm$1 = {
|
|
|
1061
1093
|
name: "configParameters";
|
|
1062
1094
|
type: {
|
|
1063
1095
|
defined: {
|
|
1064
|
-
name: "
|
|
1096
|
+
name: "dynamicConfigParameters";
|
|
1065
1097
|
};
|
|
1066
1098
|
};
|
|
1067
1099
|
}
|
|
1068
1100
|
];
|
|
1069
1101
|
},
|
|
1070
1102
|
{
|
|
1071
|
-
name: "
|
|
1072
|
-
|
|
1103
|
+
name: "createOperatorAccount";
|
|
1104
|
+
docs: ["ADMIN FUNCTIONS /////"];
|
|
1105
|
+
discriminator: [221, 64, 246, 149, 240, 153, 229, 163];
|
|
1073
1106
|
accounts: [
|
|
1074
1107
|
{
|
|
1075
|
-
name: "
|
|
1108
|
+
name: "operator";
|
|
1076
1109
|
writable: true;
|
|
1077
1110
|
pda: {
|
|
1078
1111
|
seeds: [
|
|
1079
1112
|
{
|
|
1080
1113
|
kind: "const";
|
|
1081
|
-
value: [
|
|
1114
|
+
value: [111, 112, 101, 114, 97, 116, 111, 114];
|
|
1082
1115
|
},
|
|
1083
1116
|
{
|
|
1084
|
-
kind: "
|
|
1085
|
-
path: "
|
|
1117
|
+
kind: "account";
|
|
1118
|
+
path: "whitelistedAddress";
|
|
1086
1119
|
}
|
|
1087
1120
|
];
|
|
1088
1121
|
};
|
|
1089
1122
|
},
|
|
1123
|
+
{
|
|
1124
|
+
name: "whitelistedAddress";
|
|
1125
|
+
},
|
|
1090
1126
|
{
|
|
1091
1127
|
name: "admin";
|
|
1128
|
+
signer: true;
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
name: "payer";
|
|
1092
1132
|
writable: true;
|
|
1093
1133
|
signer: true;
|
|
1094
1134
|
},
|
|
@@ -1131,16 +1171,8 @@ type CpAmm$1 = {
|
|
|
1131
1171
|
];
|
|
1132
1172
|
args: [
|
|
1133
1173
|
{
|
|
1134
|
-
name: "
|
|
1135
|
-
type: "
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
name: "configParameters";
|
|
1139
|
-
type: {
|
|
1140
|
-
defined: {
|
|
1141
|
-
name: "dynamicConfigParameters";
|
|
1142
|
-
};
|
|
1143
|
-
};
|
|
1174
|
+
name: "permission";
|
|
1175
|
+
type: "u128";
|
|
1144
1176
|
}
|
|
1145
1177
|
];
|
|
1146
1178
|
},
|
|
@@ -1295,7 +1327,15 @@ type CpAmm$1 = {
|
|
|
1295
1327
|
name: "tokenMint";
|
|
1296
1328
|
},
|
|
1297
1329
|
{
|
|
1298
|
-
name: "
|
|
1330
|
+
name: "operator";
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
name: "whitelistedAddress";
|
|
1334
|
+
signer: true;
|
|
1335
|
+
relations: ["operator"];
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: "payer";
|
|
1299
1339
|
writable: true;
|
|
1300
1340
|
signer: true;
|
|
1301
1341
|
},
|
|
@@ -1338,6 +1378,31 @@ type CpAmm$1 = {
|
|
|
1338
1378
|
];
|
|
1339
1379
|
args: [];
|
|
1340
1380
|
},
|
|
1381
|
+
{
|
|
1382
|
+
name: "dummyIx";
|
|
1383
|
+
discriminator: [234, 95, 176, 185, 7, 42, 35, 159];
|
|
1384
|
+
accounts: [
|
|
1385
|
+
{
|
|
1386
|
+
name: "podAlignedFeeTimeScheduler";
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
name: "podAlignedFeeRateLimiter";
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
name: "podAlignedFeeMarketCapScheduler";
|
|
1393
|
+
}
|
|
1394
|
+
];
|
|
1395
|
+
args: [
|
|
1396
|
+
{
|
|
1397
|
+
name: "ixs";
|
|
1398
|
+
type: {
|
|
1399
|
+
defined: {
|
|
1400
|
+
name: "dummyParams";
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
];
|
|
1405
|
+
},
|
|
1341
1406
|
{
|
|
1342
1407
|
name: "fundReward";
|
|
1343
1408
|
discriminator: [188, 50, 249, 165, 93, 151, 38, 63];
|
|
@@ -2545,8 +2610,12 @@ type CpAmm$1 = {
|
|
|
2545
2610
|
writable: true;
|
|
2546
2611
|
},
|
|
2547
2612
|
{
|
|
2548
|
-
name: "
|
|
2613
|
+
name: "operator";
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
name: "whitelistedAddress";
|
|
2549
2617
|
signer: true;
|
|
2618
|
+
relations: ["operator"];
|
|
2550
2619
|
},
|
|
2551
2620
|
{
|
|
2552
2621
|
name: "eventAuthority";
|
|
@@ -2958,6 +3027,66 @@ type CpAmm$1 = {
|
|
|
2958
3027
|
}
|
|
2959
3028
|
];
|
|
2960
3029
|
},
|
|
3030
|
+
{
|
|
3031
|
+
name: "updatePoolFees";
|
|
3032
|
+
discriminator: [118, 217, 203, 179, 60, 8, 70, 89];
|
|
3033
|
+
accounts: [
|
|
3034
|
+
{
|
|
3035
|
+
name: "pool";
|
|
3036
|
+
writable: true;
|
|
3037
|
+
},
|
|
3038
|
+
{
|
|
3039
|
+
name: "operator";
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
name: "whitelistedAddress";
|
|
3043
|
+
signer: true;
|
|
3044
|
+
relations: ["operator"];
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
name: "eventAuthority";
|
|
3048
|
+
pda: {
|
|
3049
|
+
seeds: [
|
|
3050
|
+
{
|
|
3051
|
+
kind: "const";
|
|
3052
|
+
value: [
|
|
3053
|
+
95,
|
|
3054
|
+
95,
|
|
3055
|
+
101,
|
|
3056
|
+
118,
|
|
3057
|
+
101,
|
|
3058
|
+
110,
|
|
3059
|
+
116,
|
|
3060
|
+
95,
|
|
3061
|
+
97,
|
|
3062
|
+
117,
|
|
3063
|
+
116,
|
|
3064
|
+
104,
|
|
3065
|
+
111,
|
|
3066
|
+
114,
|
|
3067
|
+
105,
|
|
3068
|
+
116,
|
|
3069
|
+
121
|
|
3070
|
+
];
|
|
3071
|
+
}
|
|
3072
|
+
];
|
|
3073
|
+
};
|
|
3074
|
+
},
|
|
3075
|
+
{
|
|
3076
|
+
name: "program";
|
|
3077
|
+
}
|
|
3078
|
+
];
|
|
3079
|
+
args: [
|
|
3080
|
+
{
|
|
3081
|
+
name: "params";
|
|
3082
|
+
type: {
|
|
3083
|
+
defined: {
|
|
3084
|
+
name: "updatePoolFeesParameters";
|
|
3085
|
+
};
|
|
3086
|
+
};
|
|
3087
|
+
}
|
|
3088
|
+
];
|
|
3089
|
+
},
|
|
2961
3090
|
{
|
|
2962
3091
|
name: "updateRewardDuration";
|
|
2963
3092
|
discriminator: [138, 174, 196, 169, 213, 235, 254, 107];
|
|
@@ -3142,14 +3271,26 @@ type CpAmm$1 = {
|
|
|
3142
3271
|
}
|
|
3143
3272
|
];
|
|
3144
3273
|
accounts: [
|
|
3145
|
-
{
|
|
3146
|
-
name: "claimFeeOperator";
|
|
3147
|
-
discriminator: [166, 48, 134, 86, 34, 200, 188, 150];
|
|
3148
|
-
},
|
|
3149
3274
|
{
|
|
3150
3275
|
name: "config";
|
|
3151
3276
|
discriminator: [155, 12, 170, 224, 30, 250, 204, 130];
|
|
3152
3277
|
},
|
|
3278
|
+
{
|
|
3279
|
+
name: "operator";
|
|
3280
|
+
discriminator: [219, 31, 188, 145, 69, 139, 204, 117];
|
|
3281
|
+
},
|
|
3282
|
+
{
|
|
3283
|
+
name: "podAlignedFeeMarketCapScheduler";
|
|
3284
|
+
discriminator: [251, 130, 208, 253, 245, 27, 145, 203];
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
name: "podAlignedFeeRateLimiter";
|
|
3288
|
+
discriminator: [160, 219, 8, 251, 179, 7, 16, 117];
|
|
3289
|
+
},
|
|
3290
|
+
{
|
|
3291
|
+
name: "podAlignedFeeTimeScheduler";
|
|
3292
|
+
discriminator: [239, 132, 138, 213, 67, 154, 130, 70];
|
|
3293
|
+
},
|
|
3153
3294
|
{
|
|
3154
3295
|
name: "pool";
|
|
3155
3296
|
discriminator: [241, 154, 109, 4, 17, 177, 109, 188];
|
|
@@ -3168,10 +3309,6 @@ type CpAmm$1 = {
|
|
|
3168
3309
|
}
|
|
3169
3310
|
];
|
|
3170
3311
|
events: [
|
|
3171
|
-
{
|
|
3172
|
-
name: "evtAddLiquidity";
|
|
3173
|
-
discriminator: [175, 242, 8, 157, 30, 247, 185, 169];
|
|
3174
|
-
},
|
|
3175
3312
|
{
|
|
3176
3313
|
name: "evtClaimPartnerFee";
|
|
3177
3314
|
discriminator: [118, 99, 77, 10, 226, 1, 1, 87];
|
|
@@ -3188,10 +3325,6 @@ type CpAmm$1 = {
|
|
|
3188
3325
|
name: "evtClaimReward";
|
|
3189
3326
|
discriminator: [218, 86, 147, 200, 235, 188, 215, 231];
|
|
3190
3327
|
},
|
|
3191
|
-
{
|
|
3192
|
-
name: "evtCloseClaimFeeOperator";
|
|
3193
|
-
discriminator: [111, 39, 37, 55, 110, 216, 194, 23];
|
|
3194
|
-
},
|
|
3195
3328
|
{
|
|
3196
3329
|
name: "evtCloseConfig";
|
|
3197
3330
|
discriminator: [36, 30, 239, 45, 58, 132, 14, 5];
|
|
@@ -3200,10 +3333,6 @@ type CpAmm$1 = {
|
|
|
3200
3333
|
name: "evtClosePosition";
|
|
3201
3334
|
discriminator: [20, 145, 144, 68, 143, 142, 214, 178];
|
|
3202
3335
|
},
|
|
3203
|
-
{
|
|
3204
|
-
name: "evtCreateClaimFeeOperator";
|
|
3205
|
-
discriminator: [21, 6, 153, 120, 68, 116, 28, 177];
|
|
3206
|
-
},
|
|
3207
3336
|
{
|
|
3208
3337
|
name: "evtCreateConfig";
|
|
3209
3338
|
discriminator: [131, 207, 180, 174, 180, 73, 165, 54];
|
|
@@ -3244,10 +3373,6 @@ type CpAmm$1 = {
|
|
|
3244
3373
|
name: "evtPermanentLockPosition";
|
|
3245
3374
|
discriminator: [145, 143, 162, 218, 218, 80, 67, 11];
|
|
3246
3375
|
},
|
|
3247
|
-
{
|
|
3248
|
-
name: "evtRemoveLiquidity";
|
|
3249
|
-
discriminator: [87, 46, 88, 98, 175, 96, 34, 91];
|
|
3250
|
-
},
|
|
3251
3376
|
{
|
|
3252
3377
|
name: "evtSetPoolStatus";
|
|
3253
3378
|
discriminator: [100, 213, 74, 3, 95, 91, 228, 146];
|
|
@@ -3256,14 +3381,14 @@ type CpAmm$1 = {
|
|
|
3256
3381
|
name: "evtSplitPosition2";
|
|
3257
3382
|
discriminator: [165, 32, 203, 174, 72, 100, 233, 103];
|
|
3258
3383
|
},
|
|
3259
|
-
{
|
|
3260
|
-
name: "evtSwap";
|
|
3261
|
-
discriminator: [27, 60, 21, 213, 138, 170, 187, 147];
|
|
3262
|
-
},
|
|
3263
3384
|
{
|
|
3264
3385
|
name: "evtSwap2";
|
|
3265
3386
|
discriminator: [189, 66, 51, 168, 38, 80, 117, 153];
|
|
3266
3387
|
},
|
|
3388
|
+
{
|
|
3389
|
+
name: "evtUpdatePoolFees";
|
|
3390
|
+
discriminator: [76, 165, 246, 102, 102, 217, 156, 44];
|
|
3391
|
+
},
|
|
3267
3392
|
{
|
|
3268
3393
|
name: "evtUpdateRewardDuration";
|
|
3269
3394
|
discriminator: [149, 135, 65, 231, 129, 153, 65, 57];
|
|
@@ -3530,7 +3655,7 @@ type CpAmm$1 = {
|
|
|
3530
3655
|
},
|
|
3531
3656
|
{
|
|
3532
3657
|
code: 6050;
|
|
3533
|
-
name: "
|
|
3658
|
+
name: "invalidFeeTimeScheduler";
|
|
3534
3659
|
msg: "Invalid fee scheduler";
|
|
3535
3660
|
},
|
|
3536
3661
|
{
|
|
@@ -3542,6 +3667,41 @@ type CpAmm$1 = {
|
|
|
3542
3667
|
code: 6052;
|
|
3543
3668
|
name: "invalidPoolVersion";
|
|
3544
3669
|
msg: "Invalid pool version";
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
code: 6053;
|
|
3673
|
+
name: "invalidAuthority";
|
|
3674
|
+
msg: "Invalid authority to do that action";
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
code: 6054;
|
|
3678
|
+
name: "invalidPermission";
|
|
3679
|
+
msg: "Invalid permission";
|
|
3680
|
+
},
|
|
3681
|
+
{
|
|
3682
|
+
code: 6055;
|
|
3683
|
+
name: "invalidFeeMarketCapScheduler";
|
|
3684
|
+
msg: "Invalid fee market cap scheduler";
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
code: 6056;
|
|
3688
|
+
name: "cannotUpdateBaseFee";
|
|
3689
|
+
msg: "Cannot update base fee";
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
code: 6057;
|
|
3693
|
+
name: "invalidDynamicFeeParameters";
|
|
3694
|
+
msg: "Invalid dynamic fee parameters";
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
code: 6058;
|
|
3698
|
+
name: "invalidUpdatePoolFeesParameters";
|
|
3699
|
+
msg: "Invalid update pool fees parameters";
|
|
3700
|
+
},
|
|
3701
|
+
{
|
|
3702
|
+
code: 6059;
|
|
3703
|
+
name: "missingOperatorAccount";
|
|
3704
|
+
msg: "Missing operator account";
|
|
3545
3705
|
}
|
|
3546
3706
|
];
|
|
3547
3707
|
types: [
|
|
@@ -3569,7 +3729,7 @@ type CpAmm$1 = {
|
|
|
3569
3729
|
};
|
|
3570
3730
|
},
|
|
3571
3731
|
{
|
|
3572
|
-
name: "
|
|
3732
|
+
name: "baseFeeInfo";
|
|
3573
3733
|
serialization: "bytemuck";
|
|
3574
3734
|
repr: {
|
|
3575
3735
|
kind: "c";
|
|
@@ -3578,32 +3738,10 @@ type CpAmm$1 = {
|
|
|
3578
3738
|
kind: "struct";
|
|
3579
3739
|
fields: [
|
|
3580
3740
|
{
|
|
3581
|
-
name: "
|
|
3582
|
-
type: "u64";
|
|
3583
|
-
},
|
|
3584
|
-
{
|
|
3585
|
-
name: "baseFeeMode";
|
|
3586
|
-
type: "u8";
|
|
3587
|
-
},
|
|
3588
|
-
{
|
|
3589
|
-
name: "padding";
|
|
3590
|
-
type: {
|
|
3591
|
-
array: ["u8", 5];
|
|
3592
|
-
};
|
|
3593
|
-
},
|
|
3594
|
-
{
|
|
3595
|
-
name: "firstFactor";
|
|
3596
|
-
type: "u16";
|
|
3597
|
-
},
|
|
3598
|
-
{
|
|
3599
|
-
name: "secondFactor";
|
|
3741
|
+
name: "data";
|
|
3600
3742
|
type: {
|
|
3601
|
-
array: ["u8",
|
|
3743
|
+
array: ["u8", 32];
|
|
3602
3744
|
};
|
|
3603
|
-
},
|
|
3604
|
-
{
|
|
3605
|
-
name: "thirdFactor";
|
|
3606
|
-
type: "u64";
|
|
3607
3745
|
}
|
|
3608
3746
|
];
|
|
3609
3747
|
};
|
|
@@ -3614,26 +3752,10 @@ type CpAmm$1 = {
|
|
|
3614
3752
|
kind: "struct";
|
|
3615
3753
|
fields: [
|
|
3616
3754
|
{
|
|
3617
|
-
name: "
|
|
3618
|
-
type: "u64";
|
|
3619
|
-
},
|
|
3620
|
-
{
|
|
3621
|
-
name: "firstFactor";
|
|
3622
|
-
type: "u16";
|
|
3623
|
-
},
|
|
3624
|
-
{
|
|
3625
|
-
name: "secondFactor";
|
|
3755
|
+
name: "data";
|
|
3626
3756
|
type: {
|
|
3627
|
-
array: ["u8",
|
|
3757
|
+
array: ["u8", 30];
|
|
3628
3758
|
};
|
|
3629
|
-
},
|
|
3630
|
-
{
|
|
3631
|
-
name: "thirdFactor";
|
|
3632
|
-
type: "u64";
|
|
3633
|
-
},
|
|
3634
|
-
{
|
|
3635
|
-
name: "baseFeeMode";
|
|
3636
|
-
type: "u8";
|
|
3637
3759
|
}
|
|
3638
3760
|
];
|
|
3639
3761
|
};
|
|
@@ -3648,60 +3770,138 @@ type CpAmm$1 = {
|
|
|
3648
3770
|
kind: "struct";
|
|
3649
3771
|
fields: [
|
|
3650
3772
|
{
|
|
3651
|
-
name: "
|
|
3652
|
-
type:
|
|
3773
|
+
name: "baseFeeInfo";
|
|
3774
|
+
type: {
|
|
3775
|
+
defined: {
|
|
3776
|
+
name: "baseFeeInfo";
|
|
3777
|
+
};
|
|
3778
|
+
};
|
|
3653
3779
|
},
|
|
3654
3780
|
{
|
|
3655
|
-
name: "
|
|
3781
|
+
name: "padding1";
|
|
3782
|
+
type: "u64";
|
|
3783
|
+
}
|
|
3784
|
+
];
|
|
3785
|
+
};
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
name: "borshFeeMarketCapScheduler";
|
|
3789
|
+
type: {
|
|
3790
|
+
kind: "struct";
|
|
3791
|
+
fields: [
|
|
3792
|
+
{
|
|
3793
|
+
name: "cliffFeeNumerator";
|
|
3794
|
+
type: "u64";
|
|
3795
|
+
},
|
|
3796
|
+
{
|
|
3797
|
+
name: "numberOfPeriod";
|
|
3798
|
+
type: "u16";
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
name: "sqrtPriceStepBps";
|
|
3802
|
+
type: "u32";
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
name: "schedulerExpirationDuration";
|
|
3806
|
+
type: "u32";
|
|
3807
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
name: "reductionFactor";
|
|
3810
|
+
type: "u64";
|
|
3811
|
+
},
|
|
3812
|
+
{
|
|
3813
|
+
name: "baseFeeMode";
|
|
3656
3814
|
type: "u8";
|
|
3657
3815
|
},
|
|
3658
3816
|
{
|
|
3659
|
-
name: "
|
|
3817
|
+
name: "padding";
|
|
3660
3818
|
type: {
|
|
3661
|
-
array: ["u8",
|
|
3819
|
+
array: ["u8", 3];
|
|
3662
3820
|
};
|
|
3821
|
+
}
|
|
3822
|
+
];
|
|
3823
|
+
};
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
name: "borshFeeRateLimiter";
|
|
3827
|
+
docs: [
|
|
3828
|
+
"we denote reference_amount = x0, cliff_fee_numerator = c, fee_increment = i",
|
|
3829
|
+
"if input_amount <= x0, then fee = input_amount * c",
|
|
3830
|
+
"",
|
|
3831
|
+
"if input_amount > x0, then input_amount = x0 + (a * x0 + b)",
|
|
3832
|
+
"if a < max_index",
|
|
3833
|
+
"then fee = x0 * c + x0 * (c + i) + .... + x0 * (c + i*a) + b * (c + i * (a+1))",
|
|
3834
|
+
"then fee = x0 * (c + c*a + i*a*(a+1)/2) + b * (c + i * (a+1))",
|
|
3835
|
+
"",
|
|
3836
|
+
"if a >= max_index",
|
|
3837
|
+
"if a = max_index + d, input_amount = x0 + max_index * x0 + (d * x0 + b)",
|
|
3838
|
+
"then fee = x0 * (c + c*max_index + i*max_index*(max_index+1)/2) + (d * x0 + b) * MAX_FEE"
|
|
3839
|
+
];
|
|
3840
|
+
type: {
|
|
3841
|
+
kind: "struct";
|
|
3842
|
+
fields: [
|
|
3843
|
+
{
|
|
3844
|
+
name: "cliffFeeNumerator";
|
|
3845
|
+
type: "u64";
|
|
3663
3846
|
},
|
|
3664
3847
|
{
|
|
3665
|
-
name: "
|
|
3848
|
+
name: "feeIncrementBps";
|
|
3666
3849
|
type: "u16";
|
|
3667
3850
|
},
|
|
3668
3851
|
{
|
|
3669
|
-
name: "
|
|
3670
|
-
type:
|
|
3671
|
-
array: ["u8", 8];
|
|
3672
|
-
};
|
|
3852
|
+
name: "maxLimiterDuration";
|
|
3853
|
+
type: "u32";
|
|
3673
3854
|
},
|
|
3674
3855
|
{
|
|
3675
|
-
name: "
|
|
3676
|
-
type: "
|
|
3856
|
+
name: "maxFeeBps";
|
|
3857
|
+
type: "u32";
|
|
3677
3858
|
},
|
|
3678
3859
|
{
|
|
3679
|
-
name: "
|
|
3860
|
+
name: "referenceAmount";
|
|
3680
3861
|
type: "u64";
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
name: "baseFeeMode";
|
|
3865
|
+
type: "u8";
|
|
3866
|
+
},
|
|
3867
|
+
{
|
|
3868
|
+
name: "padding";
|
|
3869
|
+
type: {
|
|
3870
|
+
array: ["u8", 3];
|
|
3871
|
+
};
|
|
3681
3872
|
}
|
|
3682
3873
|
];
|
|
3683
3874
|
};
|
|
3684
3875
|
},
|
|
3685
3876
|
{
|
|
3686
|
-
name: "
|
|
3687
|
-
docs: ["Parameter that set by the protocol"];
|
|
3688
|
-
serialization: "bytemuck";
|
|
3689
|
-
repr: {
|
|
3690
|
-
kind: "c";
|
|
3691
|
-
};
|
|
3877
|
+
name: "borshFeeTimeScheduler";
|
|
3692
3878
|
type: {
|
|
3693
3879
|
kind: "struct";
|
|
3694
3880
|
fields: [
|
|
3695
3881
|
{
|
|
3696
|
-
name: "
|
|
3697
|
-
|
|
3698
|
-
|
|
3882
|
+
name: "cliffFeeNumerator";
|
|
3883
|
+
type: "u64";
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
name: "numberOfPeriod";
|
|
3887
|
+
type: "u16";
|
|
3888
|
+
},
|
|
3889
|
+
{
|
|
3890
|
+
name: "periodFrequency";
|
|
3891
|
+
type: "u64";
|
|
3892
|
+
},
|
|
3893
|
+
{
|
|
3894
|
+
name: "reductionFactor";
|
|
3895
|
+
type: "u64";
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
name: "baseFeeMode";
|
|
3899
|
+
type: "u8";
|
|
3699
3900
|
},
|
|
3700
3901
|
{
|
|
3701
3902
|
name: "padding";
|
|
3702
|
-
docs: ["Reserve"];
|
|
3703
3903
|
type: {
|
|
3704
|
-
array: ["u8",
|
|
3904
|
+
array: ["u8", 3];
|
|
3705
3905
|
};
|
|
3706
3906
|
}
|
|
3707
3907
|
];
|
|
@@ -3784,6 +3984,38 @@ type CpAmm$1 = {
|
|
|
3784
3984
|
];
|
|
3785
3985
|
};
|
|
3786
3986
|
},
|
|
3987
|
+
{
|
|
3988
|
+
name: "dummyParams";
|
|
3989
|
+
type: {
|
|
3990
|
+
kind: "struct";
|
|
3991
|
+
fields: [
|
|
3992
|
+
{
|
|
3993
|
+
name: "borshFeeTimeSchedulerParams";
|
|
3994
|
+
type: {
|
|
3995
|
+
defined: {
|
|
3996
|
+
name: "borshFeeTimeScheduler";
|
|
3997
|
+
};
|
|
3998
|
+
};
|
|
3999
|
+
},
|
|
4000
|
+
{
|
|
4001
|
+
name: "borshFeeRateLimiterParams";
|
|
4002
|
+
type: {
|
|
4003
|
+
defined: {
|
|
4004
|
+
name: "borshFeeRateLimiter";
|
|
4005
|
+
};
|
|
4006
|
+
};
|
|
4007
|
+
},
|
|
4008
|
+
{
|
|
4009
|
+
name: "borshFeeMarketCapSchedulerParams";
|
|
4010
|
+
type: {
|
|
4011
|
+
defined: {
|
|
4012
|
+
name: "borshFeeMarketCapScheduler";
|
|
4013
|
+
};
|
|
4014
|
+
};
|
|
4015
|
+
}
|
|
4016
|
+
];
|
|
4017
|
+
};
|
|
4018
|
+
},
|
|
3787
4019
|
{
|
|
3788
4020
|
name: "dynamicConfigParameters";
|
|
3789
4021
|
type: {
|
|
@@ -3954,50 +4186,6 @@ type CpAmm$1 = {
|
|
|
3954
4186
|
];
|
|
3955
4187
|
};
|
|
3956
4188
|
},
|
|
3957
|
-
{
|
|
3958
|
-
name: "evtAddLiquidity";
|
|
3959
|
-
type: {
|
|
3960
|
-
kind: "struct";
|
|
3961
|
-
fields: [
|
|
3962
|
-
{
|
|
3963
|
-
name: "pool";
|
|
3964
|
-
type: "pubkey";
|
|
3965
|
-
},
|
|
3966
|
-
{
|
|
3967
|
-
name: "position";
|
|
3968
|
-
type: "pubkey";
|
|
3969
|
-
},
|
|
3970
|
-
{
|
|
3971
|
-
name: "owner";
|
|
3972
|
-
type: "pubkey";
|
|
3973
|
-
},
|
|
3974
|
-
{
|
|
3975
|
-
name: "params";
|
|
3976
|
-
type: {
|
|
3977
|
-
defined: {
|
|
3978
|
-
name: "addLiquidityParameters";
|
|
3979
|
-
};
|
|
3980
|
-
};
|
|
3981
|
-
},
|
|
3982
|
-
{
|
|
3983
|
-
name: "tokenAAmount";
|
|
3984
|
-
type: "u64";
|
|
3985
|
-
},
|
|
3986
|
-
{
|
|
3987
|
-
name: "tokenBAmount";
|
|
3988
|
-
type: "u64";
|
|
3989
|
-
},
|
|
3990
|
-
{
|
|
3991
|
-
name: "totalAmountA";
|
|
3992
|
-
type: "u64";
|
|
3993
|
-
},
|
|
3994
|
-
{
|
|
3995
|
-
name: "totalAmountB";
|
|
3996
|
-
type: "u64";
|
|
3997
|
-
}
|
|
3998
|
-
];
|
|
3999
|
-
};
|
|
4000
|
-
},
|
|
4001
4189
|
{
|
|
4002
4190
|
name: "evtClaimPartnerFee";
|
|
4003
4191
|
type: {
|
|
@@ -4098,23 +4286,6 @@ type CpAmm$1 = {
|
|
|
4098
4286
|
];
|
|
4099
4287
|
};
|
|
4100
4288
|
},
|
|
4101
|
-
{
|
|
4102
|
-
name: "evtCloseClaimFeeOperator";
|
|
4103
|
-
docs: ["Close claim fee operator"];
|
|
4104
|
-
type: {
|
|
4105
|
-
kind: "struct";
|
|
4106
|
-
fields: [
|
|
4107
|
-
{
|
|
4108
|
-
name: "claimFeeOperator";
|
|
4109
|
-
type: "pubkey";
|
|
4110
|
-
},
|
|
4111
|
-
{
|
|
4112
|
-
name: "operator";
|
|
4113
|
-
type: "pubkey";
|
|
4114
|
-
}
|
|
4115
|
-
];
|
|
4116
|
-
};
|
|
4117
|
-
},
|
|
4118
4289
|
{
|
|
4119
4290
|
name: "evtCloseConfig";
|
|
4120
4291
|
docs: ["Close config"];
|
|
@@ -4158,19 +4329,6 @@ type CpAmm$1 = {
|
|
|
4158
4329
|
];
|
|
4159
4330
|
};
|
|
4160
4331
|
},
|
|
4161
|
-
{
|
|
4162
|
-
name: "evtCreateClaimFeeOperator";
|
|
4163
|
-
docs: ["Create claim fee operator"];
|
|
4164
|
-
type: {
|
|
4165
|
-
kind: "struct";
|
|
4166
|
-
fields: [
|
|
4167
|
-
{
|
|
4168
|
-
name: "operator";
|
|
4169
|
-
type: "pubkey";
|
|
4170
|
-
}
|
|
4171
|
-
];
|
|
4172
|
-
};
|
|
4173
|
-
},
|
|
4174
4332
|
{
|
|
4175
4333
|
name: "evtCreateConfig";
|
|
4176
4334
|
docs: ["Create static config"];
|
|
@@ -4578,42 +4736,6 @@ type CpAmm$1 = {
|
|
|
4578
4736
|
];
|
|
4579
4737
|
};
|
|
4580
4738
|
},
|
|
4581
|
-
{
|
|
4582
|
-
name: "evtRemoveLiquidity";
|
|
4583
|
-
type: {
|
|
4584
|
-
kind: "struct";
|
|
4585
|
-
fields: [
|
|
4586
|
-
{
|
|
4587
|
-
name: "pool";
|
|
4588
|
-
type: "pubkey";
|
|
4589
|
-
},
|
|
4590
|
-
{
|
|
4591
|
-
name: "position";
|
|
4592
|
-
type: "pubkey";
|
|
4593
|
-
},
|
|
4594
|
-
{
|
|
4595
|
-
name: "owner";
|
|
4596
|
-
type: "pubkey";
|
|
4597
|
-
},
|
|
4598
|
-
{
|
|
4599
|
-
name: "params";
|
|
4600
|
-
type: {
|
|
4601
|
-
defined: {
|
|
4602
|
-
name: "removeLiquidityParameters";
|
|
4603
|
-
};
|
|
4604
|
-
};
|
|
4605
|
-
},
|
|
4606
|
-
{
|
|
4607
|
-
name: "tokenAAmount";
|
|
4608
|
-
type: "u64";
|
|
4609
|
-
},
|
|
4610
|
-
{
|
|
4611
|
-
name: "tokenBAmount";
|
|
4612
|
-
type: "u64";
|
|
4613
|
-
}
|
|
4614
|
-
];
|
|
4615
|
-
};
|
|
4616
|
-
},
|
|
4617
4739
|
{
|
|
4618
4740
|
name: "evtSetPoolStatus";
|
|
4619
4741
|
type: {
|
|
@@ -4695,7 +4817,7 @@ type CpAmm$1 = {
|
|
|
4695
4817
|
};
|
|
4696
4818
|
},
|
|
4697
4819
|
{
|
|
4698
|
-
name: "
|
|
4820
|
+
name: "evtSwap2";
|
|
4699
4821
|
type: {
|
|
4700
4822
|
kind: "struct";
|
|
4701
4823
|
fields: [
|
|
@@ -4707,6 +4829,10 @@ type CpAmm$1 = {
|
|
|
4707
4829
|
name: "tradeDirection";
|
|
4708
4830
|
type: "u8";
|
|
4709
4831
|
},
|
|
4832
|
+
{
|
|
4833
|
+
name: "collectFeeMode";
|
|
4834
|
+
type: "u8";
|
|
4835
|
+
},
|
|
4710
4836
|
{
|
|
4711
4837
|
name: "hasReferral";
|
|
4712
4838
|
type: "bool";
|
|
@@ -4715,7 +4841,7 @@ type CpAmm$1 = {
|
|
|
4715
4841
|
name: "params";
|
|
4716
4842
|
type: {
|
|
4717
4843
|
defined: {
|
|
4718
|
-
name: "
|
|
4844
|
+
name: "swapParameters2";
|
|
4719
4845
|
};
|
|
4720
4846
|
};
|
|
4721
4847
|
},
|
|
@@ -4723,23 +4849,39 @@ type CpAmm$1 = {
|
|
|
4723
4849
|
name: "swapResult";
|
|
4724
4850
|
type: {
|
|
4725
4851
|
defined: {
|
|
4726
|
-
name: "
|
|
4852
|
+
name: "swapResult2";
|
|
4727
4853
|
};
|
|
4728
4854
|
};
|
|
4729
4855
|
},
|
|
4730
4856
|
{
|
|
4731
|
-
name: "
|
|
4857
|
+
name: "includedTransferFeeAmountIn";
|
|
4858
|
+
type: "u64";
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
name: "includedTransferFeeAmountOut";
|
|
4862
|
+
type: "u64";
|
|
4863
|
+
},
|
|
4864
|
+
{
|
|
4865
|
+
name: "excludedTransferFeeAmountOut";
|
|
4732
4866
|
type: "u64";
|
|
4733
4867
|
},
|
|
4734
4868
|
{
|
|
4735
4869
|
name: "currentTimestamp";
|
|
4736
4870
|
type: "u64";
|
|
4871
|
+
},
|
|
4872
|
+
{
|
|
4873
|
+
name: "reserveAAmount";
|
|
4874
|
+
type: "u64";
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
name: "reserveBAmount";
|
|
4878
|
+
type: "u64";
|
|
4737
4879
|
}
|
|
4738
4880
|
];
|
|
4739
4881
|
};
|
|
4740
4882
|
},
|
|
4741
4883
|
{
|
|
4742
|
-
name: "
|
|
4884
|
+
name: "evtUpdatePoolFees";
|
|
4743
4885
|
type: {
|
|
4744
4886
|
kind: "struct";
|
|
4745
4887
|
fields: [
|
|
@@ -4748,56 +4890,16 @@ type CpAmm$1 = {
|
|
|
4748
4890
|
type: "pubkey";
|
|
4749
4891
|
},
|
|
4750
4892
|
{
|
|
4751
|
-
name: "
|
|
4752
|
-
type: "
|
|
4753
|
-
},
|
|
4754
|
-
{
|
|
4755
|
-
name: "collectFeeMode";
|
|
4756
|
-
type: "u8";
|
|
4757
|
-
},
|
|
4758
|
-
{
|
|
4759
|
-
name: "hasReferral";
|
|
4760
|
-
type: "bool";
|
|
4893
|
+
name: "operator";
|
|
4894
|
+
type: "pubkey";
|
|
4761
4895
|
},
|
|
4762
4896
|
{
|
|
4763
4897
|
name: "params";
|
|
4764
4898
|
type: {
|
|
4765
4899
|
defined: {
|
|
4766
|
-
name: "
|
|
4900
|
+
name: "updatePoolFeesParameters";
|
|
4767
4901
|
};
|
|
4768
4902
|
};
|
|
4769
|
-
},
|
|
4770
|
-
{
|
|
4771
|
-
name: "swapResult";
|
|
4772
|
-
type: {
|
|
4773
|
-
defined: {
|
|
4774
|
-
name: "swapResult2";
|
|
4775
|
-
};
|
|
4776
|
-
};
|
|
4777
|
-
},
|
|
4778
|
-
{
|
|
4779
|
-
name: "includedTransferFeeAmountIn";
|
|
4780
|
-
type: "u64";
|
|
4781
|
-
},
|
|
4782
|
-
{
|
|
4783
|
-
name: "includedTransferFeeAmountOut";
|
|
4784
|
-
type: "u64";
|
|
4785
|
-
},
|
|
4786
|
-
{
|
|
4787
|
-
name: "excludedTransferFeeAmountOut";
|
|
4788
|
-
type: "u64";
|
|
4789
|
-
},
|
|
4790
|
-
{
|
|
4791
|
-
name: "currentTimestamp";
|
|
4792
|
-
type: "u64";
|
|
4793
|
-
},
|
|
4794
|
-
{
|
|
4795
|
-
name: "reserveAAmount";
|
|
4796
|
-
type: "u64";
|
|
4797
|
-
},
|
|
4798
|
-
{
|
|
4799
|
-
name: "reserveBAmount";
|
|
4800
|
-
type: "u64";
|
|
4801
4903
|
}
|
|
4802
4904
|
];
|
|
4803
4905
|
};
|
|
@@ -4907,7 +5009,7 @@ type CpAmm$1 = {
|
|
|
4907
5009
|
{
|
|
4908
5010
|
name: "sqrtPrice";
|
|
4909
5011
|
docs: [
|
|
4910
|
-
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"
|
|
5012
|
+
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value. Market cap fee scheduler minimum price will be derived from this value"
|
|
4911
5013
|
];
|
|
4912
5014
|
type: "u128";
|
|
4913
5015
|
},
|
|
@@ -4958,6 +5060,154 @@ type CpAmm$1 = {
|
|
|
4958
5060
|
];
|
|
4959
5061
|
};
|
|
4960
5062
|
},
|
|
5063
|
+
{
|
|
5064
|
+
name: "operator";
|
|
5065
|
+
serialization: "bytemuck";
|
|
5066
|
+
repr: {
|
|
5067
|
+
kind: "c";
|
|
5068
|
+
};
|
|
5069
|
+
type: {
|
|
5070
|
+
kind: "struct";
|
|
5071
|
+
fields: [
|
|
5072
|
+
{
|
|
5073
|
+
name: "whitelistedAddress";
|
|
5074
|
+
type: "pubkey";
|
|
5075
|
+
},
|
|
5076
|
+
{
|
|
5077
|
+
name: "permission";
|
|
5078
|
+
type: "u128";
|
|
5079
|
+
},
|
|
5080
|
+
{
|
|
5081
|
+
name: "padding";
|
|
5082
|
+
type: {
|
|
5083
|
+
array: ["u64", 2];
|
|
5084
|
+
};
|
|
5085
|
+
}
|
|
5086
|
+
];
|
|
5087
|
+
};
|
|
5088
|
+
},
|
|
5089
|
+
{
|
|
5090
|
+
name: "podAlignedFeeMarketCapScheduler";
|
|
5091
|
+
serialization: "bytemuck";
|
|
5092
|
+
repr: {
|
|
5093
|
+
kind: "c";
|
|
5094
|
+
};
|
|
5095
|
+
type: {
|
|
5096
|
+
kind: "struct";
|
|
5097
|
+
fields: [
|
|
5098
|
+
{
|
|
5099
|
+
name: "cliffFeeNumerator";
|
|
5100
|
+
type: "u64";
|
|
5101
|
+
},
|
|
5102
|
+
{
|
|
5103
|
+
name: "baseFeeMode";
|
|
5104
|
+
type: "u8";
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
name: "padding";
|
|
5108
|
+
type: {
|
|
5109
|
+
array: ["u8", 5];
|
|
5110
|
+
};
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
name: "numberOfPeriod";
|
|
5114
|
+
type: "u16";
|
|
5115
|
+
},
|
|
5116
|
+
{
|
|
5117
|
+
name: "sqrtPriceStepBps";
|
|
5118
|
+
type: "u32";
|
|
5119
|
+
},
|
|
5120
|
+
{
|
|
5121
|
+
name: "schedulerExpirationDuration";
|
|
5122
|
+
type: "u32";
|
|
5123
|
+
},
|
|
5124
|
+
{
|
|
5125
|
+
name: "reductionFactor";
|
|
5126
|
+
type: "u64";
|
|
5127
|
+
}
|
|
5128
|
+
];
|
|
5129
|
+
};
|
|
5130
|
+
},
|
|
5131
|
+
{
|
|
5132
|
+
name: "podAlignedFeeRateLimiter";
|
|
5133
|
+
serialization: "bytemuck";
|
|
5134
|
+
repr: {
|
|
5135
|
+
kind: "c";
|
|
5136
|
+
};
|
|
5137
|
+
type: {
|
|
5138
|
+
kind: "struct";
|
|
5139
|
+
fields: [
|
|
5140
|
+
{
|
|
5141
|
+
name: "cliffFeeNumerator";
|
|
5142
|
+
type: "u64";
|
|
5143
|
+
},
|
|
5144
|
+
{
|
|
5145
|
+
name: "baseFeeMode";
|
|
5146
|
+
type: "u8";
|
|
5147
|
+
},
|
|
5148
|
+
{
|
|
5149
|
+
name: "padding";
|
|
5150
|
+
type: {
|
|
5151
|
+
array: ["u8", 5];
|
|
5152
|
+
};
|
|
5153
|
+
},
|
|
5154
|
+
{
|
|
5155
|
+
name: "feeIncrementBps";
|
|
5156
|
+
type: "u16";
|
|
5157
|
+
},
|
|
5158
|
+
{
|
|
5159
|
+
name: "maxLimiterDuration";
|
|
5160
|
+
type: "u32";
|
|
5161
|
+
},
|
|
5162
|
+
{
|
|
5163
|
+
name: "maxFeeBps";
|
|
5164
|
+
type: "u32";
|
|
5165
|
+
},
|
|
5166
|
+
{
|
|
5167
|
+
name: "referenceAmount";
|
|
5168
|
+
type: "u64";
|
|
5169
|
+
}
|
|
5170
|
+
];
|
|
5171
|
+
};
|
|
5172
|
+
},
|
|
5173
|
+
{
|
|
5174
|
+
name: "podAlignedFeeTimeScheduler";
|
|
5175
|
+
serialization: "bytemuck";
|
|
5176
|
+
repr: {
|
|
5177
|
+
kind: "c";
|
|
5178
|
+
};
|
|
5179
|
+
type: {
|
|
5180
|
+
kind: "struct";
|
|
5181
|
+
fields: [
|
|
5182
|
+
{
|
|
5183
|
+
name: "cliffFeeNumerator";
|
|
5184
|
+
type: "u64";
|
|
5185
|
+
},
|
|
5186
|
+
{
|
|
5187
|
+
name: "baseFeeMode";
|
|
5188
|
+
type: "u8";
|
|
5189
|
+
},
|
|
5190
|
+
{
|
|
5191
|
+
name: "padding";
|
|
5192
|
+
type: {
|
|
5193
|
+
array: ["u8", 5];
|
|
5194
|
+
};
|
|
5195
|
+
},
|
|
5196
|
+
{
|
|
5197
|
+
name: "numberOfPeriod";
|
|
5198
|
+
type: "u16";
|
|
5199
|
+
},
|
|
5200
|
+
{
|
|
5201
|
+
name: "periodFrequency";
|
|
5202
|
+
type: "u64";
|
|
5203
|
+
},
|
|
5204
|
+
{
|
|
5205
|
+
name: "reductionFactor";
|
|
5206
|
+
type: "u64";
|
|
5207
|
+
}
|
|
5208
|
+
];
|
|
5209
|
+
};
|
|
5210
|
+
},
|
|
4961
5211
|
{
|
|
4962
5212
|
name: "pool";
|
|
4963
5213
|
serialization: "bytemuck";
|
|
@@ -5083,7 +5333,7 @@ type CpAmm$1 = {
|
|
|
5083
5333
|
{
|
|
5084
5334
|
name: "collectFeeMode";
|
|
5085
5335
|
docs: [
|
|
5086
|
-
"0 is collect fee in both token, 1 only collect fee
|
|
5336
|
+
"0 is collect fee in both token, 1 only collect fee only in token b"
|
|
5087
5337
|
];
|
|
5088
5338
|
type: "u8";
|
|
5089
5339
|
},
|
|
@@ -5175,13 +5425,6 @@ type CpAmm$1 = {
|
|
|
5175
5425
|
};
|
|
5176
5426
|
};
|
|
5177
5427
|
},
|
|
5178
|
-
{
|
|
5179
|
-
name: "padding";
|
|
5180
|
-
docs: ["padding"];
|
|
5181
|
-
type: {
|
|
5182
|
-
array: ["u8", 3];
|
|
5183
|
-
};
|
|
5184
|
-
},
|
|
5185
5428
|
{
|
|
5186
5429
|
name: "dynamicFee";
|
|
5187
5430
|
docs: ["dynamic fee"];
|
|
@@ -5209,7 +5452,7 @@ type CpAmm$1 = {
|
|
|
5209
5452
|
name: "baseFee";
|
|
5210
5453
|
type: {
|
|
5211
5454
|
defined: {
|
|
5212
|
-
name: "
|
|
5455
|
+
name: "baseFeeInfo";
|
|
5213
5456
|
};
|
|
5214
5457
|
};
|
|
5215
5458
|
},
|
|
@@ -5314,11 +5557,8 @@ type CpAmm$1 = {
|
|
|
5314
5557
|
};
|
|
5315
5558
|
},
|
|
5316
5559
|
{
|
|
5317
|
-
name: "
|
|
5318
|
-
|
|
5319
|
-
type: {
|
|
5320
|
-
array: ["u64", 2];
|
|
5321
|
-
};
|
|
5560
|
+
name: "initSqrtPrice";
|
|
5561
|
+
type: "u128";
|
|
5322
5562
|
}
|
|
5323
5563
|
];
|
|
5324
5564
|
};
|
|
@@ -5819,39 +6059,6 @@ type CpAmm$1 = {
|
|
|
5819
6059
|
];
|
|
5820
6060
|
};
|
|
5821
6061
|
},
|
|
5822
|
-
{
|
|
5823
|
-
name: "swapResult";
|
|
5824
|
-
docs: ["Encodes all results of swapping"];
|
|
5825
|
-
type: {
|
|
5826
|
-
kind: "struct";
|
|
5827
|
-
fields: [
|
|
5828
|
-
{
|
|
5829
|
-
name: "outputAmount";
|
|
5830
|
-
type: "u64";
|
|
5831
|
-
},
|
|
5832
|
-
{
|
|
5833
|
-
name: "nextSqrtPrice";
|
|
5834
|
-
type: "u128";
|
|
5835
|
-
},
|
|
5836
|
-
{
|
|
5837
|
-
name: "lpFee";
|
|
5838
|
-
type: "u64";
|
|
5839
|
-
},
|
|
5840
|
-
{
|
|
5841
|
-
name: "protocolFee";
|
|
5842
|
-
type: "u64";
|
|
5843
|
-
},
|
|
5844
|
-
{
|
|
5845
|
-
name: "partnerFee";
|
|
5846
|
-
type: "u64";
|
|
5847
|
-
},
|
|
5848
|
-
{
|
|
5849
|
-
name: "referralFee";
|
|
5850
|
-
type: "u64";
|
|
5851
|
-
}
|
|
5852
|
-
];
|
|
5853
|
-
};
|
|
5854
|
-
},
|
|
5855
6062
|
{
|
|
5856
6063
|
name: "swapResult2";
|
|
5857
6064
|
type: {
|
|
@@ -5921,6 +6128,41 @@ type CpAmm$1 = {
|
|
|
5921
6128
|
];
|
|
5922
6129
|
};
|
|
5923
6130
|
},
|
|
6131
|
+
{
|
|
6132
|
+
name: "updatePoolFeesParameters";
|
|
6133
|
+
type: {
|
|
6134
|
+
kind: "struct";
|
|
6135
|
+
fields: [
|
|
6136
|
+
{
|
|
6137
|
+
name: "cliffFeeNumerator";
|
|
6138
|
+
docs: [
|
|
6139
|
+
"Base fee update mode:",
|
|
6140
|
+
"- None: skip base fee update",
|
|
6141
|
+
"- Some: update new cliff_fee_numerator if base fee is static"
|
|
6142
|
+
];
|
|
6143
|
+
type: {
|
|
6144
|
+
option: "u64";
|
|
6145
|
+
};
|
|
6146
|
+
},
|
|
6147
|
+
{
|
|
6148
|
+
name: "dynamicFee";
|
|
6149
|
+
docs: [
|
|
6150
|
+
"Dynamic fee update mode:",
|
|
6151
|
+
"- None: skip dynamic fee update",
|
|
6152
|
+
"- Some(with default value): disable dynamic fee",
|
|
6153
|
+
"- Some(with non default value): enable dynamic fee if disabled or update dynamic fee if enabled"
|
|
6154
|
+
];
|
|
6155
|
+
type: {
|
|
6156
|
+
option: {
|
|
6157
|
+
defined: {
|
|
6158
|
+
name: "dynamicFeeParameters";
|
|
6159
|
+
};
|
|
6160
|
+
};
|
|
6161
|
+
};
|
|
6162
|
+
}
|
|
6163
|
+
];
|
|
6164
|
+
};
|
|
6165
|
+
},
|
|
5924
6166
|
{
|
|
5925
6167
|
name: "userRewardInfo";
|
|
5926
6168
|
serialization: "bytemuck";
|
|
@@ -6033,26 +6275,105 @@ type CpAmm$1 = {
|
|
|
6033
6275
|
};
|
|
6034
6276
|
}
|
|
6035
6277
|
];
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
type
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6278
|
+
constants: [
|
|
6279
|
+
{
|
|
6280
|
+
name: "binStepBpsDefault";
|
|
6281
|
+
type: "u16";
|
|
6282
|
+
value: "1";
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
name: "binStepU128DefaultLeBytes";
|
|
6286
|
+
type: {
|
|
6287
|
+
array: ["u8", 16];
|
|
6288
|
+
};
|
|
6289
|
+
value: "[203, 16, 199, 186, 184, 141, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0]";
|
|
6290
|
+
},
|
|
6291
|
+
{
|
|
6292
|
+
name: "customizablePoolPrefix";
|
|
6293
|
+
type: "bytes";
|
|
6294
|
+
value: "[99, 112, 111, 111, 108]";
|
|
6295
|
+
},
|
|
6296
|
+
{
|
|
6297
|
+
name: "feeDenominator";
|
|
6298
|
+
docs: [
|
|
6299
|
+
"Default fee denominator. DO NOT simply update it as it will break logic that depends on it as default value."
|
|
6300
|
+
];
|
|
6301
|
+
type: "u64";
|
|
6302
|
+
value: "1000000000";
|
|
6303
|
+
},
|
|
6304
|
+
{
|
|
6305
|
+
name: "maxBasisPoint";
|
|
6306
|
+
docs: ["Max basis point. 100% in pct"];
|
|
6307
|
+
type: "u64";
|
|
6308
|
+
value: "10000";
|
|
6309
|
+
},
|
|
6310
|
+
{
|
|
6311
|
+
name: "maxSqrtPriceLeBytes";
|
|
6312
|
+
type: {
|
|
6313
|
+
array: ["u8", 16];
|
|
6314
|
+
};
|
|
6315
|
+
value: "[155, 87, 105, 78, 169, 26, 92, 132, 177, 196, 254, 255, 0, 0, 0, 0]";
|
|
6316
|
+
},
|
|
6317
|
+
{
|
|
6318
|
+
name: "minSqrtPriceLeBytes";
|
|
6319
|
+
type: {
|
|
6320
|
+
array: ["u8", 16];
|
|
6321
|
+
};
|
|
6322
|
+
value: "[80, 59, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]";
|
|
6323
|
+
},
|
|
6324
|
+
{
|
|
6325
|
+
name: "poolAuthorityPrefix";
|
|
6326
|
+
type: "bytes";
|
|
6327
|
+
value: "[112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]";
|
|
6328
|
+
},
|
|
6329
|
+
{
|
|
6330
|
+
name: "poolPrefix";
|
|
6331
|
+
type: "bytes";
|
|
6332
|
+
value: "[112, 111, 111, 108]";
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
name: "positionNftAccountPrefix";
|
|
6336
|
+
type: "bytes";
|
|
6337
|
+
value: "[112, 111, 115, 105, 116, 105, 111, 110, 95, 110, 102, 116, 95, 97, 99, 99, 111, 117, 110, 116]";
|
|
6338
|
+
},
|
|
6339
|
+
{
|
|
6340
|
+
name: "positionPrefix";
|
|
6341
|
+
type: "bytes";
|
|
6342
|
+
value: "[112, 111, 115, 105, 116, 105, 111, 110]";
|
|
6343
|
+
},
|
|
6344
|
+
{
|
|
6345
|
+
name: "splitPositionDenominator";
|
|
6346
|
+
type: "u32";
|
|
6347
|
+
value: "1000000000";
|
|
6348
|
+
},
|
|
6349
|
+
{
|
|
6350
|
+
name: "tokenVaultPrefix";
|
|
6351
|
+
type: "bytes";
|
|
6352
|
+
value: "[116, 111, 107, 101, 110, 95, 118, 97, 117, 108, 116]";
|
|
6353
|
+
}
|
|
6354
|
+
];
|
|
6355
|
+
};
|
|
6356
|
+
|
|
6357
|
+
type AmmProgram = Program<CpAmm$1>;
|
|
6358
|
+
type TxBuilder = Promise<Transaction>;
|
|
6359
|
+
declare enum Rounding {
|
|
6360
|
+
Up = 0,
|
|
6361
|
+
Down = 1
|
|
6362
|
+
}
|
|
6363
|
+
declare enum ActivationPoint {
|
|
6364
|
+
Timestamp = 0,
|
|
6365
|
+
Slot = 1
|
|
6366
|
+
}
|
|
6367
|
+
declare enum BaseFeeMode {
|
|
6368
|
+
FeeTimeSchedulerLinear = 0,
|
|
6369
|
+
FeeTimeSchedulerExponential = 1,
|
|
6370
|
+
RateLimiter = 2,
|
|
6371
|
+
FeeMarketCapSchedulerLinear = 3,
|
|
6372
|
+
FeeMarketCapSchedulerExponential = 4
|
|
6373
|
+
}
|
|
6374
|
+
declare enum CollectFeeMode {
|
|
6375
|
+
BothToken = 0,
|
|
6376
|
+
OnlyB = 1
|
|
6056
6377
|
}
|
|
6057
6378
|
declare enum TradeDirection {
|
|
6058
6379
|
AtoB = 0,
|
|
@@ -6085,6 +6406,12 @@ type PositionState = IdlAccounts<CpAmm$1>["position"];
|
|
|
6085
6406
|
type VestingState = IdlAccounts<CpAmm$1>["vesting"];
|
|
6086
6407
|
type ConfigState = IdlAccounts<CpAmm$1>["config"];
|
|
6087
6408
|
type TokenBadgeState = IdlAccounts<CpAmm$1>["tokenBadge"];
|
|
6409
|
+
type BorshFeeTimeScheduler = IdlTypes<CpAmm$1>["borshFeeTimeScheduler"];
|
|
6410
|
+
type BorshFeeMarketCapScheduler = IdlTypes<CpAmm$1>["borshFeeMarketCapScheduler"];
|
|
6411
|
+
type BorshFeeRateLimiter = IdlTypes<CpAmm$1>["borshFeeRateLimiter"];
|
|
6412
|
+
type PodAlignedFeeTimeScheduler = IdlTypes<CpAmm$1>["podAlignedFeeTimeScheduler"];
|
|
6413
|
+
type PodAlignedFeeMarketCapScheduler = IdlTypes<CpAmm$1>["podAlignedFeeMarketCapScheduler"];
|
|
6414
|
+
type PodAlignedFeeRateLimiter = IdlTypes<CpAmm$1>["podAlignedFeeRateLimiter"];
|
|
6088
6415
|
type RewardInfo = IdlTypes<CpAmm$1>["rewardInfo"];
|
|
6089
6416
|
type UserRewardInfo = IdlTypes<CpAmm$1>["userRewardInfo"];
|
|
6090
6417
|
/**
|
|
@@ -6117,11 +6444,7 @@ type DynamicFee = IdlTypes<CpAmm$1>["dynamicFeeParameters"];
|
|
|
6117
6444
|
type DynamicFeeStruct = IdlTypes<CpAmm$1>["dynamicFeeStruct"];
|
|
6118
6445
|
/**
|
|
6119
6446
|
* Base fee parameters
|
|
6120
|
-
* @param
|
|
6121
|
-
* @param firstFactor // feeScheduler: numberOfPeriod, rateLimiter: feeIncrementBps
|
|
6122
|
-
* @param secondFactor // feeScheduler: periodFrequency, rateLimiter: maxLimiterDuration
|
|
6123
|
-
* @param thirdFactor // feeScheduler: reductionFactor, rateLimiter: referenceAmount
|
|
6124
|
-
* @param baseFeeMode
|
|
6447
|
+
* @param data // number[]
|
|
6125
6448
|
*/
|
|
6126
6449
|
type BaseFee = IdlTypes<CpAmm$1>["baseFeeParameters"];
|
|
6127
6450
|
type PoolFeesStruct = IdlTypes<CpAmm$1>["poolFeesStruct"];
|
|
@@ -6425,7 +6748,6 @@ type SwapAmount = {
|
|
|
6425
6748
|
outputAmount: BN;
|
|
6426
6749
|
nextSqrtPrice: BN;
|
|
6427
6750
|
};
|
|
6428
|
-
type SwapResult = IdlTypes<CpAmm$1>["swapResult"];
|
|
6429
6751
|
type SwapResult2 = IdlTypes<CpAmm$1>["swapResult2"];
|
|
6430
6752
|
interface Quote2Result extends SwapResult2 {
|
|
6431
6753
|
priceImpact: Decimal;
|
|
@@ -6702,8 +7024,10 @@ type SplitPosition2Params = {
|
|
|
6702
7024
|
};
|
|
6703
7025
|
interface BaseFeeHandler {
|
|
6704
7026
|
validate(collectFeeMode: CollectFeeMode, activationType: ActivationType, poolVersion: PoolVersion): boolean;
|
|
6705
|
-
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN, activationPoint: BN, tradeDirection: TradeDirection, includedFeeAmount: BN): BN;
|
|
6706
|
-
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN, activationPoint: BN, tradeDirection: TradeDirection, excludedFeeAmount: BN): BN;
|
|
7027
|
+
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN, activationPoint: BN, tradeDirection: TradeDirection, includedFeeAmount: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
7028
|
+
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN, activationPoint: BN, tradeDirection: TradeDirection, excludedFeeAmount: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
7029
|
+
validateBaseFeeIsStatic(currentPoint: BN, activationPoint: BN): boolean;
|
|
7030
|
+
getMinBaseFeeNumerator(): BN;
|
|
6707
7031
|
}
|
|
6708
7032
|
interface FeeOnAmountResult {
|
|
6709
7033
|
amount: BN;
|
|
@@ -6826,6 +7150,30 @@ declare class CpAmm {
|
|
|
6826
7150
|
publicKey: PublicKey;
|
|
6827
7151
|
account: PoolState;
|
|
6828
7152
|
}>>;
|
|
7153
|
+
fetchPoolFees(pool: PublicKey): Promise<{
|
|
7154
|
+
cliffFeeNumerator: BN$1;
|
|
7155
|
+
baseFeeMode: number;
|
|
7156
|
+
padding: number[];
|
|
7157
|
+
numberOfPeriod: number;
|
|
7158
|
+
periodFrequency: BN$1;
|
|
7159
|
+
reductionFactor: BN$1;
|
|
7160
|
+
} | {
|
|
7161
|
+
cliffFeeNumerator: BN$1;
|
|
7162
|
+
baseFeeMode: number;
|
|
7163
|
+
padding: number[];
|
|
7164
|
+
numberOfPeriod: number;
|
|
7165
|
+
sqrtPriceStepBps: number;
|
|
7166
|
+
schedulerExpirationDuration: number;
|
|
7167
|
+
reductionFactor: BN$1;
|
|
7168
|
+
} | {
|
|
7169
|
+
cliffFeeNumerator: BN$1;
|
|
7170
|
+
baseFeeMode: number;
|
|
7171
|
+
padding: number[];
|
|
7172
|
+
feeIncrementBps: number;
|
|
7173
|
+
maxLimiterDuration: number;
|
|
7174
|
+
maxFeeBps: number;
|
|
7175
|
+
referenceAmount: BN$1;
|
|
7176
|
+
}>;
|
|
6829
7177
|
/**
|
|
6830
7178
|
* Fetches the Position state.
|
|
6831
7179
|
* @param position - Public key of the position.
|
|
@@ -7208,6 +7556,7 @@ declare function deriveCustomizablePoolAddress(tokenAMint: PublicKey, tokenBMint
|
|
|
7208
7556
|
declare function deriveTokenBadgeAddress(tokenMint: PublicKey): PublicKey;
|
|
7209
7557
|
declare function deriveClaimFeeOperatorAddress(operator: PublicKey): PublicKey;
|
|
7210
7558
|
declare function derivePositionNftAccount(positionNftMint: PublicKey): PublicKey;
|
|
7559
|
+
declare function deriveOperatorAddress(whitelistedAddress: PublicKey): PublicKey;
|
|
7211
7560
|
|
|
7212
7561
|
declare const CP_AMM_PROGRAM_ID: PublicKey;
|
|
7213
7562
|
declare const LIQUIDITY_SCALE = 128;
|
|
@@ -7241,7 +7590,8 @@ declare const U16_MAX = 65535;
|
|
|
7241
7590
|
declare const MAX_RATE_LIMITER_DURATION_IN_SECONDS = 43200;
|
|
7242
7591
|
declare const MAX_RATE_LIMITER_DURATION_IN_SLOTS = 108000;
|
|
7243
7592
|
declare const SPLIT_POSITION_DENOMINATOR = 1000000000;
|
|
7244
|
-
declare const CURRENT_POOL_VERSION = PoolVersion.
|
|
7593
|
+
declare const CURRENT_POOL_VERSION = PoolVersion.V1;
|
|
7594
|
+
declare const FEE_PADDING: number[];
|
|
7245
7595
|
|
|
7246
7596
|
/**
|
|
7247
7597
|
* Gets the token program
|
|
@@ -7462,6 +7812,36 @@ interface TransferFeeExcludedAmount {
|
|
|
7462
7812
|
* @returns The transfer fee excluded amount
|
|
7463
7813
|
*/
|
|
7464
7814
|
declare function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount: BN, mint: Mint, currentEpoch: number): TransferFeeExcludedAmount;
|
|
7815
|
+
/**
|
|
7816
|
+
* Interface for transfer hook extension state
|
|
7817
|
+
*/
|
|
7818
|
+
interface TransferHookState {
|
|
7819
|
+
authority: string;
|
|
7820
|
+
programId: string;
|
|
7821
|
+
}
|
|
7822
|
+
/**
|
|
7823
|
+
* Checks if a Token 2022 mint has a transfer hook extension
|
|
7824
|
+
* Transfer hooks prevent permissionless pool creation as they require
|
|
7825
|
+
* the hook program to approve transfers, which pool creation cannot satisfy.
|
|
7826
|
+
*
|
|
7827
|
+
* @param connection - The connection to the Solana cluster
|
|
7828
|
+
* @param mint - The mint address to check
|
|
7829
|
+
* @returns Object containing whether transfer hook exists and its state if found
|
|
7830
|
+
*/
|
|
7831
|
+
declare function hasTransferHookExtension(connection: Connection, mint: PublicKey): Promise<{
|
|
7832
|
+
hasTransferHook: boolean;
|
|
7833
|
+
transferHookState?: TransferHookState;
|
|
7834
|
+
}>;
|
|
7835
|
+
/**
|
|
7836
|
+
* Validates that tokens don't have transfer hook extensions before pool creation
|
|
7837
|
+
* Throws an error if either token has a transfer hook extension
|
|
7838
|
+
*
|
|
7839
|
+
* @param connection - The connection to the Solana cluster
|
|
7840
|
+
* @param tokenAMint - The first token mint address
|
|
7841
|
+
* @param tokenBMint - The second token mint address
|
|
7842
|
+
* @throws Error if either token has a transfer hook extension
|
|
7843
|
+
*/
|
|
7844
|
+
declare function validateNoTransferHook(connection: Connection, tokenAMint: PublicKey, tokenBMint: PublicKey): Promise<void>;
|
|
7465
7845
|
|
|
7466
7846
|
/**
|
|
7467
7847
|
* Checks if a vesting schedule is ready for full release
|
|
@@ -7491,9 +7871,43 @@ declare function getAvailableVestingLiquidity(vestingData: VestingState, current
|
|
|
7491
7871
|
* @param periodFrequency Period frequency
|
|
7492
7872
|
* @param reductionFactor Reduction factor
|
|
7493
7873
|
* @param cliffFeeNumerator Cliff fee numerator
|
|
7494
|
-
* @
|
|
7874
|
+
* @param baseFeeMode Base fee mode
|
|
7875
|
+
* @param poolVersion Pool version
|
|
7876
|
+
* @throws Error if the fee time scheduler is invalid.
|
|
7877
|
+
* @returns True if the fee time scheduler is valid, otherwise false.
|
|
7495
7878
|
*/
|
|
7496
|
-
declare function
|
|
7879
|
+
declare function validateFeeTimeScheduler(numberOfPeriod: number, periodFrequency: BN$1, reductionFactor: BN$1, cliffFeeNumerator: BN$1, baseFeeMode: BaseFeeMode, poolVersion: PoolVersion): boolean;
|
|
7880
|
+
/**
|
|
7881
|
+
* Validates whether the base fee is static based on the scheduler's expiration.
|
|
7882
|
+
* @param currentPoint - The current point as BN.
|
|
7883
|
+
* @param activationPoint - The activation point as BN.
|
|
7884
|
+
* @param numberOfPeriod - The total number of periods as BN.
|
|
7885
|
+
* @param periodFrequency - The period frequency as BN.
|
|
7886
|
+
* @returns True if the base fee is static, otherwise false.
|
|
7887
|
+
*/
|
|
7888
|
+
declare function validateFeeTimeSchedulerBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1, numberOfPeriod: BN$1, periodFrequency: BN$1): boolean;
|
|
7889
|
+
/**
|
|
7890
|
+
* Validates the Market Cap Fee Scheduler parameters.
|
|
7891
|
+
* This checks for non-zero scheduler fields and validates fee fractions and limits, following the Rust logic.
|
|
7892
|
+
* @param cliffFeeNumerator - The cliff fee numerator as BN.
|
|
7893
|
+
* @param numberOfPeriod - Number of periods (number).
|
|
7894
|
+
* @param sqrtPriceStepBps - The sqrt price step in basis points (BN).
|
|
7895
|
+
* @param reductionFactor - The reduction factor as BN.
|
|
7896
|
+
* @param schedulerExpirationDuration - The scheduler expiration duration as BN.
|
|
7897
|
+
* @param feeMarketCapSchedulerMode - The fee scheduler mode (BaseFeeMode).
|
|
7898
|
+
* @param poolVersion - The pool version.
|
|
7899
|
+
* @throws Error if validation fails.
|
|
7900
|
+
* @returns True if the fee market cap scheduler is valid, otherwise false.
|
|
7901
|
+
*/
|
|
7902
|
+
declare function validateFeeMarketCapScheduler(cliffFeeNumerator: BN$1, numberOfPeriod: number, sqrtPriceStepBps: BN$1, reductionFactor: BN$1, schedulerExpirationDuration: BN$1, feeMarketCapSchedulerMode: BaseFeeMode, poolVersion: PoolVersion): boolean;
|
|
7903
|
+
/**
|
|
7904
|
+
* Validates whether the base fee is static for market cap fee scheduler, based on scheduler's expiration
|
|
7905
|
+
* @param currentPoint - The current point as BN.
|
|
7906
|
+
* @param activationPoint - The activation point as BN.
|
|
7907
|
+
* @param schedulerExpirationDuration - The scheduler expiration duration as BN.
|
|
7908
|
+
* @returns True if the base fee is static, otherwise false.
|
|
7909
|
+
*/
|
|
7910
|
+
declare function validateFeeMarketCapBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1, schedulerExpirationDuration: BN$1): boolean;
|
|
7497
7911
|
/**
|
|
7498
7912
|
* Validate rate limiter parameters
|
|
7499
7913
|
* @param cliffFeeNumerator - Cliff fee numerator
|
|
@@ -7505,6 +7919,17 @@ declare function validateFeeScheduler(numberOfPeriod: number, periodFrequency: B
|
|
|
7505
7919
|
* @returns Validation result
|
|
7506
7920
|
*/
|
|
7507
7921
|
declare function validateFeeRateLimiter(cliffFeeNumerator: BN$1, feeIncrementBps: number, maxFeeBps: number, maxLimiterDuration: number, referenceAmount: BN$1, collectFeeMode: CollectFeeMode, activationType: ActivationType, poolVersion: PoolVersion): boolean;
|
|
7922
|
+
/**
|
|
7923
|
+
* Validates whether the rate limiter base fee is static based on the current and activation points, as well as the maxLimiterDuration and referenceAmount.
|
|
7924
|
+
* @param currentPoint - The current point as BN.
|
|
7925
|
+
* @param activationPoint - The activation point as BN.
|
|
7926
|
+
* @param maxLimiterDuration - The max limiter duration as number.
|
|
7927
|
+
* @param referenceAmount - The reference amount as BN.
|
|
7928
|
+
* @param maxFeeBps - The max fee in basis points as number.
|
|
7929
|
+
* @param feeIncrementBps - The fee increment in basis points as number.
|
|
7930
|
+
* @returns True if the base fee is static, otherwise false.
|
|
7931
|
+
*/
|
|
7932
|
+
declare function validateFeeRateLimiterBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1, maxLimiterDuration: number, referenceAmount: BN$1, maxFeeBps: number, feeIncrementBps: number): boolean;
|
|
7508
7933
|
/**
|
|
7509
7934
|
* Validates that the fee fraction is valid (numerator < denominator, denominator != 0)
|
|
7510
7935
|
* @param numerator - The numerator of the fee fraction
|
|
@@ -7602,7 +8027,8 @@ declare function fromDecimalToBN(value: Decimal): BN$1;
|
|
|
7602
8027
|
* @param poolVersion - The pool version
|
|
7603
8028
|
* @returns The fee scheduler parameters
|
|
7604
8029
|
*/
|
|
7605
|
-
declare function
|
|
8030
|
+
declare function getFeeTimeSchedulerParams(startingBaseFeeBps: number, endingBaseFeeBps: number, baseFeeMode: BaseFeeMode, numberOfPeriod: number, totalDuration: number): BaseFee;
|
|
8031
|
+
declare function getFeeMarketCapSchedulerParams(startingBaseFeeBps: number, endingBaseFeeBps: number, baseFeeMode: BaseFeeMode, numberOfPeriod: number, sqrtPriceStepBps: number, schedulerExpirationDuration: number): BaseFee;
|
|
7606
8032
|
/**
|
|
7607
8033
|
* Gets the rate limiter parameters
|
|
7608
8034
|
* @param baseFeeBps - The base fee in basis points
|
|
@@ -7633,12 +8059,19 @@ declare function getBaseFeeParams(baseFeeParams: {
|
|
|
7633
8059
|
maxLimiterDuration: number;
|
|
7634
8060
|
maxFeeBps: number;
|
|
7635
8061
|
};
|
|
7636
|
-
|
|
8062
|
+
feeTimeSchedulerParam?: {
|
|
7637
8063
|
startingFeeBps: number;
|
|
7638
8064
|
endingFeeBps: number;
|
|
7639
8065
|
numberOfPeriod: number;
|
|
7640
8066
|
totalDuration: number;
|
|
7641
8067
|
};
|
|
8068
|
+
feeMarketCapSchedulerParam?: {
|
|
8069
|
+
startingFeeBps: number;
|
|
8070
|
+
endingFeeBps: number;
|
|
8071
|
+
numberOfPeriod: number;
|
|
8072
|
+
sqrtPriceStepBps: number;
|
|
8073
|
+
schedulerExpirationDuration: number;
|
|
8074
|
+
};
|
|
7642
8075
|
}, tokenBDecimal: number, activationType: ActivationType): BaseFee;
|
|
7643
8076
|
/**
|
|
7644
8077
|
* Gets the dynamic fee parameters
|
|
@@ -7648,6 +8081,17 @@ declare function getBaseFeeParams(baseFeeParams: {
|
|
|
7648
8081
|
*/
|
|
7649
8082
|
declare function getDynamicFeeParams(baseFeeBps: number, maxPriceChangeBps?: number): DynamicFee;
|
|
7650
8083
|
|
|
8084
|
+
declare const cpAmmCoder: BorshCoder<string, string>;
|
|
8085
|
+
declare function encodeFeeTimeSchedulerParams(cliffFeeNumerator: BN$1, numberOfPeriod: number, periodFrequency: BN$1, reductionFactor: BN$1, baseFeeMode: BaseFeeMode): Buffer;
|
|
8086
|
+
declare function decodeFeeTimeSchedulerParams(data: Buffer): BorshFeeTimeScheduler;
|
|
8087
|
+
declare function decodePodAlignedFeeTimeScheduler(data: Buffer): PodAlignedFeeTimeScheduler;
|
|
8088
|
+
declare function encodeFeeMarketCapSchedulerParams(cliffFeeNumerator: BN$1, numberOfPeriod: number, sqrtPriceStepBps: number, schedulerExpirationDuration: number, reductionFactor: BN$1, baseFeeMode: BaseFeeMode): Buffer;
|
|
8089
|
+
declare function decodeFeeMarketCapSchedulerParams(data: Buffer): BorshFeeMarketCapScheduler;
|
|
8090
|
+
declare function decodePodAlignedFeeMarketCapScheduler(data: Buffer): PodAlignedFeeMarketCapScheduler;
|
|
8091
|
+
declare function encodeFeeRateLimiterParams(cliffFeeNumerator: BN$1, feeIncrementBps: number, maxLimiterDuration: number, maxFeeBps: number, referenceAmount: BN$1): Buffer;
|
|
8092
|
+
declare function decodeFeeRateLimiterParams(data: Buffer): BorshFeeRateLimiter;
|
|
8093
|
+
declare function decodePodAlignedFeeRateLimiter(data: Buffer): PodAlignedFeeRateLimiter;
|
|
8094
|
+
|
|
7651
8095
|
/**
|
|
7652
8096
|
* Converts basis points to a numerator
|
|
7653
8097
|
* @param bps - The basis points
|
|
@@ -7689,7 +8133,7 @@ declare function getTotalFeeNumerator(poolFees: PoolFeesStruct, baseFeeNumerator
|
|
|
7689
8133
|
* @param maxFeeNumerator - The max fee numerator
|
|
7690
8134
|
* @returns The total trading fee from included fee amount
|
|
7691
8135
|
*/
|
|
7692
|
-
declare function getTotalTradingFeeFromIncludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, includedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN): BN;
|
|
8136
|
+
declare function getTotalTradingFeeFromIncludedFeeAmount(program: Program<CpAmm$1>, poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, includedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
7693
8137
|
/**
|
|
7694
8138
|
* Gets the total trading fee from excluded fee amount
|
|
7695
8139
|
* @param poolFees - The pool fees
|
|
@@ -7700,7 +8144,7 @@ declare function getTotalTradingFeeFromIncludedFeeAmount(poolFees: PoolFeesStruc
|
|
|
7700
8144
|
* @param maxFeeNumerator - The max fee numerator
|
|
7701
8145
|
* @returns The total trading fee from excluded fee amount
|
|
7702
8146
|
*/
|
|
7703
|
-
declare function getTotalTradingFeeFromExcludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, excludedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN): BN;
|
|
8147
|
+
declare function getTotalTradingFeeFromExcludedFeeAmount(program: Program<CpAmm$1>, poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, excludedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
7704
8148
|
/**
|
|
7705
8149
|
* Splits the fees
|
|
7706
8150
|
* @param poolFees - The pool fees
|
|
@@ -7800,33 +8244,51 @@ declare class FeeRateLimiter implements BaseFeeHandler {
|
|
|
7800
8244
|
referenceAmount: BN$1;
|
|
7801
8245
|
constructor(cliffFeeNumerator: BN$1, feeIncrementBps: number, maxFeeBps: number, maxLimiterDuration: number, referenceAmount: BN$1);
|
|
7802
8246
|
validate(collectFeeMode: CollectFeeMode, activationType: ActivationType, poolVersion: PoolVersion): boolean;
|
|
7803
|
-
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, tradeDirection: TradeDirection, includedFeeAmount: BN$1): BN$1;
|
|
7804
|
-
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, tradeDirection: TradeDirection, excludedFeeAmount: BN$1): BN$1;
|
|
8247
|
+
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, tradeDirection: TradeDirection, includedFeeAmount: BN$1, _initSqrtPrice: BN$1, _currentSqrtPrice: BN$1): BN$1;
|
|
8248
|
+
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, tradeDirection: TradeDirection, excludedFeeAmount: BN$1, _initSqrtPrice: BN$1, _currentSqrtPrice: BN$1): BN$1;
|
|
8249
|
+
validateBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1): boolean;
|
|
8250
|
+
getMinBaseFeeNumerator(): BN$1;
|
|
7805
8251
|
}
|
|
7806
8252
|
/**
|
|
7807
|
-
* Fee Scheduler implementation
|
|
8253
|
+
* Fee Time Scheduler implementation
|
|
7808
8254
|
*/
|
|
7809
|
-
declare class
|
|
8255
|
+
declare class FeeTimeScheduler implements BaseFeeHandler {
|
|
7810
8256
|
cliffFeeNumerator: BN$1;
|
|
7811
8257
|
numberOfPeriod: number;
|
|
7812
8258
|
periodFrequency: BN$1;
|
|
7813
8259
|
reductionFactor: BN$1;
|
|
7814
|
-
|
|
7815
|
-
constructor(cliffFeeNumerator: BN$1, numberOfPeriod: number, periodFrequency: BN$1, reductionFactor: BN$1,
|
|
8260
|
+
feeTimeSchedulerMode: BaseFeeMode;
|
|
8261
|
+
constructor(cliffFeeNumerator: BN$1, numberOfPeriod: number, periodFrequency: BN$1, reductionFactor: BN$1, feeTimeSchedulerMode: BaseFeeMode);
|
|
7816
8262
|
validate(collectFeeMode: CollectFeeMode, activationType: ActivationType, poolVersion: PoolVersion): boolean;
|
|
7817
|
-
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1): BN$1;
|
|
7818
|
-
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1): BN$1;
|
|
8263
|
+
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, _tradeDirection: TradeDirection, _includedFeeAmount: BN$1, _initSqrtPrice: BN$1, _currentSqrtPrice: BN$1): BN$1;
|
|
8264
|
+
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, _tradeDirection: TradeDirection, _excludedFeeAmount: BN$1, _initSqrtPrice: BN$1, _currentSqrtPrice: BN$1): BN$1;
|
|
8265
|
+
validateBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1): boolean;
|
|
8266
|
+
getMinBaseFeeNumerator(): BN$1;
|
|
8267
|
+
}
|
|
8268
|
+
/**
|
|
8269
|
+
* Fee Market Cap Scheduler implementation
|
|
8270
|
+
*/
|
|
8271
|
+
declare class FeeMarketCapScheduler implements BaseFeeHandler {
|
|
8272
|
+
cliffFeeNumerator: BN$1;
|
|
8273
|
+
numberOfPeriod: number;
|
|
8274
|
+
sqrtPriceStepBps: number;
|
|
8275
|
+
schedulerExpirationDuration: number;
|
|
8276
|
+
reductionFactor: BN$1;
|
|
8277
|
+
feeMarketCapSchedulerMode: BaseFeeMode;
|
|
8278
|
+
constructor(cliffFeeNumerator: BN$1, numberOfPeriod: number, sqrtPriceStepBps: number, schedulerExpirationDuration: number, reductionFactor: BN$1, feeMarketCapSchedulerMode: BaseFeeMode);
|
|
8279
|
+
validate(_collectFeeMode: CollectFeeMode, _activationType: ActivationType, poolVersion: PoolVersion): boolean;
|
|
8280
|
+
getBaseFeeNumeratorFromIncludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, _tradeDirection: TradeDirection, _includedFeeAmount: BN$1, initSqrtPrice: BN$1, currentSqrtPrice: BN$1): BN$1;
|
|
8281
|
+
getBaseFeeNumeratorFromExcludedFeeAmount(currentPoint: BN$1, activationPoint: BN$1, _tradeDirection: TradeDirection, _excludedFeeAmount: BN$1, initSqrtPrice: BN$1, currentSqrtPrice: BN$1): BN$1;
|
|
8282
|
+
validateBaseFeeIsStatic(currentPoint: BN$1, activationPoint: BN$1): boolean;
|
|
8283
|
+
getMinBaseFeeNumerator(): BN$1;
|
|
7819
8284
|
}
|
|
7820
8285
|
/**
|
|
7821
8286
|
* Get base fee handler based on base fee mode
|
|
7822
|
-
* @param
|
|
7823
|
-
* @param
|
|
7824
|
-
* @param secondFactor Second factor (feeScheduler: periodFrequency, rateLimiter: maxLimiterDuration)
|
|
7825
|
-
* @param thirdFactor Third factor (feeScheduler: reductionFactor, rateLimiter: referenceAmount)
|
|
7826
|
-
* @param baseFeeMode Base fee mode
|
|
8287
|
+
* @param program Program instance
|
|
8288
|
+
* @param rawData Raw data
|
|
7827
8289
|
* @returns Base fee handler instance
|
|
7828
8290
|
*/
|
|
7829
|
-
declare function getBaseFeeHandler(
|
|
8291
|
+
declare function getBaseFeeHandler(program: Program<CpAmm$1>, rawData: number[]): BaseFeeHandler;
|
|
7830
8292
|
|
|
7831
8293
|
/**
|
|
7832
8294
|
* Check if dynamic fee is enabled
|
|
@@ -7844,60 +8306,108 @@ declare function isDynamicFeeEnabled(dynamicFee: DynamicFeeStruct): boolean;
|
|
|
7844
8306
|
*/
|
|
7845
8307
|
declare function getDynamicFeeNumerator(volatilityAccumulator: BN$1, binStep: BN$1, variableFeeControl: BN$1): BN$1;
|
|
7846
8308
|
|
|
8309
|
+
/**
|
|
8310
|
+
* Gets the fee numerator on linear fee scheduler.
|
|
8311
|
+
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8312
|
+
* @param reductionFactor - The reduction factor.
|
|
8313
|
+
* @param period - The period.
|
|
8314
|
+
* @returns The fee numerator on linear fee scheduler.
|
|
8315
|
+
*/
|
|
8316
|
+
declare function getFeeNumeratorOnLinearFeeScheduler(cliffFeeNumerator: BN$1, reductionFactor: BN$1, period: number): BN$1;
|
|
8317
|
+
/**
|
|
8318
|
+
* Gets the fee numerator on exponential fee scheduler.
|
|
8319
|
+
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8320
|
+
* @param reductionFactor - The reduction factor.
|
|
8321
|
+
* @param period - The period.
|
|
8322
|
+
* @returns The fee numerator on exponential fee scheduler.
|
|
8323
|
+
*/
|
|
8324
|
+
declare function getFeeNumeratorOnExponentialFeeScheduler(cliffFeeNumerator: BN$1, reductionFactor: BN$1, period: number): BN$1;
|
|
7847
8325
|
/**
|
|
7848
8326
|
* Gets the max base fee numerator.
|
|
7849
8327
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
7850
8328
|
* @returns The max base fee numerator.
|
|
7851
8329
|
*/
|
|
7852
8330
|
declare function getMaxBaseFeeNumerator(cliffFeeNumerator: BN$1): BN$1;
|
|
8331
|
+
|
|
7853
8332
|
/**
|
|
7854
|
-
*
|
|
7855
|
-
* @param
|
|
7856
|
-
* @
|
|
7857
|
-
* @param periodFrequency - The period frequency.
|
|
7858
|
-
* @param reductionFactor - The reduction factor.
|
|
7859
|
-
* @param feeSchedulerMode - The fee scheduler mode.
|
|
7860
|
-
* @returns The min base fee numerator.
|
|
8333
|
+
* Converts a BorshFeeTimeScheduler object to a PodAlignedFeeTimeScheduler object,
|
|
8334
|
+
* @param borshFeeScheduler The BorshFeeTimeScheduler instance to convert.
|
|
8335
|
+
* @returns The corresponding PodAlignedFeeTimeScheduler object.
|
|
7861
8336
|
*/
|
|
7862
|
-
declare function
|
|
8337
|
+
declare function toPodAlignedFeeTimeScheduler(borshFeeScheduler: BorshFeeTimeScheduler): PodAlignedFeeTimeScheduler;
|
|
7863
8338
|
/**
|
|
7864
|
-
*
|
|
8339
|
+
* Converts a PodAlignedFeeTimeScheduler object to a BorshFeeTimeScheduler object,
|
|
8340
|
+
* @param podAlignedFeeScheduler The PodAlignedFeeTimeScheduler instance to convert.
|
|
8341
|
+
* @returns The corresponding BorshFeeTimeScheduler object.
|
|
8342
|
+
*/
|
|
8343
|
+
declare function toBorshFeeTimeScheduler(podAlignedFeeScheduler: PodAlignedFeeTimeScheduler): BorshFeeTimeScheduler;
|
|
8344
|
+
/**
|
|
8345
|
+
* Gets the base fee numerator by period for the time fee scheduler.
|
|
7865
8346
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
7866
8347
|
* @param numberOfPeriod - The number of periods.
|
|
7867
8348
|
* @param period - The period.
|
|
7868
8349
|
* @param reductionFactor - The reduction factor.
|
|
7869
|
-
* @param
|
|
8350
|
+
* @param feeTimeSchedulerMode - The fee scheduler mode.
|
|
7870
8351
|
* @returns The base fee numerator by period.
|
|
7871
8352
|
*/
|
|
7872
|
-
declare function
|
|
8353
|
+
declare function getFeeTimeBaseFeeNumeratorByPeriod(cliffFeeNumerator: BN$1, numberOfPeriod: number, period: BN$1, reductionFactor: BN$1, feeTimeSchedulerMode: BaseFeeMode): BN$1;
|
|
7873
8354
|
/**
|
|
7874
|
-
* Gets the fee numerator
|
|
8355
|
+
* Gets the base fee numerator.
|
|
7875
8356
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8357
|
+
* @param numberOfPeriod - The number of periods.
|
|
8358
|
+
* @param periodFrequency - The period frequency.
|
|
7876
8359
|
* @param reductionFactor - The reduction factor.
|
|
7877
|
-
* @param
|
|
7878
|
-
* @
|
|
8360
|
+
* @param feeTimeSchedulerMode - The fee scheduler mode.
|
|
8361
|
+
* @param currentPoint - The current point.
|
|
8362
|
+
* @param activationPoint - The activation point.
|
|
8363
|
+
* @returns The base fee numerator.
|
|
7879
8364
|
*/
|
|
7880
|
-
declare function
|
|
8365
|
+
declare function getFeeTimeBaseFeeNumerator(cliffFeeNumerator: BN$1, numberOfPeriod: number, periodFrequency: BN$1, reductionFactor: BN$1, feeTimeSchedulerMode: BaseFeeMode, currentPoint: BN$1, activationPoint: BN$1): BN$1;
|
|
7881
8366
|
/**
|
|
7882
|
-
* Gets the
|
|
8367
|
+
* Gets the min base fee numerator.
|
|
7883
8368
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8369
|
+
* @param numberOfPeriod - The number of periods.
|
|
8370
|
+
* @param periodFrequency - The period frequency.
|
|
7884
8371
|
* @param reductionFactor - The reduction factor.
|
|
8372
|
+
* @param feeTimeSchedulerMode - The fee scheduler mode.
|
|
8373
|
+
* @returns The min base fee numerator.
|
|
8374
|
+
*/
|
|
8375
|
+
declare function getFeeTimeMinBaseFeeNumerator(cliffFeeNumerator: BN$1, numberOfPeriod: number, reductionFactor: BN$1, feeTimeSchedulerMode: BaseFeeMode): BN$1;
|
|
8376
|
+
|
|
8377
|
+
/**
|
|
8378
|
+
* Gets the base fee numerator by period for the market cap fee scheduler.
|
|
8379
|
+
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8380
|
+
* @param numberOfPeriod - The number of periods.
|
|
7885
8381
|
* @param period - The period.
|
|
7886
|
-
* @
|
|
8382
|
+
* @param reductionFactor - The reduction factor.
|
|
8383
|
+
* @param feeMarketCapSchedulerMode - The fee scheduler mode.
|
|
8384
|
+
* @returns The base fee numerator by period.
|
|
7887
8385
|
*/
|
|
7888
|
-
declare function
|
|
8386
|
+
declare function getFeeMarketCapBaseFeeNumeratorByPeriod(cliffFeeNumerator: BN$1, numberOfPeriod: number, period: BN$1, reductionFactor: BN$1, feeMarketCapSchedulerMode: BaseFeeMode): BN$1;
|
|
7889
8387
|
/**
|
|
7890
|
-
* Gets the base fee numerator.
|
|
8388
|
+
* Gets the base fee numerator for market cap scheduler.
|
|
7891
8389
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
7892
8390
|
* @param numberOfPeriod - The number of periods.
|
|
7893
|
-
* @param
|
|
8391
|
+
* @param sqrtPriceStepBps - The sqrt price step bps.
|
|
8392
|
+
* @param schedulerExpirationDuration - The scheduler expiration duration.
|
|
7894
8393
|
* @param reductionFactor - The reduction factor.
|
|
7895
|
-
* @param
|
|
8394
|
+
* @param feeMarketCapSchedulerMode - The fee scheduler mode.
|
|
7896
8395
|
* @param currentPoint - The current point.
|
|
7897
8396
|
* @param activationPoint - The activation point.
|
|
8397
|
+
* @param initSqrtPrice - The initial sqrt price.
|
|
8398
|
+
* @param currentSqrtPrice - The current sqrt price.
|
|
7898
8399
|
* @returns The base fee numerator.
|
|
7899
8400
|
*/
|
|
7900
|
-
declare function
|
|
8401
|
+
declare function getFeeMarketCapBaseFeeNumerator(cliffFeeNumerator: BN$1, numberOfPeriod: number, sqrtPriceStepBps: number, schedulerExpirationDuration: number, reductionFactor: BN$1, feeMarketCapSchedulerMode: BaseFeeMode, currentPoint: BN$1, activationPoint: BN$1, initSqrtPrice: BN$1, currentSqrtPrice: BN$1): BN$1;
|
|
8402
|
+
/**
|
|
8403
|
+
* Gets the min base fee numerator for market cap scheduler.
|
|
8404
|
+
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
8405
|
+
* @param numberOfPeriod - The number of periods.
|
|
8406
|
+
* @param reductionFactor - The reduction factor.
|
|
8407
|
+
* @param feeMarketCapSchedulerMode - The fee scheduler mode.
|
|
8408
|
+
* @returns The min base fee numerator.
|
|
8409
|
+
*/
|
|
8410
|
+
declare function getFeeMarketCapMinBaseFeeNumerator(cliffFeeNumerator: BN$1, numberOfPeriod: number, reductionFactor: BN$1, feeMarketCapSchedulerMode: BaseFeeMode): BN$1;
|
|
7901
8411
|
|
|
7902
8412
|
/**
|
|
7903
8413
|
* Checks if the rate limiter is zero.
|
|
@@ -7990,7 +8500,7 @@ declare function getFeeNumeratorFromExcludedFeeAmount(excludedFeeAmount: BN$1, r
|
|
|
7990
8500
|
* @param currentPoint - The current point
|
|
7991
8501
|
* @returns The swap result from exact input
|
|
7992
8502
|
*/
|
|
7993
|
-
declare function getSwapResultFromExactInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8503
|
+
declare function getSwapResultFromExactInput(program: Program<CpAmm$1>, poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
7994
8504
|
/**
|
|
7995
8505
|
* Calculates the swap result from exact input
|
|
7996
8506
|
* @param poolState - The pool state
|
|
@@ -8022,7 +8532,7 @@ declare function calculateBtoAFromAmountIn(poolState: PoolState, amountIn: BN$1)
|
|
|
8022
8532
|
* @param currentPoint - The current point
|
|
8023
8533
|
* @returns The swap result from partial input
|
|
8024
8534
|
*/
|
|
8025
|
-
declare function getSwapResultFromPartialInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8535
|
+
declare function getSwapResultFromPartialInput(program: Program<CpAmm$1>, poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8026
8536
|
/**
|
|
8027
8537
|
* Calculates the swap result from partial input
|
|
8028
8538
|
* @param poolState - The pool state
|
|
@@ -8054,7 +8564,7 @@ declare function calculateBtoAFromPartialAmountIn(poolState: PoolState, amountIn
|
|
|
8054
8564
|
* @param currentPoint - The current point
|
|
8055
8565
|
* @returns The swap result from exact output
|
|
8056
8566
|
*/
|
|
8057
|
-
declare function getSwapResultFromExactOutput(poolState: PoolState, amountOut: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8567
|
+
declare function getSwapResultFromExactOutput(program: Program<CpAmm$1>, poolState: PoolState, amountOut: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8058
8568
|
/**
|
|
8059
8569
|
* Calculates the swap result from exact output
|
|
8060
8570
|
* @param poolState - The pool state
|
|
@@ -8089,7 +8599,7 @@ declare function calculateBtoAFromAmountOut(poolState: PoolState, amountOut: BN$
|
|
|
8089
8599
|
* @param outputTokenInfo - The output token info
|
|
8090
8600
|
* @returns The swap quote exact input
|
|
8091
8601
|
*/
|
|
8092
|
-
declare function swapQuoteExactInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8602
|
+
declare function swapQuoteExactInput(program: Program<CpAmm$1>, pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8093
8603
|
mint: Mint;
|
|
8094
8604
|
currentEpoch: number;
|
|
8095
8605
|
}, outputTokenInfo?: {
|
|
@@ -8110,7 +8620,7 @@ declare function swapQuoteExactInput(pool: PoolState, currentPoint: BN$1, amount
|
|
|
8110
8620
|
* @param outputTokenInfo - The output token info
|
|
8111
8621
|
* @returns The swap quote exact output
|
|
8112
8622
|
*/
|
|
8113
|
-
declare function swapQuoteExactOutput(pool: PoolState, currentPoint: BN$1, amountOut: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8623
|
+
declare function swapQuoteExactOutput(program: Program<CpAmm$1>, pool: PoolState, currentPoint: BN$1, amountOut: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8114
8624
|
mint: Mint;
|
|
8115
8625
|
currentEpoch: number;
|
|
8116
8626
|
}, outputTokenInfo?: {
|
|
@@ -8131,7 +8641,7 @@ declare function swapQuoteExactOutput(pool: PoolState, currentPoint: BN$1, amoun
|
|
|
8131
8641
|
* @param outputTokenInfo - The output token info
|
|
8132
8642
|
* @returns The swap quote partial input
|
|
8133
8643
|
*/
|
|
8134
|
-
declare function swapQuotePartialInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8644
|
+
declare function swapQuotePartialInput(program: Program<CpAmm$1>, pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8135
8645
|
mint: Mint;
|
|
8136
8646
|
currentEpoch: number;
|
|
8137
8647
|
}, outputTokenInfo?: {
|
|
@@ -8256,7 +8766,7 @@ declare function calculateInitSqrtPrice(tokenAAmount: BN, tokenBAmount: BN, minS
|
|
|
8256
8766
|
var address = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
|
|
8257
8767
|
var metadata = {
|
|
8258
8768
|
name: "cp_amm",
|
|
8259
|
-
version: "0.1.
|
|
8769
|
+
version: "0.1.6",
|
|
8260
8770
|
spec: "0.1.0",
|
|
8261
8771
|
description: "Created with Anchor"
|
|
8262
8772
|
};
|
|
@@ -8928,19 +9438,19 @@ var instructions = [
|
|
|
8928
9438
|
}
|
|
8929
9439
|
},
|
|
8930
9440
|
{
|
|
8931
|
-
name: "
|
|
9441
|
+
name: "operator",
|
|
8932
9442
|
docs: [
|
|
8933
9443
|
"Claim fee operator"
|
|
8934
9444
|
]
|
|
8935
9445
|
},
|
|
8936
9446
|
{
|
|
8937
|
-
name: "
|
|
9447
|
+
name: "whitelisted_address",
|
|
8938
9448
|
docs: [
|
|
8939
9449
|
"Operator"
|
|
8940
9450
|
],
|
|
8941
9451
|
signer: true,
|
|
8942
9452
|
relations: [
|
|
8943
|
-
"
|
|
9453
|
+
"operator"
|
|
8944
9454
|
]
|
|
8945
9455
|
},
|
|
8946
9456
|
{
|
|
@@ -9102,29 +9612,35 @@ var instructions = [
|
|
|
9102
9612
|
]
|
|
9103
9613
|
},
|
|
9104
9614
|
{
|
|
9105
|
-
name: "
|
|
9615
|
+
name: "close_config",
|
|
9106
9616
|
discriminator: [
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9617
|
+
145,
|
|
9618
|
+
9,
|
|
9619
|
+
72,
|
|
9620
|
+
157,
|
|
9111
9621
|
95,
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9622
|
+
125,
|
|
9623
|
+
61,
|
|
9624
|
+
85
|
|
9115
9625
|
],
|
|
9116
9626
|
accounts: [
|
|
9117
9627
|
{
|
|
9118
|
-
name: "
|
|
9628
|
+
name: "config",
|
|
9119
9629
|
writable: true
|
|
9120
9630
|
},
|
|
9121
9631
|
{
|
|
9122
|
-
name: "
|
|
9123
|
-
writable: true
|
|
9632
|
+
name: "operator"
|
|
9124
9633
|
},
|
|
9125
9634
|
{
|
|
9126
|
-
name: "
|
|
9127
|
-
signer: true
|
|
9635
|
+
name: "whitelisted_address",
|
|
9636
|
+
signer: true,
|
|
9637
|
+
relations: [
|
|
9638
|
+
"operator"
|
|
9639
|
+
]
|
|
9640
|
+
},
|
|
9641
|
+
{
|
|
9642
|
+
name: "rent_receiver",
|
|
9643
|
+
writable: true
|
|
9128
9644
|
},
|
|
9129
9645
|
{
|
|
9130
9646
|
name: "event_authority",
|
|
@@ -9163,25 +9679,24 @@ var instructions = [
|
|
|
9163
9679
|
]
|
|
9164
9680
|
},
|
|
9165
9681
|
{
|
|
9166
|
-
name: "
|
|
9682
|
+
name: "close_operator_account",
|
|
9167
9683
|
discriminator: [
|
|
9168
|
-
|
|
9684
|
+
171,
|
|
9169
9685
|
9,
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9686
|
+
213,
|
|
9687
|
+
74,
|
|
9688
|
+
120,
|
|
9689
|
+
23,
|
|
9690
|
+
3,
|
|
9691
|
+
29
|
|
9176
9692
|
],
|
|
9177
9693
|
accounts: [
|
|
9178
9694
|
{
|
|
9179
|
-
name: "
|
|
9695
|
+
name: "operator",
|
|
9180
9696
|
writable: true
|
|
9181
9697
|
},
|
|
9182
9698
|
{
|
|
9183
9699
|
name: "admin",
|
|
9184
|
-
writable: true,
|
|
9185
9700
|
signer: true
|
|
9186
9701
|
},
|
|
9187
9702
|
{
|
|
@@ -9338,9 +9853,14 @@ var instructions = [
|
|
|
9338
9853
|
writable: true
|
|
9339
9854
|
},
|
|
9340
9855
|
{
|
|
9341
|
-
name: "
|
|
9342
|
-
|
|
9343
|
-
|
|
9856
|
+
name: "operator"
|
|
9857
|
+
},
|
|
9858
|
+
{
|
|
9859
|
+
name: "whitelisted_address",
|
|
9860
|
+
signer: true,
|
|
9861
|
+
relations: [
|
|
9862
|
+
"operator"
|
|
9863
|
+
]
|
|
9344
9864
|
},
|
|
9345
9865
|
{
|
|
9346
9866
|
name: "rent_receiver",
|
|
@@ -9383,20 +9903,23 @@ var instructions = [
|
|
|
9383
9903
|
]
|
|
9384
9904
|
},
|
|
9385
9905
|
{
|
|
9386
|
-
name: "
|
|
9906
|
+
name: "create_config",
|
|
9907
|
+
docs: [
|
|
9908
|
+
"OPERATOR FUNCTIONS /////"
|
|
9909
|
+
],
|
|
9387
9910
|
discriminator: [
|
|
9388
|
-
|
|
9389
|
-
62,
|
|
9911
|
+
201,
|
|
9390
9912
|
207,
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9913
|
+
243,
|
|
9914
|
+
114,
|
|
9915
|
+
75,
|
|
9916
|
+
111,
|
|
9917
|
+
47,
|
|
9918
|
+
189
|
|
9396
9919
|
],
|
|
9397
9920
|
accounts: [
|
|
9398
9921
|
{
|
|
9399
|
-
name: "
|
|
9922
|
+
name: "config",
|
|
9400
9923
|
writable: true,
|
|
9401
9924
|
pda: {
|
|
9402
9925
|
seeds: [
|
|
@@ -9404,21 +9927,16 @@ var instructions = [
|
|
|
9404
9927
|
kind: "const",
|
|
9405
9928
|
value: [
|
|
9406
9929
|
99,
|
|
9407
|
-
102,
|
|
9408
|
-
95,
|
|
9409
|
-
111,
|
|
9410
|
-
112,
|
|
9411
|
-
101,
|
|
9412
|
-
114,
|
|
9413
|
-
97,
|
|
9414
|
-
116,
|
|
9415
9930
|
111,
|
|
9416
|
-
|
|
9931
|
+
110,
|
|
9932
|
+
102,
|
|
9933
|
+
105,
|
|
9934
|
+
103
|
|
9417
9935
|
]
|
|
9418
9936
|
},
|
|
9419
9937
|
{
|
|
9420
|
-
kind: "
|
|
9421
|
-
path: "
|
|
9938
|
+
kind: "arg",
|
|
9939
|
+
path: "index"
|
|
9422
9940
|
}
|
|
9423
9941
|
]
|
|
9424
9942
|
}
|
|
@@ -9427,7 +9945,14 @@ var instructions = [
|
|
|
9427
9945
|
name: "operator"
|
|
9428
9946
|
},
|
|
9429
9947
|
{
|
|
9430
|
-
name: "
|
|
9948
|
+
name: "whitelisted_address",
|
|
9949
|
+
signer: true,
|
|
9950
|
+
relations: [
|
|
9951
|
+
"operator"
|
|
9952
|
+
]
|
|
9953
|
+
},
|
|
9954
|
+
{
|
|
9955
|
+
name: "payer",
|
|
9431
9956
|
writable: true,
|
|
9432
9957
|
signer: true
|
|
9433
9958
|
},
|
|
@@ -9469,22 +9994,31 @@ var instructions = [
|
|
|
9469
9994
|
}
|
|
9470
9995
|
],
|
|
9471
9996
|
args: [
|
|
9997
|
+
{
|
|
9998
|
+
name: "index",
|
|
9999
|
+
type: "u64"
|
|
10000
|
+
},
|
|
10001
|
+
{
|
|
10002
|
+
name: "config_parameters",
|
|
10003
|
+
type: {
|
|
10004
|
+
defined: {
|
|
10005
|
+
name: "StaticConfigParameters"
|
|
10006
|
+
}
|
|
10007
|
+
}
|
|
10008
|
+
}
|
|
9472
10009
|
]
|
|
9473
10010
|
},
|
|
9474
10011
|
{
|
|
9475
|
-
name: "
|
|
9476
|
-
docs: [
|
|
9477
|
-
"ADMIN FUNCTIONS /////"
|
|
9478
|
-
],
|
|
10012
|
+
name: "create_dynamic_config",
|
|
9479
10013
|
discriminator: [
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
10014
|
+
81,
|
|
10015
|
+
251,
|
|
10016
|
+
122,
|
|
10017
|
+
78,
|
|
10018
|
+
66,
|
|
10019
|
+
57,
|
|
10020
|
+
208,
|
|
10021
|
+
82
|
|
9488
10022
|
],
|
|
9489
10023
|
accounts: [
|
|
9490
10024
|
{
|
|
@@ -9511,7 +10045,17 @@ var instructions = [
|
|
|
9511
10045
|
}
|
|
9512
10046
|
},
|
|
9513
10047
|
{
|
|
9514
|
-
name: "
|
|
10048
|
+
name: "operator"
|
|
10049
|
+
},
|
|
10050
|
+
{
|
|
10051
|
+
name: "whitelisted_address",
|
|
10052
|
+
signer: true,
|
|
10053
|
+
relations: [
|
|
10054
|
+
"operator"
|
|
10055
|
+
]
|
|
10056
|
+
},
|
|
10057
|
+
{
|
|
10058
|
+
name: "payer",
|
|
9515
10059
|
writable: true,
|
|
9516
10060
|
signer: true
|
|
9517
10061
|
},
|
|
@@ -9561,50 +10105,62 @@ var instructions = [
|
|
|
9561
10105
|
name: "config_parameters",
|
|
9562
10106
|
type: {
|
|
9563
10107
|
defined: {
|
|
9564
|
-
name: "
|
|
10108
|
+
name: "DynamicConfigParameters"
|
|
9565
10109
|
}
|
|
9566
10110
|
}
|
|
9567
10111
|
}
|
|
9568
10112
|
]
|
|
9569
10113
|
},
|
|
9570
10114
|
{
|
|
9571
|
-
name: "
|
|
10115
|
+
name: "create_operator_account",
|
|
10116
|
+
docs: [
|
|
10117
|
+
"ADMIN FUNCTIONS /////"
|
|
10118
|
+
],
|
|
9572
10119
|
discriminator: [
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
10120
|
+
221,
|
|
10121
|
+
64,
|
|
10122
|
+
246,
|
|
10123
|
+
149,
|
|
10124
|
+
240,
|
|
10125
|
+
153,
|
|
10126
|
+
229,
|
|
10127
|
+
163
|
|
9581
10128
|
],
|
|
9582
10129
|
accounts: [
|
|
9583
10130
|
{
|
|
9584
|
-
name: "
|
|
10131
|
+
name: "operator",
|
|
9585
10132
|
writable: true,
|
|
9586
10133
|
pda: {
|
|
9587
10134
|
seeds: [
|
|
9588
10135
|
{
|
|
9589
10136
|
kind: "const",
|
|
9590
10137
|
value: [
|
|
9591
|
-
99,
|
|
9592
10138
|
111,
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
10139
|
+
112,
|
|
10140
|
+
101,
|
|
10141
|
+
114,
|
|
10142
|
+
97,
|
|
10143
|
+
116,
|
|
10144
|
+
111,
|
|
10145
|
+
114
|
|
9597
10146
|
]
|
|
9598
10147
|
},
|
|
9599
10148
|
{
|
|
9600
|
-
kind: "
|
|
9601
|
-
path: "
|
|
10149
|
+
kind: "account",
|
|
10150
|
+
path: "whitelisted_address"
|
|
9602
10151
|
}
|
|
9603
10152
|
]
|
|
9604
10153
|
}
|
|
9605
10154
|
},
|
|
10155
|
+
{
|
|
10156
|
+
name: "whitelisted_address"
|
|
10157
|
+
},
|
|
9606
10158
|
{
|
|
9607
10159
|
name: "admin",
|
|
10160
|
+
signer: true
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
name: "payer",
|
|
9608
10164
|
writable: true,
|
|
9609
10165
|
signer: true
|
|
9610
10166
|
},
|
|
@@ -9647,16 +10203,8 @@ var instructions = [
|
|
|
9647
10203
|
],
|
|
9648
10204
|
args: [
|
|
9649
10205
|
{
|
|
9650
|
-
name: "
|
|
9651
|
-
type: "
|
|
9652
|
-
},
|
|
9653
|
-
{
|
|
9654
|
-
name: "config_parameters",
|
|
9655
|
-
type: {
|
|
9656
|
-
defined: {
|
|
9657
|
-
name: "DynamicConfigParameters"
|
|
9658
|
-
}
|
|
9659
|
-
}
|
|
10206
|
+
name: "permission",
|
|
10207
|
+
type: "u128"
|
|
9660
10208
|
}
|
|
9661
10209
|
]
|
|
9662
10210
|
},
|
|
@@ -9857,7 +10405,17 @@ var instructions = [
|
|
|
9857
10405
|
name: "token_mint"
|
|
9858
10406
|
},
|
|
9859
10407
|
{
|
|
9860
|
-
name: "
|
|
10408
|
+
name: "operator"
|
|
10409
|
+
},
|
|
10410
|
+
{
|
|
10411
|
+
name: "whitelisted_address",
|
|
10412
|
+
signer: true,
|
|
10413
|
+
relations: [
|
|
10414
|
+
"operator"
|
|
10415
|
+
]
|
|
10416
|
+
},
|
|
10417
|
+
{
|
|
10418
|
+
name: "payer",
|
|
9861
10419
|
writable: true,
|
|
9862
10420
|
signer: true
|
|
9863
10421
|
},
|
|
@@ -9901,6 +10459,40 @@ var instructions = [
|
|
|
9901
10459
|
args: [
|
|
9902
10460
|
]
|
|
9903
10461
|
},
|
|
10462
|
+
{
|
|
10463
|
+
name: "dummy_ix",
|
|
10464
|
+
discriminator: [
|
|
10465
|
+
234,
|
|
10466
|
+
95,
|
|
10467
|
+
176,
|
|
10468
|
+
185,
|
|
10469
|
+
7,
|
|
10470
|
+
42,
|
|
10471
|
+
35,
|
|
10472
|
+
159
|
|
10473
|
+
],
|
|
10474
|
+
accounts: [
|
|
10475
|
+
{
|
|
10476
|
+
name: "pod_aligned_fee_time_scheduler"
|
|
10477
|
+
},
|
|
10478
|
+
{
|
|
10479
|
+
name: "pod_aligned_fee_rate_limiter"
|
|
10480
|
+
},
|
|
10481
|
+
{
|
|
10482
|
+
name: "pod_aligned_fee_market_cap_scheduler"
|
|
10483
|
+
}
|
|
10484
|
+
],
|
|
10485
|
+
args: [
|
|
10486
|
+
{
|
|
10487
|
+
name: "_ixs",
|
|
10488
|
+
type: {
|
|
10489
|
+
defined: {
|
|
10490
|
+
name: "DummyParams"
|
|
10491
|
+
}
|
|
10492
|
+
}
|
|
10493
|
+
}
|
|
10494
|
+
]
|
|
10495
|
+
},
|
|
9904
10496
|
{
|
|
9905
10497
|
name: "fund_reward",
|
|
9906
10498
|
discriminator: [
|
|
@@ -11463,8 +12055,14 @@ var instructions = [
|
|
|
11463
12055
|
writable: true
|
|
11464
12056
|
},
|
|
11465
12057
|
{
|
|
11466
|
-
name: "
|
|
11467
|
-
|
|
12058
|
+
name: "operator"
|
|
12059
|
+
},
|
|
12060
|
+
{
|
|
12061
|
+
name: "whitelisted_address",
|
|
12062
|
+
signer: true,
|
|
12063
|
+
relations: [
|
|
12064
|
+
"operator"
|
|
12065
|
+
]
|
|
11468
12066
|
},
|
|
11469
12067
|
{
|
|
11470
12068
|
name: "event_authority",
|
|
@@ -11844,7 +12442,7 @@ var instructions = [
|
|
|
11844
12442
|
],
|
|
11845
12443
|
args: [
|
|
11846
12444
|
{
|
|
11847
|
-
name: "
|
|
12445
|
+
name: "_params",
|
|
11848
12446
|
type: {
|
|
11849
12447
|
defined: {
|
|
11850
12448
|
name: "SwapParameters"
|
|
@@ -11985,7 +12583,7 @@ var instructions = [
|
|
|
11985
12583
|
],
|
|
11986
12584
|
args: [
|
|
11987
12585
|
{
|
|
11988
|
-
name: "
|
|
12586
|
+
name: "_params",
|
|
11989
12587
|
type: {
|
|
11990
12588
|
defined: {
|
|
11991
12589
|
name: "SwapParameters2"
|
|
@@ -11994,6 +12592,77 @@ var instructions = [
|
|
|
11994
12592
|
}
|
|
11995
12593
|
]
|
|
11996
12594
|
},
|
|
12595
|
+
{
|
|
12596
|
+
name: "update_pool_fees",
|
|
12597
|
+
discriminator: [
|
|
12598
|
+
118,
|
|
12599
|
+
217,
|
|
12600
|
+
203,
|
|
12601
|
+
179,
|
|
12602
|
+
60,
|
|
12603
|
+
8,
|
|
12604
|
+
70,
|
|
12605
|
+
89
|
|
12606
|
+
],
|
|
12607
|
+
accounts: [
|
|
12608
|
+
{
|
|
12609
|
+
name: "pool",
|
|
12610
|
+
writable: true
|
|
12611
|
+
},
|
|
12612
|
+
{
|
|
12613
|
+
name: "operator"
|
|
12614
|
+
},
|
|
12615
|
+
{
|
|
12616
|
+
name: "whitelisted_address",
|
|
12617
|
+
signer: true,
|
|
12618
|
+
relations: [
|
|
12619
|
+
"operator"
|
|
12620
|
+
]
|
|
12621
|
+
},
|
|
12622
|
+
{
|
|
12623
|
+
name: "event_authority",
|
|
12624
|
+
pda: {
|
|
12625
|
+
seeds: [
|
|
12626
|
+
{
|
|
12627
|
+
kind: "const",
|
|
12628
|
+
value: [
|
|
12629
|
+
95,
|
|
12630
|
+
95,
|
|
12631
|
+
101,
|
|
12632
|
+
118,
|
|
12633
|
+
101,
|
|
12634
|
+
110,
|
|
12635
|
+
116,
|
|
12636
|
+
95,
|
|
12637
|
+
97,
|
|
12638
|
+
117,
|
|
12639
|
+
116,
|
|
12640
|
+
104,
|
|
12641
|
+
111,
|
|
12642
|
+
114,
|
|
12643
|
+
105,
|
|
12644
|
+
116,
|
|
12645
|
+
121
|
|
12646
|
+
]
|
|
12647
|
+
}
|
|
12648
|
+
]
|
|
12649
|
+
}
|
|
12650
|
+
},
|
|
12651
|
+
{
|
|
12652
|
+
name: "program"
|
|
12653
|
+
}
|
|
12654
|
+
],
|
|
12655
|
+
args: [
|
|
12656
|
+
{
|
|
12657
|
+
name: "params",
|
|
12658
|
+
type: {
|
|
12659
|
+
defined: {
|
|
12660
|
+
name: "UpdatePoolFeesParameters"
|
|
12661
|
+
}
|
|
12662
|
+
}
|
|
12663
|
+
}
|
|
12664
|
+
]
|
|
12665
|
+
},
|
|
11997
12666
|
{
|
|
11998
12667
|
name: "update_reward_duration",
|
|
11999
12668
|
discriminator: [
|
|
@@ -12205,19 +12874,6 @@ var instructions = [
|
|
|
12205
12874
|
}
|
|
12206
12875
|
];
|
|
12207
12876
|
var accounts = [
|
|
12208
|
-
{
|
|
12209
|
-
name: "ClaimFeeOperator",
|
|
12210
|
-
discriminator: [
|
|
12211
|
-
166,
|
|
12212
|
-
48,
|
|
12213
|
-
134,
|
|
12214
|
-
86,
|
|
12215
|
-
34,
|
|
12216
|
-
200,
|
|
12217
|
-
188,
|
|
12218
|
-
150
|
|
12219
|
-
]
|
|
12220
|
-
},
|
|
12221
12877
|
{
|
|
12222
12878
|
name: "Config",
|
|
12223
12879
|
discriminator: [
|
|
@@ -12231,6 +12887,58 @@ var accounts = [
|
|
|
12231
12887
|
130
|
|
12232
12888
|
]
|
|
12233
12889
|
},
|
|
12890
|
+
{
|
|
12891
|
+
name: "Operator",
|
|
12892
|
+
discriminator: [
|
|
12893
|
+
219,
|
|
12894
|
+
31,
|
|
12895
|
+
188,
|
|
12896
|
+
145,
|
|
12897
|
+
69,
|
|
12898
|
+
139,
|
|
12899
|
+
204,
|
|
12900
|
+
117
|
|
12901
|
+
]
|
|
12902
|
+
},
|
|
12903
|
+
{
|
|
12904
|
+
name: "PodAlignedFeeMarketCapScheduler",
|
|
12905
|
+
discriminator: [
|
|
12906
|
+
251,
|
|
12907
|
+
130,
|
|
12908
|
+
208,
|
|
12909
|
+
253,
|
|
12910
|
+
245,
|
|
12911
|
+
27,
|
|
12912
|
+
145,
|
|
12913
|
+
203
|
|
12914
|
+
]
|
|
12915
|
+
},
|
|
12916
|
+
{
|
|
12917
|
+
name: "PodAlignedFeeRateLimiter",
|
|
12918
|
+
discriminator: [
|
|
12919
|
+
160,
|
|
12920
|
+
219,
|
|
12921
|
+
8,
|
|
12922
|
+
251,
|
|
12923
|
+
179,
|
|
12924
|
+
7,
|
|
12925
|
+
16,
|
|
12926
|
+
117
|
|
12927
|
+
]
|
|
12928
|
+
},
|
|
12929
|
+
{
|
|
12930
|
+
name: "PodAlignedFeeTimeScheduler",
|
|
12931
|
+
discriminator: [
|
|
12932
|
+
239,
|
|
12933
|
+
132,
|
|
12934
|
+
138,
|
|
12935
|
+
213,
|
|
12936
|
+
67,
|
|
12937
|
+
154,
|
|
12938
|
+
130,
|
|
12939
|
+
70
|
|
12940
|
+
]
|
|
12941
|
+
},
|
|
12234
12942
|
{
|
|
12235
12943
|
name: "Pool",
|
|
12236
12944
|
discriminator: [
|
|
@@ -12285,19 +12993,6 @@ var accounts = [
|
|
|
12285
12993
|
}
|
|
12286
12994
|
];
|
|
12287
12995
|
var events = [
|
|
12288
|
-
{
|
|
12289
|
-
name: "EvtAddLiquidity",
|
|
12290
|
-
discriminator: [
|
|
12291
|
-
175,
|
|
12292
|
-
242,
|
|
12293
|
-
8,
|
|
12294
|
-
157,
|
|
12295
|
-
30,
|
|
12296
|
-
247,
|
|
12297
|
-
185,
|
|
12298
|
-
169
|
|
12299
|
-
]
|
|
12300
|
-
},
|
|
12301
12996
|
{
|
|
12302
12997
|
name: "EvtClaimPartnerFee",
|
|
12303
12998
|
discriminator: [
|
|
@@ -12351,20 +13046,7 @@ var events = [
|
|
|
12351
13046
|
]
|
|
12352
13047
|
},
|
|
12353
13048
|
{
|
|
12354
|
-
name: "
|
|
12355
|
-
discriminator: [
|
|
12356
|
-
111,
|
|
12357
|
-
39,
|
|
12358
|
-
37,
|
|
12359
|
-
55,
|
|
12360
|
-
110,
|
|
12361
|
-
216,
|
|
12362
|
-
194,
|
|
12363
|
-
23
|
|
12364
|
-
]
|
|
12365
|
-
},
|
|
12366
|
-
{
|
|
12367
|
-
name: "EvtCloseConfig",
|
|
13049
|
+
name: "EvtCloseConfig",
|
|
12368
13050
|
discriminator: [
|
|
12369
13051
|
36,
|
|
12370
13052
|
30,
|
|
@@ -12389,19 +13071,6 @@ var events = [
|
|
|
12389
13071
|
178
|
|
12390
13072
|
]
|
|
12391
13073
|
},
|
|
12392
|
-
{
|
|
12393
|
-
name: "EvtCreateClaimFeeOperator",
|
|
12394
|
-
discriminator: [
|
|
12395
|
-
21,
|
|
12396
|
-
6,
|
|
12397
|
-
153,
|
|
12398
|
-
120,
|
|
12399
|
-
68,
|
|
12400
|
-
116,
|
|
12401
|
-
28,
|
|
12402
|
-
177
|
|
12403
|
-
]
|
|
12404
|
-
},
|
|
12405
13074
|
{
|
|
12406
13075
|
name: "EvtCreateConfig",
|
|
12407
13076
|
discriminator: [
|
|
@@ -12532,19 +13201,6 @@ var events = [
|
|
|
12532
13201
|
11
|
|
12533
13202
|
]
|
|
12534
13203
|
},
|
|
12535
|
-
{
|
|
12536
|
-
name: "EvtRemoveLiquidity",
|
|
12537
|
-
discriminator: [
|
|
12538
|
-
87,
|
|
12539
|
-
46,
|
|
12540
|
-
88,
|
|
12541
|
-
98,
|
|
12542
|
-
175,
|
|
12543
|
-
96,
|
|
12544
|
-
34,
|
|
12545
|
-
91
|
|
12546
|
-
]
|
|
12547
|
-
},
|
|
12548
13204
|
{
|
|
12549
13205
|
name: "EvtSetPoolStatus",
|
|
12550
13206
|
discriminator: [
|
|
@@ -12571,19 +13227,6 @@ var events = [
|
|
|
12571
13227
|
103
|
|
12572
13228
|
]
|
|
12573
13229
|
},
|
|
12574
|
-
{
|
|
12575
|
-
name: "EvtSwap",
|
|
12576
|
-
discriminator: [
|
|
12577
|
-
27,
|
|
12578
|
-
60,
|
|
12579
|
-
21,
|
|
12580
|
-
213,
|
|
12581
|
-
138,
|
|
12582
|
-
170,
|
|
12583
|
-
187,
|
|
12584
|
-
147
|
|
12585
|
-
]
|
|
12586
|
-
},
|
|
12587
13230
|
{
|
|
12588
13231
|
name: "EvtSwap2",
|
|
12589
13232
|
discriminator: [
|
|
@@ -12597,6 +13240,19 @@ var events = [
|
|
|
12597
13240
|
153
|
|
12598
13241
|
]
|
|
12599
13242
|
},
|
|
13243
|
+
{
|
|
13244
|
+
name: "EvtUpdatePoolFees",
|
|
13245
|
+
discriminator: [
|
|
13246
|
+
76,
|
|
13247
|
+
165,
|
|
13248
|
+
246,
|
|
13249
|
+
102,
|
|
13250
|
+
102,
|
|
13251
|
+
217,
|
|
13252
|
+
156,
|
|
13253
|
+
44
|
|
13254
|
+
]
|
|
13255
|
+
},
|
|
12600
13256
|
{
|
|
12601
13257
|
name: "EvtUpdateRewardDuration",
|
|
12602
13258
|
discriminator: [
|
|
@@ -12890,7 +13546,7 @@ var errors = [
|
|
|
12890
13546
|
},
|
|
12891
13547
|
{
|
|
12892
13548
|
code: 6050,
|
|
12893
|
-
name: "
|
|
13549
|
+
name: "InvalidFeeTimeScheduler",
|
|
12894
13550
|
msg: "Invalid fee scheduler"
|
|
12895
13551
|
},
|
|
12896
13552
|
{
|
|
@@ -12902,6 +13558,41 @@ var errors = [
|
|
|
12902
13558
|
code: 6052,
|
|
12903
13559
|
name: "InvalidPoolVersion",
|
|
12904
13560
|
msg: "Invalid pool version"
|
|
13561
|
+
},
|
|
13562
|
+
{
|
|
13563
|
+
code: 6053,
|
|
13564
|
+
name: "InvalidAuthority",
|
|
13565
|
+
msg: "Invalid authority to do that action"
|
|
13566
|
+
},
|
|
13567
|
+
{
|
|
13568
|
+
code: 6054,
|
|
13569
|
+
name: "InvalidPermission",
|
|
13570
|
+
msg: "Invalid permission"
|
|
13571
|
+
},
|
|
13572
|
+
{
|
|
13573
|
+
code: 6055,
|
|
13574
|
+
name: "InvalidFeeMarketCapScheduler",
|
|
13575
|
+
msg: "Invalid fee market cap scheduler"
|
|
13576
|
+
},
|
|
13577
|
+
{
|
|
13578
|
+
code: 6056,
|
|
13579
|
+
name: "CannotUpdateBaseFee",
|
|
13580
|
+
msg: "Cannot update base fee"
|
|
13581
|
+
},
|
|
13582
|
+
{
|
|
13583
|
+
code: 6057,
|
|
13584
|
+
name: "InvalidDynamicFeeParameters",
|
|
13585
|
+
msg: "Invalid dynamic fee parameters"
|
|
13586
|
+
},
|
|
13587
|
+
{
|
|
13588
|
+
code: 6058,
|
|
13589
|
+
name: "InvalidUpdatePoolFeesParameters",
|
|
13590
|
+
msg: "Invalid update pool fees parameters"
|
|
13591
|
+
},
|
|
13592
|
+
{
|
|
13593
|
+
code: 6059,
|
|
13594
|
+
name: "MissingOperatorAccount",
|
|
13595
|
+
msg: "Missing operator account"
|
|
12905
13596
|
}
|
|
12906
13597
|
];
|
|
12907
13598
|
var types = [
|
|
@@ -12935,7 +13626,7 @@ var types = [
|
|
|
12935
13626
|
}
|
|
12936
13627
|
},
|
|
12937
13628
|
{
|
|
12938
|
-
name: "
|
|
13629
|
+
name: "BaseFeeInfo",
|
|
12939
13630
|
serialization: "bytemuck",
|
|
12940
13631
|
repr: {
|
|
12941
13632
|
kind: "c"
|
|
@@ -12944,44 +13635,60 @@ var types = [
|
|
|
12944
13635
|
kind: "struct",
|
|
12945
13636
|
fields: [
|
|
12946
13637
|
{
|
|
12947
|
-
name: "
|
|
12948
|
-
type: "u64"
|
|
12949
|
-
},
|
|
12950
|
-
{
|
|
12951
|
-
name: "base_fee_mode",
|
|
12952
|
-
type: "u8"
|
|
12953
|
-
},
|
|
12954
|
-
{
|
|
12955
|
-
name: "padding",
|
|
13638
|
+
name: "data",
|
|
12956
13639
|
type: {
|
|
12957
13640
|
array: [
|
|
12958
13641
|
"u8",
|
|
12959
|
-
|
|
13642
|
+
32
|
|
12960
13643
|
]
|
|
12961
13644
|
}
|
|
12962
|
-
}
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
13645
|
+
}
|
|
13646
|
+
]
|
|
13647
|
+
}
|
|
13648
|
+
},
|
|
13649
|
+
{
|
|
13650
|
+
name: "BaseFeeParameters",
|
|
13651
|
+
type: {
|
|
13652
|
+
kind: "struct",
|
|
13653
|
+
fields: [
|
|
12967
13654
|
{
|
|
12968
|
-
name: "
|
|
13655
|
+
name: "data",
|
|
12969
13656
|
type: {
|
|
12970
13657
|
array: [
|
|
12971
13658
|
"u8",
|
|
12972
|
-
|
|
13659
|
+
30
|
|
12973
13660
|
]
|
|
12974
13661
|
}
|
|
13662
|
+
}
|
|
13663
|
+
]
|
|
13664
|
+
}
|
|
13665
|
+
},
|
|
13666
|
+
{
|
|
13667
|
+
name: "BaseFeeStruct",
|
|
13668
|
+
serialization: "bytemuck",
|
|
13669
|
+
repr: {
|
|
13670
|
+
kind: "c"
|
|
13671
|
+
},
|
|
13672
|
+
type: {
|
|
13673
|
+
kind: "struct",
|
|
13674
|
+
fields: [
|
|
13675
|
+
{
|
|
13676
|
+
name: "base_fee_info",
|
|
13677
|
+
type: {
|
|
13678
|
+
defined: {
|
|
13679
|
+
name: "BaseFeeInfo"
|
|
13680
|
+
}
|
|
13681
|
+
}
|
|
12975
13682
|
},
|
|
12976
13683
|
{
|
|
12977
|
-
name: "
|
|
13684
|
+
name: "padding_1",
|
|
12978
13685
|
type: "u64"
|
|
12979
13686
|
}
|
|
12980
13687
|
]
|
|
12981
13688
|
}
|
|
12982
13689
|
},
|
|
12983
13690
|
{
|
|
12984
|
-
name: "
|
|
13691
|
+
name: "BorshFeeMarketCapScheduler",
|
|
12985
13692
|
type: {
|
|
12986
13693
|
kind: "struct",
|
|
12987
13694
|
fields: [
|
|
@@ -12990,35 +13697,52 @@ var types = [
|
|
|
12990
13697
|
type: "u64"
|
|
12991
13698
|
},
|
|
12992
13699
|
{
|
|
12993
|
-
name: "
|
|
13700
|
+
name: "number_of_period",
|
|
12994
13701
|
type: "u16"
|
|
12995
13702
|
},
|
|
12996
13703
|
{
|
|
12997
|
-
name: "
|
|
12998
|
-
type:
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
}
|
|
13704
|
+
name: "sqrt_price_step_bps",
|
|
13705
|
+
type: "u32"
|
|
13706
|
+
},
|
|
13707
|
+
{
|
|
13708
|
+
name: "scheduler_expiration_duration",
|
|
13709
|
+
type: "u32"
|
|
13004
13710
|
},
|
|
13005
13711
|
{
|
|
13006
|
-
name: "
|
|
13712
|
+
name: "reduction_factor",
|
|
13007
13713
|
type: "u64"
|
|
13008
13714
|
},
|
|
13009
13715
|
{
|
|
13010
13716
|
name: "base_fee_mode",
|
|
13011
13717
|
type: "u8"
|
|
13718
|
+
},
|
|
13719
|
+
{
|
|
13720
|
+
name: "padding",
|
|
13721
|
+
type: {
|
|
13722
|
+
array: [
|
|
13723
|
+
"u8",
|
|
13724
|
+
3
|
|
13725
|
+
]
|
|
13726
|
+
}
|
|
13012
13727
|
}
|
|
13013
13728
|
]
|
|
13014
13729
|
}
|
|
13015
13730
|
},
|
|
13016
13731
|
{
|
|
13017
|
-
name: "
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
|
|
13732
|
+
name: "BorshFeeRateLimiter",
|
|
13733
|
+
docs: [
|
|
13734
|
+
"we denote reference_amount = x0, cliff_fee_numerator = c, fee_increment = i",
|
|
13735
|
+
"if input_amount <= x0, then fee = input_amount * c",
|
|
13736
|
+
"",
|
|
13737
|
+
"if input_amount > x0, then input_amount = x0 + (a * x0 + b)",
|
|
13738
|
+
"if a < max_index",
|
|
13739
|
+
"then fee = x0 * c + x0 * (c + i) + .... + x0 * (c + i*a) + b * (c + i * (a+1))",
|
|
13740
|
+
"then fee = x0 * (c + c*a + i*a*(a+1)/2) + b * (c + i * (a+1))",
|
|
13741
|
+
"",
|
|
13742
|
+
"if a >= max_index",
|
|
13743
|
+
"if a = max_index + d, input_amount = x0 + max_index * x0 + (d * x0 + b)",
|
|
13744
|
+
"then fee = x0 * (c + c*max_index + i*max_index*(max_index+1)/2) + (d * x0 + b) * MAX_FEE"
|
|
13745
|
+
],
|
|
13022
13746
|
type: {
|
|
13023
13747
|
kind: "struct",
|
|
13024
13748
|
fields: [
|
|
@@ -13027,70 +13751,68 @@ var types = [
|
|
|
13027
13751
|
type: "u64"
|
|
13028
13752
|
},
|
|
13029
13753
|
{
|
|
13030
|
-
name: "
|
|
13031
|
-
type: "
|
|
13754
|
+
name: "fee_increment_bps",
|
|
13755
|
+
type: "u16"
|
|
13032
13756
|
},
|
|
13033
13757
|
{
|
|
13034
|
-
name: "
|
|
13035
|
-
type:
|
|
13036
|
-
array: [
|
|
13037
|
-
"u8",
|
|
13038
|
-
5
|
|
13039
|
-
]
|
|
13040
|
-
}
|
|
13758
|
+
name: "max_limiter_duration",
|
|
13759
|
+
type: "u32"
|
|
13041
13760
|
},
|
|
13042
13761
|
{
|
|
13043
|
-
name: "
|
|
13044
|
-
type: "
|
|
13762
|
+
name: "max_fee_bps",
|
|
13763
|
+
type: "u32"
|
|
13764
|
+
},
|
|
13765
|
+
{
|
|
13766
|
+
name: "reference_amount",
|
|
13767
|
+
type: "u64"
|
|
13768
|
+
},
|
|
13769
|
+
{
|
|
13770
|
+
name: "base_fee_mode",
|
|
13771
|
+
type: "u8"
|
|
13045
13772
|
},
|
|
13046
13773
|
{
|
|
13047
|
-
name: "
|
|
13774
|
+
name: "padding",
|
|
13048
13775
|
type: {
|
|
13049
13776
|
array: [
|
|
13050
13777
|
"u8",
|
|
13051
|
-
|
|
13778
|
+
3
|
|
13052
13779
|
]
|
|
13053
13780
|
}
|
|
13054
|
-
},
|
|
13055
|
-
{
|
|
13056
|
-
name: "third_factor",
|
|
13057
|
-
type: "u64"
|
|
13058
|
-
},
|
|
13059
|
-
{
|
|
13060
|
-
name: "padding_1",
|
|
13061
|
-
type: "u64"
|
|
13062
13781
|
}
|
|
13063
13782
|
]
|
|
13064
13783
|
}
|
|
13065
13784
|
},
|
|
13066
13785
|
{
|
|
13067
|
-
name: "
|
|
13068
|
-
docs: [
|
|
13069
|
-
"Parameter that set by the protocol"
|
|
13070
|
-
],
|
|
13071
|
-
serialization: "bytemuck",
|
|
13072
|
-
repr: {
|
|
13073
|
-
kind: "c"
|
|
13074
|
-
},
|
|
13786
|
+
name: "BorshFeeTimeScheduler",
|
|
13075
13787
|
type: {
|
|
13076
13788
|
kind: "struct",
|
|
13077
13789
|
fields: [
|
|
13078
13790
|
{
|
|
13079
|
-
name: "
|
|
13080
|
-
|
|
13081
|
-
"operator"
|
|
13082
|
-
],
|
|
13083
|
-
type: "pubkey"
|
|
13791
|
+
name: "cliff_fee_numerator",
|
|
13792
|
+
type: "u64"
|
|
13084
13793
|
},
|
|
13085
13794
|
{
|
|
13086
|
-
name: "
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13795
|
+
name: "number_of_period",
|
|
13796
|
+
type: "u16"
|
|
13797
|
+
},
|
|
13798
|
+
{
|
|
13799
|
+
name: "period_frequency",
|
|
13800
|
+
type: "u64"
|
|
13801
|
+
},
|
|
13802
|
+
{
|
|
13803
|
+
name: "reduction_factor",
|
|
13804
|
+
type: "u64"
|
|
13805
|
+
},
|
|
13806
|
+
{
|
|
13807
|
+
name: "base_fee_mode",
|
|
13808
|
+
type: "u8"
|
|
13809
|
+
},
|
|
13810
|
+
{
|
|
13811
|
+
name: "padding",
|
|
13090
13812
|
type: {
|
|
13091
13813
|
array: [
|
|
13092
13814
|
"u8",
|
|
13093
|
-
|
|
13815
|
+
3
|
|
13094
13816
|
]
|
|
13095
13817
|
}
|
|
13096
13818
|
}
|
|
@@ -13201,6 +13923,38 @@ var types = [
|
|
|
13201
13923
|
]
|
|
13202
13924
|
}
|
|
13203
13925
|
},
|
|
13926
|
+
{
|
|
13927
|
+
name: "DummyParams",
|
|
13928
|
+
type: {
|
|
13929
|
+
kind: "struct",
|
|
13930
|
+
fields: [
|
|
13931
|
+
{
|
|
13932
|
+
name: "borsh_fee_time_scheduler_params",
|
|
13933
|
+
type: {
|
|
13934
|
+
defined: {
|
|
13935
|
+
name: "BorshFeeTimeScheduler"
|
|
13936
|
+
}
|
|
13937
|
+
}
|
|
13938
|
+
},
|
|
13939
|
+
{
|
|
13940
|
+
name: "borsh_fee_rate_limiter_params",
|
|
13941
|
+
type: {
|
|
13942
|
+
defined: {
|
|
13943
|
+
name: "BorshFeeRateLimiter"
|
|
13944
|
+
}
|
|
13945
|
+
}
|
|
13946
|
+
},
|
|
13947
|
+
{
|
|
13948
|
+
name: "borsh_fee_market_cap_scheduler_params",
|
|
13949
|
+
type: {
|
|
13950
|
+
defined: {
|
|
13951
|
+
name: "BorshFeeMarketCapScheduler"
|
|
13952
|
+
}
|
|
13953
|
+
}
|
|
13954
|
+
}
|
|
13955
|
+
]
|
|
13956
|
+
}
|
|
13957
|
+
},
|
|
13204
13958
|
{
|
|
13205
13959
|
name: "DynamicConfigParameters",
|
|
13206
13960
|
type: {
|
|
@@ -13381,7 +14135,7 @@ var types = [
|
|
|
13381
14135
|
}
|
|
13382
14136
|
},
|
|
13383
14137
|
{
|
|
13384
|
-
name: "
|
|
14138
|
+
name: "EvtClaimPartnerFee",
|
|
13385
14139
|
type: {
|
|
13386
14140
|
kind: "struct",
|
|
13387
14141
|
fields: [
|
|
@@ -13389,22 +14143,6 @@ var types = [
|
|
|
13389
14143
|
name: "pool",
|
|
13390
14144
|
type: "pubkey"
|
|
13391
14145
|
},
|
|
13392
|
-
{
|
|
13393
|
-
name: "position",
|
|
13394
|
-
type: "pubkey"
|
|
13395
|
-
},
|
|
13396
|
-
{
|
|
13397
|
-
name: "owner",
|
|
13398
|
-
type: "pubkey"
|
|
13399
|
-
},
|
|
13400
|
-
{
|
|
13401
|
-
name: "params",
|
|
13402
|
-
type: {
|
|
13403
|
-
defined: {
|
|
13404
|
-
name: "AddLiquidityParameters"
|
|
13405
|
-
}
|
|
13406
|
-
}
|
|
13407
|
-
},
|
|
13408
14146
|
{
|
|
13409
14147
|
name: "token_a_amount",
|
|
13410
14148
|
type: "u64"
|
|
@@ -13412,20 +14150,12 @@ var types = [
|
|
|
13412
14150
|
{
|
|
13413
14151
|
name: "token_b_amount",
|
|
13414
14152
|
type: "u64"
|
|
13415
|
-
},
|
|
13416
|
-
{
|
|
13417
|
-
name: "total_amount_a",
|
|
13418
|
-
type: "u64"
|
|
13419
|
-
},
|
|
13420
|
-
{
|
|
13421
|
-
name: "total_amount_b",
|
|
13422
|
-
type: "u64"
|
|
13423
14153
|
}
|
|
13424
14154
|
]
|
|
13425
14155
|
}
|
|
13426
14156
|
},
|
|
13427
14157
|
{
|
|
13428
|
-
name: "
|
|
14158
|
+
name: "EvtClaimPositionFee",
|
|
13429
14159
|
type: {
|
|
13430
14160
|
kind: "struct",
|
|
13431
14161
|
fields: [
|
|
@@ -13434,35 +14164,15 @@ var types = [
|
|
|
13434
14164
|
type: "pubkey"
|
|
13435
14165
|
},
|
|
13436
14166
|
{
|
|
13437
|
-
name: "
|
|
13438
|
-
type: "
|
|
14167
|
+
name: "position",
|
|
14168
|
+
type: "pubkey"
|
|
13439
14169
|
},
|
|
13440
14170
|
{
|
|
13441
|
-
name: "
|
|
13442
|
-
type: "
|
|
13443
|
-
}
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
},
|
|
13447
|
-
{
|
|
13448
|
-
name: "EvtClaimPositionFee",
|
|
13449
|
-
type: {
|
|
13450
|
-
kind: "struct",
|
|
13451
|
-
fields: [
|
|
13452
|
-
{
|
|
13453
|
-
name: "pool",
|
|
13454
|
-
type: "pubkey"
|
|
13455
|
-
},
|
|
13456
|
-
{
|
|
13457
|
-
name: "position",
|
|
13458
|
-
type: "pubkey"
|
|
13459
|
-
},
|
|
13460
|
-
{
|
|
13461
|
-
name: "owner",
|
|
13462
|
-
type: "pubkey"
|
|
13463
|
-
},
|
|
13464
|
-
{
|
|
13465
|
-
name: "fee_a_claimed",
|
|
14171
|
+
name: "owner",
|
|
14172
|
+
type: "pubkey"
|
|
14173
|
+
},
|
|
14174
|
+
{
|
|
14175
|
+
name: "fee_a_claimed",
|
|
13466
14176
|
type: "u64"
|
|
13467
14177
|
},
|
|
13468
14178
|
{
|
|
@@ -13524,25 +14234,6 @@ var types = [
|
|
|
13524
14234
|
]
|
|
13525
14235
|
}
|
|
13526
14236
|
},
|
|
13527
|
-
{
|
|
13528
|
-
name: "EvtCloseClaimFeeOperator",
|
|
13529
|
-
docs: [
|
|
13530
|
-
"Close claim fee operator"
|
|
13531
|
-
],
|
|
13532
|
-
type: {
|
|
13533
|
-
kind: "struct",
|
|
13534
|
-
fields: [
|
|
13535
|
-
{
|
|
13536
|
-
name: "claim_fee_operator",
|
|
13537
|
-
type: "pubkey"
|
|
13538
|
-
},
|
|
13539
|
-
{
|
|
13540
|
-
name: "operator",
|
|
13541
|
-
type: "pubkey"
|
|
13542
|
-
}
|
|
13543
|
-
]
|
|
13544
|
-
}
|
|
13545
|
-
},
|
|
13546
14237
|
{
|
|
13547
14238
|
name: "EvtCloseConfig",
|
|
13548
14239
|
docs: [
|
|
@@ -13592,21 +14283,6 @@ var types = [
|
|
|
13592
14283
|
]
|
|
13593
14284
|
}
|
|
13594
14285
|
},
|
|
13595
|
-
{
|
|
13596
|
-
name: "EvtCreateClaimFeeOperator",
|
|
13597
|
-
docs: [
|
|
13598
|
-
"Create claim fee operator"
|
|
13599
|
-
],
|
|
13600
|
-
type: {
|
|
13601
|
-
kind: "struct",
|
|
13602
|
-
fields: [
|
|
13603
|
-
{
|
|
13604
|
-
name: "operator",
|
|
13605
|
-
type: "pubkey"
|
|
13606
|
-
}
|
|
13607
|
-
]
|
|
13608
|
-
}
|
|
13609
|
-
},
|
|
13610
14286
|
{
|
|
13611
14287
|
name: "EvtCreateConfig",
|
|
13612
14288
|
docs: [
|
|
@@ -14020,42 +14696,6 @@ var types = [
|
|
|
14020
14696
|
]
|
|
14021
14697
|
}
|
|
14022
14698
|
},
|
|
14023
|
-
{
|
|
14024
|
-
name: "EvtRemoveLiquidity",
|
|
14025
|
-
type: {
|
|
14026
|
-
kind: "struct",
|
|
14027
|
-
fields: [
|
|
14028
|
-
{
|
|
14029
|
-
name: "pool",
|
|
14030
|
-
type: "pubkey"
|
|
14031
|
-
},
|
|
14032
|
-
{
|
|
14033
|
-
name: "position",
|
|
14034
|
-
type: "pubkey"
|
|
14035
|
-
},
|
|
14036
|
-
{
|
|
14037
|
-
name: "owner",
|
|
14038
|
-
type: "pubkey"
|
|
14039
|
-
},
|
|
14040
|
-
{
|
|
14041
|
-
name: "params",
|
|
14042
|
-
type: {
|
|
14043
|
-
defined: {
|
|
14044
|
-
name: "RemoveLiquidityParameters"
|
|
14045
|
-
}
|
|
14046
|
-
}
|
|
14047
|
-
},
|
|
14048
|
-
{
|
|
14049
|
-
name: "token_a_amount",
|
|
14050
|
-
type: "u64"
|
|
14051
|
-
},
|
|
14052
|
-
{
|
|
14053
|
-
name: "token_b_amount",
|
|
14054
|
-
type: "u64"
|
|
14055
|
-
}
|
|
14056
|
-
]
|
|
14057
|
-
}
|
|
14058
|
-
},
|
|
14059
14699
|
{
|
|
14060
14700
|
name: "EvtSetPoolStatus",
|
|
14061
14701
|
type: {
|
|
@@ -14136,50 +14776,6 @@ var types = [
|
|
|
14136
14776
|
]
|
|
14137
14777
|
}
|
|
14138
14778
|
},
|
|
14139
|
-
{
|
|
14140
|
-
name: "EvtSwap",
|
|
14141
|
-
type: {
|
|
14142
|
-
kind: "struct",
|
|
14143
|
-
fields: [
|
|
14144
|
-
{
|
|
14145
|
-
name: "pool",
|
|
14146
|
-
type: "pubkey"
|
|
14147
|
-
},
|
|
14148
|
-
{
|
|
14149
|
-
name: "trade_direction",
|
|
14150
|
-
type: "u8"
|
|
14151
|
-
},
|
|
14152
|
-
{
|
|
14153
|
-
name: "has_referral",
|
|
14154
|
-
type: "bool"
|
|
14155
|
-
},
|
|
14156
|
-
{
|
|
14157
|
-
name: "params",
|
|
14158
|
-
type: {
|
|
14159
|
-
defined: {
|
|
14160
|
-
name: "SwapParameters"
|
|
14161
|
-
}
|
|
14162
|
-
}
|
|
14163
|
-
},
|
|
14164
|
-
{
|
|
14165
|
-
name: "swap_result",
|
|
14166
|
-
type: {
|
|
14167
|
-
defined: {
|
|
14168
|
-
name: "SwapResult"
|
|
14169
|
-
}
|
|
14170
|
-
}
|
|
14171
|
-
},
|
|
14172
|
-
{
|
|
14173
|
-
name: "actual_amount_in",
|
|
14174
|
-
type: "u64"
|
|
14175
|
-
},
|
|
14176
|
-
{
|
|
14177
|
-
name: "current_timestamp",
|
|
14178
|
-
type: "u64"
|
|
14179
|
-
}
|
|
14180
|
-
]
|
|
14181
|
-
}
|
|
14182
|
-
},
|
|
14183
14779
|
{
|
|
14184
14780
|
name: "EvtSwap2",
|
|
14185
14781
|
type: {
|
|
@@ -14244,6 +14840,30 @@ var types = [
|
|
|
14244
14840
|
]
|
|
14245
14841
|
}
|
|
14246
14842
|
},
|
|
14843
|
+
{
|
|
14844
|
+
name: "EvtUpdatePoolFees",
|
|
14845
|
+
type: {
|
|
14846
|
+
kind: "struct",
|
|
14847
|
+
fields: [
|
|
14848
|
+
{
|
|
14849
|
+
name: "pool",
|
|
14850
|
+
type: "pubkey"
|
|
14851
|
+
},
|
|
14852
|
+
{
|
|
14853
|
+
name: "operator",
|
|
14854
|
+
type: "pubkey"
|
|
14855
|
+
},
|
|
14856
|
+
{
|
|
14857
|
+
name: "params",
|
|
14858
|
+
type: {
|
|
14859
|
+
defined: {
|
|
14860
|
+
name: "UpdatePoolFeesParameters"
|
|
14861
|
+
}
|
|
14862
|
+
}
|
|
14863
|
+
}
|
|
14864
|
+
]
|
|
14865
|
+
}
|
|
14866
|
+
},
|
|
14247
14867
|
{
|
|
14248
14868
|
name: "EvtUpdateRewardDuration",
|
|
14249
14869
|
type: {
|
|
@@ -14298,124 +14918,284 @@ var types = [
|
|
|
14298
14918
|
kind: "struct",
|
|
14299
14919
|
fields: [
|
|
14300
14920
|
{
|
|
14301
|
-
name: "pool",
|
|
14302
|
-
type: "pubkey"
|
|
14921
|
+
name: "pool",
|
|
14922
|
+
type: "pubkey"
|
|
14923
|
+
},
|
|
14924
|
+
{
|
|
14925
|
+
name: "reward_mint",
|
|
14926
|
+
type: "pubkey"
|
|
14927
|
+
},
|
|
14928
|
+
{
|
|
14929
|
+
name: "amount",
|
|
14930
|
+
type: "u64"
|
|
14931
|
+
}
|
|
14932
|
+
]
|
|
14933
|
+
}
|
|
14934
|
+
},
|
|
14935
|
+
{
|
|
14936
|
+
name: "InitializeCustomizablePoolParameters",
|
|
14937
|
+
type: {
|
|
14938
|
+
kind: "struct",
|
|
14939
|
+
fields: [
|
|
14940
|
+
{
|
|
14941
|
+
name: "pool_fees",
|
|
14942
|
+
docs: [
|
|
14943
|
+
"pool fees"
|
|
14944
|
+
],
|
|
14945
|
+
type: {
|
|
14946
|
+
defined: {
|
|
14947
|
+
name: "PoolFeeParameters"
|
|
14948
|
+
}
|
|
14949
|
+
}
|
|
14950
|
+
},
|
|
14951
|
+
{
|
|
14952
|
+
name: "sqrt_min_price",
|
|
14953
|
+
docs: [
|
|
14954
|
+
"sqrt min price"
|
|
14955
|
+
],
|
|
14956
|
+
type: "u128"
|
|
14957
|
+
},
|
|
14958
|
+
{
|
|
14959
|
+
name: "sqrt_max_price",
|
|
14960
|
+
docs: [
|
|
14961
|
+
"sqrt max price"
|
|
14962
|
+
],
|
|
14963
|
+
type: "u128"
|
|
14964
|
+
},
|
|
14965
|
+
{
|
|
14966
|
+
name: "has_alpha_vault",
|
|
14967
|
+
docs: [
|
|
14968
|
+
"has alpha vault"
|
|
14969
|
+
],
|
|
14970
|
+
type: "bool"
|
|
14971
|
+
},
|
|
14972
|
+
{
|
|
14973
|
+
name: "liquidity",
|
|
14974
|
+
docs: [
|
|
14975
|
+
"initialize liquidity"
|
|
14976
|
+
],
|
|
14977
|
+
type: "u128"
|
|
14978
|
+
},
|
|
14979
|
+
{
|
|
14980
|
+
name: "sqrt_price",
|
|
14981
|
+
docs: [
|
|
14982
|
+
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value. Market cap fee scheduler minimum price will be derived from this value"
|
|
14983
|
+
],
|
|
14984
|
+
type: "u128"
|
|
14985
|
+
},
|
|
14986
|
+
{
|
|
14987
|
+
name: "activation_type",
|
|
14988
|
+
docs: [
|
|
14989
|
+
"activation type"
|
|
14990
|
+
],
|
|
14991
|
+
type: "u8"
|
|
14992
|
+
},
|
|
14993
|
+
{
|
|
14994
|
+
name: "collect_fee_mode",
|
|
14995
|
+
docs: [
|
|
14996
|
+
"collect fee mode"
|
|
14997
|
+
],
|
|
14998
|
+
type: "u8"
|
|
14999
|
+
},
|
|
15000
|
+
{
|
|
15001
|
+
name: "activation_point",
|
|
15002
|
+
docs: [
|
|
15003
|
+
"activation point"
|
|
15004
|
+
],
|
|
15005
|
+
type: {
|
|
15006
|
+
option: "u64"
|
|
15007
|
+
}
|
|
15008
|
+
}
|
|
15009
|
+
]
|
|
15010
|
+
}
|
|
15011
|
+
},
|
|
15012
|
+
{
|
|
15013
|
+
name: "InitializePoolParameters",
|
|
15014
|
+
type: {
|
|
15015
|
+
kind: "struct",
|
|
15016
|
+
fields: [
|
|
15017
|
+
{
|
|
15018
|
+
name: "liquidity",
|
|
15019
|
+
docs: [
|
|
15020
|
+
"initialize liquidity"
|
|
15021
|
+
],
|
|
15022
|
+
type: "u128"
|
|
15023
|
+
},
|
|
15024
|
+
{
|
|
15025
|
+
name: "sqrt_price",
|
|
15026
|
+
docs: [
|
|
15027
|
+
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"
|
|
15028
|
+
],
|
|
15029
|
+
type: "u128"
|
|
15030
|
+
},
|
|
15031
|
+
{
|
|
15032
|
+
name: "activation_point",
|
|
15033
|
+
docs: [
|
|
15034
|
+
"activation point"
|
|
15035
|
+
],
|
|
15036
|
+
type: {
|
|
15037
|
+
option: "u64"
|
|
15038
|
+
}
|
|
15039
|
+
}
|
|
15040
|
+
]
|
|
15041
|
+
}
|
|
15042
|
+
},
|
|
15043
|
+
{
|
|
15044
|
+
name: "Operator",
|
|
15045
|
+
serialization: "bytemuck",
|
|
15046
|
+
repr: {
|
|
15047
|
+
kind: "c"
|
|
15048
|
+
},
|
|
15049
|
+
type: {
|
|
15050
|
+
kind: "struct",
|
|
15051
|
+
fields: [
|
|
15052
|
+
{
|
|
15053
|
+
name: "whitelisted_address",
|
|
15054
|
+
type: "pubkey"
|
|
15055
|
+
},
|
|
15056
|
+
{
|
|
15057
|
+
name: "permission",
|
|
15058
|
+
type: "u128"
|
|
15059
|
+
},
|
|
15060
|
+
{
|
|
15061
|
+
name: "padding",
|
|
15062
|
+
type: {
|
|
15063
|
+
array: [
|
|
15064
|
+
"u64",
|
|
15065
|
+
2
|
|
15066
|
+
]
|
|
15067
|
+
}
|
|
15068
|
+
}
|
|
15069
|
+
]
|
|
15070
|
+
}
|
|
15071
|
+
},
|
|
15072
|
+
{
|
|
15073
|
+
name: "PodAlignedFeeMarketCapScheduler",
|
|
15074
|
+
serialization: "bytemuck",
|
|
15075
|
+
repr: {
|
|
15076
|
+
kind: "c"
|
|
15077
|
+
},
|
|
15078
|
+
type: {
|
|
15079
|
+
kind: "struct",
|
|
15080
|
+
fields: [
|
|
15081
|
+
{
|
|
15082
|
+
name: "cliff_fee_numerator",
|
|
15083
|
+
type: "u64"
|
|
15084
|
+
},
|
|
15085
|
+
{
|
|
15086
|
+
name: "base_fee_mode",
|
|
15087
|
+
type: "u8"
|
|
15088
|
+
},
|
|
15089
|
+
{
|
|
15090
|
+
name: "padding",
|
|
15091
|
+
type: {
|
|
15092
|
+
array: [
|
|
15093
|
+
"u8",
|
|
15094
|
+
5
|
|
15095
|
+
]
|
|
15096
|
+
}
|
|
15097
|
+
},
|
|
15098
|
+
{
|
|
15099
|
+
name: "number_of_period",
|
|
15100
|
+
type: "u16"
|
|
14303
15101
|
},
|
|
14304
15102
|
{
|
|
14305
|
-
name: "
|
|
14306
|
-
type: "
|
|
15103
|
+
name: "sqrt_price_step_bps",
|
|
15104
|
+
type: "u32"
|
|
14307
15105
|
},
|
|
14308
15106
|
{
|
|
14309
|
-
name: "
|
|
15107
|
+
name: "scheduler_expiration_duration",
|
|
15108
|
+
type: "u32"
|
|
15109
|
+
},
|
|
15110
|
+
{
|
|
15111
|
+
name: "reduction_factor",
|
|
14310
15112
|
type: "u64"
|
|
14311
15113
|
}
|
|
14312
15114
|
]
|
|
14313
15115
|
}
|
|
14314
15116
|
},
|
|
14315
15117
|
{
|
|
14316
|
-
name: "
|
|
15118
|
+
name: "PodAlignedFeeRateLimiter",
|
|
15119
|
+
serialization: "bytemuck",
|
|
15120
|
+
repr: {
|
|
15121
|
+
kind: "c"
|
|
15122
|
+
},
|
|
14317
15123
|
type: {
|
|
14318
15124
|
kind: "struct",
|
|
14319
15125
|
fields: [
|
|
14320
15126
|
{
|
|
14321
|
-
name: "
|
|
14322
|
-
|
|
14323
|
-
"pool fees"
|
|
14324
|
-
],
|
|
14325
|
-
type: {
|
|
14326
|
-
defined: {
|
|
14327
|
-
name: "PoolFeeParameters"
|
|
14328
|
-
}
|
|
14329
|
-
}
|
|
14330
|
-
},
|
|
14331
|
-
{
|
|
14332
|
-
name: "sqrt_min_price",
|
|
14333
|
-
docs: [
|
|
14334
|
-
"sqrt min price"
|
|
14335
|
-
],
|
|
14336
|
-
type: "u128"
|
|
14337
|
-
},
|
|
14338
|
-
{
|
|
14339
|
-
name: "sqrt_max_price",
|
|
14340
|
-
docs: [
|
|
14341
|
-
"sqrt max price"
|
|
14342
|
-
],
|
|
14343
|
-
type: "u128"
|
|
15127
|
+
name: "cliff_fee_numerator",
|
|
15128
|
+
type: "u64"
|
|
14344
15129
|
},
|
|
14345
15130
|
{
|
|
14346
|
-
name: "
|
|
14347
|
-
|
|
14348
|
-
"has alpha vault"
|
|
14349
|
-
],
|
|
14350
|
-
type: "bool"
|
|
15131
|
+
name: "base_fee_mode",
|
|
15132
|
+
type: "u8"
|
|
14351
15133
|
},
|
|
14352
15134
|
{
|
|
14353
|
-
name: "
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14357
|
-
|
|
15135
|
+
name: "padding",
|
|
15136
|
+
type: {
|
|
15137
|
+
array: [
|
|
15138
|
+
"u8",
|
|
15139
|
+
5
|
|
15140
|
+
]
|
|
15141
|
+
}
|
|
14358
15142
|
},
|
|
14359
15143
|
{
|
|
14360
|
-
name: "
|
|
14361
|
-
|
|
14362
|
-
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"
|
|
14363
|
-
],
|
|
14364
|
-
type: "u128"
|
|
15144
|
+
name: "fee_increment_bps",
|
|
15145
|
+
type: "u16"
|
|
14365
15146
|
},
|
|
14366
15147
|
{
|
|
14367
|
-
name: "
|
|
14368
|
-
|
|
14369
|
-
"activation type"
|
|
14370
|
-
],
|
|
14371
|
-
type: "u8"
|
|
15148
|
+
name: "max_limiter_duration",
|
|
15149
|
+
type: "u32"
|
|
14372
15150
|
},
|
|
14373
15151
|
{
|
|
14374
|
-
name: "
|
|
14375
|
-
|
|
14376
|
-
"collect fee mode"
|
|
14377
|
-
],
|
|
14378
|
-
type: "u8"
|
|
15152
|
+
name: "max_fee_bps",
|
|
15153
|
+
type: "u32"
|
|
14379
15154
|
},
|
|
14380
15155
|
{
|
|
14381
|
-
name: "
|
|
14382
|
-
|
|
14383
|
-
"activation point"
|
|
14384
|
-
],
|
|
14385
|
-
type: {
|
|
14386
|
-
option: "u64"
|
|
14387
|
-
}
|
|
15156
|
+
name: "reference_amount",
|
|
15157
|
+
type: "u64"
|
|
14388
15158
|
}
|
|
14389
15159
|
]
|
|
14390
15160
|
}
|
|
14391
15161
|
},
|
|
14392
15162
|
{
|
|
14393
|
-
name: "
|
|
15163
|
+
name: "PodAlignedFeeTimeScheduler",
|
|
15164
|
+
serialization: "bytemuck",
|
|
15165
|
+
repr: {
|
|
15166
|
+
kind: "c"
|
|
15167
|
+
},
|
|
14394
15168
|
type: {
|
|
14395
15169
|
kind: "struct",
|
|
14396
15170
|
fields: [
|
|
14397
15171
|
{
|
|
14398
|
-
name: "
|
|
14399
|
-
|
|
14400
|
-
"initialize liquidity"
|
|
14401
|
-
],
|
|
14402
|
-
type: "u128"
|
|
15172
|
+
name: "cliff_fee_numerator",
|
|
15173
|
+
type: "u64"
|
|
14403
15174
|
},
|
|
14404
15175
|
{
|
|
14405
|
-
name: "
|
|
14406
|
-
|
|
14407
|
-
"The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"
|
|
14408
|
-
],
|
|
14409
|
-
type: "u128"
|
|
15176
|
+
name: "base_fee_mode",
|
|
15177
|
+
type: "u8"
|
|
14410
15178
|
},
|
|
14411
15179
|
{
|
|
14412
|
-
name: "
|
|
14413
|
-
docs: [
|
|
14414
|
-
"activation point"
|
|
14415
|
-
],
|
|
15180
|
+
name: "padding",
|
|
14416
15181
|
type: {
|
|
14417
|
-
|
|
15182
|
+
array: [
|
|
15183
|
+
"u8",
|
|
15184
|
+
5
|
|
15185
|
+
]
|
|
14418
15186
|
}
|
|
15187
|
+
},
|
|
15188
|
+
{
|
|
15189
|
+
name: "number_of_period",
|
|
15190
|
+
type: "u16"
|
|
15191
|
+
},
|
|
15192
|
+
{
|
|
15193
|
+
name: "period_frequency",
|
|
15194
|
+
type: "u64"
|
|
15195
|
+
},
|
|
15196
|
+
{
|
|
15197
|
+
name: "reduction_factor",
|
|
15198
|
+
type: "u64"
|
|
14419
15199
|
}
|
|
14420
15200
|
]
|
|
14421
15201
|
}
|
|
@@ -14583,7 +15363,7 @@ var types = [
|
|
|
14583
15363
|
{
|
|
14584
15364
|
name: "collect_fee_mode",
|
|
14585
15365
|
docs: [
|
|
14586
|
-
"0 is collect fee in both token, 1 only collect fee
|
|
15366
|
+
"0 is collect fee in both token, 1 only collect fee only in token b"
|
|
14587
15367
|
],
|
|
14588
15368
|
type: "u8"
|
|
14589
15369
|
},
|
|
@@ -14704,18 +15484,6 @@ var types = [
|
|
|
14704
15484
|
}
|
|
14705
15485
|
}
|
|
14706
15486
|
},
|
|
14707
|
-
{
|
|
14708
|
-
name: "padding",
|
|
14709
|
-
docs: [
|
|
14710
|
-
"padding"
|
|
14711
|
-
],
|
|
14712
|
-
type: {
|
|
14713
|
-
array: [
|
|
14714
|
-
"u8",
|
|
14715
|
-
3
|
|
14716
|
-
]
|
|
14717
|
-
}
|
|
14718
|
-
},
|
|
14719
15487
|
{
|
|
14720
15488
|
name: "dynamic_fee",
|
|
14721
15489
|
docs: [
|
|
@@ -14745,7 +15513,7 @@ var types = [
|
|
|
14745
15513
|
name: "base_fee",
|
|
14746
15514
|
type: {
|
|
14747
15515
|
defined: {
|
|
14748
|
-
name: "
|
|
15516
|
+
name: "BaseFeeInfo"
|
|
14749
15517
|
}
|
|
14750
15518
|
}
|
|
14751
15519
|
},
|
|
@@ -14867,16 +15635,8 @@ var types = [
|
|
|
14867
15635
|
}
|
|
14868
15636
|
},
|
|
14869
15637
|
{
|
|
14870
|
-
name: "
|
|
14871
|
-
|
|
14872
|
-
"padding"
|
|
14873
|
-
],
|
|
14874
|
-
type: {
|
|
14875
|
-
array: [
|
|
14876
|
-
"u64",
|
|
14877
|
-
2
|
|
14878
|
-
]
|
|
14879
|
-
}
|
|
15638
|
+
name: "init_sqrt_price",
|
|
15639
|
+
type: "u128"
|
|
14880
15640
|
}
|
|
14881
15641
|
]
|
|
14882
15642
|
}
|
|
@@ -15456,41 +16216,6 @@ var types = [
|
|
|
15456
16216
|
]
|
|
15457
16217
|
}
|
|
15458
16218
|
},
|
|
15459
|
-
{
|
|
15460
|
-
name: "SwapResult",
|
|
15461
|
-
docs: [
|
|
15462
|
-
"Encodes all results of swapping"
|
|
15463
|
-
],
|
|
15464
|
-
type: {
|
|
15465
|
-
kind: "struct",
|
|
15466
|
-
fields: [
|
|
15467
|
-
{
|
|
15468
|
-
name: "output_amount",
|
|
15469
|
-
type: "u64"
|
|
15470
|
-
},
|
|
15471
|
-
{
|
|
15472
|
-
name: "next_sqrt_price",
|
|
15473
|
-
type: "u128"
|
|
15474
|
-
},
|
|
15475
|
-
{
|
|
15476
|
-
name: "lp_fee",
|
|
15477
|
-
type: "u64"
|
|
15478
|
-
},
|
|
15479
|
-
{
|
|
15480
|
-
name: "protocol_fee",
|
|
15481
|
-
type: "u64"
|
|
15482
|
-
},
|
|
15483
|
-
{
|
|
15484
|
-
name: "partner_fee",
|
|
15485
|
-
type: "u64"
|
|
15486
|
-
},
|
|
15487
|
-
{
|
|
15488
|
-
name: "referral_fee",
|
|
15489
|
-
type: "u64"
|
|
15490
|
-
}
|
|
15491
|
-
]
|
|
15492
|
-
}
|
|
15493
|
-
},
|
|
15494
16219
|
{
|
|
15495
16220
|
name: "SwapResult2",
|
|
15496
16221
|
type: {
|
|
@@ -15569,6 +16294,41 @@ var types = [
|
|
|
15569
16294
|
]
|
|
15570
16295
|
}
|
|
15571
16296
|
},
|
|
16297
|
+
{
|
|
16298
|
+
name: "UpdatePoolFeesParameters",
|
|
16299
|
+
type: {
|
|
16300
|
+
kind: "struct",
|
|
16301
|
+
fields: [
|
|
16302
|
+
{
|
|
16303
|
+
name: "cliff_fee_numerator",
|
|
16304
|
+
docs: [
|
|
16305
|
+
"Base fee update mode:",
|
|
16306
|
+
"- None: skip base fee update",
|
|
16307
|
+
"- Some: update new cliff_fee_numerator if base fee is static"
|
|
16308
|
+
],
|
|
16309
|
+
type: {
|
|
16310
|
+
option: "u64"
|
|
16311
|
+
}
|
|
16312
|
+
},
|
|
16313
|
+
{
|
|
16314
|
+
name: "dynamic_fee",
|
|
16315
|
+
docs: [
|
|
16316
|
+
"Dynamic fee update mode:",
|
|
16317
|
+
"- None: skip dynamic fee update",
|
|
16318
|
+
"- Some(with default value): disable dynamic fee",
|
|
16319
|
+
"- Some(with non default value): enable dynamic fee if disabled or update dynamic fee if enabled"
|
|
16320
|
+
],
|
|
16321
|
+
type: {
|
|
16322
|
+
option: {
|
|
16323
|
+
defined: {
|
|
16324
|
+
name: "DynamicFeeParameters"
|
|
16325
|
+
}
|
|
16326
|
+
}
|
|
16327
|
+
}
|
|
16328
|
+
}
|
|
16329
|
+
]
|
|
16330
|
+
}
|
|
16331
|
+
},
|
|
15572
16332
|
{
|
|
15573
16333
|
name: "UserRewardInfo",
|
|
15574
16334
|
serialization: "bytemuck",
|
|
@@ -15696,6 +16456,94 @@ var types = [
|
|
|
15696
16456
|
}
|
|
15697
16457
|
}
|
|
15698
16458
|
];
|
|
16459
|
+
var constants = [
|
|
16460
|
+
{
|
|
16461
|
+
name: "BIN_STEP_BPS_DEFAULT",
|
|
16462
|
+
type: "u16",
|
|
16463
|
+
value: "1"
|
|
16464
|
+
},
|
|
16465
|
+
{
|
|
16466
|
+
name: "BIN_STEP_U128_DEFAULT_LE_BYTES",
|
|
16467
|
+
type: {
|
|
16468
|
+
array: [
|
|
16469
|
+
"u8",
|
|
16470
|
+
16
|
|
16471
|
+
]
|
|
16472
|
+
},
|
|
16473
|
+
value: "[203, 16, 199, 186, 184, 141, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
|
|
16474
|
+
},
|
|
16475
|
+
{
|
|
16476
|
+
name: "CUSTOMIZABLE_POOL_PREFIX",
|
|
16477
|
+
type: "bytes",
|
|
16478
|
+
value: "[99, 112, 111, 111, 108]"
|
|
16479
|
+
},
|
|
16480
|
+
{
|
|
16481
|
+
name: "FEE_DENOMINATOR",
|
|
16482
|
+
docs: [
|
|
16483
|
+
"Default fee denominator. DO NOT simply update it as it will break logic that depends on it as default value."
|
|
16484
|
+
],
|
|
16485
|
+
type: "u64",
|
|
16486
|
+
value: "1000000000"
|
|
16487
|
+
},
|
|
16488
|
+
{
|
|
16489
|
+
name: "MAX_BASIS_POINT",
|
|
16490
|
+
docs: [
|
|
16491
|
+
"Max basis point. 100% in pct"
|
|
16492
|
+
],
|
|
16493
|
+
type: "u64",
|
|
16494
|
+
value: "10000"
|
|
16495
|
+
},
|
|
16496
|
+
{
|
|
16497
|
+
name: "MAX_SQRT_PRICE_LE_BYTES",
|
|
16498
|
+
type: {
|
|
16499
|
+
array: [
|
|
16500
|
+
"u8",
|
|
16501
|
+
16
|
|
16502
|
+
]
|
|
16503
|
+
},
|
|
16504
|
+
value: "[155, 87, 105, 78, 169, 26, 92, 132, 177, 196, 254, 255, 0, 0, 0, 0]"
|
|
16505
|
+
},
|
|
16506
|
+
{
|
|
16507
|
+
name: "MIN_SQRT_PRICE_LE_BYTES",
|
|
16508
|
+
type: {
|
|
16509
|
+
array: [
|
|
16510
|
+
"u8",
|
|
16511
|
+
16
|
|
16512
|
+
]
|
|
16513
|
+
},
|
|
16514
|
+
value: "[80, 59, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"
|
|
16515
|
+
},
|
|
16516
|
+
{
|
|
16517
|
+
name: "POOL_AUTHORITY_PREFIX",
|
|
16518
|
+
type: "bytes",
|
|
16519
|
+
value: "[112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]"
|
|
16520
|
+
},
|
|
16521
|
+
{
|
|
16522
|
+
name: "POOL_PREFIX",
|
|
16523
|
+
type: "bytes",
|
|
16524
|
+
value: "[112, 111, 111, 108]"
|
|
16525
|
+
},
|
|
16526
|
+
{
|
|
16527
|
+
name: "POSITION_NFT_ACCOUNT_PREFIX",
|
|
16528
|
+
type: "bytes",
|
|
16529
|
+
value: "[112, 111, 115, 105, 116, 105, 111, 110, 95, 110, 102, 116, 95, 97, 99, 99, 111, 117, 110, 116]"
|
|
16530
|
+
},
|
|
16531
|
+
{
|
|
16532
|
+
name: "POSITION_PREFIX",
|
|
16533
|
+
type: "bytes",
|
|
16534
|
+
value: "[112, 111, 115, 105, 116, 105, 111, 110]"
|
|
16535
|
+
},
|
|
16536
|
+
{
|
|
16537
|
+
name: "SPLIT_POSITION_DENOMINATOR",
|
|
16538
|
+
type: "u32",
|
|
16539
|
+
value: "1000000000"
|
|
16540
|
+
},
|
|
16541
|
+
{
|
|
16542
|
+
name: "TOKEN_VAULT_PREFIX",
|
|
16543
|
+
type: "bytes",
|
|
16544
|
+
value: "[116, 111, 107, 101, 110, 95, 118, 97, 117, 108, 116]"
|
|
16545
|
+
}
|
|
16546
|
+
];
|
|
15699
16547
|
var cp_amm = {
|
|
15700
16548
|
address: address,
|
|
15701
16549
|
metadata: metadata,
|
|
@@ -15703,7 +16551,8 @@ var cp_amm = {
|
|
|
15703
16551
|
accounts: accounts,
|
|
15704
16552
|
events: events,
|
|
15705
16553
|
errors: errors,
|
|
15706
|
-
types: types
|
|
16554
|
+
types: types,
|
|
16555
|
+
constants: constants
|
|
15707
16556
|
};
|
|
15708
16557
|
|
|
15709
|
-
export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, 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, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, FeeRateLimiter,
|
|
16558
|
+
export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BorshFeeMarketCapScheduler, type BorshFeeRateLimiter, type BorshFeeTimeScheduler, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, 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, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, FEE_PADDING, FeeMarketCapScheduler, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeTimeScheduler, type FundRewardParams, type GetDepositQuoteParams, type GetQuote2Params, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeAndFundReward, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX, MAX_CU_BUFFER, MAX_EXPONENTIAL, MAX_FEE_BPS_V0, MAX_FEE_BPS_V1, MAX_FEE_NUMERATOR_V0, MAX_FEE_NUMERATOR_V1, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MergePositionParams, ONE_Q64, type PermanentLockParams, type PodAlignedFeeMarketCapScheduler, type PodAlignedFeeRateLimiter, type PodAlignedFeeTimeScheduler, type PoolFeesParams, type PoolFeesStruct, type PoolState, PoolStatus, PoolVersion, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type Quote2Result, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, SPLIT_POSITION_DENOMINATOR, type SetupFeeClaimAccountsParams, type SplitFees, type SplitPosition2Params, type SplitPositionParams, type Swap2Params, type SwapAmount, SwapMode, type SwapParams, type SwapResult2, type TokenBadgeState, TradeDirection, type TransferHookState, type TxBuilder, U128_MAX, U16_MAX, U64_MAX, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type UserRewardInfo, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateAtoBFromAmountIn, calculateAtoBFromAmountOut, calculateAtoBFromPartialAmountIn, calculateBtoAFromAmountIn, calculateBtoAFromAmountOut, calculateBtoAFromPartialAmountIn, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, convertToFeeSchedulerSecondFactor, convertToLamports, convertToRateLimiterSecondFactor, cpAmmCoder, decimalToQ64, decodeFeeMarketCapSchedulerParams, decodeFeeRateLimiterParams, decodeFeeTimeSchedulerParams, decodePodAlignedFeeMarketCapScheduler, decodePodAlignedFeeRateLimiter, decodePodAlignedFeeTimeScheduler, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, deriveOperatorAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, encodeFeeMarketCapSchedulerParams, encodeFeeRateLimiterParams, encodeFeeTimeSchedulerParams, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMarketCapBaseFeeNumerator, getFeeMarketCapBaseFeeNumeratorByPeriod, getFeeMarketCapMinBaseFeeNumerator, getFeeMarketCapSchedulerParams, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeTimeBaseFeeNumerator, getFeeTimeBaseFeeNumeratorByPeriod, getFeeTimeMinBaseFeeNumerator, getFeeTimeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, getNextSqrtPriceFromAmountInARoundingUp, getNextSqrtPriceFromAmountInBRoundingDown, getNextSqrtPriceFromAmountOutARoundingUp, getNextSqrtPriceFromAmountOutBRoundingDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceChange, getPriceFromSqrtPrice, getPriceImpact, getRateLimiterParams, getRewardInfo, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapResultFromExactInput, getSwapResultFromExactOutput, getSwapResultFromPartialInput, getTokenDecimals, getTokenProgram, getTotalFeeNumerator, getTotalLockedLiquidity, getTotalTradingFeeFromExcludedFeeAmount, getTotalTradingFeeFromIncludedFeeAmount, getUnClaimLpFee, getUserRewardPending, hasPartner, hasTransferHookExtension, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toBorshFeeTimeScheduler, toNumerator, toPodAlignedFeeTimeScheduler, unwrapSOLInstruction, validateFeeFraction, validateFeeMarketCapBaseFeeIsStatic, validateFeeMarketCapScheduler, validateFeeRateLimiter, validateFeeRateLimiterBaseFeeIsStatic, validateFeeTimeScheduler, validateFeeTimeSchedulerBaseFeeIsStatic, validateNoTransferHook, vestingByPositionFilter, wrapSOLInstruction };
|