@kamino-finance/klend-sdk 7.2.4 → 7.2.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts +33 -0
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/LendingMarket.js +24 -2
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +1 -1
- package/dist/@codegen/klend/errors/custom.d.ts +26 -2
- package/dist/@codegen/klend/errors/custom.d.ts.map +1 -1
- package/dist/@codegen/klend/errors/custom.js +45 -3
- package/dist/@codegen/klend/errors/custom.js.map +1 -1
- package/dist/@codegen/klend/instructions/index.d.ts +2 -0
- package/dist/@codegen/klend/instructions/index.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/index.js +3 -1
- 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 +1 -5
- package/dist/@codegen/klend/instructions/initReserve.js.map +1 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +1 -1
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.d.ts +13 -0
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.js +24 -0
- package/dist/@codegen/klend/instructions/seedDepositOnInitReserve.js.map +1 -0
- 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 +58 -24
- package/dist/@codegen/klend/types/ReserveConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveConfig.js +40 -18
- 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 +46 -7
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.js +85 -12
- package/dist/@codegen/klend/types/UpdateConfigMode.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts +26 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js +49 -1
- 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 +2 -0
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +7 -4
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/vault.js +1 -1
- package/dist/classes/vault.js.map +1 -1
- package/dist/idl/klend.json +129 -59
- package/dist/manager/client_kamino_manager.js +5 -3
- package/dist/manager/client_kamino_manager.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 +5 -3
- 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 +46 -2
- package/src/@codegen/klend/errors/custom.ts +47 -2
- package/src/@codegen/klend/instructions/index.ts +2 -0
- package/src/@codegen/klend/instructions/initReserve.ts +2 -6
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +1 -1
- package/src/@codegen/klend/instructions/seedDepositOnInitReserve.ts +50 -0
- 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 +72 -30
- package/src/@codegen/klend/types/ReserveFees.ts +12 -12
- package/src/@codegen/klend/types/UpdateConfigMode.ts +103 -13
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +60 -0
- package/src/@codegen/klend/types/index.ts +12 -2
- package/src/classes/manager.ts +2 -0
- package/src/classes/reserve.ts +7 -5
- package/src/classes/vault.ts +1 -1
- package/src/idl/klend.json +130 -60
- package/src/manager/client_kamino_manager.ts +5 -3
- package/src/utils/managerTypes.ts +6 -4
- package/src/utils/seeds.ts +13 -17
|
@@ -119,25 +119,25 @@ export class UpdateProtocolTakeRate {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export interface
|
|
123
|
-
kind: "
|
|
122
|
+
export interface UpdateFeesOriginationFeeJSON {
|
|
123
|
+
kind: "UpdateFeesOriginationFee"
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
export class
|
|
126
|
+
export class UpdateFeesOriginationFee {
|
|
127
127
|
static readonly discriminator = 5
|
|
128
|
-
static readonly kind = "
|
|
128
|
+
static readonly kind = "UpdateFeesOriginationFee"
|
|
129
129
|
readonly discriminator = 5
|
|
130
|
-
readonly kind = "
|
|
130
|
+
readonly kind = "UpdateFeesOriginationFee"
|
|
131
131
|
|
|
132
|
-
toJSON():
|
|
132
|
+
toJSON(): UpdateFeesOriginationFeeJSON {
|
|
133
133
|
return {
|
|
134
|
-
kind: "
|
|
134
|
+
kind: "UpdateFeesOriginationFee",
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
toEncodable() {
|
|
139
139
|
return {
|
|
140
|
-
|
|
140
|
+
UpdateFeesOriginationFee: {},
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -1154,6 +1154,75 @@ 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
|
+
|
|
1157
1226
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1158
1227
|
export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
1159
1228
|
if (typeof obj !== "object") {
|
|
@@ -1175,8 +1244,8 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
|
1175
1244
|
if ("UpdateProtocolTakeRate" in obj) {
|
|
1176
1245
|
return new UpdateProtocolTakeRate()
|
|
1177
1246
|
}
|
|
1178
|
-
if ("
|
|
1179
|
-
return new
|
|
1247
|
+
if ("UpdateFeesOriginationFee" in obj) {
|
|
1248
|
+
return new UpdateFeesOriginationFee()
|
|
1180
1249
|
}
|
|
1181
1250
|
if ("UpdateFeesFlashLoanFee" in obj) {
|
|
1182
1251
|
return new UpdateFeesFlashLoanFee()
|
|
@@ -1310,6 +1379,15 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
|
|
|
1310
1379
|
if ("UpdateProtocolOrderExecutionFee" in obj) {
|
|
1311
1380
|
return new UpdateProtocolOrderExecutionFee()
|
|
1312
1381
|
}
|
|
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
|
+
}
|
|
1313
1391
|
|
|
1314
1392
|
throw new Error("Invalid enum object")
|
|
1315
1393
|
}
|
|
@@ -1333,8 +1411,8 @@ export function fromJSON(
|
|
|
1333
1411
|
case "UpdateProtocolTakeRate": {
|
|
1334
1412
|
return new UpdateProtocolTakeRate()
|
|
1335
1413
|
}
|
|
1336
|
-
case "
|
|
1337
|
-
return new
|
|
1414
|
+
case "UpdateFeesOriginationFee": {
|
|
1415
|
+
return new UpdateFeesOriginationFee()
|
|
1338
1416
|
}
|
|
1339
1417
|
case "UpdateFeesFlashLoanFee": {
|
|
1340
1418
|
return new UpdateFeesFlashLoanFee()
|
|
@@ -1468,6 +1546,15 @@ export function fromJSON(
|
|
|
1468
1546
|
case "UpdateProtocolOrderExecutionFee": {
|
|
1469
1547
|
return new UpdateProtocolOrderExecutionFee()
|
|
1470
1548
|
}
|
|
1549
|
+
case "UpdateProposerAuthorityLock": {
|
|
1550
|
+
return new UpdateProposerAuthorityLock()
|
|
1551
|
+
}
|
|
1552
|
+
case "UpdateMinDeleveragingBonusBps": {
|
|
1553
|
+
return new UpdateMinDeleveragingBonusBps()
|
|
1554
|
+
}
|
|
1555
|
+
case "UpdateBlockCTokenUsage": {
|
|
1556
|
+
return new UpdateBlockCTokenUsage()
|
|
1557
|
+
}
|
|
1471
1558
|
}
|
|
1472
1559
|
}
|
|
1473
1560
|
|
|
@@ -1478,7 +1565,7 @@ export function layout(property?: string) {
|
|
|
1478
1565
|
borsh.struct([], "UpdateLiquidationThresholdPct"),
|
|
1479
1566
|
borsh.struct([], "UpdateProtocolLiquidationFee"),
|
|
1480
1567
|
borsh.struct([], "UpdateProtocolTakeRate"),
|
|
1481
|
-
borsh.struct([], "
|
|
1568
|
+
borsh.struct([], "UpdateFeesOriginationFee"),
|
|
1482
1569
|
borsh.struct([], "UpdateFeesFlashLoanFee"),
|
|
1483
1570
|
borsh.struct([], "DeprecatedUpdateFeesReferralFeeBps"),
|
|
1484
1571
|
borsh.struct([], "UpdateDepositLimit"),
|
|
@@ -1523,6 +1610,9 @@ export function layout(property?: string) {
|
|
|
1523
1610
|
borsh.struct([], "UpdateAutodeleverageEnabled"),
|
|
1524
1611
|
borsh.struct([], "UpdateDeleveragingBonusIncreaseBpsPerDay"),
|
|
1525
1612
|
borsh.struct([], "UpdateProtocolOrderExecutionFee"),
|
|
1613
|
+
borsh.struct([], "UpdateProposerAuthorityLock"),
|
|
1614
|
+
borsh.struct([], "UpdateMinDeleveragingBonusBps"),
|
|
1615
|
+
borsh.struct([], "UpdateBlockCTokenUsage"),
|
|
1526
1616
|
])
|
|
1527
1617
|
if (property !== undefined) {
|
|
1528
1618
|
return ret.replicate(property)
|
|
@@ -579,6 +579,52 @@ 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
|
+
|
|
582
628
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
583
629
|
export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
584
630
|
if (typeof obj !== "object") {
|
|
@@ -660,6 +706,12 @@ export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
|
660
706
|
if ("UpdateObligationOrderCreationEnabled" in obj) {
|
|
661
707
|
return new UpdateObligationOrderCreationEnabled()
|
|
662
708
|
}
|
|
709
|
+
if ("UpdateProposerAuthority" in obj) {
|
|
710
|
+
return new UpdateProposerAuthority()
|
|
711
|
+
}
|
|
712
|
+
if ("UpdatePriceTriggeredLiquidationDisabled" in obj) {
|
|
713
|
+
return new UpdatePriceTriggeredLiquidationDisabled()
|
|
714
|
+
}
|
|
663
715
|
|
|
664
716
|
throw new Error("Invalid enum object")
|
|
665
717
|
}
|
|
@@ -743,6 +795,12 @@ export function fromJSON(
|
|
|
743
795
|
case "UpdateObligationOrderCreationEnabled": {
|
|
744
796
|
return new UpdateObligationOrderCreationEnabled()
|
|
745
797
|
}
|
|
798
|
+
case "UpdateProposerAuthority": {
|
|
799
|
+
return new UpdateProposerAuthority()
|
|
800
|
+
}
|
|
801
|
+
case "UpdatePriceTriggeredLiquidationDisabled": {
|
|
802
|
+
return new UpdatePriceTriggeredLiquidationDisabled()
|
|
803
|
+
}
|
|
746
804
|
}
|
|
747
805
|
}
|
|
748
806
|
|
|
@@ -773,6 +831,8 @@ export function layout(property?: string) {
|
|
|
773
831
|
borsh.struct([], "UpdateObligationOrderExecutionEnabled"),
|
|
774
832
|
borsh.struct([], "UpdateImmutableFlag"),
|
|
775
833
|
borsh.struct([], "UpdateObligationOrderCreationEnabled"),
|
|
834
|
+
borsh.struct([], "UpdateProposerAuthority"),
|
|
835
|
+
borsh.struct([], "UpdatePriceTriggeredLiquidationDisabled"),
|
|
776
836
|
])
|
|
777
837
|
if (property !== undefined) {
|
|
778
838
|
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.UpdateFeesOriginationFee
|
|
19
19
|
| UpdateConfigMode.UpdateFeesFlashLoanFee
|
|
20
20
|
| UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBps
|
|
21
21
|
| UpdateConfigMode.UpdateDepositLimit
|
|
@@ -60,13 +60,16 @@ export type UpdateConfigModeKind =
|
|
|
60
60
|
| UpdateConfigMode.UpdateAutodeleverageEnabled
|
|
61
61
|
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDay
|
|
62
62
|
| UpdateConfigMode.UpdateProtocolOrderExecutionFee
|
|
63
|
+
| UpdateConfigMode.UpdateProposerAuthorityLock
|
|
64
|
+
| UpdateConfigMode.UpdateMinDeleveragingBonusBps
|
|
65
|
+
| UpdateConfigMode.UpdateBlockCTokenUsage
|
|
63
66
|
export type UpdateConfigModeJSON =
|
|
64
67
|
| UpdateConfigMode.UpdateLoanToValuePctJSON
|
|
65
68
|
| UpdateConfigMode.UpdateMaxLiquidationBonusBpsJSON
|
|
66
69
|
| UpdateConfigMode.UpdateLiquidationThresholdPctJSON
|
|
67
70
|
| UpdateConfigMode.UpdateProtocolLiquidationFeeJSON
|
|
68
71
|
| UpdateConfigMode.UpdateProtocolTakeRateJSON
|
|
69
|
-
| UpdateConfigMode.
|
|
72
|
+
| UpdateConfigMode.UpdateFeesOriginationFeeJSON
|
|
70
73
|
| UpdateConfigMode.UpdateFeesFlashLoanFeeJSON
|
|
71
74
|
| UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBpsJSON
|
|
72
75
|
| UpdateConfigMode.UpdateDepositLimitJSON
|
|
@@ -111,6 +114,9 @@ export type UpdateConfigModeJSON =
|
|
|
111
114
|
| UpdateConfigMode.UpdateAutodeleverageEnabledJSON
|
|
112
115
|
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDayJSON
|
|
113
116
|
| UpdateConfigMode.UpdateProtocolOrderExecutionFeeJSON
|
|
117
|
+
| UpdateConfigMode.UpdateProposerAuthorityLockJSON
|
|
118
|
+
| UpdateConfigMode.UpdateMinDeleveragingBonusBpsJSON
|
|
119
|
+
| UpdateConfigMode.UpdateBlockCTokenUsageJSON
|
|
114
120
|
|
|
115
121
|
export { UpdateLendingMarketConfigValue }
|
|
116
122
|
|
|
@@ -163,6 +169,8 @@ export type UpdateLendingMarketModeKind =
|
|
|
163
169
|
| UpdateLendingMarketMode.UpdateObligationOrderExecutionEnabled
|
|
164
170
|
| UpdateLendingMarketMode.UpdateImmutableFlag
|
|
165
171
|
| UpdateLendingMarketMode.UpdateObligationOrderCreationEnabled
|
|
172
|
+
| UpdateLendingMarketMode.UpdateProposerAuthority
|
|
173
|
+
| UpdateLendingMarketMode.UpdatePriceTriggeredLiquidationDisabled
|
|
166
174
|
export type UpdateLendingMarketModeJSON =
|
|
167
175
|
| UpdateLendingMarketMode.UpdateOwnerJSON
|
|
168
176
|
| UpdateLendingMarketMode.UpdateEmergencyModeJSON
|
|
@@ -189,6 +197,8 @@ export type UpdateLendingMarketModeJSON =
|
|
|
189
197
|
| UpdateLendingMarketMode.UpdateObligationOrderExecutionEnabledJSON
|
|
190
198
|
| UpdateLendingMarketMode.UpdateImmutableFlagJSON
|
|
191
199
|
| UpdateLendingMarketMode.UpdateObligationOrderCreationEnabledJSON
|
|
200
|
+
| UpdateLendingMarketMode.UpdateProposerAuthorityJSON
|
|
201
|
+
| UpdateLendingMarketMode.UpdatePriceTriggeredLiquidationDisabledJSON
|
|
192
202
|
|
|
193
203
|
export { UpdateGlobalConfigMode }
|
|
194
204
|
|
package/src/classes/manager.ts
CHANGED
|
@@ -1706,6 +1706,8 @@ 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,
|
|
1709
1711
|
}));
|
|
1710
1712
|
|
|
1711
1713
|
function parseForChangesMarketConfigAndGetIxs(
|
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.originationFeeSf).toDecimal();
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
/**
|
|
@@ -1180,13 +1180,12 @@ export async function createReserveIxs(
|
|
|
1180
1180
|
|
|
1181
1181
|
const { liquiditySupplyVault, collateralMint, collateralSupplyVault, feeVault } = await reservePdas(
|
|
1182
1182
|
programId,
|
|
1183
|
-
|
|
1184
|
-
liquidityMint
|
|
1183
|
+
reserveAddress.address,
|
|
1185
1184
|
);
|
|
1186
1185
|
const [lendingMarketAuthority] = await lendingMarketAuthPda(lendingMarket, programId);
|
|
1187
1186
|
|
|
1188
1187
|
const accounts: InitReserveAccounts = {
|
|
1189
|
-
|
|
1188
|
+
signer: owner,
|
|
1190
1189
|
lendingMarket: lendingMarket,
|
|
1191
1190
|
lendingMarketAuthority: lendingMarketAuthority,
|
|
1192
1191
|
reserve: reserveAddress.address,
|
|
@@ -1239,7 +1238,7 @@ export const RESERVE_CONFIG_UPDATER = new ConfigUpdater(UpdateConfigMode.fromDec
|
|
|
1239
1238
|
[UpdateConfigMode.UpdateLiquidationThresholdPct.kind]: config.liquidationThresholdPct,
|
|
1240
1239
|
[UpdateConfigMode.UpdateProtocolLiquidationFee.kind]: config.protocolLiquidationFeePct,
|
|
1241
1240
|
[UpdateConfigMode.UpdateProtocolTakeRate.kind]: config.protocolTakeRatePct,
|
|
1242
|
-
[UpdateConfigMode.
|
|
1241
|
+
[UpdateConfigMode.UpdateFeesOriginationFee.kind]: config.fees.originationFeeSf,
|
|
1243
1242
|
[UpdateConfigMode.UpdateFeesFlashLoanFee.kind]: config.fees.flashLoanFeeSf,
|
|
1244
1243
|
[UpdateConfigMode.DeprecatedUpdateFeesReferralFeeBps.kind]: [], // deprecated
|
|
1245
1244
|
[UpdateConfigMode.UpdateDepositLimit.kind]: config.depositLimit,
|
|
@@ -1291,6 +1290,9 @@ export const RESERVE_CONFIG_UPDATER = new ConfigUpdater(UpdateConfigMode.fromDec
|
|
|
1291
1290
|
[UpdateConfigMode.UpdateAutodeleverageEnabled.kind]: config.autodeleverageEnabled,
|
|
1292
1291
|
[UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDay.kind]: config.deleveragingBonusIncreaseBpsPerDay,
|
|
1293
1292
|
[UpdateConfigMode.UpdateProtocolOrderExecutionFee.kind]: config.protocolOrderExecutionFeePct,
|
|
1293
|
+
[UpdateConfigMode.UpdateProposerAuthorityLock.kind]: config.proposerAuthorityLocked,
|
|
1294
|
+
[UpdateConfigMode.UpdateMinDeleveragingBonusBps.kind]: config.minDeleveragingBonusBps,
|
|
1295
|
+
[UpdateConfigMode.UpdateBlockCTokenUsage.kind]: config.blockCtokenUsage,
|
|
1294
1296
|
}));
|
|
1295
1297
|
|
|
1296
1298
|
export async function updateEntireReserveConfigIx(
|
package/src/classes/vault.ts
CHANGED
|
@@ -786,7 +786,7 @@ export class KaminoVaultClient {
|
|
|
786
786
|
data: Buffer.from([0]),
|
|
787
787
|
};
|
|
788
788
|
|
|
789
|
-
if (isNaN(+value)) {
|
|
789
|
+
if (isNaN(+value) || value === DEFAULT_PUBLIC_KEY) {
|
|
790
790
|
if (mode.kind === new VaultConfigField.Name().kind) {
|
|
791
791
|
const data = Array.from(this.encodeVaultName(value));
|
|
792
792
|
updateVaultConfigArgs.data = Buffer.from(data);
|