@kamino-finance/klend-sdk 5.11.18 → 5.12.1

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.
Files changed (112) hide show
  1. package/dist/classes/action.d.ts +9 -1
  2. package/dist/classes/action.d.ts.map +1 -1
  3. package/dist/classes/action.js +15 -1
  4. package/dist/classes/action.js.map +1 -1
  5. package/dist/classes/fraction.d.ts +6 -5
  6. package/dist/classes/fraction.d.ts.map +1 -1
  7. package/dist/classes/fraction.js +13 -8
  8. package/dist/classes/fraction.js.map +1 -1
  9. package/dist/classes/manager.d.ts +3 -2
  10. package/dist/classes/manager.d.ts.map +1 -1
  11. package/dist/classes/manager.js +13 -2
  12. package/dist/classes/manager.js.map +1 -1
  13. package/dist/classes/obligation.d.ts +54 -1
  14. package/dist/classes/obligation.d.ts.map +1 -1
  15. package/dist/classes/obligation.js +47 -1
  16. package/dist/classes/obligation.js.map +1 -1
  17. package/dist/classes/obligationOrder.d.ts +206 -0
  18. package/dist/classes/obligationOrder.d.ts.map +1 -0
  19. package/dist/classes/obligationOrder.js +359 -0
  20. package/dist/classes/obligationOrder.js.map +1 -0
  21. package/dist/classes/reserve.d.ts +5 -5
  22. package/dist/classes/reserve.d.ts.map +1 -1
  23. package/dist/classes/reserve.js +80 -264
  24. package/dist/classes/reserve.js.map +1 -1
  25. package/dist/classes/types.d.ts +14 -1
  26. package/dist/classes/types.d.ts.map +1 -1
  27. package/dist/classes/utils.d.ts +9 -0
  28. package/dist/classes/utils.d.ts.map +1 -1
  29. package/dist/classes/utils.js +21 -0
  30. package/dist/classes/utils.js.map +1 -1
  31. package/dist/classes/vault.d.ts +2 -1
  32. package/dist/classes/vault.d.ts.map +1 -1
  33. package/dist/classes/vault.js +4 -2
  34. package/dist/classes/vault.js.map +1 -1
  35. package/dist/client_kamino_manager.js +6 -6
  36. package/dist/client_kamino_manager.js.map +1 -1
  37. package/dist/idl.json +244 -23
  38. package/dist/idl_codegen/accounts/LendingMarket.d.ts +12 -6
  39. package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
  40. package/dist/idl_codegen/accounts/LendingMarket.js +15 -3
  41. package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
  42. package/dist/idl_codegen/accounts/Obligation.d.ts +27 -6
  43. package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -1
  44. package/dist/idl_codegen/accounts/Obligation.js +26 -9
  45. package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
  46. package/dist/idl_codegen/errors/custom.d.ts +36 -4
  47. package/dist/idl_codegen/errors/custom.d.ts.map +1 -1
  48. package/dist/idl_codegen/errors/custom.js +64 -8
  49. package/dist/idl_codegen/errors/custom.js.map +1 -1
  50. package/dist/idl_codegen/instructions/index.d.ts +2 -0
  51. package/dist/idl_codegen/instructions/index.d.ts.map +1 -1
  52. package/dist/idl_codegen/instructions/index.js +3 -1
  53. package/dist/idl_codegen/instructions/index.js.map +1 -1
  54. package/dist/idl_codegen/instructions/setObligationOrder.d.ts +14 -0
  55. package/dist/idl_codegen/instructions/setObligationOrder.d.ts.map +1 -0
  56. package/dist/idl_codegen/instructions/setObligationOrder.js +62 -0
  57. package/dist/idl_codegen/instructions/setObligationOrder.js.map +1 -0
  58. package/dist/idl_codegen/types/ObligationOrder.d.ts +284 -0
  59. package/dist/idl_codegen/types/ObligationOrder.d.ts.map +1 -0
  60. package/dist/idl_codegen/types/ObligationOrder.js +205 -0
  61. package/dist/idl_codegen/types/ObligationOrder.js.map +1 -0
  62. package/dist/idl_codegen/types/ReserveConfig.d.ts +26 -11
  63. package/dist/idl_codegen/types/ReserveConfig.d.ts.map +1 -1
  64. package/dist/idl_codegen/types/ReserveConfig.js +15 -10
  65. package/dist/idl_codegen/types/ReserveConfig.js.map +1 -1
  66. package/dist/idl_codegen/types/UpdateConfigMode.d.ts +34 -21
  67. package/dist/idl_codegen/types/UpdateConfigMode.d.ts.map +1 -1
  68. package/dist/idl_codegen/types/UpdateConfigMode.js +58 -34
  69. package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -1
  70. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +13 -0
  71. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
  72. package/dist/idl_codegen/types/UpdateLendingMarketMode.js +25 -1
  73. package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
  74. package/dist/idl_codegen/types/index.d.ts +6 -4
  75. package/dist/idl_codegen/types/index.d.ts.map +1 -1
  76. package/dist/idl_codegen/types/index.js +3 -1
  77. package/dist/idl_codegen/types/index.js.map +1 -1
  78. package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +13 -6
  79. package/dist/idl_codegen/zero_padding/ObligationZP.d.ts.map +1 -1
  80. package/dist/idl_codegen/zero_padding/ObligationZP.js +25 -11
  81. package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -1
  82. package/dist/utils/instruction.d.ts +1 -1
  83. package/dist/utils/instruction.d.ts.map +1 -1
  84. package/dist/utils/instruction.js +5 -1
  85. package/dist/utils/instruction.js.map +1 -1
  86. package/dist/utils/managerTypes.js +2 -2
  87. package/dist/utils/managerTypes.js.map +1 -1
  88. package/package.json +1 -1
  89. package/src/classes/action.ts +26 -1
  90. package/src/classes/fraction.ts +16 -12
  91. package/src/classes/manager.ts +17 -2
  92. package/src/classes/obligation.ts +77 -1
  93. package/src/classes/obligationOrder.ts +514 -0
  94. package/src/classes/reserve.ts +257 -336
  95. package/src/classes/types.ts +15 -1
  96. package/src/classes/utils.ts +21 -0
  97. package/src/classes/vault.ts +5 -2
  98. package/src/client_kamino_manager.ts +6 -6
  99. package/src/idl.json +244 -23
  100. package/src/idl_codegen/accounts/LendingMarket.ts +23 -7
  101. package/src/idl_codegen/accounts/Obligation.ts +50 -13
  102. package/src/idl_codegen/errors/custom.ts +68 -6
  103. package/src/idl_codegen/instructions/index.ts +5 -0
  104. package/src/idl_codegen/instructions/setObligationOrder.ts +45 -0
  105. package/src/idl_codegen/types/ObligationOrder.ts +347 -0
  106. package/src/idl_codegen/types/ReserveConfig.ts +31 -16
  107. package/src/idl_codegen/types/UpdateConfigMode.ts +69 -39
  108. package/src/idl_codegen/types/UpdateLendingMarketMode.ts +30 -0
  109. package/src/idl_codegen/types/index.ts +15 -6
  110. package/src/idl_codegen/zero_padding/ObligationZP.ts +37 -15
  111. package/src/utils/instruction.ts +5 -1
  112. package/src/utils/managerTypes.ts +2 -2
