@kamino-finance/klend-sdk 7.2.6-beta.0 → 7.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts +0 -33
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/LendingMarket.js +2 -24
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +1 -1
- package/dist/@codegen/klend/errors/custom.d.ts +2 -26
- package/dist/@codegen/klend/errors/custom.d.ts.map +1 -1
- package/dist/@codegen/klend/errors/custom.js +3 -45
- package/dist/@codegen/klend/errors/custom.js.map +1 -1
- package/dist/@codegen/klend/instructions/index.d.ts +0 -2
- package/dist/@codegen/klend/instructions/index.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/index.js +1 -3
- package/dist/@codegen/klend/instructions/index.js.map +1 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts +1 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initReserve.js +5 -1
- package/dist/@codegen/klend/instructions/initReserve.js.map +1 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js +1 -1
- package/dist/@codegen/klend/types/ReserveConfig.d.ts +24 -58
- package/dist/@codegen/klend/types/ReserveConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveConfig.js +18 -40
- package/dist/@codegen/klend/types/ReserveConfig.js.map +1 -1
- package/dist/@codegen/klend/types/ReserveFees.d.ts +8 -8
- package/dist/@codegen/klend/types/ReserveFees.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveFees.js +8 -8
- package/dist/@codegen/klend/types/ReserveFees.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts +7 -46
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.js +12 -85
- package/dist/@codegen/klend/types/UpdateConfigMode.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts +0 -26
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js +1 -49
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/@codegen/klend/types/index.d.ts +4 -4
- package/dist/@codegen/klend/types/index.d.ts.map +1 -1
- package/dist/@codegen/klend/types/index.js.map +1 -1
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +0 -2
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +4 -0
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +4 -7
- package/dist/classes/reserve.js.map +1 -1
- package/dist/idl/klend.json +59 -129
- package/dist/manager/client_kamino_manager.js +3 -5
- package/dist/manager/client_kamino_manager.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/managerTypes.d.ts +1 -1
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +3 -5
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/seeds.d.ts +5 -5
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +13 -13
- package/dist/utils/seeds.js.map +1 -1
- package/package.json +1 -1
- package/src/@codegen/klend/accounts/LendingMarket.ts +2 -46
- package/src/@codegen/klend/errors/custom.ts +2 -47
- package/src/@codegen/klend/instructions/index.ts +0 -2
- package/src/@codegen/klend/instructions/initReserve.ts +6 -2
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +1 -1
- package/src/@codegen/klend/instructions/withdrawObligationCollateral.ts +1 -1
- package/src/@codegen/klend/instructions/withdrawObligationCollateralV2.ts +1 -1
- package/src/@codegen/klend/types/ReserveConfig.ts +30 -72
- package/src/@codegen/klend/types/ReserveFees.ts +12 -12
- package/src/@codegen/klend/types/UpdateConfigMode.ts +13 -103
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +0 -60
- package/src/@codegen/klend/types/index.ts +2 -12
- package/src/classes/manager.ts +0 -2
- package/src/classes/market.ts +4 -0
- package/src/classes/reserve.ts +5 -7
- package/src/idl/klend.json +60 -130
- package/src/manager/client_kamino_manager.ts +3 -5
- package/src/utils/index.ts +1 -0
- package/src/utils/managerTypes.ts +4 -6
- package/src/utils/seeds.ts +17 -13
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.d.ts +0 -13
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.js +0 -24
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.js.map +0 -1
- package/src/@codegen/klend/instructions/seedDepositOnInitReserve.ts +0 -50
|
@@ -119,25 +119,25 @@ export class UpdateProtocolTakeRate {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export interface
|
|
123
|
-
kind: "
|
|
122
|
+
export interface UpdateFeesBorrowFeeJSON {
|
|
123
|
+
kind: "UpdateFeesBorrowFee"
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
export class
|
|
126
|
+
export class UpdateFeesBorrowFee {
|
|
127
127
|
static readonly discriminator = 5
|
|
128
|
-
static readonly kind = "
|
|
128
|
+
static readonly kind = "UpdateFeesBorrowFee"
|
|
129
129
|
readonly discriminator = 5
|
|
130
|
-
readonly kind = "
|
|
130
|
+
readonly kind = "UpdateFeesBorrowFee"
|
|
131
131
|
|
|
132
|
-
toJSON():
|
|
132
|
+
toJSON(): UpdateFeesBorrowFeeJSON {
|
|
133
133
|
return {
|
|
134
|
-
kind: "
|
|
134
|
+
kind: "UpdateFeesBorrowFee",
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
toEncodable() {
|
|
139
139
|
return {
|
|
140
|
-
|
|
140
|
+
UpdateFeesBorrowFee: {},
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -1154,75 +1154,6 @@ export class UpdateProtocolOrderExecutionFee {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
-
export interface UpdateProposerAuthorityLockJSON {
|
|
1158
|
-
kind: "UpdateProposerAuthorityLock"
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
export class UpdateProposerAuthorityLock {
|
|
1162
|
-
static readonly discriminator = 50
|
|
1163
|
-
static readonly kind = "UpdateProposerAuthorityLock"
|
|
1164
|
-
readonly discriminator = 50
|
|
1165
|
-
readonly kind = "UpdateProposerAuthorityLock"
|
|
1166
|
-
|
|
1167
|
-
toJSON(): UpdateProposerAuthorityLockJSON {
|
|
1168
|
-
return {
|
|
1169
|
-
kind: "UpdateProposerAuthorityLock",
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
toEncodable() {
|
|
1174
|
-
return {
|
|
1175
|
-
UpdateProposerAuthorityLock: {},
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
export interface UpdateMinDeleveragingBonusBpsJSON {
|
|
1181
|
-
kind: "UpdateMinDeleveragingBonusBps"
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
export class UpdateMinDeleveragingBonusBps {
|
|
1185
|
-
static readonly discriminator = 51
|
|
1186
|
-
static readonly kind = "UpdateMinDeleveragingBonusBps"
|
|
1187
|
-
readonly discriminator = 51
|
|
1188
|
-
readonly kind = "UpdateMinDeleveragingBonusBps"
|
|
1189
|
-
|
|
1190
|
-
toJSON(): UpdateMinDeleveragingBonusBpsJSON {
|
|
1191
|
-
return {
|
|
1192
|
-
kind: "UpdateMinDeleveragingBonusBps",
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
toEncodable() {
|
|
1197
|
-
return {
|
|
1198
|
-
UpdateMinDeleveragingBonusBps: {},
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
export interface UpdateBlockCTokenUsageJSON {
|
|
1204
|
-
kind: "UpdateBlockCTokenUsage"
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
export class UpdateBlockCTokenUsage {
|
|
1208
|
-
static readonly discriminator = 52
|
|
1209
|
-
static readonly kind = "UpdateBlockCTokenUsage"
|
|
1210
|
-
readonly discriminator = 52
|
|
1211
|
-
readonly kind = "UpdateBlockCTokenUsage"
|
|
1212
|
-
|
|
1213
|
-
toJSON(): UpdateBlockCTokenUsageJSON {
|
|
1214
|
-
return {
|
|
1215
|
-
kind: "UpdateBlockCTokenUsage",
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
toEncodable() {
|
|
1220
|
-
return {
|
|
1221
|
-
UpdateBlockCTokenUsage: {},
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
1157
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1227
1158
|
export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
1228
1159
|
if (typeof obj !== "object") {
|
|
@@ -1244,8 +1175,8 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
|
1244
1175
|
if ("UpdateProtocolTakeRate" in obj) {
|
|
1245
1176
|
return new UpdateProtocolTakeRate()
|
|
1246
1177
|
}
|
|
1247
|
-
if ("
|
|
1248
|
-
return new
|
|
1178
|
+
if ("UpdateFeesBorrowFee" in obj) {
|
|
1179
|
+
return new UpdateFeesBorrowFee()
|
|
1249
1180
|
}
|
|
1250
1181
|
if ("UpdateFeesFlashLoanFee" in obj) {
|
|
1251
1182
|
return new UpdateFeesFlashLoanFee()
|
|
@@ -1379,15 +1310,6 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
|
1379
1310
|
if ("UpdateProtocolOrderExecutionFee" in obj) {
|
|
1380
1311
|
return new UpdateProtocolOrderExecutionFee()
|
|
1381
1312
|
}
|
|
1382
|
-
if ("UpdateProposerAuthorityLock" in obj) {
|
|
1383
|
-
return new UpdateProposerAuthorityLock()
|
|
1384
|
-
}
|
|
1385
|
-
if ("UpdateMinDeleveragingBonusBps" in obj) {
|
|
1386
|
-
return new UpdateMinDeleveragingBonusBps()
|
|
1387
|
-
}
|
|
1388
|
-
if ("UpdateBlockCTokenUsage" in obj) {
|
|
1389
|
-
return new UpdateBlockCTokenUsage()
|
|
1390
|
-
}
|
|
1391
1313
|
|
|
1392
1314
|
throw new Error("Invalid enum object")
|
|
1393
1315
|
}
|
|
@@ -1411,8 +1333,8 @@ export function fromJSON(
|
|
|
1411
1333
|
case "UpdateProtocolTakeRate": {
|
|
1412
1334
|
return new UpdateProtocolTakeRate()
|
|
1413
1335
|
}
|
|
1414
|
-
case "
|
|
1415
|
-
return new
|
|
1336
|
+
case "UpdateFeesBorrowFee": {
|
|
1337
|
+
return new UpdateFeesBorrowFee()
|
|
1416
1338
|
}
|
|
1417
1339
|
case "UpdateFeesFlashLoanFee": {
|
|
1418
1340
|
return new UpdateFeesFlashLoanFee()
|
|
@@ -1546,15 +1468,6 @@ export function fromJSON(
|
|
|
1546
1468
|
case "UpdateProtocolOrderExecutionFee": {
|
|
1547
1469
|
return new UpdateProtocolOrderExecutionFee()
|
|
1548
1470
|
}
|
|
1549
|
-
case "UpdateProposerAuthorityLock": {
|
|
1550
|
-
return new UpdateProposerAuthorityLock()
|
|
1551
|
-
}
|
|
1552
|
-
case "UpdateMinDeleveragingBonusBps": {
|
|
1553
|
-
return new UpdateMinDeleveragingBonusBps()
|
|
1554
|
-
}
|
|
1555
|
-
case "UpdateBlockCTokenUsage": {
|
|
1556
|
-
return new UpdateBlockCTokenUsage()
|
|
1557
|
-
}
|
|
1558
1471
|
}
|
|
1559
1472
|
}
|
|
1560
1473
|
|
|
@@ -1565,7 +1478,7 @@ export function layout(property?: string) {
|
|
|
1565
1478
|
borsh.struct([], "UpdateLiquidationThresholdPct"),
|
|
1566
1479
|
borsh.struct([], "UpdateProtocolLiquidationFee"),
|
|
1567
1480
|
borsh.struct([], "UpdateProtocolTakeRate"),
|
|
1568
|
-
borsh.struct([], "
|
|
1481
|
+
borsh.struct([], "UpdateFeesBorrowFee"),
|
|
1569
1482
|
borsh.struct([], "UpdateFeesFlashLoanFee"),
|
|
1570
1483
|
borsh.struct([], "DeprecatedUpdateFeesReferralFeeBps"),
|
|
1571
1484
|
borsh.struct([], "UpdateDepositLimit"),
|
|
@@ -1610,9 +1523,6 @@ export function layout(property?: string) {
|
|
|
1610
1523
|
borsh.struct([], "UpdateAutodeleverageEnabled"),
|
|
1611
1524
|
borsh.struct([], "UpdateDeleveragingBonusIncreaseBpsPerDay"),
|
|
1612
1525
|
borsh.struct([], "UpdateProtocolOrderExecutionFee"),
|
|
1613
|
-
borsh.struct([], "UpdateProposerAuthorityLock"),
|
|
1614
|
-
borsh.struct([], "UpdateMinDeleveragingBonusBps"),
|
|
1615
|
-
borsh.struct([], "UpdateBlockCTokenUsage"),
|
|
1616
1526
|
])
|
|
1617
1527
|
if (property !== undefined) {
|
|
1618
1528
|
return ret.replicate(property)
|
|
@@ -579,52 +579,6 @@ export class UpdateObligationOrderCreationEnabled {
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
export interface UpdateProposerAuthorityJSON {
|
|
583
|
-
kind: "UpdateProposerAuthority"
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
export class UpdateProposerAuthority {
|
|
587
|
-
static readonly discriminator = 25
|
|
588
|
-
static readonly kind = "UpdateProposerAuthority"
|
|
589
|
-
readonly discriminator = 25
|
|
590
|
-
readonly kind = "UpdateProposerAuthority"
|
|
591
|
-
|
|
592
|
-
toJSON(): UpdateProposerAuthorityJSON {
|
|
593
|
-
return {
|
|
594
|
-
kind: "UpdateProposerAuthority",
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
toEncodable() {
|
|
599
|
-
return {
|
|
600
|
-
UpdateProposerAuthority: {},
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
export interface UpdatePriceTriggeredLiquidationDisabledJSON {
|
|
606
|
-
kind: "UpdatePriceTriggeredLiquidationDisabled"
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
export class UpdatePriceTriggeredLiquidationDisabled {
|
|
610
|
-
static readonly discriminator = 26
|
|
611
|
-
static readonly kind = "UpdatePriceTriggeredLiquidationDisabled"
|
|
612
|
-
readonly discriminator = 26
|
|
613
|
-
readonly kind = "UpdatePriceTriggeredLiquidationDisabled"
|
|
614
|
-
|
|
615
|
-
toJSON(): UpdatePriceTriggeredLiquidationDisabledJSON {
|
|
616
|
-
return {
|
|
617
|
-
kind: "UpdatePriceTriggeredLiquidationDisabled",
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
toEncodable() {
|
|
622
|
-
return {
|
|
623
|
-
UpdatePriceTriggeredLiquidationDisabled: {},
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
582
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
629
583
|
export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
630
584
|
if (typeof obj !== "object") {
|
|
@@ -706,12 +660,6 @@ export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
|
706
660
|
if ("UpdateObligationOrderCreationEnabled" in obj) {
|
|
707
661
|
return new UpdateObligationOrderCreationEnabled()
|
|
708
662
|
}
|
|
709
|
-
if ("UpdateProposerAuthority" in obj) {
|
|
710
|
-
return new UpdateProposerAuthority()
|
|
711
|
-
}
|
|
712
|
-
if ("UpdatePriceTriggeredLiquidationDisabled" in obj) {
|
|
713
|
-
return new UpdatePriceTriggeredLiquidationDisabled()
|
|
714
|
-
}
|
|
715
663
|
|
|
716
664
|
throw new Error("Invalid enum object")
|
|
717
665
|
}
|
|
@@ -795,12 +743,6 @@ export function fromJSON(
|
|
|
795
743
|
case "UpdateObligationOrderCreationEnabled": {
|
|
796
744
|
return new UpdateObligationOrderCreationEnabled()
|
|
797
745
|
}
|
|
798
|
-
case "UpdateProposerAuthority": {
|
|
799
|
-
return new UpdateProposerAuthority()
|
|
800
|
-
}
|
|
801
|
-
case "UpdatePriceTriggeredLiquidationDisabled": {
|
|
802
|
-
return new UpdatePriceTriggeredLiquidationDisabled()
|
|
803
|
-
}
|
|
804
746
|
}
|
|
805
747
|
}
|
|
806
748
|
|
|
@@ -831,8 +773,6 @@ export function layout(property?: string) {
|
|
|
831
773
|
borsh.struct([], "UpdateObligationOrderExecutionEnabled"),
|
|
832
774
|
borsh.struct([], "UpdateImmutableFlag"),
|
|
833
775
|
borsh.struct([], "UpdateObligationOrderCreationEnabled"),
|
|
834
|
-
borsh.struct([], "UpdateProposerAuthority"),
|
|
835
|
-
borsh.struct([], "UpdatePriceTriggeredLiquidationDisabled"),
|
|
836
776
|
])
|
|
837
777
|
if (property !== undefined) {
|
|
838
778
|
return ret.replicate(property)
|
|
@@ -15,7 +15,7 @@ export type UpdateConfigModeKind =
|
|
|
15
15
|
| UpdateConfigMode.UpdateLiquidationThresholdPct
|
|
16
16
|
| UpdateConfigMode.UpdateProtocolLiquidationFee
|
|
17
17
|
| UpdateConfigMode.UpdateProtocolTakeRate
|
|
18
|
-
| UpdateConfigMode.
|
|
18
|
+
| UpdateConfigMode.UpdateFeesBorrowFee
|
|
19
19
|
| UpdateConfigMode.UpdateFeesFlashLoanFee
|
|
20
20
|
| UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBps
|
|
21
21
|
| UpdateConfigMode.UpdateDepositLimit
|
|
@@ -60,16 +60,13 @@ export type UpdateConfigModeKind =
|
|
|
60
60
|
| UpdateConfigMode.UpdateAutodeleverageEnabled
|
|
61
61
|
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDay
|
|
62
62
|
| UpdateConfigMode.UpdateProtocolOrderExecutionFee
|
|
63
|
-
| UpdateConfigMode.UpdateProposerAuthorityLock
|
|
64
|
-
| UpdateConfigMode.UpdateMinDeleveragingBonusBps
|
|
65
|
-
| UpdateConfigMode.UpdateBlockCTokenUsage
|
|
66
63
|
export type UpdateConfigModeJSON =
|
|
67
64
|
| UpdateConfigMode.UpdateLoanToValuePctJSON
|
|
68
65
|
| UpdateConfigMode.UpdateMaxLiquidationBonusBpsJSON
|
|
69
66
|
| UpdateConfigMode.UpdateLiquidationThresholdPctJSON
|
|
70
67
|
| UpdateConfigMode.UpdateProtocolLiquidationFeeJSON
|
|
71
68
|
| UpdateConfigMode.UpdateProtocolTakeRateJSON
|
|
72
|
-
| UpdateConfigMode.
|
|
69
|
+
| UpdateConfigMode.UpdateFeesBorrowFeeJSON
|
|
73
70
|
| UpdateConfigMode.UpdateFeesFlashLoanFeeJSON
|
|
74
71
|
| UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBpsJSON
|
|
75
72
|
| UpdateConfigMode.UpdateDepositLimitJSON
|
|
@@ -114,9 +111,6 @@ export type UpdateConfigModeJSON =
|
|
|
114
111
|
| UpdateConfigMode.UpdateAutodeleverageEnabledJSON
|
|
115
112
|
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDayJSON
|
|
116
113
|
| UpdateConfigMode.UpdateProtocolOrderExecutionFeeJSON
|
|
117
|
-
| UpdateConfigMode.UpdateProposerAuthorityLockJSON
|
|
118
|
-
| UpdateConfigMode.UpdateMinDeleveragingBonusBpsJSON
|
|
119
|
-
| UpdateConfigMode.UpdateBlockCTokenUsageJSON
|
|
120
114
|
|
|
121
115
|
export { UpdateLendingMarketConfigValue }
|
|
122
116
|
|
|
@@ -169,8 +163,6 @@ export type UpdateLendingMarketModeKind =
|
|
|
169
163
|
| UpdateLendingMarketMode.UpdateObligationOrderExecutionEnabled
|
|
170
164
|
| UpdateLendingMarketMode.UpdateImmutableFlag
|
|
171
165
|
| UpdateLendingMarketMode.UpdateObligationOrderCreationEnabled
|
|
172
|
-
| UpdateLendingMarketMode.UpdateProposerAuthority
|
|
173
|
-
| UpdateLendingMarketMode.UpdatePriceTriggeredLiquidationDisabled
|
|
174
166
|
export type UpdateLendingMarketModeJSON =
|
|
175
167
|
| UpdateLendingMarketMode.UpdateOwnerJSON
|
|
176
168
|
| UpdateLendingMarketMode.UpdateEmergencyModeJSON
|
|
@@ -197,8 +189,6 @@ export type UpdateLendingMarketModeJSON =
|
|
|
197
189
|
| UpdateLendingMarketMode.UpdateObligationOrderExecutionEnabledJSON
|
|
198
190
|
| UpdateLendingMarketMode.UpdateImmutableFlagJSON
|
|
199
191
|
| UpdateLendingMarketMode.UpdateObligationOrderCreationEnabledJSON
|
|
200
|
-
| UpdateLendingMarketMode.UpdateProposerAuthorityJSON
|
|
201
|
-
| UpdateLendingMarketMode.UpdatePriceTriggeredLiquidationDisabledJSON
|
|
202
192
|
|
|
203
193
|
export { UpdateGlobalConfigMode }
|
|
204
194
|
|
package/src/classes/manager.ts
CHANGED
|
@@ -1706,8 +1706,6 @@ export const MARKET_UPDATER = new ConfigUpdater(UpdateLendingMarketMode.fromDeco
|
|
|
1706
1706
|
[UpdateLendingMarketMode.UpdateInitialDepositAmount.kind]: config.minInitialDepositAmount,
|
|
1707
1707
|
[UpdateLendingMarketMode.UpdateObligationOrderCreationEnabled.kind]: config.obligationOrderCreationEnabled,
|
|
1708
1708
|
[UpdateLendingMarketMode.UpdateObligationOrderExecutionEnabled.kind]: config.obligationOrderExecutionEnabled,
|
|
1709
|
-
[UpdateLendingMarketMode.UpdateProposerAuthority.kind]: config.proposerAuthority,
|
|
1710
|
-
[UpdateLendingMarketMode.UpdatePriceTriggeredLiquidationDisabled.kind]: config.priceTriggeredLiquidationDisabled,
|
|
1711
1709
|
}));
|
|
1712
1710
|
|
|
1713
1711
|
function parseForChangesMarketConfigAndGetIxs(
|
package/src/classes/market.ts
CHANGED
|
@@ -55,6 +55,7 @@ import { parseTokenSymbol, parseZeroPaddedUtf8 } from './utils';
|
|
|
55
55
|
import { ObligationZP } from '../@codegen/klend/zero_padding';
|
|
56
56
|
import { checkDefined } from '../utils/validations';
|
|
57
57
|
import { Buffer } from 'buffer';
|
|
58
|
+
import { ReserveStatus } from '../@codegen/klend/types';
|
|
58
59
|
|
|
59
60
|
export type KaminoMarketRpcApi = GetAccountInfoApi &
|
|
60
61
|
GetMultipleAccountsApi &
|
|
@@ -1714,6 +1715,9 @@ export async function getReservesForMarket(
|
|
|
1714
1715
|
const reservesAndOracles = await getTokenOracleData(rpc, deserializedReserves, oracleAccounts);
|
|
1715
1716
|
const reservesByAddress = new Map<Address, KaminoReserve>();
|
|
1716
1717
|
reservesAndOracles.forEach(([reserve, oracle], index) => {
|
|
1718
|
+
if (reserve.config.status === ReserveStatus.Obsolete.discriminator) {
|
|
1719
|
+
return;
|
|
1720
|
+
}
|
|
1717
1721
|
if (!oracle) {
|
|
1718
1722
|
throw Error(
|
|
1719
1723
|
`Could not find oracle for ${parseTokenSymbol(reserve.config.tokenInfo.name)} (${
|
package/src/classes/reserve.ts
CHANGED
|
@@ -216,7 +216,7 @@ export class KaminoReserve {
|
|
|
216
216
|
* @returns the origination fee percentage of the reserve
|
|
217
217
|
*/
|
|
218
218
|
getBorrowFee = (): Decimal => {
|
|
219
|
-
return new Fraction(this.state.config.fees.
|
|
219
|
+
return new Fraction(this.state.config.fees.borrowFeeSf).toDecimal();
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
/**
|
|
@@ -1180,12 +1180,13 @@ export async function createReserveIxs(
|
|
|
1180
1180
|
|
|
1181
1181
|
const { liquiditySupplyVault, collateralMint, collateralSupplyVault, feeVault } = await reservePdas(
|
|
1182
1182
|
programId,
|
|
1183
|
-
|
|
1183
|
+
lendingMarket,
|
|
1184
|
+
liquidityMint
|
|
1184
1185
|
);
|
|
1185
1186
|
const [lendingMarketAuthority] = await lendingMarketAuthPda(lendingMarket, programId);
|
|
1186
1187
|
|
|
1187
1188
|
const accounts: InitReserveAccounts = {
|
|
1188
|
-
|
|
1189
|
+
lendingMarketOwner: owner,
|
|
1189
1190
|
lendingMarket: lendingMarket,
|
|
1190
1191
|
lendingMarketAuthority: lendingMarketAuthority,
|
|
1191
1192
|
reserve: reserveAddress.address,
|
|
@@ -1238,7 +1239,7 @@ export const RESERVE_CONFIG_UPDATER = new ConfigUpdater(UpdateConfigMode.fromDec
|
|
|
1238
1239
|
[UpdateConfigMode.UpdateLiquidationThresholdPct.kind]: config.liquidationThresholdPct,
|
|
1239
1240
|
[UpdateConfigMode.UpdateProtocolLiquidationFee.kind]: config.protocolLiquidationFeePct,
|
|
1240
1241
|
[UpdateConfigMode.UpdateProtocolTakeRate.kind]: config.protocolTakeRatePct,
|
|
1241
|
-
[UpdateConfigMode.
|
|
1242
|
+
[UpdateConfigMode.UpdateFeesBorrowFee.kind]: config.fees.borrowFeeSf,
|
|
1242
1243
|
[UpdateConfigMode.UpdateFeesFlashLoanFee.kind]: config.fees.flashLoanFeeSf,
|
|
1243
1244
|
[UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBps.kind]: [], // deprecated
|
|
1244
1245
|
[UpdateConfigMode.UpdateDepositLimit.kind]: config.depositLimit,
|
|
@@ -1290,9 +1291,6 @@ export const RESERVE_CONFIG_UPDATER = new ConfigUpdater(UpdateConfigMode.fromDec
|
|
|
1290
1291
|
[UpdateConfigMode.UpdateAutodeleverageEnabled.kind]: config.autodeleverageEnabled,
|
|
1291
1292
|
[UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDay.kind]: config.deleveragingBonusIncreaseBpsPerDay,
|
|
1292
1293
|
[UpdateConfigMode.UpdateProtocolOrderExecutionFee.kind]: config.protocolOrderExecutionFeePct,
|
|
1293
|
-
[UpdateConfigMode.UpdateProposerAuthorityLock.kind]: config.proposerAuthorityLocked,
|
|
1294
|
-
[UpdateConfigMode.UpdateMinDeleveragingBonusBps.kind]: config.minDeleveragingBonusBps,
|
|
1295
|
-
[UpdateConfigMode.UpdateBlockCTokenUsage.kind]: config.blockCtokenUsage,
|
|
1296
1294
|
}));
|
|
1297
1295
|
|
|
1298
1296
|
export async function updateEntireReserveConfigIx(
|