@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
|
@@ -35,7 +35,7 @@ class ReserveConfig {
|
|
|
35
35
|
constructor(fields) {
|
|
36
36
|
this.status = fields.status;
|
|
37
37
|
this.assetTier = fields.assetTier;
|
|
38
|
-
this.
|
|
38
|
+
this.hostFixedInterestRateBps = fields.hostFixedInterestRateBps;
|
|
39
39
|
this.multiplierSideBoost = fields.multiplierSideBoost;
|
|
40
40
|
this.multiplierTagBoost = fields.multiplierTagBoost;
|
|
41
41
|
this.protocolTakeRatePct = fields.protocolTakeRatePct;
|
|
@@ -62,12 +62,16 @@ class ReserveConfig {
|
|
|
62
62
|
this.utilizationLimitBlockBorrowingAbove =
|
|
63
63
|
fields.utilizationLimitBlockBorrowingAbove;
|
|
64
64
|
this.reserved1 = fields.reserved1;
|
|
65
|
+
this.borrowLimitOutsideElevationGroup =
|
|
66
|
+
fields.borrowLimitOutsideElevationGroup;
|
|
67
|
+
this.borrowLimitAgainstThisCollateralInElevationGroup =
|
|
68
|
+
fields.borrowLimitAgainstThisCollateralInElevationGroup;
|
|
65
69
|
}
|
|
66
70
|
static layout(property) {
|
|
67
71
|
return borsh.struct([
|
|
68
72
|
borsh.u8("status"),
|
|
69
73
|
borsh.u8("assetTier"),
|
|
70
|
-
borsh.
|
|
74
|
+
borsh.u16("hostFixedInterestRateBps"),
|
|
71
75
|
borsh.array(borsh.u8(), 2, "multiplierSideBoost"),
|
|
72
76
|
borsh.array(borsh.u8(), 8, "multiplierTagBoost"),
|
|
73
77
|
borsh.u8("protocolTakeRatePct"),
|
|
@@ -91,6 +95,8 @@ class ReserveConfig {
|
|
|
91
95
|
borsh.u8("disableUsageAsCollOutsideEmode"),
|
|
92
96
|
borsh.u8("utilizationLimitBlockBorrowingAbove"),
|
|
93
97
|
borsh.array(borsh.u8(), 2, "reserved1"),
|
|
98
|
+
borsh.u64("borrowLimitOutsideElevationGroup"),
|
|
99
|
+
borsh.array(borsh.u64(), 32, "borrowLimitAgainstThisCollateralInElevationGroup"),
|
|
94
100
|
], property);
|
|
95
101
|
}
|
|
96
102
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -98,7 +104,7 @@ class ReserveConfig {
|
|
|
98
104
|
return new ReserveConfig({
|
|
99
105
|
status: obj.status,
|
|
100
106
|
assetTier: obj.assetTier,
|
|
101
|
-
|
|
107
|
+
hostFixedInterestRateBps: obj.hostFixedInterestRateBps,
|
|
102
108
|
multiplierSideBoost: obj.multiplierSideBoost,
|
|
103
109
|
multiplierTagBoost: obj.multiplierTagBoost,
|
|
104
110
|
protocolTakeRatePct: obj.protocolTakeRatePct,
|
|
@@ -122,13 +128,15 @@ class ReserveConfig {
|
|
|
122
128
|
disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,
|
|
123
129
|
utilizationLimitBlockBorrowingAbove: obj.utilizationLimitBlockBorrowingAbove,
|
|
124
130
|
reserved1: obj.reserved1,
|
|
131
|
+
borrowLimitOutsideElevationGroup: obj.borrowLimitOutsideElevationGroup,
|
|
132
|
+
borrowLimitAgainstThisCollateralInElevationGroup: obj.borrowLimitAgainstThisCollateralInElevationGroup,
|
|
125
133
|
});
|
|
126
134
|
}
|
|
127
135
|
static toEncodable(fields) {
|
|
128
136
|
return {
|
|
129
137
|
status: fields.status,
|
|
130
138
|
assetTier: fields.assetTier,
|
|
131
|
-
|
|
139
|
+
hostFixedInterestRateBps: fields.hostFixedInterestRateBps,
|
|
132
140
|
multiplierSideBoost: fields.multiplierSideBoost,
|
|
133
141
|
multiplierTagBoost: fields.multiplierTagBoost,
|
|
134
142
|
protocolTakeRatePct: fields.protocolTakeRatePct,
|
|
@@ -152,13 +160,15 @@ class ReserveConfig {
|
|
|
152
160
|
disableUsageAsCollOutsideEmode: fields.disableUsageAsCollOutsideEmode,
|
|
153
161
|
utilizationLimitBlockBorrowingAbove: fields.utilizationLimitBlockBorrowingAbove,
|
|
154
162
|
reserved1: fields.reserved1,
|
|
163
|
+
borrowLimitOutsideElevationGroup: fields.borrowLimitOutsideElevationGroup,
|
|
164
|
+
borrowLimitAgainstThisCollateralInElevationGroup: fields.borrowLimitAgainstThisCollateralInElevationGroup,
|
|
155
165
|
};
|
|
156
166
|
}
|
|
157
167
|
toJSON() {
|
|
158
168
|
return {
|
|
159
169
|
status: this.status,
|
|
160
170
|
assetTier: this.assetTier,
|
|
161
|
-
|
|
171
|
+
hostFixedInterestRateBps: this.hostFixedInterestRateBps,
|
|
162
172
|
multiplierSideBoost: this.multiplierSideBoost,
|
|
163
173
|
multiplierTagBoost: this.multiplierTagBoost,
|
|
164
174
|
protocolTakeRatePct: this.protocolTakeRatePct,
|
|
@@ -182,13 +192,15 @@ class ReserveConfig {
|
|
|
182
192
|
disableUsageAsCollOutsideEmode: this.disableUsageAsCollOutsideEmode,
|
|
183
193
|
utilizationLimitBlockBorrowingAbove: this.utilizationLimitBlockBorrowingAbove,
|
|
184
194
|
reserved1: this.reserved1,
|
|
195
|
+
borrowLimitOutsideElevationGroup: this.borrowLimitOutsideElevationGroup.toString(),
|
|
196
|
+
borrowLimitAgainstThisCollateralInElevationGroup: this.borrowLimitAgainstThisCollateralInElevationGroup.map((item) => item.toString()),
|
|
185
197
|
};
|
|
186
198
|
}
|
|
187
199
|
static fromJSON(obj) {
|
|
188
200
|
return new ReserveConfig({
|
|
189
201
|
status: obj.status,
|
|
190
202
|
assetTier: obj.assetTier,
|
|
191
|
-
|
|
203
|
+
hostFixedInterestRateBps: obj.hostFixedInterestRateBps,
|
|
192
204
|
multiplierSideBoost: obj.multiplierSideBoost,
|
|
193
205
|
multiplierTagBoost: obj.multiplierTagBoost,
|
|
194
206
|
protocolTakeRatePct: obj.protocolTakeRatePct,
|
|
@@ -212,6 +224,8 @@ class ReserveConfig {
|
|
|
212
224
|
disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,
|
|
213
225
|
utilizationLimitBlockBorrowingAbove: obj.utilizationLimitBlockBorrowingAbove,
|
|
214
226
|
reserved1: obj.reserved1,
|
|
227
|
+
borrowLimitOutsideElevationGroup: new bn_js_1.default(obj.borrowLimitOutsideElevationGroup),
|
|
228
|
+
borrowLimitAgainstThisCollateralInElevationGroup: obj.borrowLimitAgainstThisCollateralInElevationGroup.map((item) => new bn_js_1.default(item)),
|
|
215
229
|
});
|
|
216
230
|
}
|
|
217
231
|
toEncodable() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReserveCon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e;YACpC,8BAA8B,EAAE,GAAG,CAAC,8BAA8B;YAClE,mCAAmC,EACjC,GAAG,CAAC,mCAAmC;YACzC,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,OAAO,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;CACF;AArRD,sCAqRC","sourcesContent":["import { PublicKey } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\"\n\nexport interface ReserveConfigFields {\n /** Status of the reserve Active/Obsolete/Hidden */\n status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n assetTier: number\n reserved0: Array<number>\n /** Boost for side (debt or collateral) */\n multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n deleveragingMarginCallPeriodSecs: BN\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n deleveragingThresholdSlotsPerBps: BN\n /** Program owner fees assessed, separate from gains due to interest accrual */\n fees: types.ReserveFeesFields\n /** Borrow rate curve based on utilization */\n borrowRateCurve: types.BorrowRateCurveFields\n /** Borrow factor in percentage - used for risk adjustment */\n borrowFactorPct: BN\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n depositLimit: BN\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n borrowLimit: BN\n /** Token id from TokenInfos struct */\n tokenInfo: types.TokenInfoFields\n /** Deposit withdrawl caps - deposit & redeem */\n depositWithdrawalCap: types.WithdrawalCapsFields\n /** Debt withdrawl caps - borrow & repay */\n debtWithdrawalCap: types.WithdrawalCapsFields\n elevationGroups: Array<number>\n disableUsageAsCollOutsideEmode: number\n utilizationLimitBlockBorrowingAbove: number\n reserved1: Array<number>\n}\n\nexport interface ReserveConfigJSON {\n /** Status of the reserve Active/Obsolete/Hidden */\n status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n assetTier: number\n reserved0: Array<number>\n /** Boost for side (debt or collateral) */\n multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n deleveragingMarginCallPeriodSecs: string\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n deleveragingThresholdSlotsPerBps: string\n /** Program owner fees assessed, separate from gains due to interest accrual */\n fees: types.ReserveFeesJSON\n /** Borrow rate curve based on utilization */\n borrowRateCurve: types.BorrowRateCurveJSON\n /** Borrow factor in percentage - used for risk adjustment */\n borrowFactorPct: string\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n depositLimit: string\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n borrowLimit: string\n /** Token id from TokenInfos struct */\n tokenInfo: types.TokenInfoJSON\n /** Deposit withdrawl caps - deposit & redeem */\n depositWithdrawalCap: types.WithdrawalCapsJSON\n /** Debt withdrawl caps - borrow & repay */\n debtWithdrawalCap: types.WithdrawalCapsJSON\n elevationGroups: Array<number>\n disableUsageAsCollOutsideEmode: number\n utilizationLimitBlockBorrowingAbove: number\n reserved1: Array<number>\n}\n\n/** Reserve configuration values */\nexport class ReserveConfig {\n /** Status of the reserve Active/Obsolete/Hidden */\n readonly status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n readonly assetTier: number\n readonly reserved0: Array<number>\n /** Boost for side (debt or collateral) */\n readonly multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n readonly multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n readonly protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n readonly protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n readonly loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n readonly liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n readonly minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n readonly maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n readonly badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n readonly deleveragingMarginCallPeriodSecs: BN\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n readonly deleveragingThresholdSlotsPerBps: BN\n /** Program owner fees assessed, separate from gains due to interest accrual */\n readonly fees: types.ReserveFees\n /** Borrow rate curve based on utilization */\n readonly borrowRateCurve: types.BorrowRateCurve\n /** Borrow factor in percentage - used for risk adjustment */\n readonly borrowFactorPct: BN\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n readonly depositLimit: BN\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n readonly borrowLimit: BN\n /** Token id from TokenInfos struct */\n readonly tokenInfo: types.TokenInfo\n /** Deposit withdrawl caps - deposit & redeem */\n readonly depositWithdrawalCap: types.WithdrawalCaps\n /** Debt withdrawl caps - borrow & repay */\n readonly debtWithdrawalCap: types.WithdrawalCaps\n readonly elevationGroups: Array<number>\n readonly disableUsageAsCollOutsideEmode: number\n readonly utilizationLimitBlockBorrowingAbove: number\n readonly reserved1: Array<number>\n\n constructor(fields: ReserveConfigFields) {\n this.status = fields.status\n this.assetTier = fields.assetTier\n this.reserved0 = fields.reserved0\n this.multiplierSideBoost = fields.multiplierSideBoost\n this.multiplierTagBoost = fields.multiplierTagBoost\n this.protocolTakeRatePct = fields.protocolTakeRatePct\n this.protocolLiquidationFeePct = fields.protocolLiquidationFeePct\n this.loanToValuePct = fields.loanToValuePct\n this.liquidationThresholdPct = fields.liquidationThresholdPct\n this.minLiquidationBonusBps = fields.minLiquidationBonusBps\n this.maxLiquidationBonusBps = fields.maxLiquidationBonusBps\n this.badDebtLiquidationBonusBps = fields.badDebtLiquidationBonusBps\n this.deleveragingMarginCallPeriodSecs =\n fields.deleveragingMarginCallPeriodSecs\n this.deleveragingThresholdSlotsPerBps =\n fields.deleveragingThresholdSlotsPerBps\n this.fees = new types.ReserveFees({ ...fields.fees })\n this.borrowRateCurve = new types.BorrowRateCurve({\n ...fields.borrowRateCurve,\n })\n this.borrowFactorPct = fields.borrowFactorPct\n this.depositLimit = fields.depositLimit\n this.borrowLimit = fields.borrowLimit\n this.tokenInfo = new types.TokenInfo({ ...fields.tokenInfo })\n this.depositWithdrawalCap = new types.WithdrawalCaps({\n ...fields.depositWithdrawalCap,\n })\n this.debtWithdrawalCap = new types.WithdrawalCaps({\n ...fields.debtWithdrawalCap,\n })\n this.elevationGroups = fields.elevationGroups\n this.disableUsageAsCollOutsideEmode = fields.disableUsageAsCollOutsideEmode\n this.utilizationLimitBlockBorrowingAbove =\n fields.utilizationLimitBlockBorrowingAbove\n this.reserved1 = fields.reserved1\n }\n\n static layout(property?: string) {\n return borsh.struct(\n [\n borsh.u8(\"status\"),\n borsh.u8(\"assetTier\"),\n borsh.array(borsh.u8(), 2, \"reserved0\"),\n borsh.array(borsh.u8(), 2, \"multiplierSideBoost\"),\n borsh.array(borsh.u8(), 8, \"multiplierTagBoost\"),\n borsh.u8(\"protocolTakeRatePct\"),\n borsh.u8(\"protocolLiquidationFeePct\"),\n borsh.u8(\"loanToValuePct\"),\n borsh.u8(\"liquidationThresholdPct\"),\n borsh.u16(\"minLiquidationBonusBps\"),\n borsh.u16(\"maxLiquidationBonusBps\"),\n borsh.u16(\"badDebtLiquidationBonusBps\"),\n borsh.u64(\"deleveragingMarginCallPeriodSecs\"),\n borsh.u64(\"deleveragingThresholdSlotsPerBps\"),\n types.ReserveFees.layout(\"fees\"),\n types.BorrowRateCurve.layout(\"borrowRateCurve\"),\n borsh.u64(\"borrowFactorPct\"),\n borsh.u64(\"depositLimit\"),\n borsh.u64(\"borrowLimit\"),\n types.TokenInfo.layout(\"tokenInfo\"),\n types.WithdrawalCaps.layout(\"depositWithdrawalCap\"),\n types.WithdrawalCaps.layout(\"debtWithdrawalCap\"),\n borsh.array(borsh.u8(), 20, \"elevationGroups\"),\n borsh.u8(\"disableUsageAsCollOutsideEmode\"),\n borsh.u8(\"utilizationLimitBlockBorrowingAbove\"),\n borsh.array(borsh.u8(), 2, \"reserved1\"),\n ],\n property\n )\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static fromDecoded(obj: any) {\n return new ReserveConfig({\n status: obj.status,\n assetTier: obj.assetTier,\n reserved0: obj.reserved0,\n multiplierSideBoost: obj.multiplierSideBoost,\n multiplierTagBoost: obj.multiplierTagBoost,\n protocolTakeRatePct: obj.protocolTakeRatePct,\n protocolLiquidationFeePct: obj.protocolLiquidationFeePct,\n loanToValuePct: obj.loanToValuePct,\n liquidationThresholdPct: obj.liquidationThresholdPct,\n minLiquidationBonusBps: obj.minLiquidationBonusBps,\n maxLiquidationBonusBps: obj.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: obj.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: obj.deleveragingMarginCallPeriodSecs,\n deleveragingThresholdSlotsPerBps: obj.deleveragingThresholdSlotsPerBps,\n fees: types.ReserveFees.fromDecoded(obj.fees),\n borrowRateCurve: types.BorrowRateCurve.fromDecoded(obj.borrowRateCurve),\n borrowFactorPct: obj.borrowFactorPct,\n depositLimit: obj.depositLimit,\n borrowLimit: obj.borrowLimit,\n tokenInfo: types.TokenInfo.fromDecoded(obj.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.fromDecoded(\n obj.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.fromDecoded(\n obj.debtWithdrawalCap\n ),\n elevationGroups: obj.elevationGroups,\n disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n obj.utilizationLimitBlockBorrowingAbove,\n reserved1: obj.reserved1,\n })\n }\n\n static toEncodable(fields: ReserveConfigFields) {\n return {\n status: fields.status,\n assetTier: fields.assetTier,\n reserved0: fields.reserved0,\n multiplierSideBoost: fields.multiplierSideBoost,\n multiplierTagBoost: fields.multiplierTagBoost,\n protocolTakeRatePct: fields.protocolTakeRatePct,\n protocolLiquidationFeePct: fields.protocolLiquidationFeePct,\n loanToValuePct: fields.loanToValuePct,\n liquidationThresholdPct: fields.liquidationThresholdPct,\n minLiquidationBonusBps: fields.minLiquidationBonusBps,\n maxLiquidationBonusBps: fields.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: fields.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: fields.deleveragingMarginCallPeriodSecs,\n deleveragingThresholdSlotsPerBps: fields.deleveragingThresholdSlotsPerBps,\n fees: types.ReserveFees.toEncodable(fields.fees),\n borrowRateCurve: types.BorrowRateCurve.toEncodable(\n fields.borrowRateCurve\n ),\n borrowFactorPct: fields.borrowFactorPct,\n depositLimit: fields.depositLimit,\n borrowLimit: fields.borrowLimit,\n tokenInfo: types.TokenInfo.toEncodable(fields.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.toEncodable(\n fields.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.toEncodable(\n fields.debtWithdrawalCap\n ),\n elevationGroups: fields.elevationGroups,\n disableUsageAsCollOutsideEmode: fields.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n fields.utilizationLimitBlockBorrowingAbove,\n reserved1: fields.reserved1,\n }\n }\n\n toJSON(): ReserveConfigJSON {\n return {\n status: this.status,\n assetTier: this.assetTier,\n reserved0: this.reserved0,\n multiplierSideBoost: this.multiplierSideBoost,\n multiplierTagBoost: this.multiplierTagBoost,\n protocolTakeRatePct: this.protocolTakeRatePct,\n protocolLiquidationFeePct: this.protocolLiquidationFeePct,\n loanToValuePct: this.loanToValuePct,\n liquidationThresholdPct: this.liquidationThresholdPct,\n minLiquidationBonusBps: this.minLiquidationBonusBps,\n maxLiquidationBonusBps: this.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: this.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs:\n this.deleveragingMarginCallPeriodSecs.toString(),\n deleveragingThresholdSlotsPerBps:\n this.deleveragingThresholdSlotsPerBps.toString(),\n fees: this.fees.toJSON(),\n borrowRateCurve: this.borrowRateCurve.toJSON(),\n borrowFactorPct: this.borrowFactorPct.toString(),\n depositLimit: this.depositLimit.toString(),\n borrowLimit: this.borrowLimit.toString(),\n tokenInfo: this.tokenInfo.toJSON(),\n depositWithdrawalCap: this.depositWithdrawalCap.toJSON(),\n debtWithdrawalCap: this.debtWithdrawalCap.toJSON(),\n elevationGroups: this.elevationGroups,\n disableUsageAsCollOutsideEmode: this.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n this.utilizationLimitBlockBorrowingAbove,\n reserved1: this.reserved1,\n }\n }\n\n static fromJSON(obj: ReserveConfigJSON): ReserveConfig {\n return new ReserveConfig({\n status: obj.status,\n assetTier: obj.assetTier,\n reserved0: obj.reserved0,\n multiplierSideBoost: obj.multiplierSideBoost,\n multiplierTagBoost: obj.multiplierTagBoost,\n protocolTakeRatePct: obj.protocolTakeRatePct,\n protocolLiquidationFeePct: obj.protocolLiquidationFeePct,\n loanToValuePct: obj.loanToValuePct,\n liquidationThresholdPct: obj.liquidationThresholdPct,\n minLiquidationBonusBps: obj.minLiquidationBonusBps,\n maxLiquidationBonusBps: obj.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: obj.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: new BN(\n obj.deleveragingMarginCallPeriodSecs\n ),\n deleveragingThresholdSlotsPerBps: new BN(\n obj.deleveragingThresholdSlotsPerBps\n ),\n fees: types.ReserveFees.fromJSON(obj.fees),\n borrowRateCurve: types.BorrowRateCurve.fromJSON(obj.borrowRateCurve),\n borrowFactorPct: new BN(obj.borrowFactorPct),\n depositLimit: new BN(obj.depositLimit),\n borrowLimit: new BN(obj.borrowLimit),\n tokenInfo: types.TokenInfo.fromJSON(obj.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.fromJSON(\n obj.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.fromJSON(obj.debtWithdrawalCap),\n elevationGroups: obj.elevationGroups,\n disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n obj.utilizationLimitBlockBorrowingAbove,\n reserved1: obj.reserved1,\n })\n }\n\n toEncodable() {\n return ReserveConfig.toEncodable(this)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ReserveConfig.js","sourceRoot":"","sources":["../../../src/idl_codegen/types/ReserveConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAsB,CAAC,wDAAwD;AAC/E,gDAAiC,CAAC,wDAAwD;AAC1F,wDAAyC;AA8IzC,mCAAmC;AACnC,MAAa,aAAa;IAqExB,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,wBAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAA;QAC/D,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAA;QACrD,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAA;QACnD,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAA;QACrD,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAA;QACjE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAA;QAC3C,IAAI,CAAC,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,CAAA;QAC7D,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAA;QAC3D,IAAI,CAAC,sBAAsB,GAAG,MAAM,C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AC,IAAI,eAAE,CAAC,IAAI,CAAC,CACvB;SACJ,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,OAAO,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;CACF;AAhUD,sCAgUC","sourcesContent":["import { PublicKey } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\"\n\nexport interface ReserveConfigFields {\n /** Status of the reserve Active/Obsolete/Hidden */\n status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n assetTier: number\n /** Flat rate that goes to the host */\n hostFixedInterestRateBps: number\n /** Boost for side (debt or collateral) */\n multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n deleveragingMarginCallPeriodSecs: BN\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n deleveragingThresholdSlotsPerBps: BN\n /** Program owner fees assessed, separate from gains due to interest accrual */\n fees: types.ReserveFeesFields\n /** Borrow rate curve based on utilization */\n borrowRateCurve: types.BorrowRateCurveFields\n /** Borrow factor in percentage - used for risk adjustment */\n borrowFactorPct: BN\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n depositLimit: BN\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n borrowLimit: BN\n /** Token id from TokenInfos struct */\n tokenInfo: types.TokenInfoFields\n /** Deposit withdrawl caps - deposit & redeem */\n depositWithdrawalCap: types.WithdrawalCapsFields\n /** Debt withdrawl caps - borrow & repay */\n debtWithdrawalCap: types.WithdrawalCapsFields\n elevationGroups: Array<number>\n disableUsageAsCollOutsideEmode: number\n utilizationLimitBlockBorrowingAbove: number\n reserved1: Array<number>\n /**\n * Maximum amount liquidity of this reserve borrowed outside all elevation groups\n * - u64::MAX for inf\n * - 0 to disable borrows outside elevation groups\n */\n borrowLimitOutsideElevationGroup: BN\n /**\n * Defines the maximum amount (in lamports of elevation group debt asset)\n * that can be borrowed when this reserve is used as collateral.\n * - u64::MAX for inf\n * - 0 to disable borrows in this elevation group (expected value for the debt asset)\n */\n borrowLimitAgainstThisCollateralInElevationGroup: Array<BN>\n}\n\nexport interface ReserveConfigJSON {\n /** Status of the reserve Active/Obsolete/Hidden */\n status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n assetTier: number\n /** Flat rate that goes to the host */\n hostFixedInterestRateBps: number\n /** Boost for side (debt or collateral) */\n multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n deleveragingMarginCallPeriodSecs: string\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n deleveragingThresholdSlotsPerBps: string\n /** Program owner fees assessed, separate from gains due to interest accrual */\n fees: types.ReserveFeesJSON\n /** Borrow rate curve based on utilization */\n borrowRateCurve: types.BorrowRateCurveJSON\n /** Borrow factor in percentage - used for risk adjustment */\n borrowFactorPct: string\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n depositLimit: string\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n borrowLimit: string\n /** Token id from TokenInfos struct */\n tokenInfo: types.TokenInfoJSON\n /** Deposit withdrawl caps - deposit & redeem */\n depositWithdrawalCap: types.WithdrawalCapsJSON\n /** Debt withdrawl caps - borrow & repay */\n debtWithdrawalCap: types.WithdrawalCapsJSON\n elevationGroups: Array<number>\n disableUsageAsCollOutsideEmode: number\n utilizationLimitBlockBorrowingAbove: number\n reserved1: Array<number>\n /**\n * Maximum amount liquidity of this reserve borrowed outside all elevation groups\n * - u64::MAX for inf\n * - 0 to disable borrows outside elevation groups\n */\n borrowLimitOutsideElevationGroup: string\n /**\n * Defines the maximum amount (in lamports of elevation group debt asset)\n * that can be borrowed when this reserve is used as collateral.\n * - u64::MAX for inf\n * - 0 to disable borrows in this elevation group (expected value for the debt asset)\n */\n borrowLimitAgainstThisCollateralInElevationGroup: Array<string>\n}\n\n/** Reserve configuration values */\nexport class ReserveConfig {\n /** Status of the reserve Active/Obsolete/Hidden */\n readonly status: number\n /** Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt */\n readonly assetTier: number\n /** Flat rate that goes to the host */\n readonly hostFixedInterestRateBps: number\n /** Boost for side (debt or collateral) */\n readonly multiplierSideBoost: Array<number>\n /** Reward points multiplier per obligation type */\n readonly multiplierTagBoost: Array<number>\n /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */\n readonly protocolTakeRatePct: number\n /** Cut of the liquidation bonus that the protocol receives, as a percentage */\n readonly protocolLiquidationFeePct: number\n /**\n * Target ratio of the value of borrows to deposits, as a percentage\n * 0 if use as collateral is disabled\n */\n readonly loanToValuePct: number\n /** Loan to value ratio at which an obligation can be liquidated, as percentage */\n readonly liquidationThresholdPct: number\n /** Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n readonly minLiquidationBonusBps: number\n /** Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps */\n readonly maxLiquidationBonusBps: number\n /** Bad debt liquidation bonus for an undercollateralized obligation, as bps */\n readonly badDebtLiquidationBonusBps: number\n /** Time in seconds that must pass before redemptions are enabled after the deposit limit is crossed */\n readonly deleveragingMarginCallPeriodSecs: BN\n /**\n * The rate at which the deleveraging threshold decreases in slots per bps\n * e.g. 1 bps per hour would be 7200 slots per bps (assuming 2 slots per second)\n */\n readonly deleveragingThresholdSlotsPerBps: BN\n /** Program owner fees assessed, separate from gains due to interest accrual */\n readonly fees: types.ReserveFees\n /** Borrow rate curve based on utilization */\n readonly borrowRateCurve: types.BorrowRateCurve\n /** Borrow factor in percentage - used for risk adjustment */\n readonly borrowFactorPct: BN\n /** Maximum deposit limit of liquidity in native units, u64::MAX for inf */\n readonly depositLimit: BN\n /** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */\n readonly borrowLimit: BN\n /** Token id from TokenInfos struct */\n readonly tokenInfo: types.TokenInfo\n /** Deposit withdrawl caps - deposit & redeem */\n readonly depositWithdrawalCap: types.WithdrawalCaps\n /** Debt withdrawl caps - borrow & repay */\n readonly debtWithdrawalCap: types.WithdrawalCaps\n readonly elevationGroups: Array<number>\n readonly disableUsageAsCollOutsideEmode: number\n readonly utilizationLimitBlockBorrowingAbove: number\n readonly reserved1: Array<number>\n /**\n * Maximum amount liquidity of this reserve borrowed outside all elevation groups\n * - u64::MAX for inf\n * - 0 to disable borrows outside elevation groups\n */\n readonly borrowLimitOutsideElevationGroup: BN\n /**\n * Defines the maximum amount (in lamports of elevation group debt asset)\n * that can be borrowed when this reserve is used as collateral.\n * - u64::MAX for inf\n * - 0 to disable borrows in this elevation group (expected value for the debt asset)\n */\n readonly borrowLimitAgainstThisCollateralInElevationGroup: Array<BN>\n\n constructor(fields: ReserveConfigFields) {\n this.status = fields.status\n this.assetTier = fields.assetTier\n this.hostFixedInterestRateBps = fields.hostFixedInterestRateBps\n this.multiplierSideBoost = fields.multiplierSideBoost\n this.multiplierTagBoost = fields.multiplierTagBoost\n this.protocolTakeRatePct = fields.protocolTakeRatePct\n this.protocolLiquidationFeePct = fields.protocolLiquidationFeePct\n this.loanToValuePct = fields.loanToValuePct\n this.liquidationThresholdPct = fields.liquidationThresholdPct\n this.minLiquidationBonusBps = fields.minLiquidationBonusBps\n this.maxLiquidationBonusBps = fields.maxLiquidationBonusBps\n this.badDebtLiquidationBonusBps = fields.badDebtLiquidationBonusBps\n this.deleveragingMarginCallPeriodSecs =\n fields.deleveragingMarginCallPeriodSecs\n this.deleveragingThresholdSlotsPerBps =\n fields.deleveragingThresholdSlotsPerBps\n this.fees = new types.ReserveFees({ ...fields.fees })\n this.borrowRateCurve = new types.BorrowRateCurve({\n ...fields.borrowRateCurve,\n })\n this.borrowFactorPct = fields.borrowFactorPct\n this.depositLimit = fields.depositLimit\n this.borrowLimit = fields.borrowLimit\n this.tokenInfo = new types.TokenInfo({ ...fields.tokenInfo })\n this.depositWithdrawalCap = new types.WithdrawalCaps({\n ...fields.depositWithdrawalCap,\n })\n this.debtWithdrawalCap = new types.WithdrawalCaps({\n ...fields.debtWithdrawalCap,\n })\n this.elevationGroups = fields.elevationGroups\n this.disableUsageAsCollOutsideEmode = fields.disableUsageAsCollOutsideEmode\n this.utilizationLimitBlockBorrowingAbove =\n fields.utilizationLimitBlockBorrowingAbove\n this.reserved1 = fields.reserved1\n this.borrowLimitOutsideElevationGroup =\n fields.borrowLimitOutsideElevationGroup\n this.borrowLimitAgainstThisCollateralInElevationGroup =\n fields.borrowLimitAgainstThisCollateralInElevationGroup\n }\n\n static layout(property?: string) {\n return borsh.struct(\n [\n borsh.u8(\"status\"),\n borsh.u8(\"assetTier\"),\n borsh.u16(\"hostFixedInterestRateBps\"),\n borsh.array(borsh.u8(), 2, \"multiplierSideBoost\"),\n borsh.array(borsh.u8(), 8, \"multiplierTagBoost\"),\n borsh.u8(\"protocolTakeRatePct\"),\n borsh.u8(\"protocolLiquidationFeePct\"),\n borsh.u8(\"loanToValuePct\"),\n borsh.u8(\"liquidationThresholdPct\"),\n borsh.u16(\"minLiquidationBonusBps\"),\n borsh.u16(\"maxLiquidationBonusBps\"),\n borsh.u16(\"badDebtLiquidationBonusBps\"),\n borsh.u64(\"deleveragingMarginCallPeriodSecs\"),\n borsh.u64(\"deleveragingThresholdSlotsPerBps\"),\n types.ReserveFees.layout(\"fees\"),\n types.BorrowRateCurve.layout(\"borrowRateCurve\"),\n borsh.u64(\"borrowFactorPct\"),\n borsh.u64(\"depositLimit\"),\n borsh.u64(\"borrowLimit\"),\n types.TokenInfo.layout(\"tokenInfo\"),\n types.WithdrawalCaps.layout(\"depositWithdrawalCap\"),\n types.WithdrawalCaps.layout(\"debtWithdrawalCap\"),\n borsh.array(borsh.u8(), 20, \"elevationGroups\"),\n borsh.u8(\"disableUsageAsCollOutsideEmode\"),\n borsh.u8(\"utilizationLimitBlockBorrowingAbove\"),\n borsh.array(borsh.u8(), 2, \"reserved1\"),\n borsh.u64(\"borrowLimitOutsideElevationGroup\"),\n borsh.array(\n borsh.u64(),\n 32,\n \"borrowLimitAgainstThisCollateralInElevationGroup\"\n ),\n ],\n property\n )\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static fromDecoded(obj: any) {\n return new ReserveConfig({\n status: obj.status,\n assetTier: obj.assetTier,\n hostFixedInterestRateBps: obj.hostFixedInterestRateBps,\n multiplierSideBoost: obj.multiplierSideBoost,\n multiplierTagBoost: obj.multiplierTagBoost,\n protocolTakeRatePct: obj.protocolTakeRatePct,\n protocolLiquidationFeePct: obj.protocolLiquidationFeePct,\n loanToValuePct: obj.loanToValuePct,\n liquidationThresholdPct: obj.liquidationThresholdPct,\n minLiquidationBonusBps: obj.minLiquidationBonusBps,\n maxLiquidationBonusBps: obj.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: obj.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: obj.deleveragingMarginCallPeriodSecs,\n deleveragingThresholdSlotsPerBps: obj.deleveragingThresholdSlotsPerBps,\n fees: types.ReserveFees.fromDecoded(obj.fees),\n borrowRateCurve: types.BorrowRateCurve.fromDecoded(obj.borrowRateCurve),\n borrowFactorPct: obj.borrowFactorPct,\n depositLimit: obj.depositLimit,\n borrowLimit: obj.borrowLimit,\n tokenInfo: types.TokenInfo.fromDecoded(obj.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.fromDecoded(\n obj.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.fromDecoded(\n obj.debtWithdrawalCap\n ),\n elevationGroups: obj.elevationGroups,\n disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n obj.utilizationLimitBlockBorrowingAbove,\n reserved1: obj.reserved1,\n borrowLimitOutsideElevationGroup: obj.borrowLimitOutsideElevationGroup,\n borrowLimitAgainstThisCollateralInElevationGroup:\n obj.borrowLimitAgainstThisCollateralInElevationGroup,\n })\n }\n\n static toEncodable(fields: ReserveConfigFields) {\n return {\n status: fields.status,\n assetTier: fields.assetTier,\n hostFixedInterestRateBps: fields.hostFixedInterestRateBps,\n multiplierSideBoost: fields.multiplierSideBoost,\n multiplierTagBoost: fields.multiplierTagBoost,\n protocolTakeRatePct: fields.protocolTakeRatePct,\n protocolLiquidationFeePct: fields.protocolLiquidationFeePct,\n loanToValuePct: fields.loanToValuePct,\n liquidationThresholdPct: fields.liquidationThresholdPct,\n minLiquidationBonusBps: fields.minLiquidationBonusBps,\n maxLiquidationBonusBps: fields.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: fields.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: fields.deleveragingMarginCallPeriodSecs,\n deleveragingThresholdSlotsPerBps: fields.deleveragingThresholdSlotsPerBps,\n fees: types.ReserveFees.toEncodable(fields.fees),\n borrowRateCurve: types.BorrowRateCurve.toEncodable(\n fields.borrowRateCurve\n ),\n borrowFactorPct: fields.borrowFactorPct,\n depositLimit: fields.depositLimit,\n borrowLimit: fields.borrowLimit,\n tokenInfo: types.TokenInfo.toEncodable(fields.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.toEncodable(\n fields.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.toEncodable(\n fields.debtWithdrawalCap\n ),\n elevationGroups: fields.elevationGroups,\n disableUsageAsCollOutsideEmode: fields.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n fields.utilizationLimitBlockBorrowingAbove,\n reserved1: fields.reserved1,\n borrowLimitOutsideElevationGroup: fields.borrowLimitOutsideElevationGroup,\n borrowLimitAgainstThisCollateralInElevationGroup:\n fields.borrowLimitAgainstThisCollateralInElevationGroup,\n }\n }\n\n toJSON(): ReserveConfigJSON {\n return {\n status: this.status,\n assetTier: this.assetTier,\n hostFixedInterestRateBps: this.hostFixedInterestRateBps,\n multiplierSideBoost: this.multiplierSideBoost,\n multiplierTagBoost: this.multiplierTagBoost,\n protocolTakeRatePct: this.protocolTakeRatePct,\n protocolLiquidationFeePct: this.protocolLiquidationFeePct,\n loanToValuePct: this.loanToValuePct,\n liquidationThresholdPct: this.liquidationThresholdPct,\n minLiquidationBonusBps: this.minLiquidationBonusBps,\n maxLiquidationBonusBps: this.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: this.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs:\n this.deleveragingMarginCallPeriodSecs.toString(),\n deleveragingThresholdSlotsPerBps:\n this.deleveragingThresholdSlotsPerBps.toString(),\n fees: this.fees.toJSON(),\n borrowRateCurve: this.borrowRateCurve.toJSON(),\n borrowFactorPct: this.borrowFactorPct.toString(),\n depositLimit: this.depositLimit.toString(),\n borrowLimit: this.borrowLimit.toString(),\n tokenInfo: this.tokenInfo.toJSON(),\n depositWithdrawalCap: this.depositWithdrawalCap.toJSON(),\n debtWithdrawalCap: this.debtWithdrawalCap.toJSON(),\n elevationGroups: this.elevationGroups,\n disableUsageAsCollOutsideEmode: this.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n this.utilizationLimitBlockBorrowingAbove,\n reserved1: this.reserved1,\n borrowLimitOutsideElevationGroup:\n this.borrowLimitOutsideElevationGroup.toString(),\n borrowLimitAgainstThisCollateralInElevationGroup:\n this.borrowLimitAgainstThisCollateralInElevationGroup.map((item) =>\n item.toString()\n ),\n }\n }\n\n static fromJSON(obj: ReserveConfigJSON): ReserveConfig {\n return new ReserveConfig({\n status: obj.status,\n assetTier: obj.assetTier,\n hostFixedInterestRateBps: obj.hostFixedInterestRateBps,\n multiplierSideBoost: obj.multiplierSideBoost,\n multiplierTagBoost: obj.multiplierTagBoost,\n protocolTakeRatePct: obj.protocolTakeRatePct,\n protocolLiquidationFeePct: obj.protocolLiquidationFeePct,\n loanToValuePct: obj.loanToValuePct,\n liquidationThresholdPct: obj.liquidationThresholdPct,\n minLiquidationBonusBps: obj.minLiquidationBonusBps,\n maxLiquidationBonusBps: obj.maxLiquidationBonusBps,\n badDebtLiquidationBonusBps: obj.badDebtLiquidationBonusBps,\n deleveragingMarginCallPeriodSecs: new BN(\n obj.deleveragingMarginCallPeriodSecs\n ),\n deleveragingThresholdSlotsPerBps: new BN(\n obj.deleveragingThresholdSlotsPerBps\n ),\n fees: types.ReserveFees.fromJSON(obj.fees),\n borrowRateCurve: types.BorrowRateCurve.fromJSON(obj.borrowRateCurve),\n borrowFactorPct: new BN(obj.borrowFactorPct),\n depositLimit: new BN(obj.depositLimit),\n borrowLimit: new BN(obj.borrowLimit),\n tokenInfo: types.TokenInfo.fromJSON(obj.tokenInfo),\n depositWithdrawalCap: types.WithdrawalCaps.fromJSON(\n obj.depositWithdrawalCap\n ),\n debtWithdrawalCap: types.WithdrawalCaps.fromJSON(obj.debtWithdrawalCap),\n elevationGroups: obj.elevationGroups,\n disableUsageAsCollOutsideEmode: obj.disableUsageAsCollOutsideEmode,\n utilizationLimitBlockBorrowingAbove:\n obj.utilizationLimitBlockBorrowingAbove,\n reserved1: obj.reserved1,\n borrowLimitOutsideElevationGroup: new BN(\n obj.borrowLimitOutsideElevationGroup\n ),\n borrowLimitAgainstThisCollateralInElevationGroup:\n obj.borrowLimitAgainstThisCollateralInElevationGroup.map(\n (item) => new BN(item)\n ),\n })\n }\n\n toEncodable() {\n return ReserveConfig.toEncodable(this)\n }\n}\n"]}
|
|
@@ -572,6 +572,45 @@ export declare class UpdateBlockPriceUsage {
|
|
|
572
572
|
UpdateBlockPriceUsage: {};
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
+
export interface UpdateBorrowLimitOutsideElevationGroupJSON {
|
|
576
|
+
kind: "UpdateBorrowLimitOutsideElevationGroup";
|
|
577
|
+
}
|
|
578
|
+
export declare class UpdateBorrowLimitOutsideElevationGroup {
|
|
579
|
+
static readonly discriminator = 44;
|
|
580
|
+
static readonly kind = "UpdateBorrowLimitOutsideElevationGroup";
|
|
581
|
+
readonly discriminator = 44;
|
|
582
|
+
readonly kind = "UpdateBorrowLimitOutsideElevationGroup";
|
|
583
|
+
toJSON(): UpdateBorrowLimitOutsideElevationGroupJSON;
|
|
584
|
+
toEncodable(): {
|
|
585
|
+
UpdateBorrowLimitOutsideElevationGroup: {};
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
export interface UpdateBorrowLimitsInElevationGroupAgainstThisReserveJSON {
|
|
589
|
+
kind: "UpdateBorrowLimitsInElevationGroupAgainstThisReserve";
|
|
590
|
+
}
|
|
591
|
+
export declare class UpdateBorrowLimitsInElevationGroupAgainstThisReserve {
|
|
592
|
+
static readonly discriminator = 45;
|
|
593
|
+
static readonly kind = "UpdateBorrowLimitsInElevationGroupAgainstThisReserve";
|
|
594
|
+
readonly discriminator = 45;
|
|
595
|
+
readonly kind = "UpdateBorrowLimitsInElevationGroupAgainstThisReserve";
|
|
596
|
+
toJSON(): UpdateBorrowLimitsInElevationGroupAgainstThisReserveJSON;
|
|
597
|
+
toEncodable(): {
|
|
598
|
+
UpdateBorrowLimitsInElevationGroupAgainstThisReserve: {};
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
export interface UpdateHostFixedInterestRateBpsJSON {
|
|
602
|
+
kind: "UpdateHostFixedInterestRateBps";
|
|
603
|
+
}
|
|
604
|
+
export declare class UpdateHostFixedInterestRateBps {
|
|
605
|
+
static readonly discriminator = 46;
|
|
606
|
+
static readonly kind = "UpdateHostFixedInterestRateBps";
|
|
607
|
+
readonly discriminator = 46;
|
|
608
|
+
readonly kind = "UpdateHostFixedInterestRateBps";
|
|
609
|
+
toJSON(): UpdateHostFixedInterestRateBpsJSON;
|
|
610
|
+
toEncodable(): {
|
|
611
|
+
UpdateHostFixedInterestRateBps: {};
|
|
612
|
+
};
|
|
613
|
+
}
|
|
575
614
|
export declare function fromDecoded(obj: any): types.UpdateConfigModeKind;
|
|
576
615
|
export declare function fromJSON(obj: types.UpdateConfigModeJSON): types.UpdateConfigModeKind;
|
|
577
616
|
export declare function layout(property?: string): borsh.EnumLayout<unknown>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.layout = exports.fromJSON = exports.fromDecoded = exports.UpdateBlockPriceUsage = exports.UpdateBlockBorrowingAboveUtilization = exports.UpdateDisableUsageAsCollateralOutsideEmode = exports.UpdateFarmDebt = exports.UpdateFarmCollateral = exports.UpdateReserveStatus = exports.UpdateMultiplierTagBoost = exports.UpdateMultiplierSideBoost = exports.DeleveragingThresholdSlotsPerBps = exports.UpdateElevationGroup = exports.UpdateAssetTier = exports.UpdateBorrowFactor = exports.DeleveragingMarginCallPeriod = exports.UpdateMinLiquidationBonusBps = exports.UpdateBadDebtLiquidationBonusBps = exports.UpdateDepositWithdrawalCapCurrentTotal = exports.UpdateDebtWithdrawalCapCurrentTotal = exports.UpdateDepositWithdrawalCap = exports.UpdateDebtWithdrawalCap = exports.UpdateEntireReserveConfig = exports.UpdateBorrowRateCurve = exports.UpdateSwitchboardTwapFeed = exports.UpdateSwitchboardFeed = exports.UpdatePythPrice = exports.UpdateScopePriceFeed = exports.UpdateTokenInfoTwapMaxAge = exports.UpdateTokenInfoPriceMaxAge = exports.UpdateTokenInfoName = exports.UpdateTokenInfoScopeChain = exports.UpdateTokenInfoScopeTwap = exports.UpdateTokenInfoTwapDivergence = exports.UpdateTokenInfoExpHeuristic = exports.UpdateTokenInfoUpperHeuristic = exports.UpdateTokenInfoLowerHeuristic = exports.UpdateBorrowLimit = exports.UpdateDepositLimit = exports.UpdateFeesReferralFeeBps = exports.UpdateFeesFlashLoanFee = exports.UpdateFeesBorrowFee = exports.UpdateProtocolTakeRate = exports.UpdateProtocolLiquidationFee = exports.UpdateLiquidationThresholdPct = exports.UpdateMaxLiquidationBonusBps = exports.UpdateLoanToValuePct = void 0;
|
|
26
|
+
exports.layout = exports.fromJSON = exports.fromDecoded = exports.UpdateHostFixedInterestRateBps = exports.UpdateBorrowLimitsInElevationGroupAgainstThisReserve = exports.UpdateBorrowLimitOutsideElevationGroup = exports.UpdateBlockPriceUsage = exports.UpdateBlockBorrowingAboveUtilization = exports.UpdateDisableUsageAsCollateralOutsideEmode = exports.UpdateFarmDebt = exports.UpdateFarmCollateral = exports.UpdateReserveStatus = exports.UpdateMultiplierTagBoost = exports.UpdateMultiplierSideBoost = exports.DeleveragingThresholdSlotsPerBps = exports.UpdateElevationGroup = exports.UpdateAssetTier = exports.UpdateBorrowFactor = exports.DeleveragingMarginCallPeriod = exports.UpdateMinLiquidationBonusBps = exports.UpdateBadDebtLiquidationBonusBps = exports.UpdateDepositWithdrawalCapCurrentTotal = exports.UpdateDebtWithdrawalCapCurrentTotal = exports.UpdateDepositWithdrawalCap = exports.UpdateDebtWithdrawalCap = exports.UpdateEntireReserveConfig = exports.UpdateBorrowRateCurve = exports.UpdateSwitchboardTwapFeed = exports.UpdateSwitchboardFeed = exports.UpdatePythPrice = exports.UpdateScopePriceFeed = exports.UpdateTokenInfoTwapMaxAge = exports.UpdateTokenInfoPriceMaxAge = exports.UpdateTokenInfoName = exports.UpdateTokenInfoScopeChain = exports.UpdateTokenInfoScopeTwap = exports.UpdateTokenInfoTwapDivergence = exports.UpdateTokenInfoExpHeuristic = exports.UpdateTokenInfoUpperHeuristic = exports.UpdateTokenInfoLowerHeuristic = exports.UpdateBorrowLimit = exports.UpdateDepositLimit = exports.UpdateFeesReferralFeeBps = exports.UpdateFeesFlashLoanFee = exports.UpdateFeesBorrowFee = exports.UpdateProtocolTakeRate = exports.UpdateProtocolLiquidationFee = exports.UpdateLiquidationThresholdPct = exports.UpdateMaxLiquidationBonusBps = exports.UpdateLoanToValuePct = void 0;
|
|
27
27
|
const borsh = __importStar(require("@coral-xyz/borsh"));
|
|
28
28
|
class UpdateLoanToValuePct {
|
|
29
29
|
constructor() {
|
|
@@ -861,6 +861,63 @@ class UpdateBlockPriceUsage {
|
|
|
861
861
|
exports.UpdateBlockPriceUsage = UpdateBlockPriceUsage;
|
|
862
862
|
UpdateBlockPriceUsage.discriminator = 43;
|
|
863
863
|
UpdateBlockPriceUsage.kind = "UpdateBlockPriceUsage";
|
|
864
|
+
class UpdateBorrowLimitOutsideElevationGroup {
|
|
865
|
+
constructor() {
|
|
866
|
+
this.discriminator = 44;
|
|
867
|
+
this.kind = "UpdateBorrowLimitOutsideElevationGroup";
|
|
868
|
+
}
|
|
869
|
+
toJSON() {
|
|
870
|
+
return {
|
|
871
|
+
kind: "UpdateBorrowLimitOutsideElevationGroup",
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
toEncodable() {
|
|
875
|
+
return {
|
|
876
|
+
UpdateBorrowLimitOutsideElevationGroup: {},
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
exports.UpdateBorrowLimitOutsideElevationGroup = UpdateBorrowLimitOutsideElevationGroup;
|
|
881
|
+
UpdateBorrowLimitOutsideElevationGroup.discriminator = 44;
|
|
882
|
+
UpdateBorrowLimitOutsideElevationGroup.kind = "UpdateBorrowLimitOutsideElevationGroup";
|
|
883
|
+
class UpdateBorrowLimitsInElevationGroupAgainstThisReserve {
|
|
884
|
+
constructor() {
|
|
885
|
+
this.discriminator = 45;
|
|
886
|
+
this.kind = "UpdateBorrowLimitsInElevationGroupAgainstThisReserve";
|
|
887
|
+
}
|
|
888
|
+
toJSON() {
|
|
889
|
+
return {
|
|
890
|
+
kind: "UpdateBorrowLimitsInElevationGroupAgainstThisReserve",
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
toEncodable() {
|
|
894
|
+
return {
|
|
895
|
+
UpdateBorrowLimitsInElevationGroupAgainstThisReserve: {},
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
exports.UpdateBorrowLimitsInElevationGroupAgainstThisReserve = UpdateBorrowLimitsInElevationGroupAgainstThisReserve;
|
|
900
|
+
UpdateBorrowLimitsInElevationGroupAgainstThisReserve.discriminator = 45;
|
|
901
|
+
UpdateBorrowLimitsInElevationGroupAgainstThisReserve.kind = "UpdateBorrowLimitsInElevationGroupAgainstThisReserve";
|
|
902
|
+
class UpdateHostFixedInterestRateBps {
|
|
903
|
+
constructor() {
|
|
904
|
+
this.discriminator = 46;
|
|
905
|
+
this.kind = "UpdateHostFixedInterestRateBps";
|
|
906
|
+
}
|
|
907
|
+
toJSON() {
|
|
908
|
+
return {
|
|
909
|
+
kind: "UpdateHostFixedInterestRateBps",
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
toEncodable() {
|
|
913
|
+
return {
|
|
914
|
+
UpdateHostFixedInterestRateBps: {},
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
exports.UpdateHostFixedInterestRateBps = UpdateHostFixedInterestRateBps;
|
|
919
|
+
UpdateHostFixedInterestRateBps.discriminator = 46;
|
|
920
|
+
UpdateHostFixedInterestRateBps.kind = "UpdateHostFixedInterestRateBps";
|
|
864
921
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
865
922
|
function fromDecoded(obj) {
|
|
866
923
|
if (typeof obj !== "object") {
|
|
@@ -998,6 +1055,15 @@ function fromDecoded(obj) {
|
|
|
998
1055
|
if ("UpdateBlockPriceUsage" in obj) {
|
|
999
1056
|
return new UpdateBlockPriceUsage();
|
|
1000
1057
|
}
|
|
1058
|
+
if ("UpdateBorrowLimitOutsideElevationGroup" in obj) {
|
|
1059
|
+
return new UpdateBorrowLimitOutsideElevationGroup();
|
|
1060
|
+
}
|
|
1061
|
+
if ("UpdateBorrowLimitsInElevationGroupAgainstThisReserve" in obj) {
|
|
1062
|
+
return new UpdateBorrowLimitsInElevationGroupAgainstThisReserve();
|
|
1063
|
+
}
|
|
1064
|
+
if ("UpdateHostFixedInterestRateBps" in obj) {
|
|
1065
|
+
return new UpdateHostFixedInterestRateBps();
|
|
1066
|
+
}
|
|
1001
1067
|
throw new Error("Invalid enum object");
|
|
1002
1068
|
}
|
|
1003
1069
|
exports.fromDecoded = fromDecoded;
|
|
@@ -1135,6 +1201,15 @@ function fromJSON(obj) {
|
|
|
1135
1201
|
case "UpdateBlockPriceUsage": {
|
|
1136
1202
|
return new UpdateBlockPriceUsage();
|
|
1137
1203
|
}
|
|
1204
|
+
case "UpdateBorrowLimitOutsideElevationGroup": {
|
|
1205
|
+
return new UpdateBorrowLimitOutsideElevationGroup();
|
|
1206
|
+
}
|
|
1207
|
+
case "UpdateBorrowLimitsInElevationGroupAgainstThisReserve": {
|
|
1208
|
+
return new UpdateBorrowLimitsInElevationGroupAgainstThisReserve();
|
|
1209
|
+
}
|
|
1210
|
+
case "UpdateHostFixedInterestRateBps": {
|
|
1211
|
+
return new UpdateHostFixedInterestRateBps();
|
|
1212
|
+
}
|
|
1138
1213
|
}
|
|
1139
1214
|
}
|
|
1140
1215
|
exports.fromJSON = fromJSON;
|
|
@@ -1184,6 +1259,9 @@ function layout(property) {
|
|
|
1184
1259
|
borsh.struct([], "UpdateDisableUsageAsCollateralOutsideEmode"),
|
|
1185
1260
|
borsh.struct([], "UpdateBlockBorrowingAboveUtilization"),
|
|
1186
1261
|
borsh.struct([], "UpdateBlockPriceUsage"),
|
|
1262
|
+
borsh.struct([], "UpdateBorrowLimitOutsideElevationGroup"),
|
|
1263
|
+
borsh.struct([], "UpdateBorrowLimitsInElevationGroupAgainstThisReserve"),
|
|
1264
|
+
borsh.struct([], "UpdateHostFixedInterestRateBps"),
|
|
1187
1265
|
]);
|
|
1188
1266
|
if (property !== undefined) {
|
|
1189
1267
|
return ret.replicate(property);
|