@meteora-ag/dlmm 1.3.8 → 1.3.9-dp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2292 -169
- package/dist/index.js +4752 -2090
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5048 -2386
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as _coral_xyz_anchor from '@coral-xyz/anchor';
|
|
2
2
|
import { BN, Program, IdlAccounts, ProgramAccount, IdlTypes, EventParser } from '@coral-xyz/anchor';
|
|
3
3
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
|
-
import { PublicKey, TransactionInstruction, Connection, Transaction, Cluster } from '@solana/web3.js';
|
|
4
|
+
import { PublicKey, AccountMeta, TransactionInstruction, Connection, Transaction, Cluster } from '@solana/web3.js';
|
|
5
5
|
import Decimal from 'decimal.js';
|
|
6
|
+
import { Mint } from '@solana/spl-token';
|
|
6
7
|
|
|
7
8
|
type LbClmm = {
|
|
8
|
-
"version": "0.
|
|
9
|
+
"version": "0.9.0";
|
|
9
10
|
"name": "lb_clmm";
|
|
10
11
|
"constants": [
|
|
11
12
|
{
|
|
@@ -21,12 +22,26 @@ type LbClmm = {
|
|
|
21
22
|
"value": "70";
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
"name": "
|
|
25
|
+
"name": "DEFAULT_BIN_PER_POSITION";
|
|
25
26
|
"type": {
|
|
26
27
|
"defined": "usize";
|
|
27
28
|
};
|
|
28
29
|
"value": "70";
|
|
29
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"name": "MAX_RESIZE_LENGTH";
|
|
33
|
+
"type": {
|
|
34
|
+
"defined": "usize";
|
|
35
|
+
};
|
|
36
|
+
"value": "70";
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "POSITION_MAX_LENGTH";
|
|
40
|
+
"type": {
|
|
41
|
+
"defined": "usize";
|
|
42
|
+
};
|
|
43
|
+
"value": "1400";
|
|
44
|
+
},
|
|
30
45
|
{
|
|
31
46
|
"name": "MIN_BIN_ID";
|
|
32
47
|
"type": "i32";
|
|
@@ -128,6 +143,11 @@ type LbClmm = {
|
|
|
128
143
|
"type": "bytes";
|
|
129
144
|
"value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]";
|
|
130
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"name": "PRESET_PARAMETER2";
|
|
148
|
+
"type": "bytes";
|
|
149
|
+
"value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]";
|
|
150
|
+
},
|
|
131
151
|
{
|
|
132
152
|
"name": "POSITION";
|
|
133
153
|
"type": "bytes";
|
|
@@ -271,7 +291,24 @@ type LbClmm = {
|
|
|
271
291
|
"isSigner": true;
|
|
272
292
|
},
|
|
273
293
|
{
|
|
274
|
-
"name": "
|
|
294
|
+
"name": "tokenBadgeX";
|
|
295
|
+
"isMut": false;
|
|
296
|
+
"isSigner": false;
|
|
297
|
+
"isOptional": true;
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "tokenBadgeY";
|
|
301
|
+
"isMut": false;
|
|
302
|
+
"isSigner": false;
|
|
303
|
+
"isOptional": true;
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "tokenProgramX";
|
|
307
|
+
"isMut": false;
|
|
308
|
+
"isSigner": false;
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "tokenProgramY";
|
|
275
312
|
"isMut": false;
|
|
276
313
|
"isSigner": false;
|
|
277
314
|
},
|
|
@@ -1539,6 +1576,11 @@ type LbClmm = {
|
|
|
1539
1576
|
"name": "tokenYProgram";
|
|
1540
1577
|
"isMut": false;
|
|
1541
1578
|
"isSigner": false;
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"name": "memoProgram";
|
|
1582
|
+
"isMut": false;
|
|
1583
|
+
"isSigner": false;
|
|
1542
1584
|
}
|
|
1543
1585
|
];
|
|
1544
1586
|
"args": [
|
|
@@ -1549,6 +1591,12 @@ type LbClmm = {
|
|
|
1549
1591
|
{
|
|
1550
1592
|
"name": "amountY";
|
|
1551
1593
|
"type": "u64";
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"name": "remainingAccountsInfo";
|
|
1597
|
+
"type": {
|
|
1598
|
+
"defined": "RemainingAccountsInfo";
|
|
1599
|
+
};
|
|
1552
1600
|
}
|
|
1553
1601
|
];
|
|
1554
1602
|
},
|
|
@@ -1570,6 +1618,12 @@ type LbClmm = {
|
|
|
1570
1618
|
"isMut": false;
|
|
1571
1619
|
"isSigner": false;
|
|
1572
1620
|
},
|
|
1621
|
+
{
|
|
1622
|
+
"name": "tokenBadge";
|
|
1623
|
+
"isMut": false;
|
|
1624
|
+
"isSigner": false;
|
|
1625
|
+
"isOptional": true;
|
|
1626
|
+
},
|
|
1573
1627
|
{
|
|
1574
1628
|
"name": "admin";
|
|
1575
1629
|
"isMut": true;
|
|
@@ -1677,6 +1731,12 @@ type LbClmm = {
|
|
|
1677
1731
|
{
|
|
1678
1732
|
"name": "carryForward";
|
|
1679
1733
|
"type": "bool";
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"name": "remainingAccountsInfo";
|
|
1737
|
+
"type": {
|
|
1738
|
+
"defined": "RemainingAccountsInfo";
|
|
1739
|
+
};
|
|
1680
1740
|
}
|
|
1681
1741
|
];
|
|
1682
1742
|
},
|
|
@@ -2012,6 +2072,101 @@ type LbClmm = {
|
|
|
2012
2072
|
}
|
|
2013
2073
|
];
|
|
2014
2074
|
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "increasePositionLength";
|
|
2077
|
+
"accounts": [
|
|
2078
|
+
{
|
|
2079
|
+
"name": "funder";
|
|
2080
|
+
"isMut": true;
|
|
2081
|
+
"isSigner": true;
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"name": "lbPair";
|
|
2085
|
+
"isMut": false;
|
|
2086
|
+
"isSigner": false;
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"name": "position";
|
|
2090
|
+
"isMut": true;
|
|
2091
|
+
"isSigner": false;
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"name": "owner";
|
|
2095
|
+
"isMut": false;
|
|
2096
|
+
"isSigner": true;
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"name": "systemProgram";
|
|
2100
|
+
"isMut": false;
|
|
2101
|
+
"isSigner": false;
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"name": "eventAuthority";
|
|
2105
|
+
"isMut": false;
|
|
2106
|
+
"isSigner": false;
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"name": "program";
|
|
2110
|
+
"isMut": false;
|
|
2111
|
+
"isSigner": false;
|
|
2112
|
+
}
|
|
2113
|
+
];
|
|
2114
|
+
"args": [
|
|
2115
|
+
{
|
|
2116
|
+
"name": "lengthToAdd";
|
|
2117
|
+
"type": "u16";
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"name": "side";
|
|
2121
|
+
"type": "u8";
|
|
2122
|
+
}
|
|
2123
|
+
];
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
"name": "decreasePositionLength";
|
|
2127
|
+
"accounts": [
|
|
2128
|
+
{
|
|
2129
|
+
"name": "rentReceiver";
|
|
2130
|
+
"isMut": true;
|
|
2131
|
+
"isSigner": false;
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"name": "position";
|
|
2135
|
+
"isMut": true;
|
|
2136
|
+
"isSigner": false;
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"name": "owner";
|
|
2140
|
+
"isMut": false;
|
|
2141
|
+
"isSigner": true;
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
"name": "systemProgram";
|
|
2145
|
+
"isMut": false;
|
|
2146
|
+
"isSigner": false;
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"name": "eventAuthority";
|
|
2150
|
+
"isMut": false;
|
|
2151
|
+
"isSigner": false;
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"name": "program";
|
|
2155
|
+
"isMut": false;
|
|
2156
|
+
"isSigner": false;
|
|
2157
|
+
}
|
|
2158
|
+
];
|
|
2159
|
+
"args": [
|
|
2160
|
+
{
|
|
2161
|
+
"name": "lengthToRemove";
|
|
2162
|
+
"type": "u16";
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"name": "side";
|
|
2166
|
+
"type": "u8";
|
|
2167
|
+
}
|
|
2168
|
+
];
|
|
2169
|
+
},
|
|
2015
2170
|
{
|
|
2016
2171
|
"name": "initializePresetParameter";
|
|
2017
2172
|
"accounts": [
|
|
@@ -2066,6 +2221,27 @@ type LbClmm = {
|
|
|
2066
2221
|
];
|
|
2067
2222
|
"args": [];
|
|
2068
2223
|
},
|
|
2224
|
+
{
|
|
2225
|
+
"name": "closePresetParameter2";
|
|
2226
|
+
"accounts": [
|
|
2227
|
+
{
|
|
2228
|
+
"name": "presetParameter";
|
|
2229
|
+
"isMut": true;
|
|
2230
|
+
"isSigner": false;
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"name": "admin";
|
|
2234
|
+
"isMut": true;
|
|
2235
|
+
"isSigner": true;
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"name": "rentReceiver";
|
|
2239
|
+
"isMut": true;
|
|
2240
|
+
"isSigner": false;
|
|
2241
|
+
}
|
|
2242
|
+
];
|
|
2243
|
+
"args": [];
|
|
2244
|
+
},
|
|
2069
2245
|
{
|
|
2070
2246
|
"name": "removeAllLiquidity";
|
|
2071
2247
|
"accounts": [
|
|
@@ -2170,10 +2346,10 @@ type LbClmm = {
|
|
|
2170
2346
|
"args": [];
|
|
2171
2347
|
},
|
|
2172
2348
|
{
|
|
2173
|
-
"name": "
|
|
2349
|
+
"name": "migratePositionFromV1";
|
|
2174
2350
|
"accounts": [
|
|
2175
2351
|
{
|
|
2176
|
-
"name": "
|
|
2352
|
+
"name": "positionV3";
|
|
2177
2353
|
"isMut": true;
|
|
2178
2354
|
"isSigner": true;
|
|
2179
2355
|
},
|
|
@@ -2225,6 +2401,52 @@ type LbClmm = {
|
|
|
2225
2401
|
];
|
|
2226
2402
|
"args": [];
|
|
2227
2403
|
},
|
|
2404
|
+
{
|
|
2405
|
+
"name": "migratePositionFromV2";
|
|
2406
|
+
"accounts": [
|
|
2407
|
+
{
|
|
2408
|
+
"name": "positionV3";
|
|
2409
|
+
"isMut": true;
|
|
2410
|
+
"isSigner": true;
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"name": "positionV2";
|
|
2414
|
+
"isMut": true;
|
|
2415
|
+
"isSigner": false;
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"name": "lbPair";
|
|
2419
|
+
"isMut": false;
|
|
2420
|
+
"isSigner": false;
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"name": "sender";
|
|
2424
|
+
"isMut": true;
|
|
2425
|
+
"isSigner": true;
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
"name": "systemProgram";
|
|
2429
|
+
"isMut": false;
|
|
2430
|
+
"isSigner": false;
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"name": "rentReceiver";
|
|
2434
|
+
"isMut": true;
|
|
2435
|
+
"isSigner": false;
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "eventAuthority";
|
|
2439
|
+
"isMut": false;
|
|
2440
|
+
"isSigner": false;
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"name": "program";
|
|
2444
|
+
"isMut": false;
|
|
2445
|
+
"isSigner": false;
|
|
2446
|
+
}
|
|
2447
|
+
];
|
|
2448
|
+
"args": [];
|
|
2449
|
+
},
|
|
2228
2450
|
{
|
|
2229
2451
|
"name": "migrateBinArray";
|
|
2230
2452
|
"accounts": [
|
|
@@ -2305,6 +2527,11 @@ type LbClmm = {
|
|
|
2305
2527
|
"isMut": false;
|
|
2306
2528
|
"isSigner": false;
|
|
2307
2529
|
},
|
|
2530
|
+
{
|
|
2531
|
+
"name": "memoProgram";
|
|
2532
|
+
"isMut": false;
|
|
2533
|
+
"isSigner": false;
|
|
2534
|
+
},
|
|
2308
2535
|
{
|
|
2309
2536
|
"name": "eventAuthority";
|
|
2310
2537
|
"isMut": false;
|
|
@@ -2320,6 +2547,12 @@ type LbClmm = {
|
|
|
2320
2547
|
{
|
|
2321
2548
|
"name": "rewardIndex";
|
|
2322
2549
|
"type": "u64";
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
"name": "remainingAccountsInfo";
|
|
2553
|
+
"type": {
|
|
2554
|
+
"defined": "RemainingAccountsInfo";
|
|
2555
|
+
};
|
|
2323
2556
|
}
|
|
2324
2557
|
];
|
|
2325
2558
|
},
|
|
@@ -2603,57 +2836,1155 @@ type LbClmm = {
|
|
|
2603
2836
|
"type": "publicKey";
|
|
2604
2837
|
}
|
|
2605
2838
|
];
|
|
2606
|
-
}
|
|
2607
|
-
];
|
|
2608
|
-
"accounts": [
|
|
2609
|
-
{
|
|
2610
|
-
"name": "binArrayBitmapExtension";
|
|
2611
|
-
"type": {
|
|
2612
|
-
"kind": "struct";
|
|
2613
|
-
"fields": [
|
|
2614
|
-
{
|
|
2615
|
-
"name": "lbPair";
|
|
2616
|
-
"type": "publicKey";
|
|
2617
|
-
},
|
|
2618
|
-
{
|
|
2619
|
-
"name": "positiveBinArrayBitmap";
|
|
2620
|
-
"docs": [
|
|
2621
|
-
"Packed initialized bin array state for start_bin_index is positive"
|
|
2622
|
-
];
|
|
2623
|
-
"type": {
|
|
2624
|
-
"array": [
|
|
2625
|
-
{
|
|
2626
|
-
"array": [
|
|
2627
|
-
"u64",
|
|
2628
|
-
8
|
|
2629
|
-
];
|
|
2630
|
-
},
|
|
2631
|
-
12
|
|
2632
|
-
];
|
|
2633
|
-
};
|
|
2634
|
-
},
|
|
2635
|
-
{
|
|
2636
|
-
"name": "negativeBinArrayBitmap";
|
|
2637
|
-
"docs": [
|
|
2638
|
-
"Packed initialized bin array state for start_bin_index is negative"
|
|
2639
|
-
];
|
|
2640
|
-
"type": {
|
|
2641
|
-
"array": [
|
|
2642
|
-
{
|
|
2643
|
-
"array": [
|
|
2644
|
-
"u64",
|
|
2645
|
-
8
|
|
2646
|
-
];
|
|
2647
|
-
},
|
|
2648
|
-
12
|
|
2649
|
-
];
|
|
2650
|
-
};
|
|
2651
|
-
}
|
|
2652
|
-
];
|
|
2653
|
-
};
|
|
2654
2839
|
},
|
|
2655
2840
|
{
|
|
2656
|
-
"name": "
|
|
2841
|
+
"name": "initializeTokenBadge";
|
|
2842
|
+
"accounts": [
|
|
2843
|
+
{
|
|
2844
|
+
"name": "tokenMint";
|
|
2845
|
+
"isMut": false;
|
|
2846
|
+
"isSigner": false;
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
"name": "tokenBadge";
|
|
2850
|
+
"isMut": true;
|
|
2851
|
+
"isSigner": false;
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
"name": "admin";
|
|
2855
|
+
"isMut": true;
|
|
2856
|
+
"isSigner": true;
|
|
2857
|
+
},
|
|
2858
|
+
{
|
|
2859
|
+
"name": "systemProgram";
|
|
2860
|
+
"isMut": false;
|
|
2861
|
+
"isSigner": false;
|
|
2862
|
+
}
|
|
2863
|
+
];
|
|
2864
|
+
"args": [];
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"name": "initializePresetParameter2";
|
|
2868
|
+
"accounts": [
|
|
2869
|
+
{
|
|
2870
|
+
"name": "presetParameter";
|
|
2871
|
+
"isMut": true;
|
|
2872
|
+
"isSigner": false;
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
"name": "admin";
|
|
2876
|
+
"isMut": true;
|
|
2877
|
+
"isSigner": true;
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
"name": "systemProgram";
|
|
2881
|
+
"isMut": false;
|
|
2882
|
+
"isSigner": false;
|
|
2883
|
+
}
|
|
2884
|
+
];
|
|
2885
|
+
"args": [
|
|
2886
|
+
{
|
|
2887
|
+
"name": "ix";
|
|
2888
|
+
"type": {
|
|
2889
|
+
"defined": "InitPresetParameters2Ix";
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2892
|
+
];
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
"name": "initializeLbPair2";
|
|
2896
|
+
"accounts": [
|
|
2897
|
+
{
|
|
2898
|
+
"name": "lbPair";
|
|
2899
|
+
"isMut": true;
|
|
2900
|
+
"isSigner": false;
|
|
2901
|
+
},
|
|
2902
|
+
{
|
|
2903
|
+
"name": "binArrayBitmapExtension";
|
|
2904
|
+
"isMut": true;
|
|
2905
|
+
"isSigner": false;
|
|
2906
|
+
"isOptional": true;
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
"name": "tokenMintX";
|
|
2910
|
+
"isMut": false;
|
|
2911
|
+
"isSigner": false;
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
"name": "tokenMintY";
|
|
2915
|
+
"isMut": false;
|
|
2916
|
+
"isSigner": false;
|
|
2917
|
+
},
|
|
2918
|
+
{
|
|
2919
|
+
"name": "reserveX";
|
|
2920
|
+
"isMut": true;
|
|
2921
|
+
"isSigner": false;
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
"name": "reserveY";
|
|
2925
|
+
"isMut": true;
|
|
2926
|
+
"isSigner": false;
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
"name": "oracle";
|
|
2930
|
+
"isMut": true;
|
|
2931
|
+
"isSigner": false;
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "presetParameter";
|
|
2935
|
+
"isMut": false;
|
|
2936
|
+
"isSigner": false;
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
"name": "funder";
|
|
2940
|
+
"isMut": true;
|
|
2941
|
+
"isSigner": true;
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"name": "tokenBadgeX";
|
|
2945
|
+
"isMut": false;
|
|
2946
|
+
"isSigner": false;
|
|
2947
|
+
"isOptional": true;
|
|
2948
|
+
},
|
|
2949
|
+
{
|
|
2950
|
+
"name": "tokenBadgeY";
|
|
2951
|
+
"isMut": false;
|
|
2952
|
+
"isSigner": false;
|
|
2953
|
+
"isOptional": true;
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
"name": "tokenProgramX";
|
|
2957
|
+
"isMut": false;
|
|
2958
|
+
"isSigner": false;
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"name": "tokenProgramY";
|
|
2962
|
+
"isMut": false;
|
|
2963
|
+
"isSigner": false;
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
"name": "systemProgram";
|
|
2967
|
+
"isMut": false;
|
|
2968
|
+
"isSigner": false;
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
"name": "eventAuthority";
|
|
2972
|
+
"isMut": false;
|
|
2973
|
+
"isSigner": false;
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"name": "program";
|
|
2977
|
+
"isMut": false;
|
|
2978
|
+
"isSigner": false;
|
|
2979
|
+
}
|
|
2980
|
+
];
|
|
2981
|
+
"args": [
|
|
2982
|
+
{
|
|
2983
|
+
"name": "params";
|
|
2984
|
+
"type": {
|
|
2985
|
+
"defined": "InitializeLbPair2Params";
|
|
2986
|
+
};
|
|
2987
|
+
}
|
|
2988
|
+
];
|
|
2989
|
+
},
|
|
2990
|
+
{
|
|
2991
|
+
"name": "initializeCustomizablePermissionlessLbPair2";
|
|
2992
|
+
"accounts": [
|
|
2993
|
+
{
|
|
2994
|
+
"name": "lbPair";
|
|
2995
|
+
"isMut": true;
|
|
2996
|
+
"isSigner": false;
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
"name": "binArrayBitmapExtension";
|
|
3000
|
+
"isMut": true;
|
|
3001
|
+
"isSigner": false;
|
|
3002
|
+
"isOptional": true;
|
|
3003
|
+
},
|
|
3004
|
+
{
|
|
3005
|
+
"name": "tokenMintX";
|
|
3006
|
+
"isMut": false;
|
|
3007
|
+
"isSigner": false;
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"name": "tokenMintY";
|
|
3011
|
+
"isMut": false;
|
|
3012
|
+
"isSigner": false;
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
"name": "reserveX";
|
|
3016
|
+
"isMut": true;
|
|
3017
|
+
"isSigner": false;
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
"name": "reserveY";
|
|
3021
|
+
"isMut": true;
|
|
3022
|
+
"isSigner": false;
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
"name": "oracle";
|
|
3026
|
+
"isMut": true;
|
|
3027
|
+
"isSigner": false;
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
"name": "userTokenX";
|
|
3031
|
+
"isMut": false;
|
|
3032
|
+
"isSigner": false;
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
"name": "funder";
|
|
3036
|
+
"isMut": true;
|
|
3037
|
+
"isSigner": true;
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
"name": "tokenBadgeX";
|
|
3041
|
+
"isMut": false;
|
|
3042
|
+
"isSigner": false;
|
|
3043
|
+
"isOptional": true;
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "tokenProgramX";
|
|
3047
|
+
"isMut": false;
|
|
3048
|
+
"isSigner": false;
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"name": "tokenProgramY";
|
|
3052
|
+
"isMut": false;
|
|
3053
|
+
"isSigner": false;
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"name": "systemProgram";
|
|
3057
|
+
"isMut": false;
|
|
3058
|
+
"isSigner": false;
|
|
3059
|
+
},
|
|
3060
|
+
{
|
|
3061
|
+
"name": "eventAuthority";
|
|
3062
|
+
"isMut": false;
|
|
3063
|
+
"isSigner": false;
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
"name": "program";
|
|
3067
|
+
"isMut": false;
|
|
3068
|
+
"isSigner": false;
|
|
3069
|
+
}
|
|
3070
|
+
];
|
|
3071
|
+
"args": [
|
|
3072
|
+
{
|
|
3073
|
+
"name": "params";
|
|
3074
|
+
"type": {
|
|
3075
|
+
"defined": "CustomizableParams";
|
|
3076
|
+
};
|
|
3077
|
+
}
|
|
3078
|
+
];
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"name": "claimFee2";
|
|
3082
|
+
"accounts": [
|
|
3083
|
+
{
|
|
3084
|
+
"name": "lbPair";
|
|
3085
|
+
"isMut": true;
|
|
3086
|
+
"isSigner": false;
|
|
3087
|
+
},
|
|
3088
|
+
{
|
|
3089
|
+
"name": "position";
|
|
3090
|
+
"isMut": true;
|
|
3091
|
+
"isSigner": false;
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
"name": "sender";
|
|
3095
|
+
"isMut": false;
|
|
3096
|
+
"isSigner": true;
|
|
3097
|
+
},
|
|
3098
|
+
{
|
|
3099
|
+
"name": "reserveX";
|
|
3100
|
+
"isMut": true;
|
|
3101
|
+
"isSigner": false;
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
"name": "reserveY";
|
|
3105
|
+
"isMut": true;
|
|
3106
|
+
"isSigner": false;
|
|
3107
|
+
},
|
|
3108
|
+
{
|
|
3109
|
+
"name": "userTokenX";
|
|
3110
|
+
"isMut": true;
|
|
3111
|
+
"isSigner": false;
|
|
3112
|
+
},
|
|
3113
|
+
{
|
|
3114
|
+
"name": "userTokenY";
|
|
3115
|
+
"isMut": true;
|
|
3116
|
+
"isSigner": false;
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
"name": "tokenXMint";
|
|
3120
|
+
"isMut": false;
|
|
3121
|
+
"isSigner": false;
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"name": "tokenYMint";
|
|
3125
|
+
"isMut": false;
|
|
3126
|
+
"isSigner": false;
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
"name": "tokenProgramX";
|
|
3130
|
+
"isMut": false;
|
|
3131
|
+
"isSigner": false;
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"name": "tokenProgramY";
|
|
3135
|
+
"isMut": false;
|
|
3136
|
+
"isSigner": false;
|
|
3137
|
+
},
|
|
3138
|
+
{
|
|
3139
|
+
"name": "memoProgram";
|
|
3140
|
+
"isMut": false;
|
|
3141
|
+
"isSigner": false;
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
"name": "eventAuthority";
|
|
3145
|
+
"isMut": false;
|
|
3146
|
+
"isSigner": false;
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
"name": "program";
|
|
3150
|
+
"isMut": false;
|
|
3151
|
+
"isSigner": false;
|
|
3152
|
+
}
|
|
3153
|
+
];
|
|
3154
|
+
"args": [
|
|
3155
|
+
{
|
|
3156
|
+
"name": "minBinId";
|
|
3157
|
+
"type": "i32";
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
"name": "maxBinId";
|
|
3161
|
+
"type": "i32";
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "remainingAccountsInfo";
|
|
3165
|
+
"type": {
|
|
3166
|
+
"defined": "RemainingAccountsInfo";
|
|
3167
|
+
};
|
|
3168
|
+
}
|
|
3169
|
+
];
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
"name": "claimReward2";
|
|
3173
|
+
"accounts": [
|
|
3174
|
+
{
|
|
3175
|
+
"name": "lbPair";
|
|
3176
|
+
"isMut": true;
|
|
3177
|
+
"isSigner": false;
|
|
3178
|
+
},
|
|
3179
|
+
{
|
|
3180
|
+
"name": "position";
|
|
3181
|
+
"isMut": true;
|
|
3182
|
+
"isSigner": false;
|
|
3183
|
+
},
|
|
3184
|
+
{
|
|
3185
|
+
"name": "sender";
|
|
3186
|
+
"isMut": false;
|
|
3187
|
+
"isSigner": true;
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "rewardVault";
|
|
3191
|
+
"isMut": true;
|
|
3192
|
+
"isSigner": false;
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
"name": "rewardMint";
|
|
3196
|
+
"isMut": false;
|
|
3197
|
+
"isSigner": false;
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
"name": "userTokenAccount";
|
|
3201
|
+
"isMut": true;
|
|
3202
|
+
"isSigner": false;
|
|
3203
|
+
},
|
|
3204
|
+
{
|
|
3205
|
+
"name": "tokenProgram";
|
|
3206
|
+
"isMut": false;
|
|
3207
|
+
"isSigner": false;
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"name": "memoProgram";
|
|
3211
|
+
"isMut": false;
|
|
3212
|
+
"isSigner": false;
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
"name": "eventAuthority";
|
|
3216
|
+
"isMut": false;
|
|
3217
|
+
"isSigner": false;
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
"name": "program";
|
|
3221
|
+
"isMut": false;
|
|
3222
|
+
"isSigner": false;
|
|
3223
|
+
}
|
|
3224
|
+
];
|
|
3225
|
+
"args": [
|
|
3226
|
+
{
|
|
3227
|
+
"name": "rewardIndex";
|
|
3228
|
+
"type": "u64";
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"name": "minBinId";
|
|
3232
|
+
"type": "i32";
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"name": "maxBinId";
|
|
3236
|
+
"type": "i32";
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
"name": "remainingAccountsInfo";
|
|
3240
|
+
"type": {
|
|
3241
|
+
"defined": "RemainingAccountsInfo";
|
|
3242
|
+
};
|
|
3243
|
+
}
|
|
3244
|
+
];
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
"name": "addLiquidity2";
|
|
3248
|
+
"accounts": [
|
|
3249
|
+
{
|
|
3250
|
+
"name": "position";
|
|
3251
|
+
"isMut": true;
|
|
3252
|
+
"isSigner": false;
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"name": "lbPair";
|
|
3256
|
+
"isMut": true;
|
|
3257
|
+
"isSigner": false;
|
|
3258
|
+
},
|
|
3259
|
+
{
|
|
3260
|
+
"name": "binArrayBitmapExtension";
|
|
3261
|
+
"isMut": true;
|
|
3262
|
+
"isSigner": false;
|
|
3263
|
+
"isOptional": true;
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"name": "userTokenX";
|
|
3267
|
+
"isMut": true;
|
|
3268
|
+
"isSigner": false;
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
"name": "userTokenY";
|
|
3272
|
+
"isMut": true;
|
|
3273
|
+
"isSigner": false;
|
|
3274
|
+
},
|
|
3275
|
+
{
|
|
3276
|
+
"name": "reserveX";
|
|
3277
|
+
"isMut": true;
|
|
3278
|
+
"isSigner": false;
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
"name": "reserveY";
|
|
3282
|
+
"isMut": true;
|
|
3283
|
+
"isSigner": false;
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
"name": "tokenXMint";
|
|
3287
|
+
"isMut": false;
|
|
3288
|
+
"isSigner": false;
|
|
3289
|
+
},
|
|
3290
|
+
{
|
|
3291
|
+
"name": "tokenYMint";
|
|
3292
|
+
"isMut": false;
|
|
3293
|
+
"isSigner": false;
|
|
3294
|
+
},
|
|
3295
|
+
{
|
|
3296
|
+
"name": "sender";
|
|
3297
|
+
"isMut": false;
|
|
3298
|
+
"isSigner": true;
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
"name": "tokenXProgram";
|
|
3302
|
+
"isMut": false;
|
|
3303
|
+
"isSigner": false;
|
|
3304
|
+
},
|
|
3305
|
+
{
|
|
3306
|
+
"name": "tokenYProgram";
|
|
3307
|
+
"isMut": false;
|
|
3308
|
+
"isSigner": false;
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
"name": "memoProgram";
|
|
3312
|
+
"isMut": false;
|
|
3313
|
+
"isSigner": false;
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
"name": "eventAuthority";
|
|
3317
|
+
"isMut": false;
|
|
3318
|
+
"isSigner": false;
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
"name": "program";
|
|
3322
|
+
"isMut": false;
|
|
3323
|
+
"isSigner": false;
|
|
3324
|
+
}
|
|
3325
|
+
];
|
|
3326
|
+
"args": [
|
|
3327
|
+
{
|
|
3328
|
+
"name": "liquidityParameter";
|
|
3329
|
+
"type": {
|
|
3330
|
+
"defined": "LiquidityParameter";
|
|
3331
|
+
};
|
|
3332
|
+
},
|
|
3333
|
+
{
|
|
3334
|
+
"name": "remainingAccountsInfo";
|
|
3335
|
+
"type": {
|
|
3336
|
+
"defined": "RemainingAccountsInfo";
|
|
3337
|
+
};
|
|
3338
|
+
}
|
|
3339
|
+
];
|
|
3340
|
+
},
|
|
3341
|
+
{
|
|
3342
|
+
"name": "addLiquidityByStrategy2";
|
|
3343
|
+
"accounts": [
|
|
3344
|
+
{
|
|
3345
|
+
"name": "position";
|
|
3346
|
+
"isMut": true;
|
|
3347
|
+
"isSigner": false;
|
|
3348
|
+
},
|
|
3349
|
+
{
|
|
3350
|
+
"name": "lbPair";
|
|
3351
|
+
"isMut": true;
|
|
3352
|
+
"isSigner": false;
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
"name": "binArrayBitmapExtension";
|
|
3356
|
+
"isMut": true;
|
|
3357
|
+
"isSigner": false;
|
|
3358
|
+
"isOptional": true;
|
|
3359
|
+
},
|
|
3360
|
+
{
|
|
3361
|
+
"name": "userTokenX";
|
|
3362
|
+
"isMut": true;
|
|
3363
|
+
"isSigner": false;
|
|
3364
|
+
},
|
|
3365
|
+
{
|
|
3366
|
+
"name": "userTokenY";
|
|
3367
|
+
"isMut": true;
|
|
3368
|
+
"isSigner": false;
|
|
3369
|
+
},
|
|
3370
|
+
{
|
|
3371
|
+
"name": "reserveX";
|
|
3372
|
+
"isMut": true;
|
|
3373
|
+
"isSigner": false;
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
"name": "reserveY";
|
|
3377
|
+
"isMut": true;
|
|
3378
|
+
"isSigner": false;
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
"name": "tokenXMint";
|
|
3382
|
+
"isMut": false;
|
|
3383
|
+
"isSigner": false;
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
"name": "tokenYMint";
|
|
3387
|
+
"isMut": false;
|
|
3388
|
+
"isSigner": false;
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
"name": "sender";
|
|
3392
|
+
"isMut": false;
|
|
3393
|
+
"isSigner": true;
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
"name": "tokenXProgram";
|
|
3397
|
+
"isMut": false;
|
|
3398
|
+
"isSigner": false;
|
|
3399
|
+
},
|
|
3400
|
+
{
|
|
3401
|
+
"name": "tokenYProgram";
|
|
3402
|
+
"isMut": false;
|
|
3403
|
+
"isSigner": false;
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"name": "memoProgram";
|
|
3407
|
+
"isMut": false;
|
|
3408
|
+
"isSigner": false;
|
|
3409
|
+
},
|
|
3410
|
+
{
|
|
3411
|
+
"name": "eventAuthority";
|
|
3412
|
+
"isMut": false;
|
|
3413
|
+
"isSigner": false;
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
"name": "program";
|
|
3417
|
+
"isMut": false;
|
|
3418
|
+
"isSigner": false;
|
|
3419
|
+
}
|
|
3420
|
+
];
|
|
3421
|
+
"args": [
|
|
3422
|
+
{
|
|
3423
|
+
"name": "liquidityParameter";
|
|
3424
|
+
"type": {
|
|
3425
|
+
"defined": "LiquidityParameterByStrategy";
|
|
3426
|
+
};
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
"name": "remainingAccountsInfo";
|
|
3430
|
+
"type": {
|
|
3431
|
+
"defined": "RemainingAccountsInfo";
|
|
3432
|
+
};
|
|
3433
|
+
}
|
|
3434
|
+
];
|
|
3435
|
+
},
|
|
3436
|
+
{
|
|
3437
|
+
"name": "removeLiquidity2";
|
|
3438
|
+
"accounts": [
|
|
3439
|
+
{
|
|
3440
|
+
"name": "position";
|
|
3441
|
+
"isMut": true;
|
|
3442
|
+
"isSigner": false;
|
|
3443
|
+
},
|
|
3444
|
+
{
|
|
3445
|
+
"name": "lbPair";
|
|
3446
|
+
"isMut": true;
|
|
3447
|
+
"isSigner": false;
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
"name": "binArrayBitmapExtension";
|
|
3451
|
+
"isMut": true;
|
|
3452
|
+
"isSigner": false;
|
|
3453
|
+
"isOptional": true;
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
"name": "userTokenX";
|
|
3457
|
+
"isMut": true;
|
|
3458
|
+
"isSigner": false;
|
|
3459
|
+
},
|
|
3460
|
+
{
|
|
3461
|
+
"name": "userTokenY";
|
|
3462
|
+
"isMut": true;
|
|
3463
|
+
"isSigner": false;
|
|
3464
|
+
},
|
|
3465
|
+
{
|
|
3466
|
+
"name": "reserveX";
|
|
3467
|
+
"isMut": true;
|
|
3468
|
+
"isSigner": false;
|
|
3469
|
+
},
|
|
3470
|
+
{
|
|
3471
|
+
"name": "reserveY";
|
|
3472
|
+
"isMut": true;
|
|
3473
|
+
"isSigner": false;
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
"name": "tokenXMint";
|
|
3477
|
+
"isMut": false;
|
|
3478
|
+
"isSigner": false;
|
|
3479
|
+
},
|
|
3480
|
+
{
|
|
3481
|
+
"name": "tokenYMint";
|
|
3482
|
+
"isMut": false;
|
|
3483
|
+
"isSigner": false;
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
"name": "sender";
|
|
3487
|
+
"isMut": false;
|
|
3488
|
+
"isSigner": true;
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
"name": "tokenXProgram";
|
|
3492
|
+
"isMut": false;
|
|
3493
|
+
"isSigner": false;
|
|
3494
|
+
},
|
|
3495
|
+
{
|
|
3496
|
+
"name": "tokenYProgram";
|
|
3497
|
+
"isMut": false;
|
|
3498
|
+
"isSigner": false;
|
|
3499
|
+
},
|
|
3500
|
+
{
|
|
3501
|
+
"name": "memoProgram";
|
|
3502
|
+
"isMut": false;
|
|
3503
|
+
"isSigner": false;
|
|
3504
|
+
},
|
|
3505
|
+
{
|
|
3506
|
+
"name": "eventAuthority";
|
|
3507
|
+
"isMut": false;
|
|
3508
|
+
"isSigner": false;
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
"name": "program";
|
|
3512
|
+
"isMut": false;
|
|
3513
|
+
"isSigner": false;
|
|
3514
|
+
}
|
|
3515
|
+
];
|
|
3516
|
+
"args": [
|
|
3517
|
+
{
|
|
3518
|
+
"name": "binLiquidityRemoval";
|
|
3519
|
+
"type": {
|
|
3520
|
+
"vec": {
|
|
3521
|
+
"defined": "BinLiquidityReduction";
|
|
3522
|
+
};
|
|
3523
|
+
};
|
|
3524
|
+
},
|
|
3525
|
+
{
|
|
3526
|
+
"name": "remainingAccountsInfo";
|
|
3527
|
+
"type": {
|
|
3528
|
+
"defined": "RemainingAccountsInfo";
|
|
3529
|
+
};
|
|
3530
|
+
}
|
|
3531
|
+
];
|
|
3532
|
+
},
|
|
3533
|
+
{
|
|
3534
|
+
"name": "removeLiquidityByRange2";
|
|
3535
|
+
"accounts": [
|
|
3536
|
+
{
|
|
3537
|
+
"name": "position";
|
|
3538
|
+
"isMut": true;
|
|
3539
|
+
"isSigner": false;
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
"name": "lbPair";
|
|
3543
|
+
"isMut": true;
|
|
3544
|
+
"isSigner": false;
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
"name": "binArrayBitmapExtension";
|
|
3548
|
+
"isMut": true;
|
|
3549
|
+
"isSigner": false;
|
|
3550
|
+
"isOptional": true;
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"name": "userTokenX";
|
|
3554
|
+
"isMut": true;
|
|
3555
|
+
"isSigner": false;
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"name": "userTokenY";
|
|
3559
|
+
"isMut": true;
|
|
3560
|
+
"isSigner": false;
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
"name": "reserveX";
|
|
3564
|
+
"isMut": true;
|
|
3565
|
+
"isSigner": false;
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"name": "reserveY";
|
|
3569
|
+
"isMut": true;
|
|
3570
|
+
"isSigner": false;
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
"name": "tokenXMint";
|
|
3574
|
+
"isMut": false;
|
|
3575
|
+
"isSigner": false;
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
"name": "tokenYMint";
|
|
3579
|
+
"isMut": false;
|
|
3580
|
+
"isSigner": false;
|
|
3581
|
+
},
|
|
3582
|
+
{
|
|
3583
|
+
"name": "sender";
|
|
3584
|
+
"isMut": false;
|
|
3585
|
+
"isSigner": true;
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"name": "tokenXProgram";
|
|
3589
|
+
"isMut": false;
|
|
3590
|
+
"isSigner": false;
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "tokenYProgram";
|
|
3594
|
+
"isMut": false;
|
|
3595
|
+
"isSigner": false;
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"name": "memoProgram";
|
|
3599
|
+
"isMut": false;
|
|
3600
|
+
"isSigner": false;
|
|
3601
|
+
},
|
|
3602
|
+
{
|
|
3603
|
+
"name": "eventAuthority";
|
|
3604
|
+
"isMut": false;
|
|
3605
|
+
"isSigner": false;
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"name": "program";
|
|
3609
|
+
"isMut": false;
|
|
3610
|
+
"isSigner": false;
|
|
3611
|
+
}
|
|
3612
|
+
];
|
|
3613
|
+
"args": [
|
|
3614
|
+
{
|
|
3615
|
+
"name": "fromBinId";
|
|
3616
|
+
"type": "i32";
|
|
3617
|
+
},
|
|
3618
|
+
{
|
|
3619
|
+
"name": "toBinId";
|
|
3620
|
+
"type": "i32";
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
"name": "bpsToRemove";
|
|
3624
|
+
"type": "u16";
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"name": "remainingAccountsInfo";
|
|
3628
|
+
"type": {
|
|
3629
|
+
"defined": "RemainingAccountsInfo";
|
|
3630
|
+
};
|
|
3631
|
+
}
|
|
3632
|
+
];
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
"name": "swap2";
|
|
3636
|
+
"accounts": [
|
|
3637
|
+
{
|
|
3638
|
+
"name": "lbPair";
|
|
3639
|
+
"isMut": true;
|
|
3640
|
+
"isSigner": false;
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
"name": "binArrayBitmapExtension";
|
|
3644
|
+
"isMut": false;
|
|
3645
|
+
"isSigner": false;
|
|
3646
|
+
"isOptional": true;
|
|
3647
|
+
},
|
|
3648
|
+
{
|
|
3649
|
+
"name": "reserveX";
|
|
3650
|
+
"isMut": true;
|
|
3651
|
+
"isSigner": false;
|
|
3652
|
+
},
|
|
3653
|
+
{
|
|
3654
|
+
"name": "reserveY";
|
|
3655
|
+
"isMut": true;
|
|
3656
|
+
"isSigner": false;
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
"name": "userTokenIn";
|
|
3660
|
+
"isMut": true;
|
|
3661
|
+
"isSigner": false;
|
|
3662
|
+
},
|
|
3663
|
+
{
|
|
3664
|
+
"name": "userTokenOut";
|
|
3665
|
+
"isMut": true;
|
|
3666
|
+
"isSigner": false;
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"name": "tokenXMint";
|
|
3670
|
+
"isMut": false;
|
|
3671
|
+
"isSigner": false;
|
|
3672
|
+
},
|
|
3673
|
+
{
|
|
3674
|
+
"name": "tokenYMint";
|
|
3675
|
+
"isMut": false;
|
|
3676
|
+
"isSigner": false;
|
|
3677
|
+
},
|
|
3678
|
+
{
|
|
3679
|
+
"name": "oracle";
|
|
3680
|
+
"isMut": true;
|
|
3681
|
+
"isSigner": false;
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
"name": "hostFeeIn";
|
|
3685
|
+
"isMut": true;
|
|
3686
|
+
"isSigner": false;
|
|
3687
|
+
"isOptional": true;
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"name": "user";
|
|
3691
|
+
"isMut": false;
|
|
3692
|
+
"isSigner": true;
|
|
3693
|
+
},
|
|
3694
|
+
{
|
|
3695
|
+
"name": "tokenXProgram";
|
|
3696
|
+
"isMut": false;
|
|
3697
|
+
"isSigner": false;
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"name": "tokenYProgram";
|
|
3701
|
+
"isMut": false;
|
|
3702
|
+
"isSigner": false;
|
|
3703
|
+
},
|
|
3704
|
+
{
|
|
3705
|
+
"name": "memoProgram";
|
|
3706
|
+
"isMut": false;
|
|
3707
|
+
"isSigner": false;
|
|
3708
|
+
},
|
|
3709
|
+
{
|
|
3710
|
+
"name": "eventAuthority";
|
|
3711
|
+
"isMut": false;
|
|
3712
|
+
"isSigner": false;
|
|
3713
|
+
},
|
|
3714
|
+
{
|
|
3715
|
+
"name": "program";
|
|
3716
|
+
"isMut": false;
|
|
3717
|
+
"isSigner": false;
|
|
3718
|
+
}
|
|
3719
|
+
];
|
|
3720
|
+
"args": [
|
|
3721
|
+
{
|
|
3722
|
+
"name": "amountIn";
|
|
3723
|
+
"type": "u64";
|
|
3724
|
+
},
|
|
3725
|
+
{
|
|
3726
|
+
"name": "minAmountOut";
|
|
3727
|
+
"type": "u64";
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"name": "remainingAccountsInfo";
|
|
3731
|
+
"type": {
|
|
3732
|
+
"defined": "RemainingAccountsInfo";
|
|
3733
|
+
};
|
|
3734
|
+
}
|
|
3735
|
+
];
|
|
3736
|
+
},
|
|
3737
|
+
{
|
|
3738
|
+
"name": "swapWithPriceImpact2";
|
|
3739
|
+
"accounts": [
|
|
3740
|
+
{
|
|
3741
|
+
"name": "lbPair";
|
|
3742
|
+
"isMut": true;
|
|
3743
|
+
"isSigner": false;
|
|
3744
|
+
},
|
|
3745
|
+
{
|
|
3746
|
+
"name": "binArrayBitmapExtension";
|
|
3747
|
+
"isMut": false;
|
|
3748
|
+
"isSigner": false;
|
|
3749
|
+
"isOptional": true;
|
|
3750
|
+
},
|
|
3751
|
+
{
|
|
3752
|
+
"name": "reserveX";
|
|
3753
|
+
"isMut": true;
|
|
3754
|
+
"isSigner": false;
|
|
3755
|
+
},
|
|
3756
|
+
{
|
|
3757
|
+
"name": "reserveY";
|
|
3758
|
+
"isMut": true;
|
|
3759
|
+
"isSigner": false;
|
|
3760
|
+
},
|
|
3761
|
+
{
|
|
3762
|
+
"name": "userTokenIn";
|
|
3763
|
+
"isMut": true;
|
|
3764
|
+
"isSigner": false;
|
|
3765
|
+
},
|
|
3766
|
+
{
|
|
3767
|
+
"name": "userTokenOut";
|
|
3768
|
+
"isMut": true;
|
|
3769
|
+
"isSigner": false;
|
|
3770
|
+
},
|
|
3771
|
+
{
|
|
3772
|
+
"name": "tokenXMint";
|
|
3773
|
+
"isMut": false;
|
|
3774
|
+
"isSigner": false;
|
|
3775
|
+
},
|
|
3776
|
+
{
|
|
3777
|
+
"name": "tokenYMint";
|
|
3778
|
+
"isMut": false;
|
|
3779
|
+
"isSigner": false;
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"name": "oracle";
|
|
3783
|
+
"isMut": true;
|
|
3784
|
+
"isSigner": false;
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
"name": "hostFeeIn";
|
|
3788
|
+
"isMut": true;
|
|
3789
|
+
"isSigner": false;
|
|
3790
|
+
"isOptional": true;
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "user";
|
|
3794
|
+
"isMut": false;
|
|
3795
|
+
"isSigner": true;
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
"name": "tokenXProgram";
|
|
3799
|
+
"isMut": false;
|
|
3800
|
+
"isSigner": false;
|
|
3801
|
+
},
|
|
3802
|
+
{
|
|
3803
|
+
"name": "tokenYProgram";
|
|
3804
|
+
"isMut": false;
|
|
3805
|
+
"isSigner": false;
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
"name": "memoProgram";
|
|
3809
|
+
"isMut": false;
|
|
3810
|
+
"isSigner": false;
|
|
3811
|
+
},
|
|
3812
|
+
{
|
|
3813
|
+
"name": "eventAuthority";
|
|
3814
|
+
"isMut": false;
|
|
3815
|
+
"isSigner": false;
|
|
3816
|
+
},
|
|
3817
|
+
{
|
|
3818
|
+
"name": "program";
|
|
3819
|
+
"isMut": false;
|
|
3820
|
+
"isSigner": false;
|
|
3821
|
+
}
|
|
3822
|
+
];
|
|
3823
|
+
"args": [
|
|
3824
|
+
{
|
|
3825
|
+
"name": "amountIn";
|
|
3826
|
+
"type": "u64";
|
|
3827
|
+
},
|
|
3828
|
+
{
|
|
3829
|
+
"name": "activeId";
|
|
3830
|
+
"type": {
|
|
3831
|
+
"option": "i32";
|
|
3832
|
+
};
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"name": "maxPriceImpactBps";
|
|
3836
|
+
"type": "u16";
|
|
3837
|
+
},
|
|
3838
|
+
{
|
|
3839
|
+
"name": "remainingAccountsInfo";
|
|
3840
|
+
"type": {
|
|
3841
|
+
"defined": "RemainingAccountsInfo";
|
|
3842
|
+
};
|
|
3843
|
+
}
|
|
3844
|
+
];
|
|
3845
|
+
},
|
|
3846
|
+
{
|
|
3847
|
+
"name": "closePosition2";
|
|
3848
|
+
"accounts": [
|
|
3849
|
+
{
|
|
3850
|
+
"name": "position";
|
|
3851
|
+
"isMut": true;
|
|
3852
|
+
"isSigner": false;
|
|
3853
|
+
},
|
|
3854
|
+
{
|
|
3855
|
+
"name": "sender";
|
|
3856
|
+
"isMut": false;
|
|
3857
|
+
"isSigner": true;
|
|
3858
|
+
},
|
|
3859
|
+
{
|
|
3860
|
+
"name": "rentReceiver";
|
|
3861
|
+
"isMut": true;
|
|
3862
|
+
"isSigner": false;
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
"name": "eventAuthority";
|
|
3866
|
+
"isMut": false;
|
|
3867
|
+
"isSigner": false;
|
|
3868
|
+
},
|
|
3869
|
+
{
|
|
3870
|
+
"name": "program";
|
|
3871
|
+
"isMut": false;
|
|
3872
|
+
"isSigner": false;
|
|
3873
|
+
}
|
|
3874
|
+
];
|
|
3875
|
+
"args": [];
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
"name": "updateFeesAndReward2";
|
|
3879
|
+
"accounts": [
|
|
3880
|
+
{
|
|
3881
|
+
"name": "position";
|
|
3882
|
+
"isMut": true;
|
|
3883
|
+
"isSigner": false;
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
"name": "lbPair";
|
|
3887
|
+
"isMut": true;
|
|
3888
|
+
"isSigner": false;
|
|
3889
|
+
},
|
|
3890
|
+
{
|
|
3891
|
+
"name": "owner";
|
|
3892
|
+
"isMut": false;
|
|
3893
|
+
"isSigner": true;
|
|
3894
|
+
}
|
|
3895
|
+
];
|
|
3896
|
+
"args": [
|
|
3897
|
+
{
|
|
3898
|
+
"name": "minBinId";
|
|
3899
|
+
"type": "i32";
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
"name": "maxBinId";
|
|
3903
|
+
"type": "i32";
|
|
3904
|
+
}
|
|
3905
|
+
];
|
|
3906
|
+
},
|
|
3907
|
+
{
|
|
3908
|
+
"name": "closePositionIfEmpty";
|
|
3909
|
+
"accounts": [
|
|
3910
|
+
{
|
|
3911
|
+
"name": "position";
|
|
3912
|
+
"isMut": true;
|
|
3913
|
+
"isSigner": false;
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
"name": "sender";
|
|
3917
|
+
"isMut": false;
|
|
3918
|
+
"isSigner": true;
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
"name": "rentReceiver";
|
|
3922
|
+
"isMut": true;
|
|
3923
|
+
"isSigner": false;
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
"name": "eventAuthority";
|
|
3927
|
+
"isMut": false;
|
|
3928
|
+
"isSigner": false;
|
|
3929
|
+
},
|
|
3930
|
+
{
|
|
3931
|
+
"name": "program";
|
|
3932
|
+
"isMut": false;
|
|
3933
|
+
"isSigner": false;
|
|
3934
|
+
}
|
|
3935
|
+
];
|
|
3936
|
+
"args": [];
|
|
3937
|
+
}
|
|
3938
|
+
];
|
|
3939
|
+
"accounts": [
|
|
3940
|
+
{
|
|
3941
|
+
"name": "binArrayBitmapExtension";
|
|
3942
|
+
"type": {
|
|
3943
|
+
"kind": "struct";
|
|
3944
|
+
"fields": [
|
|
3945
|
+
{
|
|
3946
|
+
"name": "lbPair";
|
|
3947
|
+
"type": "publicKey";
|
|
3948
|
+
},
|
|
3949
|
+
{
|
|
3950
|
+
"name": "positiveBinArrayBitmap";
|
|
3951
|
+
"docs": [
|
|
3952
|
+
"Packed initialized bin array state for start_bin_index is positive"
|
|
3953
|
+
];
|
|
3954
|
+
"type": {
|
|
3955
|
+
"array": [
|
|
3956
|
+
{
|
|
3957
|
+
"array": [
|
|
3958
|
+
"u64",
|
|
3959
|
+
8
|
|
3960
|
+
];
|
|
3961
|
+
},
|
|
3962
|
+
12
|
|
3963
|
+
];
|
|
3964
|
+
};
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
"name": "negativeBinArrayBitmap";
|
|
3968
|
+
"docs": [
|
|
3969
|
+
"Packed initialized bin array state for start_bin_index is negative"
|
|
3970
|
+
];
|
|
3971
|
+
"type": {
|
|
3972
|
+
"array": [
|
|
3973
|
+
{
|
|
3974
|
+
"array": [
|
|
3975
|
+
"u64",
|
|
3976
|
+
8
|
|
3977
|
+
];
|
|
3978
|
+
},
|
|
3979
|
+
12
|
|
3980
|
+
];
|
|
3981
|
+
};
|
|
3982
|
+
}
|
|
3983
|
+
];
|
|
3984
|
+
};
|
|
3985
|
+
},
|
|
3986
|
+
{
|
|
3987
|
+
"name": "binArray";
|
|
2657
3988
|
"docs": [
|
|
2658
3989
|
"An account to contain a range of bin. For example: Bin 100 <-> 200.",
|
|
2659
3990
|
"For example:",
|
|
@@ -2668,33 +3999,149 @@ type LbClmm = {
|
|
|
2668
3999
|
"type": "i64";
|
|
2669
4000
|
},
|
|
2670
4001
|
{
|
|
2671
|
-
"name": "version";
|
|
4002
|
+
"name": "version";
|
|
4003
|
+
"docs": [
|
|
4004
|
+
"Version of binArray"
|
|
4005
|
+
];
|
|
4006
|
+
"type": "u8";
|
|
4007
|
+
},
|
|
4008
|
+
{
|
|
4009
|
+
"name": "padding";
|
|
4010
|
+
"type": {
|
|
4011
|
+
"array": [
|
|
4012
|
+
"u8",
|
|
4013
|
+
7
|
|
4014
|
+
];
|
|
4015
|
+
};
|
|
4016
|
+
},
|
|
4017
|
+
{
|
|
4018
|
+
"name": "lbPair";
|
|
4019
|
+
"type": "publicKey";
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
"name": "bins";
|
|
4023
|
+
"type": {
|
|
4024
|
+
"array": [
|
|
4025
|
+
{
|
|
4026
|
+
"defined": "Bin";
|
|
4027
|
+
},
|
|
4028
|
+
70
|
|
4029
|
+
];
|
|
4030
|
+
};
|
|
4031
|
+
}
|
|
4032
|
+
];
|
|
4033
|
+
};
|
|
4034
|
+
},
|
|
4035
|
+
{
|
|
4036
|
+
"name": "positionV3";
|
|
4037
|
+
"type": {
|
|
4038
|
+
"kind": "struct";
|
|
4039
|
+
"fields": [
|
|
4040
|
+
{
|
|
4041
|
+
"name": "lbPair";
|
|
4042
|
+
"docs": [
|
|
4043
|
+
"The LB pair of this position"
|
|
4044
|
+
];
|
|
4045
|
+
"type": "publicKey";
|
|
4046
|
+
},
|
|
4047
|
+
{
|
|
4048
|
+
"name": "owner";
|
|
4049
|
+
"docs": [
|
|
4050
|
+
"Owner of the position. Client rely on this to to fetch their positions."
|
|
4051
|
+
];
|
|
4052
|
+
"type": "publicKey";
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
"name": "lowerBinId";
|
|
4056
|
+
"docs": [
|
|
4057
|
+
"Lower bin ID"
|
|
4058
|
+
];
|
|
4059
|
+
"type": "i32";
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
"name": "upperBinId";
|
|
4063
|
+
"docs": [
|
|
4064
|
+
"Upper bin ID"
|
|
4065
|
+
];
|
|
4066
|
+
"type": "i32";
|
|
4067
|
+
},
|
|
4068
|
+
{
|
|
4069
|
+
"name": "lastUpdatedAt";
|
|
4070
|
+
"docs": [
|
|
4071
|
+
"Last updated timestamp"
|
|
4072
|
+
];
|
|
4073
|
+
"type": "i64";
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
"name": "totalClaimedFeeXAmount";
|
|
4077
|
+
"docs": [
|
|
4078
|
+
"Total claimed token fee X"
|
|
4079
|
+
];
|
|
4080
|
+
"type": "u64";
|
|
4081
|
+
},
|
|
4082
|
+
{
|
|
4083
|
+
"name": "totalClaimedFeeYAmount";
|
|
4084
|
+
"docs": [
|
|
4085
|
+
"Total claimed token fee Y"
|
|
4086
|
+
];
|
|
4087
|
+
"type": "u64";
|
|
4088
|
+
},
|
|
4089
|
+
{
|
|
4090
|
+
"name": "totalClaimedRewards";
|
|
4091
|
+
"docs": [
|
|
4092
|
+
"Total claimed rewards"
|
|
4093
|
+
];
|
|
4094
|
+
"type": {
|
|
4095
|
+
"array": [
|
|
4096
|
+
"u64",
|
|
4097
|
+
2
|
|
4098
|
+
];
|
|
4099
|
+
};
|
|
4100
|
+
},
|
|
4101
|
+
{
|
|
4102
|
+
"name": "operator";
|
|
4103
|
+
"docs": [
|
|
4104
|
+
"Operator of position"
|
|
4105
|
+
];
|
|
4106
|
+
"type": "publicKey";
|
|
4107
|
+
},
|
|
4108
|
+
{
|
|
4109
|
+
"name": "lockReleasePoint";
|
|
4110
|
+
"docs": [
|
|
4111
|
+
"Time point which the locked liquidity can be withdraw"
|
|
4112
|
+
];
|
|
4113
|
+
"type": "u64";
|
|
4114
|
+
},
|
|
4115
|
+
{
|
|
4116
|
+
"name": "padding0";
|
|
2672
4117
|
"docs": [
|
|
2673
|
-
"
|
|
4118
|
+
"Padding"
|
|
2674
4119
|
];
|
|
2675
|
-
"type": "
|
|
4120
|
+
"type": "u64";
|
|
2676
4121
|
},
|
|
2677
4122
|
{
|
|
2678
|
-
"name": "
|
|
2679
|
-
"
|
|
2680
|
-
"
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
];
|
|
2684
|
-
};
|
|
4123
|
+
"name": "feeOwner";
|
|
4124
|
+
"docs": [
|
|
4125
|
+
"Address is able to claim fee in this position, only valid for bootstrap_liquidity_position"
|
|
4126
|
+
];
|
|
4127
|
+
"type": "publicKey";
|
|
2685
4128
|
},
|
|
2686
4129
|
{
|
|
2687
|
-
"name": "
|
|
2688
|
-
"
|
|
4130
|
+
"name": "length";
|
|
4131
|
+
"docs": [
|
|
4132
|
+
"Number of bins"
|
|
4133
|
+
];
|
|
4134
|
+
"type": "u64";
|
|
2689
4135
|
},
|
|
2690
4136
|
{
|
|
2691
|
-
"name": "
|
|
4137
|
+
"name": "reserved";
|
|
4138
|
+
"docs": [
|
|
4139
|
+
"Reserved space for future use"
|
|
4140
|
+
];
|
|
2692
4141
|
"type": {
|
|
2693
4142
|
"array": [
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
},
|
|
2697
|
-
70
|
|
4143
|
+
"u8",
|
|
4144
|
+
128
|
|
2698
4145
|
];
|
|
2699
4146
|
};
|
|
2700
4147
|
}
|
|
@@ -2955,6 +4402,20 @@ type LbClmm = {
|
|
|
2955
4402
|
];
|
|
2956
4403
|
"type": "publicKey";
|
|
2957
4404
|
},
|
|
4405
|
+
{
|
|
4406
|
+
"name": "tokenMintXProgramFlag";
|
|
4407
|
+
"docs": [
|
|
4408
|
+
"token_mint_x_program_flag"
|
|
4409
|
+
];
|
|
4410
|
+
"type": "u8";
|
|
4411
|
+
},
|
|
4412
|
+
{
|
|
4413
|
+
"name": "tokenMintYProgramFlag";
|
|
4414
|
+
"docs": [
|
|
4415
|
+
"token_mint_y_program_flag"
|
|
4416
|
+
];
|
|
4417
|
+
"type": "u8";
|
|
4418
|
+
},
|
|
2958
4419
|
{
|
|
2959
4420
|
"name": "reserved";
|
|
2960
4421
|
"docs": [
|
|
@@ -2963,7 +4424,7 @@ type LbClmm = {
|
|
|
2963
4424
|
"type": {
|
|
2964
4425
|
"array": [
|
|
2965
4426
|
"u8",
|
|
2966
|
-
|
|
4427
|
+
22
|
|
2967
4428
|
];
|
|
2968
4429
|
};
|
|
2969
4430
|
}
|
|
@@ -3269,6 +4730,103 @@ type LbClmm = {
|
|
|
3269
4730
|
];
|
|
3270
4731
|
};
|
|
3271
4732
|
},
|
|
4733
|
+
{
|
|
4734
|
+
"name": "presetParameter2";
|
|
4735
|
+
"type": {
|
|
4736
|
+
"kind": "struct";
|
|
4737
|
+
"fields": [
|
|
4738
|
+
{
|
|
4739
|
+
"name": "binStep";
|
|
4740
|
+
"docs": [
|
|
4741
|
+
"Bin step. Represent the price increment / decrement."
|
|
4742
|
+
];
|
|
4743
|
+
"type": "u16";
|
|
4744
|
+
},
|
|
4745
|
+
{
|
|
4746
|
+
"name": "baseFactor";
|
|
4747
|
+
"docs": [
|
|
4748
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
4749
|
+
];
|
|
4750
|
+
"type": "u16";
|
|
4751
|
+
},
|
|
4752
|
+
{
|
|
4753
|
+
"name": "filterPeriod";
|
|
4754
|
+
"docs": [
|
|
4755
|
+
"Filter period determine high frequency trading time window."
|
|
4756
|
+
];
|
|
4757
|
+
"type": "u16";
|
|
4758
|
+
},
|
|
4759
|
+
{
|
|
4760
|
+
"name": "decayPeriod";
|
|
4761
|
+
"docs": [
|
|
4762
|
+
"Decay period determine when the volatile fee start decay / decrease."
|
|
4763
|
+
];
|
|
4764
|
+
"type": "u16";
|
|
4765
|
+
},
|
|
4766
|
+
{
|
|
4767
|
+
"name": "variableFeeControl";
|
|
4768
|
+
"docs": [
|
|
4769
|
+
"Used to scale the variable fee component depending on the dynamic of the market"
|
|
4770
|
+
];
|
|
4771
|
+
"type": "u32";
|
|
4772
|
+
},
|
|
4773
|
+
{
|
|
4774
|
+
"name": "maxVolatilityAccumulator";
|
|
4775
|
+
"docs": [
|
|
4776
|
+
"Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
|
|
4777
|
+
];
|
|
4778
|
+
"type": "u32";
|
|
4779
|
+
},
|
|
4780
|
+
{
|
|
4781
|
+
"name": "reductionFactor";
|
|
4782
|
+
"docs": [
|
|
4783
|
+
"Reduction factor controls the volatile fee rate decrement rate."
|
|
4784
|
+
];
|
|
4785
|
+
"type": "u16";
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
"name": "protocolShare";
|
|
4789
|
+
"docs": [
|
|
4790
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
4791
|
+
];
|
|
4792
|
+
"type": "u16";
|
|
4793
|
+
},
|
|
4794
|
+
{
|
|
4795
|
+
"name": "index";
|
|
4796
|
+
"docs": [
|
|
4797
|
+
"index"
|
|
4798
|
+
];
|
|
4799
|
+
"type": "u16";
|
|
4800
|
+
},
|
|
4801
|
+
{
|
|
4802
|
+
"name": "baseFeePowerFactor";
|
|
4803
|
+
"docs": [
|
|
4804
|
+
"Base fee power factor"
|
|
4805
|
+
];
|
|
4806
|
+
"type": "u8";
|
|
4807
|
+
},
|
|
4808
|
+
{
|
|
4809
|
+
"name": "padding0";
|
|
4810
|
+
"docs": [
|
|
4811
|
+
"Padding 0 for future use"
|
|
4812
|
+
];
|
|
4813
|
+
"type": "u8";
|
|
4814
|
+
},
|
|
4815
|
+
{
|
|
4816
|
+
"name": "padding1";
|
|
4817
|
+
"docs": [
|
|
4818
|
+
"Padding 1 for future use"
|
|
4819
|
+
];
|
|
4820
|
+
"type": {
|
|
4821
|
+
"array": [
|
|
4822
|
+
"u64",
|
|
4823
|
+
20
|
|
4824
|
+
];
|
|
4825
|
+
};
|
|
4826
|
+
}
|
|
4827
|
+
];
|
|
4828
|
+
};
|
|
4829
|
+
},
|
|
3272
4830
|
{
|
|
3273
4831
|
"name": "presetParameter";
|
|
3274
4832
|
"type": {
|
|
@@ -3284,7 +4842,7 @@ type LbClmm = {
|
|
|
3284
4842
|
{
|
|
3285
4843
|
"name": "baseFactor";
|
|
3286
4844
|
"docs": [
|
|
3287
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
4845
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
3288
4846
|
];
|
|
3289
4847
|
"type": "u16";
|
|
3290
4848
|
},
|
|
@@ -3346,14 +4904,48 @@ type LbClmm = {
|
|
|
3346
4904
|
}
|
|
3347
4905
|
];
|
|
3348
4906
|
};
|
|
4907
|
+
},
|
|
4908
|
+
{
|
|
4909
|
+
"name": "tokenBadge";
|
|
4910
|
+
"docs": [
|
|
4911
|
+
"Parameter that set by the protocol"
|
|
4912
|
+
];
|
|
4913
|
+
"type": {
|
|
4914
|
+
"kind": "struct";
|
|
4915
|
+
"fields": [
|
|
4916
|
+
{
|
|
4917
|
+
"name": "tokenMint";
|
|
4918
|
+
"docs": [
|
|
4919
|
+
"token mint"
|
|
4920
|
+
];
|
|
4921
|
+
"type": "publicKey";
|
|
4922
|
+
},
|
|
4923
|
+
{
|
|
4924
|
+
"name": "padding";
|
|
4925
|
+
"docs": [
|
|
4926
|
+
"Reserve"
|
|
4927
|
+
];
|
|
4928
|
+
"type": {
|
|
4929
|
+
"array": [
|
|
4930
|
+
"u8",
|
|
4931
|
+
128
|
|
4932
|
+
];
|
|
4933
|
+
};
|
|
4934
|
+
}
|
|
4935
|
+
];
|
|
4936
|
+
};
|
|
3349
4937
|
}
|
|
3350
4938
|
];
|
|
3351
4939
|
"types": [
|
|
3352
4940
|
{
|
|
3353
|
-
"name": "
|
|
4941
|
+
"name": "InitPresetParameters2Ix";
|
|
3354
4942
|
"type": {
|
|
3355
4943
|
"kind": "struct";
|
|
3356
4944
|
"fields": [
|
|
4945
|
+
{
|
|
4946
|
+
"name": "index";
|
|
4947
|
+
"type": "u16";
|
|
4948
|
+
},
|
|
3357
4949
|
{
|
|
3358
4950
|
"name": "binStep";
|
|
3359
4951
|
"docs": [
|
|
@@ -3364,7 +4956,7 @@ type LbClmm = {
|
|
|
3364
4956
|
{
|
|
3365
4957
|
"name": "baseFactor";
|
|
3366
4958
|
"docs": [
|
|
3367
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
4959
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
3368
4960
|
];
|
|
3369
4961
|
"type": "u16";
|
|
3370
4962
|
},
|
|
@@ -3404,18 +4996,75 @@ type LbClmm = {
|
|
|
3404
4996
|
"type": "u32";
|
|
3405
4997
|
},
|
|
3406
4998
|
{
|
|
3407
|
-
"name": "
|
|
4999
|
+
"name": "protocolShare";
|
|
3408
5000
|
"docs": [
|
|
3409
|
-
"
|
|
5001
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
3410
5002
|
];
|
|
3411
|
-
"type": "
|
|
5003
|
+
"type": "u16";
|
|
3412
5004
|
},
|
|
3413
5005
|
{
|
|
3414
|
-
"name": "
|
|
5006
|
+
"name": "baseFeePowerFactor";
|
|
3415
5007
|
"docs": [
|
|
3416
|
-
"
|
|
5008
|
+
"Base fee power factor"
|
|
3417
5009
|
];
|
|
3418
|
-
"type": "
|
|
5010
|
+
"type": "u8";
|
|
5011
|
+
}
|
|
5012
|
+
];
|
|
5013
|
+
};
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
"name": "InitPresetParametersIx";
|
|
5017
|
+
"type": {
|
|
5018
|
+
"kind": "struct";
|
|
5019
|
+
"fields": [
|
|
5020
|
+
{
|
|
5021
|
+
"name": "binStep";
|
|
5022
|
+
"docs": [
|
|
5023
|
+
"Bin step. Represent the price increment / decrement."
|
|
5024
|
+
];
|
|
5025
|
+
"type": "u16";
|
|
5026
|
+
},
|
|
5027
|
+
{
|
|
5028
|
+
"name": "baseFactor";
|
|
5029
|
+
"docs": [
|
|
5030
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
5031
|
+
];
|
|
5032
|
+
"type": "u16";
|
|
5033
|
+
},
|
|
5034
|
+
{
|
|
5035
|
+
"name": "filterPeriod";
|
|
5036
|
+
"docs": [
|
|
5037
|
+
"Filter period determine high frequency trading time window."
|
|
5038
|
+
];
|
|
5039
|
+
"type": "u16";
|
|
5040
|
+
},
|
|
5041
|
+
{
|
|
5042
|
+
"name": "decayPeriod";
|
|
5043
|
+
"docs": [
|
|
5044
|
+
"Decay period determine when the volatile fee start decay / decrease."
|
|
5045
|
+
];
|
|
5046
|
+
"type": "u16";
|
|
5047
|
+
},
|
|
5048
|
+
{
|
|
5049
|
+
"name": "reductionFactor";
|
|
5050
|
+
"docs": [
|
|
5051
|
+
"Reduction factor controls the volatile fee rate decrement rate."
|
|
5052
|
+
];
|
|
5053
|
+
"type": "u16";
|
|
5054
|
+
},
|
|
5055
|
+
{
|
|
5056
|
+
"name": "variableFeeControl";
|
|
5057
|
+
"docs": [
|
|
5058
|
+
"Used to scale the variable fee component depending on the dynamic of the market"
|
|
5059
|
+
];
|
|
5060
|
+
"type": "u32";
|
|
5061
|
+
},
|
|
5062
|
+
{
|
|
5063
|
+
"name": "maxVolatilityAccumulator";
|
|
5064
|
+
"docs": [
|
|
5065
|
+
"Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
|
|
5066
|
+
];
|
|
5067
|
+
"type": "u32";
|
|
3419
5068
|
},
|
|
3420
5069
|
{
|
|
3421
5070
|
"name": "protocolShare";
|
|
@@ -3445,6 +5094,13 @@ type LbClmm = {
|
|
|
3445
5094
|
"Base factor for base fee rate"
|
|
3446
5095
|
];
|
|
3447
5096
|
"type": "u16";
|
|
5097
|
+
},
|
|
5098
|
+
{
|
|
5099
|
+
"name": "baseFeePowerFactor";
|
|
5100
|
+
"docs": [
|
|
5101
|
+
"Base fee power factor"
|
|
5102
|
+
];
|
|
5103
|
+
"type": "u8";
|
|
3448
5104
|
}
|
|
3449
5105
|
];
|
|
3450
5106
|
};
|
|
@@ -3831,6 +5487,13 @@ type LbClmm = {
|
|
|
3831
5487
|
"option": "u64";
|
|
3832
5488
|
};
|
|
3833
5489
|
},
|
|
5490
|
+
{
|
|
5491
|
+
"name": "baseFeePowerFactor";
|
|
5492
|
+
"docs": [
|
|
5493
|
+
"Base fee power factor"
|
|
5494
|
+
];
|
|
5495
|
+
"type": "u8";
|
|
5496
|
+
},
|
|
3834
5497
|
{
|
|
3835
5498
|
"name": "padding";
|
|
3836
5499
|
"docs": [
|
|
@@ -3839,7 +5502,7 @@ type LbClmm = {
|
|
|
3839
5502
|
"type": {
|
|
3840
5503
|
"array": [
|
|
3841
5504
|
"u8",
|
|
3842
|
-
|
|
5505
|
+
63
|
|
3843
5506
|
];
|
|
3844
5507
|
};
|
|
3845
5508
|
}
|
|
@@ -3864,16 +5527,43 @@ type LbClmm = {
|
|
|
3864
5527
|
"type": "u16";
|
|
3865
5528
|
},
|
|
3866
5529
|
{
|
|
3867
|
-
"name": "
|
|
3868
|
-
"type": "
|
|
5530
|
+
"name": "baseFeePowerFactor";
|
|
5531
|
+
"type": "u8";
|
|
5532
|
+
},
|
|
5533
|
+
{
|
|
5534
|
+
"name": "activationType";
|
|
5535
|
+
"type": "u8";
|
|
3869
5536
|
},
|
|
3870
5537
|
{
|
|
3871
|
-
"name": "
|
|
5538
|
+
"name": "protocolShare";
|
|
5539
|
+
"type": "u16";
|
|
5540
|
+
}
|
|
5541
|
+
];
|
|
5542
|
+
};
|
|
5543
|
+
},
|
|
5544
|
+
{
|
|
5545
|
+
"name": "InitializeLbPair2Params";
|
|
5546
|
+
"type": {
|
|
5547
|
+
"kind": "struct";
|
|
5548
|
+
"fields": [
|
|
5549
|
+
{
|
|
5550
|
+
"name": "activeId";
|
|
5551
|
+
"docs": [
|
|
5552
|
+
"Pool price"
|
|
5553
|
+
];
|
|
3872
5554
|
"type": "i32";
|
|
3873
5555
|
},
|
|
3874
5556
|
{
|
|
3875
|
-
"name": "
|
|
3876
|
-
"
|
|
5557
|
+
"name": "padding";
|
|
5558
|
+
"docs": [
|
|
5559
|
+
"Padding, for future use"
|
|
5560
|
+
];
|
|
5561
|
+
"type": {
|
|
5562
|
+
"array": [
|
|
5563
|
+
"u8",
|
|
5564
|
+
96
|
|
5565
|
+
];
|
|
5566
|
+
};
|
|
3877
5567
|
}
|
|
3878
5568
|
];
|
|
3879
5569
|
};
|
|
@@ -3970,6 +5660,30 @@ type LbClmm = {
|
|
|
3970
5660
|
];
|
|
3971
5661
|
};
|
|
3972
5662
|
},
|
|
5663
|
+
{
|
|
5664
|
+
"name": "PositionBinData";
|
|
5665
|
+
"type": {
|
|
5666
|
+
"kind": "struct";
|
|
5667
|
+
"fields": [
|
|
5668
|
+
{
|
|
5669
|
+
"name": "liquidityShare";
|
|
5670
|
+
"type": "u128";
|
|
5671
|
+
},
|
|
5672
|
+
{
|
|
5673
|
+
"name": "rewardInfo";
|
|
5674
|
+
"type": {
|
|
5675
|
+
"defined": "UserRewardInfo";
|
|
5676
|
+
};
|
|
5677
|
+
},
|
|
5678
|
+
{
|
|
5679
|
+
"name": "feeInfo";
|
|
5680
|
+
"type": {
|
|
5681
|
+
"defined": "FeeInfo";
|
|
5682
|
+
};
|
|
5683
|
+
}
|
|
5684
|
+
];
|
|
5685
|
+
};
|
|
5686
|
+
},
|
|
3973
5687
|
{
|
|
3974
5688
|
"name": "ProtocolFee";
|
|
3975
5689
|
"type": {
|
|
@@ -4093,7 +5807,7 @@ type LbClmm = {
|
|
|
4093
5807
|
{
|
|
4094
5808
|
"name": "baseFactor";
|
|
4095
5809
|
"docs": [
|
|
4096
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5810
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
4097
5811
|
];
|
|
4098
5812
|
"type": "u16";
|
|
4099
5813
|
},
|
|
@@ -4153,6 +5867,13 @@ type LbClmm = {
|
|
|
4153
5867
|
];
|
|
4154
5868
|
"type": "u16";
|
|
4155
5869
|
},
|
|
5870
|
+
{
|
|
5871
|
+
"name": "baseFeePowerFactor";
|
|
5872
|
+
"docs": [
|
|
5873
|
+
"Base fee power factor"
|
|
5874
|
+
];
|
|
5875
|
+
"type": "u8";
|
|
5876
|
+
},
|
|
4156
5877
|
{
|
|
4157
5878
|
"name": "padding";
|
|
4158
5879
|
"docs": [
|
|
@@ -4161,7 +5882,7 @@ type LbClmm = {
|
|
|
4161
5882
|
"type": {
|
|
4162
5883
|
"array": [
|
|
4163
5884
|
"u8",
|
|
4164
|
-
|
|
5885
|
+
5
|
|
4165
5886
|
];
|
|
4166
5887
|
};
|
|
4167
5888
|
}
|
|
@@ -4282,6 +6003,40 @@ type LbClmm = {
|
|
|
4282
6003
|
];
|
|
4283
6004
|
};
|
|
4284
6005
|
},
|
|
6006
|
+
{
|
|
6007
|
+
"name": "RemainingAccountsSlice";
|
|
6008
|
+
"type": {
|
|
6009
|
+
"kind": "struct";
|
|
6010
|
+
"fields": [
|
|
6011
|
+
{
|
|
6012
|
+
"name": "accountsType";
|
|
6013
|
+
"type": {
|
|
6014
|
+
"defined": "AccountsType";
|
|
6015
|
+
};
|
|
6016
|
+
},
|
|
6017
|
+
{
|
|
6018
|
+
"name": "length";
|
|
6019
|
+
"type": "u8";
|
|
6020
|
+
}
|
|
6021
|
+
];
|
|
6022
|
+
};
|
|
6023
|
+
},
|
|
6024
|
+
{
|
|
6025
|
+
"name": "RemainingAccountsInfo";
|
|
6026
|
+
"type": {
|
|
6027
|
+
"kind": "struct";
|
|
6028
|
+
"fields": [
|
|
6029
|
+
{
|
|
6030
|
+
"name": "slices";
|
|
6031
|
+
"type": {
|
|
6032
|
+
"vec": {
|
|
6033
|
+
"defined": "RemainingAccountsSlice";
|
|
6034
|
+
};
|
|
6035
|
+
};
|
|
6036
|
+
}
|
|
6037
|
+
];
|
|
6038
|
+
};
|
|
6039
|
+
},
|
|
4285
6040
|
{
|
|
4286
6041
|
"name": "StrategyType";
|
|
4287
6042
|
"type": {
|
|
@@ -4365,6 +6120,23 @@ type LbClmm = {
|
|
|
4365
6120
|
];
|
|
4366
6121
|
};
|
|
4367
6122
|
},
|
|
6123
|
+
{
|
|
6124
|
+
"name": "ResizeSide";
|
|
6125
|
+
"docs": [
|
|
6126
|
+
"Side of resize, 0 for lower and 1 for upper"
|
|
6127
|
+
];
|
|
6128
|
+
"type": {
|
|
6129
|
+
"kind": "enum";
|
|
6130
|
+
"variants": [
|
|
6131
|
+
{
|
|
6132
|
+
"name": "Lower";
|
|
6133
|
+
},
|
|
6134
|
+
{
|
|
6135
|
+
"name": "Upper";
|
|
6136
|
+
}
|
|
6137
|
+
];
|
|
6138
|
+
};
|
|
6139
|
+
},
|
|
4368
6140
|
{
|
|
4369
6141
|
"name": "PairType";
|
|
4370
6142
|
"docs": [
|
|
@@ -4381,6 +6153,9 @@ type LbClmm = {
|
|
|
4381
6153
|
},
|
|
4382
6154
|
{
|
|
4383
6155
|
"name": "CustomizablePermissionless";
|
|
6156
|
+
},
|
|
6157
|
+
{
|
|
6158
|
+
"name": "PermissionlessV2";
|
|
4384
6159
|
}
|
|
4385
6160
|
];
|
|
4386
6161
|
};
|
|
@@ -4401,6 +6176,37 @@ type LbClmm = {
|
|
|
4401
6176
|
}
|
|
4402
6177
|
];
|
|
4403
6178
|
};
|
|
6179
|
+
},
|
|
6180
|
+
{
|
|
6181
|
+
"name": "TokenProgramFlags";
|
|
6182
|
+
"type": {
|
|
6183
|
+
"kind": "enum";
|
|
6184
|
+
"variants": [
|
|
6185
|
+
{
|
|
6186
|
+
"name": "TokenProgram";
|
|
6187
|
+
},
|
|
6188
|
+
{
|
|
6189
|
+
"name": "TokenProgram2022";
|
|
6190
|
+
}
|
|
6191
|
+
];
|
|
6192
|
+
};
|
|
6193
|
+
},
|
|
6194
|
+
{
|
|
6195
|
+
"name": "AccountsType";
|
|
6196
|
+
"type": {
|
|
6197
|
+
"kind": "enum";
|
|
6198
|
+
"variants": [
|
|
6199
|
+
{
|
|
6200
|
+
"name": "TransferHookX";
|
|
6201
|
+
},
|
|
6202
|
+
{
|
|
6203
|
+
"name": "TransferHookY";
|
|
6204
|
+
},
|
|
6205
|
+
{
|
|
6206
|
+
"name": "TransferHookReward";
|
|
6207
|
+
}
|
|
6208
|
+
];
|
|
6209
|
+
};
|
|
4404
6210
|
}
|
|
4405
6211
|
];
|
|
4406
6212
|
"events": [
|
|
@@ -4794,6 +6600,66 @@ type LbClmm = {
|
|
|
4794
6600
|
}
|
|
4795
6601
|
];
|
|
4796
6602
|
},
|
|
6603
|
+
{
|
|
6604
|
+
"name": "IncreasePositionLength";
|
|
6605
|
+
"fields": [
|
|
6606
|
+
{
|
|
6607
|
+
"name": "lbPair";
|
|
6608
|
+
"type": "publicKey";
|
|
6609
|
+
"index": false;
|
|
6610
|
+
},
|
|
6611
|
+
{
|
|
6612
|
+
"name": "position";
|
|
6613
|
+
"type": "publicKey";
|
|
6614
|
+
"index": false;
|
|
6615
|
+
},
|
|
6616
|
+
{
|
|
6617
|
+
"name": "owner";
|
|
6618
|
+
"type": "publicKey";
|
|
6619
|
+
"index": false;
|
|
6620
|
+
},
|
|
6621
|
+
{
|
|
6622
|
+
"name": "lengthToAdd";
|
|
6623
|
+
"type": "u16";
|
|
6624
|
+
"index": false;
|
|
6625
|
+
},
|
|
6626
|
+
{
|
|
6627
|
+
"name": "side";
|
|
6628
|
+
"type": "u8";
|
|
6629
|
+
"index": false;
|
|
6630
|
+
}
|
|
6631
|
+
];
|
|
6632
|
+
},
|
|
6633
|
+
{
|
|
6634
|
+
"name": "DecreasePositionLength";
|
|
6635
|
+
"fields": [
|
|
6636
|
+
{
|
|
6637
|
+
"name": "lbPair";
|
|
6638
|
+
"type": "publicKey";
|
|
6639
|
+
"index": false;
|
|
6640
|
+
},
|
|
6641
|
+
{
|
|
6642
|
+
"name": "position";
|
|
6643
|
+
"type": "publicKey";
|
|
6644
|
+
"index": false;
|
|
6645
|
+
},
|
|
6646
|
+
{
|
|
6647
|
+
"name": "owner";
|
|
6648
|
+
"type": "publicKey";
|
|
6649
|
+
"index": false;
|
|
6650
|
+
},
|
|
6651
|
+
{
|
|
6652
|
+
"name": "lengthToRemove";
|
|
6653
|
+
"type": "u16";
|
|
6654
|
+
"index": false;
|
|
6655
|
+
},
|
|
6656
|
+
{
|
|
6657
|
+
"name": "side";
|
|
6658
|
+
"type": "u8";
|
|
6659
|
+
"index": false;
|
|
6660
|
+
}
|
|
6661
|
+
];
|
|
6662
|
+
},
|
|
4797
6663
|
{
|
|
4798
6664
|
"name": "FeeParameterUpdate";
|
|
4799
6665
|
"fields": [
|
|
@@ -5250,6 +7116,76 @@ type LbClmm = {
|
|
|
5250
7116
|
"code": 6065;
|
|
5251
7117
|
"name": "AlreadyPassPreActivationSwapPoint";
|
|
5252
7118
|
"msg": "Already pass pre-activation swap point";
|
|
7119
|
+
},
|
|
7120
|
+
{
|
|
7121
|
+
"code": 6066;
|
|
7122
|
+
"name": "NotSupportMint";
|
|
7123
|
+
"msg": "Not support token_2022 mint extension";
|
|
7124
|
+
},
|
|
7125
|
+
{
|
|
7126
|
+
"code": 6067;
|
|
7127
|
+
"name": "UnsupportedMintExtension";
|
|
7128
|
+
"msg": "Unsupported mint extension";
|
|
7129
|
+
},
|
|
7130
|
+
{
|
|
7131
|
+
"code": 6068;
|
|
7132
|
+
"name": "UnsupportNativeMintToken2022";
|
|
7133
|
+
"msg": "Unsupported native mint token2022";
|
|
7134
|
+
},
|
|
7135
|
+
{
|
|
7136
|
+
"code": 6069;
|
|
7137
|
+
"name": "UnmatchTokenMint";
|
|
7138
|
+
"msg": "Unmatch token mint";
|
|
7139
|
+
},
|
|
7140
|
+
{
|
|
7141
|
+
"code": 6070;
|
|
7142
|
+
"name": "UnsupportedTokenMint";
|
|
7143
|
+
"msg": "Unsupported token mint";
|
|
7144
|
+
},
|
|
7145
|
+
{
|
|
7146
|
+
"code": 6071;
|
|
7147
|
+
"name": "InsufficientRemainingAccounts";
|
|
7148
|
+
"msg": "Insufficient remaining accounts";
|
|
7149
|
+
},
|
|
7150
|
+
{
|
|
7151
|
+
"code": 6072;
|
|
7152
|
+
"name": "InvalidRemainingAccountSlice";
|
|
7153
|
+
"msg": "Invalid remaining account slice";
|
|
7154
|
+
},
|
|
7155
|
+
{
|
|
7156
|
+
"code": 6073;
|
|
7157
|
+
"name": "DuplicatedRemainingAccountTypes";
|
|
7158
|
+
"msg": "Duplicated remaining account types";
|
|
7159
|
+
},
|
|
7160
|
+
{
|
|
7161
|
+
"code": 6074;
|
|
7162
|
+
"name": "MissingRemainingAccountForTransferHook";
|
|
7163
|
+
"msg": "Missing remaining account for transfer hook";
|
|
7164
|
+
},
|
|
7165
|
+
{
|
|
7166
|
+
"code": 6075;
|
|
7167
|
+
"name": "NoTransferHookProgram";
|
|
7168
|
+
"msg": "Remaining account was passed for transfer hook but there's no hook program";
|
|
7169
|
+
},
|
|
7170
|
+
{
|
|
7171
|
+
"code": 6076;
|
|
7172
|
+
"name": "ZeroFundedAmount";
|
|
7173
|
+
"msg": "Zero funded amount";
|
|
7174
|
+
},
|
|
7175
|
+
{
|
|
7176
|
+
"code": 6077;
|
|
7177
|
+
"name": "InvalidSide";
|
|
7178
|
+
"msg": "Invalid side";
|
|
7179
|
+
},
|
|
7180
|
+
{
|
|
7181
|
+
"code": 6078;
|
|
7182
|
+
"name": "InvalidResizeLength";
|
|
7183
|
+
"msg": "Invalid resize length";
|
|
7184
|
+
},
|
|
7185
|
+
{
|
|
7186
|
+
"code": 6079;
|
|
7187
|
+
"name": "NotSupportAtTheMoment";
|
|
7188
|
+
"msg": "Not support at the moment";
|
|
5253
7189
|
}
|
|
5254
7190
|
];
|
|
5255
7191
|
};
|
|
@@ -5263,8 +7199,10 @@ interface BinAndAmount {
|
|
|
5263
7199
|
interface TokenReserve {
|
|
5264
7200
|
publicKey: PublicKey;
|
|
5265
7201
|
reserve: PublicKey;
|
|
7202
|
+
mint: Mint;
|
|
5266
7203
|
amount: bigint;
|
|
5267
|
-
|
|
7204
|
+
owner: PublicKey;
|
|
7205
|
+
transferHookAccountMetas: AccountMeta[];
|
|
5268
7206
|
}
|
|
5269
7207
|
type ClmmProgram = Program<LbClmm>;
|
|
5270
7208
|
type LbPair = IdlAccounts<LbClmm>["lbPair"];
|
|
@@ -5274,8 +7212,14 @@ type BinArray = IdlAccounts<LbClmm>["binArray"];
|
|
|
5274
7212
|
type BinArrayAccount = ProgramAccount<IdlAccounts<LbClmm>["binArray"]>;
|
|
5275
7213
|
type Position = IdlAccounts<LbClmm>["position"];
|
|
5276
7214
|
type PositionV2 = IdlAccounts<LbClmm>["positionV2"];
|
|
7215
|
+
type PositionV3 = IdlAccounts<LbClmm>["positionV3"];
|
|
7216
|
+
type PresetParameter = IdlAccounts<LbClmm>["presetParameter"];
|
|
7217
|
+
type PresetParameter2 = IdlAccounts<LbClmm>["presetParameter2"];
|
|
5277
7218
|
type vParameters = IdlAccounts<LbClmm>["lbPair"]["vParameters"];
|
|
5278
7219
|
type sParameters = IdlAccounts<LbClmm>["lbPair"]["parameters"];
|
|
7220
|
+
type UserRewardInfo = IdlTypes<LbClmm>["UserRewardInfo"];
|
|
7221
|
+
type UserFeeInfo = IdlTypes<LbClmm>["FeeInfo"];
|
|
7222
|
+
type PositionBinInfo = IdlTypes<LbClmm>["PositionBinData"];
|
|
5279
7223
|
type InitPermissionPairIx = IdlTypes<LbClmm>["InitPermissionPairIx"];
|
|
5280
7224
|
type InitCustomizablePermissionlessPairIx = IdlTypes<LbClmm>["CustomizableParams"];
|
|
5281
7225
|
type BinLiquidityDistribution = IdlTypes<LbClmm>["BinLiquidityDistribution"];
|
|
@@ -5289,8 +7233,12 @@ type LiquidityParameterByStrategyOneSide = IdlTypes<LbClmm>["LiquidityParameterB
|
|
|
5289
7233
|
type LiquidityParameter = IdlTypes<LbClmm>["LiquidityParameter"];
|
|
5290
7234
|
type ProgramStrategyParameter = IdlTypes<LbClmm>["StrategyParameters"];
|
|
5291
7235
|
type ProgramStrategyType = IdlTypes<LbClmm>["StrategyType"];
|
|
7236
|
+
type RemainingAccountInfo = IdlTypes<LbClmm>["RemainingAccountsInfo"];
|
|
7237
|
+
type RemainingAccountsInfoSlice = IdlTypes<LbClmm>["RemainingAccountsSlice"];
|
|
5292
7238
|
type CompressedBinDepositAmount = IdlTypes<LbClmm>["CompressedBinDepositAmount"];
|
|
5293
7239
|
type CompressedBinDepositAmounts = CompressedBinDepositAmount[];
|
|
7240
|
+
declare const POSITION_V3_DISC: Buffer;
|
|
7241
|
+
declare const POSITION_V2_DISC: Buffer;
|
|
5294
7242
|
interface LbPosition {
|
|
5295
7243
|
publicKey: PublicKey;
|
|
5296
7244
|
positionData: PositionData;
|
|
@@ -5327,7 +7275,8 @@ interface LMRewards {
|
|
|
5327
7275
|
}
|
|
5328
7276
|
declare enum PositionVersion {
|
|
5329
7277
|
V1 = 0,
|
|
5330
|
-
V2 = 1
|
|
7278
|
+
V2 = 1,
|
|
7279
|
+
V3 = 2
|
|
5331
7280
|
}
|
|
5332
7281
|
declare enum PairType {
|
|
5333
7282
|
Permissionless = 0,
|
|
@@ -5410,6 +7359,9 @@ interface BinLiquidity {
|
|
|
5410
7359
|
version: number;
|
|
5411
7360
|
price: string;
|
|
5412
7361
|
pricePerToken: string;
|
|
7362
|
+
feeAmountXPerTokenStored: BN;
|
|
7363
|
+
feeAmountYPerTokenStored: BN;
|
|
7364
|
+
rewardPerTokenStored: BN[];
|
|
5413
7365
|
}
|
|
5414
7366
|
declare namespace BinLiquidity {
|
|
5415
7367
|
function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
|
|
@@ -5448,6 +7400,9 @@ interface PositionBinData {
|
|
|
5448
7400
|
positionLiquidity: string;
|
|
5449
7401
|
positionXAmount: string;
|
|
5450
7402
|
positionYAmount: string;
|
|
7403
|
+
positionFeeXAmount: string;
|
|
7404
|
+
positionFeeYAmount: string;
|
|
7405
|
+
positionRewardAmount: string[];
|
|
5451
7406
|
}
|
|
5452
7407
|
interface PositionData {
|
|
5453
7408
|
totalXAmount: string;
|
|
@@ -5463,6 +7418,13 @@ interface PositionData {
|
|
|
5463
7418
|
feeOwner: PublicKey;
|
|
5464
7419
|
totalClaimedFeeXAmount: BN;
|
|
5465
7420
|
totalClaimedFeeYAmount: BN;
|
|
7421
|
+
feeXExcludeTransferFee: BN;
|
|
7422
|
+
feeYExcludeTransferFee: BN;
|
|
7423
|
+
rewardOneExcludeTransferFee: BN;
|
|
7424
|
+
rewardTwoExcludeTransferFee: BN;
|
|
7425
|
+
totalXAmountExcludeTransferFee: BN;
|
|
7426
|
+
totalYAmountExcludeTransferFee: BN;
|
|
7427
|
+
owner: PublicKey;
|
|
5466
7428
|
}
|
|
5467
7429
|
interface SwapWithPriceImpactParams {
|
|
5468
7430
|
/**
|
|
@@ -5553,10 +7515,6 @@ declare enum BitmapType {
|
|
|
5553
7515
|
U1024 = 0,
|
|
5554
7516
|
U512 = 1
|
|
5555
7517
|
}
|
|
5556
|
-
interface SeedLiquidityResponse {
|
|
5557
|
-
initializeBinArraysAndPositionIxs: TransactionInstruction[][];
|
|
5558
|
-
addLiquidityIxs: TransactionInstruction[][];
|
|
5559
|
-
}
|
|
5560
7518
|
interface Clock {
|
|
5561
7519
|
slot: BN;
|
|
5562
7520
|
epochStartTimestamp: BN;
|
|
@@ -5569,6 +7527,19 @@ declare enum PairStatus {
|
|
|
5569
7527
|
Enabled = 0,
|
|
5570
7528
|
Disabled = 1
|
|
5571
7529
|
}
|
|
7530
|
+
declare enum ActionType {
|
|
7531
|
+
Liquidity = 0,
|
|
7532
|
+
Reward = 1
|
|
7533
|
+
}
|
|
7534
|
+
declare const MEMO_PROGRAM_ID: PublicKey;
|
|
7535
|
+
declare enum ResizeSide {
|
|
7536
|
+
Lower = 0,
|
|
7537
|
+
Upper = 1
|
|
7538
|
+
}
|
|
7539
|
+
interface BinRange {
|
|
7540
|
+
minBinId: BN;
|
|
7541
|
+
maxBinId: BN;
|
|
7542
|
+
}
|
|
5572
7543
|
|
|
5573
7544
|
type Opt = {
|
|
5574
7545
|
cluster?: Cluster | "localhost";
|
|
@@ -5581,9 +7552,10 @@ declare class DLMM {
|
|
|
5581
7552
|
binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null;
|
|
5582
7553
|
tokenX: TokenReserve;
|
|
5583
7554
|
tokenY: TokenReserve;
|
|
7555
|
+
rewards: Array<TokenReserve | null>;
|
|
5584
7556
|
clock: Clock;
|
|
5585
7557
|
private opt?;
|
|
5586
|
-
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, clock: Clock, opt?: Opt);
|
|
7558
|
+
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, rewards: Array<TokenReserve | null>, clock: Clock, opt?: Opt);
|
|
5587
7559
|
/** Static public method */
|
|
5588
7560
|
/**
|
|
5589
7561
|
* The function `getLbPairs` retrieves a list of LB pair accounts using a connection and optional
|
|
@@ -5596,7 +7568,7 @@ declare class DLMM {
|
|
|
5596
7568
|
* `LbPairAccount` objects.
|
|
5597
7569
|
*/
|
|
5598
7570
|
static getLbPairs(connection: Connection, opt?: Opt): Promise<LbPairAccount[]>;
|
|
5599
|
-
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
7571
|
+
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, baseFeePowerFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
5600
7572
|
/**
|
|
5601
7573
|
* The `create` function is a static method that creates a new instance of the `DLMM` class
|
|
5602
7574
|
* @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
|
|
@@ -5617,18 +7589,34 @@ declare class DLMM {
|
|
|
5617
7589
|
* objects.
|
|
5618
7590
|
*/
|
|
5619
7591
|
static createMultiple(connection: Connection, dlmmList: Array<PublicKey>, opt?: Opt): Promise<DLMM[]>;
|
|
5620
|
-
static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
7592
|
+
static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<{
|
|
7593
|
+
presetParameter: _coral_xyz_anchor.ProgramAccount<{
|
|
7594
|
+
binStep: number;
|
|
7595
|
+
baseFactor: number;
|
|
7596
|
+
filterPeriod: number;
|
|
7597
|
+
decayPeriod: number;
|
|
7598
|
+
reductionFactor: number;
|
|
7599
|
+
variableFeeControl: number;
|
|
7600
|
+
maxVolatilityAccumulator: number;
|
|
7601
|
+
minBinId: number;
|
|
7602
|
+
maxBinId: number;
|
|
7603
|
+
protocolShare: number;
|
|
7604
|
+
}>[];
|
|
7605
|
+
presetParameter2: _coral_xyz_anchor.ProgramAccount<{
|
|
7606
|
+
binStep: number;
|
|
7607
|
+
baseFactor: number;
|
|
7608
|
+
filterPeriod: number;
|
|
7609
|
+
decayPeriod: number;
|
|
7610
|
+
variableFeeControl: number;
|
|
7611
|
+
maxVolatilityAccumulator: number;
|
|
7612
|
+
reductionFactor: number;
|
|
7613
|
+
protocolShare: number;
|
|
7614
|
+
index: number;
|
|
7615
|
+
baseFeePowerFactor: number;
|
|
7616
|
+
padding0: number;
|
|
7617
|
+
padding1: BN[];
|
|
7618
|
+
}>[];
|
|
7619
|
+
}>;
|
|
5632
7620
|
/**
|
|
5633
7621
|
* The function `getAllLbPairPositionsByUser` retrieves all liquidity pool pair positions for a given
|
|
5634
7622
|
* user.
|
|
@@ -5644,9 +7632,11 @@ declare class DLMM {
|
|
|
5644
7632
|
static getPricePerLamport(tokenXDecimal: number, tokenYDecimal: number, price: number): string;
|
|
5645
7633
|
static getBinIdFromPrice(price: string | number | Decimal, binStep: number, min: boolean): number;
|
|
5646
7634
|
/** Public methods */
|
|
5647
|
-
static createPermissionLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, baseKey: PublicKey, creatorKey: PublicKey, feeBps: BN, activationType: ActivationType, opt?: Opt): Promise<Transaction>;
|
|
7635
|
+
static createPermissionLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, baseKey: PublicKey, creatorKey: PublicKey, feeBps: BN, activationType: ActivationType, protocolFeeBps: BN, opt?: Opt): Promise<Transaction>;
|
|
7636
|
+
static createCustomizablePermissionlessLbPair2(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, opt?: Opt): Promise<Transaction>;
|
|
5648
7637
|
static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, opt?: Opt): Promise<Transaction>;
|
|
5649
7638
|
static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
7639
|
+
static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
5650
7640
|
/**
|
|
5651
7641
|
* The function `refetchStates` retrieves and updates various states and data related to bin arrays
|
|
5652
7642
|
* and lb pairs.
|
|
@@ -5666,7 +7656,7 @@ declare class DLMM {
|
|
|
5666
7656
|
* @returns an array of `BinArrayAccount` objects.
|
|
5667
7657
|
*/
|
|
5668
7658
|
getBinArrayForSwap(swapForY: any, count?: number): Promise<BinArrayAccount[]>;
|
|
5669
|
-
static calculateFeeInfo(baseFactor: number | string, binStep: number | string): Omit<FeeInfo, "protocolFeePercentage">;
|
|
7659
|
+
static calculateFeeInfo(baseFactor: number | string, binStep: number | string, baseFeePowerFactor?: number | string): Omit<FeeInfo, "protocolFeePercentage">;
|
|
5670
7660
|
/**
|
|
5671
7661
|
* The function `getFeeInfo` calculates and returns the base fee rate percentage, maximum fee rate
|
|
5672
7662
|
* percentage, and protocol fee percentage.
|
|
@@ -5780,8 +7770,7 @@ declare class DLMM {
|
|
|
5780
7770
|
quoteCreatePosition({ strategy }: TQuoteCreatePositionParams): Promise<{
|
|
5781
7771
|
binArraysCount: number;
|
|
5782
7772
|
binArrayCost: number;
|
|
5783
|
-
|
|
5784
|
-
positionCost: number;
|
|
7773
|
+
positionCost: Promise<number>;
|
|
5785
7774
|
}>;
|
|
5786
7775
|
/**
|
|
5787
7776
|
* Creates an empty position and initializes the corresponding bin arrays if needed.
|
|
@@ -5821,6 +7810,7 @@ declare class DLMM {
|
|
|
5821
7810
|
*/
|
|
5822
7811
|
initializePositionAndAddLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
5823
7812
|
/**
|
|
7813
|
+
* @deprecated Use `initializePositionAndAddLiquidityByStrategy`
|
|
5824
7814
|
* The function `initializePositionAndAddLiquidityByWeight` function is used to initializes a position and adds liquidity
|
|
5825
7815
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
5826
7816
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -5847,6 +7837,7 @@ declare class DLMM {
|
|
|
5847
7837
|
*/
|
|
5848
7838
|
addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
5849
7839
|
/**
|
|
7840
|
+
* @deprecated Do not support dynamic position. Use `addLiquidityByStrategy`
|
|
5850
7841
|
* The `addLiquidityByWeight` function is used to add liquidity to existing position
|
|
5851
7842
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
5852
7843
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -5865,18 +7856,78 @@ declare class DLMM {
|
|
|
5865
7856
|
* @param
|
|
5866
7857
|
* - `user`: The public key of the user account.
|
|
5867
7858
|
* - `position`: The public key of the position account.
|
|
5868
|
-
* - `
|
|
7859
|
+
* - `fromBinId`: The ID of the starting bin to remove liquidity from. Must within position range.
|
|
7860
|
+
* - `toBinId`: The ID of the ending bin to remove liquidity from. Must within position range.
|
|
5869
7861
|
* - `liquiditiesBpsToRemove`: An array of numbers (percentage) that represent the liquidity to remove from each bin.
|
|
5870
7862
|
* - `shouldClaimAndClose`: A boolean flag that indicates whether to claim rewards and close the position.
|
|
5871
|
-
* @returns {Promise<Transaction
|
|
7863
|
+
* @returns {Promise<Transaction[]>}
|
|
5872
7864
|
*/
|
|
5873
|
-
removeLiquidity({ user, position,
|
|
7865
|
+
removeLiquidity({ user, position, fromBinId, toBinId, bps, shouldClaimAndClose, }: {
|
|
5874
7866
|
user: PublicKey;
|
|
5875
7867
|
position: PublicKey;
|
|
5876
|
-
|
|
7868
|
+
fromBinId: number;
|
|
7869
|
+
toBinId: number;
|
|
5877
7870
|
bps: BN;
|
|
5878
7871
|
shouldClaimAndClose?: boolean;
|
|
5879
|
-
}): Promise<Transaction
|
|
7872
|
+
}): Promise<Transaction[]>;
|
|
7873
|
+
/**
|
|
7874
|
+
* Decreases the length of the position by the specified amount.
|
|
7875
|
+
* @param {BN} lengthToReduce - The amount of length to reduce.
|
|
7876
|
+
* @param {PublicKey} position - The public key of the position to decrease.
|
|
7877
|
+
* @param {ResizeSide} side - The side of the position to decrease.
|
|
7878
|
+
* @param {PublicKey} feePayer - The public key of the fee payer.
|
|
7879
|
+
* @param {boolean} claimAndWithdraw - Whether to claim and withdraw rewards.
|
|
7880
|
+
* @returns {Promise<Transaction>} - A transaction that decreases the length of the position.
|
|
7881
|
+
*/
|
|
7882
|
+
decreasePositionLength({ lengthToReduce, position, side, feePayer, claimAndWithdraw, }: {
|
|
7883
|
+
lengthToReduce: BN;
|
|
7884
|
+
position: PublicKey;
|
|
7885
|
+
side: ResizeSide;
|
|
7886
|
+
feePayer: PublicKey;
|
|
7887
|
+
claimAndWithdraw: boolean;
|
|
7888
|
+
}): Promise<Transaction>;
|
|
7889
|
+
/**
|
|
7890
|
+
* Migrates a position from v2 to v3.
|
|
7891
|
+
*
|
|
7892
|
+
* The given positionV2 must exist and be owned by the current user.
|
|
7893
|
+
* The given positionV3 must not exist.
|
|
7894
|
+
*
|
|
7895
|
+
* The given feePayer will be used to pay for the transaction.
|
|
7896
|
+
*
|
|
7897
|
+
* After this function is called, the positionV2 is no longer valid,
|
|
7898
|
+
* and the positionV3 is valid.
|
|
7899
|
+
*
|
|
7900
|
+
* @param positionV2 The public key of the v2 position to migrate.
|
|
7901
|
+
* @param positionV3 The public key of the v3 position to create.
|
|
7902
|
+
* @param feePayer The public key of the account that will pay for this transaction.
|
|
7903
|
+
* @returns A transaction that migrates the position from v2 to v3.
|
|
7904
|
+
*/
|
|
7905
|
+
migratePositionV3({ positionV2, positionV3, feePayer, }: {
|
|
7906
|
+
positionV2: PublicKey;
|
|
7907
|
+
positionV3: PublicKey;
|
|
7908
|
+
feePayer: PublicKey;
|
|
7909
|
+
}): Promise<Transaction>;
|
|
7910
|
+
/**
|
|
7911
|
+
* Increases the length of the position by {@link lengthToAdd}.
|
|
7912
|
+
* @param {BN} lengthToAdd - The amount of length to add.
|
|
7913
|
+
* @param {PublicKey} position - The public key of the position to increase.
|
|
7914
|
+
* @param {PublicKey} payer - The public key of the payer.
|
|
7915
|
+
* @param {ResizeSide} side - The side of the position to increase.
|
|
7916
|
+
* @returns {Promise<Transaction>} - A transaction that increases the length of the position.
|
|
7917
|
+
*/
|
|
7918
|
+
increasePositionLength({ lengthToAdd, position, payer, side, }: {
|
|
7919
|
+
lengthToAdd: BN;
|
|
7920
|
+
position: PublicKey;
|
|
7921
|
+
payer: PublicKey;
|
|
7922
|
+
side: ResizeSide;
|
|
7923
|
+
}): Promise<Transaction>;
|
|
7924
|
+
/**
|
|
7925
|
+
* The `closePositionIfEmpty` function closes a position if it is empty. Else, it does nothing.
|
|
7926
|
+
*/
|
|
7927
|
+
closePositionIfEmpty({ owner, position, }: {
|
|
7928
|
+
owner: PublicKey;
|
|
7929
|
+
position: LbPosition;
|
|
7930
|
+
}): Promise<Transaction>;
|
|
5880
7931
|
/**
|
|
5881
7932
|
* The `closePosition` function closes a position
|
|
5882
7933
|
* @param
|
|
@@ -5956,12 +8007,14 @@ declare class DLMM {
|
|
|
5956
8007
|
* @param
|
|
5957
8008
|
* - `owner`: The public key of the owner of the position.
|
|
5958
8009
|
* - `position`: The public key of the position account.
|
|
8010
|
+
* - `binRange`: The bin range to claim rewards for.
|
|
5959
8011
|
* @returns {Promise<Transaction>}
|
|
5960
8012
|
*/
|
|
5961
|
-
claimLMReward({ owner, position, }: {
|
|
8013
|
+
claimLMReward({ owner, position, binRange, }: {
|
|
5962
8014
|
owner: PublicKey;
|
|
5963
8015
|
position: LbPosition;
|
|
5964
|
-
|
|
8016
|
+
binRange?: BinRange;
|
|
8017
|
+
}): Promise<Transaction[]>;
|
|
5965
8018
|
/**
|
|
5966
8019
|
* The `claimAllLMRewards` function is used to claim all liquidity mining rewards for a given owner
|
|
5967
8020
|
* and their positions.
|
|
@@ -5980,12 +8033,14 @@ declare class DLMM {
|
|
|
5980
8033
|
* @param
|
|
5981
8034
|
* - `owner`: The public key of the owner of the position.
|
|
5982
8035
|
* - `position`: The public key of the position account.
|
|
8036
|
+
* - `binRange`: The bin range to claim swap fees for.
|
|
5983
8037
|
* @returns {Promise<Transaction>}
|
|
5984
8038
|
*/
|
|
5985
|
-
claimSwapFee({ owner, position, }: {
|
|
8039
|
+
claimSwapFee({ owner, position, binRange, }: {
|
|
5986
8040
|
owner: PublicKey;
|
|
5987
8041
|
position: LbPosition;
|
|
5988
|
-
|
|
8042
|
+
binRange?: BinRange;
|
|
8043
|
+
}): Promise<Transaction[]>;
|
|
5989
8044
|
/**
|
|
5990
8045
|
* The `claimAllSwapFee` function to claim swap fees for multiple positions owned by a specific owner.
|
|
5991
8046
|
* @param
|
|
@@ -6009,35 +8064,6 @@ declare class DLMM {
|
|
|
6009
8064
|
owner: PublicKey;
|
|
6010
8065
|
position: LbPosition;
|
|
6011
8066
|
}): Promise<Transaction[]>;
|
|
6012
|
-
/**
|
|
6013
|
-
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be either [initialize bin array + initialize position instructions] or [deposit instruction] combination.
|
|
6014
|
-
* @param
|
|
6015
|
-
* - `owner`: The public key of the positions owner.
|
|
6016
|
-
* - `seedAmount`: Lamport amount to be seeded to the pool.
|
|
6017
|
-
* - `minPrice`: Start price in UI format
|
|
6018
|
-
* - `maxPrice`: End price in UI format
|
|
6019
|
-
* - `base`: Base key
|
|
6020
|
-
* @returns {Promise<SeedLiquidityResponse>}
|
|
6021
|
-
*/
|
|
6022
|
-
seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey): Promise<SeedLiquidityResponse>;
|
|
6023
|
-
/**
|
|
6024
|
-
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be either [initialize bin array + initialize position instructions] or [deposit instruction] combination.
|
|
6025
|
-
* @param
|
|
6026
|
-
* - `payer`: The public key of the tx payer.
|
|
6027
|
-
* - `base`: Base key
|
|
6028
|
-
* - `seedAmount`: Token X lamport amount to be seeded to the pool.
|
|
6029
|
-
* - `price`: TokenX/TokenY Price in UI format
|
|
6030
|
-
* - `roundingUp`: Whether to round up the price
|
|
6031
|
-
* - `positionOwner`: The owner of the position
|
|
6032
|
-
* - `feeOwner`: Position fee owner
|
|
6033
|
-
* - `operator`: Operator of the position. Operator able to manage the position on behalf of the position owner. However, liquidity withdrawal issue by the operator can only send to the position owner.
|
|
6034
|
-
* - `lockReleasePoint`: The lock release point of the position.
|
|
6035
|
-
* - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
|
|
6036
|
-
*
|
|
6037
|
-
* The returned instructions need to be executed sequentially if it was separated into multiple transactions.
|
|
6038
|
-
* @returns {Promise<TransactionInstruction[]>}
|
|
6039
|
-
*/
|
|
6040
|
-
seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<TransactionInstruction[]>;
|
|
6041
8067
|
/**
|
|
6042
8068
|
* Initializes bin arrays for the given bin array indexes if it wasn't initialized.
|
|
6043
8069
|
*
|
|
@@ -6090,10 +8116,6 @@ declare class DLMM {
|
|
|
6090
8116
|
*/
|
|
6091
8117
|
syncWithMarketPrice(marketPrice: number, owner: PublicKey): Promise<Transaction>;
|
|
6092
8118
|
getMaxPriceInBinArrays(binArrayAccounts: BinArrayAccount[]): Promise<string>;
|
|
6093
|
-
getAmountOutWithdrawSingleSide(maxLiquidityShare: BN, price: BN, bin: Bin, isWithdrawForY: boolean): {
|
|
6094
|
-
withdrawAmount: BN;
|
|
6095
|
-
};
|
|
6096
|
-
getWithdrawSingleSideAmount(positionPubkey: PublicKey, isWithdrawForY: boolean): Promise<BN>;
|
|
6097
8119
|
/**
|
|
6098
8120
|
*
|
|
6099
8121
|
* @param swapInitiator Address of the swap initiator
|
|
@@ -6102,8 +8124,6 @@ declare class DLMM {
|
|
|
6102
8124
|
isSwapDisabled(swapInitiator: PublicKey): boolean;
|
|
6103
8125
|
/** Private static method */
|
|
6104
8126
|
private static getBinArrays;
|
|
6105
|
-
private static getClaimableLMReward;
|
|
6106
|
-
private static getClaimableSwapFee;
|
|
6107
8127
|
private static processPosition;
|
|
6108
8128
|
private static getBinsBetweenLowerAndUpperBound;
|
|
6109
8129
|
/** Private method */
|
|
@@ -6115,9 +8135,12 @@ declare class DLMM {
|
|
|
6115
8135
|
private updateReference;
|
|
6116
8136
|
private createClaimBuildMethod;
|
|
6117
8137
|
private createClaimSwapFeeMethod;
|
|
8138
|
+
private getPotentialToken2022IxDataAndAccounts;
|
|
6118
8139
|
}
|
|
6119
8140
|
|
|
6120
8141
|
/** private */
|
|
8142
|
+
declare function derivePresetParameterWithIndex(index: BN, programId: PublicKey): [PublicKey, number];
|
|
8143
|
+
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
6121
8144
|
/**
|
|
6122
8145
|
*
|
|
6123
8146
|
* @deprecated Use derivePresetParameter2
|
|
@@ -6136,6 +8159,9 @@ declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicK
|
|
|
6136
8159
|
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN, width: BN, programId: PublicKey): [PublicKey, number];
|
|
6137
8160
|
declare function deriveBinArray(lbPair: PublicKey, index: BN, programId: PublicKey): [PublicKey, number];
|
|
6138
8161
|
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8162
|
+
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8163
|
+
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
8164
|
+
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN, programId: PublicKey): [PublicKey, number];
|
|
6139
8165
|
|
|
6140
8166
|
/** private */
|
|
6141
8167
|
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN): boolean;
|
|
@@ -6185,17 +8211,44 @@ declare function calculateNormalDistribution(activeBin: number, binIds: number[]
|
|
|
6185
8211
|
xAmountBpsOfTotal: BN;
|
|
6186
8212
|
yAmountBpsOfTotal: BN;
|
|
6187
8213
|
}[];
|
|
8214
|
+
/**
|
|
8215
|
+
* Converts a weight distribution into token amounts for one side (either bid or ask).
|
|
8216
|
+
*
|
|
8217
|
+
* @param amount - The total amount of liquidity to distribute.
|
|
8218
|
+
* @param distributions - The array of weight distributions for each bin.
|
|
8219
|
+
* @param binStep - The step interval between bin ids.
|
|
8220
|
+
* @param activeId - The id of the active bin.
|
|
8221
|
+
* @param depositForY - Flag indicating if the deposit is for token Y (bid side).
|
|
8222
|
+
* @param mint - Mint information for the token. Mint Y if depositForY is true, else Mint X. Get from DLMM instance.
|
|
8223
|
+
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8224
|
+
* @returns An array of objects containing binId and amount for each bin.
|
|
8225
|
+
*/
|
|
6188
8226
|
declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions: {
|
|
6189
8227
|
binId: number;
|
|
6190
8228
|
weight: number;
|
|
6191
|
-
}[], binStep: number, activeId: number, depositForY: boolean): {
|
|
8229
|
+
}[], binStep: number, activeId: number, depositForY: boolean, mint: Mint, clock: Clock): {
|
|
6192
8230
|
binId: number;
|
|
6193
8231
|
amount: BN;
|
|
6194
8232
|
}[];
|
|
8233
|
+
/**
|
|
8234
|
+
* Converts a weight distribution into token amounts for both bid and ask sides.
|
|
8235
|
+
*
|
|
8236
|
+
* @param amountX - The total amount of token X to distribute.
|
|
8237
|
+
* @param amountY - The total amount of token Y to distribute.
|
|
8238
|
+
* @param distributions - The array of weight distributions for each bin.
|
|
8239
|
+
* @param binStep - The step interval between bin ids.
|
|
8240
|
+
* @param activeId - The id of the active bin.
|
|
8241
|
+
* @param amountXInActiveBin - The amount of token X in the active bin.
|
|
8242
|
+
* @param amountYInActiveBin - The amount of token Y in the active bin.
|
|
8243
|
+
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8244
|
+
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8245
|
+
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8246
|
+
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8247
|
+
*/
|
|
6195
8248
|
declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distributions: {
|
|
6196
8249
|
binId: number;
|
|
6197
8250
|
weight: number;
|
|
6198
|
-
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN): {
|
|
8251
|
+
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
6199
8252
|
binId: number;
|
|
6200
8253
|
amountX: BN;
|
|
6201
8254
|
amountY: BN;
|
|
@@ -6220,24 +8273,58 @@ declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sP
|
|
|
6220
8273
|
protocolFee: BN;
|
|
6221
8274
|
};
|
|
6222
8275
|
|
|
8276
|
+
/**
|
|
8277
|
+
* Distribute totalAmount to all bid side bins according to given distributions.
|
|
8278
|
+
* @param activeId active bin id
|
|
8279
|
+
* @param totalAmount total amount of token Y to be distributed
|
|
8280
|
+
* @param distributions weight distribution of each bin
|
|
8281
|
+
* @param mintY mint of token Y, get from DLMM instance
|
|
8282
|
+
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8283
|
+
* @returns array of {binId, amount} where amount is the amount of token Y in each bin
|
|
8284
|
+
*/
|
|
6223
8285
|
declare function toAmountBidSide(activeId: number, totalAmount: BN, distributions: {
|
|
6224
8286
|
binId: number;
|
|
6225
8287
|
weight: number;
|
|
6226
|
-
}[]): {
|
|
8288
|
+
}[], mintY: Mint, clock: Clock): {
|
|
6227
8289
|
binId: number;
|
|
6228
8290
|
amount: BN;
|
|
6229
8291
|
}[];
|
|
8292
|
+
/**
|
|
8293
|
+
* Distribute totalAmount to all ask side bins according to given distributions.
|
|
8294
|
+
* @param activeId active bin id
|
|
8295
|
+
* @param totalAmount total amount of token Y to be distributed
|
|
8296
|
+
* @param distributions weight distribution of each bin
|
|
8297
|
+
* @param mintX mint of token X, get from DLMM instance
|
|
8298
|
+
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8299
|
+
* @returns array of {binId, amount} where amount is the amount of token X in each bin
|
|
8300
|
+
*/
|
|
6230
8301
|
declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN, distributions: {
|
|
6231
8302
|
binId: number;
|
|
6232
8303
|
weight: number;
|
|
6233
|
-
}[]): {
|
|
8304
|
+
}[], mintX: Mint, clock: Clock): {
|
|
6234
8305
|
binId: number;
|
|
6235
8306
|
amount: BN;
|
|
6236
8307
|
}[];
|
|
8308
|
+
/**
|
|
8309
|
+
* Distributes the given amounts of tokens X and Y to both bid and ask side bins
|
|
8310
|
+
* based on the provided weight distributions.
|
|
8311
|
+
*
|
|
8312
|
+
* @param activeId - The id of the active bin.
|
|
8313
|
+
* @param binStep - The step interval between bin ids.
|
|
8314
|
+
* @param amountX - Total amount of token X to distribute.
|
|
8315
|
+
* @param amountY - Total amount of token Y to distribute.
|
|
8316
|
+
* @param amountXInActiveBin - Amount of token X already in the active bin.
|
|
8317
|
+
* @param amountYInActiveBin - Amount of token Y already in the active bin.
|
|
8318
|
+
* @param distributions - Array of bins with their respective weight distributions.
|
|
8319
|
+
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8320
|
+
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8321
|
+
* @param clock - Clock instance. Get from DLMM instance.
|
|
8322
|
+
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8323
|
+
*/
|
|
6237
8324
|
declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
6238
8325
|
binId: number;
|
|
6239
8326
|
weight: number;
|
|
6240
|
-
}[]): {
|
|
8327
|
+
}[], mintX: Mint, mintY: Mint, clock: Clock): {
|
|
6241
8328
|
binId: number;
|
|
6242
8329
|
amountX: BN;
|
|
6243
8330
|
amountY: BN;
|
|
@@ -6251,11 +8338,40 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
|
|
|
6251
8338
|
weight: number;
|
|
6252
8339
|
}[]): BN;
|
|
6253
8340
|
|
|
6254
|
-
|
|
8341
|
+
/**
|
|
8342
|
+
* Given a strategy type, calculate the distribution of liquidity for a deposit.
|
|
8343
|
+
* @param activeId The bin id of the active bin.
|
|
8344
|
+
* @param binStep The step size of each bin.
|
|
8345
|
+
* @param minBinId The min bin id.
|
|
8346
|
+
* @param maxBinId The max bin id.
|
|
8347
|
+
* @param amount The amount of liquidity to deposit.
|
|
8348
|
+
* @param strategyType The strategy type.
|
|
8349
|
+
* @param depositForY Whether the deposit is for Y token.
|
|
8350
|
+
* @param mint The mint info of token. Pass mintY if depositForY is true. Get from DLMM instance.
|
|
8351
|
+
* @param clock The clock info. Get from DLMM instance.
|
|
8352
|
+
* @returns The distribution of liquidity.
|
|
8353
|
+
*/
|
|
8354
|
+
declare function toAmountsOneSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amount: BN, strategyType: StrategyType, depositForY: boolean, mint: Mint, clock: Clock): {
|
|
6255
8355
|
binId: number;
|
|
6256
8356
|
amount: BN;
|
|
6257
8357
|
}[];
|
|
6258
|
-
|
|
8358
|
+
/**
|
|
8359
|
+
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
8360
|
+
* @param activeId The bin id of the active bin.
|
|
8361
|
+
* @param binStep The step size of each bin.
|
|
8362
|
+
* @param minBinId The min bin id.
|
|
8363
|
+
* @param maxBinId The max bin id.
|
|
8364
|
+
* @param amountX The amount of X token to deposit.
|
|
8365
|
+
* @param amountY The amount of Y token to deposit.
|
|
8366
|
+
* @param amountXInActiveBin The amount of X token in the active bin.
|
|
8367
|
+
* @param amountYInActiveBin The amount of Y token in the active bin.
|
|
8368
|
+
* @param strategyType The strategy type.
|
|
8369
|
+
* @param mintX The mint info of X token. Get from DLMM instance.
|
|
8370
|
+
* @param mintY The mint info of Y token. Get from DLMM instance.
|
|
8371
|
+
* @param clock The clock info. Get from DLMM instance.
|
|
8372
|
+
* @returns The distribution of liquidity.
|
|
8373
|
+
*/
|
|
8374
|
+
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
6259
8375
|
binId: number;
|
|
6260
8376
|
amountX: BN;
|
|
6261
8377
|
amountY: BN;
|
|
@@ -6407,10 +8523,15 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6407
8523
|
*/
|
|
6408
8524
|
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
6409
8525
|
cluster?: Cluster;
|
|
8526
|
+
programId?: PublicKey;
|
|
6410
8527
|
}): Promise<{
|
|
6411
8528
|
tokenXMint: PublicKey;
|
|
6412
8529
|
tokenYMint: PublicKey;
|
|
6413
8530
|
}>;
|
|
8531
|
+
declare function getTokenProgramId(lbPairState: LbPair): {
|
|
8532
|
+
tokenXProgram: PublicKey;
|
|
8533
|
+
tokenYProgram: PublicKey;
|
|
8534
|
+
};
|
|
6414
8535
|
|
|
6415
8536
|
declare function chunks<T>(array: T[], size: number): T[][];
|
|
6416
8537
|
declare function range<T>(min: number, max: number, mapfn: (i: number) => T): T[];
|
|
@@ -6425,6 +8546,7 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
6425
8546
|
minBinId: number;
|
|
6426
8547
|
maxBinId: number;
|
|
6427
8548
|
protocolShare: number;
|
|
8549
|
+
baseFeePowerFactor: number;
|
|
6428
8550
|
padding: number[];
|
|
6429
8551
|
};
|
|
6430
8552
|
vParameters: {
|
|
@@ -6475,6 +8597,8 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
6475
8597
|
padding3: number[];
|
|
6476
8598
|
padding4: BN;
|
|
6477
8599
|
creator: PublicKey;
|
|
8600
|
+
tokenMintXProgramFlag: number;
|
|
8601
|
+
tokenMintYProgramFlag: number;
|
|
6478
8602
|
reserved: number[];
|
|
6479
8603
|
}[]>;
|
|
6480
8604
|
declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{
|
|
@@ -6484,7 +8608,7 @@ declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: Clm
|
|
|
6484
8608
|
}[]>;
|
|
6485
8609
|
declare function getOutAmount(bin: Bin, inAmount: BN, swapForY: boolean): BN;
|
|
6486
8610
|
declare function getTokenDecimals(conn: Connection, mint: PublicKey): Promise<number>;
|
|
6487
|
-
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
8611
|
+
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, programId?: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
6488
8612
|
declare function getTokenBalance(conn: Connection, tokenAccount: PublicKey): Promise<bigint>;
|
|
6489
8613
|
declare const parseLogs: <T>(eventParser: EventParser, logs: string[]) => T;
|
|
6490
8614
|
declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[];
|
|
@@ -6545,9 +8669,8 @@ declare const SCALE: BN;
|
|
|
6545
8669
|
declare const FEE_PRECISION: BN;
|
|
6546
8670
|
declare const MAX_FEE_RATE: BN;
|
|
6547
8671
|
declare const BIN_ARRAY_FEE = 0.07054656;
|
|
6548
|
-
declare const POSITION_FEE = 0.0565152;
|
|
6549
8672
|
declare const MAX_BIN_ARRAY_SIZE: BN;
|
|
6550
|
-
declare const
|
|
8673
|
+
declare const DEFAULT_BIN_PER_POSITION: BN;
|
|
6551
8674
|
declare const BIN_ARRAY_BITMAP_SIZE: BN;
|
|
6552
8675
|
declare const EXTENSION_BINARRAY_BITMAP_SIZE: BN;
|
|
6553
8676
|
declare const SIMULATION_USER: PublicKey;
|
|
@@ -6558,4 +8681,4 @@ declare const MAX_BIN_PER_TX = 69;
|
|
|
6558
8681
|
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
6559
8682
|
declare const ILM_BASE: PublicKey;
|
|
6560
8683
|
|
|
6561
|
-
export { ADMIN, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX,
|
|
8684
|
+
export { ADMIN, ActionType, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BinRange, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, MEMO_PROGRAM_ID, Network, POSITION_V2_DISC, POSITION_V3_DISC, PRECISION, PairStatus, PairType, Position, PositionBinData, PositionBinInfo, PositionData, PositionInfo, PositionV2, PositionV3, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, SCALE, SCALE_OFFSET, SIMULATION_USER, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy, toAmountsOneSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|