@kamino-finance/klend-sdk 2.10.21 → 2.11.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 +1 -0
- package/dist/classes/action.js +55 -38
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/obligation.js +21 -0
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/reserve.d.ts +30 -0
- package/dist/classes/reserve.js +66 -6
- package/dist/classes/reserve.js.map +1 -1
- package/dist/idl.json +156 -72
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +3 -3
- package/dist/idl_codegen/accounts/LendingMarket.js +7 -1
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.d.ts +6 -3
- package/dist/idl_codegen/accounts/Obligation.js +12 -6
- package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
- package/dist/idl_codegen/accounts/Reserve.d.ts +18 -0
- package/dist/idl_codegen/accounts/Reserve.js +14 -2
- package/dist/idl_codegen/accounts/Reserve.js.map +1 -1
- package/dist/idl_codegen/errors/custom.d.ts +76 -4
- package/dist/idl_codegen/errors/custom.js +126 -8
- package/dist/idl_codegen/errors/custom.js.map +1 -1
- package/dist/idl_codegen/instructions/index.d.ts +2 -4
- package/dist/idl_codegen/instructions/index.js +3 -5
- package/dist/idl_codegen/instructions/index.js.map +1 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +1 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js +2 -2
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +2 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.js +4 -2
- package/dist/idl_codegen/instructions/updateReserveConfig.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js +1 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/types/ElevationGroup.d.ts +24 -10
- package/dist/idl_codegen/types/ElevationGroup.js +25 -12
- package/dist/idl_codegen/types/ElevationGroup.js.map +1 -1
- package/dist/idl_codegen/types/ObligationCollateral.d.ts +23 -0
- package/dist/idl_codegen/types/ObligationCollateral.js +8 -1
- package/dist/idl_codegen/types/ObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts +8 -0
- package/dist/idl_codegen/types/ObligationLiquidity.js +8 -1
- package/dist/idl_codegen/types/ObligationLiquidity.js.map +1 -1
- package/dist/idl_codegen/types/ReserveConfig.d.ts +55 -9
- package/dist/idl_codegen/types/ReserveConfig.js +20 -6
- package/dist/idl_codegen/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts +39 -0
- package/dist/idl_codegen/types/UpdateConfigMode.js +79 -1
- package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +4 -2
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +13 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js +27 -1
- 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.js.map +1 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +3 -2
- package/dist/idl_codegen/zero_padding/ObligationZP.js +8 -3
- package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CustomError = InvalidMarketAuthority | InvalidMarketOwner | InvalidAccountOwner | InvalidAmount | InvalidConfig | InvalidSigner | InvalidAccountInput | MathOverflow | InsufficientLiquidity | ReserveStale | WithdrawTooSmall | WithdrawTooLarge | BorrowTooSmall | BorrowTooLarge | RepayTooSmall | LiquidationTooSmall | ObligationHealthy | ObligationStale | ObligationReserveLimit | InvalidObligationOwner | ObligationDepositsEmpty | ObligationBorrowsEmpty | ObligationDepositsZero | ObligationBorrowsZero | InvalidObligationCollateral | InvalidObligationLiquidity | ObligationCollateralEmpty | ObligationLiquidityEmpty | NegativeInterestRate | InvalidOracleConfig | InsufficientProtocolFeesToRedeem | FlashBorrowCpi | NoFlashRepayFound | InvalidFlashRepay | FlashRepayCpi | MultipleFlashBorrows | FlashLoansDisabled | SwitchboardV2Error | CouldNotDeserializeScope | PriceTooOld | PriceTooDivergentFromTwap | InvalidTwapPrice | GlobalEmergencyMode | InvalidFlag | PriceNotValid | PriceIsBiggerThanHeuristic | PriceIsLowerThanHeuristic | PriceIsZero | PriceConfidenceTooWide | IntegerOverflow | NoFarmForReserve | IncorrectInstructionInPosition | NoPriceFound | InvalidTwapConfig | InvalidPythPriceAccount | InvalidSwitchboardAccount | InvalidScopePriceAccount | ObligationCollateralLtvZero | InvalidObligationSeedsValue | InvalidObligationId | InvalidBorrowRateCurvePoint | InvalidUtilizationRate | CannotSocializeObligationWithCollateral | ObligationEmpty | WithdrawalCapReached | LastTimestampGreaterThanCurrent |
|
|
1
|
+
export type CustomError = InvalidMarketAuthority | InvalidMarketOwner | InvalidAccountOwner | InvalidAmount | InvalidConfig | InvalidSigner | InvalidAccountInput | MathOverflow | InsufficientLiquidity | ReserveStale | WithdrawTooSmall | WithdrawTooLarge | BorrowTooSmall | BorrowTooLarge | RepayTooSmall | LiquidationTooSmall | ObligationHealthy | ObligationStale | ObligationReserveLimit | InvalidObligationOwner | ObligationDepositsEmpty | ObligationBorrowsEmpty | ObligationDepositsZero | ObligationBorrowsZero | InvalidObligationCollateral | InvalidObligationLiquidity | ObligationCollateralEmpty | ObligationLiquidityEmpty | NegativeInterestRate | InvalidOracleConfig | InsufficientProtocolFeesToRedeem | FlashBorrowCpi | NoFlashRepayFound | InvalidFlashRepay | FlashRepayCpi | MultipleFlashBorrows | FlashLoansDisabled | SwitchboardV2Error | CouldNotDeserializeScope | PriceTooOld | PriceTooDivergentFromTwap | InvalidTwapPrice | GlobalEmergencyMode | InvalidFlag | PriceNotValid | PriceIsBiggerThanHeuristic | PriceIsLowerThanHeuristic | PriceIsZero | PriceConfidenceTooWide | IntegerOverflow | NoFarmForReserve | IncorrectInstructionInPosition | NoPriceFound | InvalidTwapConfig | InvalidPythPriceAccount | InvalidSwitchboardAccount | InvalidScopePriceAccount | ObligationCollateralLtvZero | InvalidObligationSeedsValue | InvalidObligationId | InvalidBorrowRateCurvePoint | InvalidUtilizationRate | CannotSocializeObligationWithCollateral | ObligationEmpty | WithdrawalCapReached | LastTimestampGreaterThanCurrent | LiquidationRewardTooSmall | IsolatedAssetTierViolation | InconsistentElevationGroup | InvalidElevationGroup | InvalidElevationGroupConfig | UnhealthyElevationGroupLtv | ElevationGroupNewLoansDisabled | ReserveDeprecated | ReferrerAccountNotInitialized | ReferrerAccountMintMissmatch | ReferrerAccountWrongAddress | ReferrerAccountReferrerMissmatch | ReferrerAccountMissing | InsufficientReferralFeesToRedeem | CpiDisabled | ShortUrlNotAsciiAlphanumeric | ReserveObsolete | ElevationGroupAlreadyActivated | ObligationInDeprecatedReserve | ReferrerStateOwnerMismatch | UserMetadataOwnerAlreadySet | CollateralNonLiquidatable | BorrowingDisabled | BorrowLimitExceeded | DepositLimitExceeded | BorrowingDisabledOutsideElevationGroup | NetValueRemainingTooSmall | WorseLTVBlocked | LiabilitiesBiggerThanAssets | ReserveTokenBalanceMismatch | ReserveVaultBalanceMismatch | ReserveAccountingMismatch | BorrowingAboveUtilizationRateDisabled | LiquidationBorrowFactorPriority | LiquidationLowestLTVPriority | ElevationGroupBorrowLimitExceeded | ElevationGroupWithoutDebtReserve | ElevationGroupMaxCollateralReserveZero | ElevationGroupHasAnotherDebtReserve | ElevationGroupDebtReserveAsCollateral | ObligationCollateralExceedsElevationGroupLimit | ObligationElevationGroupMultipleDebtReserve;
|
|
2
2
|
export declare class InvalidMarketAuthority extends Error {
|
|
3
3
|
readonly logs?: string[] | undefined;
|
|
4
4
|
static readonly code = 6000;
|
|
@@ -527,12 +527,12 @@ export declare class LastTimestampGreaterThanCurrent extends Error {
|
|
|
527
527
|
readonly msg = "The last interval start timestamp is greater than the current timestamp";
|
|
528
528
|
constructor(logs?: string[] | undefined);
|
|
529
529
|
}
|
|
530
|
-
export declare class
|
|
530
|
+
export declare class LiquidationRewardTooSmall extends Error {
|
|
531
531
|
readonly logs?: string[] | undefined;
|
|
532
532
|
static readonly code = 6066;
|
|
533
533
|
readonly code = 6066;
|
|
534
|
-
readonly name = "
|
|
535
|
-
readonly msg = "The reward amount is less than the minimum acceptable received
|
|
534
|
+
readonly name = "LiquidationRewardTooSmall";
|
|
535
|
+
readonly msg = "The reward amount is less than the minimum acceptable received liquidity";
|
|
536
536
|
constructor(logs?: string[] | undefined);
|
|
537
537
|
}
|
|
538
538
|
export declare class IsolatedAssetTierViolation extends Error {
|
|
@@ -791,4 +791,76 @@ export declare class BorrowingAboveUtilizationRateDisabled extends Error {
|
|
|
791
791
|
readonly msg = "Borrowing above set utilization rate is disabled";
|
|
792
792
|
constructor(logs?: string[] | undefined);
|
|
793
793
|
}
|
|
794
|
+
export declare class LiquidationBorrowFactorPriority extends Error {
|
|
795
|
+
readonly logs?: string[] | undefined;
|
|
796
|
+
static readonly code = 6099;
|
|
797
|
+
readonly code = 6099;
|
|
798
|
+
readonly name = "LiquidationBorrowFactorPriority";
|
|
799
|
+
readonly msg = "Liquidation must prioritize the debt with the highest borrow factor";
|
|
800
|
+
constructor(logs?: string[] | undefined);
|
|
801
|
+
}
|
|
802
|
+
export declare class LiquidationLowestLTVPriority extends Error {
|
|
803
|
+
readonly logs?: string[] | undefined;
|
|
804
|
+
static readonly code = 6100;
|
|
805
|
+
readonly code = 6100;
|
|
806
|
+
readonly name = "LiquidationLowestLTVPriority";
|
|
807
|
+
readonly msg = "Liquidation must prioritize the collateral with the lowest LTV";
|
|
808
|
+
constructor(logs?: string[] | undefined);
|
|
809
|
+
}
|
|
810
|
+
export declare class ElevationGroupBorrowLimitExceeded extends Error {
|
|
811
|
+
readonly logs?: string[] | undefined;
|
|
812
|
+
static readonly code = 6101;
|
|
813
|
+
readonly code = 6101;
|
|
814
|
+
readonly name = "ElevationGroupBorrowLimitExceeded";
|
|
815
|
+
readonly msg = "Elevation group borrow limit exceeded";
|
|
816
|
+
constructor(logs?: string[] | undefined);
|
|
817
|
+
}
|
|
818
|
+
export declare class ElevationGroupWithoutDebtReserve extends Error {
|
|
819
|
+
readonly logs?: string[] | undefined;
|
|
820
|
+
static readonly code = 6102;
|
|
821
|
+
readonly code = 6102;
|
|
822
|
+
readonly name = "ElevationGroupWithoutDebtReserve";
|
|
823
|
+
readonly msg = "The elevation group does not have a debt reserve defined";
|
|
824
|
+
constructor(logs?: string[] | undefined);
|
|
825
|
+
}
|
|
826
|
+
export declare class ElevationGroupMaxCollateralReserveZero extends Error {
|
|
827
|
+
readonly logs?: string[] | undefined;
|
|
828
|
+
static readonly code = 6103;
|
|
829
|
+
readonly code = 6103;
|
|
830
|
+
readonly name = "ElevationGroupMaxCollateralReserveZero";
|
|
831
|
+
readonly msg = "The elevation group does not allow any collateral reserves";
|
|
832
|
+
constructor(logs?: string[] | undefined);
|
|
833
|
+
}
|
|
834
|
+
export declare class ElevationGroupHasAnotherDebtReserve extends Error {
|
|
835
|
+
readonly logs?: string[] | undefined;
|
|
836
|
+
static readonly code = 6104;
|
|
837
|
+
readonly code = 6104;
|
|
838
|
+
readonly name = "ElevationGroupHasAnotherDebtReserve";
|
|
839
|
+
readonly msg = "In elevation group attempt to borrow from a reserve that is not the debt reserve";
|
|
840
|
+
constructor(logs?: string[] | undefined);
|
|
841
|
+
}
|
|
842
|
+
export declare class ElevationGroupDebtReserveAsCollateral extends Error {
|
|
843
|
+
readonly logs?: string[] | undefined;
|
|
844
|
+
static readonly code = 6105;
|
|
845
|
+
readonly code = 6105;
|
|
846
|
+
readonly name = "ElevationGroupDebtReserveAsCollateral";
|
|
847
|
+
readonly msg = "The elevation group's debt reserve cannot be used as a collateral reserve";
|
|
848
|
+
constructor(logs?: string[] | undefined);
|
|
849
|
+
}
|
|
850
|
+
export declare class ObligationCollateralExceedsElevationGroupLimit extends Error {
|
|
851
|
+
readonly logs?: string[] | undefined;
|
|
852
|
+
static readonly code = 6106;
|
|
853
|
+
readonly code = 6106;
|
|
854
|
+
readonly name = "ObligationCollateralExceedsElevationGroupLimit";
|
|
855
|
+
readonly msg = "Obligation have more collateral than the maximum allowed by the elevation group";
|
|
856
|
+
constructor(logs?: string[] | undefined);
|
|
857
|
+
}
|
|
858
|
+
export declare class ObligationElevationGroupMultipleDebtReserve extends Error {
|
|
859
|
+
readonly logs?: string[] | undefined;
|
|
860
|
+
static readonly code = 6107;
|
|
861
|
+
readonly code = 6107;
|
|
862
|
+
readonly name = "ObligationElevationGroupMultipleDebtReserve";
|
|
863
|
+
readonly msg = "Obligation is an elevation group but have more than one debt reserve";
|
|
864
|
+
constructor(logs?: string[] | undefined);
|
|
865
|
+
}
|
|
794
866
|
export declare function fromCode(code: number, logs?: string[]): CustomError | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IntegerOverflow = exports.PriceConfidenceTooWide = exports.PriceIsZero = exports.PriceIsLowerThanHeuristic = exports.PriceIsBiggerThanHeuristic = exports.PriceNotValid = exports.InvalidFlag = exports.GlobalEmergencyMode = exports.InvalidTwapPrice = exports.PriceTooDivergentFromTwap = exports.PriceTooOld = exports.CouldNotDeserializeScope = exports.SwitchboardV2Error = exports.FlashLoansDisabled = exports.MultipleFlashBorrows = exports.FlashRepayCpi = exports.InvalidFlashRepay = exports.NoFlashRepayFound = exports.FlashBorrowCpi = exports.InsufficientProtocolFeesToRedeem = exports.InvalidOracleConfig = exports.NegativeInterestRate = exports.ObligationLiquidityEmpty = exports.ObligationCollateralEmpty = exports.InvalidObligationLiquidity = exports.InvalidObligationCollateral = exports.ObligationBorrowsZero = exports.ObligationDepositsZero = exports.ObligationBorrowsEmpty = exports.ObligationDepositsEmpty = exports.InvalidObligationOwner = exports.ObligationReserveLimit = exports.ObligationStale = exports.ObligationHealthy = exports.LiquidationTooSmall = exports.RepayTooSmall = exports.BorrowTooLarge = exports.BorrowTooSmall = exports.WithdrawTooLarge = exports.WithdrawTooSmall = exports.ReserveStale = exports.InsufficientLiquidity = exports.MathOverflow = exports.InvalidAccountInput = exports.InvalidSigner = exports.InvalidConfig = exports.InvalidAmount = exports.InvalidAccountOwner = exports.InvalidMarketOwner = exports.InvalidMarketAuthority = void 0;
|
|
4
|
-
exports.
|
|
4
|
+
exports.LiquidationBorrowFactorPriority = exports.BorrowingAboveUtilizationRateDisabled = exports.ReserveAccountingMismatch = exports.ReserveVaultBalanceMismatch = exports.ReserveTokenBalanceMismatch = exports.LiabilitiesBiggerThanAssets = exports.WorseLTVBlocked = exports.NetValueRemainingTooSmall = exports.BorrowingDisabledOutsideElevationGroup = exports.DepositLimitExceeded = exports.BorrowLimitExceeded = exports.BorrowingDisabled = exports.CollateralNonLiquidatable = exports.UserMetadataOwnerAlreadySet = exports.ReferrerStateOwnerMismatch = exports.ObligationInDeprecatedReserve = exports.ElevationGroupAlreadyActivated = exports.ReserveObsolete = exports.ShortUrlNotAsciiAlphanumeric = exports.CpiDisabled = exports.InsufficientReferralFeesToRedeem = exports.ReferrerAccountMissing = exports.ReferrerAccountReferrerMissmatch = exports.ReferrerAccountWrongAddress = exports.ReferrerAccountMintMissmatch = exports.ReferrerAccountNotInitialized = exports.ReserveDeprecated = exports.ElevationGroupNewLoansDisabled = exports.UnhealthyElevationGroupLtv = exports.InvalidElevationGroupConfig = exports.InvalidElevationGroup = exports.InconsistentElevationGroup = exports.IsolatedAssetTierViolation = exports.LiquidationRewardTooSmall = exports.LastTimestampGreaterThanCurrent = exports.WithdrawalCapReached = exports.ObligationEmpty = exports.CannotSocializeObligationWithCollateral = exports.InvalidUtilizationRate = exports.InvalidBorrowRateCurvePoint = exports.InvalidObligationId = exports.InvalidObligationSeedsValue = exports.ObligationCollateralLtvZero = exports.InvalidScopePriceAccount = exports.InvalidSwitchboardAccount = exports.InvalidPythPriceAccount = exports.InvalidTwapConfig = exports.NoPriceFound = exports.IncorrectInstructionInPosition = exports.NoFarmForReserve = void 0;
|
|
5
|
+
exports.fromCode = exports.ObligationElevationGroupMultipleDebtReserve = exports.ObligationCollateralExceedsElevationGroupLimit = exports.ElevationGroupDebtReserveAsCollateral = exports.ElevationGroupHasAnotherDebtReserve = exports.ElevationGroupMaxCollateralReserveZero = exports.ElevationGroupWithoutDebtReserve = exports.ElevationGroupBorrowLimitExceeded = exports.LiquidationLowestLTVPriority = void 0;
|
|
5
6
|
class InvalidMarketAuthority extends Error {
|
|
6
7
|
constructor(logs) {
|
|
7
8
|
super("6000: Market authority is invalid");
|
|
@@ -728,17 +729,17 @@ class LastTimestampGreaterThanCurrent extends Error {
|
|
|
728
729
|
}
|
|
729
730
|
exports.LastTimestampGreaterThanCurrent = LastTimestampGreaterThanCurrent;
|
|
730
731
|
LastTimestampGreaterThanCurrent.code = 6065;
|
|
731
|
-
class
|
|
732
|
+
class LiquidationRewardTooSmall extends Error {
|
|
732
733
|
constructor(logs) {
|
|
733
|
-
super("6066: The reward amount is less than the minimum acceptable received
|
|
734
|
+
super("6066: The reward amount is less than the minimum acceptable received liquidity");
|
|
734
735
|
this.logs = logs;
|
|
735
736
|
this.code = 6066;
|
|
736
|
-
this.name = "
|
|
737
|
-
this.msg = "The reward amount is less than the minimum acceptable received
|
|
737
|
+
this.name = "LiquidationRewardTooSmall";
|
|
738
|
+
this.msg = "The reward amount is less than the minimum acceptable received liquidity";
|
|
738
739
|
}
|
|
739
740
|
}
|
|
740
|
-
exports.
|
|
741
|
-
|
|
741
|
+
exports.LiquidationRewardTooSmall = LiquidationRewardTooSmall;
|
|
742
|
+
LiquidationRewardTooSmall.code = 6066;
|
|
742
743
|
class IsolatedAssetTierViolation extends Error {
|
|
743
744
|
constructor(logs) {
|
|
744
745
|
super("6067: Isolated Asset Tier Violation");
|
|
@@ -1091,6 +1092,105 @@ class BorrowingAboveUtilizationRateDisabled extends Error {
|
|
|
1091
1092
|
}
|
|
1092
1093
|
exports.BorrowingAboveUtilizationRateDisabled = BorrowingAboveUtilizationRateDisabled;
|
|
1093
1094
|
BorrowingAboveUtilizationRateDisabled.code = 6098;
|
|
1095
|
+
class LiquidationBorrowFactorPriority extends Error {
|
|
1096
|
+
constructor(logs) {
|
|
1097
|
+
super("6099: Liquidation must prioritize the debt with the highest borrow factor");
|
|
1098
|
+
this.logs = logs;
|
|
1099
|
+
this.code = 6099;
|
|
1100
|
+
this.name = "LiquidationBorrowFactorPriority";
|
|
1101
|
+
this.msg = "Liquidation must prioritize the debt with the highest borrow factor";
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
exports.LiquidationBorrowFactorPriority = LiquidationBorrowFactorPriority;
|
|
1105
|
+
LiquidationBorrowFactorPriority.code = 6099;
|
|
1106
|
+
class LiquidationLowestLTVPriority extends Error {
|
|
1107
|
+
constructor(logs) {
|
|
1108
|
+
super("6100: Liquidation must prioritize the collateral with the lowest LTV");
|
|
1109
|
+
this.logs = logs;
|
|
1110
|
+
this.code = 6100;
|
|
1111
|
+
this.name = "LiquidationLowestLTVPriority";
|
|
1112
|
+
this.msg = "Liquidation must prioritize the collateral with the lowest LTV";
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
exports.LiquidationLowestLTVPriority = LiquidationLowestLTVPriority;
|
|
1116
|
+
LiquidationLowestLTVPriority.code = 6100;
|
|
1117
|
+
class ElevationGroupBorrowLimitExceeded extends Error {
|
|
1118
|
+
constructor(logs) {
|
|
1119
|
+
super("6101: Elevation group borrow limit exceeded");
|
|
1120
|
+
this.logs = logs;
|
|
1121
|
+
this.code = 6101;
|
|
1122
|
+
this.name = "ElevationGroupBorrowLimitExceeded";
|
|
1123
|
+
this.msg = "Elevation group borrow limit exceeded";
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
exports.ElevationGroupBorrowLimitExceeded = ElevationGroupBorrowLimitExceeded;
|
|
1127
|
+
ElevationGroupBorrowLimitExceeded.code = 6101;
|
|
1128
|
+
class ElevationGroupWithoutDebtReserve extends Error {
|
|
1129
|
+
constructor(logs) {
|
|
1130
|
+
super("6102: The elevation group does not have a debt reserve defined");
|
|
1131
|
+
this.logs = logs;
|
|
1132
|
+
this.code = 6102;
|
|
1133
|
+
this.name = "ElevationGroupWithoutDebtReserve";
|
|
1134
|
+
this.msg = "The elevation group does not have a debt reserve defined";
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
exports.ElevationGroupWithoutDebtReserve = ElevationGroupWithoutDebtReserve;
|
|
1138
|
+
ElevationGroupWithoutDebtReserve.code = 6102;
|
|
1139
|
+
class ElevationGroupMaxCollateralReserveZero extends Error {
|
|
1140
|
+
constructor(logs) {
|
|
1141
|
+
super("6103: The elevation group does not allow any collateral reserves");
|
|
1142
|
+
this.logs = logs;
|
|
1143
|
+
this.code = 6103;
|
|
1144
|
+
this.name = "ElevationGroupMaxCollateralReserveZero";
|
|
1145
|
+
this.msg = "The elevation group does not allow any collateral reserves";
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
exports.ElevationGroupMaxCollateralReserveZero = ElevationGroupMaxCollateralReserveZero;
|
|
1149
|
+
ElevationGroupMaxCollateralReserveZero.code = 6103;
|
|
1150
|
+
class ElevationGroupHasAnotherDebtReserve extends Error {
|
|
1151
|
+
constructor(logs) {
|
|
1152
|
+
super("6104: In elevation group attempt to borrow from a reserve that is not the debt reserve");
|
|
1153
|
+
this.logs = logs;
|
|
1154
|
+
this.code = 6104;
|
|
1155
|
+
this.name = "ElevationGroupHasAnotherDebtReserve";
|
|
1156
|
+
this.msg = "In elevation group attempt to borrow from a reserve that is not the debt reserve";
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
exports.ElevationGroupHasAnotherDebtReserve = ElevationGroupHasAnotherDebtReserve;
|
|
1160
|
+
ElevationGroupHasAnotherDebtReserve.code = 6104;
|
|
1161
|
+
class ElevationGroupDebtReserveAsCollateral extends Error {
|
|
1162
|
+
constructor(logs) {
|
|
1163
|
+
super("6105: The elevation group's debt reserve cannot be used as a collateral reserve");
|
|
1164
|
+
this.logs = logs;
|
|
1165
|
+
this.code = 6105;
|
|
1166
|
+
this.name = "ElevationGroupDebtReserveAsCollateral";
|
|
1167
|
+
this.msg = "The elevation group's debt reserve cannot be used as a collateral reserve";
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
exports.ElevationGroupDebtReserveAsCollateral = ElevationGroupDebtReserveAsCollateral;
|
|
1171
|
+
ElevationGroupDebtReserveAsCollateral.code = 6105;
|
|
1172
|
+
class ObligationCollateralExceedsElevationGroupLimit extends Error {
|
|
1173
|
+
constructor(logs) {
|
|
1174
|
+
super("6106: Obligation have more collateral than the maximum allowed by the elevation group");
|
|
1175
|
+
this.logs = logs;
|
|
1176
|
+
this.code = 6106;
|
|
1177
|
+
this.name = "ObligationCollateralExceedsElevationGroupLimit";
|
|
1178
|
+
this.msg = "Obligation have more collateral than the maximum allowed by the elevation group";
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
exports.ObligationCollateralExceedsElevationGroupLimit = ObligationCollateralExceedsElevationGroupLimit;
|
|
1182
|
+
ObligationCollateralExceedsElevationGroupLimit.code = 6106;
|
|
1183
|
+
class ObligationElevationGroupMultipleDebtReserve extends Error {
|
|
1184
|
+
constructor(logs) {
|
|
1185
|
+
super("6107: Obligation is an elevation group but have more than one debt reserve");
|
|
1186
|
+
this.logs = logs;
|
|
1187
|
+
this.code = 6107;
|
|
1188
|
+
this.name = "ObligationElevationGroupMultipleDebtReserve";
|
|
1189
|
+
this.msg = "Obligation is an elevation group but have more than one debt reserve";
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
exports.ObligationElevationGroupMultipleDebtReserve = ObligationElevationGroupMultipleDebtReserve;
|
|
1193
|
+
ObligationElevationGroupMultipleDebtReserve.code = 6107;
|
|
1094
1194
|
function fromCode(code, logs) {
|
|
1095
1195
|
switch (code) {
|
|
1096
1196
|
case 6000:
|
|
@@ -1226,7 +1326,7 @@ function fromCode(code, logs) {
|
|
|
1226
1326
|
case 6065:
|
|
1227
1327
|
return new LastTimestampGreaterThanCurrent(logs);
|
|
1228
1328
|
case 6066:
|
|
1229
|
-
return new
|
|
1329
|
+
return new LiquidationRewardTooSmall(logs);
|
|
1230
1330
|
case 6067:
|
|
1231
1331
|
return new IsolatedAssetTierViolation(logs);
|
|
1232
1332
|
case 6068:
|
|
@@ -1291,6 +1391,24 @@ function fromCode(code, logs) {
|
|
|
1291
1391
|
return new ReserveAccountingMismatch(logs);
|
|
1292
1392
|
case 6098:
|
|
1293
1393
|
return new BorrowingAboveUtilizationRateDisabled(logs);
|
|
1394
|
+
case 6099:
|
|
1395
|
+
return new LiquidationBorrowFactorPriority(logs);
|
|
1396
|
+
case 6100:
|
|
1397
|
+
return new LiquidationLowestLTVPriority(logs);
|
|
1398
|
+
case 6101:
|
|
1399
|
+
return new ElevationGroupBorrowLimitExceeded(logs);
|
|
1400
|
+
case 6102:
|
|
1401
|
+
return new ElevationGroupWithoutDebtReserve(logs);
|
|
1402
|
+
case 6103:
|
|
1403
|
+
return new ElevationGroupMaxCollateralReserveZero(logs);
|
|
1404
|
+
case 6104:
|
|
1405
|
+
return new ElevationGroupHasAnotherDebtReserve(logs);
|
|
1406
|
+
case 6105:
|
|
1407
|
+
return new ElevationGroupDebtReserveAsCollateral(logs);
|
|
1408
|
+
case 6106:
|
|
1409
|
+
return new ObligationCollateralExceedsElevationGroupLimit(logs);
|
|
1410
|
+
case 6107:
|
|
1411
|
+
return new ObligationElevationGroupMultipleDebtReserve(logs);
|
|
1294
1412
|
}
|
|
1295
1413
|
return null;
|
|
1296
1414
|
}
|