@kamino-finance/klend-sdk 5.2.14 → 5.4.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/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +1 -2
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/manager.d.ts +2 -4
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +29 -20
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +1 -2
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +7 -20
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/reserve.js +14 -14
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/shared.d.ts +2 -2
- package/dist/classes/shared.d.ts.map +1 -1
- package/dist/classes/vault.d.ts +2 -4
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +7 -15
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.js +7 -3
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl.json +310 -48
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +48 -3
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/LendingMarket.js +35 -8
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.d.ts +30 -0
- package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.js +23 -2
- package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
- package/dist/idl_codegen/accounts/Reserve.js +1 -1
- package/dist/idl_codegen/errors/custom.d.ts +33 -1
- package/dist/idl_codegen/errors/custom.d.ts.map +1 -1
- package/dist/idl_codegen/errors/custom.js +57 -1
- package/dist/idl_codegen/errors/custom.js.map +1 -1
- package/dist/idl_codegen/instructions/index.d.ts +7 -3
- package/dist/idl_codegen/instructions/index.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/index.js +7 -3
- package/dist/idl_codegen/instructions/index.js.map +1 -1
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts +2 -5
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/initReferrerTokenState.js +3 -32
- package/dist/idl_codegen/instructions/initReferrerTokenState.js.map +1 -1
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts +12 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js +47 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts +38 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js +159 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +1 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/types/ReserveConfig.d.ts +78 -20
- package/dist/idl_codegen/types/ReserveConfig.d.ts.map +1 -1
- package/dist/idl_codegen/types/ReserveConfig.js +45 -14
- package/dist/idl_codegen/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts +16 -16
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts.map +1 -1
- package/dist/idl_codegen/types/ReserveLiquidity.js +16 -16
- package/dist/idl_codegen/types/ReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts +40 -14
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts.map +1 -1
- package/dist/idl_codegen/types/UpdateConfigMode.js +71 -23
- package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +37 -11
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js +64 -16
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/idl_codegen/types/index.d.ts +4 -4
- package/dist/idl_codegen/types/index.d.ts.map +1 -1
- package/dist/idl_codegen/types/index.js.map +1 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +4 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts.map +1 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.js +10 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -1
- package/dist/pyth/accounts/PriceUpdateV2.d.ts +30 -0
- package/dist/pyth/accounts/PriceUpdateV2.d.ts.map +1 -0
- package/dist/pyth/accounts/PriceUpdateV2.js +104 -0
- package/dist/pyth/accounts/PriceUpdateV2.js.map +1 -0
- package/dist/pyth/accounts/index.d.ts +3 -0
- package/dist/pyth/accounts/index.d.ts.map +1 -0
- package/dist/pyth/accounts/index.js +6 -0
- package/dist/pyth/accounts/index.js.map +1 -0
- package/dist/pyth/types/PriceFeedMessage.d.ts +58 -0
- package/dist/pyth/types/PriceFeedMessage.d.ts.map +1 -0
- package/dist/pyth/types/PriceFeedMessage.js +118 -0
- package/dist/pyth/types/PriceFeedMessage.js.map +1 -0
- package/dist/pyth/types/VerificationLevel.d.ts +45 -0
- package/dist/pyth/types/VerificationLevel.d.ts.map +1 -0
- package/dist/pyth/types/VerificationLevel.js +105 -0
- package/dist/pyth/types/VerificationLevel.js.map +1 -0
- package/dist/pyth/types/index.d.ts +7 -0
- package/dist/pyth/types/index.d.ts.map +1 -0
- package/dist/pyth/types/index.js +31 -0
- package/dist/pyth/types/index.js.map +1 -0
- package/dist/referrals/instructions.d.ts.map +1 -1
- package/dist/referrals/instructions.js +1 -2
- package/dist/referrals/instructions.js.map +1 -1
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +5 -4
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/oracle.d.ts.map +1 -1
- package/dist/utils/oracle.js +9 -14
- package/dist/utils/oracle.js.map +1 -1
- package/dist/utils/rpc.d.ts +2 -1
- package/dist/utils/rpc.d.ts.map +1 -1
- package/dist/utils/rpc.js +8 -6
- package/dist/utils/rpc.js.map +1 -1
- package/package.json +5 -6
- package/src/classes/action.ts +1 -3
- package/src/classes/manager.ts +39 -19
- package/src/classes/market.ts +8 -21
- package/src/classes/reserve.ts +16 -16
- package/src/classes/shared.ts +2 -2
- package/src/classes/vault.ts +10 -14
- package/src/client_kamino_manager.ts +7 -3
- package/src/idl_codegen/accounts/LendingMarket.ts +76 -13
- package/src/idl_codegen/accounts/Obligation.ts +47 -2
- package/src/idl_codegen/accounts/Reserve.ts +1 -1
- package/src/idl_codegen/errors/custom.ts +56 -0
- package/src/idl_codegen/instructions/index.ts +13 -6
- package/src/idl_codegen/instructions/initReferrerTokenState.ts +3 -15
- package/src/idl_codegen/instructions/markObligationForDeleveraging.ts +40 -0
- package/src/idl_codegen/instructions/repayAndWithdrawAndRedeem.ts +177 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +1 -1
- package/src/idl_codegen/programId.ts +1 -1
- package/src/idl_codegen/types/ReserveConfig.ts +100 -28
- package/src/idl_codegen/types/ReserveLiquidity.ts +25 -24
- package/src/idl_codegen/types/UpdateConfigMode.ts +86 -26
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +77 -17
- package/src/idl_codegen/types/index.ts +14 -6
- package/src/idl_codegen/zero_padding/ObligationZP.ts +10 -0
- package/src/pyth/accounts/PriceUpdateV2.ts +110 -0
- package/src/pyth/accounts/index.ts +2 -0
- package/src/pyth/types/PriceFeedMessage.ts +120 -0
- package/src/pyth/types/VerificationLevel.ts +98 -0
- package/src/pyth/types/index.ts +9 -0
- package/src/referrals/instructions.ts +1 -3
- package/src/utils/managerTypes.ts +5 -5
- package/src/utils/oracle.ts +9 -15
- package/src/utils/rpc.ts +8 -5
|
@@ -371,25 +371,48 @@ export class UpdateMinNetValueObligationPostAction {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
export interface
|
|
375
|
-
kind: "
|
|
374
|
+
export interface UpdateMinValueLtvSkipPriorityLiqCheckJSON {
|
|
375
|
+
kind: "UpdateMinValueLtvSkipPriorityLiqCheck"
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
export class
|
|
378
|
+
export class UpdateMinValueLtvSkipPriorityLiqCheck {
|
|
379
379
|
static readonly discriminator = 16
|
|
380
|
-
static readonly kind = "
|
|
380
|
+
static readonly kind = "UpdateMinValueLtvSkipPriorityLiqCheck"
|
|
381
381
|
readonly discriminator = 16
|
|
382
|
-
readonly kind = "
|
|
382
|
+
readonly kind = "UpdateMinValueLtvSkipPriorityLiqCheck"
|
|
383
383
|
|
|
384
|
-
toJSON():
|
|
384
|
+
toJSON(): UpdateMinValueLtvSkipPriorityLiqCheckJSON {
|
|
385
385
|
return {
|
|
386
|
-
kind: "
|
|
386
|
+
kind: "UpdateMinValueLtvSkipPriorityLiqCheck",
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
toEncodable() {
|
|
391
391
|
return {
|
|
392
|
-
|
|
392
|
+
UpdateMinValueLtvSkipPriorityLiqCheck: {},
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export interface UpdateMinValueBfSkipPriorityLiqCheckJSON {
|
|
398
|
+
kind: "UpdateMinValueBfSkipPriorityLiqCheck"
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export class UpdateMinValueBfSkipPriorityLiqCheck {
|
|
402
|
+
static readonly discriminator = 17
|
|
403
|
+
static readonly kind = "UpdateMinValueBfSkipPriorityLiqCheck"
|
|
404
|
+
readonly discriminator = 17
|
|
405
|
+
readonly kind = "UpdateMinValueBfSkipPriorityLiqCheck"
|
|
406
|
+
|
|
407
|
+
toJSON(): UpdateMinValueBfSkipPriorityLiqCheckJSON {
|
|
408
|
+
return {
|
|
409
|
+
kind: "UpdateMinValueBfSkipPriorityLiqCheck",
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
toEncodable() {
|
|
414
|
+
return {
|
|
415
|
+
UpdateMinValueBfSkipPriorityLiqCheck: {},
|
|
393
416
|
}
|
|
394
417
|
}
|
|
395
418
|
}
|
|
@@ -399,9 +422,9 @@ export interface UpdatePaddingFieldsJSON {
|
|
|
399
422
|
}
|
|
400
423
|
|
|
401
424
|
export class UpdatePaddingFields {
|
|
402
|
-
static readonly discriminator =
|
|
425
|
+
static readonly discriminator = 18
|
|
403
426
|
static readonly kind = "UpdatePaddingFields"
|
|
404
|
-
readonly discriminator =
|
|
427
|
+
readonly discriminator = 18
|
|
405
428
|
readonly kind = "UpdatePaddingFields"
|
|
406
429
|
|
|
407
430
|
toJSON(): UpdatePaddingFieldsJSON {
|
|
@@ -422,9 +445,9 @@ export interface UpdateNameJSON {
|
|
|
422
445
|
}
|
|
423
446
|
|
|
424
447
|
export class UpdateName {
|
|
425
|
-
static readonly discriminator =
|
|
448
|
+
static readonly discriminator = 19
|
|
426
449
|
static readonly kind = "UpdateName"
|
|
427
|
-
readonly discriminator =
|
|
450
|
+
readonly discriminator = 19
|
|
428
451
|
readonly kind = "UpdateName"
|
|
429
452
|
|
|
430
453
|
toJSON(): UpdateNameJSON {
|
|
@@ -440,6 +463,29 @@ export class UpdateName {
|
|
|
440
463
|
}
|
|
441
464
|
}
|
|
442
465
|
|
|
466
|
+
export interface UpdateIndividualAutodeleverageMarginCallPeriodSecsJSON {
|
|
467
|
+
kind: "UpdateIndividualAutodeleverageMarginCallPeriodSecs"
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export class UpdateIndividualAutodeleverageMarginCallPeriodSecs {
|
|
471
|
+
static readonly discriminator = 20
|
|
472
|
+
static readonly kind = "UpdateIndividualAutodeleverageMarginCallPeriodSecs"
|
|
473
|
+
readonly discriminator = 20
|
|
474
|
+
readonly kind = "UpdateIndividualAutodeleverageMarginCallPeriodSecs"
|
|
475
|
+
|
|
476
|
+
toJSON(): UpdateIndividualAutodeleverageMarginCallPeriodSecsJSON {
|
|
477
|
+
return {
|
|
478
|
+
kind: "UpdateIndividualAutodeleverageMarginCallPeriodSecs",
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
toEncodable() {
|
|
483
|
+
return {
|
|
484
|
+
UpdateIndividualAutodeleverageMarginCallPeriodSecs: {},
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
443
489
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
444
490
|
export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
445
491
|
if (typeof obj !== "object") {
|
|
@@ -494,8 +540,11 @@ export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
|
494
540
|
if ("UpdateMinNetValueObligationPostAction" in obj) {
|
|
495
541
|
return new UpdateMinNetValueObligationPostAction()
|
|
496
542
|
}
|
|
497
|
-
if ("
|
|
498
|
-
return new
|
|
543
|
+
if ("UpdateMinValueLtvSkipPriorityLiqCheck" in obj) {
|
|
544
|
+
return new UpdateMinValueLtvSkipPriorityLiqCheck()
|
|
545
|
+
}
|
|
546
|
+
if ("UpdateMinValueBfSkipPriorityLiqCheck" in obj) {
|
|
547
|
+
return new UpdateMinValueBfSkipPriorityLiqCheck()
|
|
499
548
|
}
|
|
500
549
|
if ("UpdatePaddingFields" in obj) {
|
|
501
550
|
return new UpdatePaddingFields()
|
|
@@ -503,6 +552,9 @@ export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
|
|
|
503
552
|
if ("UpdateName" in obj) {
|
|
504
553
|
return new UpdateName()
|
|
505
554
|
}
|
|
555
|
+
if ("UpdateIndividualAutodeleverageMarginCallPeriodSecs" in obj) {
|
|
556
|
+
return new UpdateIndividualAutodeleverageMarginCallPeriodSecs()
|
|
557
|
+
}
|
|
506
558
|
|
|
507
559
|
throw new Error("Invalid enum object")
|
|
508
560
|
}
|
|
@@ -559,8 +611,11 @@ export function fromJSON(
|
|
|
559
611
|
case "UpdateMinNetValueObligationPostAction": {
|
|
560
612
|
return new UpdateMinNetValueObligationPostAction()
|
|
561
613
|
}
|
|
562
|
-
case "
|
|
563
|
-
return new
|
|
614
|
+
case "UpdateMinValueLtvSkipPriorityLiqCheck": {
|
|
615
|
+
return new UpdateMinValueLtvSkipPriorityLiqCheck()
|
|
616
|
+
}
|
|
617
|
+
case "UpdateMinValueBfSkipPriorityLiqCheck": {
|
|
618
|
+
return new UpdateMinValueBfSkipPriorityLiqCheck()
|
|
564
619
|
}
|
|
565
620
|
case "UpdatePaddingFields": {
|
|
566
621
|
return new UpdatePaddingFields()
|
|
@@ -568,6 +623,9 @@ export function fromJSON(
|
|
|
568
623
|
case "UpdateName": {
|
|
569
624
|
return new UpdateName()
|
|
570
625
|
}
|
|
626
|
+
case "UpdateIndividualAutodeleverageMarginCallPeriodSecs": {
|
|
627
|
+
return new UpdateIndividualAutodeleverageMarginCallPeriodSecs()
|
|
628
|
+
}
|
|
571
629
|
}
|
|
572
630
|
}
|
|
573
631
|
|
|
@@ -589,9 +647,11 @@ export function layout(property?: string) {
|
|
|
589
647
|
borsh.struct([], "UpdateAutodeleverageEnabled"),
|
|
590
648
|
borsh.struct([], "UpdateBorrowingDisabled"),
|
|
591
649
|
borsh.struct([], "UpdateMinNetValueObligationPostAction"),
|
|
592
|
-
borsh.struct([], "
|
|
650
|
+
borsh.struct([], "UpdateMinValueLtvSkipPriorityLiqCheck"),
|
|
651
|
+
borsh.struct([], "UpdateMinValueBfSkipPriorityLiqCheck"),
|
|
593
652
|
borsh.struct([], "UpdatePaddingFields"),
|
|
594
653
|
borsh.struct([], "UpdateName"),
|
|
654
|
+
borsh.struct([], "UpdateIndividualAutodeleverageMarginCallPeriodSecs"),
|
|
595
655
|
])
|
|
596
656
|
if (property !== undefined) {
|
|
597
657
|
return ret.replicate(property)
|
|
@@ -40,11 +40,11 @@ export type UpdateConfigModeKind =
|
|
|
40
40
|
| UpdateConfigMode.UpdateDepositWithdrawalCapCurrentTotal
|
|
41
41
|
| UpdateConfigMode.UpdateBadDebtLiquidationBonusBps
|
|
42
42
|
| UpdateConfigMode.UpdateMinLiquidationBonusBps
|
|
43
|
-
| UpdateConfigMode.
|
|
43
|
+
| UpdateConfigMode.UpdateDeleveragingMarginCallPeriod
|
|
44
44
|
| UpdateConfigMode.UpdateBorrowFactor
|
|
45
45
|
| UpdateConfigMode.UpdateAssetTier
|
|
46
46
|
| UpdateConfigMode.UpdateElevationGroup
|
|
47
|
-
| UpdateConfigMode.
|
|
47
|
+
| UpdateConfigMode.UpdateDeleveragingThresholdSecsPerBps
|
|
48
48
|
| UpdateConfigMode.DeprecatedUpdateMultiplierSideBoost
|
|
49
49
|
| UpdateConfigMode.DeprecatedUpdateMultiplierTagBoost
|
|
50
50
|
| UpdateConfigMode.UpdateReserveStatus
|
|
@@ -56,6 +56,8 @@ export type UpdateConfigModeKind =
|
|
|
56
56
|
| UpdateConfigMode.UpdateBorrowLimitOutsideElevationGroup
|
|
57
57
|
| UpdateConfigMode.UpdateBorrowLimitsInElevationGroupAgainstThisReserve
|
|
58
58
|
| UpdateConfigMode.UpdateHostFixedInterestRateBps
|
|
59
|
+
| UpdateConfigMode.UpdateAutodeleverageEnabled
|
|
60
|
+
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDay
|
|
59
61
|
export type UpdateConfigModeJSON =
|
|
60
62
|
| UpdateConfigMode.UpdateLoanToValuePctJSON
|
|
61
63
|
| UpdateConfigMode.UpdateMaxLiquidationBonusBpsJSON
|
|
@@ -88,11 +90,11 @@ export type UpdateConfigModeJSON =
|
|
|
88
90
|
| UpdateConfigMode.UpdateDepositWithdrawalCapCurrentTotalJSON
|
|
89
91
|
| UpdateConfigMode.UpdateBadDebtLiquidationBonusBpsJSON
|
|
90
92
|
| UpdateConfigMode.UpdateMinLiquidationBonusBpsJSON
|
|
91
|
-
| UpdateConfigMode.
|
|
93
|
+
| UpdateConfigMode.UpdateDeleveragingMarginCallPeriodJSON
|
|
92
94
|
| UpdateConfigMode.UpdateBorrowFactorJSON
|
|
93
95
|
| UpdateConfigMode.UpdateAssetTierJSON
|
|
94
96
|
| UpdateConfigMode.UpdateElevationGroupJSON
|
|
95
|
-
| UpdateConfigMode.
|
|
97
|
+
| UpdateConfigMode.UpdateDeleveragingThresholdSecsPerBpsJSON
|
|
96
98
|
| UpdateConfigMode.DeprecatedUpdateMultiplierSideBoostJSON
|
|
97
99
|
| UpdateConfigMode.DeprecatedUpdateMultiplierTagBoostJSON
|
|
98
100
|
| UpdateConfigMode.UpdateReserveStatusJSON
|
|
@@ -104,6 +106,8 @@ export type UpdateConfigModeJSON =
|
|
|
104
106
|
| UpdateConfigMode.UpdateBorrowLimitOutsideElevationGroupJSON
|
|
105
107
|
| UpdateConfigMode.UpdateBorrowLimitsInElevationGroupAgainstThisReserveJSON
|
|
106
108
|
| UpdateConfigMode.UpdateHostFixedInterestRateBpsJSON
|
|
109
|
+
| UpdateConfigMode.UpdateAutodeleverageEnabledJSON
|
|
110
|
+
| UpdateConfigMode.UpdateDeleveragingBonusIncreaseBpsPerDayJSON
|
|
107
111
|
|
|
108
112
|
export { UpdateLendingMarketConfigValue }
|
|
109
113
|
|
|
@@ -147,9 +151,11 @@ export type UpdateLendingMarketModeKind =
|
|
|
147
151
|
| UpdateLendingMarketMode.UpdateAutodeleverageEnabled
|
|
148
152
|
| UpdateLendingMarketMode.UpdateBorrowingDisabled
|
|
149
153
|
| UpdateLendingMarketMode.UpdateMinNetValueObligationPostAction
|
|
150
|
-
| UpdateLendingMarketMode.
|
|
154
|
+
| UpdateLendingMarketMode.UpdateMinValueLtvSkipPriorityLiqCheck
|
|
155
|
+
| UpdateLendingMarketMode.UpdateMinValueBfSkipPriorityLiqCheck
|
|
151
156
|
| UpdateLendingMarketMode.UpdatePaddingFields
|
|
152
157
|
| UpdateLendingMarketMode.UpdateName
|
|
158
|
+
| UpdateLendingMarketMode.UpdateIndividualAutodeleverageMarginCallPeriodSecs
|
|
153
159
|
export type UpdateLendingMarketModeJSON =
|
|
154
160
|
| UpdateLendingMarketMode.UpdateOwnerJSON
|
|
155
161
|
| UpdateLendingMarketMode.UpdateEmergencyModeJSON
|
|
@@ -167,9 +173,11 @@ export type UpdateLendingMarketModeJSON =
|
|
|
167
173
|
| UpdateLendingMarketMode.UpdateAutodeleverageEnabledJSON
|
|
168
174
|
| UpdateLendingMarketMode.UpdateBorrowingDisabledJSON
|
|
169
175
|
| UpdateLendingMarketMode.UpdateMinNetValueObligationPostActionJSON
|
|
170
|
-
| UpdateLendingMarketMode.
|
|
176
|
+
| UpdateLendingMarketMode.UpdateMinValueLtvSkipPriorityLiqCheckJSON
|
|
177
|
+
| UpdateLendingMarketMode.UpdateMinValueBfSkipPriorityLiqCheckJSON
|
|
171
178
|
| UpdateLendingMarketMode.UpdatePaddingFieldsJSON
|
|
172
179
|
| UpdateLendingMarketMode.UpdateNameJSON
|
|
180
|
+
| UpdateLendingMarketMode.UpdateIndividualAutodeleverageMarginCallPeriodSecsJSON
|
|
173
181
|
|
|
174
182
|
export { LastUpdate } from "./LastUpdate"
|
|
175
183
|
export type { LastUpdateFields, LastUpdateJSON } from "./LastUpdate"
|
|
@@ -48,8 +48,12 @@ export class ObligationZP {
|
|
|
48
48
|
readonly referrer: PublicKey
|
|
49
49
|
/** Marked = 1 if borrowing disabled, 0 = borrowing enabled */
|
|
50
50
|
readonly borrowingDisabled: number
|
|
51
|
+
/** A target LTV set by the risk council when marking this obligation for deleveraging. Only effective when `deleveraging_margin_call_started_slot != 0`. */
|
|
52
|
+
readonly autodeleverageTargetLtvPct: number
|
|
51
53
|
reserved: Array<BN> = new Array(0)
|
|
52
54
|
highestBorrowFactorPct: BN
|
|
55
|
+
/** A timestamp at which the risk council most-recently marked this obligation for deleveraging. Zero if not currently subject to deleveraging. */
|
|
56
|
+
readonly autodeleverageMarginCallStartedTimestamp: BN
|
|
53
57
|
padding3: Array<BN> = new Array(0)
|
|
54
58
|
|
|
55
59
|
static readonly layout = borsh.struct([
|
|
@@ -72,8 +76,10 @@ export class ObligationZP {
|
|
|
72
76
|
borsh.u8("hasDebt"),
|
|
73
77
|
borsh.publicKey("referrer"),
|
|
74
78
|
borsh.u8("borrowingDisabled"),
|
|
79
|
+
borsh.u8("autodeleverageTargetLtvPct"),
|
|
75
80
|
borsh.array(borsh.u8(), 7, "reserved"),
|
|
76
81
|
borsh.u64("highestBorrowFactorPct"),
|
|
82
|
+
borsh.u64("autodeleverageMarginCallStartedTimestamp"),
|
|
77
83
|
])
|
|
78
84
|
|
|
79
85
|
constructor(fields: ObligationFields) {
|
|
@@ -102,8 +108,10 @@ export class ObligationZP {
|
|
|
102
108
|
this.hasDebt = fields.hasDebt
|
|
103
109
|
this.referrer = fields.referrer
|
|
104
110
|
this.borrowingDisabled = fields.borrowingDisabled
|
|
111
|
+
this.autodeleverageTargetLtvPct = fields.autodeleverageTargetLtvPct
|
|
105
112
|
this.reserved = new Array<BN>(0);
|
|
106
113
|
this.highestBorrowFactorPct = fields.highestBorrowFactorPct
|
|
114
|
+
this.autodeleverageMarginCallStartedTimestamp = fields.autodeleverageMarginCallStartedTimestamp
|
|
107
115
|
this.padding3 = new Array<BN>(0);
|
|
108
116
|
}
|
|
109
117
|
|
|
@@ -178,7 +186,9 @@ export class ObligationZP {
|
|
|
178
186
|
hasDebt: dec.hasDebt,
|
|
179
187
|
referrer: dec.referrer,
|
|
180
188
|
borrowingDisabled: dec.borrowingDisabled,
|
|
189
|
+
autodeleverageTargetLtvPct: dec.autodeleverageTargetLtvPct,
|
|
181
190
|
highestBorrowFactorPct: dec.highestBorrowFactorPct,
|
|
191
|
+
autodeleverageMarginCallStartedTimestamp: dec.autodeleverageMarginCallStartedTimestamp,
|
|
182
192
|
reserved: [],
|
|
183
193
|
padding3: [],
|
|
184
194
|
})
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { PublicKey, Connection } from '@solana/web3.js';
|
|
2
|
+
import BN from 'bn.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import * as borsh from '@coral-xyz/borsh'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
import * as types from '../types';
|
|
5
|
+
|
|
6
|
+
export const PYTH_RECEIVER_PROGRAM_ID = new PublicKey('rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ');
|
|
7
|
+
|
|
8
|
+
export interface PriceUpdateV2Fields {
|
|
9
|
+
writeAuthority: PublicKey;
|
|
10
|
+
verificationLevel: types.VerificationLevelKind;
|
|
11
|
+
priceMessage: types.PriceFeedMessageFields;
|
|
12
|
+
postedSlot: BN;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PriceUpdateV2JSON {
|
|
16
|
+
writeAuthority: string;
|
|
17
|
+
verificationLevel: types.VerificationLevelJSON;
|
|
18
|
+
priceMessage: types.PriceFeedMessageJSON;
|
|
19
|
+
postedSlot: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class PriceUpdateV2 {
|
|
23
|
+
readonly writeAuthority: PublicKey;
|
|
24
|
+
readonly verificationLevel: types.VerificationLevelKind;
|
|
25
|
+
readonly priceMessage: types.PriceFeedMessage;
|
|
26
|
+
readonly postedSlot: BN;
|
|
27
|
+
|
|
28
|
+
// static readonly discriminator = Buffer.from([
|
|
29
|
+
// 43, 242, 204, 202, 26, 247, 59, 127,
|
|
30
|
+
// ])
|
|
31
|
+
|
|
32
|
+
static readonly layout = borsh.struct([
|
|
33
|
+
borsh.publicKey('writeAuthority'),
|
|
34
|
+
borsh.u8('verificationLevel'),
|
|
35
|
+
types.PriceFeedMessage.layout('priceMessage'),
|
|
36
|
+
borsh.u64('postedSlot'),
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
constructor(fields: PriceUpdateV2Fields) {
|
|
40
|
+
this.writeAuthority = fields.writeAuthority;
|
|
41
|
+
this.verificationLevel = fields.verificationLevel;
|
|
42
|
+
this.priceMessage = new types.PriceFeedMessage({ ...fields.priceMessage });
|
|
43
|
+
this.postedSlot = fields.postedSlot;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static async fetch(
|
|
47
|
+
c: Connection,
|
|
48
|
+
address: PublicKey,
|
|
49
|
+
programId: PublicKey = PYTH_RECEIVER_PROGRAM_ID
|
|
50
|
+
): Promise<PriceUpdateV2 | null> {
|
|
51
|
+
const info = await c.getAccountInfo(address);
|
|
52
|
+
|
|
53
|
+
if (info === null) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
if (!info.owner.equals(programId)) {
|
|
57
|
+
throw new Error("account doesn't belong to this program");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return this.decode(info.data);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static async fetchMultiple(
|
|
64
|
+
c: Connection,
|
|
65
|
+
addresses: PublicKey[],
|
|
66
|
+
programId: PublicKey = PYTH_RECEIVER_PROGRAM_ID
|
|
67
|
+
): Promise<Array<PriceUpdateV2 | null>> {
|
|
68
|
+
const infos = await c.getMultipleAccountsInfo(addresses);
|
|
69
|
+
|
|
70
|
+
return infos.map((info) => {
|
|
71
|
+
if (info === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
if (!info.owner.equals(programId)) {
|
|
75
|
+
throw new Error("account doesn't belong to this program");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return this.decode(info.data);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static decode(data: Buffer): PriceUpdateV2 {
|
|
83
|
+
const dec = PriceUpdateV2.layout.decode(data.slice(8));
|
|
84
|
+
|
|
85
|
+
return new PriceUpdateV2({
|
|
86
|
+
writeAuthority: dec.writeAuthority,
|
|
87
|
+
verificationLevel: dec.verificationLevel,
|
|
88
|
+
priceMessage: types.PriceFeedMessage.fromDecoded(dec.priceMessage),
|
|
89
|
+
postedSlot: dec.postedSlot,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
toJSON(): PriceUpdateV2JSON {
|
|
94
|
+
return {
|
|
95
|
+
writeAuthority: this.writeAuthority.toString(),
|
|
96
|
+
verificationLevel: this.verificationLevel.toJSON(),
|
|
97
|
+
priceMessage: this.priceMessage.toJSON(),
|
|
98
|
+
postedSlot: this.postedSlot.toString(),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static fromJSON(obj: PriceUpdateV2JSON): PriceUpdateV2 {
|
|
103
|
+
return new PriceUpdateV2({
|
|
104
|
+
writeAuthority: new PublicKey(obj.writeAuthority),
|
|
105
|
+
verificationLevel: types.VerificationLevel.fromJSON(obj.verificationLevel),
|
|
106
|
+
priceMessage: types.PriceFeedMessage.fromJSON(obj.priceMessage),
|
|
107
|
+
postedSlot: new BN(obj.postedSlot),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import BN from 'bn.js';
|
|
2
|
+
import * as borsh from '@coral-xyz/borsh';
|
|
3
|
+
|
|
4
|
+
export interface PriceFeedMessageFields {
|
|
5
|
+
feedId: number[];
|
|
6
|
+
price: BN;
|
|
7
|
+
conf: BN;
|
|
8
|
+
exponent: number;
|
|
9
|
+
publishTime: BN;
|
|
10
|
+
prevPublishTime: BN;
|
|
11
|
+
emaPrice: BN;
|
|
12
|
+
emaConf: BN;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PriceFeedMessageJSON {
|
|
16
|
+
feedId: number[];
|
|
17
|
+
price: string;
|
|
18
|
+
conf: string;
|
|
19
|
+
exponent: number;
|
|
20
|
+
publishTime: string;
|
|
21
|
+
prevPublishTime: string;
|
|
22
|
+
emaPrice: string;
|
|
23
|
+
emaConf: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Reserve Withdrawal Caps State */
|
|
27
|
+
export class PriceFeedMessage {
|
|
28
|
+
readonly feedId: number[];
|
|
29
|
+
readonly price: BN;
|
|
30
|
+
readonly conf: BN;
|
|
31
|
+
readonly exponent: number;
|
|
32
|
+
readonly publishTime: BN;
|
|
33
|
+
readonly prevPublishTime: BN;
|
|
34
|
+
readonly emaPrice: BN;
|
|
35
|
+
readonly emaConf: BN;
|
|
36
|
+
|
|
37
|
+
constructor(fields: PriceFeedMessageFields) {
|
|
38
|
+
this.feedId = fields.feedId;
|
|
39
|
+
this.price = fields.price;
|
|
40
|
+
this.conf = fields.conf;
|
|
41
|
+
this.exponent = fields.exponent;
|
|
42
|
+
this.publishTime = fields.publishTime;
|
|
43
|
+
this.prevPublishTime = fields.prevPublishTime;
|
|
44
|
+
this.emaPrice = fields.emaPrice;
|
|
45
|
+
this.emaConf = fields.emaConf;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static layout(property?: string) {
|
|
49
|
+
return borsh.struct(
|
|
50
|
+
[
|
|
51
|
+
borsh.array(borsh.u8(), 32, 'feedId'),
|
|
52
|
+
borsh.i64('price'),
|
|
53
|
+
borsh.u64('conf'),
|
|
54
|
+
borsh.i32('exponent'),
|
|
55
|
+
borsh.i64('publishTime'),
|
|
56
|
+
borsh.i64('prevPublishTime'),
|
|
57
|
+
borsh.i64('emaPrice'),
|
|
58
|
+
borsh.u64('emaConf'),
|
|
59
|
+
],
|
|
60
|
+
property
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
static fromDecoded(obj: any) {
|
|
66
|
+
return new PriceFeedMessage({
|
|
67
|
+
feedId: obj.feedId,
|
|
68
|
+
price: obj.price,
|
|
69
|
+
conf: obj.conf,
|
|
70
|
+
exponent: obj.exponent,
|
|
71
|
+
publishTime: obj.publishTime,
|
|
72
|
+
prevPublishTime: obj.prevPublishTime,
|
|
73
|
+
emaPrice: obj.emaPrice,
|
|
74
|
+
emaConf: obj.emaConf,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static toEncodable(fields: PriceFeedMessageFields) {
|
|
79
|
+
return {
|
|
80
|
+
feedId: fields.feedId,
|
|
81
|
+
price: fields.price,
|
|
82
|
+
conf: fields.conf,
|
|
83
|
+
exponent: fields.exponent,
|
|
84
|
+
publishTime: fields.publishTime,
|
|
85
|
+
prevPublishTime: fields.prevPublishTime,
|
|
86
|
+
emaPrice: fields.emaPrice,
|
|
87
|
+
emaConf: fields.emaConf,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
toJSON(): PriceFeedMessageJSON {
|
|
92
|
+
return {
|
|
93
|
+
feedId: this.feedId,
|
|
94
|
+
price: this.price.toString(),
|
|
95
|
+
conf: this.conf.toString(),
|
|
96
|
+
exponent: this.exponent,
|
|
97
|
+
publishTime: this.publishTime.toString(),
|
|
98
|
+
prevPublishTime: this.prevPublishTime.toString(),
|
|
99
|
+
emaPrice: this.emaPrice.toString(),
|
|
100
|
+
emaConf: this.emaConf.toString(),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static fromJSON(obj: PriceFeedMessageJSON): PriceFeedMessage {
|
|
105
|
+
return new PriceFeedMessage({
|
|
106
|
+
feedId: obj.feedId,
|
|
107
|
+
price: new BN(obj.price),
|
|
108
|
+
conf: new BN(obj.conf),
|
|
109
|
+
exponent: obj.exponent,
|
|
110
|
+
publishTime: new BN(obj.publishTime),
|
|
111
|
+
prevPublishTime: new BN(obj.prevPublishTime),
|
|
112
|
+
emaPrice: new BN(obj.emaPrice),
|
|
113
|
+
emaConf: new BN(obj.emaConf),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
toEncodable() {
|
|
118
|
+
return PriceFeedMessage.toEncodable(this);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as types from '../types';
|
|
2
|
+
import * as borsh from '@coral-xyz/borsh';
|
|
3
|
+
|
|
4
|
+
export type PartialFields = { numSignatures: number };
|
|
5
|
+
export type PartialValue = { numSignatures: number };
|
|
6
|
+
|
|
7
|
+
export interface PartialJSON {
|
|
8
|
+
kind: 'Partial';
|
|
9
|
+
value: { numSignatures: number };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class Partial {
|
|
13
|
+
static readonly discriminator = 1;
|
|
14
|
+
static readonly kind = 'Partial';
|
|
15
|
+
readonly discriminator = 1;
|
|
16
|
+
readonly kind = 'Partial';
|
|
17
|
+
readonly value: PartialValue;
|
|
18
|
+
|
|
19
|
+
constructor(value: PartialFields) {
|
|
20
|
+
this.value = { numSignatures: value.numSignatures };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
toJSON(): PartialJSON {
|
|
24
|
+
return {
|
|
25
|
+
kind: 'Partial',
|
|
26
|
+
value: {
|
|
27
|
+
numSignatures: this.value.numSignatures,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
toEncodable() {
|
|
33
|
+
return {
|
|
34
|
+
Partial: {
|
|
35
|
+
numSignatures: this.value.numSignatures,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface FullJSON {
|
|
42
|
+
kind: 'Full';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class Full {
|
|
46
|
+
static readonly discriminator = 1;
|
|
47
|
+
static readonly kind = 'Full';
|
|
48
|
+
readonly discriminator = 1;
|
|
49
|
+
readonly kind = 'Full';
|
|
50
|
+
|
|
51
|
+
toJSON(): FullJSON {
|
|
52
|
+
return {
|
|
53
|
+
kind: 'Full',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
toEncodable() {
|
|
58
|
+
return {
|
|
59
|
+
Full: {},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
export function fromDecoded(obj: any): types.VerificationLevelKind {
|
|
66
|
+
if (typeof obj !== 'object') {
|
|
67
|
+
throw new Error('Invalid enum object');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if ('Partial' in obj) {
|
|
71
|
+
return new Partial({ numSignatures: obj.Partial.numSignatures });
|
|
72
|
+
}
|
|
73
|
+
if ('Full' in obj) {
|
|
74
|
+
return new Full();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
throw new Error('Invalid enum object');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function fromJSON(obj: types.VerificationLevelJSON): types.VerificationLevelKind {
|
|
81
|
+
switch (obj.kind) {
|
|
82
|
+
case 'Partial': {
|
|
83
|
+
return new Partial({ numSignatures: obj.value.numSignatures });
|
|
84
|
+
}
|
|
85
|
+
case 'Full': {
|
|
86
|
+
return new Full();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
throw new Error('Invalid enum object');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function layout(property?: string) {
|
|
93
|
+
const ret = borsh.rustEnum([borsh.struct([borsh.u8('numSignatures')], 'Partial'), borsh.struct([], 'Full')]);
|
|
94
|
+
if (property !== undefined) {
|
|
95
|
+
return ret.replicate(property);
|
|
96
|
+
}
|
|
97
|
+
return ret;
|
|
98
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { PriceFeedMessage } from './PriceFeedMessage';
|
|
2
|
+
export type { PriceFeedMessageFields, PriceFeedMessageJSON } from './PriceFeedMessage';
|
|
3
|
+
|
|
4
|
+
import * as VerificationLevel from './VerificationLevel';
|
|
5
|
+
|
|
6
|
+
export { VerificationLevel };
|
|
7
|
+
|
|
8
|
+
export type VerificationLevelKind = VerificationLevel.Partial | VerificationLevel.Full;
|
|
9
|
+
export type VerificationLevelJSON = VerificationLevel.PartialJSON | VerificationLevel.FullJSON;
|
|
@@ -41,13 +41,11 @@ export const getInitAllReferrerTokenStateIxns = async ({
|
|
|
41
41
|
|
|
42
42
|
tokenStatesToCreate.forEach(([referrerTokenStateAddress, reserveAddress]) => {
|
|
43
43
|
const initReferrerTokenStateIx = initReferrerTokenState(
|
|
44
|
-
{
|
|
45
|
-
referrer,
|
|
46
|
-
},
|
|
47
44
|
{
|
|
48
45
|
lendingMarket: kaminoMarket.getAddress(),
|
|
49
46
|
payer,
|
|
50
47
|
reserve: reserveAddress,
|
|
48
|
+
referrer,
|
|
51
49
|
referrerTokenState: referrerTokenStateAddress,
|
|
52
50
|
rent: SYSVAR_RENT_PUBKEY,
|
|
53
51
|
systemProgram: SystemProgram.programId,
|
|
@@ -277,9 +277,7 @@ export const encodeTokenName = (tokenName: string): number[] => {
|
|
|
277
277
|
for (let i = 0; i < tokenNameEncoded.length; i++) {
|
|
278
278
|
buffer[i] = tokenNameEncoded[i];
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
const result = [...buffer];
|
|
282
|
-
return result;
|
|
280
|
+
return [...buffer];
|
|
283
281
|
};
|
|
284
282
|
|
|
285
283
|
function buildReserveConfig(fields: {
|
|
@@ -337,13 +335,15 @@ function buildReserveConfig(fields: {
|
|
|
337
335
|
deleveragingMarginCallPeriodSecs: new BN(0),
|
|
338
336
|
borrowFactorPct: new BN(100),
|
|
339
337
|
elevationGroups: fields.configParams.elevationGroups,
|
|
340
|
-
|
|
338
|
+
deleveragingThresholdSecsPerBps: new BN(3600),
|
|
341
339
|
disableUsageAsCollOutsideEmode: 0,
|
|
342
340
|
utilizationLimitBlockBorrowingAbove: 0,
|
|
343
341
|
hostFixedInterestRateBps: 0,
|
|
342
|
+
autodeleverageEnabled: 0,
|
|
344
343
|
borrowLimitOutsideElevationGroup: new BN(0),
|
|
345
344
|
borrowLimitAgainstThisCollateralInElevationGroup: Array(32).fill(new BN(0)),
|
|
346
|
-
|
|
345
|
+
deleveragingBonusIncreaseBpsPerDay: new BN(100),
|
|
346
|
+
reserved1: Array(1).fill(0),
|
|
347
347
|
reserved2: Array(2).fill(0),
|
|
348
348
|
reserved3: Array(8).fill(0),
|
|
349
349
|
};
|