@meteora-ag/dlmm 1.4.1-rc.0 → 1.4.2
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/README.md +147 -120
- package/dist/index.d.ts +247 -2424
- package/dist/index.js +1669 -4408
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1924 -4663
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
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,
|
|
4
|
+
import { PublicKey, TransactionInstruction, Connection, Transaction, Cluster } from '@solana/web3.js';
|
|
5
5
|
import Decimal from 'decimal.js';
|
|
6
|
-
import { Mint } from '@solana/spl-token';
|
|
7
6
|
|
|
8
7
|
type LbClmm = {
|
|
9
|
-
"version": "0.
|
|
8
|
+
"version": "0.8.6";
|
|
10
9
|
"name": "lb_clmm";
|
|
11
10
|
"constants": [
|
|
12
11
|
{
|
|
@@ -28,20 +27,6 @@ type LbClmm = {
|
|
|
28
27
|
};
|
|
29
28
|
"value": "70";
|
|
30
29
|
},
|
|
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
|
-
},
|
|
45
30
|
{
|
|
46
31
|
"name": "MIN_BIN_ID";
|
|
47
32
|
"type": "i32";
|
|
@@ -158,20 +143,10 @@ type LbClmm = {
|
|
|
158
143
|
"type": "bytes";
|
|
159
144
|
"value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]";
|
|
160
145
|
},
|
|
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
|
-
},
|
|
166
146
|
{
|
|
167
147
|
"name": "POSITION";
|
|
168
148
|
"type": "bytes";
|
|
169
149
|
"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]";
|
|
175
150
|
}
|
|
176
151
|
];
|
|
177
152
|
"instructions": [
|
|
@@ -311,24 +286,7 @@ type LbClmm = {
|
|
|
311
286
|
"isSigner": true;
|
|
312
287
|
},
|
|
313
288
|
{
|
|
314
|
-
"name": "
|
|
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";
|
|
289
|
+
"name": "tokenProgram";
|
|
332
290
|
"isMut": false;
|
|
333
291
|
"isSigner": false;
|
|
334
292
|
},
|
|
@@ -1587,19 +1545,6 @@ type LbClmm = {
|
|
|
1587
1545
|
"isMut": true;
|
|
1588
1546
|
"isSigner": false;
|
|
1589
1547
|
},
|
|
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
|
-
},
|
|
1603
1548
|
{
|
|
1604
1549
|
"name": "tokenXProgram";
|
|
1605
1550
|
"isMut": false;
|
|
@@ -1609,11 +1554,6 @@ type LbClmm = {
|
|
|
1609
1554
|
"name": "tokenYProgram";
|
|
1610
1555
|
"isMut": false;
|
|
1611
1556
|
"isSigner": false;
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
"name": "memoProgram";
|
|
1615
|
-
"isMut": false;
|
|
1616
|
-
"isSigner": false;
|
|
1617
1557
|
}
|
|
1618
1558
|
];
|
|
1619
1559
|
"args": [
|
|
@@ -1624,12 +1564,6 @@ type LbClmm = {
|
|
|
1624
1564
|
{
|
|
1625
1565
|
"name": "amountY";
|
|
1626
1566
|
"type": "u64";
|
|
1627
|
-
},
|
|
1628
|
-
{
|
|
1629
|
-
"name": "remainingAccountsInfo";
|
|
1630
|
-
"type": {
|
|
1631
|
-
"defined": "RemainingAccountsInfo";
|
|
1632
|
-
};
|
|
1633
1567
|
}
|
|
1634
1568
|
];
|
|
1635
1569
|
},
|
|
@@ -1651,12 +1585,6 @@ type LbClmm = {
|
|
|
1651
1585
|
"isMut": false;
|
|
1652
1586
|
"isSigner": false;
|
|
1653
1587
|
},
|
|
1654
|
-
{
|
|
1655
|
-
"name": "tokenBadge";
|
|
1656
|
-
"isMut": false;
|
|
1657
|
-
"isSigner": false;
|
|
1658
|
-
"isOptional": true;
|
|
1659
|
-
},
|
|
1660
1588
|
{
|
|
1661
1589
|
"name": "admin";
|
|
1662
1590
|
"isMut": true;
|
|
@@ -1764,12 +1692,6 @@ type LbClmm = {
|
|
|
1764
1692
|
{
|
|
1765
1693
|
"name": "carryForward";
|
|
1766
1694
|
"type": "bool";
|
|
1767
|
-
},
|
|
1768
|
-
{
|
|
1769
|
-
"name": "remainingAccountsInfo";
|
|
1770
|
-
"type": {
|
|
1771
|
-
"defined": "RemainingAccountsInfo";
|
|
1772
|
-
};
|
|
1773
1695
|
}
|
|
1774
1696
|
];
|
|
1775
1697
|
},
|
|
@@ -2192,27 +2114,6 @@ type LbClmm = {
|
|
|
2192
2114
|
];
|
|
2193
2115
|
"args": [];
|
|
2194
2116
|
},
|
|
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
|
-
},
|
|
2216
2117
|
{
|
|
2217
2118
|
"name": "removeAllLiquidity";
|
|
2218
2119
|
"accounts": [
|
|
@@ -2457,11 +2358,6 @@ type LbClmm = {
|
|
|
2457
2358
|
"isMut": false;
|
|
2458
2359
|
"isSigner": false;
|
|
2459
2360
|
},
|
|
2460
|
-
{
|
|
2461
|
-
"name": "memoProgram";
|
|
2462
|
-
"isMut": false;
|
|
2463
|
-
"isSigner": false;
|
|
2464
|
-
},
|
|
2465
2361
|
{
|
|
2466
2362
|
"name": "eventAuthority";
|
|
2467
2363
|
"isMut": false;
|
|
@@ -2477,12 +2373,6 @@ type LbClmm = {
|
|
|
2477
2373
|
{
|
|
2478
2374
|
"name": "rewardIndex";
|
|
2479
2375
|
"type": "u64";
|
|
2480
|
-
},
|
|
2481
|
-
{
|
|
2482
|
-
"name": "remainingAccountsInfo";
|
|
2483
|
-
"type": {
|
|
2484
|
-
"defined": "RemainingAccountsInfo";
|
|
2485
|
-
};
|
|
2486
2376
|
}
|
|
2487
2377
|
];
|
|
2488
2378
|
},
|
|
@@ -2787,1452 +2677,103 @@ type LbClmm = {
|
|
|
2787
2677
|
"type": "u8";
|
|
2788
2678
|
}
|
|
2789
2679
|
];
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
|
|
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
|
-
},
|
|
2680
|
+
}
|
|
2681
|
+
];
|
|
2682
|
+
"accounts": [
|
|
2817
2683
|
{
|
|
2818
|
-
"name": "
|
|
2819
|
-
"
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2684
|
+
"name": "binArrayBitmapExtension";
|
|
2685
|
+
"type": {
|
|
2686
|
+
"kind": "struct";
|
|
2687
|
+
"fields": [
|
|
2688
|
+
{
|
|
2689
|
+
"name": "lbPair";
|
|
2690
|
+
"type": "publicKey";
|
|
2691
|
+
},
|
|
2692
|
+
{
|
|
2693
|
+
"name": "positiveBinArrayBitmap";
|
|
2694
|
+
"docs": [
|
|
2695
|
+
"Packed initialized bin array state for start_bin_index is positive"
|
|
2696
|
+
];
|
|
2697
|
+
"type": {
|
|
2698
|
+
"array": [
|
|
2699
|
+
{
|
|
2700
|
+
"array": [
|
|
2701
|
+
"u64",
|
|
2702
|
+
8
|
|
2703
|
+
];
|
|
2704
|
+
},
|
|
2705
|
+
12
|
|
2706
|
+
];
|
|
2707
|
+
};
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"name": "negativeBinArrayBitmap";
|
|
2711
|
+
"docs": [
|
|
2712
|
+
"Packed initialized bin array state for start_bin_index is negative"
|
|
2713
|
+
];
|
|
2714
|
+
"type": {
|
|
2715
|
+
"array": [
|
|
2716
|
+
{
|
|
2717
|
+
"array": [
|
|
2718
|
+
"u64",
|
|
2719
|
+
8
|
|
2720
|
+
];
|
|
2721
|
+
},
|
|
2722
|
+
12
|
|
2723
|
+
];
|
|
2724
|
+
};
|
|
2725
|
+
}
|
|
2726
|
+
];
|
|
2727
|
+
};
|
|
2842
2728
|
},
|
|
2843
2729
|
{
|
|
2844
|
-
"name": "
|
|
2845
|
-
"
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
},
|
|
2851
|
-
{
|
|
2852
|
-
"name": "rentReceiver";
|
|
2853
|
-
"isMut": true;
|
|
2854
|
-
"isSigner": false;
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
"name": "admin";
|
|
2858
|
-
"isMut": false;
|
|
2859
|
-
"isSigner": true;
|
|
2860
|
-
}
|
|
2730
|
+
"name": "binArray";
|
|
2731
|
+
"docs": [
|
|
2732
|
+
"An account to contain a range of bin. For example: Bin 100 <-> 200.",
|
|
2733
|
+
"For example:",
|
|
2734
|
+
"BinArray index: 0 contains bin 0 <-> 599",
|
|
2735
|
+
"index: 2 contains bin 600 <-> 1199, ..."
|
|
2861
2736
|
];
|
|
2862
|
-
"
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
"
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
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
|
-
};
|
|
2737
|
+
"type": {
|
|
2738
|
+
"kind": "struct";
|
|
2739
|
+
"fields": [
|
|
2740
|
+
{
|
|
2741
|
+
"name": "index";
|
|
2742
|
+
"type": "i64";
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
"name": "version";
|
|
2746
|
+
"docs": [
|
|
2747
|
+
"Version of binArray"
|
|
2748
|
+
];
|
|
2749
|
+
"type": "u8";
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
"name": "padding";
|
|
2753
|
+
"type": {
|
|
2754
|
+
"array": [
|
|
2755
|
+
"u8",
|
|
2756
|
+
7
|
|
2757
|
+
];
|
|
2758
|
+
};
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
"name": "lbPair";
|
|
2762
|
+
"type": "publicKey";
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"name": "bins";
|
|
2766
|
+
"type": {
|
|
2767
|
+
"array": [
|
|
2768
|
+
{
|
|
2769
|
+
"defined": "Bin";
|
|
2770
|
+
},
|
|
2771
|
+
70
|
|
2772
|
+
];
|
|
2773
|
+
};
|
|
2774
|
+
}
|
|
2775
|
+
];
|
|
2776
|
+
};
|
|
4236
2777
|
},
|
|
4237
2778
|
{
|
|
4238
2779
|
"name": "lbPair";
|
|
@@ -4488,20 +3029,6 @@ type LbClmm = {
|
|
|
4488
3029
|
];
|
|
4489
3030
|
"type": "publicKey";
|
|
4490
3031
|
},
|
|
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
|
-
},
|
|
4505
3032
|
{
|
|
4506
3033
|
"name": "reserved";
|
|
4507
3034
|
"docs": [
|
|
@@ -4510,7 +3037,7 @@ type LbClmm = {
|
|
|
4510
3037
|
"type": {
|
|
4511
3038
|
"array": [
|
|
4512
3039
|
"u8",
|
|
4513
|
-
|
|
3040
|
+
24
|
|
4514
3041
|
];
|
|
4515
3042
|
};
|
|
4516
3043
|
}
|
|
@@ -4713,200 +3240,103 @@ type LbClmm = {
|
|
|
4713
3240
|
};
|
|
4714
3241
|
},
|
|
4715
3242
|
{
|
|
4716
|
-
"name": "feeInfos";
|
|
4717
|
-
"docs": [
|
|
4718
|
-
"Swap fee to claim information"
|
|
4719
|
-
];
|
|
4720
|
-
"type": {
|
|
4721
|
-
"array": [
|
|
4722
|
-
{
|
|
4723
|
-
"defined": "FeeInfo";
|
|
4724
|
-
},
|
|
4725
|
-
70
|
|
4726
|
-
];
|
|
4727
|
-
};
|
|
4728
|
-
},
|
|
4729
|
-
{
|
|
4730
|
-
"name": "lowerBinId";
|
|
4731
|
-
"docs": [
|
|
4732
|
-
"Lower bin ID"
|
|
4733
|
-
];
|
|
4734
|
-
"type": "i32";
|
|
4735
|
-
},
|
|
4736
|
-
{
|
|
4737
|
-
"name": "upperBinId";
|
|
4738
|
-
"docs": [
|
|
4739
|
-
"Upper bin ID"
|
|
4740
|
-
];
|
|
4741
|
-
"type": "i32";
|
|
4742
|
-
},
|
|
4743
|
-
{
|
|
4744
|
-
"name": "lastUpdatedAt";
|
|
4745
|
-
"docs": [
|
|
4746
|
-
"Last updated timestamp"
|
|
4747
|
-
];
|
|
4748
|
-
"type": "i64";
|
|
4749
|
-
},
|
|
4750
|
-
{
|
|
4751
|
-
"name": "totalClaimedFeeXAmount";
|
|
4752
|
-
"docs": [
|
|
4753
|
-
"Total claimed token fee X"
|
|
4754
|
-
];
|
|
4755
|
-
"type": "u64";
|
|
4756
|
-
},
|
|
4757
|
-
{
|
|
4758
|
-
"name": "totalClaimedFeeYAmount";
|
|
4759
|
-
"docs": [
|
|
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";
|
|
3243
|
+
"name": "feeInfos";
|
|
4806
3244
|
"docs": [
|
|
4807
|
-
"
|
|
3245
|
+
"Swap fee to claim information"
|
|
4808
3246
|
];
|
|
4809
3247
|
"type": {
|
|
4810
3248
|
"array": [
|
|
4811
|
-
|
|
4812
|
-
|
|
3249
|
+
{
|
|
3250
|
+
"defined": "FeeInfo";
|
|
3251
|
+
},
|
|
3252
|
+
70
|
|
4813
3253
|
];
|
|
4814
3254
|
};
|
|
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
3255
|
},
|
|
4831
3256
|
{
|
|
4832
|
-
"name": "
|
|
3257
|
+
"name": "lowerBinId";
|
|
4833
3258
|
"docs": [
|
|
4834
|
-
"
|
|
3259
|
+
"Lower bin ID"
|
|
4835
3260
|
];
|
|
4836
|
-
"type": "
|
|
3261
|
+
"type": "i32";
|
|
4837
3262
|
},
|
|
4838
3263
|
{
|
|
4839
|
-
"name": "
|
|
3264
|
+
"name": "upperBinId";
|
|
4840
3265
|
"docs": [
|
|
4841
|
-
"
|
|
3266
|
+
"Upper bin ID"
|
|
4842
3267
|
];
|
|
4843
|
-
"type": "
|
|
3268
|
+
"type": "i32";
|
|
4844
3269
|
},
|
|
4845
3270
|
{
|
|
4846
|
-
"name": "
|
|
3271
|
+
"name": "lastUpdatedAt";
|
|
4847
3272
|
"docs": [
|
|
4848
|
-
"
|
|
3273
|
+
"Last updated timestamp"
|
|
4849
3274
|
];
|
|
4850
|
-
"type": "
|
|
3275
|
+
"type": "i64";
|
|
4851
3276
|
},
|
|
4852
3277
|
{
|
|
4853
|
-
"name": "
|
|
3278
|
+
"name": "totalClaimedFeeXAmount";
|
|
4854
3279
|
"docs": [
|
|
4855
|
-
"
|
|
3280
|
+
"Total claimed token fee X"
|
|
4856
3281
|
];
|
|
4857
|
-
"type": "
|
|
3282
|
+
"type": "u64";
|
|
4858
3283
|
},
|
|
4859
3284
|
{
|
|
4860
|
-
"name": "
|
|
3285
|
+
"name": "totalClaimedFeeYAmount";
|
|
4861
3286
|
"docs": [
|
|
4862
|
-
"
|
|
3287
|
+
"Total claimed token fee Y"
|
|
4863
3288
|
];
|
|
4864
|
-
"type": "
|
|
3289
|
+
"type": "u64";
|
|
4865
3290
|
},
|
|
4866
3291
|
{
|
|
4867
|
-
"name": "
|
|
3292
|
+
"name": "totalClaimedRewards";
|
|
4868
3293
|
"docs": [
|
|
4869
|
-
"
|
|
3294
|
+
"Total claimed rewards"
|
|
4870
3295
|
];
|
|
4871
|
-
"type":
|
|
3296
|
+
"type": {
|
|
3297
|
+
"array": [
|
|
3298
|
+
"u64",
|
|
3299
|
+
2
|
|
3300
|
+
];
|
|
3301
|
+
};
|
|
4872
3302
|
},
|
|
4873
3303
|
{
|
|
4874
|
-
"name": "
|
|
3304
|
+
"name": "operator";
|
|
4875
3305
|
"docs": [
|
|
4876
|
-
"
|
|
3306
|
+
"Operator of position"
|
|
4877
3307
|
];
|
|
4878
|
-
"type": "
|
|
3308
|
+
"type": "publicKey";
|
|
4879
3309
|
},
|
|
4880
3310
|
{
|
|
4881
|
-
"name": "
|
|
3311
|
+
"name": "lockReleasePoint";
|
|
4882
3312
|
"docs": [
|
|
4883
|
-
"
|
|
3313
|
+
"Time point which the locked liquidity can be withdraw"
|
|
4884
3314
|
];
|
|
4885
|
-
"type": "
|
|
3315
|
+
"type": "u64";
|
|
4886
3316
|
},
|
|
4887
3317
|
{
|
|
4888
|
-
"name": "
|
|
3318
|
+
"name": "padding0";
|
|
4889
3319
|
"docs": [
|
|
4890
|
-
"
|
|
3320
|
+
"_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!"
|
|
4891
3321
|
];
|
|
4892
3322
|
"type": "u8";
|
|
4893
3323
|
},
|
|
4894
3324
|
{
|
|
4895
|
-
"name": "
|
|
3325
|
+
"name": "feeOwner";
|
|
4896
3326
|
"docs": [
|
|
4897
|
-
"
|
|
3327
|
+
"Address is able to claim fee in this position, only valid for bootstrap_liquidity_position"
|
|
4898
3328
|
];
|
|
4899
|
-
"type": "
|
|
3329
|
+
"type": "publicKey";
|
|
4900
3330
|
},
|
|
4901
3331
|
{
|
|
4902
|
-
"name": "
|
|
3332
|
+
"name": "reserved";
|
|
4903
3333
|
"docs": [
|
|
4904
|
-
"
|
|
3334
|
+
"Reserved space for future use"
|
|
4905
3335
|
];
|
|
4906
3336
|
"type": {
|
|
4907
3337
|
"array": [
|
|
4908
|
-
"
|
|
4909
|
-
|
|
3338
|
+
"u8",
|
|
3339
|
+
87
|
|
4910
3340
|
];
|
|
4911
3341
|
};
|
|
4912
3342
|
}
|
|
@@ -4928,7 +3358,7 @@ type LbClmm = {
|
|
|
4928
3358
|
{
|
|
4929
3359
|
"name": "baseFactor";
|
|
4930
3360
|
"docs": [
|
|
4931
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step
|
|
3361
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
4932
3362
|
];
|
|
4933
3363
|
"type": "u16";
|
|
4934
3364
|
},
|
|
@@ -4990,48 +3420,14 @@ type LbClmm = {
|
|
|
4990
3420
|
}
|
|
4991
3421
|
];
|
|
4992
3422
|
};
|
|
4993
|
-
},
|
|
4994
|
-
{
|
|
4995
|
-
"name": "tokenBadge";
|
|
4996
|
-
"docs": [
|
|
4997
|
-
"Parameter that set by the protocol"
|
|
4998
|
-
];
|
|
4999
|
-
"type": {
|
|
5000
|
-
"kind": "struct";
|
|
5001
|
-
"fields": [
|
|
5002
|
-
{
|
|
5003
|
-
"name": "tokenMint";
|
|
5004
|
-
"docs": [
|
|
5005
|
-
"token mint"
|
|
5006
|
-
];
|
|
5007
|
-
"type": "publicKey";
|
|
5008
|
-
},
|
|
5009
|
-
{
|
|
5010
|
-
"name": "padding";
|
|
5011
|
-
"docs": [
|
|
5012
|
-
"Reserve"
|
|
5013
|
-
];
|
|
5014
|
-
"type": {
|
|
5015
|
-
"array": [
|
|
5016
|
-
"u8",
|
|
5017
|
-
128
|
|
5018
|
-
];
|
|
5019
|
-
};
|
|
5020
|
-
}
|
|
5021
|
-
];
|
|
5022
|
-
};
|
|
5023
3423
|
}
|
|
5024
3424
|
];
|
|
5025
3425
|
"types": [
|
|
5026
3426
|
{
|
|
5027
|
-
"name": "
|
|
3427
|
+
"name": "InitPresetParametersIx";
|
|
5028
3428
|
"type": {
|
|
5029
3429
|
"kind": "struct";
|
|
5030
3430
|
"fields": [
|
|
5031
|
-
{
|
|
5032
|
-
"name": "index";
|
|
5033
|
-
"type": "u16";
|
|
5034
|
-
},
|
|
5035
3431
|
{
|
|
5036
3432
|
"name": "binStep";
|
|
5037
3433
|
"docs": [
|
|
@@ -5042,7 +3438,7 @@ type LbClmm = {
|
|
|
5042
3438
|
{
|
|
5043
3439
|
"name": "baseFactor";
|
|
5044
3440
|
"docs": [
|
|
5045
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step
|
|
3441
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5046
3442
|
];
|
|
5047
3443
|
"type": "u16";
|
|
5048
3444
|
},
|
|
@@ -5082,75 +3478,18 @@ type LbClmm = {
|
|
|
5082
3478
|
"type": "u32";
|
|
5083
3479
|
},
|
|
5084
3480
|
{
|
|
5085
|
-
"name": "
|
|
5086
|
-
"docs": [
|
|
5087
|
-
"Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"
|
|
5088
|
-
];
|
|
5089
|
-
"type": "u16";
|
|
5090
|
-
},
|
|
5091
|
-
{
|
|
5092
|
-
"name": "baseFeePowerFactor";
|
|
5093
|
-
"docs": [
|
|
5094
|
-
"Base fee power factor"
|
|
5095
|
-
];
|
|
5096
|
-
"type": "u8";
|
|
5097
|
-
}
|
|
5098
|
-
];
|
|
5099
|
-
};
|
|
5100
|
-
},
|
|
5101
|
-
{
|
|
5102
|
-
"name": "InitPresetParametersIx";
|
|
5103
|
-
"type": {
|
|
5104
|
-
"kind": "struct";
|
|
5105
|
-
"fields": [
|
|
5106
|
-
{
|
|
5107
|
-
"name": "binStep";
|
|
5108
|
-
"docs": [
|
|
5109
|
-
"Bin step. Represent the price increment / decrement."
|
|
5110
|
-
];
|
|
5111
|
-
"type": "u16";
|
|
5112
|
-
},
|
|
5113
|
-
{
|
|
5114
|
-
"name": "baseFactor";
|
|
5115
|
-
"docs": [
|
|
5116
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"
|
|
5117
|
-
];
|
|
5118
|
-
"type": "u16";
|
|
5119
|
-
},
|
|
5120
|
-
{
|
|
5121
|
-
"name": "filterPeriod";
|
|
5122
|
-
"docs": [
|
|
5123
|
-
"Filter period determine high frequency trading time window."
|
|
5124
|
-
];
|
|
5125
|
-
"type": "u16";
|
|
5126
|
-
},
|
|
5127
|
-
{
|
|
5128
|
-
"name": "decayPeriod";
|
|
5129
|
-
"docs": [
|
|
5130
|
-
"Decay period determine when the volatile fee start decay / decrease."
|
|
5131
|
-
];
|
|
5132
|
-
"type": "u16";
|
|
5133
|
-
},
|
|
5134
|
-
{
|
|
5135
|
-
"name": "reductionFactor";
|
|
5136
|
-
"docs": [
|
|
5137
|
-
"Reduction factor controls the volatile fee rate decrement rate."
|
|
5138
|
-
];
|
|
5139
|
-
"type": "u16";
|
|
5140
|
-
},
|
|
5141
|
-
{
|
|
5142
|
-
"name": "variableFeeControl";
|
|
3481
|
+
"name": "minBinId";
|
|
5143
3482
|
"docs": [
|
|
5144
|
-
"
|
|
3483
|
+
"Min bin id supported by the pool based on the configured bin step."
|
|
5145
3484
|
];
|
|
5146
|
-
"type": "
|
|
3485
|
+
"type": "i32";
|
|
5147
3486
|
},
|
|
5148
3487
|
{
|
|
5149
|
-
"name": "
|
|
3488
|
+
"name": "maxBinId";
|
|
5150
3489
|
"docs": [
|
|
5151
|
-
"
|
|
3490
|
+
"Max bin id supported by the pool based on the configured bin step."
|
|
5152
3491
|
];
|
|
5153
|
-
"type": "
|
|
3492
|
+
"type": "i32";
|
|
5154
3493
|
},
|
|
5155
3494
|
{
|
|
5156
3495
|
"name": "protocolShare";
|
|
@@ -5180,13 +3519,6 @@ type LbClmm = {
|
|
|
5180
3519
|
"Base factor for base fee rate"
|
|
5181
3520
|
];
|
|
5182
3521
|
"type": "u16";
|
|
5183
|
-
},
|
|
5184
|
-
{
|
|
5185
|
-
"name": "baseFeePowerFactor";
|
|
5186
|
-
"docs": [
|
|
5187
|
-
"Base fee power factor"
|
|
5188
|
-
];
|
|
5189
|
-
"type": "u8";
|
|
5190
3522
|
}
|
|
5191
3523
|
];
|
|
5192
3524
|
};
|
|
@@ -5620,126 +3952,52 @@ type LbClmm = {
|
|
|
5620
3952
|
"name": "creatorPoolOnOffControl";
|
|
5621
3953
|
"docs": [
|
|
5622
3954
|
"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
|
-
},
|
|
5633
|
-
{
|
|
5634
|
-
"name": "padding";
|
|
5635
|
-
"docs": [
|
|
5636
|
-
"Padding, for future use"
|
|
5637
|
-
];
|
|
5638
|
-
"type": {
|
|
5639
|
-
"array": [
|
|
5640
|
-
"u8",
|
|
5641
|
-
62
|
|
5642
|
-
];
|
|
5643
|
-
};
|
|
5644
|
-
}
|
|
5645
|
-
];
|
|
5646
|
-
};
|
|
5647
|
-
},
|
|
5648
|
-
{
|
|
5649
|
-
"name": "InitPermissionPairIx";
|
|
5650
|
-
"type": {
|
|
5651
|
-
"kind": "struct";
|
|
5652
|
-
"fields": [
|
|
5653
|
-
{
|
|
5654
|
-
"name": "activeId";
|
|
5655
|
-
"type": "i32";
|
|
5656
|
-
},
|
|
5657
|
-
{
|
|
5658
|
-
"name": "binStep";
|
|
5659
|
-
"type": "u16";
|
|
5660
|
-
},
|
|
5661
|
-
{
|
|
5662
|
-
"name": "baseFactor";
|
|
5663
|
-
"type": "u16";
|
|
5664
|
-
},
|
|
5665
|
-
{
|
|
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";
|
|
3955
|
+
];
|
|
3956
|
+
"type": "bool";
|
|
5696
3957
|
},
|
|
5697
3958
|
{
|
|
5698
|
-
"name": "
|
|
5699
|
-
"
|
|
3959
|
+
"name": "padding";
|
|
3960
|
+
"docs": [
|
|
3961
|
+
"Padding, for future use"
|
|
3962
|
+
];
|
|
3963
|
+
"type": {
|
|
3964
|
+
"array": [
|
|
3965
|
+
"u8",
|
|
3966
|
+
63
|
|
3967
|
+
];
|
|
3968
|
+
};
|
|
5700
3969
|
}
|
|
5701
3970
|
];
|
|
5702
3971
|
};
|
|
5703
3972
|
},
|
|
5704
3973
|
{
|
|
5705
|
-
"name": "
|
|
3974
|
+
"name": "InitPermissionPairIx";
|
|
5706
3975
|
"type": {
|
|
5707
3976
|
"kind": "struct";
|
|
5708
3977
|
"fields": [
|
|
5709
3978
|
{
|
|
5710
|
-
"name": "
|
|
3979
|
+
"name": "activeId";
|
|
5711
3980
|
"type": "i32";
|
|
5712
3981
|
},
|
|
5713
3982
|
{
|
|
5714
|
-
"name": "
|
|
5715
|
-
"type": "
|
|
5716
|
-
}
|
|
5717
|
-
];
|
|
5718
|
-
};
|
|
5719
|
-
},
|
|
5720
|
-
{
|
|
5721
|
-
"name": "InitializeLbPair2Params";
|
|
5722
|
-
"type": {
|
|
5723
|
-
"kind": "struct";
|
|
5724
|
-
"fields": [
|
|
3983
|
+
"name": "binStep";
|
|
3984
|
+
"type": "u16";
|
|
3985
|
+
},
|
|
5725
3986
|
{
|
|
5726
|
-
"name": "
|
|
5727
|
-
"
|
|
5728
|
-
|
|
5729
|
-
|
|
3987
|
+
"name": "baseFactor";
|
|
3988
|
+
"type": "u16";
|
|
3989
|
+
},
|
|
3990
|
+
{
|
|
3991
|
+
"name": "minBinId";
|
|
5730
3992
|
"type": "i32";
|
|
5731
3993
|
},
|
|
5732
3994
|
{
|
|
5733
|
-
"name": "
|
|
5734
|
-
"
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
"
|
|
5738
|
-
|
|
5739
|
-
"u8",
|
|
5740
|
-
96
|
|
5741
|
-
];
|
|
5742
|
-
};
|
|
3995
|
+
"name": "maxBinId";
|
|
3996
|
+
"type": "i32";
|
|
3997
|
+
},
|
|
3998
|
+
{
|
|
3999
|
+
"name": "activationType";
|
|
4000
|
+
"type": "u8";
|
|
5743
4001
|
}
|
|
5744
4002
|
];
|
|
5745
4003
|
};
|
|
@@ -5959,7 +4217,7 @@ type LbClmm = {
|
|
|
5959
4217
|
{
|
|
5960
4218
|
"name": "baseFactor";
|
|
5961
4219
|
"docs": [
|
|
5962
|
-
"Used for base fee calculation. base_fee_rate = base_factor * bin_step
|
|
4220
|
+
"Used for base fee calculation. base_fee_rate = base_factor * bin_step"
|
|
5963
4221
|
];
|
|
5964
4222
|
"type": "u16";
|
|
5965
4223
|
},
|
|
@@ -6019,13 +4277,6 @@ type LbClmm = {
|
|
|
6019
4277
|
];
|
|
6020
4278
|
"type": "u16";
|
|
6021
4279
|
},
|
|
6022
|
-
{
|
|
6023
|
-
"name": "baseFeePowerFactor";
|
|
6024
|
-
"docs": [
|
|
6025
|
-
"Base fee power factor"
|
|
6026
|
-
];
|
|
6027
|
-
"type": "u8";
|
|
6028
|
-
},
|
|
6029
4280
|
{
|
|
6030
4281
|
"name": "padding";
|
|
6031
4282
|
"docs": [
|
|
@@ -6034,7 +4285,7 @@ type LbClmm = {
|
|
|
6034
4285
|
"type": {
|
|
6035
4286
|
"array": [
|
|
6036
4287
|
"u8",
|
|
6037
|
-
|
|
4288
|
+
6
|
|
6038
4289
|
];
|
|
6039
4290
|
};
|
|
6040
4291
|
}
|
|
@@ -6155,40 +4406,6 @@ type LbClmm = {
|
|
|
6155
4406
|
];
|
|
6156
4407
|
};
|
|
6157
4408
|
},
|
|
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";
|
|
6183
|
-
"type": {
|
|
6184
|
-
"vec": {
|
|
6185
|
-
"defined": "RemainingAccountsSlice";
|
|
6186
|
-
};
|
|
6187
|
-
};
|
|
6188
|
-
}
|
|
6189
|
-
];
|
|
6190
|
-
};
|
|
6191
|
-
},
|
|
6192
4409
|
{
|
|
6193
4410
|
"name": "StrategyType";
|
|
6194
4411
|
"type": {
|
|
@@ -6288,9 +4505,6 @@ type LbClmm = {
|
|
|
6288
4505
|
},
|
|
6289
4506
|
{
|
|
6290
4507
|
"name": "CustomizablePermissionless";
|
|
6291
|
-
},
|
|
6292
|
-
{
|
|
6293
|
-
"name": "PermissionlessV2";
|
|
6294
4508
|
}
|
|
6295
4509
|
];
|
|
6296
4510
|
};
|
|
@@ -6311,37 +4525,6 @@ type LbClmm = {
|
|
|
6311
4525
|
}
|
|
6312
4526
|
];
|
|
6313
4527
|
};
|
|
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
|
-
};
|
|
6345
4528
|
}
|
|
6346
4529
|
];
|
|
6347
4530
|
"events": [
|
|
@@ -6735,66 +4918,6 @@ type LbClmm = {
|
|
|
6735
4918
|
}
|
|
6736
4919
|
];
|
|
6737
4920
|
},
|
|
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
|
-
},
|
|
6798
4921
|
{
|
|
6799
4922
|
"name": "FeeParameterUpdate";
|
|
6800
4923
|
"fields": [
|
|
@@ -7301,76 +5424,6 @@ type LbClmm = {
|
|
|
7301
5424
|
"code": 6068;
|
|
7302
5425
|
"name": "InvalidMinimumLiquidity";
|
|
7303
5426
|
"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";
|
|
7374
5427
|
}
|
|
7375
5428
|
];
|
|
7376
5429
|
};
|
|
@@ -7384,10 +5437,8 @@ interface BinAndAmount {
|
|
|
7384
5437
|
interface TokenReserve {
|
|
7385
5438
|
publicKey: PublicKey;
|
|
7386
5439
|
reserve: PublicKey;
|
|
7387
|
-
mint: Mint;
|
|
7388
5440
|
amount: bigint;
|
|
7389
|
-
|
|
7390
|
-
transferHookAccountMetas: AccountMeta[];
|
|
5441
|
+
decimal: number;
|
|
7391
5442
|
}
|
|
7392
5443
|
type ClmmProgram = Program<LbClmm>;
|
|
7393
5444
|
type LbPair = IdlAccounts<LbClmm>["lbPair"];
|
|
@@ -7397,12 +5448,8 @@ type BinArray = IdlAccounts<LbClmm>["binArray"];
|
|
|
7397
5448
|
type BinArrayAccount = ProgramAccount<IdlAccounts<LbClmm>["binArray"]>;
|
|
7398
5449
|
type Position = IdlAccounts<LbClmm>["position"];
|
|
7399
5450
|
type PositionV2 = IdlAccounts<LbClmm>["positionV2"];
|
|
7400
|
-
type PresetParameter = IdlAccounts<LbClmm>["presetParameter"];
|
|
7401
|
-
type PresetParameter2 = IdlAccounts<LbClmm>["presetParameter2"];
|
|
7402
5451
|
type vParameters = IdlAccounts<LbClmm>["lbPair"]["vParameters"];
|
|
7403
5452
|
type sParameters = IdlAccounts<LbClmm>["lbPair"]["parameters"];
|
|
7404
|
-
type UserRewardInfo = IdlTypes<LbClmm>["UserRewardInfo"];
|
|
7405
|
-
type UserFeeInfo = IdlTypes<LbClmm>["FeeInfo"];
|
|
7406
5453
|
type InitPermissionPairIx = IdlTypes<LbClmm>["InitPermissionPairIx"];
|
|
7407
5454
|
type InitCustomizablePermissionlessPairIx = IdlTypes<LbClmm>["CustomizableParams"];
|
|
7408
5455
|
type BinLiquidityDistribution = IdlTypes<LbClmm>["BinLiquidityDistribution"];
|
|
@@ -7416,11 +5463,8 @@ type LiquidityParameterByStrategyOneSide = IdlTypes<LbClmm>["LiquidityParameterB
|
|
|
7416
5463
|
type LiquidityParameter = IdlTypes<LbClmm>["LiquidityParameter"];
|
|
7417
5464
|
type ProgramStrategyParameter = IdlTypes<LbClmm>["StrategyParameters"];
|
|
7418
5465
|
type ProgramStrategyType = IdlTypes<LbClmm>["StrategyType"];
|
|
7419
|
-
type RemainingAccountInfo = IdlTypes<LbClmm>["RemainingAccountsInfo"];
|
|
7420
|
-
type RemainingAccountsInfoSlice = IdlTypes<LbClmm>["RemainingAccountsSlice"];
|
|
7421
5466
|
type CompressedBinDepositAmount = IdlTypes<LbClmm>["CompressedBinDepositAmount"];
|
|
7422
5467
|
type CompressedBinDepositAmounts = CompressedBinDepositAmount[];
|
|
7423
|
-
declare const POSITION_V2_DISC: Buffer;
|
|
7424
5468
|
interface LbPosition {
|
|
7425
5469
|
publicKey: PublicKey;
|
|
7426
5470
|
positionData: PositionData;
|
|
@@ -7457,8 +5501,7 @@ interface LMRewards {
|
|
|
7457
5501
|
}
|
|
7458
5502
|
declare enum PositionVersion {
|
|
7459
5503
|
V1 = 0,
|
|
7460
|
-
V2 = 1
|
|
7461
|
-
V3 = 2
|
|
5504
|
+
V2 = 1
|
|
7462
5505
|
}
|
|
7463
5506
|
declare enum PairType {
|
|
7464
5507
|
Permissionless = 0,
|
|
@@ -7526,9 +5569,6 @@ interface BinLiquidity {
|
|
|
7526
5569
|
version: number;
|
|
7527
5570
|
price: string;
|
|
7528
5571
|
pricePerToken: string;
|
|
7529
|
-
feeAmountXPerTokenStored: BN;
|
|
7530
|
-
feeAmountYPerTokenStored: BN;
|
|
7531
|
-
rewardPerTokenStored: BN[];
|
|
7532
5572
|
}
|
|
7533
5573
|
declare namespace BinLiquidity {
|
|
7534
5574
|
function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
|
|
@@ -7567,9 +5607,6 @@ interface PositionBinData {
|
|
|
7567
5607
|
positionLiquidity: string;
|
|
7568
5608
|
positionXAmount: string;
|
|
7569
5609
|
positionYAmount: string;
|
|
7570
|
-
positionFeeXAmount: string;
|
|
7571
|
-
positionFeeYAmount: string;
|
|
7572
|
-
positionRewardAmount: string[];
|
|
7573
5610
|
}
|
|
7574
5611
|
interface PositionData {
|
|
7575
5612
|
totalXAmount: string;
|
|
@@ -7585,13 +5622,6 @@ interface PositionData {
|
|
|
7585
5622
|
feeOwner: PublicKey;
|
|
7586
5623
|
totalClaimedFeeXAmount: BN;
|
|
7587
5624
|
totalClaimedFeeYAmount: BN;
|
|
7588
|
-
feeXExcludeTransferFee: BN;
|
|
7589
|
-
feeYExcludeTransferFee: BN;
|
|
7590
|
-
rewardOneExcludeTransferFee: BN;
|
|
7591
|
-
rewardTwoExcludeTransferFee: BN;
|
|
7592
|
-
totalXAmountExcludeTransferFee: BN;
|
|
7593
|
-
totalYAmountExcludeTransferFee: BN;
|
|
7594
|
-
owner: PublicKey;
|
|
7595
5625
|
}
|
|
7596
5626
|
interface SwapWithPriceImpactParams {
|
|
7597
5627
|
/**
|
|
@@ -7709,11 +5739,6 @@ interface PositionLockInfo {
|
|
|
7709
5739
|
tokenYAmount: string;
|
|
7710
5740
|
lockReleasePoint: number;
|
|
7711
5741
|
}
|
|
7712
|
-
declare enum ActionType {
|
|
7713
|
-
Liquidity = 0,
|
|
7714
|
-
Reward = 1
|
|
7715
|
-
}
|
|
7716
|
-
declare const MEMO_PROGRAM_ID: PublicKey;
|
|
7717
5742
|
|
|
7718
5743
|
type Opt = {
|
|
7719
5744
|
cluster?: Cluster | "localhost";
|
|
@@ -7726,10 +5751,9 @@ declare class DLMM {
|
|
|
7726
5751
|
binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null;
|
|
7727
5752
|
tokenX: TokenReserve;
|
|
7728
5753
|
tokenY: TokenReserve;
|
|
7729
|
-
rewards: Array<TokenReserve | null>;
|
|
7730
5754
|
clock: Clock;
|
|
7731
5755
|
private opt?;
|
|
7732
|
-
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve,
|
|
5756
|
+
constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, clock: Clock, opt?: Opt);
|
|
7733
5757
|
/** Static public method */
|
|
7734
5758
|
/**
|
|
7735
5759
|
* The function `getLbPairs` retrieves a list of LB pair accounts using a connection and optional
|
|
@@ -7742,18 +5766,8 @@ declare class DLMM {
|
|
|
7742
5766
|
* `LbPairAccount` objects.
|
|
7743
5767
|
*/
|
|
7744
5768
|
static getLbPairs(connection: Connection, opt?: Opt): Promise<LbPairAccount[]>;
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
* @param connection The connection to the Solana cluster.
|
|
7748
|
-
* @param tokenX The mint address of token X.
|
|
7749
|
-
* @param tokenY The mint address of token Y.
|
|
7750
|
-
* @param binStep The bin step of the LB pair.
|
|
7751
|
-
* @param baseFactor The base factor of the LB pair.
|
|
7752
|
-
* @param baseFeePowerFactor The base fee power factor of the LB pair. It allow small bin step to have bigger fee rate.
|
|
7753
|
-
* @param opt Optional parameters.
|
|
7754
|
-
* @returns The public key of the LB pair if it exists, or null.
|
|
7755
|
-
*/
|
|
7756
|
-
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, baseFeePowerFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
5769
|
+
static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, opt?: Opt): Promise<PublicKey | null>;
|
|
5770
|
+
static getCustomizablePermissionlessLbPairIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, opt?: Opt): Promise<PublicKey | null>;
|
|
7757
5771
|
/**
|
|
7758
5772
|
* The `create` function is a static method that creates a new instance of the `DLMM` class
|
|
7759
5773
|
* @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
|
|
@@ -7774,46 +5788,18 @@ declare class DLMM {
|
|
|
7774
5788
|
* objects.
|
|
7775
5789
|
*/
|
|
7776
5790
|
static createMultiple(connection: Connection, dlmmList: Array<PublicKey>, opt?: Opt): Promise<DLMM[]>;
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<{
|
|
7790
|
-
presetParameter: _coral_xyz_anchor.ProgramAccount<{
|
|
7791
|
-
binStep: number;
|
|
7792
|
-
baseFactor: number;
|
|
7793
|
-
filterPeriod: number;
|
|
7794
|
-
decayPeriod: number;
|
|
7795
|
-
reductionFactor: number;
|
|
7796
|
-
variableFeeControl: number;
|
|
7797
|
-
maxVolatilityAccumulator: number;
|
|
7798
|
-
minBinId: number;
|
|
7799
|
-
maxBinId: number;
|
|
7800
|
-
protocolShare: number;
|
|
7801
|
-
}>[];
|
|
7802
|
-
presetParameter2: _coral_xyz_anchor.ProgramAccount<{
|
|
7803
|
-
binStep: number;
|
|
7804
|
-
baseFactor: number;
|
|
7805
|
-
filterPeriod: number;
|
|
7806
|
-
decayPeriod: number;
|
|
7807
|
-
variableFeeControl: number;
|
|
7808
|
-
maxVolatilityAccumulator: number;
|
|
7809
|
-
reductionFactor: number;
|
|
7810
|
-
protocolShare: number;
|
|
7811
|
-
index: number;
|
|
7812
|
-
baseFeePowerFactor: number;
|
|
7813
|
-
padding0: number;
|
|
7814
|
-
padding1: BN[];
|
|
7815
|
-
}>[];
|
|
7816
|
-
}>;
|
|
5791
|
+
static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<_coral_xyz_anchor.ProgramAccount<{
|
|
5792
|
+
binStep: number;
|
|
5793
|
+
baseFactor: number;
|
|
5794
|
+
filterPeriod: number;
|
|
5795
|
+
decayPeriod: number;
|
|
5796
|
+
reductionFactor: number;
|
|
5797
|
+
variableFeeControl: number;
|
|
5798
|
+
maxVolatilityAccumulator: number;
|
|
5799
|
+
minBinId: number;
|
|
5800
|
+
maxBinId: number;
|
|
5801
|
+
protocolShare: number;
|
|
5802
|
+
}>[]>;
|
|
7817
5803
|
/**
|
|
7818
5804
|
* The function `getAllLbPairPositionsByUser` retrieves all liquidity pool pair positions for a given
|
|
7819
5805
|
* user.
|
|
@@ -7829,74 +5815,17 @@ declare class DLMM {
|
|
|
7829
5815
|
static getPricePerLamport(tokenXDecimal: number, tokenYDecimal: number, price: number): string;
|
|
7830
5816
|
static getBinIdFromPrice(price: string | number | Decimal, binStep: number, min: boolean): number;
|
|
7831
5817
|
/**
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
5818
|
+
* The function `getLbPairLockInfo` retrieves all pair positions that has locked liquidity.
|
|
5819
|
+
* @param {number} [lockDurationOpt] - An optional value indicating the minimum position lock duration that the function should return.
|
|
5820
|
+
* Depending on the lbPair activationType, the param should be a number of seconds or a number of slots.
|
|
5821
|
+
* @returns The function `getLbPairLockInfo` returns a `Promise` that resolves to a `PairLockInfo`
|
|
5822
|
+
* object. The `PairLockInfo` object contains an array of `PositionLockInfo` objects.
|
|
5823
|
+
*/
|
|
7838
5824
|
getLbPairLockInfo(lockDurationOpt?: number): Promise<PairLockInfo>;
|
|
7839
5825
|
/** Public methods */
|
|
7840
|
-
|
|
7841
|
-
* Create a new customizable permissionless pair. Support both token and token 2022.
|
|
7842
|
-
* @param connection A connection to the Solana cluster.
|
|
7843
|
-
* @param binStep The bin step for the pair.
|
|
7844
|
-
* @param tokenX The mint of the first token.
|
|
7845
|
-
* @param tokenY The mint of the second token.
|
|
7846
|
-
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7847
|
-
* @param feeBps The fee rate for swaps in the pair, in basis points.
|
|
7848
|
-
* @param activationType The type of activation for the pair.
|
|
7849
|
-
* @param hasAlphaVault Whether the pair has an alpha vault.
|
|
7850
|
-
* @param creatorKey The public key of the creator of the pair.
|
|
7851
|
-
* @param activationPoint The timestamp at which the pair will be activated.
|
|
7852
|
-
* @param opt An options object.
|
|
7853
|
-
* @returns A transaction that creates the pair.
|
|
7854
|
-
*/
|
|
7855
|
-
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>;
|
|
7856
|
-
/**
|
|
7857
|
-
* Create a new customizable permissionless pair. Support only token program.
|
|
7858
|
-
* @param connection A connection to the Solana cluster.
|
|
7859
|
-
* @param binStep The bin step for the pair.
|
|
7860
|
-
* @param tokenX The mint of the first token.
|
|
7861
|
-
* @param tokenY The mint of the second token.
|
|
7862
|
-
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7863
|
-
* @param feeBps The fee rate for swaps in the pair, in basis points.
|
|
7864
|
-
* @param activationType The type of activation for the pair.
|
|
7865
|
-
* @param hasAlphaVault Whether the pair has an alpha vault.
|
|
7866
|
-
* @param creatorKey The public key of the creator of the pair.
|
|
7867
|
-
* @param activationPoint The timestamp at which the pair will be activated.
|
|
7868
|
-
* @param opt An options object.
|
|
7869
|
-
* @returns A transaction that creates the pair.
|
|
7870
|
-
*/
|
|
5826
|
+
static createPermissionLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, baseKey: PublicKey, creatorKey: PublicKey, feeBps: BN, activationType: ActivationType, opt?: Opt): Promise<Transaction>;
|
|
7871
5827
|
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>;
|
|
7872
|
-
/**
|
|
7873
|
-
* Create a new liquidity pair. Support only token program.
|
|
7874
|
-
* @param connection A connection to the Solana cluster.
|
|
7875
|
-
* @param funder The public key of the funder of the pair.
|
|
7876
|
-
* @param tokenX The mint of the first token.
|
|
7877
|
-
* @param tokenY The mint of the second token.
|
|
7878
|
-
* @param binStep The bin step for the pair.
|
|
7879
|
-
* @param baseFactor The base factor for the pair.
|
|
7880
|
-
* @param presetParameter The public key of the preset parameter account.
|
|
7881
|
-
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7882
|
-
* @param opt An options object.
|
|
7883
|
-
* @returns A transaction that creates the pair.
|
|
7884
|
-
* @throws If the pair already exists.
|
|
7885
|
-
*/
|
|
7886
5828
|
static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
7887
|
-
/**
|
|
7888
|
-
* Create a new liquidity pair. Support both token and token2022 program.
|
|
7889
|
-
* @param connection A connection to the Solana cluster.
|
|
7890
|
-
* @param funder The public key of the funder of the pair.
|
|
7891
|
-
* @param tokenX The mint of the first token.
|
|
7892
|
-
* @param tokenY The mint of the second token.
|
|
7893
|
-
* @param presetParameter The public key of the preset parameter account.
|
|
7894
|
-
* @param activeId The ID of the initial active bin. Represent the starting price.
|
|
7895
|
-
* @param opt An options object.
|
|
7896
|
-
* @returns A transaction that creates the pair.
|
|
7897
|
-
* @throws If the pair already exists.
|
|
7898
|
-
*/
|
|
7899
|
-
static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
|
|
7900
5829
|
/**
|
|
7901
5830
|
* The function `refetchStates` retrieves and updates various states and data related to bin arrays
|
|
7902
5831
|
* and lb pairs.
|
|
@@ -7925,15 +5854,7 @@ declare class DLMM {
|
|
|
7925
5854
|
* @returns an array of `BinArrayAccount` objects.
|
|
7926
5855
|
*/
|
|
7927
5856
|
getBinArrayForSwap(swapForY: any, count?: number): Promise<BinArrayAccount[]>;
|
|
7928
|
-
|
|
7929
|
-
* The function `calculateFeeInfo` calculates the base fee rate percentage and maximum fee rate percentage
|
|
7930
|
-
* given the base factor, bin step, and optional base fee power factor.
|
|
7931
|
-
* @param baseFactor - The base factor of the pair.
|
|
7932
|
-
* @param binStep - The bin step of the pair.
|
|
7933
|
-
* @param baseFeePowerFactor - Optional parameter to allow small bin step to have bigger fee rate. Default to 0.
|
|
7934
|
-
* @returns an object of type `Omit<FeeInfo, "protocolFeePercentage">` with the following properties: baseFeeRatePercentage and maxFeeRatePercentage.
|
|
7935
|
-
*/
|
|
7936
|
-
static calculateFeeInfo(baseFactor: number | string, binStep: number | string, baseFeePowerFactor?: number | string): Omit<FeeInfo, "protocolFeePercentage">;
|
|
5857
|
+
static calculateFeeInfo(baseFactor: number | string, binStep: number | string): Omit<FeeInfo, "protocolFeePercentage">;
|
|
7937
5858
|
/**
|
|
7938
5859
|
* The function `getFeeInfo` calculates and returns the base fee rate percentage, maximum fee rate
|
|
7939
5860
|
* percentage, and protocol fee percentage.
|
|
@@ -8083,12 +6004,11 @@ declare class DLMM {
|
|
|
8083
6004
|
* - `strategy`: The strategy parameters to be used for the liquidity pool (Can use `calculateStrategyParameter` to calculate).
|
|
8084
6005
|
* - `user`: The public key of the user account.
|
|
8085
6006
|
* - `slippage`: The slippage percentage to be used for the liquidity pool.
|
|
8086
|
-
* @returns {Promise<Transaction>} The function `
|
|
6007
|
+
* @returns {Promise<Transaction>} The function `initializePositionAndAddLiquidityByWeight` returns a `Promise` that
|
|
8087
6008
|
* resolves to either a single `Transaction` object.
|
|
8088
6009
|
*/
|
|
8089
6010
|
initializePositionAndAddLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
8090
6011
|
/**
|
|
8091
|
-
* @deprecated Use `initializePositionAndAddLiquidityByStrategy` instead which support both token and token2022.
|
|
8092
6012
|
* The function `initializePositionAndAddLiquidityByWeight` function is used to initializes a position and adds liquidity
|
|
8093
6013
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
8094
6014
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -8115,7 +6035,6 @@ declare class DLMM {
|
|
|
8115
6035
|
*/
|
|
8116
6036
|
addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
8117
6037
|
/**
|
|
8118
|
-
* @deprecated Use `addLiquidityByStrategy` instead which support both token and token2022.
|
|
8119
6038
|
* The `addLiquidityByWeight` function is used to add liquidity to existing position
|
|
8120
6039
|
* @param {TInitializePositionAndAddLiquidityParams}
|
|
8121
6040
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
@@ -8134,27 +6053,18 @@ declare class DLMM {
|
|
|
8134
6053
|
* @param
|
|
8135
6054
|
* - `user`: The public key of the user account.
|
|
8136
6055
|
* - `position`: The public key of the position account.
|
|
8137
|
-
* - `
|
|
8138
|
-
* - `toBinId`: The ID of the ending bin to remove liquidity from. Must within position range.
|
|
6056
|
+
* - `binIds`: An array of numbers that represent the bin IDs to remove liquidity from.
|
|
8139
6057
|
* - `liquiditiesBpsToRemove`: An array of numbers (percentage) that represent the liquidity to remove from each bin.
|
|
8140
6058
|
* - `shouldClaimAndClose`: A boolean flag that indicates whether to claim rewards and close the position.
|
|
8141
|
-
* @returns {Promise<Transaction
|
|
6059
|
+
* @returns {Promise<Transaction|Transaction[]>}
|
|
8142
6060
|
*/
|
|
8143
|
-
removeLiquidity({ user, position,
|
|
6061
|
+
removeLiquidity({ user, position, binIds, bps, shouldClaimAndClose, }: {
|
|
8144
6062
|
user: PublicKey;
|
|
8145
6063
|
position: PublicKey;
|
|
8146
|
-
|
|
8147
|
-
toBinId: number;
|
|
6064
|
+
binIds: number[];
|
|
8148
6065
|
bps: BN;
|
|
8149
6066
|
shouldClaimAndClose?: boolean;
|
|
8150
6067
|
}): Promise<Transaction | Transaction[]>;
|
|
8151
|
-
/**
|
|
8152
|
-
* The `closePositionIfEmpty` function closes a position if it is empty. Else, it does nothing.
|
|
8153
|
-
*/
|
|
8154
|
-
closePositionIfEmpty({ owner, position, }: {
|
|
8155
|
-
owner: PublicKey;
|
|
8156
|
-
position: LbPosition;
|
|
8157
|
-
}): Promise<Transaction>;
|
|
8158
6068
|
/**
|
|
8159
6069
|
* The `closePosition` function closes a position
|
|
8160
6070
|
* @param
|
|
@@ -8236,7 +6146,7 @@ declare class DLMM {
|
|
|
8236
6146
|
* @param
|
|
8237
6147
|
* - `owner`: The public key of the owner of the position.
|
|
8238
6148
|
* - `position`: The public key of the position account.
|
|
8239
|
-
* @returns {Promise<Transaction>}
|
|
6149
|
+
* @returns {Promise<Transaction>}
|
|
8240
6150
|
*/
|
|
8241
6151
|
claimLMReward({ owner, position, }: {
|
|
8242
6152
|
owner: PublicKey;
|
|
@@ -8248,7 +6158,7 @@ declare class DLMM {
|
|
|
8248
6158
|
* @param
|
|
8249
6159
|
* - `owner`: The public key of the owner of the positions.
|
|
8250
6160
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim rewards from.
|
|
8251
|
-
* @returns {Promise<Transaction[]>}
|
|
6161
|
+
* @returns {Promise<Transaction[]>}
|
|
8252
6162
|
*/
|
|
8253
6163
|
claimAllLMRewards({ owner, positions, }: {
|
|
8254
6164
|
owner: PublicKey;
|
|
@@ -8261,8 +6171,7 @@ declare class DLMM {
|
|
|
8261
6171
|
* @param
|
|
8262
6172
|
* - `owner`: The public key of the owner of the position.
|
|
8263
6173
|
* - `position`: The public key of the position account.
|
|
8264
|
-
*
|
|
8265
|
-
* @returns {Promise<Transaction>} Claim swap fee transactions.
|
|
6174
|
+
* @returns {Promise<Transaction>}
|
|
8266
6175
|
*/
|
|
8267
6176
|
claimSwapFee({ owner, position, }: {
|
|
8268
6177
|
owner: PublicKey;
|
|
@@ -8273,7 +6182,7 @@ declare class DLMM {
|
|
|
8273
6182
|
* @param
|
|
8274
6183
|
* - `owner`: The public key of the owner of the positions.
|
|
8275
6184
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees from.
|
|
8276
|
-
* @returns {Promise<Transaction[]>}
|
|
6185
|
+
* @returns {Promise<Transaction[]>}
|
|
8277
6186
|
*/
|
|
8278
6187
|
claimAllSwapFee({ owner, positions, }: {
|
|
8279
6188
|
owner: PublicKey;
|
|
@@ -8285,14 +6194,14 @@ declare class DLMM {
|
|
|
8285
6194
|
* @param
|
|
8286
6195
|
* - `owner`: The public key of the owner of the position.
|
|
8287
6196
|
* - `position`: The public key of the position account.
|
|
8288
|
-
* @returns {Promise<Transaction[]>}
|
|
6197
|
+
* @returns {Promise<Transaction[]>}
|
|
8289
6198
|
*/
|
|
8290
6199
|
claimAllRewardsByPosition({ owner, position, }: {
|
|
8291
6200
|
owner: PublicKey;
|
|
8292
6201
|
position: LbPosition;
|
|
8293
6202
|
}): Promise<Transaction[]>;
|
|
8294
6203
|
/**
|
|
8295
|
-
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be
|
|
6204
|
+
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be either [initialize bin array + initialize position instructions] or [deposit instruction] combination.
|
|
8296
6205
|
* @param
|
|
8297
6206
|
* - `owner`: The public key of the positions owner.
|
|
8298
6207
|
* - `seedAmount`: Lamport amount to be seeded to the pool.
|
|
@@ -8308,22 +6217,22 @@ declare class DLMM {
|
|
|
8308
6217
|
*/
|
|
8309
6218
|
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>;
|
|
8310
6219
|
/**
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
6220
|
+
* The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be either [initialize bin array + initialize position instructions] or [deposit instruction] combination.
|
|
6221
|
+
* @param
|
|
6222
|
+
* - `payer`: The public key of the tx payer.
|
|
6223
|
+
* - `base`: Base key
|
|
6224
|
+
* - `seedAmount`: Token X lamport amount to be seeded to the pool.
|
|
6225
|
+
* - `price`: TokenX/TokenY Price in UI format
|
|
6226
|
+
* - `roundingUp`: Whether to round up the price
|
|
6227
|
+
* - `positionOwner`: The owner of the position
|
|
6228
|
+
* - `feeOwner`: Position fee owner
|
|
6229
|
+
* - `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.
|
|
6230
|
+
* - `lockReleasePoint`: The lock release point of the position.
|
|
6231
|
+
* - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
|
|
6232
|
+
*
|
|
6233
|
+
* The returned instructions need to be executed sequentially if it was separated into multiple transactions.
|
|
6234
|
+
* @returns {Promise<TransactionInstruction[]>}
|
|
6235
|
+
*/
|
|
8327
6236
|
seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<TransactionInstruction[]>;
|
|
8328
6237
|
/**
|
|
8329
6238
|
* Initializes bin arrays for the given bin array indexes if it wasn't initialized.
|
|
@@ -8361,7 +6270,7 @@ declare class DLMM {
|
|
|
8361
6270
|
* @param
|
|
8362
6271
|
* - `owner`: The public key of the owner of the positions.
|
|
8363
6272
|
* - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees and LM rewards from.
|
|
8364
|
-
* @returns {Promise<Transaction[]>}
|
|
6273
|
+
* @returns {Promise<Transaction[]>}
|
|
8365
6274
|
*/
|
|
8366
6275
|
claimAllRewards({ owner, positions, }: {
|
|
8367
6276
|
owner: PublicKey;
|
|
@@ -8377,6 +6286,10 @@ declare class DLMM {
|
|
|
8377
6286
|
*/
|
|
8378
6287
|
syncWithMarketPrice(marketPrice: number, owner: PublicKey): Promise<Transaction>;
|
|
8379
6288
|
getMaxPriceInBinArrays(binArrayAccounts: BinArrayAccount[]): Promise<string>;
|
|
6289
|
+
getAmountOutWithdrawSingleSide(maxLiquidityShare: BN, price: BN, bin: Bin, isWithdrawForY: boolean): {
|
|
6290
|
+
withdrawAmount: BN;
|
|
6291
|
+
};
|
|
6292
|
+
getWithdrawSingleSideAmount(positionPubkey: PublicKey, isWithdrawForY: boolean): Promise<BN>;
|
|
8380
6293
|
/**
|
|
8381
6294
|
*
|
|
8382
6295
|
* @param swapInitiator Address of the swap initiator
|
|
@@ -8385,6 +6298,8 @@ declare class DLMM {
|
|
|
8385
6298
|
isSwapDisabled(swapInitiator: PublicKey): boolean;
|
|
8386
6299
|
/** Private static method */
|
|
8387
6300
|
private static getBinArrays;
|
|
6301
|
+
private static getClaimableLMReward;
|
|
6302
|
+
private static getClaimableSwapFee;
|
|
8388
6303
|
private static processPosition;
|
|
8389
6304
|
private static getBinsBetweenLowerAndUpperBound;
|
|
8390
6305
|
/** Private method */
|
|
@@ -8396,12 +6311,9 @@ declare class DLMM {
|
|
|
8396
6311
|
private updateReference;
|
|
8397
6312
|
private createClaimBuildMethod;
|
|
8398
6313
|
private createClaimSwapFeeMethod;
|
|
8399
|
-
private getPotentialToken2022IxDataAndAccounts;
|
|
8400
6314
|
}
|
|
8401
6315
|
|
|
8402
6316
|
/** private */
|
|
8403
|
-
declare function derivePresetParameterWithIndex(index: BN, programId: PublicKey): [PublicKey, number];
|
|
8404
|
-
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8405
6317
|
/**
|
|
8406
6318
|
*
|
|
8407
6319
|
* @deprecated Use derivePresetParameter2
|
|
@@ -8420,9 +6332,6 @@ declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicK
|
|
|
8420
6332
|
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN, width: BN, programId: PublicKey): [PublicKey, number];
|
|
8421
6333
|
declare function deriveBinArray(lbPair: PublicKey, index: BN, programId: PublicKey): [PublicKey, number];
|
|
8422
6334
|
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8423
|
-
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
8424
|
-
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
8425
|
-
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN, programId: PublicKey): [PublicKey, number];
|
|
8426
6335
|
|
|
8427
6336
|
/** private */
|
|
8428
6337
|
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN): boolean;
|
|
@@ -8472,44 +6381,17 @@ declare function calculateNormalDistribution(activeBin: number, binIds: number[]
|
|
|
8472
6381
|
xAmountBpsOfTotal: BN;
|
|
8473
6382
|
yAmountBpsOfTotal: BN;
|
|
8474
6383
|
}[];
|
|
8475
|
-
/**
|
|
8476
|
-
* Converts a weight distribution into token amounts for one side (either bid or ask).
|
|
8477
|
-
*
|
|
8478
|
-
* @param amount - The total amount of liquidity to distribute.
|
|
8479
|
-
* @param distributions - The array of weight distributions for each bin.
|
|
8480
|
-
* @param binStep - The step interval between bin ids.
|
|
8481
|
-
* @param activeId - The id of the active bin.
|
|
8482
|
-
* @param depositForY - Flag indicating if the deposit is for token Y (bid side).
|
|
8483
|
-
* @param mint - Mint information for the token. Mint Y if depositForY is true, else Mint X. Get from DLMM instance.
|
|
8484
|
-
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8485
|
-
* @returns An array of objects containing binId and amount for each bin.
|
|
8486
|
-
*/
|
|
8487
6384
|
declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions: {
|
|
8488
6385
|
binId: number;
|
|
8489
6386
|
weight: number;
|
|
8490
|
-
}[], binStep: number, activeId: number, depositForY: boolean
|
|
6387
|
+
}[], binStep: number, activeId: number, depositForY: boolean): {
|
|
8491
6388
|
binId: number;
|
|
8492
6389
|
amount: BN;
|
|
8493
6390
|
}[];
|
|
8494
|
-
/**
|
|
8495
|
-
* Converts a weight distribution into token amounts for both bid and ask sides.
|
|
8496
|
-
*
|
|
8497
|
-
* @param amountX - The total amount of token X to distribute.
|
|
8498
|
-
* @param amountY - The total amount of token Y to distribute.
|
|
8499
|
-
* @param distributions - The array of weight distributions for each bin.
|
|
8500
|
-
* @param binStep - The step interval between bin ids.
|
|
8501
|
-
* @param activeId - The id of the active bin.
|
|
8502
|
-
* @param amountXInActiveBin - The amount of token X in the active bin.
|
|
8503
|
-
* @param amountYInActiveBin - The amount of token Y in the active bin.
|
|
8504
|
-
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8505
|
-
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8506
|
-
* @param clock - Clock instance for the current epoch. Get from DLMM instance.
|
|
8507
|
-
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8508
|
-
*/
|
|
8509
6391
|
declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distributions: {
|
|
8510
6392
|
binId: number;
|
|
8511
6393
|
weight: number;
|
|
8512
|
-
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN
|
|
6394
|
+
}[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN): {
|
|
8513
6395
|
binId: number;
|
|
8514
6396
|
amountX: BN;
|
|
8515
6397
|
amountY: BN;
|
|
@@ -8534,58 +6416,24 @@ declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sP
|
|
|
8534
6416
|
protocolFee: BN;
|
|
8535
6417
|
};
|
|
8536
6418
|
|
|
8537
|
-
/**
|
|
8538
|
-
* Distribute totalAmount to all bid side bins according to given distributions.
|
|
8539
|
-
* @param activeId active bin id
|
|
8540
|
-
* @param totalAmount total amount of token Y to be distributed
|
|
8541
|
-
* @param distributions weight distribution of each bin
|
|
8542
|
-
* @param mintY mint of token Y, get from DLMM instance
|
|
8543
|
-
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8544
|
-
* @returns array of {binId, amount} where amount is the amount of token Y in each bin
|
|
8545
|
-
*/
|
|
8546
6419
|
declare function toAmountBidSide(activeId: number, totalAmount: BN, distributions: {
|
|
8547
6420
|
binId: number;
|
|
8548
6421
|
weight: number;
|
|
8549
|
-
}[]
|
|
6422
|
+
}[]): {
|
|
8550
6423
|
binId: number;
|
|
8551
6424
|
amount: BN;
|
|
8552
6425
|
}[];
|
|
8553
|
-
/**
|
|
8554
|
-
* Distribute totalAmount to all ask side bins according to given distributions.
|
|
8555
|
-
* @param activeId active bin id
|
|
8556
|
-
* @param totalAmount total amount of token Y to be distributed
|
|
8557
|
-
* @param distributions weight distribution of each bin
|
|
8558
|
-
* @param mintX mint of token X, get from DLMM instance
|
|
8559
|
-
* @param clock clock of the program, for calculating transfer fee, get from DLMM instance
|
|
8560
|
-
* @returns array of {binId, amount} where amount is the amount of token X in each bin
|
|
8561
|
-
*/
|
|
8562
6426
|
declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN, distributions: {
|
|
8563
6427
|
binId: number;
|
|
8564
6428
|
weight: number;
|
|
8565
|
-
}[]
|
|
6429
|
+
}[]): {
|
|
8566
6430
|
binId: number;
|
|
8567
6431
|
amount: BN;
|
|
8568
6432
|
}[];
|
|
8569
|
-
/**
|
|
8570
|
-
* Distributes the given amounts of tokens X and Y to both bid and ask side bins
|
|
8571
|
-
* based on the provided weight distributions.
|
|
8572
|
-
*
|
|
8573
|
-
* @param activeId - The id of the active bin.
|
|
8574
|
-
* @param binStep - The step interval between bin ids.
|
|
8575
|
-
* @param amountX - Total amount of token X to distribute.
|
|
8576
|
-
* @param amountY - Total amount of token Y to distribute.
|
|
8577
|
-
* @param amountXInActiveBin - Amount of token X already in the active bin.
|
|
8578
|
-
* @param amountYInActiveBin - Amount of token Y already in the active bin.
|
|
8579
|
-
* @param distributions - Array of bins with their respective weight distributions.
|
|
8580
|
-
* @param mintX - Mint information for token X. Get from DLMM instance.
|
|
8581
|
-
* @param mintY - Mint information for token Y. Get from DLMM instance.
|
|
8582
|
-
* @param clock - Clock instance. Get from DLMM instance.
|
|
8583
|
-
* @returns An array of objects containing binId, amountX, and amountY for each bin.
|
|
8584
|
-
*/
|
|
8585
6433
|
declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: {
|
|
8586
6434
|
binId: number;
|
|
8587
6435
|
weight: number;
|
|
8588
|
-
}[]
|
|
6436
|
+
}[]): {
|
|
8589
6437
|
binId: number;
|
|
8590
6438
|
amountX: BN;
|
|
8591
6439
|
amountY: BN;
|
|
@@ -8599,23 +6447,7 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
|
|
|
8599
6447
|
weight: number;
|
|
8600
6448
|
}[]): BN;
|
|
8601
6449
|
|
|
8602
|
-
|
|
8603
|
-
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
8604
|
-
* @param activeId The bin id of the active bin.
|
|
8605
|
-
* @param binStep The step size of each bin.
|
|
8606
|
-
* @param minBinId The min bin id.
|
|
8607
|
-
* @param maxBinId The max bin id.
|
|
8608
|
-
* @param amountX The amount of X token to deposit.
|
|
8609
|
-
* @param amountY The amount of Y token to deposit.
|
|
8610
|
-
* @param amountXInActiveBin The amount of X token in the active bin.
|
|
8611
|
-
* @param amountYInActiveBin The amount of Y token in the active bin.
|
|
8612
|
-
* @param strategyType The strategy type.
|
|
8613
|
-
* @param mintX The mint info of X token. Get from DLMM instance.
|
|
8614
|
-
* @param mintY The mint info of Y token. Get from DLMM instance.
|
|
8615
|
-
* @param clock The clock info. Get from DLMM instance.
|
|
8616
|
-
* @returns The distribution of liquidity.
|
|
8617
|
-
*/
|
|
8618
|
-
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): {
|
|
6450
|
+
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType): {
|
|
8619
6451
|
binId: number;
|
|
8620
6452
|
amountX: BN;
|
|
8621
6453
|
amountY: BN;
|
|
@@ -8659,15 +6491,10 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
8659
6491
|
*/
|
|
8660
6492
|
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
8661
6493
|
cluster?: Cluster;
|
|
8662
|
-
programId?: PublicKey;
|
|
8663
6494
|
}): Promise<{
|
|
8664
6495
|
tokenXMint: PublicKey;
|
|
8665
6496
|
tokenYMint: PublicKey;
|
|
8666
6497
|
}>;
|
|
8667
|
-
declare function getTokenProgramId(lbPairState: LbPair): {
|
|
8668
|
-
tokenXProgram: PublicKey;
|
|
8669
|
-
tokenYProgram: PublicKey;
|
|
8670
|
-
};
|
|
8671
6498
|
|
|
8672
6499
|
declare function chunks<T>(array: T[], size: number): T[][];
|
|
8673
6500
|
declare function range<T>(min: number, max: number, mapfn: (i: number) => T): T[];
|
|
@@ -8682,7 +6509,6 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
8682
6509
|
minBinId: number;
|
|
8683
6510
|
maxBinId: number;
|
|
8684
6511
|
protocolShare: number;
|
|
8685
|
-
baseFeePowerFactor: number;
|
|
8686
6512
|
padding: number[];
|
|
8687
6513
|
};
|
|
8688
6514
|
vParameters: {
|
|
@@ -8733,8 +6559,6 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
|
|
|
8733
6559
|
padding3: number[];
|
|
8734
6560
|
padding4: BN;
|
|
8735
6561
|
creator: PublicKey;
|
|
8736
|
-
tokenMintXProgramFlag: number;
|
|
8737
|
-
tokenMintYProgramFlag: number;
|
|
8738
6562
|
reserved: number[];
|
|
8739
6563
|
}[]>;
|
|
8740
6564
|
declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{
|
|
@@ -8744,7 +6568,7 @@ declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: Clm
|
|
|
8744
6568
|
}[]>;
|
|
8745
6569
|
declare function getOutAmount(bin: Bin, inAmount: BN, swapForY: boolean): BN;
|
|
8746
6570
|
declare function getTokenDecimals(conn: Connection, mint: PublicKey): Promise<number>;
|
|
8747
|
-
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey,
|
|
6571
|
+
declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise<GetOrCreateATAResponse>;
|
|
8748
6572
|
declare function getTokenBalance(conn: Connection, tokenAccount: PublicKey): Promise<bigint>;
|
|
8749
6573
|
declare const parseLogs: <T>(eventParser: EventParser, logs: string[]) => T;
|
|
8750
6574
|
declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[];
|
|
@@ -8818,6 +6642,5 @@ declare const MAX_BIN_PER_TX = 69;
|
|
|
8818
6642
|
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
8819
6643
|
declare const ILM_BASE: PublicKey;
|
|
8820
6644
|
declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
8821
|
-
declare const U64_MAX: BN;
|
|
8822
6645
|
|
|
8823
|
-
export { ADMIN,
|
|
6646
|
+
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_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairLockInfo, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionLockInfo, 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, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|