@jup-ag/lend 0.2.0-beta.1 → 0.2.0-beta.3
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/borrow/index.d.mts +162 -4
- package/dist/borrow/index.d.ts +162 -4
- package/dist/borrow/index.mjs +6 -3
- package/dist/dex/index.d.mts +247 -8
- package/dist/dex/index.d.ts +247 -8
- package/dist/dex/index.mjs +356 -27
- package/dist/earn/index.d.mts +23 -14
- package/dist/earn/index.d.ts +23 -14
- package/dist/earn/index.mjs +48 -2215
- package/dist/flashloan/index.d.mts +0 -1
- package/dist/flashloan/index.d.ts +0 -1
- package/dist/flashloan/index.mjs +6 -111
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +3 -3
- package/dist/refinance/index.d.mts +1 -2
- package/dist/refinance/index.d.ts +1 -2
- package/dist/refinance/index.mjs +4 -2
- package/dist/shared/lend.B80NmXTG.mjs +2184 -0
- package/dist/shared/lend.CS-bkwRq.mjs +867 -0
- package/dist/shared/{lend.CTcB5yyK.mjs → lend.CVtn-ehf.mjs} +300 -1332
- package/dist/shared/{lend.BT41yQVJ.d.mts → lend.CdoFqRFx.d.mts} +168 -474
- package/dist/shared/{lend.BT41yQVJ.d.ts → lend.CdoFqRFx.d.ts} +168 -474
- package/dist/shared/{lend.ByiEG4eI.mjs → lend.a53XYkl5.mjs} +1 -1
- package/dist/shared/lend.s0kjiHy3.mjs +29 -0
- package/package.json +1 -1
- package/dist/shared/lend.BC5Y1398.mjs +0 -18
|
@@ -708,59 +708,6 @@ type Vaults = {
|
|
|
708
708
|
{
|
|
709
709
|
name: "signerTokenAccount";
|
|
710
710
|
writable: true;
|
|
711
|
-
pda: {
|
|
712
|
-
seeds: [
|
|
713
|
-
{
|
|
714
|
-
kind: "account";
|
|
715
|
-
path: "signer";
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
kind: "account";
|
|
719
|
-
path: "borrowTokenProgram";
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
kind: "account";
|
|
723
|
-
path: "borrowToken";
|
|
724
|
-
}
|
|
725
|
-
];
|
|
726
|
-
program: {
|
|
727
|
-
kind: "const";
|
|
728
|
-
value: [
|
|
729
|
-
140,
|
|
730
|
-
151,
|
|
731
|
-
37,
|
|
732
|
-
143,
|
|
733
|
-
78,
|
|
734
|
-
36,
|
|
735
|
-
137,
|
|
736
|
-
241,
|
|
737
|
-
187,
|
|
738
|
-
61,
|
|
739
|
-
16,
|
|
740
|
-
41,
|
|
741
|
-
20,
|
|
742
|
-
142,
|
|
743
|
-
13,
|
|
744
|
-
131,
|
|
745
|
-
11,
|
|
746
|
-
90,
|
|
747
|
-
19,
|
|
748
|
-
153,
|
|
749
|
-
218,
|
|
750
|
-
255,
|
|
751
|
-
16,
|
|
752
|
-
132,
|
|
753
|
-
4,
|
|
754
|
-
142,
|
|
755
|
-
123,
|
|
756
|
-
216,
|
|
757
|
-
219,
|
|
758
|
-
233,
|
|
759
|
-
248,
|
|
760
|
-
89
|
|
761
|
-
];
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
711
|
},
|
|
765
712
|
{
|
|
766
713
|
name: "to";
|
|
@@ -768,59 +715,6 @@ type Vaults = {
|
|
|
768
715
|
{
|
|
769
716
|
name: "toTokenAccount";
|
|
770
717
|
writable: true;
|
|
771
|
-
pda: {
|
|
772
|
-
seeds: [
|
|
773
|
-
{
|
|
774
|
-
kind: "account";
|
|
775
|
-
path: "to";
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
kind: "account";
|
|
779
|
-
path: "supplyTokenProgram";
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
kind: "account";
|
|
783
|
-
path: "supplyToken";
|
|
784
|
-
}
|
|
785
|
-
];
|
|
786
|
-
program: {
|
|
787
|
-
kind: "const";
|
|
788
|
-
value: [
|
|
789
|
-
140,
|
|
790
|
-
151,
|
|
791
|
-
37,
|
|
792
|
-
143,
|
|
793
|
-
78,
|
|
794
|
-
36,
|
|
795
|
-
137,
|
|
796
|
-
241,
|
|
797
|
-
187,
|
|
798
|
-
61,
|
|
799
|
-
16,
|
|
800
|
-
41,
|
|
801
|
-
20,
|
|
802
|
-
142,
|
|
803
|
-
13,
|
|
804
|
-
131,
|
|
805
|
-
11,
|
|
806
|
-
90,
|
|
807
|
-
19,
|
|
808
|
-
153,
|
|
809
|
-
218,
|
|
810
|
-
255,
|
|
811
|
-
16,
|
|
812
|
-
132,
|
|
813
|
-
4,
|
|
814
|
-
142,
|
|
815
|
-
123,
|
|
816
|
-
216,
|
|
817
|
-
219,
|
|
818
|
-
233,
|
|
819
|
-
248,
|
|
820
|
-
89
|
|
821
|
-
];
|
|
822
|
-
};
|
|
823
|
-
};
|
|
824
718
|
},
|
|
825
719
|
{
|
|
826
720
|
name: "vaultConfig";
|
|
@@ -899,6 +793,7 @@ type Vaults = {
|
|
|
899
793
|
},
|
|
900
794
|
{
|
|
901
795
|
name: "associatedTokenProgram";
|
|
796
|
+
optional: true;
|
|
902
797
|
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
903
798
|
},
|
|
904
799
|
{
|
|
@@ -920,263 +815,51 @@ type Vaults = {
|
|
|
920
815
|
},
|
|
921
816
|
{
|
|
922
817
|
name: "transferType";
|
|
923
|
-
type: {
|
|
924
|
-
option: {
|
|
925
|
-
defined: {
|
|
926
|
-
name: "transferType";
|
|
927
|
-
};
|
|
928
|
-
};
|
|
929
|
-
};
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
name: "remainingAccountsIndices";
|
|
933
|
-
type: "bytes";
|
|
934
|
-
}
|
|
935
|
-
];
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
name: "operate";
|
|
939
|
-
discriminator: [217, 106, 208, 99, 116, 151, 42, 135];
|
|
940
|
-
accounts: [
|
|
941
|
-
{
|
|
942
|
-
name: "signer";
|
|
943
|
-
writable: true;
|
|
944
|
-
signer: true;
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
name: "signerSupplyTokenAccount";
|
|
948
|
-
writable: true;
|
|
949
|
-
pda: {
|
|
950
|
-
seeds: [
|
|
951
|
-
{
|
|
952
|
-
kind: "account";
|
|
953
|
-
path: "signer";
|
|
954
|
-
},
|
|
955
|
-
{
|
|
956
|
-
kind: "account";
|
|
957
|
-
path: "supplyTokenProgram";
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
kind: "account";
|
|
961
|
-
path: "supplyToken";
|
|
962
|
-
}
|
|
963
|
-
];
|
|
964
|
-
program: {
|
|
965
|
-
kind: "const";
|
|
966
|
-
value: [
|
|
967
|
-
140,
|
|
968
|
-
151,
|
|
969
|
-
37,
|
|
970
|
-
143,
|
|
971
|
-
78,
|
|
972
|
-
36,
|
|
973
|
-
137,
|
|
974
|
-
241,
|
|
975
|
-
187,
|
|
976
|
-
61,
|
|
977
|
-
16,
|
|
978
|
-
41,
|
|
979
|
-
20,
|
|
980
|
-
142,
|
|
981
|
-
13,
|
|
982
|
-
131,
|
|
983
|
-
11,
|
|
984
|
-
90,
|
|
985
|
-
19,
|
|
986
|
-
153,
|
|
987
|
-
218,
|
|
988
|
-
255,
|
|
989
|
-
16,
|
|
990
|
-
132,
|
|
991
|
-
4,
|
|
992
|
-
142,
|
|
993
|
-
123,
|
|
994
|
-
216,
|
|
995
|
-
219,
|
|
996
|
-
233,
|
|
997
|
-
248,
|
|
998
|
-
89
|
|
999
|
-
];
|
|
1000
|
-
};
|
|
1001
|
-
};
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
name: "signerBorrowTokenAccount";
|
|
1005
|
-
writable: true;
|
|
1006
|
-
pda: {
|
|
1007
|
-
seeds: [
|
|
1008
|
-
{
|
|
1009
|
-
kind: "account";
|
|
1010
|
-
path: "signer";
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
kind: "account";
|
|
1014
|
-
path: "borrowTokenProgram";
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
kind: "account";
|
|
1018
|
-
path: "borrowToken";
|
|
1019
|
-
}
|
|
1020
|
-
];
|
|
1021
|
-
program: {
|
|
1022
|
-
kind: "const";
|
|
1023
|
-
value: [
|
|
1024
|
-
140,
|
|
1025
|
-
151,
|
|
1026
|
-
37,
|
|
1027
|
-
143,
|
|
1028
|
-
78,
|
|
1029
|
-
36,
|
|
1030
|
-
137,
|
|
1031
|
-
241,
|
|
1032
|
-
187,
|
|
1033
|
-
61,
|
|
1034
|
-
16,
|
|
1035
|
-
41,
|
|
1036
|
-
20,
|
|
1037
|
-
142,
|
|
1038
|
-
13,
|
|
1039
|
-
131,
|
|
1040
|
-
11,
|
|
1041
|
-
90,
|
|
1042
|
-
19,
|
|
1043
|
-
153,
|
|
1044
|
-
218,
|
|
1045
|
-
255,
|
|
1046
|
-
16,
|
|
1047
|
-
132,
|
|
1048
|
-
4,
|
|
1049
|
-
142,
|
|
1050
|
-
123,
|
|
1051
|
-
216,
|
|
1052
|
-
219,
|
|
1053
|
-
233,
|
|
1054
|
-
248,
|
|
1055
|
-
89
|
|
1056
|
-
];
|
|
1057
|
-
};
|
|
1058
|
-
};
|
|
1059
|
-
},
|
|
1060
|
-
{
|
|
1061
|
-
name: "recipient";
|
|
1062
|
-
optional: true;
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
name: "recipientBorrowTokenAccount";
|
|
1066
|
-
writable: true;
|
|
1067
|
-
optional: true;
|
|
1068
|
-
pda: {
|
|
1069
|
-
seeds: [
|
|
1070
|
-
{
|
|
1071
|
-
kind: "account";
|
|
1072
|
-
path: "recipient";
|
|
1073
|
-
},
|
|
1074
|
-
{
|
|
1075
|
-
kind: "account";
|
|
1076
|
-
path: "borrowTokenProgram";
|
|
1077
|
-
},
|
|
1078
|
-
{
|
|
1079
|
-
kind: "account";
|
|
1080
|
-
path: "borrowToken";
|
|
1081
|
-
}
|
|
1082
|
-
];
|
|
1083
|
-
program: {
|
|
1084
|
-
kind: "const";
|
|
1085
|
-
value: [
|
|
1086
|
-
140,
|
|
1087
|
-
151,
|
|
1088
|
-
37,
|
|
1089
|
-
143,
|
|
1090
|
-
78,
|
|
1091
|
-
36,
|
|
1092
|
-
137,
|
|
1093
|
-
241,
|
|
1094
|
-
187,
|
|
1095
|
-
61,
|
|
1096
|
-
16,
|
|
1097
|
-
41,
|
|
1098
|
-
20,
|
|
1099
|
-
142,
|
|
1100
|
-
13,
|
|
1101
|
-
131,
|
|
1102
|
-
11,
|
|
1103
|
-
90,
|
|
1104
|
-
19,
|
|
1105
|
-
153,
|
|
1106
|
-
218,
|
|
1107
|
-
255,
|
|
1108
|
-
16,
|
|
1109
|
-
132,
|
|
1110
|
-
4,
|
|
1111
|
-
142,
|
|
1112
|
-
123,
|
|
1113
|
-
216,
|
|
1114
|
-
219,
|
|
1115
|
-
233,
|
|
1116
|
-
248,
|
|
1117
|
-
89
|
|
1118
|
-
];
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
},
|
|
1122
|
-
{
|
|
1123
|
-
name: "recipientSupplyTokenAccount";
|
|
1124
|
-
writable: true;
|
|
1125
|
-
optional: true;
|
|
1126
|
-
pda: {
|
|
1127
|
-
seeds: [
|
|
1128
|
-
{
|
|
1129
|
-
kind: "account";
|
|
1130
|
-
path: "recipient";
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
kind: "account";
|
|
1134
|
-
path: "supplyTokenProgram";
|
|
1135
|
-
},
|
|
1136
|
-
{
|
|
1137
|
-
kind: "account";
|
|
1138
|
-
path: "supplyToken";
|
|
1139
|
-
}
|
|
1140
|
-
];
|
|
1141
|
-
program: {
|
|
1142
|
-
kind: "const";
|
|
1143
|
-
value: [
|
|
1144
|
-
140,
|
|
1145
|
-
151,
|
|
1146
|
-
37,
|
|
1147
|
-
143,
|
|
1148
|
-
78,
|
|
1149
|
-
36,
|
|
1150
|
-
137,
|
|
1151
|
-
241,
|
|
1152
|
-
187,
|
|
1153
|
-
61,
|
|
1154
|
-
16,
|
|
1155
|
-
41,
|
|
1156
|
-
20,
|
|
1157
|
-
142,
|
|
1158
|
-
13,
|
|
1159
|
-
131,
|
|
1160
|
-
11,
|
|
1161
|
-
90,
|
|
1162
|
-
19,
|
|
1163
|
-
153,
|
|
1164
|
-
218,
|
|
1165
|
-
255,
|
|
1166
|
-
16,
|
|
1167
|
-
132,
|
|
1168
|
-
4,
|
|
1169
|
-
142,
|
|
1170
|
-
123,
|
|
1171
|
-
216,
|
|
1172
|
-
219,
|
|
1173
|
-
233,
|
|
1174
|
-
248,
|
|
1175
|
-
89
|
|
1176
|
-
];
|
|
818
|
+
type: {
|
|
819
|
+
option: {
|
|
820
|
+
defined: {
|
|
821
|
+
name: "transferType";
|
|
822
|
+
};
|
|
1177
823
|
};
|
|
1178
824
|
};
|
|
1179
825
|
},
|
|
826
|
+
{
|
|
827
|
+
name: "remainingAccountsIndices";
|
|
828
|
+
type: "bytes";
|
|
829
|
+
}
|
|
830
|
+
];
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: "operate";
|
|
834
|
+
discriminator: [217, 106, 208, 99, 116, 151, 42, 135];
|
|
835
|
+
accounts: [
|
|
836
|
+
{
|
|
837
|
+
name: "signer";
|
|
838
|
+
writable: true;
|
|
839
|
+
signer: true;
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
name: "signerSupplyTokenAccount";
|
|
843
|
+
writable: true;
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: "signerBorrowTokenAccount";
|
|
847
|
+
writable: true;
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
name: "recipient";
|
|
851
|
+
optional: true;
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
name: "recipientBorrowTokenAccount";
|
|
855
|
+
writable: true;
|
|
856
|
+
optional: true;
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
name: "recipientSupplyTokenAccount";
|
|
860
|
+
writable: true;
|
|
861
|
+
optional: true;
|
|
862
|
+
},
|
|
1180
863
|
{
|
|
1181
864
|
name: "vaultConfig";
|
|
1182
865
|
docs: [
|
|
@@ -1282,6 +965,7 @@ type Vaults = {
|
|
|
1282
965
|
},
|
|
1283
966
|
{
|
|
1284
967
|
name: "associatedTokenProgram";
|
|
968
|
+
optional: true;
|
|
1285
969
|
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
1286
970
|
},
|
|
1287
971
|
{
|
|
@@ -1327,116 +1011,10 @@ type Vaults = {
|
|
|
1327
1011
|
{
|
|
1328
1012
|
name: "rebalancerSupplyTokenAccount";
|
|
1329
1013
|
writable: true;
|
|
1330
|
-
pda: {
|
|
1331
|
-
seeds: [
|
|
1332
|
-
{
|
|
1333
|
-
kind: "account";
|
|
1334
|
-
path: "rebalancer";
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
kind: "account";
|
|
1338
|
-
path: "supplyTokenProgram";
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
kind: "account";
|
|
1342
|
-
path: "supplyToken";
|
|
1343
|
-
}
|
|
1344
|
-
];
|
|
1345
|
-
program: {
|
|
1346
|
-
kind: "const";
|
|
1347
|
-
value: [
|
|
1348
|
-
140,
|
|
1349
|
-
151,
|
|
1350
|
-
37,
|
|
1351
|
-
143,
|
|
1352
|
-
78,
|
|
1353
|
-
36,
|
|
1354
|
-
137,
|
|
1355
|
-
241,
|
|
1356
|
-
187,
|
|
1357
|
-
61,
|
|
1358
|
-
16,
|
|
1359
|
-
41,
|
|
1360
|
-
20,
|
|
1361
|
-
142,
|
|
1362
|
-
13,
|
|
1363
|
-
131,
|
|
1364
|
-
11,
|
|
1365
|
-
90,
|
|
1366
|
-
19,
|
|
1367
|
-
153,
|
|
1368
|
-
218,
|
|
1369
|
-
255,
|
|
1370
|
-
16,
|
|
1371
|
-
132,
|
|
1372
|
-
4,
|
|
1373
|
-
142,
|
|
1374
|
-
123,
|
|
1375
|
-
216,
|
|
1376
|
-
219,
|
|
1377
|
-
233,
|
|
1378
|
-
248,
|
|
1379
|
-
89
|
|
1380
|
-
];
|
|
1381
|
-
};
|
|
1382
|
-
};
|
|
1383
1014
|
},
|
|
1384
1015
|
{
|
|
1385
1016
|
name: "rebalancerBorrowTokenAccount";
|
|
1386
1017
|
writable: true;
|
|
1387
|
-
pda: {
|
|
1388
|
-
seeds: [
|
|
1389
|
-
{
|
|
1390
|
-
kind: "account";
|
|
1391
|
-
path: "rebalancer";
|
|
1392
|
-
},
|
|
1393
|
-
{
|
|
1394
|
-
kind: "account";
|
|
1395
|
-
path: "borrowTokenProgram";
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
kind: "account";
|
|
1399
|
-
path: "borrowToken";
|
|
1400
|
-
}
|
|
1401
|
-
];
|
|
1402
|
-
program: {
|
|
1403
|
-
kind: "const";
|
|
1404
|
-
value: [
|
|
1405
|
-
140,
|
|
1406
|
-
151,
|
|
1407
|
-
37,
|
|
1408
|
-
143,
|
|
1409
|
-
78,
|
|
1410
|
-
36,
|
|
1411
|
-
137,
|
|
1412
|
-
241,
|
|
1413
|
-
187,
|
|
1414
|
-
61,
|
|
1415
|
-
16,
|
|
1416
|
-
41,
|
|
1417
|
-
20,
|
|
1418
|
-
142,
|
|
1419
|
-
13,
|
|
1420
|
-
131,
|
|
1421
|
-
11,
|
|
1422
|
-
90,
|
|
1423
|
-
19,
|
|
1424
|
-
153,
|
|
1425
|
-
218,
|
|
1426
|
-
255,
|
|
1427
|
-
16,
|
|
1428
|
-
132,
|
|
1429
|
-
4,
|
|
1430
|
-
142,
|
|
1431
|
-
123,
|
|
1432
|
-
216,
|
|
1433
|
-
219,
|
|
1434
|
-
233,
|
|
1435
|
-
248,
|
|
1436
|
-
89
|
|
1437
|
-
];
|
|
1438
|
-
};
|
|
1439
|
-
};
|
|
1440
1018
|
},
|
|
1441
1019
|
{
|
|
1442
1020
|
name: "vaultConfig";
|
|
@@ -1507,11 +1085,118 @@ type Vaults = {
|
|
|
1507
1085
|
},
|
|
1508
1086
|
{
|
|
1509
1087
|
name: "associatedTokenProgram";
|
|
1088
|
+
optional: true;
|
|
1510
1089
|
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
1511
1090
|
}
|
|
1512
1091
|
];
|
|
1513
1092
|
args: [];
|
|
1514
1093
|
},
|
|
1094
|
+
{
|
|
1095
|
+
name: "rebalanceWithAmounts";
|
|
1096
|
+
discriminator: [190, 33, 144, 182, 86, 4, 141, 73];
|
|
1097
|
+
accounts: [
|
|
1098
|
+
{
|
|
1099
|
+
name: "rebalancer";
|
|
1100
|
+
writable: true;
|
|
1101
|
+
signer: true;
|
|
1102
|
+
relations: ["vaultConfig"];
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
name: "rebalancerSupplyTokenAccount";
|
|
1106
|
+
writable: true;
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
name: "rebalancerBorrowTokenAccount";
|
|
1110
|
+
writable: true;
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
name: "vaultConfig";
|
|
1114
|
+
docs: [
|
|
1115
|
+
"@dev mut because this PDA signs the CPI to liquidity program",
|
|
1116
|
+
"@dev verification inside instruction logic"
|
|
1117
|
+
];
|
|
1118
|
+
writable: true;
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
name: "vaultState";
|
|
1122
|
+
docs: ["@dev verification inside instruction logic"];
|
|
1123
|
+
writable: true;
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
name: "supplyToken";
|
|
1127
|
+
relations: ["vaultConfig"];
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
name: "borrowToken";
|
|
1131
|
+
relations: ["vaultConfig"];
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "supplyTokenReservesLiquidity";
|
|
1135
|
+
writable: true;
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
name: "borrowTokenReservesLiquidity";
|
|
1139
|
+
writable: true;
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
name: "vaultSupplyPositionOnLiquidity";
|
|
1143
|
+
writable: true;
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: "vaultBorrowPositionOnLiquidity";
|
|
1147
|
+
writable: true;
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: "supplyRateModel";
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
name: "borrowRateModel";
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
name: "liquidity";
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
name: "liquidityProgram";
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: "vaultSupplyTokenAccount";
|
|
1163
|
+
writable: true;
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
name: "vaultBorrowTokenAccount";
|
|
1167
|
+
writable: true;
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: "systemProgram";
|
|
1171
|
+
address: "11111111111111111111111111111111";
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: "supplyTokenProgram";
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
name: "borrowTokenProgram";
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
name: "associatedTokenProgram";
|
|
1181
|
+
optional: true;
|
|
1182
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
1183
|
+
}
|
|
1184
|
+
];
|
|
1185
|
+
args: [
|
|
1186
|
+
{
|
|
1187
|
+
name: "supplyAmount";
|
|
1188
|
+
type: {
|
|
1189
|
+
option: "u128";
|
|
1190
|
+
};
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
name: "borrowAmount";
|
|
1194
|
+
type: {
|
|
1195
|
+
option: "u128";
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
];
|
|
1199
|
+
},
|
|
1515
1200
|
{
|
|
1516
1201
|
name: "updateAuthority";
|
|
1517
1202
|
discriminator: [32, 46, 64, 28, 149, 75, 243, 88];
|
|
@@ -3327,6 +3012,9 @@ type Vaults = {
|
|
|
3327
3012
|
},
|
|
3328
3013
|
{
|
|
3329
3014
|
name: "chainlinkDataStreams";
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
name: "pstPool";
|
|
3330
3018
|
}
|
|
3331
3019
|
];
|
|
3332
3020
|
};
|
|
@@ -3760,7 +3448,11 @@ type Vaults = {
|
|
|
3760
3448
|
},
|
|
3761
3449
|
{
|
|
3762
3450
|
name: "withdrawalLimit";
|
|
3763
|
-
type: "
|
|
3451
|
+
type: "u64";
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
name: "decayAmount";
|
|
3455
|
+
type: "u64";
|
|
3764
3456
|
},
|
|
3765
3457
|
{
|
|
3766
3458
|
name: "lastUpdate";
|
|
@@ -3772,7 +3464,11 @@ type Vaults = {
|
|
|
3772
3464
|
},
|
|
3773
3465
|
{
|
|
3774
3466
|
name: "expandDuration";
|
|
3775
|
-
type: "
|
|
3467
|
+
type: "u32";
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
name: "decayDuration";
|
|
3471
|
+
type: "u32";
|
|
3776
3472
|
},
|
|
3777
3473
|
{
|
|
3778
3474
|
name: "baseWithdrawalLimit";
|
|
@@ -4022,6 +3718,7 @@ type OperateParams = {
|
|
|
4022
3718
|
recipient?: PublicKey;
|
|
4023
3719
|
positionOwner?: PublicKey;
|
|
4024
3720
|
market?: "main" | "ethena";
|
|
3721
|
+
includeATASetup?: boolean;
|
|
4025
3722
|
} & Omit<ConnectionParams, "market">;
|
|
4026
3723
|
declare function getOperateContext({ vaultId, positionId, program, connection, signer, positionOwner, colAmount: newCol, debtAmount: newDebt, recipient, market, }: OperateContextParams): Promise<{
|
|
4027
3724
|
nftId: number;
|
|
@@ -4059,7 +3756,6 @@ declare function getOperateContext({ vaultId, positionId, program, connection, s
|
|
|
4059
3756
|
oracleProgram: PublicKey;
|
|
4060
3757
|
supplyTokenProgram: PublicKey;
|
|
4061
3758
|
borrowTokenProgram: PublicKey;
|
|
4062
|
-
associatedTokenProgram: PublicKey;
|
|
4063
3759
|
systemProgram: PublicKey;
|
|
4064
3760
|
};
|
|
4065
3761
|
remainingAccounts: {
|
|
@@ -4097,7 +3793,7 @@ declare function getInitPositionContext(vaultId: number, positionId: number, sig
|
|
|
4097
3793
|
metadataProgram: PublicKey;
|
|
4098
3794
|
rent: PublicKey;
|
|
4099
3795
|
};
|
|
4100
|
-
declare const getOperateIx: ({ vaultId, positionId, colAmount, debtAmount, connection, signer, recipient, positionOwner, market, }: OperateParams) => Promise<{
|
|
3796
|
+
declare const getOperateIx: ({ vaultId, positionId, colAmount, debtAmount, connection, signer, recipient, positionOwner, market, includeATASetup, }: OperateParams) => Promise<{
|
|
4101
3797
|
nftId: number;
|
|
4102
3798
|
accounts: {
|
|
4103
3799
|
signer: PublicKey;
|
|
@@ -4133,7 +3829,6 @@ declare const getOperateIx: ({ vaultId, positionId, colAmount, debtAmount, conne
|
|
|
4133
3829
|
oracleProgram: PublicKey;
|
|
4134
3830
|
supplyTokenProgram: PublicKey;
|
|
4135
3831
|
borrowTokenProgram: PublicKey;
|
|
4136
|
-
associatedTokenProgram: PublicKey;
|
|
4137
3832
|
systemProgram: PublicKey;
|
|
4138
3833
|
};
|
|
4139
3834
|
remainingAccounts: {
|
|
@@ -4152,6 +3847,7 @@ type LiquidateParams = {
|
|
|
4152
3847
|
colPerUnitDebt?: BN__default;
|
|
4153
3848
|
absorb?: boolean;
|
|
4154
3849
|
to?: PublicKey;
|
|
3850
|
+
includeATASetup?: boolean;
|
|
4155
3851
|
} & ConnectionParams;
|
|
4156
3852
|
type LiquidateContextParams = {
|
|
4157
3853
|
vaultId: number;
|
|
@@ -4188,7 +3884,6 @@ declare function getLiquidateContext({ vaultId, to, program, connection, signer,
|
|
|
4188
3884
|
supplyTokenProgram: PublicKey;
|
|
4189
3885
|
borrowTokenProgram: PublicKey;
|
|
4190
3886
|
systemProgram: PublicKey;
|
|
4191
|
-
associatedTokenProgram: PublicKey;
|
|
4192
3887
|
};
|
|
4193
3888
|
remainingAccounts: {
|
|
4194
3889
|
pubkey: PublicKey;
|
|
@@ -4199,7 +3894,7 @@ declare function getLiquidateContext({ vaultId, to, program, connection, signer,
|
|
|
4199
3894
|
remainingAccountsIndices: number[];
|
|
4200
3895
|
lookupTable: PublicKey;
|
|
4201
3896
|
}>;
|
|
4202
|
-
declare const getLiquidateIx: ({ vaultId, debtAmount, colPerUnitDebt, absorb, signer, to, connection, market, }: LiquidateParams) => Promise<{
|
|
3897
|
+
declare const getLiquidateIx: ({ vaultId, debtAmount, colPerUnitDebt, absorb, signer, to, connection, market, includeATASetup, }: LiquidateParams) => Promise<{
|
|
4203
3898
|
accounts: {
|
|
4204
3899
|
signer: PublicKey;
|
|
4205
3900
|
signerTokenAccount: PublicKey;
|
|
@@ -4229,7 +3924,6 @@ declare const getLiquidateIx: ({ vaultId, debtAmount, colPerUnitDebt, absorb, si
|
|
|
4229
3924
|
supplyTokenProgram: PublicKey;
|
|
4230
3925
|
borrowTokenProgram: PublicKey;
|
|
4231
3926
|
systemProgram: PublicKey;
|
|
4232
|
-
associatedTokenProgram: PublicKey;
|
|
4233
3927
|
};
|
|
4234
3928
|
remainingAccounts: {
|
|
4235
3929
|
pubkey: PublicKey;
|