@0dotxyz/p0-ts-sdk 2.2.0-alpha.1 → 2.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4599 -2800
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +655 -667
- package/dist/index.d.ts +655 -667
- package/dist/index.js +4585 -2795
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +1782 -28
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +289 -24
- package/dist/vendor.d.ts +289 -24
- package/dist/vendor.js +1773 -28
- package/dist/vendor.js.map +1 -1
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ type Marginfi = {
|
|
|
64
64
|
{
|
|
65
65
|
name: "configureBankRateLimits";
|
|
66
66
|
docs: [
|
|
67
|
-
"(admin
|
|
67
|
+
"(admin or delegate_limit_admin) Configure bank-level rate limits for withdraw/borrow.",
|
|
68
68
|
"Rate limits track net outflow in native tokens. Deposits offset withdraws.",
|
|
69
69
|
"Set to 0 to disable. Hourly and daily windows are independent."
|
|
70
70
|
];
|
|
@@ -77,7 +77,6 @@ type Marginfi = {
|
|
|
77
77
|
{
|
|
78
78
|
name: "admin";
|
|
79
79
|
signer: true;
|
|
80
|
-
relations: ["group"];
|
|
81
80
|
},
|
|
82
81
|
{
|
|
83
82
|
name: "bank";
|
|
@@ -101,7 +100,9 @@ type Marginfi = {
|
|
|
101
100
|
},
|
|
102
101
|
{
|
|
103
102
|
name: "configureDeleverageWithdrawalLimit";
|
|
104
|
-
docs: [
|
|
103
|
+
docs: [
|
|
104
|
+
"(admin or delegate_limit_admin) Set the daily withdrawal limit for deleverages per group."
|
|
105
|
+
];
|
|
105
106
|
discriminator: [28, 132, 205, 158, 67, 77, 177, 63];
|
|
106
107
|
accounts: [
|
|
107
108
|
{
|
|
@@ -111,7 +112,6 @@ type Marginfi = {
|
|
|
111
112
|
{
|
|
112
113
|
name: "admin";
|
|
113
114
|
signer: true;
|
|
114
|
-
relations: ["marginfiGroup"];
|
|
115
115
|
}
|
|
116
116
|
];
|
|
117
117
|
args: [
|
|
@@ -124,7 +124,7 @@ type Marginfi = {
|
|
|
124
124
|
{
|
|
125
125
|
name: "configureGroupRateLimits";
|
|
126
126
|
docs: [
|
|
127
|
-
"(admin
|
|
127
|
+
"(admin or delegate_limit_admin) Configure group-level rate limits for withdraw/borrow.",
|
|
128
128
|
"Rate limits track aggregate net outflow in USD.",
|
|
129
129
|
"Example: $10M = 10_000_000. Set to 0 to disable."
|
|
130
130
|
];
|
|
@@ -137,7 +137,6 @@ type Marginfi = {
|
|
|
137
137
|
{
|
|
138
138
|
name: "admin";
|
|
139
139
|
signer: true;
|
|
140
|
-
relations: ["marginfiGroup"];
|
|
141
140
|
}
|
|
142
141
|
];
|
|
143
142
|
args: [
|
|
@@ -165,7 +164,6 @@ type Marginfi = {
|
|
|
165
164
|
accounts: [
|
|
166
165
|
{
|
|
167
166
|
name: "group";
|
|
168
|
-
writable: true;
|
|
169
167
|
relations: ["marginfiAccount", "bank"];
|
|
170
168
|
},
|
|
171
169
|
{
|
|
@@ -753,7 +751,6 @@ type Marginfi = {
|
|
|
753
751
|
accounts: [
|
|
754
752
|
{
|
|
755
753
|
name: "group";
|
|
756
|
-
writable: true;
|
|
757
754
|
relations: ["marginfiAccount", "bank"];
|
|
758
755
|
},
|
|
759
756
|
{
|
|
@@ -1285,6 +1282,7 @@ type Marginfi = {
|
|
|
1285
1282
|
accounts: [
|
|
1286
1283
|
{
|
|
1287
1284
|
name: "group";
|
|
1285
|
+
writable: true;
|
|
1288
1286
|
relations: ["marginfiAccount", "bank"];
|
|
1289
1287
|
},
|
|
1290
1288
|
{
|
|
@@ -1294,7 +1292,6 @@ type Marginfi = {
|
|
|
1294
1292
|
{
|
|
1295
1293
|
name: "authority";
|
|
1296
1294
|
signer: true;
|
|
1297
|
-
relations: ["marginfiAccount"];
|
|
1298
1295
|
},
|
|
1299
1296
|
{
|
|
1300
1297
|
name: "bank";
|
|
@@ -1584,7 +1581,6 @@ type Marginfi = {
|
|
|
1584
1581
|
accounts: [
|
|
1585
1582
|
{
|
|
1586
1583
|
name: "group";
|
|
1587
|
-
writable: true;
|
|
1588
1584
|
relations: ["marginfiAccount", "bank"];
|
|
1589
1585
|
},
|
|
1590
1586
|
{
|
|
@@ -1759,7 +1755,6 @@ type Marginfi = {
|
|
|
1759
1755
|
accounts: [
|
|
1760
1756
|
{
|
|
1761
1757
|
name: "group";
|
|
1762
|
-
writable: true;
|
|
1763
1758
|
relations: ["marginfiAccount", "bank"];
|
|
1764
1759
|
},
|
|
1765
1760
|
{
|
|
@@ -2288,7 +2283,6 @@ type Marginfi = {
|
|
|
2288
2283
|
accounts: [
|
|
2289
2284
|
{
|
|
2290
2285
|
name: "group";
|
|
2291
|
-
writable: true;
|
|
2292
2286
|
relations: ["marginfiAccount", "bank"];
|
|
2293
2287
|
},
|
|
2294
2288
|
{
|
|
@@ -2385,12 +2379,13 @@ type Marginfi = {
|
|
|
2385
2379
|
relations: ["bank"];
|
|
2386
2380
|
},
|
|
2387
2381
|
{
|
|
2388
|
-
name: "
|
|
2382
|
+
name: "mint";
|
|
2389
2383
|
docs: [
|
|
2390
2384
|
"The liquidity token mint (e.g., USDC)",
|
|
2391
2385
|
"Needs serde to get the mint decimals for transfer checked"
|
|
2392
2386
|
];
|
|
2393
2387
|
writable: true;
|
|
2388
|
+
relations: ["bank"];
|
|
2394
2389
|
},
|
|
2395
2390
|
{
|
|
2396
2391
|
name: "reserveLiquiditySupply";
|
|
@@ -2465,7 +2460,6 @@ type Marginfi = {
|
|
|
2465
2460
|
accounts: [
|
|
2466
2461
|
{
|
|
2467
2462
|
name: "group";
|
|
2468
|
-
writable: true;
|
|
2469
2463
|
relations: ["marginfiAccount", "bank"];
|
|
2470
2464
|
},
|
|
2471
2465
|
{
|
|
@@ -2537,11 +2531,26 @@ type Marginfi = {
|
|
|
2537
2531
|
];
|
|
2538
2532
|
},
|
|
2539
2533
|
{
|
|
2540
|
-
name: "
|
|
2534
|
+
name: "lendingAccountClearEmissions";
|
|
2541
2535
|
docs: [
|
|
2542
|
-
"(
|
|
2543
|
-
"
|
|
2536
|
+
"(permissionless) Zero out `emissions_outstanding` on a balance after emissions are disabled",
|
|
2537
|
+
"on the bank."
|
|
2538
|
+
];
|
|
2539
|
+
discriminator: [239, 4, 221, 98, 45, 167, 201, 244];
|
|
2540
|
+
accounts: [
|
|
2541
|
+
{
|
|
2542
|
+
name: "marginfiAccount";
|
|
2543
|
+
writable: true;
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
name: "bank";
|
|
2547
|
+
}
|
|
2544
2548
|
];
|
|
2549
|
+
args: [];
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
name: "lendingAccountCloseBalance";
|
|
2553
|
+
docs: ["(account authority) Close a balance position with dust-level amounts."];
|
|
2545
2554
|
discriminator: [245, 54, 41, 4, 243, 202, 31, 17];
|
|
2546
2555
|
accounts: [
|
|
2547
2556
|
{
|
|
@@ -2573,7 +2582,6 @@ type Marginfi = {
|
|
|
2573
2582
|
accounts: [
|
|
2574
2583
|
{
|
|
2575
2584
|
name: "group";
|
|
2576
|
-
writable: true;
|
|
2577
2585
|
relations: ["marginfiAccount", "bank"];
|
|
2578
2586
|
},
|
|
2579
2587
|
{
|
|
@@ -2787,7 +2795,6 @@ type Marginfi = {
|
|
|
2787
2795
|
accounts: [
|
|
2788
2796
|
{
|
|
2789
2797
|
name: "group";
|
|
2790
|
-
writable: true;
|
|
2791
2798
|
relations: ["marginfiAccount", "bank"];
|
|
2792
2799
|
},
|
|
2793
2800
|
{
|
|
@@ -2834,24 +2841,6 @@ type Marginfi = {
|
|
|
2834
2841
|
}
|
|
2835
2842
|
];
|
|
2836
2843
|
},
|
|
2837
|
-
{
|
|
2838
|
-
name: "lendingAccountSettleEmissions";
|
|
2839
|
-
docs: [
|
|
2840
|
-
"(permissionless) Settle unclaimed emissions into a user's balance without withdrawing."
|
|
2841
|
-
];
|
|
2842
|
-
discriminator: [161, 58, 136, 174, 242, 223, 156, 176];
|
|
2843
|
-
accounts: [
|
|
2844
|
-
{
|
|
2845
|
-
name: "marginfiAccount";
|
|
2846
|
-
writable: true;
|
|
2847
|
-
},
|
|
2848
|
-
{
|
|
2849
|
-
name: "bank";
|
|
2850
|
-
writable: true;
|
|
2851
|
-
}
|
|
2852
|
-
];
|
|
2853
|
-
args: [];
|
|
2854
|
-
},
|
|
2855
2844
|
{
|
|
2856
2845
|
name: "lendingAccountStartFlashloan";
|
|
2857
2846
|
docs: [
|
|
@@ -2892,7 +2881,6 @@ type Marginfi = {
|
|
|
2892
2881
|
accounts: [
|
|
2893
2882
|
{
|
|
2894
2883
|
name: "group";
|
|
2895
|
-
writable: true;
|
|
2896
2884
|
relations: ["marginfiAccount", "bank"];
|
|
2897
2885
|
},
|
|
2898
2886
|
{
|
|
@@ -2954,273 +2942,26 @@ type Marginfi = {
|
|
|
2954
2942
|
};
|
|
2955
2943
|
},
|
|
2956
2944
|
{
|
|
2957
|
-
name: "liquidityVault";
|
|
2958
|
-
writable: true;
|
|
2959
|
-
relations: ["bank"];
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
name: "tokenProgram";
|
|
2963
|
-
}
|
|
2964
|
-
];
|
|
2965
|
-
args: [
|
|
2966
|
-
{
|
|
2967
|
-
name: "amount";
|
|
2968
|
-
type: "u64";
|
|
2969
|
-
},
|
|
2970
|
-
{
|
|
2971
|
-
name: "withdrawAll";
|
|
2972
|
-
type: {
|
|
2973
|
-
option: "bool";
|
|
2974
|
-
};
|
|
2975
|
-
}
|
|
2976
|
-
];
|
|
2977
|
-
},
|
|
2978
|
-
{
|
|
2979
|
-
name: "lendingAccountWithdrawEmissions";
|
|
2980
|
-
docs: [
|
|
2981
|
-
"(account authority) Settle and withdraw emissions rewards to a destination token account."
|
|
2982
|
-
];
|
|
2983
|
-
discriminator: [234, 22, 84, 214, 118, 176, 140, 170];
|
|
2984
|
-
accounts: [
|
|
2985
|
-
{
|
|
2986
|
-
name: "group";
|
|
2987
|
-
relations: ["marginfiAccount", "bank"];
|
|
2988
|
-
},
|
|
2989
|
-
{
|
|
2990
|
-
name: "marginfiAccount";
|
|
2991
|
-
writable: true;
|
|
2992
|
-
},
|
|
2993
|
-
{
|
|
2994
|
-
name: "authority";
|
|
2995
|
-
signer: true;
|
|
2996
|
-
},
|
|
2997
|
-
{
|
|
2998
|
-
name: "bank";
|
|
2999
|
-
writable: true;
|
|
3000
|
-
},
|
|
3001
|
-
{
|
|
3002
|
-
name: "emissionsMint";
|
|
3003
|
-
relations: ["bank"];
|
|
3004
|
-
},
|
|
3005
|
-
{
|
|
3006
|
-
name: "emissionsAuth";
|
|
3007
|
-
pda: {
|
|
3008
|
-
seeds: [
|
|
3009
|
-
{
|
|
3010
|
-
kind: "const";
|
|
3011
|
-
value: [
|
|
3012
|
-
101,
|
|
3013
|
-
109,
|
|
3014
|
-
105,
|
|
3015
|
-
115,
|
|
3016
|
-
115,
|
|
3017
|
-
105,
|
|
3018
|
-
111,
|
|
3019
|
-
110,
|
|
3020
|
-
115,
|
|
3021
|
-
95,
|
|
3022
|
-
97,
|
|
3023
|
-
117,
|
|
3024
|
-
116,
|
|
3025
|
-
104,
|
|
3026
|
-
95,
|
|
3027
|
-
115,
|
|
3028
|
-
101,
|
|
3029
|
-
101,
|
|
3030
|
-
100
|
|
3031
|
-
];
|
|
3032
|
-
},
|
|
3033
|
-
{
|
|
3034
|
-
kind: "account";
|
|
3035
|
-
path: "bank";
|
|
3036
|
-
},
|
|
3037
|
-
{
|
|
3038
|
-
kind: "account";
|
|
3039
|
-
path: "emissionsMint";
|
|
3040
|
-
}
|
|
3041
|
-
];
|
|
3042
|
-
};
|
|
3043
|
-
},
|
|
3044
|
-
{
|
|
3045
|
-
name: "emissionsVault";
|
|
3046
|
-
writable: true;
|
|
3047
|
-
pda: {
|
|
3048
|
-
seeds: [
|
|
3049
|
-
{
|
|
3050
|
-
kind: "const";
|
|
3051
|
-
value: [
|
|
3052
|
-
101,
|
|
3053
|
-
109,
|
|
3054
|
-
105,
|
|
3055
|
-
115,
|
|
3056
|
-
115,
|
|
3057
|
-
105,
|
|
3058
|
-
111,
|
|
3059
|
-
110,
|
|
3060
|
-
115,
|
|
3061
|
-
95,
|
|
3062
|
-
116,
|
|
3063
|
-
111,
|
|
3064
|
-
107,
|
|
3065
|
-
101,
|
|
3066
|
-
110,
|
|
3067
|
-
95,
|
|
3068
|
-
97,
|
|
3069
|
-
99,
|
|
3070
|
-
99,
|
|
3071
|
-
111,
|
|
3072
|
-
117,
|
|
3073
|
-
110,
|
|
3074
|
-
116,
|
|
3075
|
-
95,
|
|
3076
|
-
115,
|
|
3077
|
-
101,
|
|
3078
|
-
101,
|
|
3079
|
-
100
|
|
3080
|
-
];
|
|
3081
|
-
},
|
|
3082
|
-
{
|
|
3083
|
-
kind: "account";
|
|
3084
|
-
path: "bank";
|
|
3085
|
-
},
|
|
3086
|
-
{
|
|
3087
|
-
kind: "account";
|
|
3088
|
-
path: "emissionsMint";
|
|
3089
|
-
}
|
|
3090
|
-
];
|
|
3091
|
-
};
|
|
3092
|
-
},
|
|
3093
|
-
{
|
|
3094
|
-
name: "destinationAccount";
|
|
3095
|
-
writable: true;
|
|
3096
|
-
},
|
|
3097
|
-
{
|
|
3098
|
-
name: "tokenProgram";
|
|
3099
|
-
}
|
|
3100
|
-
];
|
|
3101
|
-
args: [];
|
|
3102
|
-
},
|
|
3103
|
-
{
|
|
3104
|
-
name: "lendingAccountWithdrawEmissionsPermissionless";
|
|
3105
|
-
docs: [
|
|
3106
|
-
"(permissionless) Withdraw emissions to the user's pre-configured emissions destination ATA."
|
|
3107
|
-
];
|
|
3108
|
-
discriminator: [4, 174, 124, 203, 44, 49, 145, 150];
|
|
3109
|
-
accounts: [
|
|
3110
|
-
{
|
|
3111
|
-
name: "group";
|
|
3112
|
-
relations: ["marginfiAccount", "bank"];
|
|
3113
|
-
},
|
|
3114
|
-
{
|
|
3115
|
-
name: "marginfiAccount";
|
|
3116
|
-
writable: true;
|
|
3117
|
-
},
|
|
3118
|
-
{
|
|
3119
|
-
name: "bank";
|
|
3120
|
-
writable: true;
|
|
3121
|
-
},
|
|
3122
|
-
{
|
|
3123
|
-
name: "emissionsMint";
|
|
3124
|
-
relations: ["bank"];
|
|
3125
|
-
},
|
|
3126
|
-
{
|
|
3127
|
-
name: "emissionsAuth";
|
|
3128
|
-
pda: {
|
|
3129
|
-
seeds: [
|
|
3130
|
-
{
|
|
3131
|
-
kind: "const";
|
|
3132
|
-
value: [
|
|
3133
|
-
101,
|
|
3134
|
-
109,
|
|
3135
|
-
105,
|
|
3136
|
-
115,
|
|
3137
|
-
115,
|
|
3138
|
-
105,
|
|
3139
|
-
111,
|
|
3140
|
-
110,
|
|
3141
|
-
115,
|
|
3142
|
-
95,
|
|
3143
|
-
97,
|
|
3144
|
-
117,
|
|
3145
|
-
116,
|
|
3146
|
-
104,
|
|
3147
|
-
95,
|
|
3148
|
-
115,
|
|
3149
|
-
101,
|
|
3150
|
-
101,
|
|
3151
|
-
100
|
|
3152
|
-
];
|
|
3153
|
-
},
|
|
3154
|
-
{
|
|
3155
|
-
kind: "account";
|
|
3156
|
-
path: "bank";
|
|
3157
|
-
},
|
|
3158
|
-
{
|
|
3159
|
-
kind: "account";
|
|
3160
|
-
path: "emissionsMint";
|
|
3161
|
-
}
|
|
3162
|
-
];
|
|
3163
|
-
};
|
|
3164
|
-
},
|
|
3165
|
-
{
|
|
3166
|
-
name: "emissionsVault";
|
|
3167
|
-
writable: true;
|
|
3168
|
-
pda: {
|
|
3169
|
-
seeds: [
|
|
3170
|
-
{
|
|
3171
|
-
kind: "const";
|
|
3172
|
-
value: [
|
|
3173
|
-
101,
|
|
3174
|
-
109,
|
|
3175
|
-
105,
|
|
3176
|
-
115,
|
|
3177
|
-
115,
|
|
3178
|
-
105,
|
|
3179
|
-
111,
|
|
3180
|
-
110,
|
|
3181
|
-
115,
|
|
3182
|
-
95,
|
|
3183
|
-
116,
|
|
3184
|
-
111,
|
|
3185
|
-
107,
|
|
3186
|
-
101,
|
|
3187
|
-
110,
|
|
3188
|
-
95,
|
|
3189
|
-
97,
|
|
3190
|
-
99,
|
|
3191
|
-
99,
|
|
3192
|
-
111,
|
|
3193
|
-
117,
|
|
3194
|
-
110,
|
|
3195
|
-
116,
|
|
3196
|
-
95,
|
|
3197
|
-
115,
|
|
3198
|
-
101,
|
|
3199
|
-
101,
|
|
3200
|
-
100
|
|
3201
|
-
];
|
|
3202
|
-
},
|
|
3203
|
-
{
|
|
3204
|
-
kind: "account";
|
|
3205
|
-
path: "bank";
|
|
3206
|
-
},
|
|
3207
|
-
{
|
|
3208
|
-
kind: "account";
|
|
3209
|
-
path: "emissionsMint";
|
|
3210
|
-
}
|
|
3211
|
-
];
|
|
3212
|
-
};
|
|
3213
|
-
},
|
|
3214
|
-
{
|
|
3215
|
-
name: "destinationAccount";
|
|
3216
|
-
docs: ["registered on `marginfi_account`"];
|
|
2945
|
+
name: "liquidityVault";
|
|
3217
2946
|
writable: true;
|
|
2947
|
+
relations: ["bank"];
|
|
3218
2948
|
},
|
|
3219
2949
|
{
|
|
3220
2950
|
name: "tokenProgram";
|
|
3221
2951
|
}
|
|
3222
2952
|
];
|
|
3223
|
-
args: [
|
|
2953
|
+
args: [
|
|
2954
|
+
{
|
|
2955
|
+
name: "amount";
|
|
2956
|
+
type: "u64";
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
name: "withdrawAll";
|
|
2960
|
+
type: {
|
|
2961
|
+
option: "bool";
|
|
2962
|
+
};
|
|
2963
|
+
}
|
|
2964
|
+
];
|
|
3224
2965
|
},
|
|
3225
2966
|
{
|
|
3226
2967
|
name: "lendingPoolAccrueBankInterest";
|
|
@@ -5623,7 +5364,6 @@ type Marginfi = {
|
|
|
5623
5364
|
accounts: [
|
|
5624
5365
|
{
|
|
5625
5366
|
name: "group";
|
|
5626
|
-
writable: true;
|
|
5627
5367
|
relations: ["bank"];
|
|
5628
5368
|
},
|
|
5629
5369
|
{
|
|
@@ -5634,50 +5374,17 @@ type Marginfi = {
|
|
|
5634
5374
|
args: [];
|
|
5635
5375
|
},
|
|
5636
5376
|
{
|
|
5637
|
-
name: "
|
|
5638
|
-
docs: [
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
{
|
|
5642
|
-
name: "group";
|
|
5643
|
-
relations: ["bank"];
|
|
5644
|
-
},
|
|
5645
|
-
{
|
|
5646
|
-
name: "admin";
|
|
5647
|
-
signer: true;
|
|
5648
|
-
relations: ["group"];
|
|
5649
|
-
},
|
|
5650
|
-
{
|
|
5651
|
-
name: "bank";
|
|
5652
|
-
writable: true;
|
|
5653
|
-
}
|
|
5654
|
-
];
|
|
5655
|
-
args: [
|
|
5656
|
-
{
|
|
5657
|
-
name: "price";
|
|
5658
|
-
type: {
|
|
5659
|
-
defined: {
|
|
5660
|
-
name: "wrappedI80f48";
|
|
5661
|
-
};
|
|
5662
|
-
};
|
|
5663
|
-
}
|
|
5377
|
+
name: "lendingPoolReclaimEmissionsVault";
|
|
5378
|
+
docs: [
|
|
5379
|
+
"(permissionless) Reclaim all remaining tokens from the emissions vault",
|
|
5380
|
+
"to the global fee wallet ATA, and disable emissions on the bank."
|
|
5664
5381
|
];
|
|
5665
|
-
|
|
5666
|
-
{
|
|
5667
|
-
name: "lendingPoolSetupEmissions";
|
|
5668
|
-
docs: ["(delegate_emissions_admin only)"];
|
|
5669
|
-
discriminator: [206, 97, 120, 172, 113, 204, 169, 70];
|
|
5382
|
+
discriminator: [206, 67, 186, 225, 41, 30, 95, 216];
|
|
5670
5383
|
accounts: [
|
|
5671
5384
|
{
|
|
5672
5385
|
name: "group";
|
|
5673
5386
|
relations: ["bank"];
|
|
5674
5387
|
},
|
|
5675
|
-
{
|
|
5676
|
-
name: "delegateEmissionsAdmin";
|
|
5677
|
-
writable: true;
|
|
5678
|
-
signer: true;
|
|
5679
|
-
relations: ["group"];
|
|
5680
|
-
},
|
|
5681
5388
|
{
|
|
5682
5389
|
name: "bank";
|
|
5683
5390
|
writable: true;
|
|
@@ -5725,7 +5432,7 @@ type Marginfi = {
|
|
|
5725
5432
|
};
|
|
5726
5433
|
},
|
|
5727
5434
|
{
|
|
5728
|
-
name: "
|
|
5435
|
+
name: "emissionsVault";
|
|
5729
5436
|
writable: true;
|
|
5730
5437
|
pda: {
|
|
5731
5438
|
seeds: [
|
|
@@ -5774,129 +5481,53 @@ type Marginfi = {
|
|
|
5774
5481
|
};
|
|
5775
5482
|
},
|
|
5776
5483
|
{
|
|
5777
|
-
name: "
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
address: "11111111111111111111111111111111";
|
|
5787
|
-
}
|
|
5788
|
-
];
|
|
5789
|
-
args: [
|
|
5790
|
-
{
|
|
5791
|
-
name: "flags";
|
|
5792
|
-
type: "u64";
|
|
5484
|
+
name: "feeState";
|
|
5485
|
+
pda: {
|
|
5486
|
+
seeds: [
|
|
5487
|
+
{
|
|
5488
|
+
kind: "const";
|
|
5489
|
+
value: [102, 101, 101, 115, 116, 97, 116, 101];
|
|
5490
|
+
}
|
|
5491
|
+
];
|
|
5492
|
+
};
|
|
5793
5493
|
},
|
|
5794
5494
|
{
|
|
5795
|
-
name: "
|
|
5796
|
-
|
|
5495
|
+
name: "destinationAccount";
|
|
5496
|
+
docs: ["emissions mint (validated in handler)."];
|
|
5497
|
+
writable: true;
|
|
5797
5498
|
},
|
|
5798
5499
|
{
|
|
5799
|
-
name: "
|
|
5800
|
-
type: "u64";
|
|
5500
|
+
name: "tokenProgram";
|
|
5801
5501
|
}
|
|
5802
5502
|
];
|
|
5503
|
+
args: [];
|
|
5803
5504
|
},
|
|
5804
5505
|
{
|
|
5805
|
-
name: "
|
|
5806
|
-
docs: ["(
|
|
5807
|
-
discriminator: [
|
|
5506
|
+
name: "lendingPoolSetFixedOraclePrice";
|
|
5507
|
+
docs: ["(admin only)"];
|
|
5508
|
+
discriminator: [28, 126, 127, 127, 60, 37, 211, 125];
|
|
5808
5509
|
accounts: [
|
|
5809
5510
|
{
|
|
5810
5511
|
name: "group";
|
|
5811
5512
|
relations: ["bank"];
|
|
5812
5513
|
},
|
|
5813
5514
|
{
|
|
5814
|
-
name: "
|
|
5815
|
-
writable: true;
|
|
5515
|
+
name: "admin";
|
|
5816
5516
|
signer: true;
|
|
5817
5517
|
relations: ["group"];
|
|
5818
5518
|
},
|
|
5819
5519
|
{
|
|
5820
5520
|
name: "bank";
|
|
5821
5521
|
writable: true;
|
|
5822
|
-
},
|
|
5823
|
-
{
|
|
5824
|
-
name: "emissionsMint";
|
|
5825
|
-
},
|
|
5826
|
-
{
|
|
5827
|
-
name: "emissionsTokenAccount";
|
|
5828
|
-
writable: true;
|
|
5829
|
-
pda: {
|
|
5830
|
-
seeds: [
|
|
5831
|
-
{
|
|
5832
|
-
kind: "const";
|
|
5833
|
-
value: [
|
|
5834
|
-
101,
|
|
5835
|
-
109,
|
|
5836
|
-
105,
|
|
5837
|
-
115,
|
|
5838
|
-
115,
|
|
5839
|
-
105,
|
|
5840
|
-
111,
|
|
5841
|
-
110,
|
|
5842
|
-
115,
|
|
5843
|
-
95,
|
|
5844
|
-
116,
|
|
5845
|
-
111,
|
|
5846
|
-
107,
|
|
5847
|
-
101,
|
|
5848
|
-
110,
|
|
5849
|
-
95,
|
|
5850
|
-
97,
|
|
5851
|
-
99,
|
|
5852
|
-
99,
|
|
5853
|
-
111,
|
|
5854
|
-
117,
|
|
5855
|
-
110,
|
|
5856
|
-
116,
|
|
5857
|
-
95,
|
|
5858
|
-
115,
|
|
5859
|
-
101,
|
|
5860
|
-
101,
|
|
5861
|
-
100
|
|
5862
|
-
];
|
|
5863
|
-
},
|
|
5864
|
-
{
|
|
5865
|
-
kind: "account";
|
|
5866
|
-
path: "bank";
|
|
5867
|
-
},
|
|
5868
|
-
{
|
|
5869
|
-
kind: "account";
|
|
5870
|
-
path: "emissionsMint";
|
|
5871
|
-
}
|
|
5872
|
-
];
|
|
5873
|
-
};
|
|
5874
|
-
},
|
|
5875
|
-
{
|
|
5876
|
-
name: "emissionsFundingAccount";
|
|
5877
|
-
writable: true;
|
|
5878
|
-
},
|
|
5879
|
-
{
|
|
5880
|
-
name: "tokenProgram";
|
|
5881
5522
|
}
|
|
5882
5523
|
];
|
|
5883
5524
|
args: [
|
|
5884
5525
|
{
|
|
5885
|
-
name: "
|
|
5886
|
-
type: {
|
|
5887
|
-
option: "u64";
|
|
5888
|
-
};
|
|
5889
|
-
},
|
|
5890
|
-
{
|
|
5891
|
-
name: "emissionsRate";
|
|
5892
|
-
type: {
|
|
5893
|
-
option: "u64";
|
|
5894
|
-
};
|
|
5895
|
-
},
|
|
5896
|
-
{
|
|
5897
|
-
name: "additionalEmissions";
|
|
5526
|
+
name: "price";
|
|
5898
5527
|
type: {
|
|
5899
|
-
|
|
5528
|
+
defined: {
|
|
5529
|
+
name: "wrappedI80f48";
|
|
5530
|
+
};
|
|
5900
5531
|
};
|
|
5901
5532
|
}
|
|
5902
5533
|
];
|
|
@@ -6404,7 +6035,7 @@ type Marginfi = {
|
|
|
6404
6035
|
name: "marginfiAccountKeeperCloseOrder";
|
|
6405
6036
|
docs: [
|
|
6406
6037
|
"(permissionless keeper) Close an existing Order after the user account was closed, or it no",
|
|
6407
|
-
"longer
|
|
6038
|
+
"longer has the associated positions, or the user has executed",
|
|
6408
6039
|
"`marginfi_account_set_keeper_close_flags`. Keeper keeps the rent."
|
|
6409
6040
|
];
|
|
6410
6041
|
discriminator: [128, 114, 71, 46, 194, 71, 186, 106];
|
|
@@ -6630,8 +6261,7 @@ type Marginfi = {
|
|
|
6630
6261
|
{
|
|
6631
6262
|
name: "marginfiAccountUpdateEmissionsDestinationAccount";
|
|
6632
6263
|
docs: [
|
|
6633
|
-
"(account authority) Set the wallet whose canonical ATA will receive
|
|
6634
|
-
"withdrawals."
|
|
6264
|
+
"(account authority) Set the wallet whose canonical ATA will receive off-chain emissions."
|
|
6635
6265
|
];
|
|
6636
6266
|
discriminator: [73, 185, 162, 201, 111, 24, 116, 185];
|
|
6637
6267
|
accounts: [
|
|
@@ -6642,11 +6272,10 @@ type Marginfi = {
|
|
|
6642
6272
|
{
|
|
6643
6273
|
name: "authority";
|
|
6644
6274
|
signer: true;
|
|
6645
|
-
relations: ["marginfiAccount"];
|
|
6646
6275
|
},
|
|
6647
6276
|
{
|
|
6648
6277
|
name: "destinationAccount";
|
|
6649
|
-
docs: ["
|
|
6278
|
+
docs: ["the canonical ATA for each emissions mint."];
|
|
6650
6279
|
}
|
|
6651
6280
|
];
|
|
6652
6281
|
args: [];
|
|
@@ -6695,6 +6324,12 @@ type Marginfi = {
|
|
|
6695
6324
|
option: "pubkey";
|
|
6696
6325
|
};
|
|
6697
6326
|
},
|
|
6327
|
+
{
|
|
6328
|
+
name: "newFlowAdmin";
|
|
6329
|
+
type: {
|
|
6330
|
+
option: "pubkey";
|
|
6331
|
+
};
|
|
6332
|
+
},
|
|
6698
6333
|
{
|
|
6699
6334
|
name: "newEmissionsAdmin";
|
|
6700
6335
|
type: {
|
|
@@ -6943,7 +6578,6 @@ type Marginfi = {
|
|
|
6943
6578
|
accounts: [
|
|
6944
6579
|
{
|
|
6945
6580
|
name: "group";
|
|
6946
|
-
writable: true;
|
|
6947
6581
|
relations: ["marginfiAccount", "bank"];
|
|
6948
6582
|
},
|
|
6949
6583
|
{
|
|
@@ -7265,7 +6899,6 @@ type Marginfi = {
|
|
|
7265
6899
|
accounts: [
|
|
7266
6900
|
{
|
|
7267
6901
|
name: "group";
|
|
7268
|
-
writable: true;
|
|
7269
6902
|
relations: ["marginfiAccount", "bank"];
|
|
7270
6903
|
},
|
|
7271
6904
|
{
|
|
@@ -7605,6 +7238,91 @@ type Marginfi = {
|
|
|
7605
7238
|
}
|
|
7606
7239
|
];
|
|
7607
7240
|
},
|
|
7241
|
+
{
|
|
7242
|
+
name: "updateDeleverageWithdrawals";
|
|
7243
|
+
docs: [
|
|
7244
|
+
"(delegate_flow_admin only) Update the deleverage daily withdraw outflow with",
|
|
7245
|
+
"aggregated data. The delegate flow admin aggregates",
|
|
7246
|
+
"`DeleverageWithdrawFlowEvent` events off-chain and calls this instruction at intervals."
|
|
7247
|
+
];
|
|
7248
|
+
discriminator: [56, 3, 181, 118, 27, 247, 207, 227];
|
|
7249
|
+
accounts: [
|
|
7250
|
+
{
|
|
7251
|
+
name: "marginfiGroup";
|
|
7252
|
+
writable: true;
|
|
7253
|
+
},
|
|
7254
|
+
{
|
|
7255
|
+
name: "delegateFlowAdmin";
|
|
7256
|
+
signer: true;
|
|
7257
|
+
relations: ["marginfiGroup"];
|
|
7258
|
+
}
|
|
7259
|
+
];
|
|
7260
|
+
args: [
|
|
7261
|
+
{
|
|
7262
|
+
name: "outflowUsd";
|
|
7263
|
+
type: "u32";
|
|
7264
|
+
},
|
|
7265
|
+
{
|
|
7266
|
+
name: "updateSeq";
|
|
7267
|
+
type: "u64";
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
name: "eventStartSlot";
|
|
7271
|
+
type: "u64";
|
|
7272
|
+
},
|
|
7273
|
+
{
|
|
7274
|
+
name: "eventEndSlot";
|
|
7275
|
+
type: "u64";
|
|
7276
|
+
}
|
|
7277
|
+
];
|
|
7278
|
+
},
|
|
7279
|
+
{
|
|
7280
|
+
name: "updateGroupRateLimiter";
|
|
7281
|
+
docs: [
|
|
7282
|
+
"(delegate_flow_admin only) Update the group rate limiter with aggregated",
|
|
7283
|
+
"inflow/outflow. The delegate flow admin aggregates",
|
|
7284
|
+
"`RateLimitFlowEvent` events off-chain, converts to USD, and calls this instruction at",
|
|
7285
|
+
"intervals to update group rate limiter state."
|
|
7286
|
+
];
|
|
7287
|
+
discriminator: [23, 78, 60, 139, 187, 44, 129, 37];
|
|
7288
|
+
accounts: [
|
|
7289
|
+
{
|
|
7290
|
+
name: "marginfiGroup";
|
|
7291
|
+
writable: true;
|
|
7292
|
+
},
|
|
7293
|
+
{
|
|
7294
|
+
name: "delegateFlowAdmin";
|
|
7295
|
+
signer: true;
|
|
7296
|
+
relations: ["marginfiGroup"];
|
|
7297
|
+
}
|
|
7298
|
+
];
|
|
7299
|
+
args: [
|
|
7300
|
+
{
|
|
7301
|
+
name: "outflowUsd";
|
|
7302
|
+
type: {
|
|
7303
|
+
option: "u64";
|
|
7304
|
+
};
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
name: "inflowUsd";
|
|
7308
|
+
type: {
|
|
7309
|
+
option: "u64";
|
|
7310
|
+
};
|
|
7311
|
+
},
|
|
7312
|
+
{
|
|
7313
|
+
name: "updateSeq";
|
|
7314
|
+
type: "u64";
|
|
7315
|
+
},
|
|
7316
|
+
{
|
|
7317
|
+
name: "eventStartSlot";
|
|
7318
|
+
type: "u64";
|
|
7319
|
+
},
|
|
7320
|
+
{
|
|
7321
|
+
name: "eventEndSlot";
|
|
7322
|
+
type: "u64";
|
|
7323
|
+
}
|
|
7324
|
+
];
|
|
7325
|
+
},
|
|
7608
7326
|
{
|
|
7609
7327
|
name: "writeBankMetadata";
|
|
7610
7328
|
docs: [
|
|
@@ -7715,6 +7433,10 @@ type Marginfi = {
|
|
|
7715
7433
|
name: "deleverageEvent";
|
|
7716
7434
|
discriminator: [161, 8, 108, 204, 209, 198, 12, 30];
|
|
7717
7435
|
},
|
|
7436
|
+
{
|
|
7437
|
+
name: "deleverageWithdrawFlowEvent";
|
|
7438
|
+
discriminator: [109, 90, 139, 200, 10, 204, 84, 176];
|
|
7439
|
+
},
|
|
7718
7440
|
{
|
|
7719
7441
|
name: "editStakedSettingsEvent";
|
|
7720
7442
|
discriminator: [29, 58, 155, 191, 75, 220, 145, 206];
|
|
@@ -7811,6 +7533,10 @@ type Marginfi = {
|
|
|
7811
7533
|
name: "marginfiGroupCreateEvent";
|
|
7812
7534
|
discriminator: [233, 125, 61, 14, 98, 240, 136, 253];
|
|
7813
7535
|
},
|
|
7536
|
+
{
|
|
7537
|
+
name: "rateLimitFlowEvent";
|
|
7538
|
+
discriminator: [229, 5, 73, 200, 0, 107, 105, 109];
|
|
7539
|
+
},
|
|
7814
7540
|
{
|
|
7815
7541
|
name: "setKeeperCloseFlagsEvent";
|
|
7816
7542
|
discriminator: [193, 230, 93, 128, 117, 87, 96, 21];
|
|
@@ -8417,6 +8143,66 @@ type Marginfi = {
|
|
|
8417
8143
|
name: "invalidRateLimitPrice";
|
|
8418
8144
|
msg: "Invalid rate limit price: pass oracle or pre-crank cache";
|
|
8419
8145
|
},
|
|
8146
|
+
{
|
|
8147
|
+
code: 6120;
|
|
8148
|
+
name: "groupRateLimiterUpdateEmpty";
|
|
8149
|
+
msg: "Group rate limiter admin update must include inflow and/or outflow";
|
|
8150
|
+
},
|
|
8151
|
+
{
|
|
8152
|
+
code: 6121;
|
|
8153
|
+
name: "groupRateLimiterUpdateInvalidSlotRange";
|
|
8154
|
+
msg: "Group rate limiter admin update slot range is invalid";
|
|
8155
|
+
},
|
|
8156
|
+
{
|
|
8157
|
+
code: 6122;
|
|
8158
|
+
name: "groupRateLimiterUpdateFutureSlot";
|
|
8159
|
+
msg: "Group rate limiter admin update cannot reference future slots";
|
|
8160
|
+
},
|
|
8161
|
+
{
|
|
8162
|
+
code: 6123;
|
|
8163
|
+
name: "groupRateLimiterUpdateStale";
|
|
8164
|
+
msg: "Group rate limiter admin update is too stale";
|
|
8165
|
+
},
|
|
8166
|
+
{
|
|
8167
|
+
code: 6124;
|
|
8168
|
+
name: "groupRateLimiterUpdateOutOfOrderSlot";
|
|
8169
|
+
msg: "Group rate limiter admin update slot progression is out of order";
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
code: 6125;
|
|
8173
|
+
name: "groupRateLimiterUpdateOutOfOrderSeq";
|
|
8174
|
+
msg: "Group rate limiter admin update sequence is out of order";
|
|
8175
|
+
},
|
|
8176
|
+
{
|
|
8177
|
+
code: 6126;
|
|
8178
|
+
name: "deleverageWithdrawalUpdateEmpty";
|
|
8179
|
+
msg: "Deleverage withdrawal admin update must include outflow";
|
|
8180
|
+
},
|
|
8181
|
+
{
|
|
8182
|
+
code: 6127;
|
|
8183
|
+
name: "deleverageWithdrawalUpdateInvalidSlotRange";
|
|
8184
|
+
msg: "Deleverage withdrawal admin update slot range is invalid";
|
|
8185
|
+
},
|
|
8186
|
+
{
|
|
8187
|
+
code: 6128;
|
|
8188
|
+
name: "deleverageWithdrawalUpdateFutureSlot";
|
|
8189
|
+
msg: "Deleverage withdrawal admin update cannot reference future slots";
|
|
8190
|
+
},
|
|
8191
|
+
{
|
|
8192
|
+
code: 6129;
|
|
8193
|
+
name: "deleverageWithdrawalUpdateStale";
|
|
8194
|
+
msg: "Deleverage withdrawal admin update is too stale";
|
|
8195
|
+
},
|
|
8196
|
+
{
|
|
8197
|
+
code: 6130;
|
|
8198
|
+
name: "deleverageWithdrawalUpdateOutOfOrderSlot";
|
|
8199
|
+
msg: "Deleverage withdrawal admin update slot progression is out of order";
|
|
8200
|
+
},
|
|
8201
|
+
{
|
|
8202
|
+
code: 6131;
|
|
8203
|
+
name: "deleverageWithdrawalUpdateOutOfOrderSeq";
|
|
8204
|
+
msg: "Deleverage withdrawal admin update sequence is out of order";
|
|
8205
|
+
},
|
|
8420
8206
|
{
|
|
8421
8207
|
code: 6200;
|
|
8422
8208
|
name: "wrongAssetTagForStandardInstructions";
|
|
@@ -9222,7 +9008,7 @@ type Marginfi = {
|
|
|
9222
9008
|
{
|
|
9223
9009
|
name: "pad0";
|
|
9224
9010
|
type: {
|
|
9225
|
-
array: ["u8",
|
|
9011
|
+
array: ["u8", 16];
|
|
9226
9012
|
};
|
|
9227
9013
|
},
|
|
9228
9014
|
{
|
|
@@ -9340,8 +9126,10 @@ type Marginfi = {
|
|
|
9340
9126
|
"Liquidate as an additional safeguard, if the liquidation prices stored here were to be",
|
|
9341
9127
|
"edited between start and end, it would completely break the risk engine. End validates that",
|
|
9342
9128
|
"the lock is set, panics if not, and removes it - which prevents footguns if the cache was",
|
|
9343
|
-
"e.g. accidently set to default. The lock is also removed when a Balance is closed
|
|
9344
|
-
"repay_all or
|
|
9129
|
+
"e.g. accidently set to default. The lock is also removed when a Balance is closed via",
|
|
9130
|
+
"withdraw_all, repay_all, or close_balance, but only when the account has",
|
|
9131
|
+
"ACCOUNT_IN_RECEIVERSHIP set, so that operations on unrelated accounts sharing the same",
|
|
9132
|
+
"bank do not interfere with an in-progress liquidation."
|
|
9345
9133
|
];
|
|
9346
9134
|
type: "u8";
|
|
9347
9135
|
},
|
|
@@ -9984,16 +9772,6 @@ type Marginfi = {
|
|
|
9984
9772
|
name: "rateLimitWindow";
|
|
9985
9773
|
};
|
|
9986
9774
|
};
|
|
9987
|
-
},
|
|
9988
|
-
{
|
|
9989
|
-
name: "untrackedInflow";
|
|
9990
|
-
docs: [
|
|
9991
|
-
"Native token inflows pending USD conversion for group rate limiter.",
|
|
9992
|
-
"When deposits/repays occur without a valid oracle price, the amount is",
|
|
9993
|
-
"recorded here and later applied to the group rate limiter when a valid",
|
|
9994
|
-
"price becomes available (e.g., during pulse_bank_price_cache or outflow operations)."
|
|
9995
|
-
];
|
|
9996
|
-
type: "i64";
|
|
9997
9775
|
}
|
|
9998
9776
|
];
|
|
9999
9777
|
};
|
|
@@ -10022,6 +9800,41 @@ type Marginfi = {
|
|
|
10022
9800
|
];
|
|
10023
9801
|
};
|
|
10024
9802
|
},
|
|
9803
|
+
{
|
|
9804
|
+
name: "deleverageWithdrawFlowEvent";
|
|
9805
|
+
docs: [
|
|
9806
|
+
"Emitted for deleverage-only withdraw outflows.",
|
|
9807
|
+
"The delegate flow admin aggregates these off-chain and",
|
|
9808
|
+
"updates the deleverage daily withdraws via `update_deleverage_withdrawals`."
|
|
9809
|
+
];
|
|
9810
|
+
type: {
|
|
9811
|
+
kind: "struct";
|
|
9812
|
+
fields: [
|
|
9813
|
+
{
|
|
9814
|
+
name: "group";
|
|
9815
|
+
type: "pubkey";
|
|
9816
|
+
},
|
|
9817
|
+
{
|
|
9818
|
+
name: "bank";
|
|
9819
|
+
type: "pubkey";
|
|
9820
|
+
},
|
|
9821
|
+
{
|
|
9822
|
+
name: "mint";
|
|
9823
|
+
type: "pubkey";
|
|
9824
|
+
},
|
|
9825
|
+
{
|
|
9826
|
+
name: "outflowUsd";
|
|
9827
|
+
docs: ["Equity-denominated outflow value in USD, rounded to integer."];
|
|
9828
|
+
type: "u32";
|
|
9829
|
+
},
|
|
9830
|
+
{
|
|
9831
|
+
name: "currentTimestamp";
|
|
9832
|
+
docs: ["Unix timestamp when the flow was recorded"];
|
|
9833
|
+
type: "i64";
|
|
9834
|
+
}
|
|
9835
|
+
];
|
|
9836
|
+
};
|
|
9837
|
+
},
|
|
10025
9838
|
{
|
|
10026
9839
|
name: "driftConfigCompact";
|
|
10027
9840
|
docs: [
|
|
@@ -11328,7 +11141,7 @@ type Marginfi = {
|
|
|
11328
11141
|
"(i.e. no implicit padding). This is important because `Pubkey` has alignment=1 while `u64`",
|
|
11329
11142
|
"has alignment=8; using plain `repr(C)` would insert padding before the first `u64`."
|
|
11330
11143
|
];
|
|
11331
|
-
serialization: "
|
|
11144
|
+
serialization: "bytemuck";
|
|
11332
11145
|
repr: {
|
|
11333
11146
|
kind: "c";
|
|
11334
11147
|
packed: true;
|
|
@@ -12175,12 +11988,7 @@ type Marginfi = {
|
|
|
12175
11988
|
},
|
|
12176
11989
|
{
|
|
12177
11990
|
name: "emissionsDestinationAccount";
|
|
12178
|
-
docs: [
|
|
12179
|
-
"Set with `update_emissions_destination_account`. Emissions rewards can be withdrawn to the",
|
|
12180
|
-
"canonical ATA of this wallet without the user's input (withdraw_emissions_permissionless).",
|
|
12181
|
-
"If pubkey default, the user has not opted into this feature, and must claim emissions",
|
|
12182
|
-
"manually (withdraw_emissions)."
|
|
12183
|
-
];
|
|
11991
|
+
docs: ["Wallet whose canonical ATA receives off-chain emissions distributions."];
|
|
12184
11992
|
type: "pubkey";
|
|
12185
11993
|
},
|
|
12186
11994
|
{
|
|
@@ -12451,7 +12259,7 @@ type Marginfi = {
|
|
|
12451
12259
|
name: "emodeAdmin";
|
|
12452
12260
|
docs: [
|
|
12453
12261
|
"This admin can configure collateral ratios above (but not below) the collateral ratio of",
|
|
12454
|
-
"certain banks
|
|
12262
|
+
"certain banks, e.g. allow SOL to count as 90% collateral when borrowing an LST instead of",
|
|
12455
12263
|
"the default rate."
|
|
12456
12264
|
];
|
|
12457
12265
|
type: "pubkey";
|
|
@@ -12552,6 +12360,40 @@ type Marginfi = {
|
|
|
12552
12360
|
};
|
|
12553
12361
|
};
|
|
12554
12362
|
},
|
|
12363
|
+
{
|
|
12364
|
+
name: "rateLimiterLastAdminUpdateSlot";
|
|
12365
|
+
docs: ["Last slot covered by an admin group rate limiter aggregation update."];
|
|
12366
|
+
type: "u64";
|
|
12367
|
+
},
|
|
12368
|
+
{
|
|
12369
|
+
name: "rateLimiterLastAdminUpdateSeq";
|
|
12370
|
+
docs: [
|
|
12371
|
+
"Monotonic sequence number for admin group rate limiter updates.",
|
|
12372
|
+
"This is used to enforce strict ordering and prevent duplicate/replayed batches",
|
|
12373
|
+
"when slot ranges overlap or multiple updates happen in the same slot."
|
|
12374
|
+
];
|
|
12375
|
+
type: "u64";
|
|
12376
|
+
},
|
|
12377
|
+
{
|
|
12378
|
+
name: "deleverageWithdrawLastAdminUpdateSlot";
|
|
12379
|
+
docs: ["Last slot covered by an admin deleverage withdraw-limit aggregation update."];
|
|
12380
|
+
type: "u64";
|
|
12381
|
+
},
|
|
12382
|
+
{
|
|
12383
|
+
name: "deleverageWithdrawLastAdminUpdateSeq";
|
|
12384
|
+
docs: ["Monotonic sequence number for admin deleverage withdraw-limit updates."];
|
|
12385
|
+
type: "u64";
|
|
12386
|
+
},
|
|
12387
|
+
{
|
|
12388
|
+
name: "delegateFlowAdmin";
|
|
12389
|
+
docs: [
|
|
12390
|
+
"Can modify flow-control status for the group, i.e. update the withdraw caches with flow",
|
|
12391
|
+
"information from banks. Typically this is a hot wallet that lives in e.g. some cron job. If",
|
|
12392
|
+
"compromised, flow control can be effectively disabled until the admin is restored, which",
|
|
12393
|
+
"does not itself compromise any funds, and is merely annoying."
|
|
12394
|
+
];
|
|
12395
|
+
type: "pubkey";
|
|
12396
|
+
},
|
|
12555
12397
|
{
|
|
12556
12398
|
name: "padding0";
|
|
12557
12399
|
type: {
|
|
@@ -12559,7 +12401,7 @@ type Marginfi = {
|
|
|
12559
12401
|
{
|
|
12560
12402
|
array: ["u64", 2];
|
|
12561
12403
|
},
|
|
12562
|
-
|
|
12404
|
+
2
|
|
12563
12405
|
];
|
|
12564
12406
|
};
|
|
12565
12407
|
},
|
|
@@ -13670,6 +13512,50 @@ type Marginfi = {
|
|
|
13670
13512
|
];
|
|
13671
13513
|
};
|
|
13672
13514
|
},
|
|
13515
|
+
{
|
|
13516
|
+
name: "rateLimitFlowEvent";
|
|
13517
|
+
docs: [
|
|
13518
|
+
"Emitted when a bank-level inflow or outflow is recorded.",
|
|
13519
|
+
"The delegate flow admin aggregates these off-chain and",
|
|
13520
|
+
"updates the group rate limiter via `update_group_rate_limiter`."
|
|
13521
|
+
];
|
|
13522
|
+
type: {
|
|
13523
|
+
kind: "struct";
|
|
13524
|
+
fields: [
|
|
13525
|
+
{
|
|
13526
|
+
name: "group";
|
|
13527
|
+
type: "pubkey";
|
|
13528
|
+
},
|
|
13529
|
+
{
|
|
13530
|
+
name: "bank";
|
|
13531
|
+
type: "pubkey";
|
|
13532
|
+
},
|
|
13533
|
+
{
|
|
13534
|
+
name: "mint";
|
|
13535
|
+
type: "pubkey";
|
|
13536
|
+
},
|
|
13537
|
+
{
|
|
13538
|
+
name: "flowDirection";
|
|
13539
|
+
docs: ["0 = outflow (withdraw/borrow), 1 = inflow (deposit/repay)"];
|
|
13540
|
+
type: "u8";
|
|
13541
|
+
},
|
|
13542
|
+
{
|
|
13543
|
+
name: "nativeAmount";
|
|
13544
|
+
docs: ["Amount in native tokens"];
|
|
13545
|
+
type: "u64";
|
|
13546
|
+
},
|
|
13547
|
+
{
|
|
13548
|
+
name: "mintDecimals";
|
|
13549
|
+
type: "u8";
|
|
13550
|
+
},
|
|
13551
|
+
{
|
|
13552
|
+
name: "currentTimestamp";
|
|
13553
|
+
docs: ["Unix timestamp when the flow was recorded"];
|
|
13554
|
+
type: "i64";
|
|
13555
|
+
}
|
|
13556
|
+
];
|
|
13557
|
+
};
|
|
13558
|
+
},
|
|
13673
13559
|
{
|
|
13674
13560
|
name: "rateLimitWindow";
|
|
13675
13561
|
docs: [
|
|
@@ -14521,6 +14407,8 @@ declare function addTransactionMetadata<T extends Transaction | VersionedTransac
|
|
|
14521
14407
|
*/
|
|
14522
14408
|
declare function getTxSize(tx: VersionedTransaction | Transaction): number;
|
|
14523
14409
|
declare function getAccountKeys(tx: VersionedTransaction | Transaction, lookupTableAccounts: AddressLookupTableAccount[]): number;
|
|
14410
|
+
declare function getWritableAccountKeys(tx: VersionedTransaction | Transaction): number;
|
|
14411
|
+
declare function getTotalAccountKeys(tx: VersionedTransaction | Transaction): number;
|
|
14524
14412
|
|
|
14525
14413
|
/**
|
|
14526
14414
|
* Decodes a Solana transaction instruction using the provided Interface Definition Language (IDL).
|
|
@@ -14850,6 +14738,8 @@ interface BankType {
|
|
|
14850
14738
|
group: PublicKey;
|
|
14851
14739
|
mint: PublicKey;
|
|
14852
14740
|
mintDecimals: number;
|
|
14741
|
+
mintRate: number | null;
|
|
14742
|
+
mintPrice: number;
|
|
14853
14743
|
assetShareValue: BigNumber$1;
|
|
14854
14744
|
liabilityShareValue: BigNumber$1;
|
|
14855
14745
|
liquidityVault: PublicKey;
|
|
@@ -15206,7 +15096,10 @@ interface BankMetadata$2 {
|
|
|
15206
15096
|
tokenName: string;
|
|
15207
15097
|
tokenSymbol: string;
|
|
15208
15098
|
}
|
|
15209
|
-
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2
|
|
15099
|
+
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata$2, mintData?: {
|
|
15100
|
+
mintRate: number | null;
|
|
15101
|
+
mintPrice: number;
|
|
15102
|
+
}): BankType;
|
|
15210
15103
|
declare function dtoToBank(bankDto: BankTypeDto): BankType;
|
|
15211
15104
|
declare function dtoToEmodeSettings(emodeSettingsDto: EmodeSettingsDto): EmodeSettingsType;
|
|
15212
15105
|
declare function dtoToBankConfig(bankConfigDto: BankConfigDto): BankConfigType;
|
|
@@ -15665,6 +15558,55 @@ declare class HealthCacheSimulationError extends Error {
|
|
|
15665
15558
|
constructor(message: string, mrgnErr: number | null, internalErr: number | null);
|
|
15666
15559
|
}
|
|
15667
15560
|
|
|
15561
|
+
declare enum SwapProvider {
|
|
15562
|
+
JUPITER = "JUPITER",
|
|
15563
|
+
TITAN = "TITAN",
|
|
15564
|
+
DFLOW = "DFLOW"
|
|
15565
|
+
}
|
|
15566
|
+
interface SwapApiConfig {
|
|
15567
|
+
basePath?: string;
|
|
15568
|
+
apiKey?: string;
|
|
15569
|
+
headers?: Record<string, string>;
|
|
15570
|
+
}
|
|
15571
|
+
interface SwapProviderEntry {
|
|
15572
|
+
provider: SwapProvider;
|
|
15573
|
+
apiConfig?: SwapApiConfig;
|
|
15574
|
+
}
|
|
15575
|
+
interface SwapProviderConfig {
|
|
15576
|
+
provider: SwapProvider;
|
|
15577
|
+
slippageMode: "DYNAMIC" | "FIXED";
|
|
15578
|
+
slippageBps: number;
|
|
15579
|
+
platformFeeBps: number;
|
|
15580
|
+
directRoutesOnly?: boolean;
|
|
15581
|
+
apiConfig?: SwapApiConfig;
|
|
15582
|
+
fallbackProviders?: SwapProviderEntry[];
|
|
15583
|
+
}
|
|
15584
|
+
interface SwapOpts {
|
|
15585
|
+
swapConfig?: SwapProviderConfig;
|
|
15586
|
+
swapIxs?: {
|
|
15587
|
+
instructions: TransactionInstruction[];
|
|
15588
|
+
lookupTables: AddressLookupTableAccount[];
|
|
15589
|
+
};
|
|
15590
|
+
}
|
|
15591
|
+
interface SwapQuoteResult {
|
|
15592
|
+
inAmount: string;
|
|
15593
|
+
outAmount: string;
|
|
15594
|
+
otherAmountThreshold: string;
|
|
15595
|
+
slippageBps: number;
|
|
15596
|
+
platformFee?: {
|
|
15597
|
+
amount: string;
|
|
15598
|
+
feeBps: number;
|
|
15599
|
+
};
|
|
15600
|
+
priceImpactPct?: string;
|
|
15601
|
+
contextSlot?: number;
|
|
15602
|
+
timeTaken?: number;
|
|
15603
|
+
}
|
|
15604
|
+
interface SwapIxsResult {
|
|
15605
|
+
swapInstructions: TransactionInstruction[];
|
|
15606
|
+
setupInstructions: TransactionInstruction[];
|
|
15607
|
+
addressLookupTableAddresses: AddressLookupTableAccount[];
|
|
15608
|
+
quoteResponse: SwapQuoteResult;
|
|
15609
|
+
}
|
|
15668
15610
|
interface MakeDepositIxOpts {
|
|
15669
15611
|
wrapAndUnwrapSol?: boolean;
|
|
15670
15612
|
wSolBalanceUi?: number;
|
|
@@ -15930,19 +15872,7 @@ interface MakeLoopTxParams {
|
|
|
15930
15872
|
borrowBank: BankType;
|
|
15931
15873
|
tokenProgram: PublicKey;
|
|
15932
15874
|
};
|
|
15933
|
-
swapOpts:
|
|
15934
|
-
jupiterOptions?: {
|
|
15935
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15936
|
-
slippageBps: number;
|
|
15937
|
-
platformFeeBps: number;
|
|
15938
|
-
directRoutesOnly?: boolean;
|
|
15939
|
-
configParams?: ConfigurationParameters;
|
|
15940
|
-
};
|
|
15941
|
-
swapIxs?: {
|
|
15942
|
-
instructions: TransactionInstruction[];
|
|
15943
|
-
lookupTables: AddressLookupTableAccount[];
|
|
15944
|
-
};
|
|
15945
|
-
};
|
|
15875
|
+
swapOpts: SwapOpts;
|
|
15946
15876
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15947
15877
|
overrideInferAccounts?: {
|
|
15948
15878
|
group?: PublicKey;
|
|
@@ -15971,19 +15901,7 @@ interface MakeRepayWithCollatTxParams {
|
|
|
15971
15901
|
totalPositionAmount: number;
|
|
15972
15902
|
repayAmount?: number;
|
|
15973
15903
|
};
|
|
15974
|
-
swapOpts:
|
|
15975
|
-
jupiterOptions?: {
|
|
15976
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15977
|
-
slippageBps: number;
|
|
15978
|
-
platformFeeBps: number;
|
|
15979
|
-
directRoutesOnly?: boolean;
|
|
15980
|
-
configParams?: ConfigurationParameters;
|
|
15981
|
-
};
|
|
15982
|
-
swapIxs?: {
|
|
15983
|
-
instructions: TransactionInstruction[];
|
|
15984
|
-
lookupTables: AddressLookupTableAccount[];
|
|
15985
|
-
};
|
|
15986
|
-
};
|
|
15904
|
+
swapOpts: SwapOpts;
|
|
15987
15905
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15988
15906
|
overrideInferAccounts?: {
|
|
15989
15907
|
group?: PublicKey;
|
|
@@ -16010,15 +15928,7 @@ interface MakeSwapCollateralTxParams {
|
|
|
16010
15928
|
depositBank: BankType;
|
|
16011
15929
|
tokenProgram: PublicKey;
|
|
16012
15930
|
};
|
|
16013
|
-
swapOpts:
|
|
16014
|
-
jupiterOptions?: {
|
|
16015
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
16016
|
-
slippageBps: number;
|
|
16017
|
-
platformFeeBps: number;
|
|
16018
|
-
directRoutesOnly?: boolean;
|
|
16019
|
-
configParams?: ConfigurationParameters;
|
|
16020
|
-
};
|
|
16021
|
-
};
|
|
15931
|
+
swapOpts: SwapOpts;
|
|
16022
15932
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
16023
15933
|
overrideInferAccounts?: {
|
|
16024
15934
|
group?: PublicKey;
|
|
@@ -16045,15 +15955,7 @@ interface MakeSwapDebtTxParams {
|
|
|
16045
15955
|
borrowBank: BankType;
|
|
16046
15956
|
tokenProgram: PublicKey;
|
|
16047
15957
|
};
|
|
16048
|
-
swapOpts:
|
|
16049
|
-
jupiterOptions?: {
|
|
16050
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
16051
|
-
slippageBps: number;
|
|
16052
|
-
platformFeeBps: number;
|
|
16053
|
-
directRoutesOnly?: boolean;
|
|
16054
|
-
configParams?: ConfigurationParameters;
|
|
16055
|
-
};
|
|
16056
|
-
};
|
|
15958
|
+
swapOpts: SwapOpts;
|
|
16057
15959
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
16058
15960
|
overrideInferAccounts?: {
|
|
16059
15961
|
group?: PublicKey;
|
|
@@ -16070,35 +15972,6 @@ interface MakeSetupIxParams {
|
|
|
16070
15972
|
tokenProgram: PublicKey;
|
|
16071
15973
|
}[];
|
|
16072
15974
|
}
|
|
16073
|
-
interface MakeMintStakedLstIxParams {
|
|
16074
|
-
amount: Amount;
|
|
16075
|
-
authority: PublicKey;
|
|
16076
|
-
stakeAccountPk: PublicKey;
|
|
16077
|
-
validator: PublicKey;
|
|
16078
|
-
connection: Connection;
|
|
16079
|
-
}
|
|
16080
|
-
interface MakeMintStakedLstTxParams extends MakeMintStakedLstIxParams {
|
|
16081
|
-
luts: AddressLookupTableAccount[];
|
|
16082
|
-
blockhash?: string;
|
|
16083
|
-
}
|
|
16084
|
-
interface MakeRedeemStakedLstIxParams {
|
|
16085
|
-
amount: Amount;
|
|
16086
|
-
authority: PublicKey;
|
|
16087
|
-
validator: PublicKey;
|
|
16088
|
-
connection: Connection;
|
|
16089
|
-
}
|
|
16090
|
-
interface MakeRedeemStakedLstTxParams extends MakeRedeemStakedLstIxParams {
|
|
16091
|
-
luts: AddressLookupTableAccount[];
|
|
16092
|
-
blockhash?: string;
|
|
16093
|
-
}
|
|
16094
|
-
interface MakeMergeStakeAccountsTxParams {
|
|
16095
|
-
authority: PublicKey;
|
|
16096
|
-
sourceStakeAccount: PublicKey;
|
|
16097
|
-
destinationStakeAccount: PublicKey;
|
|
16098
|
-
connection: Connection;
|
|
16099
|
-
luts: AddressLookupTableAccount[];
|
|
16100
|
-
blockhash?: string;
|
|
16101
|
-
}
|
|
16102
15975
|
|
|
16103
15976
|
/**
|
|
16104
15977
|
* A combination of banks that need to be cranked
|
|
@@ -17325,19 +17198,76 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
17325
17198
|
*/
|
|
17326
17199
|
declare function computeMaxWithdrawForBank(params: ComputeMaxWithdrawForBankParams): BigNumber$1;
|
|
17327
17200
|
|
|
17201
|
+
declare function toJupiterConfig(apiConfig?: SwapApiConfig): ConfigurationParameters | undefined;
|
|
17328
17202
|
type GetJupiterSwapIxsForFlashloanParams = {
|
|
17329
17203
|
quoteParams: QuoteGetRequest;
|
|
17330
17204
|
authority: PublicKey;
|
|
17331
17205
|
connection: Connection;
|
|
17332
17206
|
destinationTokenAccount: PublicKey;
|
|
17333
|
-
|
|
17207
|
+
apiConfig?: SwapApiConfig;
|
|
17208
|
+
maxSwapAccounts?: number;
|
|
17334
17209
|
};
|
|
17335
|
-
declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount,
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17210
|
+
declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, maxSwapAccounts, }: GetJupiterSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
|
|
17211
|
+
|
|
17212
|
+
type TitanQuoteParams = {
|
|
17213
|
+
inputMint: string;
|
|
17214
|
+
outputMint: string;
|
|
17215
|
+
amount: number;
|
|
17216
|
+
swapMode: "ExactIn" | "ExactOut";
|
|
17217
|
+
slippageBps?: number;
|
|
17218
|
+
platformFeeBps?: number;
|
|
17219
|
+
directRoutesOnly?: boolean;
|
|
17220
|
+
sizeConstraint?: number;
|
|
17221
|
+
maxSwapAccounts?: number;
|
|
17222
|
+
maxSwapTotalAccounts?: number;
|
|
17223
|
+
};
|
|
17224
|
+
type GetTitanSwapIxsParams = {
|
|
17225
|
+
quoteParams: TitanQuoteParams;
|
|
17226
|
+
authority: PublicKey;
|
|
17227
|
+
connection: Connection;
|
|
17228
|
+
destinationTokenAccount: PublicKey;
|
|
17229
|
+
apiConfig?: SwapApiConfig;
|
|
17230
|
+
};
|
|
17231
|
+
type GetTitanExactOutEstimateParams = {
|
|
17232
|
+
inputMint: string;
|
|
17233
|
+
outputMint: string;
|
|
17234
|
+
amount: number;
|
|
17235
|
+
slippageBps?: number;
|
|
17236
|
+
apiConfig?: SwapApiConfig;
|
|
17237
|
+
};
|
|
17238
|
+
declare const getTitanSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, }: GetTitanSwapIxsParams) => Promise<SwapIxsResult>;
|
|
17239
|
+
declare const getTitanExactOutEstimate: (params: GetTitanExactOutEstimateParams) => Promise<{
|
|
17240
|
+
otherAmountThreshold: string;
|
|
17241
|
+
quoteResult: SwapQuoteResult;
|
|
17242
|
+
}>;
|
|
17243
|
+
|
|
17244
|
+
type GetSwapIxsForFlashloanParams = {
|
|
17245
|
+
inputMint: string;
|
|
17246
|
+
outputMint: string;
|
|
17247
|
+
amount: number;
|
|
17248
|
+
swapMode: "ExactIn" | "ExactOut";
|
|
17249
|
+
authority: PublicKey;
|
|
17250
|
+
connection: Connection;
|
|
17251
|
+
destinationTokenAccount: PublicKey;
|
|
17252
|
+
swapOpts: SwapOpts;
|
|
17253
|
+
sizeConstraint?: number;
|
|
17254
|
+
maxSwapAccounts?: number;
|
|
17255
|
+
maxSwapTotalAccounts?: number;
|
|
17256
|
+
};
|
|
17257
|
+
declare const getSwapIxsForFlashloan: (params: GetSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
|
|
17258
|
+
type GetExactOutEstimateParams = {
|
|
17259
|
+
inputMint: string;
|
|
17260
|
+
outputMint: string;
|
|
17261
|
+
amount: number;
|
|
17262
|
+
swapOpts: SwapOpts;
|
|
17263
|
+
connection: Connection;
|
|
17264
|
+
};
|
|
17265
|
+
type ExactOutEstimateResult = {
|
|
17266
|
+
otherAmountThreshold: string;
|
|
17267
|
+
quoteResult: SwapQuoteResult;
|
|
17268
|
+
};
|
|
17269
|
+
declare const getExactOutEstimate: (params: GetExactOutEstimateParams) => Promise<ExactOutEstimateResult>;
|
|
17270
|
+
declare function mapJupiterQuoteToSwapQuoteResult(quote: QuoteResponse): SwapQuoteResult;
|
|
17341
17271
|
|
|
17342
17272
|
declare function computeClosePositionTokenAmount(position: {
|
|
17343
17273
|
amount: number;
|
|
@@ -17348,6 +17278,117 @@ declare function isWholePosition(position: {
|
|
|
17348
17278
|
isLending: boolean;
|
|
17349
17279
|
}, amount: number, mintDecimals: number): boolean;
|
|
17350
17280
|
|
|
17281
|
+
/**
|
|
17282
|
+
* Synchronous flashloan TX size estimator.
|
|
17283
|
+
*
|
|
17284
|
+
* Estimates the serialized size of a V0 flashloan transaction without compiling
|
|
17285
|
+
* or serializing the message. This allows us to synchronously compute the byte
|
|
17286
|
+
* overhead of non-swap instructions and determine how much budget remains for
|
|
17287
|
+
* the swap IX (e.g. Titan).
|
|
17288
|
+
*
|
|
17289
|
+
* Thoroughly tested using R&D scripts (rnd-flashloan-size.ts) and cross-referenced
|
|
17290
|
+
* against actual serialized transaction sizes across all action types (Loop, Repay,
|
|
17291
|
+
* SwapCollateral, SwapDebt) and asset tag variants (Standard, Kamino, Drift).
|
|
17292
|
+
*/
|
|
17293
|
+
|
|
17294
|
+
/**
|
|
17295
|
+
* Estimate the serialized size of a V0 transaction from its instructions and LUTs.
|
|
17296
|
+
* Simulates the key resolution logic of TransactionMessage.compileToV0Message
|
|
17297
|
+
* without actually compiling or serializing the message.
|
|
17298
|
+
*/
|
|
17299
|
+
declare function computeV0TxSize(ixs: TransactionInstruction[], payerKey: PublicKey, luts: AddressLookupTableAccount[]): {
|
|
17300
|
+
size: number;
|
|
17301
|
+
accountCount: number;
|
|
17302
|
+
writableAccountCount: number;
|
|
17303
|
+
};
|
|
17304
|
+
interface FlashloanSwapConstraints {
|
|
17305
|
+
/** Available bytes for swap instruction(s) */
|
|
17306
|
+
sizeConstraint: number;
|
|
17307
|
+
/** Available writable account slots for swap instruction(s) */
|
|
17308
|
+
maxSwapWritableAccounts: number;
|
|
17309
|
+
/** Available total account slots for swap instruction(s) */
|
|
17310
|
+
maxSwapTotalAccounts: number;
|
|
17311
|
+
}
|
|
17312
|
+
/**
|
|
17313
|
+
* Compute the available byte budget and account budget for swap instructions
|
|
17314
|
+
* in a flashloan TX. Compiles a real V0 message and serializes it for an exact
|
|
17315
|
+
* non-swap byte count.
|
|
17316
|
+
*
|
|
17317
|
+
* @param ixs - The non-swap IXs (CU requests + primary + secondary).
|
|
17318
|
+
* Must NOT include BeginFL/EndFL — those are synthesized internally.
|
|
17319
|
+
*/
|
|
17320
|
+
declare function computeFlashLoanNonSwapBudget({ program, marginfiAccount, ixs, bankMap, addressLookupTableAccounts, }: {
|
|
17321
|
+
program: MarginfiProgram;
|
|
17322
|
+
marginfiAccount: {
|
|
17323
|
+
address: PublicKey;
|
|
17324
|
+
authority: PublicKey;
|
|
17325
|
+
balances: BalanceType[];
|
|
17326
|
+
};
|
|
17327
|
+
ixs: TransactionInstruction[];
|
|
17328
|
+
bankMap: Map<string, BankType>;
|
|
17329
|
+
addressLookupTableAccounts: AddressLookupTableAccount[];
|
|
17330
|
+
}): FlashloanSwapConstraints;
|
|
17331
|
+
interface FlashloanPrecheckResult {
|
|
17332
|
+
/** Exact serialized size of the full flashloan TX */
|
|
17333
|
+
fullTxSize: number;
|
|
17334
|
+
/** How many bytes over MAX_TX_SIZE (negative = under budget) */
|
|
17335
|
+
overshoot: number;
|
|
17336
|
+
/** Total writable accounts in the full TX */
|
|
17337
|
+
writableAccounts: number;
|
|
17338
|
+
/** Total accounts (static + LUT) in the full TX */
|
|
17339
|
+
totalAccounts: number;
|
|
17340
|
+
}
|
|
17341
|
+
/**
|
|
17342
|
+
* Compile the full flashloan TX (all IXs + all LUTs) and return exact size info.
|
|
17343
|
+
* Call this AFTER receiving swap IXs but BEFORE makeFlashLoanTx to detect overflows
|
|
17344
|
+
* early with good diagnostics.
|
|
17345
|
+
*
|
|
17346
|
+
* Uses a dummy blockhash (same 32 bytes as a real one) so the size is exact.
|
|
17347
|
+
*/
|
|
17348
|
+
declare function compileFlashloanPrecheck({ allIxs, payer, luts, sizeConstraint, swapIxCount, swapLutCount, }: {
|
|
17349
|
+
allIxs: TransactionInstruction[];
|
|
17350
|
+
payer: PublicKey;
|
|
17351
|
+
luts: AddressLookupTableAccount[];
|
|
17352
|
+
sizeConstraint: number;
|
|
17353
|
+
swapIxCount: number;
|
|
17354
|
+
swapLutCount: number;
|
|
17355
|
+
}): FlashloanPrecheckResult;
|
|
17356
|
+
type FlashloanBudgetIx = {
|
|
17357
|
+
type: "borrow";
|
|
17358
|
+
bank: BankType;
|
|
17359
|
+
tokenProgram: PublicKey;
|
|
17360
|
+
} | {
|
|
17361
|
+
type: "repay";
|
|
17362
|
+
bank: BankType;
|
|
17363
|
+
tokenProgram: PublicKey;
|
|
17364
|
+
} | {
|
|
17365
|
+
type: "deposit";
|
|
17366
|
+
bank: BankType;
|
|
17367
|
+
tokenProgram: PublicKey;
|
|
17368
|
+
} | {
|
|
17369
|
+
type: "withdraw";
|
|
17370
|
+
bank: BankType;
|
|
17371
|
+
tokenProgram: PublicKey;
|
|
17372
|
+
};
|
|
17373
|
+
/**
|
|
17374
|
+
* Compute flashloan swap constraints by building dummy primary + secondary IXs
|
|
17375
|
+
* and measuring the remaining TX budget. Replaces the duplicated switch/case
|
|
17376
|
+
* blocks in each action file.
|
|
17377
|
+
*/
|
|
17378
|
+
declare function computeFlashloanSwapConstraints({ program, marginfiAccount, bankMap, addressLookupTableAccounts, bankMetadataMap, primaryIx, secondaryIx, overrideInferAccounts, }: {
|
|
17379
|
+
program: MarginfiProgram;
|
|
17380
|
+
marginfiAccount: MarginfiAccountType;
|
|
17381
|
+
bankMap: Map<string, BankType>;
|
|
17382
|
+
addressLookupTableAccounts: AddressLookupTableAccount[];
|
|
17383
|
+
bankMetadataMap: BankIntegrationMetadataMap;
|
|
17384
|
+
primaryIx: FlashloanBudgetIx;
|
|
17385
|
+
secondaryIx: FlashloanBudgetIx;
|
|
17386
|
+
overrideInferAccounts?: {
|
|
17387
|
+
group?: PublicKey;
|
|
17388
|
+
authority?: PublicKey;
|
|
17389
|
+
};
|
|
17390
|
+
}): Promise<FlashloanSwapConstraints>;
|
|
17391
|
+
|
|
17351
17392
|
/**
|
|
17352
17393
|
* Creates an instruction to close a Marginfi account.
|
|
17353
17394
|
*
|
|
@@ -17682,7 +17723,7 @@ declare function makeJuplendDepositTx(params: MakeJuplendDepositTxParams): Promi
|
|
|
17682
17723
|
declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
|
|
17683
17724
|
transactions: ExtendedV0Transaction[];
|
|
17684
17725
|
actionTxIndex: number;
|
|
17685
|
-
quoteResponse:
|
|
17726
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17686
17727
|
}>;
|
|
17687
17728
|
|
|
17688
17729
|
/**
|
|
@@ -17741,7 +17782,7 @@ declare function makeRepayIx({ program, bank, tokenProgram, amount, authority, a
|
|
|
17741
17782
|
declare function makeRepayTx(params: MakeRepayTxParams): Promise<ExtendedTransaction>;
|
|
17742
17783
|
declare function makeRepayWithCollatTx(params: MakeRepayWithCollatTxParams): Promise<{
|
|
17743
17784
|
transactions: ExtendedV0Transaction[];
|
|
17744
|
-
swapQuote:
|
|
17785
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
17745
17786
|
amountToRepay: number;
|
|
17746
17787
|
}>;
|
|
17747
17788
|
|
|
@@ -17752,7 +17793,7 @@ declare function makeFlashLoanTx({ program, marginfiAccount, ixs, bankMap, block
|
|
|
17752
17793
|
/**
|
|
17753
17794
|
* @deprecated Rewards are now distributed offchain. If you wish to get access to emission data, please reach out.
|
|
17754
17795
|
*/
|
|
17755
|
-
declare function
|
|
17796
|
+
declare function makeClearEmissionsIx(program: MarginfiProgram, marginfiAccount: MarginfiAccountType, banks: Map<string, BankType>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
|
|
17756
17797
|
|
|
17757
17798
|
/**
|
|
17758
17799
|
* Creates transactions to swap one collateral position to another using a flash loan.
|
|
@@ -17769,14 +17810,14 @@ declare function makeWithdrawEmissionsIx(program: MarginfiProgram, marginfiAccou
|
|
|
17769
17810
|
* oraclePrices,
|
|
17770
17811
|
* withdrawOpts: { totalPositionAmount: 10, withdrawBank: jitoSolBank, tokenProgram },
|
|
17771
17812
|
* depositOpts: { depositBank: mSolBank, tokenProgram },
|
|
17772
|
-
* swapOpts: {
|
|
17813
|
+
* swapOpts: { swapConfig: { provider: SwapProvider.JUPITER, slippageMode: "DYNAMIC", slippageBps: 50, platformFeeBps: 0 } },
|
|
17773
17814
|
* // ...
|
|
17774
17815
|
* });
|
|
17775
17816
|
*/
|
|
17776
17817
|
declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promise<{
|
|
17777
17818
|
transactions: ExtendedV0Transaction[];
|
|
17778
17819
|
actionTxIndex: number;
|
|
17779
|
-
quoteResponse:
|
|
17820
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17780
17821
|
}>;
|
|
17781
17822
|
|
|
17782
17823
|
/**
|
|
@@ -17794,53 +17835,16 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
|
|
|
17794
17835
|
* oraclePrices,
|
|
17795
17836
|
* repayOpts: { totalPositionAmount: 100, repayBank: usdcBank, tokenProgram },
|
|
17796
17837
|
* borrowOpts: { borrowBank: solBank, tokenProgram },
|
|
17797
|
-
* swapOpts: {
|
|
17838
|
+
* swapOpts: { swapConfig: { provider: SwapProvider.JUPITER, slippageMode: "DYNAMIC", slippageBps: 50, platformFeeBps: 0 } },
|
|
17798
17839
|
* // ...
|
|
17799
17840
|
* });
|
|
17800
17841
|
*/
|
|
17801
17842
|
declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
|
|
17802
17843
|
transactions: ExtendedV0Transaction[];
|
|
17803
17844
|
actionTxIndex: number;
|
|
17804
|
-
quoteResponse:
|
|
17845
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17805
17846
|
}>;
|
|
17806
17847
|
|
|
17807
|
-
/**
|
|
17808
|
-
* Creates instructions to convert a native stake account into LST tokens.
|
|
17809
|
-
*
|
|
17810
|
-
* Steps:
|
|
17811
|
-
* 1. Create LST ATA if needed
|
|
17812
|
-
* 2. Split stake account if partial amount
|
|
17813
|
-
* 3. Authorize staker + withdrawer to pool
|
|
17814
|
-
* 4. Deposit stake into pool → user receives LST
|
|
17815
|
-
*/
|
|
17816
|
-
declare function makeMintStakedLstIx(params: MakeMintStakedLstIxParams): Promise<InstructionsWrapper>;
|
|
17817
|
-
/**
|
|
17818
|
-
* Creates a versioned transaction to convert a native stake account into LST tokens.
|
|
17819
|
-
*/
|
|
17820
|
-
declare function makeMintStakedLstTx(params: MakeMintStakedLstTxParams): Promise<ExtendedV0Transaction>;
|
|
17821
|
-
|
|
17822
|
-
/**
|
|
17823
|
-
* Creates instructions to convert LST tokens back to a native stake account.
|
|
17824
|
-
*
|
|
17825
|
-
* Steps:
|
|
17826
|
-
* 1. Create new stake account (rent-exempt)
|
|
17827
|
-
* 2. Approve pool mint authority to burn LST
|
|
17828
|
-
* 3. Withdraw stake from pool → user receives stake account
|
|
17829
|
-
*/
|
|
17830
|
-
declare function makeRedeemStakedLstIx(params: MakeRedeemStakedLstIxParams): Promise<InstructionsWrapper>;
|
|
17831
|
-
/**
|
|
17832
|
-
* Creates a versioned transaction to convert LST tokens back to a native stake account.
|
|
17833
|
-
*/
|
|
17834
|
-
declare function makeRedeemStakedLstTx(params: MakeRedeemStakedLstTxParams): Promise<ExtendedV0Transaction>;
|
|
17835
|
-
|
|
17836
|
-
/**
|
|
17837
|
-
* Creates a versioned transaction to merge two stake accounts.
|
|
17838
|
-
*
|
|
17839
|
-
* The source stake account will be merged into the destination stake account.
|
|
17840
|
-
* Both accounts must share the same authorized staker/withdrawer and vote account.
|
|
17841
|
-
*/
|
|
17842
|
-
declare function makeMergeStakeAccountsTx(params: MakeMergeStakeAccountsTxParams): Promise<ExtendedV0Transaction>;
|
|
17843
|
-
|
|
17844
17848
|
type MakeSmartCrankSwbFeedIxParams = {
|
|
17845
17849
|
marginfiAccount: MarginfiAccountType;
|
|
17846
17850
|
bankMap: Map<string, BankType>;
|
|
@@ -18639,30 +18643,6 @@ declare function validatorStakeGroupToDto(validatorStakeGroup: ValidatorStakeGro
|
|
|
18639
18643
|
|
|
18640
18644
|
declare function dtoToValidatorStakeGroup(validatorStakeGroupDto: ValidatorStakeGroupDto): ValidatorStakeGroup;
|
|
18641
18645
|
|
|
18642
|
-
/**
|
|
18643
|
-
* Metadata for a staked bank entry.
|
|
18644
|
-
* Sourced from hardcoded JSON — update via `metadata.data.ts` until dynamic fetching is implemented.
|
|
18645
|
-
*/
|
|
18646
|
-
interface StakedBankMetadata {
|
|
18647
|
-
bankAddress: string;
|
|
18648
|
-
validatorVoteAccount: string;
|
|
18649
|
-
tokenAddress: string;
|
|
18650
|
-
tokenName: string;
|
|
18651
|
-
tokenSymbol: string;
|
|
18652
|
-
}
|
|
18653
|
-
/**
|
|
18654
|
-
* Returns a Map of bankAddress → StakedBankMetadata (lazy-cached).
|
|
18655
|
-
*
|
|
18656
|
-
* @remarks Uses hardcoded data. TODO: Replace with dynamic API fetch.
|
|
18657
|
-
*/
|
|
18658
|
-
declare function getStakedBankMetadataMap(): Map<string, StakedBankMetadata>;
|
|
18659
|
-
/**
|
|
18660
|
-
* Returns a Record of bankAddress → validatorVoteAccount (lazy-cached).
|
|
18661
|
-
*
|
|
18662
|
-
* @remarks Uses hardcoded data. TODO: Replace with dynamic API fetch.
|
|
18663
|
-
*/
|
|
18664
|
-
declare function getValidatorVoteAccountByBank(): Record<string, string>;
|
|
18665
|
-
|
|
18666
18646
|
/**
|
|
18667
18647
|
* Temporary Module for Functions Pending Refactoring
|
|
18668
18648
|
*
|
|
@@ -18898,6 +18878,8 @@ declare class Bank implements BankType {
|
|
|
18898
18878
|
readonly mint: PublicKey;
|
|
18899
18879
|
readonly mintDecimals: number;
|
|
18900
18880
|
readonly group: PublicKey;
|
|
18881
|
+
readonly mintRate: number | null;
|
|
18882
|
+
readonly mintPrice: number;
|
|
18901
18883
|
readonly assetShareValue: BigNumber$1;
|
|
18902
18884
|
readonly liabilityShareValue: BigNumber$1;
|
|
18903
18885
|
readonly liquidityVault: PublicKey;
|
|
@@ -18944,7 +18926,7 @@ declare class Bank implements BankType {
|
|
|
18944
18926
|
readonly lendingPositionCount?: BigNumber$1 | undefined;
|
|
18945
18927
|
readonly borrowingPositionCount?: BigNumber$1 | undefined;
|
|
18946
18928
|
readonly tokenSymbol?: string | undefined;
|
|
18947
|
-
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey, assetShareValue: BigNumber$1, liabilityShareValue: BigNumber$1, liquidityVault: PublicKey, liquidityVaultBump: number, liquidityVaultAuthorityBump: number, insuranceVault: PublicKey, insuranceVaultBump: number, insuranceVaultAuthorityBump: number, collectedInsuranceFeesOutstanding: BigNumber$1, feeVault: PublicKey, feeVaultBump: number, feeVaultAuthorityBump: number, collectedGroupFeesOutstanding: BigNumber$1, lastUpdate: number, config: BankConfig, totalAssetShares: BigNumber$1, totalLiabilityShares: BigNumber$1, emissionsActiveBorrowing: boolean, emissionsActiveLending: boolean, emissionsRate: number, emissionsMint: PublicKey, emissionsRemaining: BigNumber$1, oracleKey: PublicKey, emode: EmodeSettings, kaminoIntegrationAccounts?: {
|
|
18929
|
+
constructor(address: PublicKey, mint: PublicKey, mintDecimals: number, group: PublicKey, mintRate: number | null, mintPrice: number, assetShareValue: BigNumber$1, liabilityShareValue: BigNumber$1, liquidityVault: PublicKey, liquidityVaultBump: number, liquidityVaultAuthorityBump: number, insuranceVault: PublicKey, insuranceVaultBump: number, insuranceVaultAuthorityBump: number, collectedInsuranceFeesOutstanding: BigNumber$1, feeVault: PublicKey, feeVaultBump: number, feeVaultAuthorityBump: number, collectedGroupFeesOutstanding: BigNumber$1, lastUpdate: number, config: BankConfig, totalAssetShares: BigNumber$1, totalLiabilityShares: BigNumber$1, emissionsActiveBorrowing: boolean, emissionsActiveLending: boolean, emissionsRate: number, emissionsMint: PublicKey, emissionsRemaining: BigNumber$1, oracleKey: PublicKey, emode: EmodeSettings, kaminoIntegrationAccounts?: {
|
|
18948
18930
|
kaminoReserve: PublicKey;
|
|
18949
18931
|
kaminoObligation: PublicKey;
|
|
18950
18932
|
} | undefined, driftIntegrationAccounts?: {
|
|
@@ -19167,10 +19149,14 @@ declare function getConfig(environment?: Environment, overrides?: Partial<Omit<P
|
|
|
19167
19149
|
declare enum TransactionBuildingErrorCode {
|
|
19168
19150
|
JUPITER_SWAP_SIZE_EXCEEDED_REPAY = "JUPITER_SWAP_SIZE_EXCEEDED_REPAY",
|
|
19169
19151
|
JUPITER_SWAP_SIZE_EXCEEDED_LOOP = "JUPITER_SWAP_SIZE_EXCEEDED_LOOP",
|
|
19152
|
+
SWAP_SIZE_EXCEEDED_LOOP = "SWAP_SIZE_EXCEEDED_LOOP",
|
|
19153
|
+
SWAP_SIZE_EXCEEDED_REPAY = "SWAP_SIZE_EXCEEDED_REPAY",
|
|
19170
19154
|
ORACLE_CRANK_FAILED = "ORACLE_CRANK_FAILED",
|
|
19171
19155
|
KAMINO_RESERVE_NOT_FOUND = "KAMINO_RESERVE_NOT_FOUND",
|
|
19172
19156
|
DRIFT_STATE_NOT_FOUND = "DRIFT_STATE_NOT_FOUND",
|
|
19173
|
-
JUPLEND_STATE_NOT_FOUND = "JUPLEND_STATE_NOT_FOUND"
|
|
19157
|
+
JUPLEND_STATE_NOT_FOUND = "JUPLEND_STATE_NOT_FOUND",
|
|
19158
|
+
SWITCHBOARD_FEED_UPDATE_FAILED = "SWITCHBOARD_FEED_UPDATE_FAILED",
|
|
19159
|
+
SWAP_QUOTE_FAILED = "SWAP_QUOTE_FAILED"
|
|
19174
19160
|
}
|
|
19175
19161
|
/**
|
|
19176
19162
|
* Typed details for each error code
|
|
@@ -19184,6 +19170,16 @@ interface TransactionBuildingErrorDetails {
|
|
|
19184
19170
|
bytes: number;
|
|
19185
19171
|
accountKeys: number;
|
|
19186
19172
|
};
|
|
19173
|
+
[TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_LOOP]: {
|
|
19174
|
+
bytes: number;
|
|
19175
|
+
accountKeys: number;
|
|
19176
|
+
provider?: string;
|
|
19177
|
+
};
|
|
19178
|
+
[TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_REPAY]: {
|
|
19179
|
+
bytes: number;
|
|
19180
|
+
accountKeys: number;
|
|
19181
|
+
provider?: string;
|
|
19182
|
+
};
|
|
19187
19183
|
[TransactionBuildingErrorCode.ORACLE_CRANK_FAILED]: {
|
|
19188
19184
|
uncrankableLiabilities: Array<{
|
|
19189
19185
|
bankAddress: string;
|
|
@@ -19213,6 +19209,16 @@ interface TransactionBuildingErrorDetails {
|
|
|
19213
19209
|
bankMint: string;
|
|
19214
19210
|
bankSymbol?: string;
|
|
19215
19211
|
};
|
|
19212
|
+
[TransactionBuildingErrorCode.SWITCHBOARD_FEED_UPDATE_FAILED]: {
|
|
19213
|
+
oracleKeys: string[];
|
|
19214
|
+
reason: string;
|
|
19215
|
+
};
|
|
19216
|
+
[TransactionBuildingErrorCode.SWAP_QUOTE_FAILED]: {
|
|
19217
|
+
provider: string;
|
|
19218
|
+
inputMint: string;
|
|
19219
|
+
outputMint: string;
|
|
19220
|
+
reason: string;
|
|
19221
|
+
};
|
|
19216
19222
|
}
|
|
19217
19223
|
/**
|
|
19218
19224
|
* Error thrown during transaction building in the SDK.
|
|
@@ -19228,6 +19234,8 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
|
|
|
19228
19234
|
*/
|
|
19229
19235
|
static jupiterSwapSizeExceededLoop(bytes: number, accountKeys: number): TransactionBuildingError<TransactionBuildingErrorCode.JUPITER_SWAP_SIZE_EXCEEDED_LOOP>;
|
|
19230
19236
|
static jupiterSwapSizeExceededRepay(bytes: number, accountKeys: number): TransactionBuildingError<TransactionBuildingErrorCode.JUPITER_SWAP_SIZE_EXCEEDED_REPAY>;
|
|
19237
|
+
static swapSizeExceededLoop(bytes: number, accountKeys: number, provider?: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_LOOP>;
|
|
19238
|
+
static swapSizeExceededRepay(bytes: number, accountKeys: number, provider?: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_REPAY>;
|
|
19231
19239
|
/**
|
|
19232
19240
|
* Failed to crank oracles for one or more banks
|
|
19233
19241
|
*/
|
|
@@ -19254,6 +19262,14 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
|
|
|
19254
19262
|
* Failed to find JupLend state for a bank
|
|
19255
19263
|
*/
|
|
19256
19264
|
static jupLendStateNotFound(bankAddress: string, bankMint: string, bankSymbol?: string): TransactionBuildingError<TransactionBuildingErrorCode.JUPLEND_STATE_NOT_FOUND>;
|
|
19265
|
+
/**
|
|
19266
|
+
* Failed to update Switchboard price feeds
|
|
19267
|
+
*/
|
|
19268
|
+
static switchboardFeedUpdateFailed(oracleKeys: string[], reason: string): TransactionBuildingError<TransactionBuildingErrorCode.SWITCHBOARD_FEED_UPDATE_FAILED>;
|
|
19269
|
+
/**
|
|
19270
|
+
* Failed to get a swap quote from any provider
|
|
19271
|
+
*/
|
|
19272
|
+
static swapQuoteFailed(provider: string, inputMint: string, outputMint: string, reason: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_QUOTE_FAILED>;
|
|
19257
19273
|
/**
|
|
19258
19274
|
* Generic escape hatch for custom errors
|
|
19259
19275
|
*/
|
|
@@ -19418,6 +19434,8 @@ declare const HOURS_PER_YEAR: number;
|
|
|
19418
19434
|
declare const MAX_U64: string;
|
|
19419
19435
|
|
|
19420
19436
|
declare const MAX_TX_SIZE: number;
|
|
19437
|
+
declare const MAX_WRITABLE_ACCOUNTS = 64;
|
|
19438
|
+
declare const MAX_ACCOUNT_LOCKS = 64;
|
|
19421
19439
|
declare const BUNDLE_TX_SIZE: number;
|
|
19422
19440
|
declare const PRIORITY_TX_SIZE: number;
|
|
19423
19441
|
|
|
@@ -19775,14 +19793,13 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19775
19793
|
*
|
|
19776
19794
|
* @param program - The Marginfi program instance
|
|
19777
19795
|
* @param banks - Map of all available banks
|
|
19778
|
-
* @param
|
|
19779
|
-
* @param bankAddress - The bank to withdraw emissions from
|
|
19796
|
+
* @param bankAddress - The bank to clear emissions for
|
|
19780
19797
|
*
|
|
19781
|
-
* @returns Promise resolving to InstructionsWrapper containing the
|
|
19798
|
+
* @returns Promise resolving to InstructionsWrapper containing the clear emissions instructions
|
|
19782
19799
|
*
|
|
19783
|
-
* @see {@link
|
|
19800
|
+
* @see {@link makeClearEmissionsIx} for implementation
|
|
19784
19801
|
*/
|
|
19785
|
-
|
|
19802
|
+
makeClearEmissionsIx(program: MarginfiProgram, banks: Map<string, Bank>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
|
|
19786
19803
|
/**
|
|
19787
19804
|
* Creates an instruction to begin a flash loan.
|
|
19788
19805
|
*
|
|
@@ -19921,7 +19938,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19921
19938
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19922
19939
|
* @param params.depositOpts - Deposit configuration (bank, amount, mode)
|
|
19923
19940
|
* @param params.borrowOpts - Borrow configuration (bank, amount)
|
|
19924
|
-
* @param params.swapOpts -
|
|
19941
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19925
19942
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19926
19943
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19927
19944
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19936,7 +19953,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19936
19953
|
makeLoopTx(params: Omit<MakeLoopTxParams, "marginfiAccount">): Promise<{
|
|
19937
19954
|
transactions: ExtendedV0Transaction[];
|
|
19938
19955
|
actionTxIndex: number;
|
|
19939
|
-
quoteResponse:
|
|
19956
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
19940
19957
|
}>;
|
|
19941
19958
|
/**
|
|
19942
19959
|
* Creates a transaction to repay debt using collateral.
|
|
@@ -19953,7 +19970,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19953
19970
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19954
19971
|
* @param params.withdrawOpts - Withdraw configuration (bank, amount)
|
|
19955
19972
|
* @param params.repayOpts - Repay configuration (bank, optional amount)
|
|
19956
|
-
* @param params.swapOpts -
|
|
19973
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19957
19974
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19958
19975
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19959
19976
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19968,7 +19985,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19968
19985
|
*/
|
|
19969
19986
|
makeRepayWithCollatTx(params: Omit<MakeRepayWithCollatTxParams, "marginfiAccount">): Promise<{
|
|
19970
19987
|
transactions: ExtendedV0Transaction[];
|
|
19971
|
-
swapQuote:
|
|
19988
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
19972
19989
|
amountToRepay: number;
|
|
19973
19990
|
}>;
|
|
19974
19991
|
/**
|
|
@@ -19987,7 +20004,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19987
20004
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19988
20005
|
* @param params.withdrawOpts - Withdraw configuration (bank, amount, tokenProgram)
|
|
19989
20006
|
* @param params.depositOpts - Deposit configuration (bank, tokenProgram)
|
|
19990
|
-
* @param params.swapOpts -
|
|
20007
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19991
20008
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19992
20009
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19993
20010
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -20003,7 +20020,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
20003
20020
|
makeSwapCollateralTx(params: Omit<MakeSwapCollateralTxParams, "marginfiAccount">): Promise<{
|
|
20004
20021
|
transactions: ExtendedV0Transaction[];
|
|
20005
20022
|
actionTxIndex: number;
|
|
20006
|
-
quoteResponse:
|
|
20023
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20007
20024
|
}>;
|
|
20008
20025
|
/**
|
|
20009
20026
|
* Creates a transaction to swap one debt position to another using a flash loan.
|
|
@@ -20021,7 +20038,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
20021
20038
|
* @param params.oraclePrices - Map of current oracle prices
|
|
20022
20039
|
* @param params.repayOpts - Repay configuration (bank, amount, tokenProgram)
|
|
20023
20040
|
* @param params.borrowOpts - Borrow configuration (bank, tokenProgram)
|
|
20024
|
-
* @param params.swapOpts -
|
|
20041
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
20025
20042
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
20026
20043
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
20027
20044
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -20036,7 +20053,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
20036
20053
|
makeSwapDebtTx(params: Omit<MakeSwapDebtTxParams, "marginfiAccount">): Promise<{
|
|
20037
20054
|
transactions: ExtendedV0Transaction[];
|
|
20038
20055
|
actionTxIndex: number;
|
|
20039
|
-
quoteResponse:
|
|
20056
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20040
20057
|
}>;
|
|
20041
20058
|
/**
|
|
20042
20059
|
* Creates a deposit transaction.
|
|
@@ -20285,11 +20302,11 @@ declare class MarginfiAccountWrapper {
|
|
|
20285
20302
|
*/
|
|
20286
20303
|
makeBorrowIx(bankAddress: PublicKey, amount: Amount, opts?: MakeBorrowIxOpts): Promise<InstructionsWrapper>;
|
|
20287
20304
|
/**
|
|
20288
|
-
* Creates a
|
|
20305
|
+
* Creates a clear emissions instruction with auto-injected client data.
|
|
20289
20306
|
*
|
|
20290
|
-
* @param bankAddress - Bank address to
|
|
20307
|
+
* @param bankAddress - Bank address to clear emissions for
|
|
20291
20308
|
*/
|
|
20292
|
-
|
|
20309
|
+
makeClearEmissionsIx(bankAddress: PublicKey): Promise<InstructionsWrapper>;
|
|
20293
20310
|
/**
|
|
20294
20311
|
* Creates a begin flash loan instruction.
|
|
20295
20312
|
*
|
|
@@ -20335,7 +20352,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20335
20352
|
makeLoopTx(params: Omit<MakeLoopTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20336
20353
|
transactions: ExtendedV0Transaction[];
|
|
20337
20354
|
actionTxIndex: number;
|
|
20338
|
-
quoteResponse:
|
|
20355
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20339
20356
|
}>;
|
|
20340
20357
|
/**
|
|
20341
20358
|
* Creates a repay with collateral transaction with auto-injected client data.
|
|
@@ -20346,7 +20363,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20346
20363
|
*/
|
|
20347
20364
|
makeRepayWithCollatTx(params: Omit<MakeRepayWithCollatTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20348
20365
|
transactions: ExtendedV0Transaction[];
|
|
20349
|
-
swapQuote:
|
|
20366
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
20350
20367
|
amountToRepay: number;
|
|
20351
20368
|
}>;
|
|
20352
20369
|
/**
|
|
@@ -20362,7 +20379,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20362
20379
|
makeSwapCollateralTx(params: Omit<MakeSwapCollateralTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20363
20380
|
transactions: ExtendedV0Transaction[];
|
|
20364
20381
|
actionTxIndex: number;
|
|
20365
|
-
quoteResponse:
|
|
20382
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20366
20383
|
}>;
|
|
20367
20384
|
/**
|
|
20368
20385
|
* Creates a swap debt transaction with auto-injected client data.
|
|
@@ -20377,7 +20394,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20377
20394
|
makeSwapDebtTx(params: Omit<MakeSwapDebtTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20378
20395
|
transactions: ExtendedV0Transaction[];
|
|
20379
20396
|
actionTxIndex: number;
|
|
20380
|
-
quoteResponse:
|
|
20397
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20381
20398
|
}>;
|
|
20382
20399
|
/**
|
|
20383
20400
|
* Creates a deposit transaction with auto-injected client data.
|
|
@@ -20572,35 +20589,6 @@ declare class MarginfiAccountWrapper {
|
|
|
20572
20589
|
* @param excludedBanks - Array of excluded bank public keys (default: [])
|
|
20573
20590
|
*/
|
|
20574
20591
|
getHealthCheckAccounts(mandatoryBanks?: PublicKey[], excludedBanks?: PublicKey[]): BankType[];
|
|
20575
|
-
/**
|
|
20576
|
-
* Creates a transaction to mint LST from a native stake account.
|
|
20577
|
-
*
|
|
20578
|
-
* Converts a native stake account (or a portion of it) into LST tokens
|
|
20579
|
-
* by depositing the stake into the single-validator pool.
|
|
20580
|
-
*
|
|
20581
|
-
* @param amount - SOL amount to convert (in UI units)
|
|
20582
|
-
* @param stakeAccountPk - The stake account to convert
|
|
20583
|
-
* @param validator - The validator vote account
|
|
20584
|
-
*/
|
|
20585
|
-
makeMintStakedLstTx(amount: Amount, stakeAccountPk: PublicKey, validator: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20586
|
-
/**
|
|
20587
|
-
* Creates a transaction to redeem LST tokens back to a native stake account.
|
|
20588
|
-
*
|
|
20589
|
-
* Burns LST tokens and withdraws the underlying stake into a new stake account.
|
|
20590
|
-
*
|
|
20591
|
-
* @param amount - LST amount to redeem (in UI units)
|
|
20592
|
-
* @param validator - The validator vote account
|
|
20593
|
-
*/
|
|
20594
|
-
makeRedeemStakedLstTx(amount: Amount, validator: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20595
|
-
/**
|
|
20596
|
-
* Creates a transaction to merge two stake accounts.
|
|
20597
|
-
*
|
|
20598
|
-
* Both accounts must share the same authorized staker/withdrawer and vote account.
|
|
20599
|
-
*
|
|
20600
|
-
* @param sourceStakeAccount - The stake account to merge from (will be consumed)
|
|
20601
|
-
* @param destinationStakeAccount - The stake account to merge into
|
|
20602
|
-
*/
|
|
20603
|
-
makeMergeStakeAccountsTx(sourceStakeAccount: PublicKey, destinationStakeAccount: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20604
20592
|
/**
|
|
20605
20593
|
* Gets the underlying MarginfiAccount instance.
|
|
20606
20594
|
* Useful for advanced operations that need direct access.
|
|
@@ -20612,4 +20600,4 @@ declare class MarginfiAccountWrapper {
|
|
|
20612
20600
|
getClient(): Project0Client;
|
|
20613
20601
|
}
|
|
20614
20602
|
|
|
20615
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, type ActionEmodeImpact, type ActiveEmodePair, type ActiveStakePoolMap, type Amount, type AmountType, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigCompactRaw, type BankConfigDto, BankConfigFlag, type BankConfigOpt, type BankConfigOptRaw, type BankConfigRaw, type BankConfigRawDto, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataDto, type BankIntegrationMetadataMap, type BankIntegrationMetadataMapDto, type BankMap, type BankMetadata, type BankMetadataRaw, type BankRaw, type BankRawDto, type BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputeUsdValueParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRaw, type EmodeConfigRawDto, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsRaw, type EmodeSettingsRawDto, type EmodeSettingsType, EmodeTag, type Environment, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, type InterestRateConfig, type InterestRateConfigCompactRaw, type InterestRateConfigDto, type InterestRateConfigOpt, type InterestRateConfigOptRaw, type InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, type KaminoStates, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, type MarginfiIdlType, type MarginfiProgram, type MintData, type MintDataMap, OperationalState, type OperationalStateRaw, type OracleConfigOpt, type OracleConfigOptRaw, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, type Program, Project0Client, type Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePoint, type RatePointDto, type RatePointRaw, RiskTier, type RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type Wallet, type WithdrawWindowCache, type WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawEmissionsIx, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
20603
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, type ActionEmodeImpact, type ActiveEmodePair, type ActiveStakePoolMap, type Amount, type AmountType, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigCompactRaw, type BankConfigDto, BankConfigFlag, type BankConfigOpt, type BankConfigOptRaw, type BankConfigRaw, type BankConfigRawDto, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataDto, type BankIntegrationMetadataMap, type BankIntegrationMetadataMapDto, type BankMap, type BankMetadata, type BankMetadataRaw, type BankRaw, type BankRawDto, type BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputeUsdValueParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRaw, type EmodeConfigRawDto, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsRaw, type EmodeSettingsRawDto, type EmodeSettingsType, EmodeTag, type Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, type InterestRateConfig, type InterestRateConfigCompactRaw, type InterestRateConfigDto, type InterestRateConfigOpt, type InterestRateConfigOptRaw, type InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, type KaminoStates, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MAX_WRITABLE_ACCOUNTS, MPL_METADATA_PROGRAM_ID, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, type MarginfiIdlType, type MarginfiProgram, type MintData, type MintDataMap, OperationalState, type OperationalStateRaw, type OracleConfigOpt, type OracleConfigOptRaw, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, type Program, Project0Client, type Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePoint, type RatePointDto, type RatePointRaw, RiskTier, type RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type SwapApiConfig, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type Wallet, type WithdrawWindowCache, type WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|