@meteora-ag/dlmm 1.3.14-sam.0 → 1.3.16-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2661 -339
- package/dist/index.js +5240 -2293
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5184 -2237
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
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
|
{
|
|
@@ -27,6 +28,20 @@ type LbClmm = {
|
|
|
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";
|
|
@@ -93,6 +108,16 @@ type LbClmm = {
|
|
|
93
108
|
};
|
|
94
109
|
"value": "15";
|
|
95
110
|
},
|
|
111
|
+
{
|
|
112
|
+
"name": "ILM_PROTOCOL_SHARE";
|
|
113
|
+
"type": "u16";
|
|
114
|
+
"value": "2000";
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "PROTOCOL_SHARE";
|
|
118
|
+
"type": "u16";
|
|
119
|
+
"value": "500";
|
|
120
|
+
},
|
|
96
121
|
{
|
|
97
122
|
"name": "MAX_BIN_STEP";
|
|
98
123
|
"type": "u16";
|
|
@@ -108,6 +133,11 @@ type LbClmm = {
|
|
|
108
133
|
"type": "u128";
|
|
109
134
|
"value": "100_000";
|
|
110
135
|
},
|
|
136
|
+
{
|
|
137
|
+
"name": "MINIMUM_LIQUIDITY";
|
|
138
|
+
"type": "u128";
|
|
139
|
+
"value": "1_000_000";
|
|
140
|
+
},
|
|
111
141
|
{
|
|
112
142
|
"name": "BIN_ARRAY";
|
|
113
143
|
"type": "bytes";
|
|
@@ -128,10 +158,20 @@ type LbClmm = {
|
|
|
128
158
|
"type": "bytes";
|
|
129
159
|
"value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]";
|
|
130
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"name": "PRESET_PARAMETER2";
|
|
163
|
+
"type": "bytes";
|
|
164
|
+
"value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]";
|
|
165
|
+
},
|
|
131
166
|
{
|
|
132
167
|
"name": "POSITION";
|
|
133
168
|
"type": "bytes";
|
|
134
169
|
"value": "[112, 111, 115, 105, 116, 105, 111, 110]";
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "CLAIM_PROTOCOL_FEE_OPERATOR";
|
|
173
|
+
"type": "bytes";
|
|
174
|
+
"value": "[99, 102, 95, 111, 112, 101, 114, 97, 116, 111, 114]";
|
|
135
175
|
}
|
|
136
176
|
];
|
|
137
177
|
"instructions": [
|
|
@@ -271,7 +311,24 @@ type LbClmm = {
|
|
|
271
311
|
"isSigner": true;
|
|
272
312
|
},
|
|
273
313
|
{
|
|
274
|
-
"name": "
|
|
314
|
+
"name": "tokenBadgeX";
|
|
315
|
+
"isMut": false;
|
|
316
|
+
"isSigner": false;
|
|
317
|
+
"isOptional": true;
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "tokenBadgeY";
|
|
321
|
+
"isMut": false;
|
|
322
|
+
"isSigner": false;
|
|
323
|
+
"isOptional": true;
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "tokenProgramX";
|
|
327
|
+
"isMut": false;
|
|
328
|
+
"isSigner": false;
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "tokenProgramY";
|
|
275
332
|
"isMut": false;
|
|
276
333
|
"isSigner": false;
|
|
277
334
|
},
|
|
@@ -365,7 +422,7 @@ type LbClmm = {
|
|
|
365
422
|
"isSigner": false;
|
|
366
423
|
},
|
|
367
424
|
{
|
|
368
|
-
"name": "
|
|
425
|
+
"name": "userTokenY";
|
|
369
426
|
"isMut": false;
|
|
370
427
|
"isSigner": false;
|
|
371
428
|
},
|
|
@@ -1530,6 +1587,19 @@ type LbClmm = {
|
|
|
1530
1587
|
"isMut": true;
|
|
1531
1588
|
"isSigner": false;
|
|
1532
1589
|
},
|
|
1590
|
+
{
|
|
1591
|
+
"name": "claimFeeOperator";
|
|
1592
|
+
"isMut": false;
|
|
1593
|
+
"isSigner": false;
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"name": "operator";
|
|
1597
|
+
"isMut": false;
|
|
1598
|
+
"isSigner": true;
|
|
1599
|
+
"docs": [
|
|
1600
|
+
"operator"
|
|
1601
|
+
];
|
|
1602
|
+
},
|
|
1533
1603
|
{
|
|
1534
1604
|
"name": "tokenXProgram";
|
|
1535
1605
|
"isMut": false;
|
|
@@ -1539,6 +1609,11 @@ type LbClmm = {
|
|
|
1539
1609
|
"name": "tokenYProgram";
|
|
1540
1610
|
"isMut": false;
|
|
1541
1611
|
"isSigner": false;
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"name": "memoProgram";
|
|
1615
|
+
"isMut": false;
|
|
1616
|
+
"isSigner": false;
|
|
1542
1617
|
}
|
|
1543
1618
|
];
|
|
1544
1619
|
"args": [
|
|
@@ -1549,6 +1624,12 @@ type LbClmm = {
|
|
|
1549
1624
|
{
|
|
1550
1625
|
"name": "amountY";
|
|
1551
1626
|
"type": "u64";
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"name": "remainingAccountsInfo";
|
|
1630
|
+
"type": {
|
|
1631
|
+
"defined": "RemainingAccountsInfo";
|
|
1632
|
+
};
|
|
1552
1633
|
}
|
|
1553
1634
|
];
|
|
1554
1635
|
},
|
|
@@ -1570,6 +1651,12 @@ type LbClmm = {
|
|
|
1570
1651
|
"isMut": false;
|
|
1571
1652
|
"isSigner": false;
|
|
1572
1653
|
},
|
|
1654
|
+
{
|
|
1655
|
+
"name": "tokenBadge";
|
|
1656
|
+
"isMut": false;
|
|
1657
|
+
"isSigner": false;
|
|
1658
|
+
"isOptional": true;
|
|
1659
|
+
},
|
|
1573
1660
|
{
|
|
1574
1661
|
"name": "admin";
|
|
1575
1662
|
"isMut": true;
|
|
@@ -1677,6 +1764,12 @@ type LbClmm = {
|
|
|
1677
1764
|
{
|
|
1678
1765
|
"name": "carryForward";
|
|
1679
1766
|
"type": "bool";
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"name": "remainingAccountsInfo";
|
|
1770
|
+
"type": {
|
|
1771
|
+
"defined": "RemainingAccountsInfo";
|
|
1772
|
+
};
|
|
1680
1773
|
}
|
|
1681
1774
|
];
|
|
1682
1775
|
},
|
|
@@ -1944,7 +2037,40 @@ type LbClmm = {
|
|
|
1944
2037
|
"args": [];
|
|
1945
2038
|
},
|
|
1946
2039
|
{
|
|
1947
|
-
"name": "
|
|
2040
|
+
"name": "updateBaseFeeParameters";
|
|
2041
|
+
"accounts": [
|
|
2042
|
+
{
|
|
2043
|
+
"name": "lbPair";
|
|
2044
|
+
"isMut": true;
|
|
2045
|
+
"isSigner": false;
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
"name": "admin";
|
|
2049
|
+
"isMut": false;
|
|
2050
|
+
"isSigner": true;
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
"name": "eventAuthority";
|
|
2054
|
+
"isMut": false;
|
|
2055
|
+
"isSigner": false;
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "program";
|
|
2059
|
+
"isMut": false;
|
|
2060
|
+
"isSigner": false;
|
|
2061
|
+
}
|
|
2062
|
+
];
|
|
2063
|
+
"args": [
|
|
2064
|
+
{
|
|
2065
|
+
"name": "feeParameter";
|
|
2066
|
+
"type": {
|
|
2067
|
+
"defined": "BaseFeeParameter";
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
];
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
"name": "updateDynamicFeeParameters";
|
|
1948
2074
|
"accounts": [
|
|
1949
2075
|
{
|
|
1950
2076
|
"name": "lbPair";
|
|
@@ -1971,7 +2097,7 @@ type LbClmm = {
|
|
|
1971
2097
|
{
|
|
1972
2098
|
"name": "feeParameter";
|
|
1973
2099
|
"type": {
|
|
1974
|
-
"defined": "
|
|
2100
|
+
"defined": "DynamicFeeParameter";
|
|
1975
2101
|
};
|
|
1976
2102
|
}
|
|
1977
2103
|
];
|
|
@@ -2066,6 +2192,27 @@ type LbClmm = {
|
|
|
2066
2192
|
];
|
|
2067
2193
|
"args": [];
|
|
2068
2194
|
},
|
|
2195
|
+
{
|
|
2196
|
+
"name": "closePresetParameter2";
|
|
2197
|
+
"accounts": [
|
|
2198
|
+
{
|
|
2199
|
+
"name": "presetParameter";
|
|
2200
|
+
"isMut": true;
|
|
2201
|
+
"isSigner": false;
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"name": "admin";
|
|
2205
|
+
"isMut": true;
|
|
2206
|
+
"isSigner": true;
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"name": "rentReceiver";
|
|
2210
|
+
"isMut": true;
|
|
2211
|
+
"isSigner": false;
|
|
2212
|
+
}
|
|
2213
|
+
];
|
|
2214
|
+
"args": [];
|
|
2215
|
+
},
|
|
2069
2216
|
{
|
|
2070
2217
|
"name": "removeAllLiquidity";
|
|
2071
2218
|
"accounts": [
|
|
@@ -2154,7 +2301,7 @@ type LbClmm = {
|
|
|
2154
2301
|
"args": [];
|
|
2155
2302
|
},
|
|
2156
2303
|
{
|
|
2157
|
-
"name": "
|
|
2304
|
+
"name": "setPairStatus";
|
|
2158
2305
|
"accounts": [
|
|
2159
2306
|
{
|
|
2160
2307
|
"name": "lbPair";
|
|
@@ -2167,7 +2314,12 @@ type LbClmm = {
|
|
|
2167
2314
|
"isSigner": true;
|
|
2168
2315
|
}
|
|
2169
2316
|
];
|
|
2170
|
-
"args": [
|
|
2317
|
+
"args": [
|
|
2318
|
+
{
|
|
2319
|
+
"name": "status";
|
|
2320
|
+
"type": "u8";
|
|
2321
|
+
}
|
|
2322
|
+
];
|
|
2171
2323
|
},
|
|
2172
2324
|
{
|
|
2173
2325
|
"name": "migratePosition";
|
|
@@ -2305,6 +2457,11 @@ type LbClmm = {
|
|
|
2305
2457
|
"isMut": false;
|
|
2306
2458
|
"isSigner": false;
|
|
2307
2459
|
},
|
|
2460
|
+
{
|
|
2461
|
+
"name": "memoProgram";
|
|
2462
|
+
"isMut": false;
|
|
2463
|
+
"isSigner": false;
|
|
2464
|
+
},
|
|
2308
2465
|
{
|
|
2309
2466
|
"name": "eventAuthority";
|
|
2310
2467
|
"isMut": false;
|
|
@@ -2320,6 +2477,12 @@ type LbClmm = {
|
|
|
2320
2477
|
{
|
|
2321
2478
|
"name": "rewardIndex";
|
|
2322
2479
|
"type": "u64";
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"name": "remainingAccountsInfo";
|
|
2483
|
+
"type": {
|
|
2484
|
+
"defined": "RemainingAccountsInfo";
|
|
2485
|
+
};
|
|
2323
2486
|
}
|
|
2324
2487
|
];
|
|
2325
2488
|
},
|
|
@@ -2603,116 +2766,1486 @@ type LbClmm = {
|
|
|
2603
2766
|
"type": "publicKey";
|
|
2604
2767
|
}
|
|
2605
2768
|
];
|
|
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
2769
|
},
|
|
2655
2770
|
{
|
|
2656
|
-
"name": "
|
|
2657
|
-
"
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2771
|
+
"name": "setPairStatusPermissionless";
|
|
2772
|
+
"accounts": [
|
|
2773
|
+
{
|
|
2774
|
+
"name": "lbPair";
|
|
2775
|
+
"isMut": true;
|
|
2776
|
+
"isSigner": false;
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"name": "creator";
|
|
2780
|
+
"isMut": false;
|
|
2781
|
+
"isSigner": true;
|
|
2782
|
+
}
|
|
2783
|
+
];
|
|
2784
|
+
"args": [
|
|
2785
|
+
{
|
|
2786
|
+
"name": "status";
|
|
2787
|
+
"type": "u8";
|
|
2788
|
+
}
|
|
2662
2789
|
];
|
|
2663
|
-
"type": {
|
|
2664
|
-
"kind": "struct";
|
|
2665
|
-
"fields": [
|
|
2666
|
-
{
|
|
2667
|
-
"name": "index";
|
|
2668
|
-
"type": "i64";
|
|
2669
|
-
},
|
|
2670
|
-
{
|
|
2671
|
-
"name": "version";
|
|
2672
|
-
"docs": [
|
|
2673
|
-
"Version of binArray"
|
|
2674
|
-
];
|
|
2675
|
-
"type": "u8";
|
|
2676
|
-
},
|
|
2677
|
-
{
|
|
2678
|
-
"name": "padding";
|
|
2679
|
-
"type": {
|
|
2680
|
-
"array": [
|
|
2681
|
-
"u8",
|
|
2682
|
-
7
|
|
2683
|
-
];
|
|
2684
|
-
};
|
|
2685
|
-
},
|
|
2686
|
-
{
|
|
2687
|
-
"name": "lbPair";
|
|
2688
|
-
"type": "publicKey";
|
|
2689
|
-
},
|
|
2690
|
-
{
|
|
2691
|
-
"name": "bins";
|
|
2692
|
-
"type": {
|
|
2693
|
-
"array": [
|
|
2694
|
-
{
|
|
2695
|
-
"defined": "Bin";
|
|
2696
|
-
},
|
|
2697
|
-
70
|
|
2698
|
-
];
|
|
2699
|
-
};
|
|
2700
|
-
}
|
|
2701
|
-
];
|
|
2702
|
-
};
|
|
2703
2790
|
},
|
|
2704
2791
|
{
|
|
2705
|
-
"name": "
|
|
2706
|
-
"
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2792
|
+
"name": "initializeTokenBadge";
|
|
2793
|
+
"accounts": [
|
|
2794
|
+
{
|
|
2795
|
+
"name": "tokenMint";
|
|
2796
|
+
"isMut": false;
|
|
2797
|
+
"isSigner": false;
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
"name": "tokenBadge";
|
|
2801
|
+
"isMut": true;
|
|
2802
|
+
"isSigner": false;
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
"name": "admin";
|
|
2806
|
+
"isMut": true;
|
|
2807
|
+
"isSigner": true;
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"name": "systemProgram";
|
|
2811
|
+
"isMut": false;
|
|
2812
|
+
"isSigner": false;
|
|
2813
|
+
}
|
|
2814
|
+
];
|
|
2815
|
+
"args": [];
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"name": "createClaimProtocolFeeOperator";
|
|
2819
|
+
"accounts": [
|
|
2820
|
+
{
|
|
2821
|
+
"name": "claimFeeOperator";
|
|
2822
|
+
"isMut": true;
|
|
2823
|
+
"isSigner": false;
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
"name": "operator";
|
|
2827
|
+
"isMut": false;
|
|
2828
|
+
"isSigner": false;
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
"name": "admin";
|
|
2832
|
+
"isMut": true;
|
|
2833
|
+
"isSigner": true;
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"name": "systemProgram";
|
|
2837
|
+
"isMut": false;
|
|
2838
|
+
"isSigner": false;
|
|
2839
|
+
}
|
|
2840
|
+
];
|
|
2841
|
+
"args": [];
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
"name": "closeClaimProtocolFeeOperator";
|
|
2845
|
+
"accounts": [
|
|
2846
|
+
{
|
|
2847
|
+
"name": "claimFeeOperator";
|
|
2848
|
+
"isMut": true;
|
|
2849
|
+
"isSigner": false;
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"name": "rentReceiver";
|
|
2853
|
+
"isMut": true;
|
|
2854
|
+
"isSigner": false;
|
|
2855
|
+
},
|
|
2856
|
+
{
|
|
2857
|
+
"name": "admin";
|
|
2858
|
+
"isMut": false;
|
|
2859
|
+
"isSigner": true;
|
|
2860
|
+
}
|
|
2861
|
+
];
|
|
2862
|
+
"args": [];
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
"name": "initializePresetParameter2";
|
|
2866
|
+
"accounts": [
|
|
2867
|
+
{
|
|
2868
|
+
"name": "presetParameter";
|
|
2869
|
+
"isMut": true;
|
|
2870
|
+
"isSigner": false;
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
"name": "admin";
|
|
2874
|
+
"isMut": true;
|
|
2875
|
+
"isSigner": true;
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "systemProgram";
|
|
2879
|
+
"isMut": false;
|
|
2880
|
+
"isSigner": false;
|
|
2881
|
+
}
|
|
2882
|
+
];
|
|
2883
|
+
"args": [
|
|
2884
|
+
{
|
|
2885
|
+
"name": "ix";
|
|
2886
|
+
"type": {
|
|
2887
|
+
"defined": "InitPresetParameters2Ix";
|
|
2888
|
+
};
|
|
2889
|
+
}
|
|
2890
|
+
];
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
"name": "initializeLbPair2";
|
|
2894
|
+
"accounts": [
|
|
2895
|
+
{
|
|
2896
|
+
"name": "lbPair";
|
|
2897
|
+
"isMut": true;
|
|
2898
|
+
"isSigner": false;
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
"name": "binArrayBitmapExtension";
|
|
2902
|
+
"isMut": true;
|
|
2903
|
+
"isSigner": false;
|
|
2904
|
+
"isOptional": true;
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
"name": "tokenMintX";
|
|
2908
|
+
"isMut": false;
|
|
2909
|
+
"isSigner": false;
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"name": "tokenMintY";
|
|
2913
|
+
"isMut": false;
|
|
2914
|
+
"isSigner": false;
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
"name": "reserveX";
|
|
2918
|
+
"isMut": true;
|
|
2919
|
+
"isSigner": false;
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "reserveY";
|
|
2923
|
+
"isMut": true;
|
|
2924
|
+
"isSigner": false;
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"name": "oracle";
|
|
2928
|
+
"isMut": true;
|
|
2929
|
+
"isSigner": false;
|
|
2930
|
+
},
|
|
2931
|
+
{
|
|
2932
|
+
"name": "presetParameter";
|
|
2933
|
+
"isMut": false;
|
|
2934
|
+
"isSigner": false;
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"name": "funder";
|
|
2938
|
+
"isMut": true;
|
|
2939
|
+
"isSigner": true;
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
"name": "tokenBadgeX";
|
|
2943
|
+
"isMut": false;
|
|
2944
|
+
"isSigner": false;
|
|
2945
|
+
"isOptional": true;
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
"name": "tokenBadgeY";
|
|
2949
|
+
"isMut": false;
|
|
2950
|
+
"isSigner": false;
|
|
2951
|
+
"isOptional": true;
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"name": "tokenProgramX";
|
|
2955
|
+
"isMut": false;
|
|
2956
|
+
"isSigner": false;
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"name": "tokenProgramY";
|
|
2960
|
+
"isMut": false;
|
|
2961
|
+
"isSigner": false;
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
"name": "systemProgram";
|
|
2965
|
+
"isMut": false;
|
|
2966
|
+
"isSigner": false;
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"name": "eventAuthority";
|
|
2970
|
+
"isMut": false;
|
|
2971
|
+
"isSigner": false;
|
|
2972
|
+
},
|
|
2973
|
+
{
|
|
2974
|
+
"name": "program";
|
|
2975
|
+
"isMut": false;
|
|
2976
|
+
"isSigner": false;
|
|
2977
|
+
}
|
|
2978
|
+
];
|
|
2979
|
+
"args": [
|
|
2980
|
+
{
|
|
2981
|
+
"name": "params";
|
|
2982
|
+
"type": {
|
|
2983
|
+
"defined": "InitializeLbPair2Params";
|
|
2984
|
+
};
|
|
2985
|
+
}
|
|
2986
|
+
];
|
|
2987
|
+
},
|
|
2988
|
+
{
|
|
2989
|
+
"name": "initializeCustomizablePermissionlessLbPair2";
|
|
2990
|
+
"accounts": [
|
|
2991
|
+
{
|
|
2992
|
+
"name": "lbPair";
|
|
2993
|
+
"isMut": true;
|
|
2994
|
+
"isSigner": false;
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
"name": "binArrayBitmapExtension";
|
|
2998
|
+
"isMut": true;
|
|
2999
|
+
"isSigner": false;
|
|
3000
|
+
"isOptional": true;
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
"name": "tokenMintX";
|
|
3004
|
+
"isMut": false;
|
|
3005
|
+
"isSigner": false;
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
"name": "tokenMintY";
|
|
3009
|
+
"isMut": false;
|
|
3010
|
+
"isSigner": false;
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
"name": "reserveX";
|
|
3014
|
+
"isMut": true;
|
|
3015
|
+
"isSigner": false;
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"name": "reserveY";
|
|
3019
|
+
"isMut": true;
|
|
3020
|
+
"isSigner": false;
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
"name": "oracle";
|
|
3024
|
+
"isMut": true;
|
|
3025
|
+
"isSigner": false;
|
|
3026
|
+
},
|
|
3027
|
+
{
|
|
3028
|
+
"name": "userTokenX";
|
|
3029
|
+
"isMut": false;
|
|
3030
|
+
"isSigner": false;
|
|
3031
|
+
},
|
|
3032
|
+
{
|
|
3033
|
+
"name": "funder";
|
|
3034
|
+
"isMut": true;
|
|
3035
|
+
"isSigner": true;
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"name": "tokenBadgeX";
|
|
3039
|
+
"isMut": false;
|
|
3040
|
+
"isSigner": false;
|
|
3041
|
+
"isOptional": true;
|
|
3042
|
+
},
|
|
3043
|
+
{
|
|
3044
|
+
"name": "tokenBadgeY";
|
|
3045
|
+
"isMut": false;
|
|
3046
|
+
"isSigner": false;
|
|
3047
|
+
"isOptional": true;
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"name": "tokenProgramX";
|
|
3051
|
+
"isMut": false;
|
|
3052
|
+
"isSigner": false;
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"name": "tokenProgramY";
|
|
3056
|
+
"isMut": false;
|
|
3057
|
+
"isSigner": false;
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
"name": "systemProgram";
|
|
3061
|
+
"isMut": false;
|
|
3062
|
+
"isSigner": false;
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"name": "userTokenY";
|
|
3066
|
+
"isMut": false;
|
|
3067
|
+
"isSigner": false;
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"name": "eventAuthority";
|
|
3071
|
+
"isMut": false;
|
|
3072
|
+
"isSigner": false;
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"name": "program";
|
|
3076
|
+
"isMut": false;
|
|
3077
|
+
"isSigner": false;
|
|
3078
|
+
}
|
|
3079
|
+
];
|
|
3080
|
+
"args": [
|
|
3081
|
+
{
|
|
3082
|
+
"name": "params";
|
|
3083
|
+
"type": {
|
|
3084
|
+
"defined": "CustomizableParams";
|
|
3085
|
+
};
|
|
3086
|
+
}
|
|
3087
|
+
];
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
"name": "claimFee2";
|
|
3091
|
+
"accounts": [
|
|
3092
|
+
{
|
|
3093
|
+
"name": "lbPair";
|
|
3094
|
+
"isMut": true;
|
|
3095
|
+
"isSigner": false;
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"name": "position";
|
|
3099
|
+
"isMut": true;
|
|
3100
|
+
"isSigner": false;
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
"name": "sender";
|
|
3104
|
+
"isMut": false;
|
|
3105
|
+
"isSigner": true;
|
|
3106
|
+
},
|
|
3107
|
+
{
|
|
3108
|
+
"name": "reserveX";
|
|
3109
|
+
"isMut": true;
|
|
3110
|
+
"isSigner": false;
|
|
3111
|
+
},
|
|
3112
|
+
{
|
|
3113
|
+
"name": "reserveY";
|
|
3114
|
+
"isMut": true;
|
|
3115
|
+
"isSigner": false;
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
"name": "userTokenX";
|
|
3119
|
+
"isMut": true;
|
|
3120
|
+
"isSigner": false;
|
|
3121
|
+
},
|
|
3122
|
+
{
|
|
3123
|
+
"name": "userTokenY";
|
|
3124
|
+
"isMut": true;
|
|
3125
|
+
"isSigner": false;
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"name": "tokenXMint";
|
|
3129
|
+
"isMut": false;
|
|
3130
|
+
"isSigner": false;
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"name": "tokenYMint";
|
|
3134
|
+
"isMut": false;
|
|
3135
|
+
"isSigner": false;
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"name": "tokenProgramX";
|
|
3139
|
+
"isMut": false;
|
|
3140
|
+
"isSigner": false;
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
"name": "tokenProgramY";
|
|
3144
|
+
"isMut": false;
|
|
3145
|
+
"isSigner": false;
|
|
3146
|
+
},
|
|
3147
|
+
{
|
|
3148
|
+
"name": "memoProgram";
|
|
3149
|
+
"isMut": false;
|
|
3150
|
+
"isSigner": false;
|
|
3151
|
+
},
|
|
3152
|
+
{
|
|
3153
|
+
"name": "eventAuthority";
|
|
3154
|
+
"isMut": false;
|
|
3155
|
+
"isSigner": false;
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "program";
|
|
3159
|
+
"isMut": false;
|
|
3160
|
+
"isSigner": false;
|
|
3161
|
+
}
|
|
3162
|
+
];
|
|
3163
|
+
"args": [
|
|
3164
|
+
{
|
|
3165
|
+
"name": "minBinId";
|
|
3166
|
+
"type": "i32";
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
"name": "maxBinId";
|
|
3170
|
+
"type": "i32";
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"name": "remainingAccountsInfo";
|
|
3174
|
+
"type": {
|
|
3175
|
+
"defined": "RemainingAccountsInfo";
|
|
3176
|
+
};
|
|
3177
|
+
}
|
|
3178
|
+
];
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
"name": "claimReward2";
|
|
3182
|
+
"accounts": [
|
|
3183
|
+
{
|
|
3184
|
+
"name": "lbPair";
|
|
3185
|
+
"isMut": true;
|
|
3186
|
+
"isSigner": false;
|
|
3187
|
+
},
|
|
3188
|
+
{
|
|
3189
|
+
"name": "position";
|
|
3190
|
+
"isMut": true;
|
|
3191
|
+
"isSigner": false;
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"name": "sender";
|
|
3195
|
+
"isMut": false;
|
|
3196
|
+
"isSigner": true;
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
"name": "rewardVault";
|
|
3200
|
+
"isMut": true;
|
|
3201
|
+
"isSigner": false;
|
|
3202
|
+
},
|
|
3203
|
+
{
|
|
3204
|
+
"name": "rewardMint";
|
|
3205
|
+
"isMut": false;
|
|
3206
|
+
"isSigner": false;
|
|
3207
|
+
},
|
|
3208
|
+
{
|
|
3209
|
+
"name": "userTokenAccount";
|
|
3210
|
+
"isMut": true;
|
|
3211
|
+
"isSigner": false;
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"name": "tokenProgram";
|
|
3215
|
+
"isMut": false;
|
|
3216
|
+
"isSigner": false;
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
"name": "memoProgram";
|
|
3220
|
+
"isMut": false;
|
|
3221
|
+
"isSigner": false;
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"name": "eventAuthority";
|
|
3225
|
+
"isMut": false;
|
|
3226
|
+
"isSigner": false;
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
"name": "program";
|
|
3230
|
+
"isMut": false;
|
|
3231
|
+
"isSigner": false;
|
|
3232
|
+
}
|
|
3233
|
+
];
|
|
3234
|
+
"args": [
|
|
3235
|
+
{
|
|
3236
|
+
"name": "rewardIndex";
|
|
3237
|
+
"type": "u64";
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
"name": "minBinId";
|
|
3241
|
+
"type": "i32";
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
"name": "maxBinId";
|
|
3245
|
+
"type": "i32";
|
|
3246
|
+
},
|
|
3247
|
+
{
|
|
3248
|
+
"name": "remainingAccountsInfo";
|
|
3249
|
+
"type": {
|
|
3250
|
+
"defined": "RemainingAccountsInfo";
|
|
3251
|
+
};
|
|
3252
|
+
}
|
|
3253
|
+
];
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
"name": "addLiquidity2";
|
|
3257
|
+
"accounts": [
|
|
3258
|
+
{
|
|
3259
|
+
"name": "position";
|
|
3260
|
+
"isMut": true;
|
|
3261
|
+
"isSigner": false;
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
"name": "lbPair";
|
|
3265
|
+
"isMut": true;
|
|
3266
|
+
"isSigner": false;
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
"name": "binArrayBitmapExtension";
|
|
3270
|
+
"isMut": true;
|
|
3271
|
+
"isSigner": false;
|
|
3272
|
+
"isOptional": true;
|
|
3273
|
+
},
|
|
3274
|
+
{
|
|
3275
|
+
"name": "userTokenX";
|
|
3276
|
+
"isMut": true;
|
|
3277
|
+
"isSigner": false;
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
"name": "userTokenY";
|
|
3281
|
+
"isMut": true;
|
|
3282
|
+
"isSigner": false;
|
|
3283
|
+
},
|
|
3284
|
+
{
|
|
3285
|
+
"name": "reserveX";
|
|
3286
|
+
"isMut": true;
|
|
3287
|
+
"isSigner": false;
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
"name": "reserveY";
|
|
3291
|
+
"isMut": true;
|
|
3292
|
+
"isSigner": false;
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
"name": "tokenXMint";
|
|
3296
|
+
"isMut": false;
|
|
3297
|
+
"isSigner": false;
|
|
3298
|
+
},
|
|
3299
|
+
{
|
|
3300
|
+
"name": "tokenYMint";
|
|
3301
|
+
"isMut": false;
|
|
3302
|
+
"isSigner": false;
|
|
3303
|
+
},
|
|
3304
|
+
{
|
|
3305
|
+
"name": "sender";
|
|
3306
|
+
"isMut": false;
|
|
3307
|
+
"isSigner": true;
|
|
3308
|
+
},
|
|
3309
|
+
{
|
|
3310
|
+
"name": "tokenXProgram";
|
|
3311
|
+
"isMut": false;
|
|
3312
|
+
"isSigner": false;
|
|
3313
|
+
},
|
|
3314
|
+
{
|
|
3315
|
+
"name": "tokenYProgram";
|
|
3316
|
+
"isMut": false;
|
|
3317
|
+
"isSigner": false;
|
|
3318
|
+
},
|
|
3319
|
+
{
|
|
3320
|
+
"name": "eventAuthority";
|
|
3321
|
+
"isMut": false;
|
|
3322
|
+
"isSigner": false;
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
"name": "program";
|
|
3326
|
+
"isMut": false;
|
|
3327
|
+
"isSigner": false;
|
|
3328
|
+
}
|
|
3329
|
+
];
|
|
3330
|
+
"args": [
|
|
3331
|
+
{
|
|
3332
|
+
"name": "liquidityParameter";
|
|
3333
|
+
"type": {
|
|
3334
|
+
"defined": "LiquidityParameter";
|
|
3335
|
+
};
|
|
3336
|
+
},
|
|
3337
|
+
{
|
|
3338
|
+
"name": "remainingAccountsInfo";
|
|
3339
|
+
"type": {
|
|
3340
|
+
"defined": "RemainingAccountsInfo";
|
|
3341
|
+
};
|
|
3342
|
+
}
|
|
3343
|
+
];
|
|
3344
|
+
},
|
|
3345
|
+
{
|
|
3346
|
+
"name": "addLiquidityByStrategy2";
|
|
3347
|
+
"accounts": [
|
|
3348
|
+
{
|
|
3349
|
+
"name": "position";
|
|
3350
|
+
"isMut": true;
|
|
3351
|
+
"isSigner": false;
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
"name": "lbPair";
|
|
3355
|
+
"isMut": true;
|
|
3356
|
+
"isSigner": false;
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"name": "binArrayBitmapExtension";
|
|
3360
|
+
"isMut": true;
|
|
3361
|
+
"isSigner": false;
|
|
3362
|
+
"isOptional": true;
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
"name": "userTokenX";
|
|
3366
|
+
"isMut": true;
|
|
3367
|
+
"isSigner": false;
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
"name": "userTokenY";
|
|
3371
|
+
"isMut": true;
|
|
3372
|
+
"isSigner": false;
|
|
3373
|
+
},
|
|
3374
|
+
{
|
|
3375
|
+
"name": "reserveX";
|
|
3376
|
+
"isMut": true;
|
|
3377
|
+
"isSigner": false;
|
|
3378
|
+
},
|
|
3379
|
+
{
|
|
3380
|
+
"name": "reserveY";
|
|
3381
|
+
"isMut": true;
|
|
3382
|
+
"isSigner": false;
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"name": "tokenXMint";
|
|
3386
|
+
"isMut": false;
|
|
3387
|
+
"isSigner": false;
|
|
3388
|
+
},
|
|
3389
|
+
{
|
|
3390
|
+
"name": "tokenYMint";
|
|
3391
|
+
"isMut": false;
|
|
3392
|
+
"isSigner": false;
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
"name": "sender";
|
|
3396
|
+
"isMut": false;
|
|
3397
|
+
"isSigner": true;
|
|
3398
|
+
},
|
|
3399
|
+
{
|
|
3400
|
+
"name": "tokenXProgram";
|
|
3401
|
+
"isMut": false;
|
|
3402
|
+
"isSigner": false;
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
"name": "tokenYProgram";
|
|
3406
|
+
"isMut": false;
|
|
3407
|
+
"isSigner": false;
|
|
3408
|
+
},
|
|
3409
|
+
{
|
|
3410
|
+
"name": "eventAuthority";
|
|
3411
|
+
"isMut": false;
|
|
3412
|
+
"isSigner": false;
|
|
3413
|
+
},
|
|
3414
|
+
{
|
|
3415
|
+
"name": "program";
|
|
3416
|
+
"isMut": false;
|
|
3417
|
+
"isSigner": false;
|
|
3418
|
+
}
|
|
3419
|
+
];
|
|
3420
|
+
"args": [
|
|
3421
|
+
{
|
|
3422
|
+
"name": "liquidityParameter";
|
|
3423
|
+
"type": {
|
|
3424
|
+
"defined": "LiquidityParameterByStrategy";
|
|
3425
|
+
};
|
|
3426
|
+
},
|
|
3427
|
+
{
|
|
3428
|
+
"name": "remainingAccountsInfo";
|
|
3429
|
+
"type": {
|
|
3430
|
+
"defined": "RemainingAccountsInfo";
|
|
3431
|
+
};
|
|
3432
|
+
}
|
|
3433
|
+
];
|
|
3434
|
+
},
|
|
3435
|
+
{
|
|
3436
|
+
"name": "addLiquidityOneSidePrecise2";
|
|
3437
|
+
"accounts": [
|
|
3438
|
+
{
|
|
3439
|
+
"name": "position";
|
|
3440
|
+
"isMut": true;
|
|
3441
|
+
"isSigner": false;
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
"name": "lbPair";
|
|
3445
|
+
"isMut": true;
|
|
3446
|
+
"isSigner": false;
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"name": "binArrayBitmapExtension";
|
|
3450
|
+
"isMut": true;
|
|
3451
|
+
"isSigner": false;
|
|
3452
|
+
"isOptional": true;
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"name": "userToken";
|
|
3456
|
+
"isMut": true;
|
|
3457
|
+
"isSigner": false;
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
"name": "reserve";
|
|
3461
|
+
"isMut": true;
|
|
3462
|
+
"isSigner": false;
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
"name": "tokenMint";
|
|
3466
|
+
"isMut": false;
|
|
3467
|
+
"isSigner": false;
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
"name": "sender";
|
|
3471
|
+
"isMut": false;
|
|
3472
|
+
"isSigner": true;
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"name": "tokenProgram";
|
|
3476
|
+
"isMut": false;
|
|
3477
|
+
"isSigner": false;
|
|
3478
|
+
},
|
|
3479
|
+
{
|
|
3480
|
+
"name": "eventAuthority";
|
|
3481
|
+
"isMut": false;
|
|
3482
|
+
"isSigner": false;
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
"name": "program";
|
|
3486
|
+
"isMut": false;
|
|
3487
|
+
"isSigner": false;
|
|
3488
|
+
}
|
|
3489
|
+
];
|
|
3490
|
+
"args": [
|
|
3491
|
+
{
|
|
3492
|
+
"name": "liquidityParameter";
|
|
3493
|
+
"type": {
|
|
3494
|
+
"defined": "AddLiquiditySingleSidePreciseParameter2";
|
|
3495
|
+
};
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
"name": "remainingAccountsInfo";
|
|
3499
|
+
"type": {
|
|
3500
|
+
"defined": "RemainingAccountsInfo";
|
|
3501
|
+
};
|
|
3502
|
+
}
|
|
3503
|
+
];
|
|
3504
|
+
},
|
|
3505
|
+
{
|
|
3506
|
+
"name": "removeLiquidity2";
|
|
3507
|
+
"accounts": [
|
|
3508
|
+
{
|
|
3509
|
+
"name": "position";
|
|
3510
|
+
"isMut": true;
|
|
3511
|
+
"isSigner": false;
|
|
3512
|
+
},
|
|
3513
|
+
{
|
|
3514
|
+
"name": "lbPair";
|
|
3515
|
+
"isMut": true;
|
|
3516
|
+
"isSigner": false;
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
"name": "binArrayBitmapExtension";
|
|
3520
|
+
"isMut": true;
|
|
3521
|
+
"isSigner": false;
|
|
3522
|
+
"isOptional": true;
|
|
3523
|
+
},
|
|
3524
|
+
{
|
|
3525
|
+
"name": "userTokenX";
|
|
3526
|
+
"isMut": true;
|
|
3527
|
+
"isSigner": false;
|
|
3528
|
+
},
|
|
3529
|
+
{
|
|
3530
|
+
"name": "userTokenY";
|
|
3531
|
+
"isMut": true;
|
|
3532
|
+
"isSigner": false;
|
|
3533
|
+
},
|
|
3534
|
+
{
|
|
3535
|
+
"name": "reserveX";
|
|
3536
|
+
"isMut": true;
|
|
3537
|
+
"isSigner": false;
|
|
3538
|
+
},
|
|
3539
|
+
{
|
|
3540
|
+
"name": "reserveY";
|
|
3541
|
+
"isMut": true;
|
|
3542
|
+
"isSigner": false;
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
"name": "tokenXMint";
|
|
3546
|
+
"isMut": false;
|
|
3547
|
+
"isSigner": false;
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"name": "tokenYMint";
|
|
3551
|
+
"isMut": false;
|
|
3552
|
+
"isSigner": false;
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"name": "sender";
|
|
3556
|
+
"isMut": false;
|
|
3557
|
+
"isSigner": true;
|
|
3558
|
+
},
|
|
3559
|
+
{
|
|
3560
|
+
"name": "tokenXProgram";
|
|
3561
|
+
"isMut": false;
|
|
3562
|
+
"isSigner": false;
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
"name": "tokenYProgram";
|
|
3566
|
+
"isMut": false;
|
|
3567
|
+
"isSigner": false;
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
"name": "memoProgram";
|
|
3571
|
+
"isMut": false;
|
|
3572
|
+
"isSigner": false;
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
"name": "eventAuthority";
|
|
3576
|
+
"isMut": false;
|
|
3577
|
+
"isSigner": false;
|
|
3578
|
+
},
|
|
3579
|
+
{
|
|
3580
|
+
"name": "program";
|
|
3581
|
+
"isMut": false;
|
|
3582
|
+
"isSigner": false;
|
|
3583
|
+
}
|
|
3584
|
+
];
|
|
3585
|
+
"args": [
|
|
3586
|
+
{
|
|
3587
|
+
"name": "binLiquidityRemoval";
|
|
3588
|
+
"type": {
|
|
3589
|
+
"vec": {
|
|
3590
|
+
"defined": "BinLiquidityReduction";
|
|
3591
|
+
};
|
|
3592
|
+
};
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
"name": "remainingAccountsInfo";
|
|
3596
|
+
"type": {
|
|
3597
|
+
"defined": "RemainingAccountsInfo";
|
|
3598
|
+
};
|
|
3599
|
+
}
|
|
3600
|
+
];
|
|
3601
|
+
},
|
|
3602
|
+
{
|
|
3603
|
+
"name": "removeLiquidityByRange2";
|
|
3604
|
+
"accounts": [
|
|
3605
|
+
{
|
|
3606
|
+
"name": "position";
|
|
3607
|
+
"isMut": true;
|
|
3608
|
+
"isSigner": false;
|
|
3609
|
+
},
|
|
3610
|
+
{
|
|
3611
|
+
"name": "lbPair";
|
|
3612
|
+
"isMut": true;
|
|
3613
|
+
"isSigner": false;
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"name": "binArrayBitmapExtension";
|
|
3617
|
+
"isMut": true;
|
|
3618
|
+
"isSigner": false;
|
|
3619
|
+
"isOptional": true;
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
"name": "userTokenX";
|
|
3623
|
+
"isMut": true;
|
|
3624
|
+
"isSigner": false;
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"name": "userTokenY";
|
|
3628
|
+
"isMut": true;
|
|
3629
|
+
"isSigner": false;
|
|
3630
|
+
},
|
|
3631
|
+
{
|
|
3632
|
+
"name": "reserveX";
|
|
3633
|
+
"isMut": true;
|
|
3634
|
+
"isSigner": false;
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"name": "reserveY";
|
|
3638
|
+
"isMut": true;
|
|
3639
|
+
"isSigner": false;
|
|
3640
|
+
},
|
|
3641
|
+
{
|
|
3642
|
+
"name": "tokenXMint";
|
|
3643
|
+
"isMut": false;
|
|
3644
|
+
"isSigner": false;
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
"name": "tokenYMint";
|
|
3648
|
+
"isMut": false;
|
|
3649
|
+
"isSigner": false;
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
"name": "sender";
|
|
3653
|
+
"isMut": false;
|
|
3654
|
+
"isSigner": true;
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"name": "tokenXProgram";
|
|
3658
|
+
"isMut": false;
|
|
3659
|
+
"isSigner": false;
|
|
3660
|
+
},
|
|
3661
|
+
{
|
|
3662
|
+
"name": "tokenYProgram";
|
|
3663
|
+
"isMut": false;
|
|
3664
|
+
"isSigner": false;
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"name": "memoProgram";
|
|
3668
|
+
"isMut": false;
|
|
3669
|
+
"isSigner": false;
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
"name": "eventAuthority";
|
|
3673
|
+
"isMut": false;
|
|
3674
|
+
"isSigner": false;
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "program";
|
|
3678
|
+
"isMut": false;
|
|
3679
|
+
"isSigner": false;
|
|
3680
|
+
}
|
|
3681
|
+
];
|
|
3682
|
+
"args": [
|
|
3683
|
+
{
|
|
3684
|
+
"name": "fromBinId";
|
|
3685
|
+
"type": "i32";
|
|
3686
|
+
},
|
|
3687
|
+
{
|
|
3688
|
+
"name": "toBinId";
|
|
3689
|
+
"type": "i32";
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
"name": "bpsToRemove";
|
|
3693
|
+
"type": "u16";
|
|
3694
|
+
},
|
|
3695
|
+
{
|
|
3696
|
+
"name": "remainingAccountsInfo";
|
|
3697
|
+
"type": {
|
|
3698
|
+
"defined": "RemainingAccountsInfo";
|
|
3699
|
+
};
|
|
3700
|
+
}
|
|
3701
|
+
];
|
|
3702
|
+
},
|
|
3703
|
+
{
|
|
3704
|
+
"name": "swap2";
|
|
3705
|
+
"accounts": [
|
|
3706
|
+
{
|
|
3707
|
+
"name": "lbPair";
|
|
3708
|
+
"isMut": true;
|
|
3709
|
+
"isSigner": false;
|
|
3710
|
+
},
|
|
3711
|
+
{
|
|
3712
|
+
"name": "binArrayBitmapExtension";
|
|
3713
|
+
"isMut": false;
|
|
3714
|
+
"isSigner": false;
|
|
3715
|
+
"isOptional": true;
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
"name": "reserveX";
|
|
3719
|
+
"isMut": true;
|
|
3720
|
+
"isSigner": false;
|
|
3721
|
+
},
|
|
3722
|
+
{
|
|
3723
|
+
"name": "reserveY";
|
|
3724
|
+
"isMut": true;
|
|
3725
|
+
"isSigner": false;
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"name": "userTokenIn";
|
|
3729
|
+
"isMut": true;
|
|
3730
|
+
"isSigner": false;
|
|
3731
|
+
},
|
|
3732
|
+
{
|
|
3733
|
+
"name": "userTokenOut";
|
|
3734
|
+
"isMut": true;
|
|
3735
|
+
"isSigner": false;
|
|
3736
|
+
},
|
|
3737
|
+
{
|
|
3738
|
+
"name": "tokenXMint";
|
|
3739
|
+
"isMut": false;
|
|
3740
|
+
"isSigner": false;
|
|
3741
|
+
},
|
|
3742
|
+
{
|
|
3743
|
+
"name": "tokenYMint";
|
|
3744
|
+
"isMut": false;
|
|
3745
|
+
"isSigner": false;
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"name": "oracle";
|
|
3749
|
+
"isMut": true;
|
|
3750
|
+
"isSigner": false;
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "hostFeeIn";
|
|
3754
|
+
"isMut": true;
|
|
3755
|
+
"isSigner": false;
|
|
3756
|
+
"isOptional": true;
|
|
3757
|
+
},
|
|
3758
|
+
{
|
|
3759
|
+
"name": "user";
|
|
3760
|
+
"isMut": false;
|
|
3761
|
+
"isSigner": true;
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
"name": "tokenXProgram";
|
|
3765
|
+
"isMut": false;
|
|
3766
|
+
"isSigner": false;
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
"name": "tokenYProgram";
|
|
3770
|
+
"isMut": false;
|
|
3771
|
+
"isSigner": false;
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
"name": "memoProgram";
|
|
3775
|
+
"isMut": false;
|
|
3776
|
+
"isSigner": false;
|
|
3777
|
+
},
|
|
3778
|
+
{
|
|
3779
|
+
"name": "eventAuthority";
|
|
3780
|
+
"isMut": false;
|
|
3781
|
+
"isSigner": false;
|
|
3782
|
+
},
|
|
3783
|
+
{
|
|
3784
|
+
"name": "program";
|
|
3785
|
+
"isMut": false;
|
|
3786
|
+
"isSigner": false;
|
|
3787
|
+
}
|
|
3788
|
+
];
|
|
3789
|
+
"args": [
|
|
3790
|
+
{
|
|
3791
|
+
"name": "amountIn";
|
|
3792
|
+
"type": "u64";
|
|
3793
|
+
},
|
|
3794
|
+
{
|
|
3795
|
+
"name": "minAmountOut";
|
|
3796
|
+
"type": "u64";
|
|
3797
|
+
},
|
|
3798
|
+
{
|
|
3799
|
+
"name": "remainingAccountsInfo";
|
|
3800
|
+
"type": {
|
|
3801
|
+
"defined": "RemainingAccountsInfo";
|
|
3802
|
+
};
|
|
3803
|
+
}
|
|
3804
|
+
];
|
|
3805
|
+
},
|
|
3806
|
+
{
|
|
3807
|
+
"name": "swapExactOut2";
|
|
3808
|
+
"accounts": [
|
|
3809
|
+
{
|
|
3810
|
+
"name": "lbPair";
|
|
3811
|
+
"isMut": true;
|
|
3812
|
+
"isSigner": false;
|
|
3813
|
+
},
|
|
3814
|
+
{
|
|
3815
|
+
"name": "binArrayBitmapExtension";
|
|
3816
|
+
"isMut": false;
|
|
3817
|
+
"isSigner": false;
|
|
3818
|
+
"isOptional": true;
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
"name": "reserveX";
|
|
3822
|
+
"isMut": true;
|
|
3823
|
+
"isSigner": false;
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
"name": "reserveY";
|
|
3827
|
+
"isMut": true;
|
|
3828
|
+
"isSigner": false;
|
|
3829
|
+
},
|
|
3830
|
+
{
|
|
3831
|
+
"name": "userTokenIn";
|
|
3832
|
+
"isMut": true;
|
|
3833
|
+
"isSigner": false;
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"name": "userTokenOut";
|
|
3837
|
+
"isMut": true;
|
|
3838
|
+
"isSigner": false;
|
|
3839
|
+
},
|
|
3840
|
+
{
|
|
3841
|
+
"name": "tokenXMint";
|
|
3842
|
+
"isMut": false;
|
|
3843
|
+
"isSigner": false;
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
"name": "tokenYMint";
|
|
3847
|
+
"isMut": false;
|
|
3848
|
+
"isSigner": false;
|
|
3849
|
+
},
|
|
3850
|
+
{
|
|
3851
|
+
"name": "oracle";
|
|
3852
|
+
"isMut": true;
|
|
3853
|
+
"isSigner": false;
|
|
3854
|
+
},
|
|
3855
|
+
{
|
|
3856
|
+
"name": "hostFeeIn";
|
|
3857
|
+
"isMut": true;
|
|
3858
|
+
"isSigner": false;
|
|
3859
|
+
"isOptional": true;
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
"name": "user";
|
|
3863
|
+
"isMut": false;
|
|
3864
|
+
"isSigner": true;
|
|
3865
|
+
},
|
|
3866
|
+
{
|
|
3867
|
+
"name": "tokenXProgram";
|
|
3868
|
+
"isMut": false;
|
|
3869
|
+
"isSigner": false;
|
|
3870
|
+
},
|
|
3871
|
+
{
|
|
3872
|
+
"name": "tokenYProgram";
|
|
3873
|
+
"isMut": false;
|
|
3874
|
+
"isSigner": false;
|
|
3875
|
+
},
|
|
3876
|
+
{
|
|
3877
|
+
"name": "memoProgram";
|
|
3878
|
+
"isMut": false;
|
|
3879
|
+
"isSigner": false;
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
"name": "eventAuthority";
|
|
3883
|
+
"isMut": false;
|
|
3884
|
+
"isSigner": false;
|
|
3885
|
+
},
|
|
3886
|
+
{
|
|
3887
|
+
"name": "program";
|
|
3888
|
+
"isMut": false;
|
|
3889
|
+
"isSigner": false;
|
|
3890
|
+
}
|
|
3891
|
+
];
|
|
3892
|
+
"args": [
|
|
3893
|
+
{
|
|
3894
|
+
"name": "maxInAmount";
|
|
3895
|
+
"type": "u64";
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
"name": "outAmount";
|
|
3899
|
+
"type": "u64";
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
"name": "remainingAccountsInfo";
|
|
3903
|
+
"type": {
|
|
3904
|
+
"defined": "RemainingAccountsInfo";
|
|
3905
|
+
};
|
|
3906
|
+
}
|
|
3907
|
+
];
|
|
3908
|
+
},
|
|
3909
|
+
{
|
|
3910
|
+
"name": "swapWithPriceImpact2";
|
|
3911
|
+
"accounts": [
|
|
3912
|
+
{
|
|
3913
|
+
"name": "lbPair";
|
|
3914
|
+
"isMut": true;
|
|
3915
|
+
"isSigner": false;
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
"name": "binArrayBitmapExtension";
|
|
3919
|
+
"isMut": false;
|
|
3920
|
+
"isSigner": false;
|
|
3921
|
+
"isOptional": true;
|
|
3922
|
+
},
|
|
3923
|
+
{
|
|
3924
|
+
"name": "reserveX";
|
|
3925
|
+
"isMut": true;
|
|
3926
|
+
"isSigner": false;
|
|
3927
|
+
},
|
|
3928
|
+
{
|
|
3929
|
+
"name": "reserveY";
|
|
3930
|
+
"isMut": true;
|
|
3931
|
+
"isSigner": false;
|
|
3932
|
+
},
|
|
3933
|
+
{
|
|
3934
|
+
"name": "userTokenIn";
|
|
3935
|
+
"isMut": true;
|
|
3936
|
+
"isSigner": false;
|
|
3937
|
+
},
|
|
3938
|
+
{
|
|
3939
|
+
"name": "userTokenOut";
|
|
3940
|
+
"isMut": true;
|
|
3941
|
+
"isSigner": false;
|
|
3942
|
+
},
|
|
3943
|
+
{
|
|
3944
|
+
"name": "tokenXMint";
|
|
3945
|
+
"isMut": false;
|
|
3946
|
+
"isSigner": false;
|
|
3947
|
+
},
|
|
3948
|
+
{
|
|
3949
|
+
"name": "tokenYMint";
|
|
3950
|
+
"isMut": false;
|
|
3951
|
+
"isSigner": false;
|
|
3952
|
+
},
|
|
3953
|
+
{
|
|
3954
|
+
"name": "oracle";
|
|
3955
|
+
"isMut": true;
|
|
3956
|
+
"isSigner": false;
|
|
3957
|
+
},
|
|
3958
|
+
{
|
|
3959
|
+
"name": "hostFeeIn";
|
|
3960
|
+
"isMut": true;
|
|
3961
|
+
"isSigner": false;
|
|
3962
|
+
"isOptional": true;
|
|
3963
|
+
},
|
|
3964
|
+
{
|
|
3965
|
+
"name": "user";
|
|
3966
|
+
"isMut": false;
|
|
3967
|
+
"isSigner": true;
|
|
3968
|
+
},
|
|
3969
|
+
{
|
|
3970
|
+
"name": "tokenXProgram";
|
|
3971
|
+
"isMut": false;
|
|
3972
|
+
"isSigner": false;
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
"name": "tokenYProgram";
|
|
3976
|
+
"isMut": false;
|
|
3977
|
+
"isSigner": false;
|
|
3978
|
+
},
|
|
3979
|
+
{
|
|
3980
|
+
"name": "memoProgram";
|
|
3981
|
+
"isMut": false;
|
|
3982
|
+
"isSigner": false;
|
|
3983
|
+
},
|
|
3984
|
+
{
|
|
3985
|
+
"name": "eventAuthority";
|
|
3986
|
+
"isMut": false;
|
|
3987
|
+
"isSigner": false;
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
"name": "program";
|
|
3991
|
+
"isMut": false;
|
|
3992
|
+
"isSigner": false;
|
|
3993
|
+
}
|
|
3994
|
+
];
|
|
3995
|
+
"args": [
|
|
3996
|
+
{
|
|
3997
|
+
"name": "amountIn";
|
|
3998
|
+
"type": "u64";
|
|
3999
|
+
},
|
|
4000
|
+
{
|
|
4001
|
+
"name": "activeId";
|
|
4002
|
+
"type": {
|
|
4003
|
+
"option": "i32";
|
|
4004
|
+
};
|
|
4005
|
+
},
|
|
4006
|
+
{
|
|
4007
|
+
"name": "maxPriceImpactBps";
|
|
4008
|
+
"type": "u16";
|
|
4009
|
+
},
|
|
4010
|
+
{
|
|
4011
|
+
"name": "remainingAccountsInfo";
|
|
4012
|
+
"type": {
|
|
4013
|
+
"defined": "RemainingAccountsInfo";
|
|
4014
|
+
};
|
|
4015
|
+
}
|
|
4016
|
+
];
|
|
4017
|
+
},
|
|
4018
|
+
{
|
|
4019
|
+
"name": "closePosition2";
|
|
4020
|
+
"accounts": [
|
|
4021
|
+
{
|
|
4022
|
+
"name": "position";
|
|
4023
|
+
"isMut": true;
|
|
4024
|
+
"isSigner": false;
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
"name": "sender";
|
|
4028
|
+
"isMut": false;
|
|
4029
|
+
"isSigner": true;
|
|
4030
|
+
},
|
|
4031
|
+
{
|
|
4032
|
+
"name": "rentReceiver";
|
|
4033
|
+
"isMut": true;
|
|
4034
|
+
"isSigner": false;
|
|
4035
|
+
},
|
|
4036
|
+
{
|
|
4037
|
+
"name": "eventAuthority";
|
|
4038
|
+
"isMut": false;
|
|
4039
|
+
"isSigner": false;
|
|
4040
|
+
},
|
|
4041
|
+
{
|
|
4042
|
+
"name": "program";
|
|
4043
|
+
"isMut": false;
|
|
4044
|
+
"isSigner": false;
|
|
4045
|
+
}
|
|
4046
|
+
];
|
|
4047
|
+
"args": [];
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"name": "updateFeesAndReward2";
|
|
4051
|
+
"accounts": [
|
|
4052
|
+
{
|
|
4053
|
+
"name": "position";
|
|
4054
|
+
"isMut": true;
|
|
4055
|
+
"isSigner": false;
|
|
4056
|
+
},
|
|
4057
|
+
{
|
|
4058
|
+
"name": "lbPair";
|
|
4059
|
+
"isMut": true;
|
|
4060
|
+
"isSigner": false;
|
|
4061
|
+
},
|
|
4062
|
+
{
|
|
4063
|
+
"name": "owner";
|
|
4064
|
+
"isMut": false;
|
|
4065
|
+
"isSigner": true;
|
|
4066
|
+
}
|
|
4067
|
+
];
|
|
4068
|
+
"args": [
|
|
4069
|
+
{
|
|
4070
|
+
"name": "minBinId";
|
|
4071
|
+
"type": "i32";
|
|
4072
|
+
},
|
|
4073
|
+
{
|
|
4074
|
+
"name": "maxBinId";
|
|
4075
|
+
"type": "i32";
|
|
4076
|
+
}
|
|
4077
|
+
];
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
"name": "closePositionIfEmpty";
|
|
4081
|
+
"accounts": [
|
|
4082
|
+
{
|
|
4083
|
+
"name": "position";
|
|
4084
|
+
"isMut": true;
|
|
4085
|
+
"isSigner": false;
|
|
4086
|
+
},
|
|
4087
|
+
{
|
|
4088
|
+
"name": "sender";
|
|
4089
|
+
"isMut": false;
|
|
4090
|
+
"isSigner": true;
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
"name": "rentReceiver";
|
|
4094
|
+
"isMut": true;
|
|
4095
|
+
"isSigner": false;
|
|
4096
|
+
},
|
|
4097
|
+
{
|
|
4098
|
+
"name": "eventAuthority";
|
|
4099
|
+
"isMut": false;
|
|
4100
|
+
"isSigner": false;
|
|
4101
|
+
},
|
|
4102
|
+
{
|
|
4103
|
+
"name": "program";
|
|
4104
|
+
"isMut": false;
|
|
4105
|
+
"isSigner": false;
|
|
4106
|
+
}
|
|
4107
|
+
];
|
|
4108
|
+
"args": [];
|
|
4109
|
+
}
|
|
4110
|
+
];
|
|
4111
|
+
"accounts": [
|
|
4112
|
+
{
|
|
4113
|
+
"name": "binArrayBitmapExtension";
|
|
4114
|
+
"type": {
|
|
4115
|
+
"kind": "struct";
|
|
4116
|
+
"fields": [
|
|
4117
|
+
{
|
|
4118
|
+
"name": "lbPair";
|
|
4119
|
+
"type": "publicKey";
|
|
4120
|
+
},
|
|
4121
|
+
{
|
|
4122
|
+
"name": "positiveBinArrayBitmap";
|
|
4123
|
+
"docs": [
|
|
4124
|
+
"Packed initialized bin array state for start_bin_index is positive"
|
|
4125
|
+
];
|
|
4126
|
+
"type": {
|
|
4127
|
+
"array": [
|
|
4128
|
+
{
|
|
4129
|
+
"array": [
|
|
4130
|
+
"u64",
|
|
4131
|
+
8
|
|
4132
|
+
];
|
|
4133
|
+
},
|
|
4134
|
+
12
|
|
4135
|
+
];
|
|
4136
|
+
};
|
|
4137
|
+
},
|
|
4138
|
+
{
|
|
4139
|
+
"name": "negativeBinArrayBitmap";
|
|
4140
|
+
"docs": [
|
|
4141
|
+
"Packed initialized bin array state for start_bin_index is negative"
|
|
4142
|
+
];
|
|
4143
|
+
"type": {
|
|
4144
|
+
"array": [
|
|
4145
|
+
{
|
|
4146
|
+
"array": [
|
|
4147
|
+
"u64",
|
|
4148
|
+
8
|
|
4149
|
+
];
|
|
4150
|
+
},
|
|
4151
|
+
12
|
|
4152
|
+
];
|
|
4153
|
+
};
|
|
4154
|
+
}
|
|
4155
|
+
];
|
|
4156
|
+
};
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
"name": "binArray";
|
|
4160
|
+
"docs": [
|
|
4161
|
+
"An account to contain a range of bin. For example: Bin 100 <-> 200.",
|
|
4162
|
+
"For example:",
|
|
4163
|
+
"BinArray index: 0 contains bin 0 <-> 599",
|
|
4164
|
+
"index: 2 contains bin 600 <-> 1199, ..."
|
|
4165
|
+
];
|
|
4166
|
+
"type": {
|
|
4167
|
+
"kind": "struct";
|
|
4168
|
+
"fields": [
|
|
4169
|
+
{
|
|
4170
|
+
"name": "index";
|
|
4171
|
+
"type": "i64";
|
|
4172
|
+
},
|
|
4173
|
+
{
|
|
4174
|
+
"name": "version";
|
|
4175
|
+
"docs": [
|
|
4176
|
+
"Version of binArray"
|
|
4177
|
+
];
|
|
4178
|
+
"type": "u8";
|
|
4179
|
+
},
|
|
4180
|
+
{
|
|
4181
|
+
"name": "padding";
|
|
4182
|
+
"type": {
|
|
4183
|
+
"array": [
|
|
4184
|
+
"u8",
|
|
4185
|
+
7
|
|
4186
|
+
];
|
|
4187
|
+
};
|
|
4188
|
+
},
|
|
4189
|
+
{
|
|
4190
|
+
"name": "lbPair";
|
|
4191
|
+
"type": "publicKey";
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
"name": "bins";
|
|
4195
|
+
"type": {
|
|
4196
|
+
"array": [
|
|
4197
|
+
{
|
|
4198
|
+
"defined": "Bin";
|
|
4199
|
+
},
|
|
4200
|
+
70
|
|
4201
|
+
];
|
|
4202
|
+
};
|
|
4203
|
+
}
|
|
4204
|
+
];
|
|
4205
|
+
};
|
|
4206
|
+
},
|
|
4207
|
+
{
|
|
4208
|
+
"name": "claimFeeOperator";
|
|
4209
|
+
"docs": [
|
|
4210
|
+
"Parameter that set by the protocol"
|
|
4211
|
+
];
|
|
4212
|
+
"type": {
|
|
4213
|
+
"kind": "struct";
|
|
4214
|
+
"fields": [
|
|
4215
|
+
{
|
|
4216
|
+
"name": "operator";
|
|
4217
|
+
"docs": [
|
|
4218
|
+
"operator"
|
|
4219
|
+
];
|
|
4220
|
+
"type": "publicKey";
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
"name": "padding";
|
|
4224
|
+
"docs": [
|
|
4225
|
+
"Reserve"
|
|
4226
|
+
];
|
|
4227
|
+
"type": {
|
|
4228
|
+
"array": [
|
|
4229
|
+
"u8",
|
|
4230
|
+
128
|
|
4231
|
+
];
|
|
4232
|
+
};
|
|
4233
|
+
}
|
|
4234
|
+
];
|
|
4235
|
+
};
|
|
4236
|
+
},
|
|
4237
|
+
{
|
|
4238
|
+
"name": "lbPair";
|
|
4239
|
+
"type": {
|
|
4240
|
+
"kind": "struct";
|
|
4241
|
+
"fields": [
|
|
4242
|
+
{
|
|
4243
|
+
"name": "parameters";
|
|
4244
|
+
"type": {
|
|
4245
|
+
"defined": "StaticParameters";
|
|
4246
|
+
};
|
|
4247
|
+
},
|
|
4248
|
+
{
|
|
2716
4249
|
"name": "vParameters";
|
|
2717
4250
|
"type": {
|
|
2718
4251
|
"defined": "VariableParameters";
|
|
@@ -2794,9 +4327,9 @@ type LbClmm = {
|
|
|
2794
4327
|
"type": "u8";
|
|
2795
4328
|
},
|
|
2796
4329
|
{
|
|
2797
|
-
"name": "
|
|
4330
|
+
"name": "creatorPoolOnOffControl";
|
|
2798
4331
|
"docs": [
|
|
2799
|
-
"
|
|
4332
|
+
"Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type."
|
|
2800
4333
|
];
|
|
2801
4334
|
"type": "u8";
|
|
2802
4335
|
},
|
|
@@ -2955,6 +4488,20 @@ type LbClmm = {
|
|
|
2955
4488
|
];
|
|
2956
4489
|
"type": "publicKey";
|
|
2957
4490
|
},
|
|
4491
|
+
{
|
|
4492
|
+
"name": "tokenMintXProgramFlag";
|
|
4493
|
+
"docs": [
|
|
4494
|
+
"token_mint_x_program_flag"
|
|
4495
|
+
];
|
|
4496
|
+
"type": "u8";
|
|
4497
|
+
},
|
|
4498
|
+
{
|
|
4499
|
+
"name": "tokenMintYProgramFlag";
|
|
4500
|
+
"docs": [
|
|
4501
|
+
"token_mint_y_program_flag"
|
|
4502
|
+
];
|
|
4503
|
+
"type": "u8";
|
|
4504
|
+
},
|
|
2958
4505
|
{
|
|
2959
4506
|
"name": "reserved";
|
|
2960
4507
|
"docs": [
|
|
@@ -2963,7 +4510,7 @@ type LbClmm = {
|
|
|
2963
4510
|
"type": {
|
|
2964
4511
|
"array": [
|
|
2965
4512
|
"u8",
|
|
2966
|
-
|
|
4513
|
+
22
|
|
2967
4514
|
];
|
|
2968
4515
|
};
|
|
2969
4516
|
}
|
|
@@ -3210,70 +4757,281 @@ type LbClmm = {
|
|
|
3210
4757
|
{
|
|
3211
4758
|
"name": "totalClaimedFeeYAmount";
|
|
3212
4759
|
"docs": [
|
|
3213
|
-
"Total claimed token fee Y"
|
|
4760
|
+
"Total claimed token fee Y"
|
|
4761
|
+
];
|
|
4762
|
+
"type": "u64";
|
|
4763
|
+
},
|
|
4764
|
+
{
|
|
4765
|
+
"name": "totalClaimedRewards";
|
|
4766
|
+
"docs": [
|
|
4767
|
+
"Total claimed rewards"
|
|
4768
|
+
];
|
|
4769
|
+
"type": {
|
|
4770
|
+
"array": [
|
|
4771
|
+
"u64",
|
|
4772
|
+
2
|
|
4773
|
+
];
|
|
4774
|
+
};
|
|
4775
|
+
},
|
|
4776
|
+
{
|
|
4777
|
+
"name": "operator";
|
|
4778
|
+
"docs": [
|
|
4779
|
+
"Operator of position"
|
|
4780
|
+
];
|
|
4781
|
+
"type": "publicKey";
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
"name": "lockReleasePoint";
|
|
4785
|
+
"docs": [
|
|
4786
|
+
"Time point which the locked liquidity can be withdraw"
|
|
4787
|
+
];
|
|
4788
|
+
"type": "u64";
|
|
4789
|
+
},
|
|
4790
|
+
{
|
|
4791
|
+
"name": "padding0";
|
|
4792
|
+
"docs": [
|
|
4793
|
+
"_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!"
|
|
4794
|
+
];
|
|
4795
|
+
"type": "u8";
|
|
4796
|
+
},
|
|
4797
|
+
{
|
|
4798
|
+
"name": "feeOwner";
|
|
4799
|
+
"docs": [
|
|
4800
|
+
"Address is able to claim fee in this position, only valid for bootstrap_liquidity_position"
|
|
4801
|
+
];
|
|
4802
|
+
"type": "publicKey";
|
|
4803
|
+
},
|
|
4804
|
+
{
|
|
4805
|
+
"name": "reserved";
|
|
4806
|
+
"docs": [
|
|
4807
|
+
"Reserved space for future use"
|
|
4808
|
+
];
|
|
4809
|
+
"type": {
|
|
4810
|
+
"array": [
|
|
4811
|
+
"u8",
|
|
4812
|
+
87
|
|
4813
|
+
];
|
|
4814
|
+
};
|
|
4815
|
+
}
|
|
4816
|
+
];
|
|
4817
|
+
};
|
|
4818
|
+
},
|
|
4819
|
+
{
|
|
4820
|
+
"name": "presetParameter2";
|
|
4821
|
+
"type": {
|
|
4822
|
+
"kind": "struct";
|
|
4823
|
+
"fields": [
|
|
4824
|
+
{
|
|
4825
|
+
"name": "binStep";
|
|
4826
|
+
"docs": [
|
|
4827
|
+
"Bin step. Represent the price increment / decrement."
|
|
4828
|
+
];
|
|
4829
|
+
"type": "u16";
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
"name": "baseFactor";
|
|
4833
|
+
"docs": [
|
|
4834
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
4835
|
+
];
|
|
4836
|
+
"type": "u16";
|
|
4837
|
+
},
|
|
4838
|
+
{
|
|
4839
|
+
"name": "filterPeriod";
|
|
4840
|
+
"docs": [
|
|
4841
|
+
"Filter period determine high frequency trading time window."
|
|
4842
|
+
];
|
|
4843
|
+
"type": "u16";
|
|
4844
|
+
},
|
|
4845
|
+
{
|
|
4846
|
+
"name": "decayPeriod";
|
|
4847
|
+
"docs": [
|
|
4848
|
+
"Decay period determine when the volatile fee start decay / decrease."
|
|
4849
|
+
];
|
|
4850
|
+
"type": "u16";
|
|
4851
|
+
},
|
|
4852
|
+
{
|
|
4853
|
+
"name": "variableFeeControl";
|
|
4854
|
+
"docs": [
|
|
4855
|
+
"Used to scale the variable fee component depending on the dynamic of the market"
|
|
4856
|
+
];
|
|
4857
|
+
"type": "u32";
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
"name": "maxVolatilityAccumulator";
|
|
4861
|
+
"docs": [
|
|
4862
|
+
"Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
|
|
4863
|
+
];
|
|
4864
|
+
"type": "u32";
|
|
4865
|
+
},
|
|
4866
|
+
{
|
|
4867
|
+
"name": "reductionFactor";
|
|
4868
|
+
"docs": [
|
|
4869
|
+
"Reduction factor controls the volatile fee rate decrement rate."
|
|
4870
|
+
];
|
|
4871
|
+
"type": "u16";
|
|
4872
|
+
},
|
|
4873
|
+
{
|
|
4874
|
+
"name": "protocolShare";
|
|
4875
|
+
"docs": [
|
|
4876
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
4877
|
+
];
|
|
4878
|
+
"type": "u16";
|
|
4879
|
+
},
|
|
4880
|
+
{
|
|
4881
|
+
"name": "index";
|
|
4882
|
+
"docs": [
|
|
4883
|
+
"index"
|
|
4884
|
+
];
|
|
4885
|
+
"type": "u16";
|
|
4886
|
+
},
|
|
4887
|
+
{
|
|
4888
|
+
"name": "baseFeePowerFactor";
|
|
4889
|
+
"docs": [
|
|
4890
|
+
"Base fee power factor"
|
|
4891
|
+
];
|
|
4892
|
+
"type": "u8";
|
|
4893
|
+
},
|
|
4894
|
+
{
|
|
4895
|
+
"name": "padding0";
|
|
4896
|
+
"docs": [
|
|
4897
|
+
"Padding 0 for future use"
|
|
4898
|
+
];
|
|
4899
|
+
"type": "u8";
|
|
4900
|
+
},
|
|
4901
|
+
{
|
|
4902
|
+
"name": "padding1";
|
|
4903
|
+
"docs": [
|
|
4904
|
+
"Padding 1 for future use"
|
|
4905
|
+
];
|
|
4906
|
+
"type": {
|
|
4907
|
+
"array": [
|
|
4908
|
+
"u64",
|
|
4909
|
+
20
|
|
4910
|
+
];
|
|
4911
|
+
};
|
|
4912
|
+
}
|
|
4913
|
+
];
|
|
4914
|
+
};
|
|
4915
|
+
},
|
|
4916
|
+
{
|
|
4917
|
+
"name": "presetParameter";
|
|
4918
|
+
"type": {
|
|
4919
|
+
"kind": "struct";
|
|
4920
|
+
"fields": [
|
|
4921
|
+
{
|
|
4922
|
+
"name": "binStep";
|
|
4923
|
+
"docs": [
|
|
4924
|
+
"Bin step. Represent the price increment / decrement."
|
|
4925
|
+
];
|
|
4926
|
+
"type": "u16";
|
|
4927
|
+
},
|
|
4928
|
+
{
|
|
4929
|
+
"name": "baseFactor";
|
|
4930
|
+
"docs": [
|
|
4931
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
4932
|
+
];
|
|
4933
|
+
"type": "u16";
|
|
4934
|
+
},
|
|
4935
|
+
{
|
|
4936
|
+
"name": "filterPeriod";
|
|
4937
|
+
"docs": [
|
|
4938
|
+
"Filter period determine high frequency trading time window."
|
|
4939
|
+
];
|
|
4940
|
+
"type": "u16";
|
|
4941
|
+
},
|
|
4942
|
+
{
|
|
4943
|
+
"name": "decayPeriod";
|
|
4944
|
+
"docs": [
|
|
4945
|
+
"Decay period determine when the volatile fee start decay / decrease."
|
|
4946
|
+
];
|
|
4947
|
+
"type": "u16";
|
|
4948
|
+
},
|
|
4949
|
+
{
|
|
4950
|
+
"name": "reductionFactor";
|
|
4951
|
+
"docs": [
|
|
4952
|
+
"Reduction factor controls the volatile fee rate decrement rate."
|
|
4953
|
+
];
|
|
4954
|
+
"type": "u16";
|
|
4955
|
+
},
|
|
4956
|
+
{
|
|
4957
|
+
"name": "variableFeeControl";
|
|
4958
|
+
"docs": [
|
|
4959
|
+
"Used to scale the variable fee component depending on the dynamic of the market"
|
|
3214
4960
|
];
|
|
3215
|
-
"type": "
|
|
4961
|
+
"type": "u32";
|
|
3216
4962
|
},
|
|
3217
4963
|
{
|
|
3218
|
-
"name": "
|
|
4964
|
+
"name": "maxVolatilityAccumulator";
|
|
3219
4965
|
"docs": [
|
|
3220
|
-
"
|
|
4966
|
+
"Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
|
|
3221
4967
|
];
|
|
3222
|
-
"type":
|
|
3223
|
-
"array": [
|
|
3224
|
-
"u64",
|
|
3225
|
-
2
|
|
3226
|
-
];
|
|
3227
|
-
};
|
|
4968
|
+
"type": "u32";
|
|
3228
4969
|
},
|
|
3229
4970
|
{
|
|
3230
|
-
"name": "
|
|
4971
|
+
"name": "minBinId";
|
|
3231
4972
|
"docs": [
|
|
3232
|
-
"
|
|
4973
|
+
"Min bin id supported by the pool based on the configured bin step."
|
|
3233
4974
|
];
|
|
3234
|
-
"type": "
|
|
4975
|
+
"type": "i32";
|
|
3235
4976
|
},
|
|
3236
4977
|
{
|
|
3237
|
-
"name": "
|
|
4978
|
+
"name": "maxBinId";
|
|
3238
4979
|
"docs": [
|
|
3239
|
-
"
|
|
4980
|
+
"Max bin id supported by the pool based on the configured bin step."
|
|
3240
4981
|
];
|
|
3241
|
-
"type": "
|
|
4982
|
+
"type": "i32";
|
|
3242
4983
|
},
|
|
3243
4984
|
{
|
|
3244
|
-
"name": "
|
|
4985
|
+
"name": "protocolShare";
|
|
3245
4986
|
"docs": [
|
|
3246
|
-
"
|
|
4987
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
3247
4988
|
];
|
|
3248
|
-
"type": "
|
|
3249
|
-
}
|
|
4989
|
+
"type": "u16";
|
|
4990
|
+
}
|
|
4991
|
+
];
|
|
4992
|
+
};
|
|
4993
|
+
},
|
|
4994
|
+
{
|
|
4995
|
+
"name": "tokenBadge";
|
|
4996
|
+
"docs": [
|
|
4997
|
+
"Parameter that set by the protocol"
|
|
4998
|
+
];
|
|
4999
|
+
"type": {
|
|
5000
|
+
"kind": "struct";
|
|
5001
|
+
"fields": [
|
|
3250
5002
|
{
|
|
3251
|
-
"name": "
|
|
5003
|
+
"name": "tokenMint";
|
|
3252
5004
|
"docs": [
|
|
3253
|
-
"
|
|
5005
|
+
"token mint"
|
|
3254
5006
|
];
|
|
3255
5007
|
"type": "publicKey";
|
|
3256
5008
|
},
|
|
3257
5009
|
{
|
|
3258
|
-
"name": "
|
|
5010
|
+
"name": "padding";
|
|
3259
5011
|
"docs": [
|
|
3260
|
-
"
|
|
5012
|
+
"Reserve"
|
|
3261
5013
|
];
|
|
3262
5014
|
"type": {
|
|
3263
5015
|
"array": [
|
|
3264
5016
|
"u8",
|
|
3265
|
-
|
|
5017
|
+
128
|
|
3266
5018
|
];
|
|
3267
5019
|
};
|
|
3268
5020
|
}
|
|
3269
5021
|
];
|
|
3270
5022
|
};
|
|
3271
|
-
}
|
|
5023
|
+
}
|
|
5024
|
+
];
|
|
5025
|
+
"types": [
|
|
3272
5026
|
{
|
|
3273
|
-
"name": "
|
|
5027
|
+
"name": "InitPresetParameters2Ix";
|
|
3274
5028
|
"type": {
|
|
3275
5029
|
"kind": "struct";
|
|
3276
5030
|
"fields": [
|
|
5031
|
+
{
|
|
5032
|
+
"name": "index";
|
|
5033
|
+
"type": "u16";
|
|
5034
|
+
},
|
|
3277
5035
|
{
|
|
3278
5036
|
"name": "binStep";
|
|
3279
5037
|
"docs": [
|
|
@@ -3284,7 +5042,7 @@ type LbClmm = {
|
|
|
3284
5042
|
{
|
|
3285
5043
|
"name": "baseFactor";
|
|
3286
5044
|
"docs": [
|
|
3287
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5045
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
3288
5046
|
];
|
|
3289
5047
|
"type": "u16";
|
|
3290
5048
|
},
|
|
@@ -3324,31 +5082,22 @@ type LbClmm = {
|
|
|
3324
5082
|
"type": "u32";
|
|
3325
5083
|
},
|
|
3326
5084
|
{
|
|
3327
|
-
"name": "
|
|
3328
|
-
"docs": [
|
|
3329
|
-
"Min bin id supported by the pool based on the configured bin step."
|
|
3330
|
-
];
|
|
3331
|
-
"type": "i32";
|
|
3332
|
-
},
|
|
3333
|
-
{
|
|
3334
|
-
"name": "maxBinId";
|
|
5085
|
+
"name": "protocolShare";
|
|
3335
5086
|
"docs": [
|
|
3336
|
-
"
|
|
5087
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
3337
5088
|
];
|
|
3338
|
-
"type": "
|
|
5089
|
+
"type": "u16";
|
|
3339
5090
|
},
|
|
3340
5091
|
{
|
|
3341
|
-
"name": "
|
|
5092
|
+
"name": "baseFeePowerFactor";
|
|
3342
5093
|
"docs": [
|
|
3343
|
-
"
|
|
5094
|
+
"Base fee power factor"
|
|
3344
5095
|
];
|
|
3345
|
-
"type": "
|
|
5096
|
+
"type": "u8";
|
|
3346
5097
|
}
|
|
3347
5098
|
];
|
|
3348
5099
|
};
|
|
3349
|
-
}
|
|
3350
|
-
];
|
|
3351
|
-
"types": [
|
|
5100
|
+
},
|
|
3352
5101
|
{
|
|
3353
5102
|
"name": "InitPresetParametersIx";
|
|
3354
5103
|
"type": {
|
|
@@ -3364,7 +5113,7 @@ type LbClmm = {
|
|
|
3364
5113
|
{
|
|
3365
5114
|
"name": "baseFactor";
|
|
3366
5115
|
"docs": [
|
|
3367
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5116
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
3368
5117
|
];
|
|
3369
5118
|
"type": "u16";
|
|
3370
5119
|
},
|
|
@@ -3404,47 +5153,83 @@ type LbClmm = {
|
|
|
3404
5153
|
"type": "u32";
|
|
3405
5154
|
},
|
|
3406
5155
|
{
|
|
3407
|
-
"name": "
|
|
5156
|
+
"name": "protocolShare";
|
|
3408
5157
|
"docs": [
|
|
3409
|
-
"
|
|
5158
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
3410
5159
|
];
|
|
3411
|
-
"type": "
|
|
3412
|
-
}
|
|
5160
|
+
"type": "u16";
|
|
5161
|
+
}
|
|
5162
|
+
];
|
|
5163
|
+
};
|
|
5164
|
+
},
|
|
5165
|
+
{
|
|
5166
|
+
"name": "BaseFeeParameter";
|
|
5167
|
+
"type": {
|
|
5168
|
+
"kind": "struct";
|
|
5169
|
+
"fields": [
|
|
3413
5170
|
{
|
|
3414
|
-
"name": "
|
|
5171
|
+
"name": "protocolShare";
|
|
3415
5172
|
"docs": [
|
|
3416
|
-
"
|
|
5173
|
+
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
3417
5174
|
];
|
|
3418
|
-
"type": "
|
|
5175
|
+
"type": "u16";
|
|
3419
5176
|
},
|
|
3420
5177
|
{
|
|
3421
|
-
"name": "
|
|
5178
|
+
"name": "baseFactor";
|
|
3422
5179
|
"docs": [
|
|
3423
|
-
"
|
|
5180
|
+
"Base factor for base fee rate"
|
|
3424
5181
|
];
|
|
3425
5182
|
"type": "u16";
|
|
5183
|
+
},
|
|
5184
|
+
{
|
|
5185
|
+
"name": "baseFeePowerFactor";
|
|
5186
|
+
"docs": [
|
|
5187
|
+
"Base fee power factor"
|
|
5188
|
+
];
|
|
5189
|
+
"type": "u8";
|
|
3426
5190
|
}
|
|
3427
5191
|
];
|
|
3428
5192
|
};
|
|
3429
5193
|
},
|
|
3430
5194
|
{
|
|
3431
|
-
"name": "
|
|
5195
|
+
"name": "DynamicFeeParameter";
|
|
3432
5196
|
"type": {
|
|
3433
5197
|
"kind": "struct";
|
|
3434
5198
|
"fields": [
|
|
3435
5199
|
{
|
|
3436
|
-
"name": "
|
|
5200
|
+
"name": "filterPeriod";
|
|
3437
5201
|
"docs": [
|
|
3438
|
-
"
|
|
5202
|
+
"Filter period determine high frequency trading time window."
|
|
3439
5203
|
];
|
|
3440
5204
|
"type": "u16";
|
|
3441
5205
|
},
|
|
3442
5206
|
{
|
|
3443
|
-
"name": "
|
|
5207
|
+
"name": "decayPeriod";
|
|
3444
5208
|
"docs": [
|
|
3445
|
-
"
|
|
5209
|
+
"Decay period determine when the volatile fee start decay / decrease."
|
|
3446
5210
|
];
|
|
3447
5211
|
"type": "u16";
|
|
5212
|
+
},
|
|
5213
|
+
{
|
|
5214
|
+
"name": "reductionFactor";
|
|
5215
|
+
"docs": [
|
|
5216
|
+
"Reduction factor controls the volatile fee rate decrement rate."
|
|
5217
|
+
];
|
|
5218
|
+
"type": "u16";
|
|
5219
|
+
},
|
|
5220
|
+
{
|
|
5221
|
+
"name": "variableFeeControl";
|
|
5222
|
+
"docs": [
|
|
5223
|
+
"Used to scale the variable fee component depending on the dynamic of the market"
|
|
5224
|
+
];
|
|
5225
|
+
"type": "u32";
|
|
5226
|
+
},
|
|
5227
|
+
{
|
|
5228
|
+
"name": "maxVolatilityAccumulator";
|
|
5229
|
+
"docs": [
|
|
5230
|
+
"Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
|
|
5231
|
+
];
|
|
5232
|
+
"type": "u32";
|
|
3448
5233
|
}
|
|
3449
5234
|
];
|
|
3450
5235
|
};
|
|
@@ -3831,6 +5616,20 @@ type LbClmm = {
|
|
|
3831
5616
|
"option": "u64";
|
|
3832
5617
|
};
|
|
3833
5618
|
},
|
|
5619
|
+
{
|
|
5620
|
+
"name": "creatorPoolOnOffControl";
|
|
5621
|
+
"docs": [
|
|
5622
|
+
"Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool."
|
|
5623
|
+
];
|
|
5624
|
+
"type": "bool";
|
|
5625
|
+
},
|
|
5626
|
+
{
|
|
5627
|
+
"name": "baseFeePowerFactor";
|
|
5628
|
+
"docs": [
|
|
5629
|
+
"Base fee power factor"
|
|
5630
|
+
];
|
|
5631
|
+
"type": "u8";
|
|
5632
|
+
},
|
|
3834
5633
|
{
|
|
3835
5634
|
"name": "padding";
|
|
3836
5635
|
"docs": [
|
|
@@ -3839,7 +5638,7 @@ type LbClmm = {
|
|
|
3839
5638
|
"type": {
|
|
3840
5639
|
"array": [
|
|
3841
5640
|
"u8",
|
|
3842
|
-
|
|
5641
|
+
62
|
|
3843
5642
|
];
|
|
3844
5643
|
};
|
|
3845
5644
|
}
|
|
@@ -3864,16 +5663,83 @@ type LbClmm = {
|
|
|
3864
5663
|
"type": "u16";
|
|
3865
5664
|
},
|
|
3866
5665
|
{
|
|
3867
|
-
"name": "
|
|
5666
|
+
"name": "baseFeePowerFactor";
|
|
5667
|
+
"type": "u8";
|
|
5668
|
+
},
|
|
5669
|
+
{
|
|
5670
|
+
"name": "activationType";
|
|
5671
|
+
"type": "u8";
|
|
5672
|
+
},
|
|
5673
|
+
{
|
|
5674
|
+
"name": "protocolShare";
|
|
5675
|
+
"type": "u16";
|
|
5676
|
+
}
|
|
5677
|
+
];
|
|
5678
|
+
};
|
|
5679
|
+
},
|
|
5680
|
+
{
|
|
5681
|
+
"name": "AddLiquiditySingleSidePreciseParameter2";
|
|
5682
|
+
"type": {
|
|
5683
|
+
"kind": "struct";
|
|
5684
|
+
"fields": [
|
|
5685
|
+
{
|
|
5686
|
+
"name": "bins";
|
|
5687
|
+
"type": {
|
|
5688
|
+
"vec": {
|
|
5689
|
+
"defined": "CompressedBinDepositAmount";
|
|
5690
|
+
};
|
|
5691
|
+
};
|
|
5692
|
+
},
|
|
5693
|
+
{
|
|
5694
|
+
"name": "decompressMultiplier";
|
|
5695
|
+
"type": "u64";
|
|
5696
|
+
},
|
|
5697
|
+
{
|
|
5698
|
+
"name": "maxAmount";
|
|
5699
|
+
"type": "u64";
|
|
5700
|
+
}
|
|
5701
|
+
];
|
|
5702
|
+
};
|
|
5703
|
+
},
|
|
5704
|
+
{
|
|
5705
|
+
"name": "CompressedBinDepositAmount2";
|
|
5706
|
+
"type": {
|
|
5707
|
+
"kind": "struct";
|
|
5708
|
+
"fields": [
|
|
5709
|
+
{
|
|
5710
|
+
"name": "binId";
|
|
3868
5711
|
"type": "i32";
|
|
3869
5712
|
},
|
|
3870
5713
|
{
|
|
3871
|
-
"name": "
|
|
5714
|
+
"name": "amount";
|
|
5715
|
+
"type": "u32";
|
|
5716
|
+
}
|
|
5717
|
+
];
|
|
5718
|
+
};
|
|
5719
|
+
},
|
|
5720
|
+
{
|
|
5721
|
+
"name": "InitializeLbPair2Params";
|
|
5722
|
+
"type": {
|
|
5723
|
+
"kind": "struct";
|
|
5724
|
+
"fields": [
|
|
5725
|
+
{
|
|
5726
|
+
"name": "activeId";
|
|
5727
|
+
"docs": [
|
|
5728
|
+
"Pool price"
|
|
5729
|
+
];
|
|
3872
5730
|
"type": "i32";
|
|
3873
5731
|
},
|
|
3874
5732
|
{
|
|
3875
|
-
"name": "
|
|
3876
|
-
"
|
|
5733
|
+
"name": "padding";
|
|
5734
|
+
"docs": [
|
|
5735
|
+
"Padding, for future use"
|
|
5736
|
+
];
|
|
5737
|
+
"type": {
|
|
5738
|
+
"array": [
|
|
5739
|
+
"u8",
|
|
5740
|
+
96
|
|
5741
|
+
];
|
|
5742
|
+
};
|
|
3877
5743
|
}
|
|
3878
5744
|
];
|
|
3879
5745
|
};
|
|
@@ -4093,7 +5959,7 @@ type LbClmm = {
|
|
|
4093
5959
|
{
|
|
4094
5960
|
"name": "baseFactor";
|
|
4095
5961
|
"docs": [
|
|
4096
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5962
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
4097
5963
|
];
|
|
4098
5964
|
"type": "u16";
|
|
4099
5965
|
},
|
|
@@ -4153,6 +6019,13 @@ type LbClmm = {
|
|
|
4153
6019
|
];
|
|
4154
6020
|
"type": "u16";
|
|
4155
6021
|
},
|
|
6022
|
+
{
|
|
6023
|
+
"name": "baseFeePowerFactor";
|
|
6024
|
+
"docs": [
|
|
6025
|
+
"Base fee power factor"
|
|
6026
|
+
];
|
|
6027
|
+
"type": "u8";
|
|
6028
|
+
},
|
|
4156
6029
|
{
|
|
4157
6030
|
"name": "padding";
|
|
4158
6031
|
"docs": [
|
|
@@ -4161,7 +6034,7 @@ type LbClmm = {
|
|
|
4161
6034
|
"type": {
|
|
4162
6035
|
"array": [
|
|
4163
6036
|
"u8",
|
|
4164
|
-
|
|
6037
|
+
5
|
|
4165
6038
|
];
|
|
4166
6039
|
};
|
|
4167
6040
|
}
|
|
@@ -4271,12 +6144,46 @@ type LbClmm = {
|
|
|
4271
6144
|
};
|
|
4272
6145
|
},
|
|
4273
6146
|
{
|
|
4274
|
-
"name": "rewardPendings";
|
|
6147
|
+
"name": "rewardPendings";
|
|
6148
|
+
"type": {
|
|
6149
|
+
"array": [
|
|
6150
|
+
"u64",
|
|
6151
|
+
2
|
|
6152
|
+
];
|
|
6153
|
+
};
|
|
6154
|
+
}
|
|
6155
|
+
];
|
|
6156
|
+
};
|
|
6157
|
+
},
|
|
6158
|
+
{
|
|
6159
|
+
"name": "RemainingAccountsSlice";
|
|
6160
|
+
"type": {
|
|
6161
|
+
"kind": "struct";
|
|
6162
|
+
"fields": [
|
|
6163
|
+
{
|
|
6164
|
+
"name": "accountsType";
|
|
6165
|
+
"type": {
|
|
6166
|
+
"defined": "AccountsType";
|
|
6167
|
+
};
|
|
6168
|
+
},
|
|
6169
|
+
{
|
|
6170
|
+
"name": "length";
|
|
6171
|
+
"type": "u8";
|
|
6172
|
+
}
|
|
6173
|
+
];
|
|
6174
|
+
};
|
|
6175
|
+
},
|
|
6176
|
+
{
|
|
6177
|
+
"name": "RemainingAccountsInfo";
|
|
6178
|
+
"type": {
|
|
6179
|
+
"kind": "struct";
|
|
6180
|
+
"fields": [
|
|
6181
|
+
{
|
|
6182
|
+
"name": "slices";
|
|
4275
6183
|
"type": {
|
|
4276
|
-
"
|
|
4277
|
-
"
|
|
4278
|
-
|
|
4279
|
-
];
|
|
6184
|
+
"vec": {
|
|
6185
|
+
"defined": "RemainingAccountsSlice";
|
|
6186
|
+
};
|
|
4280
6187
|
};
|
|
4281
6188
|
}
|
|
4282
6189
|
];
|
|
@@ -4381,6 +6288,9 @@ type LbClmm = {
|
|
|
4381
6288
|
},
|
|
4382
6289
|
{
|
|
4383
6290
|
"name": "CustomizablePermissionless";
|
|
6291
|
+
},
|
|
6292
|
+
{
|
|
6293
|
+
"name": "PermissionlessV2";
|
|
4384
6294
|
}
|
|
4385
6295
|
];
|
|
4386
6296
|
};
|
|
@@ -4401,6 +6311,37 @@ type LbClmm = {
|
|
|
4401
6311
|
}
|
|
4402
6312
|
];
|
|
4403
6313
|
};
|
|
6314
|
+
},
|
|
6315
|
+
{
|
|
6316
|
+
"name": "TokenProgramFlags";
|
|
6317
|
+
"type": {
|
|
6318
|
+
"kind": "enum";
|
|
6319
|
+
"variants": [
|
|
6320
|
+
{
|
|
6321
|
+
"name": "TokenProgram";
|
|
6322
|
+
},
|
|
6323
|
+
{
|
|
6324
|
+
"name": "TokenProgram2022";
|
|
6325
|
+
}
|
|
6326
|
+
];
|
|
6327
|
+
};
|
|
6328
|
+
},
|
|
6329
|
+
{
|
|
6330
|
+
"name": "AccountsType";
|
|
6331
|
+
"type": {
|
|
6332
|
+
"kind": "enum";
|
|
6333
|
+
"variants": [
|
|
6334
|
+
{
|
|
6335
|
+
"name": "TransferHookX";
|
|
6336
|
+
},
|
|
6337
|
+
{
|
|
6338
|
+
"name": "TransferHookY";
|
|
6339
|
+
},
|
|
6340
|
+
{
|
|
6341
|
+
"name": "TransferHookReward";
|
|
6342
|
+
}
|
|
6343
|
+
];
|
|
6344
|
+
};
|
|
4404
6345
|
}
|
|
4405
6346
|
];
|
|
4406
6347
|
"events": [
|
|
@@ -4794,6 +6735,66 @@ type LbClmm = {
|
|
|
4794
6735
|
}
|
|
4795
6736
|
];
|
|
4796
6737
|
},
|
|
6738
|
+
{
|
|
6739
|
+
"name": "IncreasePositionLength";
|
|
6740
|
+
"fields": [
|
|
6741
|
+
{
|
|
6742
|
+
"name": "lbPair";
|
|
6743
|
+
"type": "publicKey";
|
|
6744
|
+
"index": false;
|
|
6745
|
+
},
|
|
6746
|
+
{
|
|
6747
|
+
"name": "position";
|
|
6748
|
+
"type": "publicKey";
|
|
6749
|
+
"index": false;
|
|
6750
|
+
},
|
|
6751
|
+
{
|
|
6752
|
+
"name": "owner";
|
|
6753
|
+
"type": "publicKey";
|
|
6754
|
+
"index": false;
|
|
6755
|
+
},
|
|
6756
|
+
{
|
|
6757
|
+
"name": "lengthToAdd";
|
|
6758
|
+
"type": "u16";
|
|
6759
|
+
"index": false;
|
|
6760
|
+
},
|
|
6761
|
+
{
|
|
6762
|
+
"name": "side";
|
|
6763
|
+
"type": "u8";
|
|
6764
|
+
"index": false;
|
|
6765
|
+
}
|
|
6766
|
+
];
|
|
6767
|
+
},
|
|
6768
|
+
{
|
|
6769
|
+
"name": "DecreasePositionLength";
|
|
6770
|
+
"fields": [
|
|
6771
|
+
{
|
|
6772
|
+
"name": "lbPair";
|
|
6773
|
+
"type": "publicKey";
|
|
6774
|
+
"index": false;
|
|
6775
|
+
},
|
|
6776
|
+
{
|
|
6777
|
+
"name": "position";
|
|
6778
|
+
"type": "publicKey";
|
|
6779
|
+
"index": false;
|
|
6780
|
+
},
|
|
6781
|
+
{
|
|
6782
|
+
"name": "owner";
|
|
6783
|
+
"type": "publicKey";
|
|
6784
|
+
"index": false;
|
|
6785
|
+
},
|
|
6786
|
+
{
|
|
6787
|
+
"name": "lengthToRemove";
|
|
6788
|
+
"type": "u16";
|
|
6789
|
+
"index": false;
|
|
6790
|
+
},
|
|
6791
|
+
{
|
|
6792
|
+
"name": "side";
|
|
6793
|
+
"type": "u8";
|
|
6794
|
+
"index": false;
|
|
6795
|
+
}
|
|
6796
|
+
];
|
|
6797
|
+
},
|
|
4797
6798
|
{
|
|
4798
6799
|
"name": "FeeParameterUpdate";
|
|
4799
6800
|
"fields": [
|
|
@@ -4814,6 +6815,41 @@ type LbClmm = {
|
|
|
4814
6815
|
}
|
|
4815
6816
|
];
|
|
4816
6817
|
},
|
|
6818
|
+
{
|
|
6819
|
+
"name": "DynamicFeeParameterUpdate";
|
|
6820
|
+
"fields": [
|
|
6821
|
+
{
|
|
6822
|
+
"name": "lbPair";
|
|
6823
|
+
"type": "publicKey";
|
|
6824
|
+
"index": false;
|
|
6825
|
+
},
|
|
6826
|
+
{
|
|
6827
|
+
"name": "filterPeriod";
|
|
6828
|
+
"type": "u16";
|
|
6829
|
+
"index": false;
|
|
6830
|
+
},
|
|
6831
|
+
{
|
|
6832
|
+
"name": "decayPeriod";
|
|
6833
|
+
"type": "u16";
|
|
6834
|
+
"index": false;
|
|
6835
|
+
},
|
|
6836
|
+
{
|
|
6837
|
+
"name": "reductionFactor";
|
|
6838
|
+
"type": "u16";
|
|
6839
|
+
"index": false;
|
|
6840
|
+
},
|
|
6841
|
+
{
|
|
6842
|
+
"name": "variableFeeControl";
|
|
6843
|
+
"type": "u32";
|
|
6844
|
+
"index": false;
|
|
6845
|
+
},
|
|
6846
|
+
{
|
|
6847
|
+
"name": "maxVolatilityAccumulator";
|
|
6848
|
+
"type": "u32";
|
|
6849
|
+
"index": false;
|
|
6850
|
+
}
|
|
6851
|
+
];
|
|
6852
|
+
},
|
|
4817
6853
|
{
|
|
4818
6854
|
"name": "IncreaseObservation";
|
|
4819
6855
|
"fields": [
|
|
@@ -5250,6 +7286,91 @@ type LbClmm = {
|
|
|
5250
7286
|
"code": 6065;
|
|
5251
7287
|
"name": "AlreadyPassPreActivationSwapPoint";
|
|
5252
7288
|
"msg": "Already pass pre-activation swap point";
|
|
7289
|
+
},
|
|
7290
|
+
{
|
|
7291
|
+
"code": 6066;
|
|
7292
|
+
"name": "InvalidStatus";
|
|
7293
|
+
"msg": "Invalid status";
|
|
7294
|
+
},
|
|
7295
|
+
{
|
|
7296
|
+
"code": 6067;
|
|
7297
|
+
"name": "ExceededMaxOracleLength";
|
|
7298
|
+
"msg": "Exceed max oracle length";
|
|
7299
|
+
},
|
|
7300
|
+
{
|
|
7301
|
+
"code": 6068;
|
|
7302
|
+
"name": "InvalidMinimumLiquidity";
|
|
7303
|
+
"msg": "Invalid minimum liquidity";
|
|
7304
|
+
},
|
|
7305
|
+
{
|
|
7306
|
+
"code": 6069;
|
|
7307
|
+
"name": "NotSupportMint";
|
|
7308
|
+
"msg": "Not support token_2022 mint extension";
|
|
7309
|
+
},
|
|
7310
|
+
{
|
|
7311
|
+
"code": 6070;
|
|
7312
|
+
"name": "UnsupportedMintExtension";
|
|
7313
|
+
"msg": "Unsupported mint extension";
|
|
7314
|
+
},
|
|
7315
|
+
{
|
|
7316
|
+
"code": 6071;
|
|
7317
|
+
"name": "UnsupportNativeMintToken2022";
|
|
7318
|
+
"msg": "Unsupported native mint token2022";
|
|
7319
|
+
},
|
|
7320
|
+
{
|
|
7321
|
+
"code": 6072;
|
|
7322
|
+
"name": "UnmatchTokenMint";
|
|
7323
|
+
"msg": "Unmatch token mint";
|
|
7324
|
+
},
|
|
7325
|
+
{
|
|
7326
|
+
"code": 6073;
|
|
7327
|
+
"name": "UnsupportedTokenMint";
|
|
7328
|
+
"msg": "Unsupported token mint";
|
|
7329
|
+
},
|
|
7330
|
+
{
|
|
7331
|
+
"code": 6074;
|
|
7332
|
+
"name": "InsufficientRemainingAccounts";
|
|
7333
|
+
"msg": "Insufficient remaining accounts";
|
|
7334
|
+
},
|
|
7335
|
+
{
|
|
7336
|
+
"code": 6075;
|
|
7337
|
+
"name": "InvalidRemainingAccountSlice";
|
|
7338
|
+
"msg": "Invalid remaining account slice";
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
"code": 6076;
|
|
7342
|
+
"name": "DuplicatedRemainingAccountTypes";
|
|
7343
|
+
"msg": "Duplicated remaining account types";
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
"code": 6077;
|
|
7347
|
+
"name": "MissingRemainingAccountForTransferHook";
|
|
7348
|
+
"msg": "Missing remaining account for transfer hook";
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
"code": 6078;
|
|
7352
|
+
"name": "NoTransferHookProgram";
|
|
7353
|
+
"msg": "Remaining account was passed for transfer hook but there's no hook program";
|
|
7354
|
+
},
|
|
7355
|
+
{
|
|
7356
|
+
"code": 6079;
|
|
7357
|
+
"name": "ZeroFundedAmount";
|
|
7358
|
+
"msg": "Zero funded amount";
|
|
7359
|
+
},
|
|
7360
|
+
{
|
|
7361
|
+
"code": 6080;
|
|
7362
|
+
"name": "InvalidSide";
|
|
7363
|
+
"msg": "Invalid side";
|
|
7364
|
+
},
|
|
7365
|
+
{
|
|
7366
|
+
"code": 6081;
|
|
7367
|
+
"name": "InvalidResizeLength";
|
|
7368
|
+
"msg": "Invalid resize length";
|
|
7369
|
+
},
|
|
7370
|
+
{
|
|
7371
|
+
"code": 6082;
|
|
7372
|
+
"name": "NotSupportAtTheMoment";
|
|
7373
|
+
"msg": "Not support at the moment";
|
|
5253
7374
|
}
|
|
5254
7375
|
];
|
|
5255
7376
|
};
|
|
@@ -5263,8 +7384,10 @@ interface BinAndAmount {
|
|
|
5263
7384
|
interface TokenReserve {
|
|
5264
7385
|
publicKey: PublicKey;
|
|
5265
7386
|
reserve: PublicKey;
|
|
7387
|
+
mint: Mint;
|
|
5266
7388
|
amount: bigint;
|
|
5267
|
-
|
|
7389
|
+
owner: PublicKey;
|
|
7390
|
+
transferHookAccountMetas: AccountMeta[];
|
|
5268
7391
|
}
|
|
5269
7392
|
type ClmmProgram = Program<LbClmm>;
|
|
5270
7393
|
type LbPair = IdlAccounts<LbClmm>["lbPair"];
|
|
@@ -5274,8 +7397,12 @@ type BinArray = IdlAccounts<LbClmm>["binArray"];
|
|
|
5274
7397
|
type BinArrayAccount = ProgramAccount<IdlAccounts<LbClmm>["binArray"]>;
|
|
5275
7398
|
type Position = IdlAccounts<LbClmm>["position"];
|
|
5276
7399
|
type PositionV2 = IdlAccounts<LbClmm>["positionV2"];
|
|
7400
|
+
type PresetParameter = IdlAccounts<LbClmm>["presetParameter"];
|
|
7401
|
+
type PresetParameter2 = IdlAccounts<LbClmm>["presetParameter2"];
|
|
5277
7402
|
type vParameters = IdlAccounts<LbClmm>["lbPair"]["vParameters"];
|
|
5278
7403
|
type sParameters = IdlAccounts<LbClmm>["lbPair"]["parameters"];
|
|
7404
|
+
type UserRewardInfo = IdlTypes<LbClmm>["UserRewardInfo"];
|
|
7405
|
+
type UserFeeInfo = IdlTypes<LbClmm>["FeeInfo"];
|
|
5279
7406
|
type InitPermissionPairIx = IdlTypes<LbClmm>["InitPermissionPairIx"];
|
|
5280
7407
|
type InitCustomizablePermissionlessPairIx = IdlTypes<LbClmm>["CustomizableParams"];
|
|
5281
7408
|
type BinLiquidityDistribution = IdlTypes<LbClmm>["BinLiquidityDistribution"];
|
|
@@ -5289,8 +7416,11 @@ type LiquidityParameterByStrategyOneSide = IdlTypes<LbClmm>["LiquidityParameterB
|
|
|
5289
7416
|
type LiquidityParameter = IdlTypes<LbClmm>["LiquidityParameter"];
|
|
5290
7417
|
type ProgramStrategyParameter = IdlTypes<LbClmm>["StrategyParameters"];
|
|
5291
7418
|
type ProgramStrategyType = IdlTypes<LbClmm>["StrategyType"];
|
|
7419
|
+
type RemainingAccountInfo = IdlTypes<LbClmm>["RemainingAccountsInfo"];
|
|
7420
|
+
type RemainingAccountsInfoSlice = IdlTypes<LbClmm>["RemainingAccountsSlice"];
|
|
5292
7421
|
type CompressedBinDepositAmount = IdlTypes<LbClmm>["CompressedBinDepositAmount"];
|
|
5293
7422
|
type CompressedBinDepositAmounts = CompressedBinDepositAmount[];
|
|
7423
|
+
declare const POSITION_V2_DISC: Buffer;
|
|
5294
7424
|
interface LbPosition {
|
|
5295
7425
|
publicKey: PublicKey;
|
|
5296
7426
|
positionData: PositionData;
|
|
@@ -5327,22 +7457,14 @@ interface LMRewards {
|
|
|
5327
7457
|
}
|
|
5328
7458
|
declare enum PositionVersion {
|
|
5329
7459
|
V1 = 0,
|
|
5330
|
-
V2 = 1
|
|
7460
|
+
V2 = 1,
|
|
7461
|
+
V3 = 2
|
|
5331
7462
|
}
|
|
5332
7463
|
declare enum PairType {
|
|
5333
7464
|
Permissionless = 0,
|
|
5334
7465
|
Permissioned = 1
|
|
5335
7466
|
}
|
|
5336
7467
|
declare const Strategy: {
|
|
5337
|
-
SpotOneSide: {
|
|
5338
|
-
spotOneSide: {};
|
|
5339
|
-
};
|
|
5340
|
-
CurveOneSide: {
|
|
5341
|
-
curveOneSide: {};
|
|
5342
|
-
};
|
|
5343
|
-
BidAskOneSide: {
|
|
5344
|
-
bidAskOneSide: {};
|
|
5345
|
-
};
|
|
5346
7468
|
SpotBalanced: {
|
|
5347
7469
|
spotBalanced: {};
|
|
5348
7470
|
};
|
|
@@ -5363,15 +7485,12 @@ declare const Strategy: {
|
|
|
5363
7485
|
};
|
|
5364
7486
|
};
|
|
5365
7487
|
declare enum StrategyType {
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
SpotBalanced = 6,
|
|
5373
|
-
CurveBalanced = 7,
|
|
5374
|
-
BidAskBalanced = 8
|
|
7488
|
+
SpotImBalanced = 0,
|
|
7489
|
+
CurveImBalanced = 1,
|
|
7490
|
+
BidAskImBalanced = 2,
|
|
7491
|
+
SpotBalanced = 3,
|
|
7492
|
+
CurveBalanced = 4,
|
|
7493
|
+
BidAskBalanced = 5
|
|
5375
7494
|
}
|
|
5376
7495
|
declare enum ActivationType {
|
|
5377
7496
|
Slot = 0,
|
|
@@ -5410,6 +7529,9 @@ interface BinLiquidity {
|
|
|
5410
7529
|
version: number;
|
|
5411
7530
|
price: string;
|
|
5412
7531
|
pricePerToken: string;
|
|
7532
|
+
feeAmountXPerTokenStored: BN;
|
|
7533
|
+
feeAmountYPerTokenStored: BN;
|
|
7534
|
+
rewardPerTokenStored: BN[];
|
|
5413
7535
|
}
|
|
5414
7536
|
declare namespace BinLiquidity {
|
|
5415
7537
|
function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
|
|
@@ -5448,6 +7570,9 @@ interface PositionBinData {
|
|
|
5448
7570
|
positionLiquidity: string;
|
|
5449
7571
|
positionXAmount: string;
|
|
5450
7572
|
positionYAmount: string;
|
|
7573
|
+
positionFeeXAmount: string;
|
|
7574
|
+
positionFeeYAmount: string;
|
|
7575
|
+
positionRewardAmount: string[];
|
|
5451
7576
|
}
|
|
5452
7577
|
interface PositionData {
|
|
5453
7578
|
totalXAmount: string;
|
|
@@ -5463,6 +7588,13 @@ interface PositionData {
|
|
|
5463
7588
|
feeOwner: PublicKey;
|
|
5464
7589
|
totalClaimedFeeXAmount: BN;
|
|
5465
7590
|
totalClaimedFeeYAmount: BN;
|
|
7591
|
+
feeXExcludeTransferFee: BN;
|
|
7592
|
+
feeYExcludeTransferFee: BN;
|
|
7593
|
+
rewardOneExcludeTransferFee: BN;
|
|
7594
|
+
rewardTwoExcludeTransferFee: BN;
|
|
7595
|
+
totalXAmountExcludeTransferFee: BN;
|
|
7596
|
+
totalYAmountExcludeTransferFee: BN;
|
|
7597
|
+
owner: PublicKey;
|
|
5466
7598
|
}
|
|
5467
7599
|
interface SwapWithPriceImpactParams {
|
|
5468
7600
|
/**
|
|
@@ -5554,6 +7686,7 @@ declare enum BitmapType {
|
|
|
5554
7686
|
U512 = 1
|
|
5555
7687
|
}
|
|
5556
7688
|
interface SeedLiquidityResponse {
|
|
7689
|
+
sendPositionOwnerTokenProveIxs: TransactionInstruction[];
|
|
5557
7690
|
initializeBinArraysAndPositionIxs: TransactionInstruction[][];
|
|
5558
7691
|
addLiquidityIxs: TransactionInstruction[][];
|
|
5559
7692
|
}
|
|
@@ -5569,6 +7702,21 @@ declare enum PairStatus {
|
|
|
5569
7702
|
Enabled = 0,
|
|
5570
7703
|
Disabled = 1
|
|
5571
7704
|
}
|
|
7705
|
+
interface PairLockInfo {
|
|
7706
|
+
positions: Array<PositionLockInfo>;
|
|
7707
|
+
}
|
|
7708
|
+
interface PositionLockInfo {
|
|
7709
|
+
positionAddress: PublicKey;
|
|
7710
|
+
owner: PublicKey;
|
|
7711
|
+
tokenXAmount: string;
|
|
7712
|
+
tokenYAmount: string;
|
|
7713
|
+
lockReleasePoint: number;
|
|
7714
|
+
}
|
|
7715
|
+
declare enum ActionType {
|
|
7716
|
+
Liquidity = 0,
|
|
7717
|
+
Reward = 1
|
|
7718
|
+
}
|
|
7719
|
+
declare const MEMO_PROGRAM_ID: PublicKey;
|
|
5572
7720
|
|
|
5573
7721
|
type Opt = {
|
|
5574
7722
|
cluster?: Cluster | "localhost";
|
|
@@ -5581,9 +7729,10 @@ declare class DLMM {
|
|
|
5581
7729
|
binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null;
|
|
5582
7730
|
tokenX: TokenReserve;
|
|
5583
7731
|
tokenY: TokenReserve;
|
|
7732
|
+
rewards: Array<TokenReserve | null>;
|
|
5584
7733
|
clock: Clock;
|
|
5585
7734
|
private opt?;
|
|
5586
|
-
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, clock: Clock, opt?: Opt);
|
|
7735
|
+
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, rewards: Array<TokenReserve | null>, clock: Clock, opt?: Opt);
|
|
5587
7736
|
/** Static public method */
|
|
5588
7737
|
/**
|
|
5589
7738
|
* The function `getLbPairs` retrieves a list of LB pair accounts using a connection and optional
|
|
@@ -5596,7 +7745,18 @@ declare class DLMM {
|
|
|
5596
7745
|
* `LbPairAccount` objects.
|
|
5597
7746
|
*/
|
|
5598
7747
|
static getLbPairs(connection: Connection, opt?: Opt): Promise<LbPairAccount[]>;
|
|
5599
|
-
|
|
7748
|
+
/**
|
|
7749
|
+
* Retrieves the public key of a LB pair if it exists.
|
|
7750
|
+
* @param connection The connection to the Solana cluster.
|
|
7751
|
+
* @param tokenX The mint address of token X.
|
|
7752
|
+
* @param tokenY The mint address of token Y.
|
|
7753
|
+
* @param binStep The bin step of the LB pair.
|
|
7754
|
+
* @param baseFactor The base factor of the LB pair.
|
|
7755
|
+
* @param baseFeePowerFactor The base fee power factor of the LB pair. It allow small bin step to have bigger fee rate.
|
|
7756
|
+
* @param opt Optional parameters.
|
|
7757
|
+
* @returns The public key of the LB pair if it exists, or null.
|
|
7758
|
+
*/
|
|
7759
|
+
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, baseFeePowerFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
5600
7760
|
/**
|
|
5601
7761
|
* The `create` function is a static method that creates a new instance of the `DLMM` class
|
|
5602
7762
|
* @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
|
|
@@ -5617,18 +7777,46 @@ declare class DLMM {
|
|
|
5617
7777
|
* objects.
|
|
5618
7778
|
*/
|
|
5619
7779
|
static createMultiple(connection: Connection, dlmmList: Array<PublicKey>, opt?: Opt): Promise<DLMM[]>;
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
7780
|
+
/**
|
|
7781
|
+
* The `getAllPresetParameters` function retrieves all preset parameter accounts
|
|
7782
|
+
* for the given DLMM program.
|
|
7783
|
+
*
|
|
7784
|
+
* @param {Connection} connection - The connection to the Solana cluster.
|
|
7785
|
+
* @param {Opt} [opt] - The optional parameters for the function.
|
|
7786
|
+
*
|
|
7787
|
+
* @returns A promise that resolves to an object containing the preset parameter
|
|
7788
|
+
* accounts, with the following properties:
|
|
7789
|
+
* - `presetParameter`: The preset parameter accounts for the original `PresetParameter` struct.
|
|
7790
|
+
* - `presetParameter2`: The preset parameter accounts for the `PresetParameter2` struct.
|
|
7791
|
+
*/
|
|
7792
|
+
static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<{
|
|
7793
|
+
presetParameter: _coral_xyz_anchor.ProgramAccount<{
|
|
7794
|
+
binStep: number;
|
|
7795
|
+
baseFactor: number;
|
|
7796
|
+
filterPeriod: number;
|
|
7797
|
+
decayPeriod: number;
|
|
7798
|
+
reductionFactor: number;
|
|
7799
|
+
variableFeeControl: number;
|
|
7800
|
+
maxVolatilityAccumulator: number;
|
|
7801
|
+
minBinId: number;
|
|
7802
|
+
maxBinId: number;
|
|
7803
|
+
protocolShare: number;
|
|
7804
|
+
}>[];
|
|
7805
|
+
presetParameter2: _coral_xyz_anchor.ProgramAccount<{
|
|
7806
|
+
binStep: number;
|
|
7807
|
+
baseFactor: number;
|
|
7808
|
+
filterPeriod: number;
|
|
7809
|
+
decayPeriod: number;
|
|
7810
|
+
variableFeeControl: number;
|
|
7811
|
+
maxVolatilityAccumulator: number;
|
|
7812
|
+
reductionFactor: number;
|
|
7813
|
+
protocolShare: number;
|
|
7814
|
+
index: number;
|
|
7815
|
+
baseFeePowerFactor: number;
|
|
7816
|
+
padding0: number;
|
|
7817
|
+
padding1: BN[];
|
|
7818
|
+
}>[];
|
|
7819
|
+
}>;
|
|
5632
7820
|
/**
|
|
5633
7821
|
* The function `getAllLbPairPositionsByUser` retrieves all liquidity pool pair positions for a given
|
|
5634
7822
|
* user.
|
|
@@ -5641,18 +7829,91 @@ declare class DLMM {
|
|
|
5641
7829
|
* Pair account, and the value is an object of PositionInfo
|
|
5642
7830
|
*/
|
|
5643
7831
|
static getAllLbPairPositionsByUser(connection: Connection, userPubKey: PublicKey, opt?: Opt): Promise<Map<string, PositionInfo>>;
|
|
5644
|
-
static migratePosition(connection: Connection, positions: PublicKey[], newPositions: PublicKey[], walletPubkey: PublicKey, opt?: Opt): Promise<Transaction[]>;
|
|
5645
7832
|
static getPricePerLamport(tokenXDecimal: number, tokenYDecimal: number, price: number): string;
|
|
5646
7833
|
static getBinIdFromPrice(price: string | number | Decimal, binStep: number, min: boolean): number;
|
|
7834
|
+
/**
|
|
7835
|
+
* The function `getLbPairLockInfo` retrieves all pair positions that has locked liquidity.
|
|
7836
|
+
* @param {number} [lockDurationOpt] - An optional value indicating the minimum position lock duration that the function should return.
|
|
7837
|
+
* Depending on the lbPair activationType, the param should be a number of seconds or a number of slots.
|
|
7838
|
+
* @returns The function `getLbPairLockInfo` returns a `Promise` that resolves to a `PairLockInfo`
|
|
7839
|
+
* object. The `PairLockInfo` object contains an array of `PositionLockInfo` objects.
|
|
7840
|
+
*/
|
|
7841
|
+
getLbPairLockInfo(lockDurationOpt?: number): Promise<PairLockInfo>;
|
|
5647
7842
|
/** Public methods */
|
|
5648
|
-
|
|
5649
|
-
|
|
7843
|
+
/**
|
|
7844
|
+
* Create a new customizable permissionless pair. Support both token and token 2022.
|
|
7845
|
+
* @param connection A connection to the Solana cluster.
|
|
7846
|
+
* @param binStep The bin step for the pair.
|
|
7847
|
+
* @param tokenX The mint of the first token.
|
|
7848
|
+
* @param tokenY The mint of the second token.
|
|
7849
|
+
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7850
|
+
* @param feeBps The fee rate for swaps in the pair, in basis points.
|
|
7851
|
+
* @param activationType The type of activation for the pair.
|
|
7852
|
+
* @param hasAlphaVault Whether the pair has an alpha vault.
|
|
7853
|
+
* @param creatorKey The public key of the creator of the pair.
|
|
7854
|
+
* @param activationPoint The timestamp at which the pair will be activated.
|
|
7855
|
+
* @param opt An options object.
|
|
7856
|
+
* @returns A transaction that creates the pair.
|
|
7857
|
+
*/
|
|
7858
|
+
static createCustomizablePermissionlessLbPair2(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, creatorPoolOnOffControl?: boolean, opt?: Opt): Promise<Transaction>;
|
|
7859
|
+
/**
|
|
7860
|
+
* Create a new customizable permissionless pair. Support only token program.
|
|
7861
|
+
* @param connection A connection to the Solana cluster.
|
|
7862
|
+
* @param binStep The bin step for the pair.
|
|
7863
|
+
* @param tokenX The mint of the first token.
|
|
7864
|
+
* @param tokenY The mint of the second token.
|
|
7865
|
+
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7866
|
+
* @param feeBps The fee rate for swaps in the pair, in basis points.
|
|
7867
|
+
* @param activationType The type of activation for the pair.
|
|
7868
|
+
* @param hasAlphaVault Whether the pair has an alpha vault.
|
|
7869
|
+
* @param creatorKey The public key of the creator of the pair.
|
|
7870
|
+
* @param activationPoint The timestamp at which the pair will be activated.
|
|
7871
|
+
* @param opt An options object.
|
|
7872
|
+
* @returns A transaction that creates the pair.
|
|
7873
|
+
*/
|
|
7874
|
+
static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, creatorPoolOnOffControl?: boolean, opt?: Opt): Promise<Transaction>;
|
|
7875
|
+
/**
|
|
7876
|
+
* Create a new liquidity pair. Support only token program.
|
|
7877
|
+
* @param connection A connection to the Solana cluster.
|
|
7878
|
+
* @param funder The public key of the funder of the pair.
|
|
7879
|
+
* @param tokenX The mint of the first token.
|
|
7880
|
+
* @param tokenY The mint of the second token.
|
|
7881
|
+
* @param binStep The bin step for the pair.
|
|
7882
|
+
* @param baseFactor The base factor for the pair.
|
|
7883
|
+
* @param presetParameter The public key of the preset parameter account.
|
|
7884
|
+
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7885
|
+
* @param opt An options object.
|
|
7886
|
+
* @returns A transaction that creates the pair.
|
|
7887
|
+
* @throws If the pair already exists.
|
|
7888
|
+
*/
|
|
5650
7889
|
static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
7890
|
+
/**
|
|
7891
|
+
* Create a new liquidity pair. Support both token and token2022 program.
|
|
7892
|
+
* @param connection A connection to the Solana cluster.
|
|
7893
|
+
* @param funder The public key of the funder of the pair.
|
|
7894
|
+
* @param tokenX The mint of the first token.
|
|
7895
|
+
* @param tokenY The mint of the second token.
|
|
7896
|
+
* @param presetParameter The public key of the preset parameter account.
|
|
7897
|
+
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7898
|
+
* @param opt An options object.
|
|
7899
|
+
* @returns A transaction that creates the pair.
|
|
7900
|
+
* @throws If the pair already exists.
|
|
7901
|
+
*/
|
|
7902
|
+
static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
5651
7903
|
/**
|
|
5652
7904
|
* The function `refetchStates` retrieves and updates various states and data related to bin arrays
|
|
5653
7905
|
* and lb pairs.
|
|
5654
7906
|
*/
|
|
5655
7907
|
refetchStates(): Promise<void>;
|
|
7908
|
+
/**
|
|
7909
|
+
* Set the status of a permissionless LB pair to either enabled or disabled. This require pool field `creator_pool_on_off_control` to be true and type `CustomizablePermissionless`.
|
|
7910
|
+
* Pool creator can enable/disable the pair anytime before the pool is opened / activated. Once the pool activation time is passed, the pool creator can only enable the pair.
|
|
7911
|
+
* Useful for token launches which do not have fixed activation time.
|
|
7912
|
+
* @param enable If true, the pair will be enabled. If false, the pair will be disabled.
|
|
7913
|
+
* @param creator The public key of the pool creator.
|
|
7914
|
+
* @returns a Promise that resolves to the transaction.
|
|
7915
|
+
*/
|
|
7916
|
+
setPairStatusPermissionless(enable: boolean, creator: PublicKey): Promise<Transaction>;
|
|
5656
7917
|
/**
|
|
5657
7918
|
* The function `getBinArrays` returns an array of `BinArrayAccount` objects
|
|
5658
7919
|
* @returns a Promise that resolves to an array of BinArrayAccount objects.
|
|
@@ -5667,7 +7928,15 @@ declare class DLMM {
|
|
|
5667
7928
|
* @returns an array of `BinArrayAccount` objects.
|
|
5668
7929
|
*/
|
|
5669
7930
|
getBinArrayForSwap(swapForY: any, count?: number): Promise<BinArrayAccount[]>;
|
|
5670
|
-
|
|
7931
|
+
/**
|
|
7932
|
+
* The function `calculateFeeInfo` calculates the base fee rate percentage and maximum fee rate percentage
|
|
7933
|
+
* given the base factor, bin step, and optional base fee power factor.
|
|
7934
|
+
* @param baseFactor - The base factor of the pair.
|
|
7935
|
+
* @param binStep - The bin step of the pair.
|
|
7936
|
+
* @param baseFeePowerFactor - Optional parameter to allow small bin step to have bigger fee rate. Default to 0.
|
|
7937
|
+
* @returns an object of type `Omit<FeeInfo, "protocolFeePercentage">` with the following properties: baseFeeRatePercentage and maxFeeRatePercentage.
|
|
7938
|
+
*/
|
|
7939
|
+
static calculateFeeInfo(baseFactor: number | string, binStep: number | string, baseFeePowerFactor?: number | string): Omit<FeeInfo, "protocolFeePercentage">;
|
|
5671
7940
|
/**
|
|
5672
7941
|
* The function `getFeeInfo` calculates and returns the base fee rate percentage, maximum fee rate
|
|
5673
7942
|
* percentage, and protocol fee percentage.
|
|
@@ -5795,6 +8064,19 @@ declare class DLMM {
|
|
|
5795
8064
|
maxBinId: number;
|
|
5796
8065
|
user: PublicKey;
|
|
5797
8066
|
}): Promise<Transaction>;
|
|
8067
|
+
/**
|
|
8068
|
+
* The function `getPosition` retrieves position information for a given public key and processes it
|
|
8069
|
+
* using various data to return a `LbPosition` object.
|
|
8070
|
+
* @param {PublicKey} positionPubKey - The `getPosition` function you provided is an asynchronous
|
|
8071
|
+
* function that fetches position information based on a given public key. Here's a breakdown of the
|
|
8072
|
+
* parameters used in the function:
|
|
8073
|
+
* @returns The `getPosition` function returns a Promise that resolves to an object of type
|
|
8074
|
+
* `LbPosition`. The object contains the following properties:
|
|
8075
|
+
* - `publicKey`: The public key of the position account
|
|
8076
|
+
* - `positionData`: Position Object
|
|
8077
|
+
* - `version`: The version of the position (in this case, `Position.V2`)
|
|
8078
|
+
*/
|
|
8079
|
+
getPosition(positionPubKey: PublicKey): Promise<LbPosition>;
|
|
5798
8080
|
/**
|
|
5799
8081
|
* The function `initializePositionAndAddLiquidityByStrategy` function is used to initializes a position and adds liquidity
|
|
5800
8082
|
* @param {TInitializePositionAndAddLiquidityParamsByStrategy}
|
|
@@ -5804,11 +8086,12 @@ declare class DLMM {
|
|
|
5804
8086
|
* - `strategy`: The strategy parameters to be used for the liquidity pool (Can use `calculateStrategyParameter` to calculate).
|
|
5805
8087
|
* - `user`: The public key of the user account.
|
|
5806
8088
|
* - `slippage`: The slippage percentage to be used for the liquidity pool.
|
|
5807
|
-
* @returns {Promise<Transaction>} The function `
|
|
8089
|
+
* @returns {Promise<Transaction>} The function `initializePositionAndAddLiquidityByStrategy` returns a `Promise` that
|
|
5808
8090
|
* resolves to either a single `Transaction` object.
|
|
5809
8091
|
*/
|
|
5810
8092
|
initializePositionAndAddLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
5811
8093
|
/**
|
|
8094
|
+
* @deprecated Use `initializePositionAndAddLiquidityByStrategy` instead which support both token and token2022.
|
|
5812
8095
|
* The function `initializePositionAndAddLiquidityByWeight` function is used to initializes a position and adds liquidity
|
|
5813
8096
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
5814
8097
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -5835,6 +8118,7 @@ declare class DLMM {
|
|
|
5835
8118
|
*/
|
|
5836
8119
|
addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
5837
8120
|
/**
|
|
8121
|
+
* @deprecated Use `addLiquidityByStrategy` instead which support both token and token2022.
|
|
5838
8122
|
* The `addLiquidityByWeight` function is used to add liquidity to existing position
|
|
5839
8123
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
5840
8124
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -5853,18 +8137,27 @@ declare class DLMM {
|
|
|
5853
8137
|
* @param
|
|
5854
8138
|
* - `user`: The public key of the user account.
|
|
5855
8139
|
* - `position`: The public key of the position account.
|
|
5856
|
-
* - `
|
|
8140
|
+
* - `fromBinId`: The ID of the starting bin to remove liquidity from. Must within position range.
|
|
8141
|
+
* - `toBinId`: The ID of the ending bin to remove liquidity from. Must within position range.
|
|
5857
8142
|
* - `liquiditiesBpsToRemove`: An array of numbers (percentage) that represent the liquidity to remove from each bin.
|
|
5858
8143
|
* - `shouldClaimAndClose`: A boolean flag that indicates whether to claim rewards and close the position.
|
|
5859
|
-
* @returns {Promise<Transaction|Transaction[]>}
|
|
8144
|
+
* @returns {Promise<Transaction | Transaction[]>}
|
|
5860
8145
|
*/
|
|
5861
|
-
removeLiquidity({ user, position,
|
|
8146
|
+
removeLiquidity({ user, position, fromBinId, toBinId, bps, shouldClaimAndClose, }: {
|
|
5862
8147
|
user: PublicKey;
|
|
5863
8148
|
position: PublicKey;
|
|
5864
|
-
|
|
8149
|
+
fromBinId: number;
|
|
8150
|
+
toBinId: number;
|
|
5865
8151
|
bps: BN;
|
|
5866
8152
|
shouldClaimAndClose?: boolean;
|
|
5867
8153
|
}): Promise<Transaction | Transaction[]>;
|
|
8154
|
+
/**
|
|
8155
|
+
* The `closePositionIfEmpty` function closes a position if it is empty. Else, it does nothing.
|
|
8156
|
+
*/
|
|
8157
|
+
closePositionIfEmpty({ owner, position, }: {
|
|
8158
|
+
owner: PublicKey;
|
|
8159
|
+
position: LbPosition;
|
|
8160
|
+
}): Promise<Transaction>;
|
|
5868
8161
|
/**
|
|
5869
8162
|
* The `closePosition` function closes a position
|
|
5870
8163
|
* @param
|
|
@@ -5882,6 +8175,7 @@ declare class DLMM {
|
|
|
5882
8175
|
* - `outAmount`: Amount of lamport to swap out
|
|
5883
8176
|
* - `swapForY`: Swap token X to Y when it is true, else reversed.
|
|
5884
8177
|
* - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100
|
|
8178
|
+
* - `maxExtraBinArrays`: Maximum number of extra binArrays to return
|
|
5885
8179
|
* @returns {SwapQuote}
|
|
5886
8180
|
* - `inAmount`: Amount of lamport to swap in
|
|
5887
8181
|
* - `outAmount`: Amount of lamport to swap out
|
|
@@ -5892,7 +8186,7 @@ declare class DLMM {
|
|
|
5892
8186
|
* @throws {DlmmSdkError}
|
|
5893
8187
|
*
|
|
5894
8188
|
*/
|
|
5895
|
-
swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[]): SwapQuoteExactOut;
|
|
8189
|
+
swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], maxExtraBinArrays?: number): SwapQuoteExactOut;
|
|
5896
8190
|
/**
|
|
5897
8191
|
* The `swapQuote` function returns a quote for a swap
|
|
5898
8192
|
* @param
|
|
@@ -5901,6 +8195,7 @@ declare class DLMM {
|
|
|
5901
8195
|
* - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100
|
|
5902
8196
|
* - `binArrays`: binArrays for swapQuote.
|
|
5903
8197
|
* - `isPartialFill`: Flag to check whether the the swapQuote is partial fill, default = false.
|
|
8198
|
+
* - `maxExtraBinArrays`: Maximum number of extra binArrays to return
|
|
5904
8199
|
* @returns {SwapQuote}
|
|
5905
8200
|
* - `consumedInAmount`: Amount of lamport to swap in
|
|
5906
8201
|
* - `outAmount`: Amount of lamport to swap out
|
|
@@ -5911,7 +8206,7 @@ declare class DLMM {
|
|
|
5911
8206
|
* - `binArraysPubkey`: Array of bin arrays involved in the swap
|
|
5912
8207
|
* @throws {DlmmSdkError}
|
|
5913
8208
|
*/
|
|
5914
|
-
swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean): SwapQuote;
|
|
8209
|
+
swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean, maxExtraBinArrays?: number): SwapQuote;
|
|
5915
8210
|
swapExactOut({ inToken, outToken, outAmount, maxInAmount, lbPair, user, binArraysPubkey, }: SwapExactOutParams): Promise<Transaction>;
|
|
5916
8211
|
/**
|
|
5917
8212
|
* Returns a transaction to be signed and sent by user performing swap.
|
|
@@ -5944,7 +8239,7 @@ declare class DLMM {
|
|
|
5944
8239
|
* @param
|
|
5945
8240
|
* - `owner`: The public key of the owner of the position.
|
|
5946
8241
|
* - `position`: The public key of the position account.
|
|
5947
|
-
* @returns {Promise<Transaction>}
|
|
8242
|
+
* @returns {Promise<Transaction>} Claim LM reward transactions.
|
|
5948
8243
|
*/
|
|
5949
8244
|
claimLMReward({ owner, position, }: {
|
|
5950
8245
|
owner: PublicKey;
|
|
@@ -5956,19 +8251,21 @@ declare class DLMM {
|
|
|
5956
8251
|
* @param
|
|
5957
8252
|
* - `owner`: The public key of the owner of the positions.
|
|
5958
8253
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim rewards from.
|
|
5959
|
-
* @returns {Promise<Transaction[]>}
|
|
8254
|
+
* @returns {Promise<Transaction[]>} Array of claim LM reward and fees transactions.
|
|
5960
8255
|
*/
|
|
5961
8256
|
claimAllLMRewards({ owner, positions, }: {
|
|
5962
8257
|
owner: PublicKey;
|
|
5963
8258
|
positions: LbPosition[];
|
|
5964
8259
|
}): Promise<Transaction[]>;
|
|
5965
8260
|
setActivationPoint(activationPoint: BN): Promise<Transaction>;
|
|
8261
|
+
setPairStatus(enabled: boolean): Promise<Transaction>;
|
|
5966
8262
|
/**
|
|
5967
8263
|
* The function `claimSwapFee` is used to claim swap fees for a specific position owned by a specific owner.
|
|
5968
8264
|
* @param
|
|
5969
8265
|
* - `owner`: The public key of the owner of the position.
|
|
5970
8266
|
* - `position`: The public key of the position account.
|
|
5971
|
-
*
|
|
8267
|
+
* - `binRange`: The bin range to claim swap fees for. If not provided, the function claim swap fees for full range.
|
|
8268
|
+
* @returns {Promise<Transaction>} Claim swap fee transactions.
|
|
5972
8269
|
*/
|
|
5973
8270
|
claimSwapFee({ owner, position, }: {
|
|
5974
8271
|
owner: PublicKey;
|
|
@@ -5979,7 +8276,7 @@ declare class DLMM {
|
|
|
5979
8276
|
* @param
|
|
5980
8277
|
* - `owner`: The public key of the owner of the positions.
|
|
5981
8278
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees from.
|
|
5982
|
-
* @returns {Promise<Transaction[]>}
|
|
8279
|
+
* @returns {Promise<Transaction[]>} Array of claim swap fee transactions.
|
|
5983
8280
|
*/
|
|
5984
8281
|
claimAllSwapFee({ owner, positions, }: {
|
|
5985
8282
|
owner: PublicKey;
|
|
@@ -5991,40 +8288,45 @@ declare class DLMM {
|
|
|
5991
8288
|
* @param
|
|
5992
8289
|
* - `owner`: The public key of the owner of the position.
|
|
5993
8290
|
* - `position`: The public key of the position account.
|
|
5994
|
-
* @returns {Promise<Transaction[]>}
|
|
8291
|
+
* @returns {Promise<Transaction[]>} Array of claim reward transactions.
|
|
5995
8292
|
*/
|
|
5996
8293
|
claimAllRewardsByPosition({ owner, position, }: {
|
|
5997
8294
|
owner: PublicKey;
|
|
5998
8295
|
position: LbPosition;
|
|
5999
8296
|
}): Promise<Transaction[]>;
|
|
6000
8297
|
/**
|
|
6001
|
-
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be
|
|
8298
|
+
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be [init ata + send lamport for token provde], [initialize bin array + initialize position instructions] and [deposit instruction]. Each grouped instructions can be executed parallelly.
|
|
6002
8299
|
* @param
|
|
6003
8300
|
* - `owner`: The public key of the positions owner.
|
|
6004
8301
|
* - `seedAmount`: Lamport amount to be seeded to the pool.
|
|
6005
8302
|
* - `minPrice`: Start price in UI format
|
|
6006
8303
|
* - `maxPrice`: End price in UI format
|
|
6007
8304
|
* - `base`: Base key
|
|
8305
|
+
* - `txPayer`: Account rental fee payer
|
|
8306
|
+
* - `feeOwner`: Fee owner key. Default to position owner
|
|
8307
|
+
* - `operator`: Operator key
|
|
8308
|
+
* - `lockReleasePoint`: Timelock. Point (slot/timestamp) the position can withdraw the liquidity,
|
|
8309
|
+
* - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
|
|
6008
8310
|
* @returns {Promise<SeedLiquidityResponse>}
|
|
6009
8311
|
*/
|
|
6010
|
-
seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey): Promise<SeedLiquidityResponse>;
|
|
8312
|
+
seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey, payer: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<SeedLiquidityResponse>;
|
|
6011
8313
|
/**
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
8314
|
+
* The `seedLiquiditySingleBin` function seed liquidity into a single bin.
|
|
8315
|
+
* @param
|
|
8316
|
+
* - `payer`: The public key of the tx payer.
|
|
8317
|
+
* - `base`: Base key
|
|
8318
|
+
* - `seedAmount`: Token X lamport amount to be seeded to the pool.
|
|
8319
|
+
* - `price`: TokenX/TokenY Price in UI format
|
|
8320
|
+
* - `roundingUp`: Whether to round up the price
|
|
8321
|
+
* - `positionOwner`: The owner of the position
|
|
8322
|
+
* - `feeOwner`: Position fee owner
|
|
8323
|
+
* - `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.
|
|
8324
|
+
* - `lockReleasePoint`: The lock release point of the position.
|
|
8325
|
+
* - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
|
|
8326
|
+
*
|
|
8327
|
+
* The returned instructions need to be executed sequentially if it was separated into multiple transactions.
|
|
8328
|
+
* @returns {Promise<TransactionInstruction[]>}
|
|
8329
|
+
*/
|
|
6028
8330
|
seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<TransactionInstruction[]>;
|
|
6029
8331
|
/**
|
|
6030
8332
|
* Initializes bin arrays for the given bin array indexes if it wasn't initialized.
|
|
@@ -6062,7 +8364,7 @@ declare class DLMM {
|
|
|
6062
8364
|
* @param
|
|
6063
8365
|
* - `owner`: The public key of the owner of the positions.
|
|
6064
8366
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees and LM rewards from.
|
|
6065
|
-
* @returns {Promise<Transaction[]>}
|
|
8367
|
+
* @returns {Promise<Transaction[]>} Array of claim swap fee and LM reward transactions.
|
|
6066
8368
|
*/
|
|
6067
8369
|
claimAllRewards({ owner, positions, }: {
|
|
6068
8370
|
owner: PublicKey;
|
|
@@ -6078,10 +8380,6 @@ declare class DLMM {
|
|
|
6078
8380
|
*/
|
|
6079
8381
|
syncWithMarketPrice(marketPrice: number, owner: PublicKey): Promise<Transaction>;
|
|
6080
8382
|
getMaxPriceInBinArrays(binArrayAccounts: BinArrayAccount[]): Promise<string>;
|
|
6081
|
-
getAmountOutWithdrawSingleSide(maxLiquidityShare: BN, price: BN, bin: Bin, isWithdrawForY: boolean): {
|
|
6082
|
-
withdrawAmount: BN;
|
|
6083
|
-
};
|
|
6084
|
-
getWithdrawSingleSideAmount(positionPubkey: PublicKey, isWithdrawForY: boolean): Promise<BN>;
|
|
6085
8383
|
/**
|
|
6086
8384
|
*
|
|
6087
8385
|
* @param swapInitiator Address of the swap initiator
|
|
@@ -6090,8 +8388,6 @@ declare class DLMM {
|
|
|
6090
8388
|
isSwapDisabled(swapInitiator: PublicKey): boolean;
|
|
6091
8389
|
/** Private static method */
|
|
6092
8390
|
private static getBinArrays;
|
|
6093
|
-
private static getClaimableLMReward;
|
|
6094
|
-
private static getClaimableSwapFee;
|
|
6095
8391
|
private static processPosition;
|
|
6096
8392
|
private static getBinsBetweenLowerAndUpperBound;
|
|
6097
8393
|
/** Private method */
|
|
@@ -6103,9 +8399,12 @@ declare class DLMM {
|
|
|
6103
8399
|
private updateReference;
|
|
6104
8400
|
private createClaimBuildMethod;
|
|
6105
8401
|
private createClaimSwapFeeMethod;
|
|
8402
|
+
private getPotentialToken2022IxDataAndAccounts;
|
|
6106
8403
|
}
|
|
6107
8404
|
|
|
6108
8405
|
/** private */
|
|
8406
|
+
declare function derivePresetParameterWithIndex(index: BN, programId: PublicKey): [PublicKey, number];
|
|
8407
|
+
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
6109
8408
|
/**
|
|
6110
8409
|
*
|
|
6111
8410
|
* @deprecated Use derivePresetParameter2
|
|
@@ -6124,6 +8423,9 @@ declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicK
|
|
|
6124
8423
|
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN, width: BN, programId: PublicKey): [PublicKey, number];
|
|
6125
8424
|
declare function deriveBinArray(lbPair: PublicKey, index: BN, programId: PublicKey): [PublicKey, number];
|
|
6126
8425
|
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8426
|
+
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8427
|
+
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
8428
|
+
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN, programId: PublicKey): [PublicKey, number];
|
|
6127
8429
|
|
|
6128
8430
|
/** private */
|
|
6129
8431
|
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN): boolean;
|
|
@@ -6173,17 +8475,44 @@ declare function calculateNormalDistribution(activeBin: number, binIds: number[]
|
|
|
6173
8475
|
xAmountBpsOfTotal: BN;
|
|
6174
8476
|
yAmountBpsOfTotal: BN;
|
|
6175
8477
|
}[];
|
|
8478
|
+
/**
|
|
8479
|
+
* Converts a weight distribution into token amounts for one side (either bid or ask).
|
|
8480
|
+
*
|
|
8481
|
+
* @param amount - The total amount of liquidity to distribute.
|
|
8482
|
+
* @param distributions - The array of weight distributions for each bin.
|
|
8483
|
+
* @param binStep - The step interval between bin ids.
|
|
8484
|
+
* @param activeId - The id of the active bin.
|
|
8485
|
+
* @param depositForY - Flag indicating if the deposit is for token Y (bid side).
|
|
8486
|
+
* @param mint - Mint information for the token. Mint Y if depositForY is true, else Mint X. Get from DLMM instance.
|
|
8487
|
+
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8488
|
+
* @returns An array of objects containing binId and amount for each bin.
|
|
8489
|
+
*/
|
|
6176
8490
|
declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions: {
|
|
6177
8491
|
binId: number;
|
|
6178
8492
|
weight: number;
|
|
6179
|
-
}[], binStep: number, activeId: number, depositForY: boolean): {
|
|
8493
|
+
}[], binStep: number, activeId: number, depositForY: boolean, mint: Mint, clock: Clock): {
|
|
6180
8494
|
binId: number;
|
|
6181
8495
|
amount: BN;
|
|
6182
8496
|
}[];
|
|
8497
|
+
/**
|
|
8498
|
+
* Converts a weight distribution into token amounts for both bid and ask sides.
|
|
8499
|
+
*
|
|
8500
|
+
* @param amountX - The total amount of token X to distribute.
|
|
8501
|
+
* @param amountY - The total amount of token Y to distribute.
|
|
8502
|
+
* @param distributions - The array of weight distributions for each bin.
|
|
8503
|
+
* @param binStep - The step interval between bin ids.
|
|
8504
|
+
* @param activeId - The id of the active bin.
|
|
8505
|
+
* @param amountXInActiveBin - The amount of token X in the active bin.
|
|
8506
|
+
* @param amountYInActiveBin - The amount of token Y in the active bin.
|
|
8507
|
+
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8508
|
+
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8509
|
+
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8510
|
+
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8511
|
+
*/
|
|
6183
8512
|
declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distributions: {
|
|
6184
8513
|
binId: number;
|
|
6185
8514
|
weight: number;
|
|
6186
|
-
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN): {
|
|
8515
|
+
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
6187
8516
|
binId: number;
|
|
6188
8517
|
amountX: BN;
|
|
6189
8518
|
amountY: BN;
|
|
@@ -6208,24 +8537,58 @@ declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sP
|
|
|
6208
8537
|
protocolFee: BN;
|
|
6209
8538
|
};
|
|
6210
8539
|
|
|
8540
|
+
/**
|
|
8541
|
+
* Distribute totalAmount to all bid side bins according to given distributions.
|
|
8542
|
+
* @param activeId active bin id
|
|
8543
|
+
* @param totalAmount total amount of token Y to be distributed
|
|
8544
|
+
* @param distributions weight distribution of each bin
|
|
8545
|
+
* @param mintY mint of token Y, get from DLMM instance
|
|
8546
|
+
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8547
|
+
* @returns array of {binId, amount} where amount is the amount of token Y in each bin
|
|
8548
|
+
*/
|
|
6211
8549
|
declare function toAmountBidSide(activeId: number, totalAmount: BN, distributions: {
|
|
6212
8550
|
binId: number;
|
|
6213
8551
|
weight: number;
|
|
6214
|
-
}[]): {
|
|
8552
|
+
}[], mintY: Mint, clock: Clock): {
|
|
6215
8553
|
binId: number;
|
|
6216
8554
|
amount: BN;
|
|
6217
8555
|
}[];
|
|
8556
|
+
/**
|
|
8557
|
+
* Distribute totalAmount to all ask side bins according to given distributions.
|
|
8558
|
+
* @param activeId active bin id
|
|
8559
|
+
* @param totalAmount total amount of token Y to be distributed
|
|
8560
|
+
* @param distributions weight distribution of each bin
|
|
8561
|
+
* @param mintX mint of token X, get from DLMM instance
|
|
8562
|
+
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8563
|
+
* @returns array of {binId, amount} where amount is the amount of token X in each bin
|
|
8564
|
+
*/
|
|
6218
8565
|
declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN, distributions: {
|
|
6219
8566
|
binId: number;
|
|
6220
8567
|
weight: number;
|
|
6221
|
-
}[]): {
|
|
8568
|
+
}[], mintX: Mint, clock: Clock): {
|
|
6222
8569
|
binId: number;
|
|
6223
8570
|
amount: BN;
|
|
6224
8571
|
}[];
|
|
8572
|
+
/**
|
|
8573
|
+
* Distributes the given amounts of tokens X and Y to both bid and ask side bins
|
|
8574
|
+
* based on the provided weight distributions.
|
|
8575
|
+
*
|
|
8576
|
+
* @param activeId - The id of the active bin.
|
|
8577
|
+
* @param binStep - The step interval between bin ids.
|
|
8578
|
+
* @param amountX - Total amount of token X to distribute.
|
|
8579
|
+
* @param amountY - Total amount of token Y to distribute.
|
|
8580
|
+
* @param amountXInActiveBin - Amount of token X already in the active bin.
|
|
8581
|
+
* @param amountYInActiveBin - Amount of token Y already in the active bin.
|
|
8582
|
+
* @param distributions - Array of bins with their respective weight distributions.
|
|
8583
|
+
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8584
|
+
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8585
|
+
* @param clock - Clock instance. Get from DLMM instance.
|
|
8586
|
+
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8587
|
+
*/
|
|
6225
8588
|
declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
6226
8589
|
binId: number;
|
|
6227
8590
|
weight: number;
|
|
6228
|
-
}[]): {
|
|
8591
|
+
}[], mintX: Mint, mintY: Mint, clock: Clock): {
|
|
6229
8592
|
binId: number;
|
|
6230
8593
|
amountX: BN;
|
|
6231
8594
|
amountY: BN;
|
|
@@ -6239,11 +8602,23 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
|
|
|
6239
8602
|
weight: number;
|
|
6240
8603
|
}[]): BN;
|
|
6241
8604
|
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
8605
|
+
/**
|
|
8606
|
+
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
8607
|
+
* @param activeId The bin id of the active bin.
|
|
8608
|
+
* @param binStep The step size of each bin.
|
|
8609
|
+
* @param minBinId The min bin id.
|
|
8610
|
+
* @param maxBinId The max bin id.
|
|
8611
|
+
* @param amountX The amount of X token to deposit.
|
|
8612
|
+
* @param amountY The amount of Y token to deposit.
|
|
8613
|
+
* @param amountXInActiveBin The amount of X token in the active bin.
|
|
8614
|
+
* @param amountYInActiveBin The amount of Y token in the active bin.
|
|
8615
|
+
* @param strategyType The strategy type.
|
|
8616
|
+
* @param mintX The mint info of X token. Get from DLMM instance.
|
|
8617
|
+
* @param mintY The mint info of Y token. Get from DLMM instance.
|
|
8618
|
+
* @param clock The clock info. Get from DLMM instance.
|
|
8619
|
+
* @returns The distribution of liquidity.
|
|
8620
|
+
*/
|
|
8621
|
+
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): {
|
|
6247
8622
|
binId: number;
|
|
6248
8623
|
amountX: BN;
|
|
6249
8624
|
amountY: BN;
|
|
@@ -6251,58 +8626,10 @@ declare function toAmountsBothSideByStrategy(activeId: number, binStep: number,
|
|
|
6251
8626
|
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
6252
8627
|
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
6253
8628
|
declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): {
|
|
6254
|
-
minBinId: number;
|
|
6255
|
-
maxBinId: number;
|
|
6256
|
-
strategyType: {
|
|
6257
|
-
spotOneSide: {};
|
|
6258
|
-
curveOneSide?: undefined;
|
|
6259
|
-
bidAskOneSide?: undefined;
|
|
6260
|
-
spotBalanced?: undefined;
|
|
6261
|
-
curveBalanced?: undefined;
|
|
6262
|
-
bidAskBalanced?: undefined;
|
|
6263
|
-
spotImBalanced?: undefined;
|
|
6264
|
-
curveImBalanced?: undefined;
|
|
6265
|
-
bidAskImBalanced?: undefined;
|
|
6266
|
-
};
|
|
6267
|
-
parameteres: number[];
|
|
6268
|
-
} | {
|
|
6269
|
-
minBinId: number;
|
|
6270
|
-
maxBinId: number;
|
|
6271
|
-
strategyType: {
|
|
6272
|
-
curveOneSide: {};
|
|
6273
|
-
spotOneSide?: undefined;
|
|
6274
|
-
bidAskOneSide?: undefined;
|
|
6275
|
-
spotBalanced?: undefined;
|
|
6276
|
-
curveBalanced?: undefined;
|
|
6277
|
-
bidAskBalanced?: undefined;
|
|
6278
|
-
spotImBalanced?: undefined;
|
|
6279
|
-
curveImBalanced?: undefined;
|
|
6280
|
-
bidAskImBalanced?: undefined;
|
|
6281
|
-
};
|
|
6282
|
-
parameteres: number[];
|
|
6283
|
-
} | {
|
|
6284
|
-
minBinId: number;
|
|
6285
|
-
maxBinId: number;
|
|
6286
|
-
strategyType: {
|
|
6287
|
-
bidAskOneSide: {};
|
|
6288
|
-
spotOneSide?: undefined;
|
|
6289
|
-
curveOneSide?: undefined;
|
|
6290
|
-
spotBalanced?: undefined;
|
|
6291
|
-
curveBalanced?: undefined;
|
|
6292
|
-
bidAskBalanced?: undefined;
|
|
6293
|
-
spotImBalanced?: undefined;
|
|
6294
|
-
curveImBalanced?: undefined;
|
|
6295
|
-
bidAskImBalanced?: undefined;
|
|
6296
|
-
};
|
|
6297
|
-
parameteres: number[];
|
|
6298
|
-
} | {
|
|
6299
8629
|
minBinId: number;
|
|
6300
8630
|
maxBinId: number;
|
|
6301
8631
|
strategyType: {
|
|
6302
8632
|
spotBalanced: {};
|
|
6303
|
-
spotOneSide?: undefined;
|
|
6304
|
-
curveOneSide?: undefined;
|
|
6305
|
-
bidAskOneSide?: undefined;
|
|
6306
8633
|
curveBalanced?: undefined;
|
|
6307
8634
|
bidAskBalanced?: undefined;
|
|
6308
8635
|
spotImBalanced?: undefined;
|
|
@@ -6315,9 +8642,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6315
8642
|
maxBinId: number;
|
|
6316
8643
|
strategyType: {
|
|
6317
8644
|
curveBalanced: {};
|
|
6318
|
-
spotOneSide?: undefined;
|
|
6319
|
-
curveOneSide?: undefined;
|
|
6320
|
-
bidAskOneSide?: undefined;
|
|
6321
8645
|
spotBalanced?: undefined;
|
|
6322
8646
|
bidAskBalanced?: undefined;
|
|
6323
8647
|
spotImBalanced?: undefined;
|
|
@@ -6330,9 +8654,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6330
8654
|
maxBinId: number;
|
|
6331
8655
|
strategyType: {
|
|
6332
8656
|
bidAskBalanced: {};
|
|
6333
|
-
spotOneSide?: undefined;
|
|
6334
|
-
curveOneSide?: undefined;
|
|
6335
|
-
bidAskOneSide?: undefined;
|
|
6336
8657
|
spotBalanced?: undefined;
|
|
6337
8658
|
curveBalanced?: undefined;
|
|
6338
8659
|
spotImBalanced?: undefined;
|
|
@@ -6345,9 +8666,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6345
8666
|
maxBinId: number;
|
|
6346
8667
|
strategyType: {
|
|
6347
8668
|
spotImBalanced: {};
|
|
6348
|
-
spotOneSide?: undefined;
|
|
6349
|
-
curveOneSide?: undefined;
|
|
6350
|
-
bidAskOneSide?: undefined;
|
|
6351
8669
|
spotBalanced?: undefined;
|
|
6352
8670
|
curveBalanced?: undefined;
|
|
6353
8671
|
bidAskBalanced?: undefined;
|
|
@@ -6360,9 +8678,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6360
8678
|
maxBinId: number;
|
|
6361
8679
|
strategyType: {
|
|
6362
8680
|
curveImBalanced: {};
|
|
6363
|
-
spotOneSide?: undefined;
|
|
6364
|
-
curveOneSide?: undefined;
|
|
6365
|
-
bidAskOneSide?: undefined;
|
|
6366
8681
|
spotBalanced?: undefined;
|
|
6367
8682
|
curveBalanced?: undefined;
|
|
6368
8683
|
bidAskBalanced?: undefined;
|
|
@@ -6375,9 +8690,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6375
8690
|
maxBinId: number;
|
|
6376
8691
|
strategyType: {
|
|
6377
8692
|
bidAskImBalanced: {};
|
|
6378
|
-
spotOneSide?: undefined;
|
|
6379
|
-
curveOneSide?: undefined;
|
|
6380
|
-
bidAskOneSide?: undefined;
|
|
6381
8693
|
spotBalanced?: undefined;
|
|
6382
8694
|
curveBalanced?: undefined;
|
|
6383
8695
|
bidAskBalanced?: undefined;
|
|
@@ -6395,10 +8707,15 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6395
8707
|
*/
|
|
6396
8708
|
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
6397
8709
|
cluster?: Cluster;
|
|
8710
|
+
programId?: PublicKey;
|
|
6398
8711
|
}): Promise<{
|
|
6399
8712
|
tokenXMint: PublicKey;
|
|
6400
8713
|
tokenYMint: PublicKey;
|
|
6401
8714
|
}>;
|
|
8715
|
+
declare function getTokenProgramId(lbPairState: LbPair): {
|
|
8716
|
+
tokenXProgram: PublicKey;
|
|
8717
|
+
tokenYProgram: PublicKey;
|
|
8718
|
+
};
|
|
6402
8719
|
|
|
6403
8720
|
declare function chunks<T>(array: T[], size: number): T[][];
|
|
6404
8721
|
declare function range<T>(min: number, max: number, mapfn: (i: number) => T): T[];
|
|
@@ -6413,6 +8730,7 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
6413
8730
|
minBinId: number;
|
|
6414
8731
|
maxBinId: number;
|
|
6415
8732
|
protocolShare: number;
|
|
8733
|
+
baseFeePowerFactor: number;
|
|
6416
8734
|
padding: number[];
|
|
6417
8735
|
};
|
|
6418
8736
|
vParameters: {
|
|
@@ -6432,7 +8750,7 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
6432
8750
|
requireBaseFactorSeed: number;
|
|
6433
8751
|
baseFactorSeed: number[];
|
|
6434
8752
|
activationType: number;
|
|
6435
|
-
|
|
8753
|
+
creatorPoolOnOffControl: number;
|
|
6436
8754
|
tokenXMint: PublicKey;
|
|
6437
8755
|
tokenYMint: PublicKey;
|
|
6438
8756
|
reserveX: PublicKey;
|
|
@@ -6463,6 +8781,8 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
6463
8781
|
padding3: number[];
|
|
6464
8782
|
padding4: BN;
|
|
6465
8783
|
creator: PublicKey;
|
|
8784
|
+
tokenMintXProgramFlag: number;
|
|
8785
|
+
tokenMintYProgramFlag: number;
|
|
6466
8786
|
reserved: number[];
|
|
6467
8787
|
}[]>;
|
|
6468
8788
|
declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{
|
|
@@ -6472,7 +8792,7 @@ declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: Clm
|
|
|
6472
8792
|
}[]>;
|
|
6473
8793
|
declare function getOutAmount(bin: Bin, inAmount: BN, swapForY: boolean): BN;
|
|
6474
8794
|
declare function getTokenDecimals(conn: Connection, mint: PublicKey): Promise<number>;
|
|
6475
|
-
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
8795
|
+
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, programId?: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
6476
8796
|
declare function getTokenBalance(conn: Connection, tokenAccount: PublicKey): Promise<bigint>;
|
|
6477
8797
|
declare const parseLogs: <T>(eventParser: EventParser, logs: string[]) => T;
|
|
6478
8798
|
declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[];
|
|
@@ -6505,7 +8825,7 @@ declare class DLMMError extends Error {
|
|
|
6505
8825
|
errorMessage: string;
|
|
6506
8826
|
constructor(error: object | Codes);
|
|
6507
8827
|
}
|
|
6508
|
-
type ErrorName = "SWAP_QUOTE_INSUFFICIENT_LIQUIDITY";
|
|
8828
|
+
type ErrorName = "SWAP_QUOTE_INSUFFICIENT_LIQUIDITY" | "INVALID_MAX_EXTRA_BIN_ARRAYS";
|
|
6509
8829
|
declare class DlmmSdkError extends Error {
|
|
6510
8830
|
name: ErrorName;
|
|
6511
8831
|
message: string;
|
|
@@ -6545,5 +8865,7 @@ declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
|
|
|
6545
8865
|
declare const MAX_BIN_PER_TX = 69;
|
|
6546
8866
|
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
6547
8867
|
declare const ILM_BASE: PublicKey;
|
|
8868
|
+
declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
8869
|
+
declare const U64_MAX: BN;
|
|
6548
8870
|
|
|
6549
|
-
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, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionV2, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveLbPair, deriveLbPair2, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, deriveReserve, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy,
|
|
8871
|
+
export { ADMIN, ActionType, 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, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MEMO_PROGRAM_ID, Network, POSITION_FEE, POSITION_V2_DISC, PRECISION, PairLockInfo, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionV2, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, RemainingAccountInfo, RemainingAccountsInfoSlice, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, U64_MAX, 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, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|