@0dotxyz/p0-ts-sdk 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -64,7 +64,7 @@ type Marginfi = {
64
64
  {
65
65
  name: "configureBankRateLimits";
66
66
  docs: [
67
- "(admin only) Configure bank-level rate limits for withdraw/borrow.",
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: ["(group admin only) Set the daily withdrawal limit for deleverages per group."];
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 only) Configure group-level rate limits for withdraw/borrow.",
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: "reserveLiquidityMint";
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: "lendingAccountCloseBalance";
2534
+ name: "lendingAccountClearEmissions";
2541
2535
  docs: [
2542
- "(account authority) Close a balance position with dust-level amounts. Claims outstanding",
2543
- "emissions before closing."
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
  {
@@ -2975,253 +2963,6 @@ type Marginfi = {
2975
2963
  }
2976
2964
  ];
2977
2965
  },
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`"];
3217
- writable: true;
3218
- },
3219
- {
3220
- name: "tokenProgram";
3221
- }
3222
- ];
3223
- args: [];
3224
- },
3225
2966
  {
3226
2967
  name: "lendingPoolAccrueBankInterest";
3227
2968
  docs: [
@@ -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: "lendingPoolSetFixedOraclePrice";
5638
- docs: ["(admin only)"];
5639
- discriminator: [28, 126, 127, 127, 60, 37, 211, 125];
5640
- accounts: [
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;
@@ -5699,132 +5406,33 @@ type Marginfi = {
5699
5406
  115,
5700
5407
  105,
5701
5408
  111,
5702
- 110,
5703
- 115,
5704
- 95,
5705
- 97,
5706
- 117,
5707
- 116,
5708
- 104,
5709
- 95,
5710
- 115,
5711
- 101,
5712
- 101,
5713
- 100
5714
- ];
5715
- },
5716
- {
5717
- kind: "account";
5718
- path: "bank";
5719
- },
5720
- {
5721
- kind: "account";
5722
- path: "emissionsMint";
5723
- }
5724
- ];
5725
- };
5726
- },
5727
- {
5728
- name: "emissionsTokenAccount";
5729
- writable: true;
5730
- pda: {
5731
- seeds: [
5732
- {
5733
- kind: "const";
5734
- value: [
5735
- 101,
5736
- 109,
5737
- 105,
5738
- 115,
5739
- 115,
5740
- 105,
5741
- 111,
5742
- 110,
5743
- 115,
5744
- 95,
5745
- 116,
5746
- 111,
5747
- 107,
5748
- 101,
5749
- 110,
5750
- 95,
5751
- 97,
5752
- 99,
5753
- 99,
5754
- 111,
5755
- 117,
5756
- 110,
5757
- 116,
5758
- 95,
5759
- 115,
5760
- 101,
5761
- 101,
5762
- 100
5763
- ];
5764
- },
5765
- {
5766
- kind: "account";
5767
- path: "bank";
5768
- },
5769
- {
5770
- kind: "account";
5771
- path: "emissionsMint";
5772
- }
5773
- ];
5774
- };
5775
- },
5776
- {
5777
- name: "emissionsFundingAccount";
5778
- docs: ["NOTE: This is a TokenAccount, spl transfer will validate it.", ""];
5779
- writable: true;
5780
- },
5781
- {
5782
- name: "tokenProgram";
5783
- },
5784
- {
5785
- name: "systemProgram";
5786
- address: "11111111111111111111111111111111";
5787
- }
5788
- ];
5789
- args: [
5790
- {
5791
- name: "flags";
5792
- type: "u64";
5793
- },
5794
- {
5795
- name: "rate";
5796
- type: "u64";
5797
- },
5798
- {
5799
- name: "totalEmissions";
5800
- type: "u64";
5801
- }
5802
- ];
5803
- },
5804
- {
5805
- name: "lendingPoolUpdateEmissionsParameters";
5806
- docs: ["(delegate_emissions_admin only)"];
5807
- discriminator: [55, 213, 224, 168, 153, 53, 197, 40];
5808
- accounts: [
5809
- {
5810
- name: "group";
5811
- relations: ["bank"];
5812
- },
5813
- {
5814
- name: "delegateEmissionsAdmin";
5815
- writable: true;
5816
- signer: true;
5817
- relations: ["group"];
5818
- },
5819
- {
5820
- name: "bank";
5821
- writable: true;
5822
- },
5823
- {
5824
- name: "emissionsMint";
5409
+ 110,
5410
+ 115,
5411
+ 95,
5412
+ 97,
5413
+ 117,
5414
+ 116,
5415
+ 104,
5416
+ 95,
5417
+ 115,
5418
+ 101,
5419
+ 101,
5420
+ 100
5421
+ ];
5422
+ },
5423
+ {
5424
+ kind: "account";
5425
+ path: "bank";
5426
+ },
5427
+ {
5428
+ kind: "account";
5429
+ path: "emissionsMint";
5430
+ }
5431
+ ];
5432
+ };
5825
5433
  },
5826
5434
  {
5827
- name: "emissionsTokenAccount";
5435
+ name: "emissionsVault";
5828
5436
  writable: true;
5829
5437
  pda: {
5830
5438
  seeds: [
@@ -5873,30 +5481,53 @@ type Marginfi = {
5873
5481
  };
5874
5482
  },
5875
5483
  {
5876
- name: "emissionsFundingAccount";
5484
+ name: "feeState";
5485
+ pda: {
5486
+ seeds: [
5487
+ {
5488
+ kind: "const";
5489
+ value: [102, 101, 101, 115, 116, 97, 116, 101];
5490
+ }
5491
+ ];
5492
+ };
5493
+ },
5494
+ {
5495
+ name: "destinationAccount";
5496
+ docs: ["emissions mint (validated in handler)."];
5877
5497
  writable: true;
5878
5498
  },
5879
5499
  {
5880
5500
  name: "tokenProgram";
5881
5501
  }
5882
5502
  ];
5883
- args: [
5503
+ args: [];
5504
+ },
5505
+ {
5506
+ name: "lendingPoolSetFixedOraclePrice";
5507
+ docs: ["(admin only)"];
5508
+ discriminator: [28, 126, 127, 127, 60, 37, 211, 125];
5509
+ accounts: [
5884
5510
  {
5885
- name: "emissionsFlags";
5886
- type: {
5887
- option: "u64";
5888
- };
5511
+ name: "group";
5512
+ relations: ["bank"];
5889
5513
  },
5890
5514
  {
5891
- name: "emissionsRate";
5892
- type: {
5893
- option: "u64";
5894
- };
5515
+ name: "admin";
5516
+ signer: true;
5517
+ relations: ["group"];
5895
5518
  },
5896
5519
  {
5897
- name: "additionalEmissions";
5520
+ name: "bank";
5521
+ writable: true;
5522
+ }
5523
+ ];
5524
+ args: [
5525
+ {
5526
+ name: "price";
5898
5527
  type: {
5899
- option: "u64";
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 as the associated positions, or the user has executed",
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 permissionless emissions",
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: ["User's earned emissions will be sent to the canonical ATA of this wallet.", ""];
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", 8];
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 with",
9344
- "repay_all or withdraw_all, since those Balances can be omitted from the risk check at End."
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: "bytemuckunsafe";
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 , e.g. allow SOL to count as 90% collateral when borrowing an LST instead of",
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
- 6
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: [
@@ -17728,7 +17614,7 @@ declare function makeFlashLoanTx({ program, marginfiAccount, ixs, bankMap, block
17728
17614
  /**
17729
17615
  * @deprecated Rewards are now distributed offchain. If you wish to get access to emission data, please reach out.
17730
17616
  */
17731
- declare function makeWithdrawEmissionsIx(program: MarginfiProgram, marginfiAccount: MarginfiAccountType, banks: Map<string, BankType>, mintDatas: Map<string, MintData>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
17617
+ declare function makeClearEmissionsIx(program: MarginfiProgram, marginfiAccount: MarginfiAccountType, banks: Map<string, BankType>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
17732
17618
 
17733
17619
  /**
17734
17620
  * Creates transactions to swap one collateral position to another using a flash loan.
@@ -19692,14 +19578,13 @@ declare class MarginfiAccount implements MarginfiAccountType {
19692
19578
  *
19693
19579
  * @param program - The Marginfi program instance
19694
19580
  * @param banks - Map of all available banks
19695
- * @param mintDatas - Map of mint data for token programs
19696
- * @param bankAddress - The bank to withdraw emissions from
19581
+ * @param bankAddress - The bank to clear emissions for
19697
19582
  *
19698
- * @returns Promise resolving to InstructionsWrapper containing the withdraw emissions instructions
19583
+ * @returns Promise resolving to InstructionsWrapper containing the clear emissions instructions
19699
19584
  *
19700
- * @see {@link makeWithdrawEmissionsIx} for implementation
19585
+ * @see {@link makeClearEmissionsIx} for implementation
19701
19586
  */
19702
- makeWithdrawEmissionsIx(program: MarginfiProgram, banks: Map<string, Bank>, mintDatas: Map<string, MintData>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
19587
+ makeClearEmissionsIx(program: MarginfiProgram, banks: Map<string, Bank>, bankAddress: PublicKey): Promise<InstructionsWrapper>;
19703
19588
  /**
19704
19589
  * Creates an instruction to begin a flash loan.
19705
19590
  *
@@ -20202,11 +20087,11 @@ declare class MarginfiAccountWrapper {
20202
20087
  */
20203
20088
  makeBorrowIx(bankAddress: PublicKey, amount: Amount, opts?: MakeBorrowIxOpts): Promise<InstructionsWrapper>;
20204
20089
  /**
20205
- * Creates a withdraw emissions instruction with auto-injected client data.
20090
+ * Creates a clear emissions instruction with auto-injected client data.
20206
20091
  *
20207
- * @param bankAddress - Bank address to withdraw emissions from
20092
+ * @param bankAddress - Bank address to clear emissions for
20208
20093
  */
20209
- makeWithdrawEmissionsIx(bankAddress: PublicKey): Promise<InstructionsWrapper>;
20094
+ makeClearEmissionsIx(bankAddress: PublicKey): Promise<InstructionsWrapper>;
20210
20095
  /**
20211
20096
  * Creates a begin flash loan instruction.
20212
20097
  *
@@ -20500,4 +20385,4 @@ declare class MarginfiAccountWrapper {
20500
20385
  getClient(): Project0Client;
20501
20386
  }
20502
20387
 
20503
- 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 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 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, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, 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, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, 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 };
20388
+ 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 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 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, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, 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, 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 };