@carrot-protocol/clend-rpc 0.1.40 → 0.1.41-clend-vault1-dev-5f0e0d9

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/idl/clend.js CHANGED
@@ -1,3931 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IDL = void 0;
4
- exports.IDL = {
5
- "version": "0.1.1",
6
- "name": "clend",
7
- "instructions": [
8
- {
9
- "name": "clendGroupInitialize",
10
- "accounts": [
11
- {
12
- "name": "clendGroup",
13
- "isMut": true,
14
- "isSigner": true
15
- },
16
- {
17
- "name": "admin",
18
- "isMut": true,
19
- "isSigner": true
20
- },
21
- {
22
- "name": "feeState",
23
- "isMut": false,
24
- "isSigner": false
25
- },
26
- {
27
- "name": "systemProgram",
28
- "isMut": false,
29
- "isSigner": false
30
- }
31
- ],
32
- "args": []
33
- },
34
- {
35
- "name": "clendGroupConfigure",
36
- "accounts": [
37
- {
38
- "name": "clendGroup",
39
- "isMut": true,
40
- "isSigner": false
41
- },
42
- {
43
- "name": "admin",
44
- "isMut": false,
45
- "isSigner": true
46
- }
47
- ],
48
- "args": [
49
- {
50
- "name": "config",
51
- "type": {
52
- "defined": "GroupConfig"
53
- }
54
- }
55
- ]
56
- },
57
- {
58
- "name": "lendingPoolAddBankWithSeed",
59
- "docs": [
60
- "A copy of lending_pool_add_bank with an additional bank seed.",
61
- "This seed is used to create a PDA for the bank's signature.",
62
- "lending_pool_add_bank is preserved for backwards compatibility."
63
- ],
64
- "accounts": [
65
- {
66
- "name": "clendGroup",
67
- "isMut": false,
68
- "isSigner": false
69
- },
70
- {
71
- "name": "admin",
72
- "isMut": true,
73
- "isSigner": true
74
- },
75
- {
76
- "name": "feeState",
77
- "isMut": false,
78
- "isSigner": false
79
- },
80
- {
81
- "name": "globalFeeWallet",
82
- "isMut": true,
83
- "isSigner": false
84
- },
85
- {
86
- "name": "bankMint",
87
- "isMut": false,
88
- "isSigner": false
89
- },
90
- {
91
- "name": "bank",
92
- "isMut": true,
93
- "isSigner": false
94
- },
95
- {
96
- "name": "liquidityVaultAuthority",
97
- "isMut": false,
98
- "isSigner": false
99
- },
100
- {
101
- "name": "liquidityVault",
102
- "isMut": true,
103
- "isSigner": false
104
- },
105
- {
106
- "name": "insuranceVaultAuthority",
107
- "isMut": false,
108
- "isSigner": false
109
- },
110
- {
111
- "name": "insuranceVault",
112
- "isMut": true,
113
- "isSigner": false
114
- },
115
- {
116
- "name": "feeVaultAuthority",
117
- "isMut": false,
118
- "isSigner": false
119
- },
120
- {
121
- "name": "feeVault",
122
- "isMut": true,
123
- "isSigner": false
124
- },
125
- {
126
- "name": "tokenProgram",
127
- "isMut": false,
128
- "isSigner": false
129
- },
130
- {
131
- "name": "systemProgram",
132
- "isMut": false,
133
- "isSigner": false
134
- }
135
- ],
136
- "args": [
137
- {
138
- "name": "bankConfig",
139
- "type": {
140
- "defined": "BankConfigCompact"
141
- }
142
- },
143
- {
144
- "name": "irConfig",
145
- "type": {
146
- "defined": "InterestRateConfigCompact"
147
- }
148
- }
149
- ]
150
- },
151
- {
152
- "name": "lendingPoolConfigureBank",
153
- "accounts": [
154
- {
155
- "name": "clendGroup",
156
- "isMut": false,
157
- "isSigner": false
158
- },
159
- {
160
- "name": "admin",
161
- "isMut": false,
162
- "isSigner": true
163
- },
164
- {
165
- "name": "bank",
166
- "isMut": true,
167
- "isSigner": false
168
- }
169
- ],
170
- "args": [
171
- {
172
- "name": "bankConfigOpt",
173
- "type": {
174
- "defined": "BankConfigOpt"
175
- }
176
- }
177
- ]
178
- },
179
- {
180
- "name": "lendingPoolConfigureBankIr",
181
- "accounts": [
182
- {
183
- "name": "clendGroup",
184
- "isMut": false,
185
- "isSigner": false
186
- },
187
- {
188
- "name": "admin",
189
- "isMut": false,
190
- "isSigner": true
191
- },
192
- {
193
- "name": "bank",
194
- "isMut": true,
195
- "isSigner": false
196
- }
197
- ],
198
- "args": [
199
- {
200
- "name": "irConfig",
201
- "type": {
202
- "defined": "InterestRateConfigOpt"
203
- }
204
- }
205
- ]
206
- },
207
- {
208
- "name": "lendingPoolConfigureBankOracle",
209
- "accounts": [
210
- {
211
- "name": "group",
212
- "isMut": false,
213
- "isSigner": false
214
- },
215
- {
216
- "name": "admin",
217
- "isMut": false,
218
- "isSigner": true
219
- },
220
- {
221
- "name": "bank",
222
- "isMut": true,
223
- "isSigner": false
224
- }
225
- ],
226
- "args": [
227
- {
228
- "name": "setup",
229
- "type": "u8"
230
- },
231
- {
232
- "name": "oracle",
233
- "type": "publicKey"
234
- }
235
- ]
236
- },
237
- {
238
- "name": "lendingPoolSetupEmissions",
239
- "accounts": [
240
- {
241
- "name": "clendGroup",
242
- "isMut": false,
243
- "isSigner": false
244
- },
245
- {
246
- "name": "admin",
247
- "isMut": true,
248
- "isSigner": true
249
- },
250
- {
251
- "name": "bank",
252
- "isMut": true,
253
- "isSigner": false
254
- },
255
- {
256
- "name": "emissionsMint",
257
- "isMut": false,
258
- "isSigner": false
259
- },
260
- {
261
- "name": "emissionsAuth",
262
- "isMut": false,
263
- "isSigner": false
264
- },
265
- {
266
- "name": "emissionsTokenAccount",
267
- "isMut": true,
268
- "isSigner": false
269
- },
270
- {
271
- "name": "emissionsFundingAccount",
272
- "isMut": true,
273
- "isSigner": false,
274
- "docs": [
275
- "NOTE: This is a TokenAccount, spl transfer will validate it.",
276
- ""
277
- ]
278
- },
279
- {
280
- "name": "tokenProgram",
281
- "isMut": false,
282
- "isSigner": false
283
- },
284
- {
285
- "name": "systemProgram",
286
- "isMut": false,
287
- "isSigner": false
288
- }
289
- ],
290
- "args": [
291
- {
292
- "name": "flags",
293
- "type": "u64"
294
- },
295
- {
296
- "name": "rate",
297
- "type": "u64"
298
- },
299
- {
300
- "name": "totalEmissions",
301
- "type": "u64"
302
- }
303
- ]
304
- },
305
- {
306
- "name": "lendingPoolUpdateEmissionsParameters",
307
- "accounts": [
308
- {
309
- "name": "clendGroup",
310
- "isMut": false,
311
- "isSigner": false
312
- },
313
- {
314
- "name": "admin",
315
- "isMut": true,
316
- "isSigner": true
317
- },
318
- {
319
- "name": "bank",
320
- "isMut": true,
321
- "isSigner": false
322
- },
323
- {
324
- "name": "emissionsMint",
325
- "isMut": false,
326
- "isSigner": false
327
- },
328
- {
329
- "name": "emissionsTokenAccount",
330
- "isMut": true,
331
- "isSigner": false
332
- },
333
- {
334
- "name": "emissionsFundingAccount",
335
- "isMut": true,
336
- "isSigner": false
337
- },
338
- {
339
- "name": "tokenProgram",
340
- "isMut": false,
341
- "isSigner": false
342
- }
343
- ],
344
- "args": [
345
- {
346
- "name": "emissionsFlags",
347
- "type": {
348
- "option": "u64"
349
- }
350
- },
351
- {
352
- "name": "emissionsRate",
353
- "type": {
354
- "option": "u64"
355
- }
356
- },
357
- {
358
- "name": "additionalEmissions",
359
- "type": {
360
- "option": "u64"
361
- }
362
- }
363
- ]
364
- },
365
- {
366
- "name": "lendingPoolHandleBankruptcy",
367
- "docs": [
368
- "Handle bad debt of a bankrupt clend account for a given bank."
369
- ],
370
- "accounts": [
371
- {
372
- "name": "clendGroup",
373
- "isMut": false,
374
- "isSigner": false
375
- },
376
- {
377
- "name": "signer",
378
- "isMut": false,
379
- "isSigner": true
380
- },
381
- {
382
- "name": "bank",
383
- "isMut": true,
384
- "isSigner": false
385
- },
386
- {
387
- "name": "clendAccount",
388
- "isMut": true,
389
- "isSigner": false
390
- },
391
- {
392
- "name": "liquidityVault",
393
- "isMut": true,
394
- "isSigner": false
395
- },
396
- {
397
- "name": "insuranceVault",
398
- "isMut": true,
399
- "isSigner": false
400
- },
401
- {
402
- "name": "insuranceVaultAuthority",
403
- "isMut": false,
404
- "isSigner": false
405
- },
406
- {
407
- "name": "tokenProgram",
408
- "isMut": false,
409
- "isSigner": false
410
- }
411
- ],
412
- "args": []
413
- },
414
- {
415
- "name": "clendAccountInitialize",
416
- "docs": [
417
- "Initialize a clend account for a given group"
418
- ],
419
- "accounts": [
420
- {
421
- "name": "clendGroup",
422
- "isMut": false,
423
- "isSigner": false
424
- },
425
- {
426
- "name": "clendAccount",
427
- "isMut": true,
428
- "isSigner": true
429
- },
430
- {
431
- "name": "authority",
432
- "isMut": false,
433
- "isSigner": true
434
- },
435
- {
436
- "name": "feePayer",
437
- "isMut": true,
438
- "isSigner": true
439
- },
440
- {
441
- "name": "systemProgram",
442
- "isMut": false,
443
- "isSigner": false
444
- }
445
- ],
446
- "args": []
447
- },
448
- {
449
- "name": "lendingAccountDeposit",
450
- "accounts": [
451
- {
452
- "name": "clendGroup",
453
- "isMut": false,
454
- "isSigner": false
455
- },
456
- {
457
- "name": "clendAccount",
458
- "isMut": true,
459
- "isSigner": false
460
- },
461
- {
462
- "name": "signer",
463
- "isMut": false,
464
- "isSigner": true
465
- },
466
- {
467
- "name": "bank",
468
- "isMut": true,
469
- "isSigner": false
470
- },
471
- {
472
- "name": "signerTokenAccount",
473
- "isMut": true,
474
- "isSigner": false
475
- },
476
- {
477
- "name": "bankLiquidityVault",
478
- "isMut": true,
479
- "isSigner": false
480
- },
481
- {
482
- "name": "tokenProgram",
483
- "isMut": false,
484
- "isSigner": false
485
- }
486
- ],
487
- "args": [
488
- {
489
- "name": "amount",
490
- "type": "u64"
491
- },
492
- {
493
- "name": "depositUpToAmount",
494
- "type": "bool"
495
- }
496
- ]
497
- },
498
- {
499
- "name": "lendingAccountRepay",
500
- "accounts": [
501
- {
502
- "name": "clendGroup",
503
- "isMut": false,
504
- "isSigner": false
505
- },
506
- {
507
- "name": "clendAccount",
508
- "isMut": true,
509
- "isSigner": false
510
- },
511
- {
512
- "name": "signer",
513
- "isMut": false,
514
- "isSigner": true
515
- },
516
- {
517
- "name": "bank",
518
- "isMut": true,
519
- "isSigner": false
520
- },
521
- {
522
- "name": "signerTokenAccount",
523
- "isMut": true,
524
- "isSigner": false
525
- },
526
- {
527
- "name": "bankLiquidityVault",
528
- "isMut": true,
529
- "isSigner": false
530
- },
531
- {
532
- "name": "tokenProgram",
533
- "isMut": false,
534
- "isSigner": false
535
- }
536
- ],
537
- "args": [
538
- {
539
- "name": "amount",
540
- "type": "u64"
541
- },
542
- {
543
- "name": "repayAll",
544
- "type": {
545
- "option": "bool"
546
- }
547
- },
548
- {
549
- "name": "repayUpToAmount",
550
- "type": "bool"
551
- }
552
- ]
553
- },
554
- {
555
- "name": "lendingAccountWithdraw",
556
- "accounts": [
557
- {
558
- "name": "clendGroup",
559
- "isMut": false,
560
- "isSigner": false
561
- },
562
- {
563
- "name": "clendAccount",
564
- "isMut": true,
565
- "isSigner": false
566
- },
567
- {
568
- "name": "signer",
569
- "isMut": false,
570
- "isSigner": true
571
- },
572
- {
573
- "name": "bank",
574
- "isMut": true,
575
- "isSigner": false
576
- },
577
- {
578
- "name": "destinationTokenAccount",
579
- "isMut": true,
580
- "isSigner": false
581
- },
582
- {
583
- "name": "bankLiquidityVaultAuthority",
584
- "isMut": true,
585
- "isSigner": false
586
- },
587
- {
588
- "name": "bankLiquidityVault",
589
- "isMut": true,
590
- "isSigner": false
591
- },
592
- {
593
- "name": "tokenProgram",
594
- "isMut": false,
595
- "isSigner": false
596
- }
597
- ],
598
- "args": [
599
- {
600
- "name": "amount",
601
- "type": "u64"
602
- },
603
- {
604
- "name": "withdrawAll",
605
- "type": {
606
- "option": "bool"
607
- }
608
- }
609
- ]
610
- },
611
- {
612
- "name": "lendingAccountBorrow",
613
- "accounts": [
614
- {
615
- "name": "clendGroup",
616
- "isMut": false,
617
- "isSigner": false
618
- },
619
- {
620
- "name": "clendAccount",
621
- "isMut": true,
622
- "isSigner": false
623
- },
624
- {
625
- "name": "signer",
626
- "isMut": false,
627
- "isSigner": true
628
- },
629
- {
630
- "name": "bank",
631
- "isMut": true,
632
- "isSigner": false
633
- },
634
- {
635
- "name": "destinationTokenAccount",
636
- "isMut": true,
637
- "isSigner": false
638
- },
639
- {
640
- "name": "bankLiquidityVaultAuthority",
641
- "isMut": true,
642
- "isSigner": false
643
- },
644
- {
645
- "name": "bankLiquidityVault",
646
- "isMut": true,
647
- "isSigner": false
648
- },
649
- {
650
- "name": "tokenProgram",
651
- "isMut": false,
652
- "isSigner": false
653
- }
654
- ],
655
- "args": [
656
- {
657
- "name": "amount",
658
- "type": "u64"
659
- }
660
- ]
661
- },
662
- {
663
- "name": "lendingAccountCloseBalance",
664
- "accounts": [
665
- {
666
- "name": "clendGroup",
667
- "isMut": false,
668
- "isSigner": false
669
- },
670
- {
671
- "name": "clendAccount",
672
- "isMut": true,
673
- "isSigner": false
674
- },
675
- {
676
- "name": "signer",
677
- "isMut": false,
678
- "isSigner": true
679
- },
680
- {
681
- "name": "bank",
682
- "isMut": true,
683
- "isSigner": false
684
- }
685
- ],
686
- "args": []
687
- },
688
- {
689
- "name": "lendingAccountWithdrawEmissions",
690
- "accounts": [
691
- {
692
- "name": "clendGroup",
693
- "isMut": false,
694
- "isSigner": false
695
- },
696
- {
697
- "name": "clendAccount",
698
- "isMut": true,
699
- "isSigner": false
700
- },
701
- {
702
- "name": "signer",
703
- "isMut": false,
704
- "isSigner": true
705
- },
706
- {
707
- "name": "bank",
708
- "isMut": true,
709
- "isSigner": false
710
- },
711
- {
712
- "name": "emissionsMint",
713
- "isMut": false,
714
- "isSigner": false
715
- },
716
- {
717
- "name": "emissionsAuth",
718
- "isMut": false,
719
- "isSigner": false
720
- },
721
- {
722
- "name": "emissionsVault",
723
- "isMut": true,
724
- "isSigner": false
725
- },
726
- {
727
- "name": "destinationAccount",
728
- "isMut": true,
729
- "isSigner": false
730
- },
731
- {
732
- "name": "tokenProgram",
733
- "isMut": false,
734
- "isSigner": false
735
- }
736
- ],
737
- "args": []
738
- },
739
- {
740
- "name": "lendingAccountSettleEmissions",
741
- "accounts": [
742
- {
743
- "name": "clendAccount",
744
- "isMut": true,
745
- "isSigner": false
746
- },
747
- {
748
- "name": "bank",
749
- "isMut": true,
750
- "isSigner": false
751
- }
752
- ],
753
- "args": []
754
- },
755
- {
756
- "name": "lendingAccountLiquidate",
757
- "docs": [
758
- "Liquidate a lending account balance of an unhealthy clend account"
759
- ],
760
- "accounts": [
761
- {
762
- "name": "group",
763
- "isMut": false,
764
- "isSigner": false
765
- },
766
- {
767
- "name": "assetBank",
768
- "isMut": true,
769
- "isSigner": false
770
- },
771
- {
772
- "name": "liabBank",
773
- "isMut": true,
774
- "isSigner": false
775
- },
776
- {
777
- "name": "liquidatorClendAccount",
778
- "isMut": true,
779
- "isSigner": false
780
- },
781
- {
782
- "name": "signer",
783
- "isMut": false,
784
- "isSigner": true
785
- },
786
- {
787
- "name": "liquidateeClendAccount",
788
- "isMut": true,
789
- "isSigner": false
790
- },
791
- {
792
- "name": "bankLiquidityVaultAuthority",
793
- "isMut": true,
794
- "isSigner": false
795
- },
796
- {
797
- "name": "bankLiquidityVault",
798
- "isMut": true,
799
- "isSigner": false
800
- },
801
- {
802
- "name": "bankInsuranceVault",
803
- "isMut": true,
804
- "isSigner": false
805
- },
806
- {
807
- "name": "tokenProgram",
808
- "isMut": false,
809
- "isSigner": false
810
- }
811
- ],
812
- "args": [
813
- {
814
- "name": "assetAmount",
815
- "type": "u64"
816
- }
817
- ]
818
- },
819
- {
820
- "name": "lendingAccountStartFlashloan",
821
- "accounts": [
822
- {
823
- "name": "clendAccount",
824
- "isMut": true,
825
- "isSigner": false
826
- },
827
- {
828
- "name": "signer",
829
- "isMut": false,
830
- "isSigner": true
831
- },
832
- {
833
- "name": "ixsSysvar",
834
- "isMut": false,
835
- "isSigner": false
836
- }
837
- ],
838
- "args": [
839
- {
840
- "name": "endIndex",
841
- "type": "u64"
842
- }
843
- ]
844
- },
845
- {
846
- "name": "lendingAccountEndFlashloan",
847
- "accounts": [
848
- {
849
- "name": "clendAccount",
850
- "isMut": true,
851
- "isSigner": false
852
- },
853
- {
854
- "name": "signer",
855
- "isMut": false,
856
- "isSigner": true
857
- }
858
- ],
859
- "args": []
860
- },
861
- {
862
- "name": "lendingPoolAccrueBankInterest",
863
- "accounts": [
864
- {
865
- "name": "clendGroup",
866
- "isMut": false,
867
- "isSigner": false
868
- },
869
- {
870
- "name": "bank",
871
- "isMut": true,
872
- "isSigner": false
873
- }
874
- ],
875
- "args": []
876
- },
877
- {
878
- "name": "lendingPoolCollectBankFees",
879
- "accounts": [
880
- {
881
- "name": "clendGroup",
882
- "isMut": false,
883
- "isSigner": false
884
- },
885
- {
886
- "name": "bank",
887
- "isMut": true,
888
- "isSigner": false
889
- },
890
- {
891
- "name": "liquidityVaultAuthority",
892
- "isMut": false,
893
- "isSigner": false
894
- },
895
- {
896
- "name": "liquidityVault",
897
- "isMut": true,
898
- "isSigner": false
899
- },
900
- {
901
- "name": "insuranceVault",
902
- "isMut": true,
903
- "isSigner": false
904
- },
905
- {
906
- "name": "feeVault",
907
- "isMut": true,
908
- "isSigner": false
909
- },
910
- {
911
- "name": "feeState",
912
- "isMut": false,
913
- "isSigner": false
914
- },
915
- {
916
- "name": "feeAta",
917
- "isMut": true,
918
- "isSigner": false,
919
- "docs": [
920
- "(validated in handler). Must already exist, may require initializing the ATA if it does not",
921
- "already exist prior to this ix."
922
- ]
923
- },
924
- {
925
- "name": "tokenProgram",
926
- "isMut": false,
927
- "isSigner": false
928
- }
929
- ],
930
- "args": []
931
- },
932
- {
933
- "name": "lendingPoolWithdrawFees",
934
- "accounts": [
935
- {
936
- "name": "clendGroup",
937
- "isMut": false,
938
- "isSigner": false
939
- },
940
- {
941
- "name": "bank",
942
- "isMut": false,
943
- "isSigner": false
944
- },
945
- {
946
- "name": "admin",
947
- "isMut": false,
948
- "isSigner": true
949
- },
950
- {
951
- "name": "feeVault",
952
- "isMut": true,
953
- "isSigner": false
954
- },
955
- {
956
- "name": "feeVaultAuthority",
957
- "isMut": false,
958
- "isSigner": false
959
- },
960
- {
961
- "name": "dstTokenAccount",
962
- "isMut": true,
963
- "isSigner": false
964
- },
965
- {
966
- "name": "tokenProgram",
967
- "isMut": false,
968
- "isSigner": false
969
- }
970
- ],
971
- "args": [
972
- {
973
- "name": "amount",
974
- "type": "u64"
975
- }
976
- ]
977
- },
978
- {
979
- "name": "lendingPoolWithdrawInsurance",
980
- "accounts": [
981
- {
982
- "name": "clendGroup",
983
- "isMut": false,
984
- "isSigner": false
985
- },
986
- {
987
- "name": "bank",
988
- "isMut": false,
989
- "isSigner": false
990
- },
991
- {
992
- "name": "admin",
993
- "isMut": false,
994
- "isSigner": true
995
- },
996
- {
997
- "name": "insuranceVault",
998
- "isMut": true,
999
- "isSigner": false
1000
- },
1001
- {
1002
- "name": "insuranceVaultAuthority",
1003
- "isMut": false,
1004
- "isSigner": false
1005
- },
1006
- {
1007
- "name": "dstTokenAccount",
1008
- "isMut": true,
1009
- "isSigner": false
1010
- },
1011
- {
1012
- "name": "tokenProgram",
1013
- "isMut": false,
1014
- "isSigner": false
1015
- }
1016
- ],
1017
- "args": [
1018
- {
1019
- "name": "amount",
1020
- "type": "u64"
1021
- }
1022
- ]
1023
- },
1024
- {
1025
- "name": "lendingPoolResetBankFees",
1026
- "accounts": [
1027
- {
1028
- "name": "clendGroup",
1029
- "isMut": false,
1030
- "isSigner": false
1031
- },
1032
- {
1033
- "name": "bank",
1034
- "isMut": true,
1035
- "isSigner": false
1036
- },
1037
- {
1038
- "name": "admin",
1039
- "isMut": false,
1040
- "isSigner": true
1041
- }
1042
- ],
1043
- "args": []
1044
- },
1045
- {
1046
- "name": "setAccountFlag",
1047
- "accounts": [
1048
- {
1049
- "name": "clendGroup",
1050
- "isMut": false,
1051
- "isSigner": false
1052
- },
1053
- {
1054
- "name": "clendAccount",
1055
- "isMut": true,
1056
- "isSigner": false
1057
- },
1058
- {
1059
- "name": "admin",
1060
- "isMut": false,
1061
- "isSigner": true,
1062
- "docs": [
1063
- "Admin only"
1064
- ]
1065
- }
1066
- ],
1067
- "args": [
1068
- {
1069
- "name": "flag",
1070
- "type": "u64"
1071
- }
1072
- ]
1073
- },
1074
- {
1075
- "name": "unsetAccountFlag",
1076
- "accounts": [
1077
- {
1078
- "name": "clendGroup",
1079
- "isMut": false,
1080
- "isSigner": false
1081
- },
1082
- {
1083
- "name": "clendAccount",
1084
- "isMut": true,
1085
- "isSigner": false
1086
- },
1087
- {
1088
- "name": "admin",
1089
- "isMut": false,
1090
- "isSigner": true,
1091
- "docs": [
1092
- "Admin only"
1093
- ]
1094
- }
1095
- ],
1096
- "args": [
1097
- {
1098
- "name": "flag",
1099
- "type": "u64"
1100
- }
1101
- ]
1102
- },
1103
- {
1104
- "name": "setNewAccountAuthority",
1105
- "accounts": [
1106
- {
1107
- "name": "clendAccount",
1108
- "isMut": true,
1109
- "isSigner": false
1110
- },
1111
- {
1112
- "name": "clendGroup",
1113
- "isMut": false,
1114
- "isSigner": false
1115
- },
1116
- {
1117
- "name": "signer",
1118
- "isMut": false,
1119
- "isSigner": true
1120
- },
1121
- {
1122
- "name": "newAuthority",
1123
- "isMut": false,
1124
- "isSigner": false
1125
- },
1126
- {
1127
- "name": "feePayer",
1128
- "isMut": true,
1129
- "isSigner": true
1130
- }
1131
- ],
1132
- "args": []
1133
- },
1134
- {
1135
- "name": "clendAccountClose",
1136
- "accounts": [
1137
- {
1138
- "name": "clendAccount",
1139
- "isMut": true,
1140
- "isSigner": false
1141
- },
1142
- {
1143
- "name": "authority",
1144
- "isMut": false,
1145
- "isSigner": true
1146
- },
1147
- {
1148
- "name": "feePayer",
1149
- "isMut": true,
1150
- "isSigner": true
1151
- }
1152
- ],
1153
- "args": []
1154
- },
1155
- {
1156
- "name": "initGlobalFeeState",
1157
- "docs": [
1158
- "(Runs once per program) Configures the fee state account, where the global admin sets fees",
1159
- "that are assessed to the protocol"
1160
- ],
1161
- "accounts": [
1162
- {
1163
- "name": "payer",
1164
- "isMut": true,
1165
- "isSigner": true,
1166
- "docs": [
1167
- "Pays the init fee"
1168
- ]
1169
- },
1170
- {
1171
- "name": "feeState",
1172
- "isMut": true,
1173
- "isSigner": false
1174
- },
1175
- {
1176
- "name": "rent",
1177
- "isMut": false,
1178
- "isSigner": false
1179
- },
1180
- {
1181
- "name": "systemProgram",
1182
- "isMut": false,
1183
- "isSigner": false
1184
- }
1185
- ],
1186
- "args": [
1187
- {
1188
- "name": "admin",
1189
- "type": "publicKey"
1190
- },
1191
- {
1192
- "name": "feeWallet",
1193
- "type": "publicKey"
1194
- },
1195
- {
1196
- "name": "bankInitFlatSolFee",
1197
- "type": "u32"
1198
- },
1199
- {
1200
- "name": "programFeeFixed",
1201
- "type": {
1202
- "defined": "WrappedI80F48"
1203
- }
1204
- },
1205
- {
1206
- "name": "programFeeRate",
1207
- "type": {
1208
- "defined": "WrappedI80F48"
1209
- }
1210
- }
1211
- ]
1212
- },
1213
- {
1214
- "name": "editGlobalFeeState",
1215
- "docs": [
1216
- "(global fee admin only) Adjust fees or the destination wallet"
1217
- ],
1218
- "accounts": [
1219
- {
1220
- "name": "globalFeeAdmin",
1221
- "isMut": true,
1222
- "isSigner": true,
1223
- "docs": [
1224
- "Admin of the global FeeState"
1225
- ]
1226
- },
1227
- {
1228
- "name": "feeState",
1229
- "isMut": true,
1230
- "isSigner": false
1231
- }
1232
- ],
1233
- "args": [
1234
- {
1235
- "name": "feeWallet",
1236
- "type": "publicKey"
1237
- },
1238
- {
1239
- "name": "bankInitFlatSolFee",
1240
- "type": "u32"
1241
- },
1242
- {
1243
- "name": "programFeeFixed",
1244
- "type": {
1245
- "defined": "WrappedI80F48"
1246
- }
1247
- },
1248
- {
1249
- "name": "programFeeRate",
1250
- "type": {
1251
- "defined": "WrappedI80F48"
1252
- }
1253
- }
1254
- ]
1255
- },
1256
- {
1257
- "name": "propagateFeeState",
1258
- "docs": [
1259
- "(Permissionless) Force any group to adopt the current FeeState settings"
1260
- ],
1261
- "accounts": [
1262
- {
1263
- "name": "feeState",
1264
- "isMut": false,
1265
- "isSigner": false
1266
- },
1267
- {
1268
- "name": "clendGroup",
1269
- "isMut": true,
1270
- "isSigner": false,
1271
- "docs": [
1272
- "Any group, this ix is permisionless and can propogate the fee to any group"
1273
- ]
1274
- }
1275
- ],
1276
- "args": []
1277
- },
1278
- {
1279
- "name": "configGroupFee",
1280
- "docs": [
1281
- "(global fee admin only) Enable or disable program fees for any group. Does not require the",
1282
- "group admin to sign: the global fee state admin can turn program fees on or off for any",
1283
- "group"
1284
- ],
1285
- "accounts": [
1286
- {
1287
- "name": "clendGroup",
1288
- "isMut": true,
1289
- "isSigner": false
1290
- },
1291
- {
1292
- "name": "globalFeeAdmin",
1293
- "isMut": false,
1294
- "isSigner": true,
1295
- "docs": [
1296
- "`global_fee_admin` of the FeeState"
1297
- ]
1298
- },
1299
- {
1300
- "name": "feeState",
1301
- "isMut": false,
1302
- "isSigner": false
1303
- }
1304
- ],
1305
- "args": [
1306
- {
1307
- "name": "flag",
1308
- "type": "u64"
1309
- }
1310
- ]
1311
- },
1312
- {
1313
- "name": "initStakedSettings",
1314
- "docs": [
1315
- "(group admin only) Init the Staked Settings account, which is used to create staked",
1316
- "collateral banks, and must run before any staked collateral bank can be created with",
1317
- "`add_pool_permissionless`. Running this ix effectively opts the group into the staked",
1318
- "collateral feature."
1319
- ],
1320
- "accounts": [
1321
- {
1322
- "name": "clendGroup",
1323
- "isMut": false,
1324
- "isSigner": false
1325
- },
1326
- {
1327
- "name": "admin",
1328
- "isMut": false,
1329
- "isSigner": true
1330
- },
1331
- {
1332
- "name": "feePayer",
1333
- "isMut": true,
1334
- "isSigner": true,
1335
- "docs": [
1336
- "Pays the init fee"
1337
- ]
1338
- },
1339
- {
1340
- "name": "stakedSettings",
1341
- "isMut": true,
1342
- "isSigner": false
1343
- },
1344
- {
1345
- "name": "rent",
1346
- "isMut": false,
1347
- "isSigner": false
1348
- },
1349
- {
1350
- "name": "systemProgram",
1351
- "isMut": false,
1352
- "isSigner": false
1353
- }
1354
- ],
1355
- "args": [
1356
- {
1357
- "name": "settings",
1358
- "type": {
1359
- "defined": "StakedSettingsConfig"
1360
- }
1361
- }
1362
- ]
1363
- },
1364
- {
1365
- "name": "editStakedSettings",
1366
- "accounts": [
1367
- {
1368
- "name": "clendGroup",
1369
- "isMut": false,
1370
- "isSigner": false
1371
- },
1372
- {
1373
- "name": "admin",
1374
- "isMut": false,
1375
- "isSigner": true
1376
- },
1377
- {
1378
- "name": "stakedSettings",
1379
- "isMut": true,
1380
- "isSigner": false
1381
- }
1382
- ],
1383
- "args": [
1384
- {
1385
- "name": "settings",
1386
- "type": {
1387
- "defined": "StakedSettingsEditConfig"
1388
- }
1389
- }
1390
- ]
1391
- },
1392
- {
1393
- "name": "propagateStakedSettings",
1394
- "accounts": [
1395
- {
1396
- "name": "clendGroup",
1397
- "isMut": false,
1398
- "isSigner": false
1399
- },
1400
- {
1401
- "name": "stakedSettings",
1402
- "isMut": false,
1403
- "isSigner": false
1404
- },
1405
- {
1406
- "name": "bank",
1407
- "isMut": true,
1408
- "isSigner": false
1409
- }
1410
- ],
1411
- "args": []
1412
- }
1413
- ],
1414
- "accounts": [
1415
- {
1416
- "name": "clendAccount",
1417
- "type": {
1418
- "kind": "struct",
1419
- "fields": [
1420
- {
1421
- "name": "group",
1422
- "type": "publicKey"
1423
- },
1424
- {
1425
- "name": "authority",
1426
- "type": "publicKey"
1427
- },
1428
- {
1429
- "name": "lendingAccount",
1430
- "type": {
1431
- "defined": "LendingAccount"
1432
- }
1433
- },
1434
- {
1435
- "name": "accountFlags",
1436
- "docs": [
1437
- "The flags that indicate the state of the account.",
1438
- "This is u64 bitfield, where each bit represents a flag.",
1439
- "",
1440
- "Flags:",
1441
- "- DISABLED_FLAG = 1 << 0 = 1 - This flag indicates that the account is disabled,",
1442
- "and no further actions can be taken on it.",
1443
- "- IN_FLASHLOAN_FLAG (1 << 1)",
1444
- "- FLASHLOAN_ENABLED_FLAG (1 << 2)",
1445
- "- TRANSFER_AUTHORITY_ALLOWED_FLAG (1 << 3)"
1446
- ],
1447
- "type": "u64"
1448
- },
1449
- {
1450
- "name": "padding",
1451
- "type": {
1452
- "array": [
1453
- "u64",
1454
- 63
1455
- ]
1456
- }
1457
- }
1458
- ]
1459
- }
1460
- },
1461
- {
1462
- "name": "clendGroup",
1463
- "type": {
1464
- "kind": "struct",
1465
- "fields": [
1466
- {
1467
- "name": "admin",
1468
- "type": "publicKey"
1469
- },
1470
- {
1471
- "name": "groupFlags",
1472
- "docs": [
1473
- "Bitmask for group settings flags.",
1474
- "* Bit 0: If set, program-level fees are enabled.",
1475
- "* Bits 1-63: Reserved for future use."
1476
- ],
1477
- "type": "u64"
1478
- },
1479
- {
1480
- "name": "feeStateCache",
1481
- "docs": [
1482
- "Caches information from the global `FeeState` so the FeeState can be omitted on certain ixes"
1483
- ],
1484
- "type": {
1485
- "defined": "FeeStateCache"
1486
- }
1487
- },
1488
- {
1489
- "name": "padding0",
1490
- "type": {
1491
- "array": [
1492
- {
1493
- "array": [
1494
- "u64",
1495
- 2
1496
- ]
1497
- },
1498
- 27
1499
- ]
1500
- }
1501
- },
1502
- {
1503
- "name": "padding1",
1504
- "type": {
1505
- "array": [
1506
- {
1507
- "array": [
1508
- "u64",
1509
- 2
1510
- ]
1511
- },
1512
- 32
1513
- ]
1514
- }
1515
- },
1516
- {
1517
- "name": "padding3",
1518
- "type": "u64"
1519
- }
1520
- ]
1521
- }
1522
- },
1523
- {
1524
- "name": "bank",
1525
- "type": {
1526
- "kind": "struct",
1527
- "fields": [
1528
- {
1529
- "name": "mint",
1530
- "type": "publicKey"
1531
- },
1532
- {
1533
- "name": "mintDecimals",
1534
- "type": "u8"
1535
- },
1536
- {
1537
- "name": "group",
1538
- "type": "publicKey"
1539
- },
1540
- {
1541
- "name": "pad0",
1542
- "type": {
1543
- "array": [
1544
- "u8",
1545
- 7
1546
- ]
1547
- }
1548
- },
1549
- {
1550
- "name": "assetShareValue",
1551
- "type": {
1552
- "defined": "WrappedI80F48"
1553
- }
1554
- },
1555
- {
1556
- "name": "liabilityShareValue",
1557
- "type": {
1558
- "defined": "WrappedI80F48"
1559
- }
1560
- },
1561
- {
1562
- "name": "liquidityVault",
1563
- "type": "publicKey"
1564
- },
1565
- {
1566
- "name": "liquidityVaultBump",
1567
- "type": "u8"
1568
- },
1569
- {
1570
- "name": "liquidityVaultAuthorityBump",
1571
- "type": "u8"
1572
- },
1573
- {
1574
- "name": "insuranceVault",
1575
- "type": "publicKey"
1576
- },
1577
- {
1578
- "name": "insuranceVaultBump",
1579
- "type": "u8"
1580
- },
1581
- {
1582
- "name": "insuranceVaultAuthorityBump",
1583
- "type": "u8"
1584
- },
1585
- {
1586
- "name": "pad1",
1587
- "type": {
1588
- "array": [
1589
- "u8",
1590
- 4
1591
- ]
1592
- }
1593
- },
1594
- {
1595
- "name": "collectedInsuranceFeesOutstanding",
1596
- "docs": [
1597
- "Fees collected and pending withdraw for the `insurance_vault`"
1598
- ],
1599
- "type": {
1600
- "defined": "WrappedI80F48"
1601
- }
1602
- },
1603
- {
1604
- "name": "feeVault",
1605
- "type": "publicKey"
1606
- },
1607
- {
1608
- "name": "feeVaultBump",
1609
- "type": "u8"
1610
- },
1611
- {
1612
- "name": "feeVaultAuthorityBump",
1613
- "type": "u8"
1614
- },
1615
- {
1616
- "name": "pad2",
1617
- "type": {
1618
- "array": [
1619
- "u8",
1620
- 6
1621
- ]
1622
- }
1623
- },
1624
- {
1625
- "name": "collectedGroupFeesOutstanding",
1626
- "docs": [
1627
- "Fees collected and pending withdraw for the `fee_vault`"
1628
- ],
1629
- "type": {
1630
- "defined": "WrappedI80F48"
1631
- }
1632
- },
1633
- {
1634
- "name": "totalLiabilityShares",
1635
- "type": {
1636
- "defined": "WrappedI80F48"
1637
- }
1638
- },
1639
- {
1640
- "name": "totalAssetShares",
1641
- "type": {
1642
- "defined": "WrappedI80F48"
1643
- }
1644
- },
1645
- {
1646
- "name": "lastUpdate",
1647
- "type": "i64"
1648
- },
1649
- {
1650
- "name": "config",
1651
- "type": {
1652
- "defined": "BankConfig"
1653
- }
1654
- },
1655
- {
1656
- "name": "flags",
1657
- "docs": [
1658
- "Bank Config Flags",
1659
- "",
1660
- "- EMISSIONS_FLAG_BORROW_ACTIVE: 1",
1661
- "- EMISSIONS_FLAG_LENDING_ACTIVE: 2",
1662
- "- PERMISSIONLESS_BAD_DEBT_SETTLEMENT: 4",
1663
- ""
1664
- ],
1665
- "type": "u64"
1666
- },
1667
- {
1668
- "name": "emissionsRate",
1669
- "docs": [
1670
- "Emissions APR.",
1671
- "Number of emitted tokens (emissions_mint) per 1e(bank.mint_decimal) tokens (bank mint) (native amount) per 1 YEAR."
1672
- ],
1673
- "type": "u64"
1674
- },
1675
- {
1676
- "name": "emissionsRemaining",
1677
- "type": {
1678
- "defined": "WrappedI80F48"
1679
- }
1680
- },
1681
- {
1682
- "name": "emissionsMint",
1683
- "type": "publicKey"
1684
- },
1685
- {
1686
- "name": "collectedProgramFeesOutstanding",
1687
- "docs": [
1688
- "Fees collected and pending withdraw for the `FeeState.global_fee_wallet`'s cannonical ATA for `mint`"
1689
- ],
1690
- "type": {
1691
- "defined": "WrappedI80F48"
1692
- }
1693
- },
1694
- {
1695
- "name": "authorizedLender",
1696
- "docs": [
1697
- "If set, only this address is authorized to lend tokens to this bank"
1698
- ],
1699
- "type": "publicKey"
1700
- },
1701
- {
1702
- "name": "padding0",
1703
- "type": {
1704
- "array": [
1705
- {
1706
- "array": [
1707
- "u64",
1708
- 2
1709
- ]
1710
- },
1711
- 25
1712
- ]
1713
- }
1714
- },
1715
- {
1716
- "name": "padding1",
1717
- "type": {
1718
- "array": [
1719
- {
1720
- "array": [
1721
- "u64",
1722
- 2
1723
- ]
1724
- },
1725
- 32
1726
- ]
1727
- }
1728
- }
1729
- ]
1730
- }
1731
- },
1732
- {
1733
- "name": "feeState",
1734
- "docs": [
1735
- "Unique per-program. The Program Owner uses this account to administrate fees collected by the protocol"
1736
- ],
1737
- "type": {
1738
- "kind": "struct",
1739
- "fields": [
1740
- {
1741
- "name": "key",
1742
- "docs": [
1743
- "The fee state's own key. A PDA derived from just `b\"feestate\"`"
1744
- ],
1745
- "type": "publicKey"
1746
- },
1747
- {
1748
- "name": "globalFeeAdmin",
1749
- "docs": [
1750
- "Can modify fees"
1751
- ],
1752
- "type": "publicKey"
1753
- },
1754
- {
1755
- "name": "globalFeeWallet",
1756
- "docs": [
1757
- "The base wallet for all protocol fees. All SOL fees go to this wallet. All non-SOL fees go",
1758
- "to the cannonical ATA of this wallet for that asset."
1759
- ],
1760
- "type": "publicKey"
1761
- },
1762
- {
1763
- "name": "placeholder0",
1764
- "type": "u64"
1765
- },
1766
- {
1767
- "name": "bankInitFlatSolFee",
1768
- "docs": [
1769
- "Flat fee assessed when a new bank is initialized, in lamports.",
1770
- "* In SOL, in native decimals."
1771
- ],
1772
- "type": "u32"
1773
- },
1774
- {
1775
- "name": "bumpSeed",
1776
- "type": "u8"
1777
- },
1778
- {
1779
- "name": "padding0",
1780
- "type": {
1781
- "array": [
1782
- "u8",
1783
- 4
1784
- ]
1785
- }
1786
- },
1787
- {
1788
- "name": "padding1",
1789
- "type": {
1790
- "array": [
1791
- "u8",
1792
- 15
1793
- ]
1794
- }
1795
- },
1796
- {
1797
- "name": "programFeeFixed",
1798
- "docs": [
1799
- "Fee collected by the program owner from all groups"
1800
- ],
1801
- "type": {
1802
- "defined": "WrappedI80F48"
1803
- }
1804
- },
1805
- {
1806
- "name": "programFeeRate",
1807
- "docs": [
1808
- "Fee collected by the program owner from all groups"
1809
- ],
1810
- "type": {
1811
- "defined": "WrappedI80F48"
1812
- }
1813
- },
1814
- {
1815
- "name": "reserved0",
1816
- "type": {
1817
- "array": [
1818
- "u8",
1819
- 32
1820
- ]
1821
- }
1822
- },
1823
- {
1824
- "name": "reserved1",
1825
- "type": {
1826
- "array": [
1827
- "u8",
1828
- 64
1829
- ]
1830
- }
1831
- }
1832
- ]
1833
- }
1834
- },
1835
- {
1836
- "name": "stakedSettings",
1837
- "docs": [
1838
- "Unique per-group. Staked Collateral banks created under a group automatically use these",
1839
- "settings. Groups that have not created this struct cannot create staked collateral banks. When",
1840
- "this struct updates, changes must be permissionlessly propogated to staked collateral banks.",
1841
- "Administrators can also edit the bank manually, i.e. with configure_bank, to temporarily make",
1842
- "changes such as raising the deposit limit for a single bank."
1843
- ],
1844
- "type": {
1845
- "kind": "struct",
1846
- "fields": [
1847
- {
1848
- "name": "key",
1849
- "docs": [
1850
- "This account's own key. A PDA derived from `clend_group` and `STAKED_SETTINGS_SEED`"
1851
- ],
1852
- "type": "publicKey"
1853
- },
1854
- {
1855
- "name": "clendGroup",
1856
- "docs": [
1857
- "Group for which these settings apply"
1858
- ],
1859
- "type": "publicKey"
1860
- },
1861
- {
1862
- "name": "oracle",
1863
- "docs": [
1864
- "Generally, the Pyth push oracle for SOL"
1865
- ],
1866
- "type": "publicKey"
1867
- },
1868
- {
1869
- "name": "assetWeightInit",
1870
- "type": {
1871
- "defined": "WrappedI80F48"
1872
- }
1873
- },
1874
- {
1875
- "name": "assetWeightMaint",
1876
- "type": {
1877
- "defined": "WrappedI80F48"
1878
- }
1879
- },
1880
- {
1881
- "name": "depositLimit",
1882
- "type": "u64"
1883
- },
1884
- {
1885
- "name": "totalAssetValueInitLimit",
1886
- "type": "u64"
1887
- },
1888
- {
1889
- "name": "oracleMaxAge",
1890
- "type": "u16"
1891
- },
1892
- {
1893
- "name": "riskTier",
1894
- "type": {
1895
- "defined": "RiskTier"
1896
- }
1897
- },
1898
- {
1899
- "name": "pad0",
1900
- "type": {
1901
- "array": [
1902
- "u8",
1903
- 5
1904
- ]
1905
- }
1906
- },
1907
- {
1908
- "name": "reserved0",
1909
- "docs": [
1910
- "The following values are irrelevant because staked collateral positions do not support",
1911
- "borrowing."
1912
- ],
1913
- "type": {
1914
- "array": [
1915
- "u8",
1916
- 8
1917
- ]
1918
- }
1919
- },
1920
- {
1921
- "name": "reserved1",
1922
- "type": {
1923
- "array": [
1924
- "u8",
1925
- 32
1926
- ]
1927
- }
1928
- },
1929
- {
1930
- "name": "reserved2",
1931
- "type": {
1932
- "array": [
1933
- "u8",
1934
- 64
1935
- ]
1936
- }
1937
- }
1938
- ]
1939
- }
1940
- }
1941
- ],
1942
- "types": [
1943
- {
1944
- "name": "GroupEventHeader",
1945
- "type": {
1946
- "kind": "struct",
1947
- "fields": [
1948
- {
1949
- "name": "signer",
1950
- "type": {
1951
- "option": "publicKey"
1952
- }
1953
- },
1954
- {
1955
- "name": "clendGroup",
1956
- "type": "publicKey"
1957
- }
1958
- ]
1959
- }
1960
- },
1961
- {
1962
- "name": "AccountEventHeader",
1963
- "type": {
1964
- "kind": "struct",
1965
- "fields": [
1966
- {
1967
- "name": "signer",
1968
- "type": {
1969
- "option": "publicKey"
1970
- }
1971
- },
1972
- {
1973
- "name": "clendAccount",
1974
- "type": "publicKey"
1975
- },
1976
- {
1977
- "name": "clendAccountAuthority",
1978
- "type": "publicKey"
1979
- },
1980
- {
1981
- "name": "clendGroup",
1982
- "type": "publicKey"
1983
- }
1984
- ]
1985
- }
1986
- },
1987
- {
1988
- "name": "LiquidationBalances",
1989
- "type": {
1990
- "kind": "struct",
1991
- "fields": [
1992
- {
1993
- "name": "liquidateeAssetBalance",
1994
- "type": "f64"
1995
- },
1996
- {
1997
- "name": "liquidateeLiabilityBalance",
1998
- "type": "f64"
1999
- },
2000
- {
2001
- "name": "liquidatorAssetBalance",
2002
- "type": "f64"
2003
- },
2004
- {
2005
- "name": "liquidatorLiabilityBalance",
2006
- "type": "f64"
2007
- }
2008
- ]
2009
- }
2010
- },
2011
- {
2012
- "name": "StakedSettingsEditConfig",
2013
- "type": {
2014
- "kind": "struct",
2015
- "fields": [
2016
- {
2017
- "name": "oracle",
2018
- "type": {
2019
- "option": "publicKey"
2020
- }
2021
- },
2022
- {
2023
- "name": "assetWeightInit",
2024
- "type": {
2025
- "option": {
2026
- "defined": "WrappedI80F48"
2027
- }
2028
- }
2029
- },
2030
- {
2031
- "name": "assetWeightMaint",
2032
- "type": {
2033
- "option": {
2034
- "defined": "WrappedI80F48"
2035
- }
2036
- }
2037
- },
2038
- {
2039
- "name": "depositLimit",
2040
- "type": {
2041
- "option": "u64"
2042
- }
2043
- },
2044
- {
2045
- "name": "totalAssetValueInitLimit",
2046
- "type": {
2047
- "option": "u64"
2048
- }
2049
- },
2050
- {
2051
- "name": "oracleMaxAge",
2052
- "type": {
2053
- "option": "u16"
2054
- }
2055
- },
2056
- {
2057
- "name": "riskTier",
2058
- "docs": [
2059
- "WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset",
2060
- "worthless as collateral, making all outstanding accounts eligible to be liquidated, and is",
2061
- "generally useful only when creating a staked collateral pool for rewards purposes only."
2062
- ],
2063
- "type": {
2064
- "option": {
2065
- "defined": "RiskTier"
2066
- }
2067
- }
2068
- }
2069
- ]
2070
- }
2071
- },
2072
- {
2073
- "name": "StakedSettingsConfig",
2074
- "type": {
2075
- "kind": "struct",
2076
- "fields": [
2077
- {
2078
- "name": "oracle",
2079
- "type": "publicKey"
2080
- },
2081
- {
2082
- "name": "assetWeightInit",
2083
- "type": {
2084
- "defined": "WrappedI80F48"
2085
- }
2086
- },
2087
- {
2088
- "name": "assetWeightMaint",
2089
- "type": {
2090
- "defined": "WrappedI80F48"
2091
- }
2092
- },
2093
- {
2094
- "name": "depositLimit",
2095
- "type": "u64"
2096
- },
2097
- {
2098
- "name": "totalAssetValueInitLimit",
2099
- "type": "u64"
2100
- },
2101
- {
2102
- "name": "oracleMaxAge",
2103
- "type": "u16"
2104
- },
2105
- {
2106
- "name": "riskTier",
2107
- "docs": [
2108
- "WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset",
2109
- "worthless as collateral, and is generally useful only when creating a staked collateral pool",
2110
- "for rewards purposes only."
2111
- ],
2112
- "type": {
2113
- "defined": "RiskTier"
2114
- }
2115
- }
2116
- ]
2117
- }
2118
- },
2119
- {
2120
- "name": "LendingAccount",
2121
- "type": {
2122
- "kind": "struct",
2123
- "fields": [
2124
- {
2125
- "name": "balances",
2126
- "type": {
2127
- "array": [
2128
- {
2129
- "defined": "Balance"
2130
- },
2131
- 16
2132
- ]
2133
- }
2134
- },
2135
- {
2136
- "name": "padding",
2137
- "type": {
2138
- "array": [
2139
- "u64",
2140
- 8
2141
- ]
2142
- }
2143
- }
2144
- ]
2145
- }
2146
- },
2147
- {
2148
- "name": "Balance",
2149
- "type": {
2150
- "kind": "struct",
2151
- "fields": [
2152
- {
2153
- "name": "active",
2154
- "type": "bool"
2155
- },
2156
- {
2157
- "name": "bankPk",
2158
- "type": "publicKey"
2159
- },
2160
- {
2161
- "name": "bankAssetTag",
2162
- "docs": [
2163
- "Inherited from the bank when the position is first created and CANNOT BE CHANGED after that.",
2164
- "Note that all balances created before the addition of this feature use `ASSET_TAG_DEFAULT`"
2165
- ],
2166
- "type": "u8"
2167
- },
2168
- {
2169
- "name": "pad0",
2170
- "type": {
2171
- "array": [
2172
- "u8",
2173
- 6
2174
- ]
2175
- }
2176
- },
2177
- {
2178
- "name": "assetShares",
2179
- "type": {
2180
- "defined": "WrappedI80F48"
2181
- }
2182
- },
2183
- {
2184
- "name": "liabilityShares",
2185
- "type": {
2186
- "defined": "WrappedI80F48"
2187
- }
2188
- },
2189
- {
2190
- "name": "emissionsOutstanding",
2191
- "type": {
2192
- "defined": "WrappedI80F48"
2193
- }
2194
- },
2195
- {
2196
- "name": "lastUpdate",
2197
- "type": "u64"
2198
- },
2199
- {
2200
- "name": "padding",
2201
- "type": {
2202
- "array": [
2203
- "u64",
2204
- 1
2205
- ]
2206
- }
2207
- }
2208
- ]
2209
- }
2210
- },
2211
- {
2212
- "name": "FeeStateCache",
2213
- "type": {
2214
- "kind": "struct",
2215
- "fields": [
2216
- {
2217
- "name": "globalFeeWallet",
2218
- "type": "publicKey"
2219
- },
2220
- {
2221
- "name": "programFeeFixed",
2222
- "type": {
2223
- "defined": "WrappedI80F48"
2224
- }
2225
- },
2226
- {
2227
- "name": "programFeeRate",
2228
- "type": {
2229
- "defined": "WrappedI80F48"
2230
- }
2231
- }
2232
- ]
2233
- }
2234
- },
2235
- {
2236
- "name": "GroupConfig",
2237
- "type": {
2238
- "kind": "struct",
2239
- "fields": [
2240
- {
2241
- "name": "admin",
2242
- "type": {
2243
- "option": "publicKey"
2244
- }
2245
- }
2246
- ]
2247
- }
2248
- },
2249
- {
2250
- "name": "InterestRateConfigCompact",
2251
- "type": {
2252
- "kind": "struct",
2253
- "fields": [
2254
- {
2255
- "name": "optimalUtilizationRate",
2256
- "type": {
2257
- "defined": "WrappedI80F48"
2258
- }
2259
- },
2260
- {
2261
- "name": "plateauInterestRate",
2262
- "type": {
2263
- "defined": "WrappedI80F48"
2264
- }
2265
- },
2266
- {
2267
- "name": "maxInterestRate",
2268
- "type": {
2269
- "defined": "WrappedI80F48"
2270
- }
2271
- },
2272
- {
2273
- "name": "insuranceFeeFixedApr",
2274
- "type": {
2275
- "defined": "WrappedI80F48"
2276
- }
2277
- },
2278
- {
2279
- "name": "insuranceIrFee",
2280
- "type": {
2281
- "defined": "WrappedI80F48"
2282
- }
2283
- },
2284
- {
2285
- "name": "protocolFixedFeeApr",
2286
- "type": {
2287
- "defined": "WrappedI80F48"
2288
- }
2289
- },
2290
- {
2291
- "name": "protocolIrFee",
2292
- "type": {
2293
- "defined": "WrappedI80F48"
2294
- }
2295
- },
2296
- {
2297
- "name": "protocolOriginationFee",
2298
- "type": {
2299
- "defined": "WrappedI80F48"
2300
- }
2301
- }
2302
- ]
2303
- }
2304
- },
2305
- {
2306
- "name": "InterestRateConfig",
2307
- "type": {
2308
- "kind": "struct",
2309
- "fields": [
2310
- {
2311
- "name": "optimalUtilizationRate",
2312
- "type": {
2313
- "defined": "WrappedI80F48"
2314
- }
2315
- },
2316
- {
2317
- "name": "plateauInterestRate",
2318
- "type": {
2319
- "defined": "WrappedI80F48"
2320
- }
2321
- },
2322
- {
2323
- "name": "maxInterestRate",
2324
- "type": {
2325
- "defined": "WrappedI80F48"
2326
- }
2327
- },
2328
- {
2329
- "name": "insuranceFeeFixedApr",
2330
- "docs": [
2331
- "Goes to insurance, funds `collected_insurance_fees_outstanding`"
2332
- ],
2333
- "type": {
2334
- "defined": "WrappedI80F48"
2335
- }
2336
- },
2337
- {
2338
- "name": "insuranceIrFee",
2339
- "docs": [
2340
- "Goes to insurance, funds `collected_insurance_fees_outstanding`"
2341
- ],
2342
- "type": {
2343
- "defined": "WrappedI80F48"
2344
- }
2345
- },
2346
- {
2347
- "name": "protocolFixedFeeApr",
2348
- "docs": [
2349
- "Earned by the group, goes to `collected_group_fees_outstanding`"
2350
- ],
2351
- "type": {
2352
- "defined": "WrappedI80F48"
2353
- }
2354
- },
2355
- {
2356
- "name": "protocolIrFee",
2357
- "docs": [
2358
- "Earned by the group, goes to `collected_group_fees_outstanding`"
2359
- ],
2360
- "type": {
2361
- "defined": "WrappedI80F48"
2362
- }
2363
- },
2364
- {
2365
- "name": "protocolOriginationFee",
2366
- "type": {
2367
- "defined": "WrappedI80F48"
2368
- }
2369
- },
2370
- {
2371
- "name": "padding0",
2372
- "type": {
2373
- "array": [
2374
- "u8",
2375
- 16
2376
- ]
2377
- }
2378
- },
2379
- {
2380
- "name": "padding1",
2381
- "type": {
2382
- "array": [
2383
- {
2384
- "array": [
2385
- "u8",
2386
- 32
2387
- ]
2388
- },
2389
- 3
2390
- ]
2391
- }
2392
- }
2393
- ]
2394
- }
2395
- },
2396
- {
2397
- "name": "InterestRateConfigOpt",
2398
- "type": {
2399
- "kind": "struct",
2400
- "fields": [
2401
- {
2402
- "name": "optimalUtilizationRate",
2403
- "type": {
2404
- "option": {
2405
- "defined": "WrappedI80F48"
2406
- }
2407
- }
2408
- },
2409
- {
2410
- "name": "plateauInterestRate",
2411
- "type": {
2412
- "option": {
2413
- "defined": "WrappedI80F48"
2414
- }
2415
- }
2416
- },
2417
- {
2418
- "name": "maxInterestRate",
2419
- "type": {
2420
- "option": {
2421
- "defined": "WrappedI80F48"
2422
- }
2423
- }
2424
- },
2425
- {
2426
- "name": "insuranceFeeFixedApr",
2427
- "type": {
2428
- "option": {
2429
- "defined": "WrappedI80F48"
2430
- }
2431
- }
2432
- },
2433
- {
2434
- "name": "insuranceIrFee",
2435
- "type": {
2436
- "option": {
2437
- "defined": "WrappedI80F48"
2438
- }
2439
- }
2440
- },
2441
- {
2442
- "name": "protocolFixedFeeApr",
2443
- "type": {
2444
- "option": {
2445
- "defined": "WrappedI80F48"
2446
- }
2447
- }
2448
- },
2449
- {
2450
- "name": "protocolIrFee",
2451
- "type": {
2452
- "option": {
2453
- "defined": "WrappedI80F48"
2454
- }
2455
- }
2456
- },
2457
- {
2458
- "name": "protocolOriginationFee",
2459
- "type": {
2460
- "option": {
2461
- "defined": "WrappedI80F48"
2462
- }
2463
- }
2464
- }
2465
- ]
2466
- }
2467
- },
2468
- {
2469
- "name": "BankConfigCompact",
2470
- "docs": [
2471
- "TODO: Convert weights to (u64, u64) to avoid precision loss (maybe?)"
2472
- ],
2473
- "type": {
2474
- "kind": "struct",
2475
- "fields": [
2476
- {
2477
- "name": "assetWeightInit",
2478
- "type": {
2479
- "defined": "WrappedI80F48"
2480
- }
2481
- },
2482
- {
2483
- "name": "assetWeightMaint",
2484
- "type": {
2485
- "defined": "WrappedI80F48"
2486
- }
2487
- },
2488
- {
2489
- "name": "liabilityWeightInit",
2490
- "type": {
2491
- "defined": "WrappedI80F48"
2492
- }
2493
- },
2494
- {
2495
- "name": "liabilityWeightMaint",
2496
- "type": {
2497
- "defined": "WrappedI80F48"
2498
- }
2499
- },
2500
- {
2501
- "name": "depositLimit",
2502
- "type": "u64"
2503
- },
2504
- {
2505
- "name": "operationalState",
2506
- "type": {
2507
- "defined": "BankOperationalState"
2508
- }
2509
- },
2510
- {
2511
- "name": "borrowLimit",
2512
- "type": "u64"
2513
- },
2514
- {
2515
- "name": "riskTier",
2516
- "type": {
2517
- "defined": "RiskTier"
2518
- }
2519
- },
2520
- {
2521
- "name": "assetTag",
2522
- "docs": [
2523
- "Determines what kinds of assets users of this bank can interact with.",
2524
- "Options:",
2525
- "* ASSET_TAG_DEFAULT (0) - A regular asset that can be comingled with any other regular asset",
2526
- "or with `ASSET_TAG_SOL`",
2527
- "* ASSET_TAG_SOL (1) - Accounts with a SOL position can comingle with **either**",
2528
- "`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both",
2529
- "* ASSET_TAG_STAKED (2) - Staked SOL assets. Accounts with a STAKED position can only deposit",
2530
- "other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL"
2531
- ],
2532
- "type": "u8"
2533
- },
2534
- {
2535
- "name": "pad0",
2536
- "type": {
2537
- "array": [
2538
- "u8",
2539
- 6
2540
- ]
2541
- }
2542
- },
2543
- {
2544
- "name": "totalAssetValueInitLimit",
2545
- "docs": [
2546
- "USD denominated limit for calculating asset value for initialization margin requirements.",
2547
- "Example, if total SOL deposits are equal to $1M and the limit it set to $500K,",
2548
- "then SOL assets will be discounted by 50%.",
2549
- "",
2550
- "In other words the max value of liabilities that can be backed by the asset is $500K.",
2551
- "This is useful for limiting the damage of orcale attacks.",
2552
- "",
2553
- "Value is UI USD value, for example value 100 -> $100"
2554
- ],
2555
- "type": "u64"
2556
- },
2557
- {
2558
- "name": "oracleMaxAge",
2559
- "docs": [
2560
- "Time window in seconds for the oracle price feed to be considered live."
2561
- ],
2562
- "type": "u16"
2563
- }
2564
- ]
2565
- }
2566
- },
2567
- {
2568
- "name": "BankConfig",
2569
- "docs": [
2570
- "TODO: Convert weights to (u64, u64) to avoid precision loss (maybe?)"
2571
- ],
2572
- "type": {
2573
- "kind": "struct",
2574
- "fields": [
2575
- {
2576
- "name": "assetWeightInit",
2577
- "type": {
2578
- "defined": "WrappedI80F48"
2579
- }
2580
- },
2581
- {
2582
- "name": "assetWeightMaint",
2583
- "type": {
2584
- "defined": "WrappedI80F48"
2585
- }
2586
- },
2587
- {
2588
- "name": "liabilityWeightInit",
2589
- "type": {
2590
- "defined": "WrappedI80F48"
2591
- }
2592
- },
2593
- {
2594
- "name": "liabilityWeightMaint",
2595
- "type": {
2596
- "defined": "WrappedI80F48"
2597
- }
2598
- },
2599
- {
2600
- "name": "depositLimit",
2601
- "type": "u64"
2602
- },
2603
- {
2604
- "name": "interestRateConfig",
2605
- "type": {
2606
- "defined": "InterestRateConfig"
2607
- }
2608
- },
2609
- {
2610
- "name": "operationalState",
2611
- "type": {
2612
- "defined": "BankOperationalState"
2613
- }
2614
- },
2615
- {
2616
- "name": "oracleSetup",
2617
- "type": {
2618
- "defined": "OracleSetup"
2619
- }
2620
- },
2621
- {
2622
- "name": "oracleKeys",
2623
- "type": {
2624
- "array": [
2625
- "publicKey",
2626
- 5
2627
- ]
2628
- }
2629
- },
2630
- {
2631
- "name": "pad0",
2632
- "type": {
2633
- "array": [
2634
- "u8",
2635
- 6
2636
- ]
2637
- }
2638
- },
2639
- {
2640
- "name": "borrowLimit",
2641
- "type": "u64"
2642
- },
2643
- {
2644
- "name": "riskTier",
2645
- "type": {
2646
- "defined": "RiskTier"
2647
- }
2648
- },
2649
- {
2650
- "name": "assetTag",
2651
- "docs": [
2652
- "Determines what kinds of assets users of this bank can interact with.",
2653
- "Options:",
2654
- "* ASSET_TAG_DEFAULT (0) - A regular asset that can be comingled with any other regular asset",
2655
- "or with `ASSET_TAG_SOL`",
2656
- "* ASSET_TAG_SOL (1) - Accounts with a SOL position can comingle with **either**",
2657
- "`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both",
2658
- "* ASSET_TAG_STAKED (2) - Staked SOL assets. Accounts with a STAKED position can only deposit",
2659
- "other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL"
2660
- ],
2661
- "type": "u8"
2662
- },
2663
- {
2664
- "name": "pad1",
2665
- "type": {
2666
- "array": [
2667
- "u8",
2668
- 6
2669
- ]
2670
- }
2671
- },
2672
- {
2673
- "name": "totalAssetValueInitLimit",
2674
- "docs": [
2675
- "USD denominated limit for calculating asset value for initialization margin requirements.",
2676
- "Example, if total SOL deposits are equal to $1M and the limit it set to $500K,",
2677
- "then SOL assets will be discounted by 50%.",
2678
- "",
2679
- "In other words the max value of liabilities that can be backed by the asset is $500K.",
2680
- "This is useful for limiting the damage of orcale attacks.",
2681
- "",
2682
- "Value is UI USD value, for example value 100 -> $100"
2683
- ],
2684
- "type": "u64"
2685
- },
2686
- {
2687
- "name": "oracleMaxAge",
2688
- "docs": [
2689
- "Time window in seconds for the oracle price feed to be considered live."
2690
- ],
2691
- "type": "u16"
2692
- },
2693
- {
2694
- "name": "padding",
2695
- "type": {
2696
- "array": [
2697
- "u8",
2698
- 38
2699
- ]
2700
- }
2701
- }
2702
- ]
2703
- }
2704
- },
2705
- {
2706
- "name": "WrappedI80F48",
2707
- "type": {
2708
- "kind": "struct",
2709
- "fields": [
2710
- {
2711
- "name": "value",
2712
- "type": {
2713
- "array": [
2714
- "u8",
2715
- 16
2716
- ]
2717
- }
2718
- }
2719
- ]
2720
- }
2721
- },
2722
- {
2723
- "name": "BankConfigOpt",
2724
- "type": {
2725
- "kind": "struct",
2726
- "fields": [
2727
- {
2728
- "name": "assetWeightInit",
2729
- "type": {
2730
- "option": {
2731
- "defined": "WrappedI80F48"
2732
- }
2733
- }
2734
- },
2735
- {
2736
- "name": "assetWeightMaint",
2737
- "type": {
2738
- "option": {
2739
- "defined": "WrappedI80F48"
2740
- }
2741
- }
2742
- },
2743
- {
2744
- "name": "liabilityWeightInit",
2745
- "type": {
2746
- "option": {
2747
- "defined": "WrappedI80F48"
2748
- }
2749
- }
2750
- },
2751
- {
2752
- "name": "liabilityWeightMaint",
2753
- "type": {
2754
- "option": {
2755
- "defined": "WrappedI80F48"
2756
- }
2757
- }
2758
- },
2759
- {
2760
- "name": "depositLimit",
2761
- "type": {
2762
- "option": "u64"
2763
- }
2764
- },
2765
- {
2766
- "name": "borrowLimit",
2767
- "type": {
2768
- "option": "u64"
2769
- }
2770
- },
2771
- {
2772
- "name": "operationalState",
2773
- "type": {
2774
- "option": {
2775
- "defined": "BankOperationalState"
2776
- }
2777
- }
2778
- },
2779
- {
2780
- "name": "interestRateConfig",
2781
- "type": {
2782
- "option": {
2783
- "defined": "InterestRateConfigOpt"
2784
- }
2785
- }
2786
- },
2787
- {
2788
- "name": "riskTier",
2789
- "type": {
2790
- "option": {
2791
- "defined": "RiskTier"
2792
- }
2793
- }
2794
- },
2795
- {
2796
- "name": "assetTag",
2797
- "type": {
2798
- "option": "u8"
2799
- }
2800
- },
2801
- {
2802
- "name": "totalAssetValueInitLimit",
2803
- "type": {
2804
- "option": "u64"
2805
- }
2806
- },
2807
- {
2808
- "name": "oracleMaxAge",
2809
- "type": {
2810
- "option": "u16"
2811
- }
2812
- },
2813
- {
2814
- "name": "permissionlessBadDebtSettlement",
2815
- "type": {
2816
- "option": "bool"
2817
- }
2818
- },
2819
- {
2820
- "name": "freezeSettings",
2821
- "type": {
2822
- "option": "bool"
2823
- }
2824
- },
2825
- {
2826
- "name": "authorizedLender",
2827
- "type": {
2828
- "option": "publicKey"
2829
- }
2830
- }
2831
- ]
2832
- }
2833
- },
2834
- {
2835
- "name": "BalanceIncreaseType",
2836
- "type": {
2837
- "kind": "enum",
2838
- "variants": [
2839
- {
2840
- "name": "Any"
2841
- },
2842
- {
2843
- "name": "RepayOnly"
2844
- },
2845
- {
2846
- "name": "DepositOnly"
2847
- },
2848
- {
2849
- "name": "BypassDepositLimit"
2850
- }
2851
- ]
2852
- }
2853
- },
2854
- {
2855
- "name": "BalanceDecreaseType",
2856
- "type": {
2857
- "kind": "enum",
2858
- "variants": [
2859
- {
2860
- "name": "Any"
2861
- },
2862
- {
2863
- "name": "WithdrawOnly"
2864
- },
2865
- {
2866
- "name": "BorrowOnly"
2867
- },
2868
- {
2869
- "name": "BypassBorrowLimit"
2870
- }
2871
- ]
2872
- }
2873
- },
2874
- {
2875
- "name": "RequirementType",
2876
- "type": {
2877
- "kind": "enum",
2878
- "variants": [
2879
- {
2880
- "name": "Initial"
2881
- },
2882
- {
2883
- "name": "Maintenance"
2884
- },
2885
- {
2886
- "name": "Equity"
2887
- }
2888
- ]
2889
- }
2890
- },
2891
- {
2892
- "name": "BalanceSide",
2893
- "type": {
2894
- "kind": "enum",
2895
- "variants": [
2896
- {
2897
- "name": "Assets"
2898
- },
2899
- {
2900
- "name": "Liabilities"
2901
- }
2902
- ]
2903
- }
2904
- },
2905
- {
2906
- "name": "RiskRequirementType",
2907
- "type": {
2908
- "kind": "enum",
2909
- "variants": [
2910
- {
2911
- "name": "Initial"
2912
- },
2913
- {
2914
- "name": "Maintenance"
2915
- },
2916
- {
2917
- "name": "Equity"
2918
- }
2919
- ]
2920
- }
2921
- },
2922
- {
2923
- "name": "BankOperationalState",
2924
- "type": {
2925
- "kind": "enum",
2926
- "variants": [
2927
- {
2928
- "name": "Paused"
2929
- },
2930
- {
2931
- "name": "Operational"
2932
- },
2933
- {
2934
- "name": "ReduceOnly"
2935
- }
2936
- ]
2937
- }
2938
- },
2939
- {
2940
- "name": "RiskTier",
2941
- "type": {
2942
- "kind": "enum",
2943
- "variants": [
2944
- {
2945
- "name": "Collateral"
2946
- },
2947
- {
2948
- "name": "Isolated"
2949
- }
2950
- ]
2951
- }
2952
- },
2953
- {
2954
- "name": "BankVaultType",
2955
- "type": {
2956
- "kind": "enum",
2957
- "variants": [
2958
- {
2959
- "name": "Liquidity"
2960
- },
2961
- {
2962
- "name": "Insurance"
2963
- },
2964
- {
2965
- "name": "Fee"
2966
- }
2967
- ]
2968
- }
2969
- },
2970
- {
2971
- "name": "OracleSetup",
2972
- "type": {
2973
- "kind": "enum",
2974
- "variants": [
2975
- {
2976
- "name": "None"
2977
- },
2978
- {
2979
- "name": "PythLegacy"
2980
- },
2981
- {
2982
- "name": "PythPushOracle"
2983
- },
2984
- {
2985
- "name": "StakedWithPythPush"
2986
- },
2987
- {
2988
- "name": "SwitchboardPull"
2989
- }
2990
- ]
2991
- }
2992
- },
2993
- {
2994
- "name": "PriceBias",
2995
- "type": {
2996
- "kind": "enum",
2997
- "variants": [
2998
- {
2999
- "name": "Low"
3000
- },
3001
- {
3002
- "name": "High"
3003
- }
3004
- ]
3005
- }
3006
- },
3007
- {
3008
- "name": "OraclePriceType",
3009
- "type": {
3010
- "kind": "enum",
3011
- "variants": [
3012
- {
3013
- "name": "TimeWeighted"
3014
- },
3015
- {
3016
- "name": "RealTime"
3017
- }
3018
- ]
3019
- }
3020
- }
3021
- ],
3022
- "events": [
3023
- {
3024
- "name": "ClendGroupCreateEvent",
3025
- "fields": [
3026
- {
3027
- "name": "header",
3028
- "type": {
3029
- "defined": "GroupEventHeader"
3030
- },
3031
- "index": false
3032
- }
3033
- ]
3034
- },
3035
- {
3036
- "name": "ClendGroupConfigureEvent",
3037
- "fields": [
3038
- {
3039
- "name": "header",
3040
- "type": {
3041
- "defined": "GroupEventHeader"
3042
- },
3043
- "index": false
3044
- },
3045
- {
3046
- "name": "config",
3047
- "type": {
3048
- "defined": "GroupConfig"
3049
- },
3050
- "index": false
3051
- }
3052
- ]
3053
- },
3054
- {
3055
- "name": "LendingPoolBankCreateEvent",
3056
- "fields": [
3057
- {
3058
- "name": "header",
3059
- "type": {
3060
- "defined": "GroupEventHeader"
3061
- },
3062
- "index": false
3063
- },
3064
- {
3065
- "name": "bank",
3066
- "type": "publicKey",
3067
- "index": false
3068
- },
3069
- {
3070
- "name": "mint",
3071
- "type": "publicKey",
3072
- "index": false
3073
- }
3074
- ]
3075
- },
3076
- {
3077
- "name": "LendingPoolBankConfigureEvent",
3078
- "fields": [
3079
- {
3080
- "name": "header",
3081
- "type": {
3082
- "defined": "GroupEventHeader"
3083
- },
3084
- "index": false
3085
- },
3086
- {
3087
- "name": "bank",
3088
- "type": "publicKey",
3089
- "index": false
3090
- },
3091
- {
3092
- "name": "mint",
3093
- "type": "publicKey",
3094
- "index": false
3095
- },
3096
- {
3097
- "name": "config",
3098
- "type": {
3099
- "defined": "BankConfigOpt"
3100
- },
3101
- "index": false
3102
- }
3103
- ]
3104
- },
3105
- {
3106
- "name": "LendingPoolBankConfigureIREvent",
3107
- "fields": [
3108
- {
3109
- "name": "header",
3110
- "type": {
3111
- "defined": "GroupEventHeader"
3112
- },
3113
- "index": false
3114
- },
3115
- {
3116
- "name": "bank",
3117
- "type": "publicKey",
3118
- "index": false
3119
- },
3120
- {
3121
- "name": "mint",
3122
- "type": "publicKey",
3123
- "index": false
3124
- },
3125
- {
3126
- "name": "config",
3127
- "type": {
3128
- "defined": "InterestRateConfigOpt"
3129
- },
3130
- "index": false
3131
- }
3132
- ]
3133
- },
3134
- {
3135
- "name": "LendingPoolBankConfigureOracleEvent",
3136
- "fields": [
3137
- {
3138
- "name": "header",
3139
- "type": {
3140
- "defined": "GroupEventHeader"
3141
- },
3142
- "index": false
3143
- },
3144
- {
3145
- "name": "bank",
3146
- "type": "publicKey",
3147
- "index": false
3148
- },
3149
- {
3150
- "name": "oracleSetup",
3151
- "type": "u8",
3152
- "index": false
3153
- },
3154
- {
3155
- "name": "oracle",
3156
- "type": "publicKey",
3157
- "index": false
3158
- }
3159
- ]
3160
- },
3161
- {
3162
- "name": "LendingPoolBankConfigureFrozenEvent",
3163
- "fields": [
3164
- {
3165
- "name": "header",
3166
- "type": {
3167
- "defined": "GroupEventHeader"
3168
- },
3169
- "index": false
3170
- },
3171
- {
3172
- "name": "bank",
3173
- "type": "publicKey",
3174
- "index": false
3175
- },
3176
- {
3177
- "name": "mint",
3178
- "type": "publicKey",
3179
- "index": false
3180
- },
3181
- {
3182
- "name": "depositLimit",
3183
- "type": "u64",
3184
- "index": false
3185
- },
3186
- {
3187
- "name": "borrowLimit",
3188
- "type": "u64",
3189
- "index": false
3190
- }
3191
- ]
3192
- },
3193
- {
3194
- "name": "EditStakedSettingsEvent",
3195
- "fields": [
3196
- {
3197
- "name": "group",
3198
- "type": "publicKey",
3199
- "index": false
3200
- },
3201
- {
3202
- "name": "settings",
3203
- "type": {
3204
- "defined": "StakedSettingsEditConfig"
3205
- },
3206
- "index": false
3207
- }
3208
- ]
3209
- },
3210
- {
3211
- "name": "LendingPoolBankAccrueInterestEvent",
3212
- "fields": [
3213
- {
3214
- "name": "header",
3215
- "type": {
3216
- "defined": "GroupEventHeader"
3217
- },
3218
- "index": false
3219
- },
3220
- {
3221
- "name": "bank",
3222
- "type": "publicKey",
3223
- "index": false
3224
- },
3225
- {
3226
- "name": "mint",
3227
- "type": "publicKey",
3228
- "index": false
3229
- },
3230
- {
3231
- "name": "delta",
3232
- "type": "u64",
3233
- "index": false
3234
- },
3235
- {
3236
- "name": "feesCollected",
3237
- "type": "f64",
3238
- "index": false
3239
- },
3240
- {
3241
- "name": "insuranceCollected",
3242
- "type": "f64",
3243
- "index": false
3244
- }
3245
- ]
3246
- },
3247
- {
3248
- "name": "LendingPoolBankCollectFeesEvent",
3249
- "fields": [
3250
- {
3251
- "name": "header",
3252
- "type": {
3253
- "defined": "GroupEventHeader"
3254
- },
3255
- "index": false
3256
- },
3257
- {
3258
- "name": "bank",
3259
- "type": "publicKey",
3260
- "index": false
3261
- },
3262
- {
3263
- "name": "mint",
3264
- "type": "publicKey",
3265
- "index": false
3266
- },
3267
- {
3268
- "name": "groupFeesCollected",
3269
- "type": "f64",
3270
- "index": false
3271
- },
3272
- {
3273
- "name": "groupFeesOutstanding",
3274
- "type": "f64",
3275
- "index": false
3276
- },
3277
- {
3278
- "name": "insuranceFeesCollected",
3279
- "type": "f64",
3280
- "index": false
3281
- },
3282
- {
3283
- "name": "insuranceFeesOutstanding",
3284
- "type": "f64",
3285
- "index": false
3286
- }
3287
- ]
3288
- },
3289
- {
3290
- "name": "LendingPoolBankHandleBankruptcyEvent",
3291
- "fields": [
3292
- {
3293
- "name": "header",
3294
- "type": {
3295
- "defined": "AccountEventHeader"
3296
- },
3297
- "index": false
3298
- },
3299
- {
3300
- "name": "bank",
3301
- "type": "publicKey",
3302
- "index": false
3303
- },
3304
- {
3305
- "name": "mint",
3306
- "type": "publicKey",
3307
- "index": false
3308
- },
3309
- {
3310
- "name": "badDebt",
3311
- "type": "f64",
3312
- "index": false
3313
- },
3314
- {
3315
- "name": "coveredAmount",
3316
- "type": "f64",
3317
- "index": false
3318
- },
3319
- {
3320
- "name": "socializedAmount",
3321
- "type": "f64",
3322
- "index": false
3323
- }
3324
- ]
3325
- },
3326
- {
3327
- "name": "LendingPoolBankBalanceEvent",
3328
- "fields": [
3329
- {
3330
- "name": "header",
3331
- "type": {
3332
- "defined": "GroupEventHeader"
3333
- },
3334
- "index": false
3335
- },
3336
- {
3337
- "name": "bank",
3338
- "type": "publicKey",
3339
- "index": false
3340
- },
3341
- {
3342
- "name": "mint",
3343
- "type": "publicKey",
3344
- "index": false
3345
- },
3346
- {
3347
- "name": "assets",
3348
- "type": "u64",
3349
- "index": false
3350
- },
3351
- {
3352
- "name": "liabilities",
3353
- "type": "u64",
3354
- "index": false
3355
- }
3356
- ]
3357
- },
3358
- {
3359
- "name": "ClendAccountCreateEvent",
3360
- "fields": [
3361
- {
3362
- "name": "header",
3363
- "type": {
3364
- "defined": "AccountEventHeader"
3365
- },
3366
- "index": false
3367
- }
3368
- ]
3369
- },
3370
- {
3371
- "name": "LendingAccountDepositEvent",
3372
- "fields": [
3373
- {
3374
- "name": "header",
3375
- "type": {
3376
- "defined": "AccountEventHeader"
3377
- },
3378
- "index": false
3379
- },
3380
- {
3381
- "name": "bank",
3382
- "type": "publicKey",
3383
- "index": false
3384
- },
3385
- {
3386
- "name": "mint",
3387
- "type": "publicKey",
3388
- "index": false
3389
- },
3390
- {
3391
- "name": "amount",
3392
- "type": "u64",
3393
- "index": false
3394
- }
3395
- ]
3396
- },
3397
- {
3398
- "name": "LendingAccountRepayEvent",
3399
- "fields": [
3400
- {
3401
- "name": "header",
3402
- "type": {
3403
- "defined": "AccountEventHeader"
3404
- },
3405
- "index": false
3406
- },
3407
- {
3408
- "name": "bank",
3409
- "type": "publicKey",
3410
- "index": false
3411
- },
3412
- {
3413
- "name": "mint",
3414
- "type": "publicKey",
3415
- "index": false
3416
- },
3417
- {
3418
- "name": "amount",
3419
- "type": "u64",
3420
- "index": false
3421
- },
3422
- {
3423
- "name": "closeBalance",
3424
- "type": "bool",
3425
- "index": false
3426
- }
3427
- ]
3428
- },
3429
- {
3430
- "name": "LendingAccountBorrowEvent",
3431
- "fields": [
3432
- {
3433
- "name": "header",
3434
- "type": {
3435
- "defined": "AccountEventHeader"
3436
- },
3437
- "index": false
3438
- },
3439
- {
3440
- "name": "bank",
3441
- "type": "publicKey",
3442
- "index": false
3443
- },
3444
- {
3445
- "name": "mint",
3446
- "type": "publicKey",
3447
- "index": false
3448
- },
3449
- {
3450
- "name": "amount",
3451
- "type": "u64",
3452
- "index": false
3453
- }
3454
- ]
3455
- },
3456
- {
3457
- "name": "LendingAccountWithdrawEvent",
3458
- "fields": [
3459
- {
3460
- "name": "header",
3461
- "type": {
3462
- "defined": "AccountEventHeader"
3463
- },
3464
- "index": false
3465
- },
3466
- {
3467
- "name": "bank",
3468
- "type": "publicKey",
3469
- "index": false
3470
- },
3471
- {
3472
- "name": "mint",
3473
- "type": "publicKey",
3474
- "index": false
3475
- },
3476
- {
3477
- "name": "amount",
3478
- "type": "u64",
3479
- "index": false
3480
- },
3481
- {
3482
- "name": "closeBalance",
3483
- "type": "bool",
3484
- "index": false
3485
- }
3486
- ]
3487
- },
3488
- {
3489
- "name": "ClendAccountBalanceEvent",
3490
- "fields": [
3491
- {
3492
- "name": "header",
3493
- "type": {
3494
- "defined": "AccountEventHeader"
3495
- },
3496
- "index": false
3497
- },
3498
- {
3499
- "name": "bank",
3500
- "type": "publicKey",
3501
- "index": false
3502
- },
3503
- {
3504
- "name": "assetBalance",
3505
- "type": "u64",
3506
- "index": false
3507
- },
3508
- {
3509
- "name": "liabilityBalance",
3510
- "type": "u64",
3511
- "index": false
3512
- }
3513
- ]
3514
- },
3515
- {
3516
- "name": "LendingAccountLiquidateEvent",
3517
- "fields": [
3518
- {
3519
- "name": "header",
3520
- "type": {
3521
- "defined": "AccountEventHeader"
3522
- },
3523
- "index": false
3524
- },
3525
- {
3526
- "name": "liquidateeClendAccount",
3527
- "type": "publicKey",
3528
- "index": false
3529
- },
3530
- {
3531
- "name": "liquidateeClendAccountAuthority",
3532
- "type": "publicKey",
3533
- "index": false
3534
- },
3535
- {
3536
- "name": "assetBank",
3537
- "type": "publicKey",
3538
- "index": false
3539
- },
3540
- {
3541
- "name": "assetMint",
3542
- "type": "publicKey",
3543
- "index": false
3544
- },
3545
- {
3546
- "name": "liabilityBank",
3547
- "type": "publicKey",
3548
- "index": false
3549
- },
3550
- {
3551
- "name": "liabilityMint",
3552
- "type": "publicKey",
3553
- "index": false
3554
- },
3555
- {
3556
- "name": "liquidateePreHealth",
3557
- "type": "f64",
3558
- "index": false
3559
- },
3560
- {
3561
- "name": "liquidateePostHealth",
3562
- "type": "f64",
3563
- "index": false
3564
- },
3565
- {
3566
- "name": "preBalances",
3567
- "type": {
3568
- "defined": "LiquidationBalances"
3569
- },
3570
- "index": false
3571
- },
3572
- {
3573
- "name": "postBalances",
3574
- "type": {
3575
- "defined": "LiquidationBalances"
3576
- },
3577
- "index": false
3578
- }
3579
- ]
3580
- },
3581
- {
3582
- "name": "ClendAccountTransferAccountAuthorityEvent",
3583
- "fields": [
3584
- {
3585
- "name": "header",
3586
- "type": {
3587
- "defined": "AccountEventHeader"
3588
- },
3589
- "index": false
3590
- },
3591
- {
3592
- "name": "oldAccountAuthority",
3593
- "type": "publicKey",
3594
- "index": false
3595
- },
3596
- {
3597
- "name": "newAccountAuthority",
3598
- "type": "publicKey",
3599
- "index": false
3600
- }
3601
- ]
3602
- },
3603
- {
3604
- "name": "ClendPriceEvent",
3605
- "fields": [
3606
- {
3607
- "name": "header",
3608
- "type": {
3609
- "defined": "GroupEventHeader"
3610
- },
3611
- "index": false
3612
- },
3613
- {
3614
- "name": "bank",
3615
- "type": "publicKey",
3616
- "index": false
3617
- },
3618
- {
3619
- "name": "twPrice",
3620
- "type": "f64",
3621
- "index": false
3622
- },
3623
- {
3624
- "name": "rtPrice",
3625
- "type": "f64",
3626
- "index": false
3627
- }
3628
- ]
3629
- },
3630
- {
3631
- "name": "ClendAccountWithdrawEmissionsEvent",
3632
- "fields": [
3633
- {
3634
- "name": "header",
3635
- "type": {
3636
- "defined": "AccountEventHeader"
3637
- },
3638
- "index": false
3639
- },
3640
- {
3641
- "name": "bank",
3642
- "type": "publicKey",
3643
- "index": false
3644
- },
3645
- {
3646
- "name": "emissionsMint",
3647
- "type": "publicKey",
3648
- "index": false
3649
- },
3650
- {
3651
- "name": "emissionsSettleAmount",
3652
- "type": "u64",
3653
- "index": false
3654
- },
3655
- {
3656
- "name": "emissionsRemaining",
3657
- "type": "u64",
3658
- "index": false
3659
- }
3660
- ]
3661
- }
3662
- ],
3663
- "errors": [
3664
- {
3665
- "code": 6000,
3666
- "name": "MathError",
3667
- "msg": "Math error"
3668
- },
3669
- {
3670
- "code": 6001,
3671
- "name": "BankNotFound",
3672
- "msg": "Invalid bank index"
3673
- },
3674
- {
3675
- "code": 6002,
3676
- "name": "LendingAccountBalanceNotFound",
3677
- "msg": "Lending account balance not found"
3678
- },
3679
- {
3680
- "code": 6003,
3681
- "name": "BankAssetCapacityExceeded",
3682
- "msg": "Bank deposit capacity exceeded"
3683
- },
3684
- {
3685
- "code": 6004,
3686
- "name": "InvalidTransfer",
3687
- "msg": "Invalid transfer"
3688
- },
3689
- {
3690
- "code": 6005,
3691
- "name": "MissingPythOrBankAccount",
3692
- "msg": "Missing Oracle, Bank, LST mint, or Sol Pool"
3693
- },
3694
- {
3695
- "code": 6006,
3696
- "name": "MissingPythAccount",
3697
- "msg": "Missing Pyth account"
3698
- },
3699
- {
3700
- "code": 6007,
3701
- "name": "InvalidOracleAccount",
3702
- "msg": "Invalid Oracle account"
3703
- },
3704
- {
3705
- "code": 6008,
3706
- "name": "MissingBankAccount",
3707
- "msg": "Missing Bank account"
3708
- },
3709
- {
3710
- "code": 6009,
3711
- "name": "InvalidBankAccount",
3712
- "msg": "Invalid Bank account"
3713
- },
3714
- {
3715
- "code": 6010,
3716
- "name": "RiskEngineInitRejected",
3717
- "msg": "RiskEngine rejected due to either bad health or stale oracles"
3718
- },
3719
- {
3720
- "code": 6011,
3721
- "name": "LendingAccountBalanceSlotsFull",
3722
- "msg": "Lending account balance slots are full"
3723
- },
3724
- {
3725
- "code": 6012,
3726
- "name": "BankAlreadyExists",
3727
- "msg": "Bank already exists"
3728
- },
3729
- {
3730
- "code": 6013,
3731
- "name": "IllegalLiquidation",
3732
- "msg": "Illegal liquidation"
3733
- },
3734
- {
3735
- "code": 6014,
3736
- "name": "AccountNotBankrupt",
3737
- "msg": "Account is not bankrupt"
3738
- },
3739
- {
3740
- "code": 6015,
3741
- "name": "BalanceNotBadDebt",
3742
- "msg": "Account balance is not bad debt"
3743
- },
3744
- {
3745
- "code": 6016,
3746
- "name": "InvalidConfig",
3747
- "msg": "Invalid group config"
3748
- },
3749
- {
3750
- "code": 6017,
3751
- "name": "StaleOracle",
3752
- "msg": "Stale oracle data"
3753
- },
3754
- {
3755
- "code": 6018,
3756
- "name": "BankPaused",
3757
- "msg": "Bank paused"
3758
- },
3759
- {
3760
- "code": 6019,
3761
- "name": "BankReduceOnly",
3762
- "msg": "Bank is ReduceOnly mode"
3763
- },
3764
- {
3765
- "code": 6020,
3766
- "name": "BankAccountNotFound",
3767
- "msg": "Bank is missing"
3768
- },
3769
- {
3770
- "code": 6021,
3771
- "name": "OperationDepositOnly",
3772
- "msg": "Operation is deposit-only"
3773
- },
3774
- {
3775
- "code": 6022,
3776
- "name": "OperationWithdrawOnly",
3777
- "msg": "Operation is withdraw-only"
3778
- },
3779
- {
3780
- "code": 6023,
3781
- "name": "OperationBorrowOnly",
3782
- "msg": "Operation is borrow-only"
3783
- },
3784
- {
3785
- "code": 6024,
3786
- "name": "OperationRepayOnly",
3787
- "msg": "Operation is repay-only"
3788
- },
3789
- {
3790
- "code": 6025,
3791
- "name": "NoAssetFound",
3792
- "msg": "No asset found"
3793
- },
3794
- {
3795
- "code": 6026,
3796
- "name": "NoLiabilityFound",
3797
- "msg": "No liability found"
3798
- },
3799
- {
3800
- "code": 6027,
3801
- "name": "InvalidOracleSetup",
3802
- "msg": "Invalid oracle setup"
3803
- },
3804
- {
3805
- "code": 6028,
3806
- "name": "IllegalUtilizationRatio",
3807
- "msg": "Invalid bank utilization ratio"
3808
- },
3809
- {
3810
- "code": 6029,
3811
- "name": "BankLiabilityCapacityExceeded",
3812
- "msg": "Bank borrow cap exceeded"
3813
- },
3814
- {
3815
- "code": 6030,
3816
- "name": "InvalidPrice",
3817
- "msg": "Invalid Price"
3818
- },
3819
- {
3820
- "code": 6031,
3821
- "name": "IsolatedAccountIllegalState",
3822
- "msg": "Account can have only one liability when account is under isolated risk"
3823
- },
3824
- {
3825
- "code": 6032,
3826
- "name": "EmissionsAlreadySetup",
3827
- "msg": "Emissions already setup"
3828
- },
3829
- {
3830
- "code": 6033,
3831
- "name": "OracleNotSetup",
3832
- "msg": "Oracle is not set"
3833
- },
3834
- {
3835
- "code": 6034,
3836
- "name": "InvalidSwitchboardDecimalConversion",
3837
- "msg": "Invalid switchboard decimal conversion"
3838
- },
3839
- {
3840
- "code": 6035,
3841
- "name": "CannotCloseOutstandingEmissions",
3842
- "msg": "Cannot close balance because of outstanding emissions"
3843
- },
3844
- {
3845
- "code": 6036,
3846
- "name": "EmissionsUpdateError",
3847
- "msg": "Update emissions error"
3848
- },
3849
- {
3850
- "code": 6037,
3851
- "name": "AccountDisabled",
3852
- "msg": "Account disabled"
3853
- },
3854
- {
3855
- "code": 6038,
3856
- "name": "AccountTempActiveBalanceLimitExceeded",
3857
- "msg": "Account can't temporarily open 3 balances, please close a balance first"
3858
- },
3859
- {
3860
- "code": 6039,
3861
- "name": "AccountInFlashloan",
3862
- "msg": "Illegal action during flashloan"
3863
- },
3864
- {
3865
- "code": 6040,
3866
- "name": "IllegalFlashloan",
3867
- "msg": "Illegal flashloan"
3868
- },
3869
- {
3870
- "code": 6041,
3871
- "name": "IllegalFlag",
3872
- "msg": "Illegal flag"
3873
- },
3874
- {
3875
- "code": 6042,
3876
- "name": "IllegalBalanceState",
3877
- "msg": "Illegal balance state"
3878
- },
3879
- {
3880
- "code": 6043,
3881
- "name": "IllegalAccountAuthorityTransfer",
3882
- "msg": "Illegal account authority transfer"
3883
- },
3884
- {
3885
- "code": 6044,
3886
- "name": "Unauthorized",
3887
- "msg": "Unauthorized"
3888
- },
3889
- {
3890
- "code": 6045,
3891
- "name": "IllegalAction",
3892
- "msg": "Invalid account authority"
3893
- },
3894
- {
3895
- "code": 6046,
3896
- "name": "T22MintRequired",
3897
- "msg": "Token22 Banks require mint account as first remaining account"
3898
- },
3899
- {
3900
- "code": 6047,
3901
- "name": "InvalidFeeAta",
3902
- "msg": "Invalid ATA for global fee account"
3903
- },
3904
- {
3905
- "code": 6048,
3906
- "name": "AddedStakedPoolManually",
3907
- "msg": "Use add pool permissionless instead"
3908
- },
3909
- {
3910
- "code": 6049,
3911
- "name": "AssetTagMismatch",
3912
- "msg": "Staked SOL accounts can only deposit staked assets and borrow SOL"
3913
- },
3914
- {
3915
- "code": 6050,
3916
- "name": "StakePoolValidationFailed",
3917
- "msg": "Stake pool validation failed: check the stake pool, mint, or sol pool"
3918
- },
3919
- {
3920
- "code": 6051,
3921
- "name": "UnauthorizedLender",
3922
- "msg": "Unauthorized lender"
3923
- },
3924
- {
3925
- "code": 6052,
3926
- "name": "InvalidTokenProgram",
3927
- "msg": "Invalid token program"
3928
- }
3929
- ]
3930
- };
3931
3
  //# sourceMappingURL=clend.js.map