@@ -0,0 +1,284 @@
1
+ import BN from "bn.js";
2
+ import * as types from "../types";
3
+ export interface ObligationOrderFields {
4
+ /**
5
+ * A threshold value used by the condition (scaled [Fraction]).
6
+ * The exact meaning depends on the specific [Self::condition_type].
7
+ *
8
+ * Examples:
9
+ * - when `condition_type == 2 (UserLtvBelow)`:
10
+ * then a value of `0.455` here means that the order is active only when the obligation's
11
+ * user LTV is less than `0.455` (i.e. < 45.5%).
12
+ * - when `condition_type == 3 (DebtCollPriceRatioAbove)`:
13
+ * assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here
14
+ * means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.
15
+ * > 491.3 SOL per BTC).
16
+ */
17
+ conditionThresholdSf: BN;
18
+ /**
19
+ * A configuration parameter used by the opportunity (scaled [Fraction]).
20
+ * The exact meaning depends on the specific [Self::opportunity_type].
21
+ *
22
+ * Examples:
23
+ * - when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:
24
+ * Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`
25
+ * here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this
26
+ * obligation.
27
+ * Note: the special value of [Fraction::MAX] is *not* allowed in this case.
28
+ * - when `opportunity_type == 1 (DeleverageAllDebtAmount)`:
29
+ * The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt
30
+ * should be repaid).
31
+ */
32
+ opportunityParameterSf: BN;
33
+ /**
34
+ * A *minimum* additional fraction of collateral transferred to the liquidator, in bps.
35
+ *
36
+ * The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and
37
+ * grows linearly towards the [Self::max_execution_bonus_bps].
38
+ *
39
+ * Example: a value of `50` here means 50bps == 0.5% bonus for an "LTV > 65%" order, when
40
+ * executed precisely at the moment LTV exceeds 65%.
41
+ */
42
+ minExecutionBonusBps: number;
43
+ /**
44
+ * A *maximum* additional fraction of collateral transferred to the liquidator, in bps.
45
+ *
46
+ * The maximum bonus is applied at the relevant "extreme" state of the obligation, i.e.:
47
+ * - for a stop-loss condition, it is a point at which the obligation becomes liquidatable;
48
+ * - for a take-profit condition, it is a point at which obligation has 0% LTV.
49
+ *
50
+ * In non-extreme states, the actual bonus value is interpolated linearly, starting from
51
+ * [Self::min_execution_bonus_bps] (at the point specified by the order's condition).
52
+ *
53
+ * Example: a value of `300` here means 300bps == 3.0% bonus for a "debt/coll price > 140"
54
+ * order, when executed at a higher price = 200, at which the obligation's LTV happens to
55
+ * be equal to its liquidation LTV.
56
+ */
57
+ maxExecutionBonusBps: number;
58
+ /**
59
+ * Serialized [ConditionType].
60
+ * The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).
61
+ *
62
+ * Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to
63
+ * interpret this condition, we also need to take the [Self::condition_threshold_sf] into
64
+ * account.
65
+ */
66
+ conditionType: number;
67
+ /**
68
+ * Serialized [OpportunityType].
69
+ *
70
+ * Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to
71
+ * interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into
72
+ * account.
73
+ */
74
+ opportunityType: number;
75
+ /**
76
+ * Internal padding.
77
+ * The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to
78
+ * align with `u128`s.
79
+ */
80
+ padding1: Array<number>;
81
+ /**
82
+ * End padding.
83
+ * The total size of a single instance is 8*u128 = 128 bytes.
84
+ */
85
+ padding2: Array<BN>;
86
+ }
87
+ export interface ObligationOrderJSON {
88
+ /**
89
+ * A threshold value used by the condition (scaled [Fraction]).
90
+ * The exact meaning depends on the specific [Self::condition_type].
91
+ *
92
+ * Examples:
93
+ * - when `condition_type == 2 (UserLtvBelow)`:
94
+ * then a value of `0.455` here means that the order is active only when the obligation's
95
+ * user LTV is less than `0.455` (i.e. < 45.5%).
96
+ * - when `condition_type == 3 (DebtCollPriceRatioAbove)`:
97
+ * assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here
98
+ * means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.
99
+ * > 491.3 SOL per BTC).
100
+ */
101
+ conditionThresholdSf: string;
102
+ /**
103
+ * A configuration parameter used by the opportunity (scaled [Fraction]).
104
+ * The exact meaning depends on the specific [Self::opportunity_type].
105
+ *
106
+ * Examples:
107
+ * - when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:
108
+ * Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`
109
+ * here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this
110
+ * obligation.
111
+ * Note: the special value of [Fraction::MAX] is *not* allowed in this case.
112
+ * - when `opportunity_type == 1 (DeleverageAllDebtAmount)`:
113
+ * The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt
114
+ * should be repaid).
115
+ */
116
+ opportunityParameterSf: string;
117
+ /**
118
+ * A *minimum* additional fraction of collateral transferred to the liquidator, in bps.
119
+ *
120
+ * The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and
121
+ * grows linearly towards the [Self::max_execution_bonus_bps].
122
+ *
123
+ * Example: a value of `50` here means 50bps == 0.5% bonus for an "LTV > 65%" order, when
124
+ * executed precisely at the moment LTV exceeds 65%.
125
+ */
126
+ minExecutionBonusBps: number;
127
+ /**
128
+ * A *maximum* additional fraction of collateral transferred to the liquidator, in bps.
129
+ *
130
+ * The maximum bonus is applied at the relevant "extreme" state of the obligation, i.e.:
131
+ * - for a stop-loss condition, it is a point at which the obligation becomes liquidatable;
132
+ * - for a take-profit condition, it is a point at which obligation has 0% LTV.
133
+ *
134
+ * In non-extreme states, the actual bonus value is interpolated linearly, starting from
135
+ * [Self::min_execution_bonus_bps] (at the point specified by the order's condition).
136
+ *
137
+ * Example: a value of `300` here means 300bps == 3.0% bonus for a "debt/coll price > 140"
138
+ * order, when executed at a higher price = 200, at which the obligation's LTV happens to
139
+ * be equal to its liquidation LTV.
140
+ */
141
+ maxExecutionBonusBps: number;
142
+ /**
143
+ * Serialized [ConditionType].
144
+ * The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).
145
+ *
146
+ * Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to
147
+ * interpret this condition, we also need to take the [Self::condition_threshold_sf] into
148
+ * account.
149
+ */
150
+ conditionType: number;
151
+ /**
152
+ * Serialized [OpportunityType].
153
+ *
154
+ * Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to
155
+ * interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into
156
+ * account.
157
+ */
158
+ opportunityType: number;
159
+ /**
160
+ * Internal padding.
161
+ * The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to
162
+ * align with `u128`s.
163
+ */
164
+ padding1: Array<number>;
165
+ /**
166
+ * End padding.
167
+ * The total size of a single instance is 8*u128 = 128 bytes.
168
+ */
169
+ padding2: Array<string>;
170
+ }
171
+ /**
172
+ * A single obligation order.
173
+ * See [Obligation::orders].
174
+ */
175
+ export declare class ObligationOrder {
176
+ /**
177
+ * A threshold value used by the condition (scaled [Fraction]).
178
+ * The exact meaning depends on the specific [Self::condition_type].
179
+ *
180
+ * Examples:
181
+ * - when `condition_type == 2 (UserLtvBelow)`:
182
+ * then a value of `0.455` here means that the order is active only when the obligation's
183
+ * user LTV is less than `0.455` (i.e. < 45.5%).
184
+ * - when `condition_type == 3 (DebtCollPriceRatioAbove)`:
185
+ * assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here
186
+ * means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.
187
+ * > 491.3 SOL per BTC).
188
+ */
189
+ readonly conditionThresholdSf: BN;
190
+ /**
191
+ * A configuration parameter used by the opportunity (scaled [Fraction]).
192
+ * The exact meaning depends on the specific [Self::opportunity_type].
193
+ *
194
+ * Examples:
195
+ * - when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:
196
+ * Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`
197
+ * here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this
198
+ * obligation.
199
+ * Note: the special value of [Fraction::MAX] is *not* allowed in this case.
200
+ * - when `opportunity_type == 1 (DeleverageAllDebtAmount)`:
201
+ * The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt
202
+ * should be repaid).
203
+ */
204
+ readonly opportunityParameterSf: BN;
205
+ /**
206
+ * A *minimum* additional fraction of collateral transferred to the liquidator, in bps.
207
+ *
208
+ * The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and
209
+ * grows linearly towards the [Self::max_execution_bonus_bps].
210
+ *
211
+ * Example: a value of `50` here means 50bps == 0.5% bonus for an "LTV > 65%" order, when
212
+ * executed precisely at the moment LTV exceeds 65%.
213
+ */
214
+ readonly minExecutionBonusBps: number;
215
+ /**
216
+ * A *maximum* additional fraction of collateral transferred to the liquidator, in bps.
217
+ *
218
+ * The maximum bonus is applied at the relevant "extreme" state of the obligation, i.e.:
219
+ * - for a stop-loss condition, it is a point at which the obligation becomes liquidatable;
220
+ * - for a take-profit condition, it is a point at which obligation has 0% LTV.
221
+ *
222
+ * In non-extreme states, the actual bonus value is interpolated linearly, starting from
223
+ * [Self::min_execution_bonus_bps] (at the point specified by the order's condition).
224
+ *
225
+ * Example: a value of `300` here means 300bps == 3.0% bonus for a "debt/coll price > 140"
226
+ * order, when executed at a higher price = 200, at which the obligation's LTV happens to
227
+ * be equal to its liquidation LTV.
228
+ */
229
+ readonly maxExecutionBonusBps: number;
230
+ /**
231
+ * Serialized [ConditionType].
232
+ * The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).
233
+ *
234
+ * Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to
235
+ * interpret this condition, we also need to take the [Self::condition_threshold_sf] into
236
+ * account.
237
+ */
238
+ readonly conditionType: number;
239
+ /**
240
+ * Serialized [OpportunityType].
241
+ *
242
+ * Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to
243
+ * interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into
244
+ * account.
245
+ */
246
+ readonly opportunityType: number;
247
+ /**
248
+ * Internal padding.
249
+ * The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to
250
+ * align with `u128`s.
251
+ */
252
+ readonly padding1: Array<number>;
253
+ /**
254
+ * End padding.
255
+ * The total size of a single instance is 8*u128 = 128 bytes.
256
+ */
257
+ readonly padding2: Array<BN>;
258
+ constructor(fields: ObligationOrderFields);
259
+ static layout(property?: string): any;
260
+ static fromDecoded(obj: any): types.ObligationOrder;
261
+ static toEncodable(fields: ObligationOrderFields): {
262
+ conditionThresholdSf: BN;
263
+ opportunityParameterSf: BN;
264
+ minExecutionBonusBps: number;
265
+ maxExecutionBonusBps: number;
266
+ conditionType: number;
267
+ opportunityType: number;
268
+ padding1: number[];
269
+ padding2: BN[];
270
+ };
271
+ toJSON(): ObligationOrderJSON;
272
+ static fromJSON(obj: ObligationOrderJSON): ObligationOrder;
273
+ toEncodable(): {
274
+ conditionThresholdSf: BN;
275
+ opportunityParameterSf: BN;
276
+ minExecutionBonusBps: number;
277
+ maxExecutionBonusBps: number;
278
+ conditionType: number;
279
+ opportunityType: number;
280
+ padding1: number[];
281
+ padding2: BN[];
282
+ };
283
+ }
284
+ //# sourceMappingURL=ObligationOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObligationOrder.d.ts","sourceRoot":"","sources":["../../../src/idl_codegen/types/ObligationOrder.ts"],"names":[],"mappings":"AACA,OAAO,EA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,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CAAA;gBAEhB,MAAM,EAAE,qBAAqB;IAWzC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM;IAiB/B,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG;IAa3B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,qBAAqB;;;;;;;;;;IAahD,MAAM,IAAI,mBAAmB;IAa7B,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,mBAAmB,GAAG,eAAe;IAa1D,WAAW;;;;;;;;;;CAGZ"}
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ObligationOrder = void 0;
40
+ const bn_js_1 = __importDefault(require("bn.js")); // eslint-disable-line @typescript-eslint/no-unused-vars
41
+ const borsh = __importStar(require("@coral-xyz/borsh"));
42
+ /**
43
+ * A single obligation order.
44
+ * See [Obligation::orders].
45
+ */
46
+ class ObligationOrder {
47
+ /**
48
+ * A threshold value used by the condition (scaled [Fraction]).
49
+ * The exact meaning depends on the specific [Self::condition_type].
50
+ *
51
+ * Examples:
52
+ * - when `condition_type == 2 (UserLtvBelow)`:
53
+ * then a value of `0.455` here means that the order is active only when the obligation's
54
+ * user LTV is less than `0.455` (i.e. < 45.5%).
55
+ * - when `condition_type == 3 (DebtCollPriceRatioAbove)`:
56
+ * assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here
57
+ * means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.
58
+ * > 491.3 SOL per BTC).
59
+ */
60
+ conditionThresholdSf;
61
+ /**
62
+ * A configuration parameter used by the opportunity (scaled [Fraction]).
63
+ * The exact meaning depends on the specific [Self::opportunity_type].
64
+ *
65
+ * Examples:
66
+ * - when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:
67
+ * Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`
68
+ * here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this
69
+ * obligation.
70
+ * Note: the special value of [Fraction::MAX] is *not* allowed in this case.
71
+ * - when `opportunity_type == 1 (DeleverageAllDebtAmount)`:
72
+ * The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt
73
+ * should be repaid).
74
+ */
75
+ opportunityParameterSf;
76
+ /**
77
+ * A *minimum* additional fraction of collateral transferred to the liquidator, in bps.
78
+ *
79
+ * The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and
80
+ * grows linearly towards the [Self::max_execution_bonus_bps].
81
+ *
82
+ * Example: a value of `50` here means 50bps == 0.5% bonus for an "LTV > 65%" order, when
83
+ * executed precisely at the moment LTV exceeds 65%.
84
+ */
85
+ minExecutionBonusBps;
86
+ /**
87
+ * A *maximum* additional fraction of collateral transferred to the liquidator, in bps.
88
+ *
89
+ * The maximum bonus is applied at the relevant "extreme" state of the obligation, i.e.:
90
+ * - for a stop-loss condition, it is a point at which the obligation becomes liquidatable;
91
+ * - for a take-profit condition, it is a point at which obligation has 0% LTV.
92
+ *
93
+ * In non-extreme states, the actual bonus value is interpolated linearly, starting from
94
+ * [Self::min_execution_bonus_bps] (at the point specified by the order's condition).
95
+ *
96
+ * Example: a value of `300` here means 300bps == 3.0% bonus for a "debt/coll price > 140"
97
+ * order, when executed at a higher price = 200, at which the obligation's LTV happens to
98
+ * be equal to its liquidation LTV.
99
+ */
100
+ maxExecutionBonusBps;
101
+ /**
102
+ * Serialized [ConditionType].
103
+ * The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).
104
+ *
105
+ * Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to
106
+ * interpret this condition, we also need to take the [Self::condition_threshold_sf] into
107
+ * account.
108
+ */
109
+ conditionType;
110
+ /**
111
+ * Serialized [OpportunityType].
112
+ *
113
+ * Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to
114
+ * interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into
115
+ * account.
116
+ */
117
+ opportunityType;
118
+ /**
119
+ * Internal padding.
120
+ * The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to
121
+ * align with `u128`s.
122
+ */
123
+ padding1;
124
+ /**
125
+ * End padding.
126
+ * The total size of a single instance is 8*u128 = 128 bytes.
127
+ */
128
+ padding2;
129
+ constructor(fields) {
130
+ this.conditionThresholdSf = fields.conditionThresholdSf;
131
+ this.opportunityParameterSf = fields.opportunityParameterSf;
132
+ this.minExecutionBonusBps = fields.minExecutionBonusBps;
133
+ this.maxExecutionBonusBps = fields.maxExecutionBonusBps;
134
+ this.conditionType = fields.conditionType;
135
+ this.opportunityType = fields.opportunityType;
136
+ this.padding1 = fields.padding1;
137
+ this.padding2 = fields.padding2;
138
+ }
139
+ static layout(property) {
140
+ return borsh.struct([
141
+ borsh.u128("conditionThresholdSf"),
142
+ borsh.u128("opportunityParameterSf"),
143
+ borsh.u16("minExecutionBonusBps"),
144
+ borsh.u16("maxExecutionBonusBps"),
145
+ borsh.u8("conditionType"),
146
+ borsh.u8("opportunityType"),
147
+ borsh.array(borsh.u8(), 10, "padding1"),
148
+ borsh.array(borsh.u128(), 5, "padding2"),
149
+ ], property);
150
+ }
151
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
152
+ static fromDecoded(obj) {
153
+ return new ObligationOrder({
154
+ conditionThresholdSf: obj.conditionThresholdSf,
155
+ opportunityParameterSf: obj.opportunityParameterSf,
156
+ minExecutionBonusBps: obj.minExecutionBonusBps,
157
+ maxExecutionBonusBps: obj.maxExecutionBonusBps,
158
+ conditionType: obj.conditionType,
159
+ opportunityType: obj.opportunityType,
160
+ padding1: obj.padding1,
161
+ padding2: obj.padding2,
162
+ });
163
+ }
164
+ static toEncodable(fields) {
165
+ return {
166
+ conditionThresholdSf: fields.conditionThresholdSf,
167
+ opportunityParameterSf: fields.opportunityParameterSf,
168
+ minExecutionBonusBps: fields.minExecutionBonusBps,
169
+ maxExecutionBonusBps: fields.maxExecutionBonusBps,
170
+ conditionType: fields.conditionType,
171
+ opportunityType: fields.opportunityType,
172
+ padding1: fields.padding1,
173
+ padding2: fields.padding2,
174
+ };
175
+ }
176
+ toJSON() {
177
+ return {
178
+ conditionThresholdSf: this.conditionThresholdSf.toString(),
179
+ opportunityParameterSf: this.opportunityParameterSf.toString(),
180
+ minExecutionBonusBps: this.minExecutionBonusBps,
181
+ maxExecutionBonusBps: this.maxExecutionBonusBps,
182
+ conditionType: this.conditionType,
183
+ opportunityType: this.opportunityType,
184
+ padding1: this.padding1,
185
+ padding2: this.padding2.map((item) => item.toString()),
186
+ };
187
+ }
188
+ static fromJSON(obj) {
189
+ return new ObligationOrder({
190
+ conditionThresholdSf: new bn_js_1.default(obj.conditionThresholdSf),
191
+ opportunityParameterSf: new bn_js_1.default(obj.opportunityParameterSf),
192
+ minExecutionBonusBps: obj.minExecutionBonusBps,
193
+ maxExecutionBonusBps: obj.maxExecutionBonusBps,
194
+ conditionType: obj.conditionType,
195
+ opportunityType: obj.opportunityType,
196
+ padding1: obj.padding1,
197
+ padding2: obj.padding2.map((item) => new bn_js_1.default(item)),
198
+ });
199
+ }
200
+ toEncodable() {
201
+ return ObligationOrder.toEncodable(this);
202
+ }
203
+ }
204
+ exports.ObligationOrder = ObligationOrder;
205
+ //# sourceMappingURL=ObligationOrder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObligationOrder.js","sourceRoot":"","sources":["../../../src/idl_codegen/types/ObligationOrder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAsB,CAAC,wDAAwD;AAE/E,wDAAyC;AA4KzC;;;GAGG;AACH,MAAa,eAAe;IAC1B;;;;;;;;;;;;OAYG;IACM,oBAAoB,CAAI;IACjC;;;;;;;;;;;;;OAaG;IACM,sBAAsB,CAAI;IACnC;;;;;;;;OAQG;IACM,oBAAoB,CAAQ;IACrC;;;;;;;;;;;;;OAaG;IACM,oBAAoB,C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AAA;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAwB;QACtC,OAAO,IAAI,eAAe,CAAC;YACzB,oBAAoB,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC;YACtD,sBAAsB,EAAE,IAAI,eAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC;YAC1D,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;YAC9C,oBAAoB,EAAE,GAAG,CAAC,oBAAoB;YAC9C,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,eAAe,EAAE,GAAG,CAAC,eAAe;YACpC,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,eAAE,CAAC,IAAI,CAAC,CAAC;SACnD,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,OAAO,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IAC1C,CAAC;CACF;AAvKD,0CAuKC"}
@@ -8,10 +8,15 @@ export interface ReserveConfigFields {
8
8
  assetTier: number;
9
9
  /** Flat rate that goes to the host */
10
10
  hostFixedInterestRateBps: number;
11
- /** [DEPRECATED] Boost for side (debt or collateral) */
11
+ /**
12
+ * [DEPRECATED] Space that used to hold 2 fields:
13
+ * - Boost for side (debt or collateral)
14
+ * - Reward points multiplier per obligation type
15
+ * Can be re-used after making sure all underlying production account data is zeroed.
16
+ */
12
17
  reserved2: Array<number>;
13
- /** [DEPRECATED] Reward points multiplier per obligation type */
14
- reserved3: Array<number>;
18
+ /** Cut of the order execution bonus that the protocol receives, as a percentage */
19
+ protocolOrderExecutionFeePct: number;
15
20
  /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */
16
21
  protocolTakeRatePct: number;
17
22
  /** Cut of the liquidation bonus that the protocol receives, as a percentage */
@@ -95,10 +100,15 @@ export interface ReserveConfigJSON {
95
100
  assetTier: number;
96
101
  /** Flat rate that goes to the host */
97
102
  hostFixedInterestRateBps: number;
98
- /** [DEPRECATED] Boost for side (debt or collateral) */
103
+ /**
104
+ * [DEPRECATED] Space that used to hold 2 fields:
105
+ * - Boost for side (debt or collateral)
106
+ * - Reward points multiplier per obligation type
107
+ * Can be re-used after making sure all underlying production account data is zeroed.
108
+ */
99
109
  reserved2: Array<number>;
100
- /** [DEPRECATED] Reward points multiplier per obligation type */
101
- reserved3: Array<number>;
110
+ /** Cut of the order execution bonus that the protocol receives, as a percentage */
111
+ protocolOrderExecutionFeePct: number;
102
112
  /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */
103
113
  protocolTakeRatePct: number;
104
114
  /** Cut of the liquidation bonus that the protocol receives, as a percentage */
@@ -183,10 +193,15 @@ export declare class ReserveConfig {
183
193
  readonly assetTier: number;
184
194
  /** Flat rate that goes to the host */
185
195
  readonly hostFixedInterestRateBps: number;
186
- /** [DEPRECATED] Boost for side (debt or collateral) */
196
+ /**
197
+ * [DEPRECATED] Space that used to hold 2 fields:
198
+ * - Boost for side (debt or collateral)
199
+ * - Reward points multiplier per obligation type
200
+ * Can be re-used after making sure all underlying production account data is zeroed.
201
+ */
187
202
  readonly reserved2: Array<number>;
188
- /** [DEPRECATED] Reward points multiplier per obligation type */
189
- readonly reserved3: Array<number>;
203
+ /** Cut of the order execution bonus that the protocol receives, as a percentage */
204
+ readonly protocolOrderExecutionFeePct: number;
190
205
  /** Protocol take rate is the amount borrowed interest protocol receives, as a percentage */
191
206
  readonly protocolTakeRatePct: number;
192
207
  /** Cut of the liquidation bonus that the protocol receives, as a percentage */
@@ -270,7 +285,7 @@ export declare class ReserveConfig {
270
285
  assetTier: number;
271
286
  hostFixedInterestRateBps: number;
272
287
  reserved2: number[];
273
- reserved3: number[];
288
+ protocolOrderExecutionFeePct: number;
274
289
  protocolTakeRatePct: number;
275
290
  protocolLiquidationFeePct: number;
276
291
  loanToValuePct: number;
@@ -348,7 +363,7 @@ export declare class ReserveConfig {
348
363
  assetTier: number;
349
364
  hostFixedInterestRateBps: number;
350
365
  reserved2: number[];
351
- reserved3: number[];
366
+ protocolOrderExecutionFeePct: number;
352
367
  protocolTakeRatePct: number;
353
368
  protocolLiquidationFeePct: number;
354
369
  loanToValuePct: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ReserveConfig.d.ts","sourceRoot":"","sources":["../../../src/idl_codegen/types/ReserveConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,OAAO,CAAA;AACtB,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAGjC,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,gGAAgG;IAChG,SAAS,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,wBAAwB,EAAE,MAAM,CAAA;IAChC,uDAAuD;IACvD,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,gEAAgE;IAChE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACxB,4FAA4F;IAC5F,mBAAmB,EAAE,MAAM,CAAA;IAC3B,+EAA+E;IAC/E,yBAAyB,EAAE,MAAM,CAAA;IACjC;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,kFAAkF;IAClF,uBAAuB,EAAE,MAAM,CAAA;IAC/B,gGAAgG;IAChG,sBAAsB,EAAE,MAAM,CAAA;IAC9B,gGAAgG;IAChG,sBAAsB,EAAE,MAAM,CAAA;IAC9B,+EAA+E;IAC/E,0BAA0B,EAAE,MAAM,CAAA;IAClC;;;;OAIG;IACH,gCAAgC,EAAE,EAAE,CAAA;IACpC;;;OAGG;IACH,sCAAsC,EAAE,EAAE,CAAA;IAC1C,+EAA+E;IAC/E,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAC7B,6CAA6C;IAC7C,eAAe,EAAE,KAAK,CAAC,qBAAqB,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