@kamino-finance/klend-sdk 7.4.0-beta.5 → 7.4.0-beta.6
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/@codegen/klend/accounts/LendingMarket.d.ts +18 -18
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/LendingMarket.js +18 -18
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +1 -1
- package/dist/@codegen/klend/errors/custom.d.ts +73 -1
- package/dist/@codegen/klend/errors/custom.d.ts.map +1 -1
- package/dist/@codegen/klend/errors/custom.js +127 -1
- package/dist/@codegen/klend/errors/custom.js.map +1 -1
- package/dist/@codegen/klend/instructions/index.d.ts +4 -0
- package/dist/@codegen/klend/instructions/index.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/index.js +6 -2
- package/dist/@codegen/klend/instructions/index.js.map +1 -1
- package/dist/@codegen/klend/instructions/rolloverFixedTermBorrow.d.ts +36 -0
- package/dist/@codegen/klend/instructions/rolloverFixedTermBorrow.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/rolloverFixedTermBorrow.js +62 -0
- package/dist/@codegen/klend/instructions/rolloverFixedTermBorrow.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateObligationConfig.d.ts +30 -0
- package/dist/@codegen/klend/instructions/updateObligationConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateObligationConfig.js +70 -0
- package/dist/@codegen/klend/instructions/updateObligationConfig.js.map +1 -0
- package/dist/@codegen/klend/types/BorrowOrder.d.ts +62 -0
- package/dist/@codegen/klend/types/BorrowOrder.d.ts.map +1 -1
- package/dist/@codegen/klend/types/BorrowOrder.js +28 -1
- package/dist/@codegen/klend/types/BorrowOrder.js.map +1 -1
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.d.ts +5 -0
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.d.ts.map +1 -1
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.js +8 -0
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.js.map +1 -1
- package/dist/@codegen/klend/types/FixedTermBorrowRolloverConfig.d.ts +6 -6
- package/dist/@codegen/klend/types/FixedTermBorrowRolloverConfig.js +2 -2
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts +14 -14
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js +23 -23
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateObligationConfigMode.d.ts +58 -0
- package/dist/@codegen/klend/types/UpdateObligationConfigMode.d.ts.map +1 -0
- package/dist/@codegen/klend/types/UpdateObligationConfigMode.js +156 -0
- package/dist/@codegen/klend/types/UpdateObligationConfigMode.js.map +1 -0
- package/dist/@codegen/klend/types/index.d.ts +16 -2
- package/dist/@codegen/klend/types/index.d.ts.map +1 -1
- package/dist/@codegen/klend/types/index.js +3 -1
- package/dist/@codegen/klend/types/index.js.map +1 -1
- package/dist/classes/action.d.ts +1 -0
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +44 -1
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/actionTypes.d.ts +1 -0
- package/dist/classes/actionTypes.d.ts.map +1 -1
- package/dist/classes/manager.js +2 -2
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/reserve.d.ts +4 -4
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +9 -4
- package/dist/classes/reserve.js.map +1 -1
- package/dist/idl/klend.json +309 -12
- package/package.json +1 -1
- package/src/@codegen/klend/accounts/LendingMarket.ts +36 -36
- package/src/@codegen/klend/errors/custom.ts +147 -0
- package/src/@codegen/klend/instructions/index.ts +7 -0
- package/src/@codegen/klend/instructions/rolloverFixedTermBorrow.ts +109 -0
- package/src/@codegen/klend/instructions/updateObligationConfig.ts +84 -0
- package/src/@codegen/klend/types/BorrowOrder.ts +69 -1
- package/src/@codegen/klend/types/BorrowOrderConfigArgs.ts +11 -0
- package/src/@codegen/klend/types/FixedTermBorrowRolloverConfig.ts +6 -6
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +26 -26
- package/src/@codegen/klend/types/UpdateObligationConfigMode.ts +151 -0
- package/src/@codegen/klend/types/index.ts +28 -4
- package/src/classes/action.ts +76 -1
- package/src/classes/actionTypes.ts +1 -0
- package/src/classes/manager.ts +2 -2
- package/src/classes/reserve.ts +9 -4
- package/src/idl/klend.json +309 -12
package/dist/idl/klend.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.13.
|
|
2
|
+
"version": "1.13.2",
|
|
3
3
|
"name": "kamino_lending",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -3051,6 +3051,201 @@
|
|
|
3051
3051
|
}
|
|
3052
3052
|
]
|
|
3053
3053
|
},
|
|
3054
|
+
{
|
|
3055
|
+
"name": "updateObligationConfig",
|
|
3056
|
+
"accounts": [
|
|
3057
|
+
{
|
|
3058
|
+
"name": "owner",
|
|
3059
|
+
"isMut": false,
|
|
3060
|
+
"isSigner": true,
|
|
3061
|
+
"docs": [
|
|
3062
|
+
"Obligation's owner (signer - only the owner can modify the obligation's configuration)."
|
|
3063
|
+
]
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
"name": "obligation",
|
|
3067
|
+
"isMut": true,
|
|
3068
|
+
"isSigner": false,
|
|
3069
|
+
"docs": [
|
|
3070
|
+
"The obligation to update."
|
|
3071
|
+
]
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
"name": "borrowReserve",
|
|
3075
|
+
"isMut": false,
|
|
3076
|
+
"isSigner": false,
|
|
3077
|
+
"isOptional": true,
|
|
3078
|
+
"docs": [
|
|
3079
|
+
"The reserve of a selected one among the [Obligation::borrows].",
|
|
3080
|
+
"",
|
|
3081
|
+
"Required only if the config update affects a single borrow (for validating its new config)."
|
|
3082
|
+
]
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
"name": "depositReserve",
|
|
3086
|
+
"isMut": false,
|
|
3087
|
+
"isSigner": false,
|
|
3088
|
+
"isOptional": true,
|
|
3089
|
+
"docs": [
|
|
3090
|
+
"The reserve of a selected one among the [Obligation::deposits].",
|
|
3091
|
+
"",
|
|
3092
|
+
"Required only if the config update affects a single deposit (for validating its new config)."
|
|
3093
|
+
]
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"name": "lendingMarket",
|
|
3097
|
+
"isMut": false,
|
|
3098
|
+
"isSigner": false,
|
|
3099
|
+
"docs": [
|
|
3100
|
+
"The lending market (for validating the obligation's new config)."
|
|
3101
|
+
]
|
|
3102
|
+
}
|
|
3103
|
+
],
|
|
3104
|
+
"args": [
|
|
3105
|
+
{
|
|
3106
|
+
"name": "mode",
|
|
3107
|
+
"type": {
|
|
3108
|
+
"defined": "UpdateObligationConfigMode"
|
|
3109
|
+
}
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
"name": "value",
|
|
3113
|
+
"type": "bytes"
|
|
3114
|
+
}
|
|
3115
|
+
]
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
"name": "rolloverFixedTermBorrow",
|
|
3119
|
+
"accounts": [
|
|
3120
|
+
{
|
|
3121
|
+
"name": "rolloverAccounts",
|
|
3122
|
+
"accounts": [
|
|
3123
|
+
{
|
|
3124
|
+
"name": "payer",
|
|
3125
|
+
"isMut": false,
|
|
3126
|
+
"isSigner": true
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
"name": "obligation",
|
|
3130
|
+
"isMut": true,
|
|
3131
|
+
"isSigner": false,
|
|
3132
|
+
"docs": [
|
|
3133
|
+
"The obligation with a fixed-term borrow."
|
|
3134
|
+
]
|
|
3135
|
+
},
|
|
3136
|
+
{
|
|
3137
|
+
"name": "lendingMarket",
|
|
3138
|
+
"isMut": false,
|
|
3139
|
+
"isSigner": false,
|
|
3140
|
+
"docs": [
|
|
3141
|
+
"The [Self::obligation]'s market, needed for validations against the market-wide",
|
|
3142
|
+
"configuration."
|
|
3143
|
+
]
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "lendingMarketAuthority",
|
|
3147
|
+
"isMut": false,
|
|
3148
|
+
"isSigner": false,
|
|
3149
|
+
"docs": [
|
|
3150
|
+
"The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of",
|
|
3151
|
+
"the [Self::reserve_source_liquidity]."
|
|
3152
|
+
]
|
|
3153
|
+
},
|
|
3154
|
+
{
|
|
3155
|
+
"name": "sourceBorrowReserve",
|
|
3156
|
+
"isMut": true,
|
|
3157
|
+
"isSigner": false,
|
|
3158
|
+
"docs": [
|
|
3159
|
+
"The fixed-term reserve used by the existing [Self::obligation]'s borrow that approaches its",
|
|
3160
|
+
"debt term and needs to rollover from."
|
|
3161
|
+
]
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "targetBorrowReserve",
|
|
3165
|
+
"isMut": true,
|
|
3166
|
+
"isSigner": false,
|
|
3167
|
+
"docs": [
|
|
3168
|
+
"The reserve to rollover the borrow into - possibly (but not necessarily) the same as",
|
|
3169
|
+
"[Self::source_borrow_reserve]'s (but definitely of the same liquidity mint)."
|
|
3170
|
+
]
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"name": "liquidityMint",
|
|
3174
|
+
"isMut": false,
|
|
3175
|
+
"isSigner": false,
|
|
3176
|
+
"docs": [
|
|
3177
|
+
"The mint of [Self::source_borrow_reserve] and [Self::target_borrow_reserve], needed to",
|
|
3178
|
+
"transfer funds between them."
|
|
3179
|
+
]
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"name": "sourceBorrowReserveLiquidity",
|
|
3183
|
+
"isMut": true,
|
|
3184
|
+
"isSigner": false,
|
|
3185
|
+
"docs": [
|
|
3186
|
+
"The vault of [Self::source_borrow_reserve], from which the funds are transferred."
|
|
3187
|
+
]
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "targetBorrowReserveLiquidity",
|
|
3191
|
+
"isMut": true,
|
|
3192
|
+
"isSigner": false,
|
|
3193
|
+
"docs": [
|
|
3194
|
+
"The vault of [Self::target_borrow_reserve], from which the funds are transferred."
|
|
3195
|
+
]
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"name": "tokenProgram",
|
|
3199
|
+
"isMut": false,
|
|
3200
|
+
"isSigner": false,
|
|
3201
|
+
"docs": [
|
|
3202
|
+
"The token program of [Self::liquidity_mint] - needed to execute the transfer."
|
|
3203
|
+
]
|
|
3204
|
+
}
|
|
3205
|
+
]
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
"name": "sourceFarmsAccounts",
|
|
3209
|
+
"accounts": [
|
|
3210
|
+
{
|
|
3211
|
+
"name": "obligationFarmUserState",
|
|
3212
|
+
"isMut": true,
|
|
3213
|
+
"isSigner": false,
|
|
3214
|
+
"isOptional": true
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
"name": "reserveFarmState",
|
|
3218
|
+
"isMut": true,
|
|
3219
|
+
"isSigner": false,
|
|
3220
|
+
"isOptional": true
|
|
3221
|
+
}
|
|
3222
|
+
]
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
"name": "targetFarmsAccounts",
|
|
3226
|
+
"accounts": [
|
|
3227
|
+
{
|
|
3228
|
+
"name": "obligationFarmUserState",
|
|
3229
|
+
"isMut": true,
|
|
3230
|
+
"isSigner": false,
|
|
3231
|
+
"isOptional": true
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
"name": "reserveFarmState",
|
|
3235
|
+
"isMut": true,
|
|
3236
|
+
"isSigner": false,
|
|
3237
|
+
"isOptional": true
|
|
3238
|
+
}
|
|
3239
|
+
]
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
"name": "farmsProgram",
|
|
3243
|
+
"isMut": false,
|
|
3244
|
+
"isSigner": false
|
|
3245
|
+
}
|
|
3246
|
+
],
|
|
3247
|
+
"args": []
|
|
3248
|
+
},
|
|
3054
3249
|
{
|
|
3055
3250
|
"name": "fillBorrowOrder",
|
|
3056
3251
|
"accounts": [
|
|
@@ -4185,8 +4380,8 @@
|
|
|
4185
4380
|
"Whether the owners can enable the \"fixed term borrow rollover\" on their obligations.",
|
|
4186
4381
|
"",
|
|
4187
4382
|
"*Note 1:* the actual execution of (different kinds of) rollovers can be disabled by zeroing",
|
|
4188
|
-
"[Self::
|
|
4189
|
-
"[Self::
|
|
4383
|
+
"[Self::fixed_term_rollover_window_duration_seconds] and",
|
|
4384
|
+
"[Self::open_term_rollover_window_duration_seconds].",
|
|
4190
4385
|
"",
|
|
4191
4386
|
"*Note 2:* when this configuration is disabled, the obligation owners can still disable their",
|
|
4192
4387
|
"rollover (i.e. set the obligation's flags to zeroes)."
|
|
@@ -4211,7 +4406,7 @@
|
|
|
4211
4406
|
"type": "u64"
|
|
4212
4407
|
},
|
|
4213
4408
|
{
|
|
4214
|
-
"name": "
|
|
4409
|
+
"name": "fixedTermRolloverWindowDurationSeconds",
|
|
4215
4410
|
"docs": [
|
|
4216
4411
|
"A configurable time window (right before the end of a fixed debt term) during which an",
|
|
4217
4412
|
"auto-rollover into another *fixed* rate/term can happen.",
|
|
@@ -4223,15 +4418,15 @@
|
|
|
4223
4418
|
"type": "u64"
|
|
4224
4419
|
},
|
|
4225
4420
|
{
|
|
4226
|
-
"name": "
|
|
4421
|
+
"name": "openTermRolloverWindowDurationSeconds",
|
|
4227
4422
|
"docs": [
|
|
4228
4423
|
"A configurable time window (right before the end of a fixed debt term) during which an",
|
|
4229
4424
|
"auto-rollover into a *variable* (indefinite) rate/term can happen.",
|
|
4230
4425
|
"",
|
|
4231
4426
|
"When zeroed, this rollover mode is effectively disabled.",
|
|
4232
4427
|
"",
|
|
4233
|
-
"This will typically be shorter than [Self::
|
|
4234
|
-
"as a fallback if a fixed reserve liquidity remains unavailable for considerable time."
|
|
4428
|
+
"This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],",
|
|
4429
|
+
"acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time."
|
|
4235
4430
|
],
|
|
4236
4431
|
"type": "u64"
|
|
4237
4432
|
},
|
|
@@ -4906,6 +5101,10 @@
|
|
|
4906
5101
|
{
|
|
4907
5102
|
"name": "fillableUntilTimestamp",
|
|
4908
5103
|
"type": "u64"
|
|
5104
|
+
},
|
|
5105
|
+
{
|
|
5106
|
+
"name": "enableAutoRolloverOnFilledBorrows",
|
|
5107
|
+
"type": "bool"
|
|
4909
5108
|
}
|
|
4910
5109
|
]
|
|
4911
5110
|
}
|
|
@@ -5265,10 +5464,10 @@
|
|
|
5265
5464
|
"name": "UpdateMinWithdrawQueuedLiquidityValue"
|
|
5266
5465
|
},
|
|
5267
5466
|
{
|
|
5268
|
-
"name": "
|
|
5467
|
+
"name": "UpdateFixedTermRolloverWindowDurationSeconds"
|
|
5269
5468
|
},
|
|
5270
5469
|
{
|
|
5271
|
-
"name": "
|
|
5470
|
+
"name": "UpdateOpenTermRolloverWindowDurationSeconds"
|
|
5272
5471
|
},
|
|
5273
5472
|
{
|
|
5274
5473
|
"name": "UpdateObligationBorrowRolloverConfigurationEnabled"
|
|
@@ -5470,6 +5669,29 @@
|
|
|
5470
5669
|
],
|
|
5471
5670
|
"type": "u32"
|
|
5472
5671
|
},
|
|
5672
|
+
{
|
|
5673
|
+
"name": "enableAutoRolloverOnFilledBorrows",
|
|
5674
|
+
"docs": [
|
|
5675
|
+
"When `1`, all [Obligation::borrows] that get filled by this order will have their",
|
|
5676
|
+
"[FixedTermBorrowRolloverConfig::auto_rollover_enabled] flag set.",
|
|
5677
|
+
"",
|
|
5678
|
+
"Additionally, their rollover customizations:",
|
|
5679
|
+
"- will exactly match this order's constraints regarding [Self::min_debt_term_seconds] and",
|
|
5680
|
+
"[Self::max_borrow_rate_bps];",
|
|
5681
|
+
"- will use the [FixedTermBorrowRolloverConfig::open_term_allowed] fallback.",
|
|
5682
|
+
"",
|
|
5683
|
+
"See [BorrowOrder::get_rollover_config_for_filled_borrow()].",
|
|
5684
|
+
"",
|
|
5685
|
+
"Clarification note: when `0`, this setting has no effect on any borrow (i.e. if an existing",
|
|
5686
|
+
"borrow was independently marked for auto-rollover, it will *not* be unmarked when filled by",
|
|
5687
|
+
"this order).",
|
|
5688
|
+
"",
|
|
5689
|
+
"Feature flag note: when [LendingMarket::obligation_borrow_rollover_configuration_enabled] is",
|
|
5690
|
+
"disabled, this setting has no effect on any borrow (i.e. the fill will be successful, but",
|
|
5691
|
+
"the borrow will not be marked for auto-rollover."
|
|
5692
|
+
],
|
|
5693
|
+
"type": "u8"
|
|
5694
|
+
},
|
|
5473
5695
|
{
|
|
5474
5696
|
"name": "padding1",
|
|
5475
5697
|
"docs": [
|
|
@@ -5478,7 +5700,7 @@
|
|
|
5478
5700
|
"type": {
|
|
5479
5701
|
"array": [
|
|
5480
5702
|
"u8",
|
|
5481
|
-
|
|
5703
|
+
3
|
|
5482
5704
|
]
|
|
5483
5705
|
}
|
|
5484
5706
|
},
|
|
@@ -5519,7 +5741,7 @@
|
|
|
5519
5741
|
"C) sufficient available liquidity (including no withdraw tickets waiting in its queue).",
|
|
5520
5742
|
"",
|
|
5521
5743
|
"The time left until the current debt term expires must be:",
|
|
5522
|
-
"D) less than [LendingMarket::
|
|
5744
|
+
"D) less than [LendingMarket::fixed_term_rollover_window_duration_seconds].",
|
|
5523
5745
|
"",
|
|
5524
5746
|
"Note: the other settings are only effective when this one is `1`."
|
|
5525
5747
|
],
|
|
@@ -5530,7 +5752,7 @@
|
|
|
5530
5752
|
"docs": [
|
|
5531
5753
|
"When `1`, partially lifts the condition *B* from [Self::auto_rollover_enabled]: additionally",
|
|
5532
5754
|
"allows to use a variable (indefinite) debt term if less than",
|
|
5533
|
-
"[LendingMarket::
|
|
5755
|
+
"[LendingMarket::open_term_rollover_window_duration_seconds] is left until expiration.",
|
|
5534
5756
|
"",
|
|
5535
5757
|
"Note: typically this flag should be used together with [Self::max_borrow_rate_bps] set to",
|
|
5536
5758
|
"`u32::MAX` (to denote a variable-rate reserve)."
|
|
@@ -5853,6 +6075,36 @@
|
|
|
5853
6075
|
]
|
|
5854
6076
|
}
|
|
5855
6077
|
},
|
|
6078
|
+
{
|
|
6079
|
+
"name": "UpdateObligationConfigMode",
|
|
6080
|
+
"docs": [
|
|
6081
|
+
"A discriminator of a user-configurable piece of [Obligation].",
|
|
6082
|
+
"",
|
|
6083
|
+
"Implementation note: due to TS-side codegen quirks (and a \"convention\" currently seen e.g.",
|
|
6084
|
+
"within reserve and market update operations), this is not a true Rust enum. The new value of",
|
|
6085
|
+
"a config item is provided in a separate handler argument (borsh-serialized), and its expected",
|
|
6086
|
+
"type is defined by each discriminator here. Additionally, each update mode acts on a specific",
|
|
6087
|
+
"[ObligationConfigUpdateSubject] (e.g. the auto-rollover of fixed-term borrows is configured on",
|
|
6088
|
+
"a per-borrow basis), which is also specified by separate handler arguments."
|
|
6089
|
+
],
|
|
6090
|
+
"type": {
|
|
6091
|
+
"kind": "enum",
|
|
6092
|
+
"variants": [
|
|
6093
|
+
{
|
|
6094
|
+
"name": "FixedTermRolloverEnabled"
|
|
6095
|
+
},
|
|
6096
|
+
{
|
|
6097
|
+
"name": "FixedTermRolloverMaxBorrowRateBps"
|
|
6098
|
+
},
|
|
6099
|
+
{
|
|
6100
|
+
"name": "FixedTermRolloverMinDebtTermSeconds"
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
"name": "FixedTermRolloverOpenTermAllowed"
|
|
6104
|
+
}
|
|
6105
|
+
]
|
|
6106
|
+
}
|
|
6107
|
+
},
|
|
5856
6108
|
{
|
|
5857
6109
|
"name": "BigFractionBytes",
|
|
5858
6110
|
"type": {
|
|
@@ -7634,6 +7886,51 @@
|
|
|
7634
7886
|
"code": 6153,
|
|
7635
7887
|
"name": "WithdrawTicketProgressCallbackAccountsMissing",
|
|
7636
7888
|
"msg": "One or more accounts required by the ticket's configured progress callback are missing"
|
|
7889
|
+
},
|
|
7890
|
+
{
|
|
7891
|
+
"code": 6154,
|
|
7892
|
+
"name": "BorrowRolloverConfigurationDisabled",
|
|
7893
|
+
"msg": "Configuring auto-rollover on loans is disabled by market owner"
|
|
7894
|
+
},
|
|
7895
|
+
{
|
|
7896
|
+
"code": 6155,
|
|
7897
|
+
"name": "InvalidObligationConfigUpdateSubject",
|
|
7898
|
+
"msg": "Invalid specification of the Obligation's part to be configured"
|
|
7899
|
+
},
|
|
7900
|
+
{
|
|
7901
|
+
"code": 6156,
|
|
7902
|
+
"name": "BorrowRolloverLiquidityMintMismatch",
|
|
7903
|
+
"msg": "Auto-rollover must use a target reserve of the same token"
|
|
7904
|
+
},
|
|
7905
|
+
{
|
|
7906
|
+
"code": 6157,
|
|
7907
|
+
"name": "ObligationBorrowRolloverNotApplicable",
|
|
7908
|
+
"msg": "The given borrow is not fixed-term and does not require rolling over"
|
|
7909
|
+
},
|
|
7910
|
+
{
|
|
7911
|
+
"code": 6158,
|
|
7912
|
+
"name": "ObligationBorrowOutsideRolloverWindow",
|
|
7913
|
+
"msg": "The given borrow is outside the corresponding market-configured rollover window"
|
|
7914
|
+
},
|
|
7915
|
+
{
|
|
7916
|
+
"code": 6159,
|
|
7917
|
+
"name": "ObligationBorrowRolloverNotEnabledByOwner",
|
|
7918
|
+
"msg": "Obligation's owner did not opt-in for auto-rollover of the given borrow"
|
|
7919
|
+
},
|
|
7920
|
+
{
|
|
7921
|
+
"code": 6160,
|
|
7922
|
+
"name": "ObligationBorrowRolloverTargetReserveMismatch",
|
|
7923
|
+
"msg": "Obligation's owner did not allow to roll over into terms offered by the given reserve"
|
|
7924
|
+
},
|
|
7925
|
+
{
|
|
7926
|
+
"code": 6161,
|
|
7927
|
+
"name": "BorrowRolloverExecutionDisabled",
|
|
7928
|
+
"msg": "Executing auto-rollover is disabled by market owner"
|
|
7929
|
+
},
|
|
7930
|
+
{
|
|
7931
|
+
"code": 6162,
|
|
7932
|
+
"name": "ObligationAccountingMismatch",
|
|
7933
|
+
"msg": "Obligation internal state accounting has been unexpectedly modified"
|
|
7637
7934
|
}
|
|
7638
7935
|
]
|
|
7639
7936
|
}
|
package/package.json
CHANGED
|
@@ -137,8 +137,8 @@ export interface LendingMarketFields {
|
|
|
137
137
|
* Whether the owners can enable the "fixed term borrow rollover" on their obligations.
|
|
138
138
|
*
|
|
139
139
|
* *Note 1:* the actual execution of (different kinds of) rollovers can be disabled by zeroing
|
|
140
|
-
* [Self::
|
|
141
|
-
* [Self::
|
|
140
|
+
* [Self::fixed_term_rollover_window_duration_seconds] and
|
|
141
|
+
* [Self::open_term_rollover_window_duration_seconds].
|
|
142
142
|
*
|
|
143
143
|
* *Note 2:* when this configuration is disabled, the obligation owners can still disable their
|
|
144
144
|
* rollover (i.e. set the obligation's flags to zeroes).
|
|
@@ -158,17 +158,17 @@ export interface LendingMarketFields {
|
|
|
158
158
|
*
|
|
159
159
|
* See [FixedTermBorrowRolloverConfig].
|
|
160
160
|
*/
|
|
161
|
-
|
|
161
|
+
fixedTermRolloverWindowDurationSeconds: BN
|
|
162
162
|
/**
|
|
163
163
|
* A configurable time window (right before the end of a fixed debt term) during which an
|
|
164
164
|
* auto-rollover into a *variable* (indefinite) rate/term can happen.
|
|
165
165
|
*
|
|
166
166
|
* When zeroed, this rollover mode is effectively disabled.
|
|
167
167
|
*
|
|
168
|
-
* This will typically be shorter than [Self::
|
|
169
|
-
* as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
168
|
+
* This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],
|
|
169
|
+
* acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
170
170
|
*/
|
|
171
|
-
|
|
171
|
+
openTermRolloverWindowDurationSeconds: BN
|
|
172
172
|
padding1: Array<BN>
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -294,8 +294,8 @@ export interface LendingMarketJSON {
|
|
|
294
294
|
* Whether the owners can enable the "fixed term borrow rollover" on their obligations.
|
|
295
295
|
*
|
|
296
296
|
* *Note 1:* the actual execution of (different kinds of) rollovers can be disabled by zeroing
|
|
297
|
-
* [Self::
|
|
298
|
-
* [Self::
|
|
297
|
+
* [Self::fixed_term_rollover_window_duration_seconds] and
|
|
298
|
+
* [Self::open_term_rollover_window_duration_seconds].
|
|
299
299
|
*
|
|
300
300
|
* *Note 2:* when this configuration is disabled, the obligation owners can still disable their
|
|
301
301
|
* rollover (i.e. set the obligation's flags to zeroes).
|
|
@@ -315,17 +315,17 @@ export interface LendingMarketJSON {
|
|
|
315
315
|
*
|
|
316
316
|
* See [FixedTermBorrowRolloverConfig].
|
|
317
317
|
*/
|
|
318
|
-
|
|
318
|
+
fixedTermRolloverWindowDurationSeconds: string
|
|
319
319
|
/**
|
|
320
320
|
* A configurable time window (right before the end of a fixed debt term) during which an
|
|
321
321
|
* auto-rollover into a *variable* (indefinite) rate/term can happen.
|
|
322
322
|
*
|
|
323
323
|
* When zeroed, this rollover mode is effectively disabled.
|
|
324
324
|
*
|
|
325
|
-
* This will typically be shorter than [Self::
|
|
326
|
-
* as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
325
|
+
* This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],
|
|
326
|
+
* acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
327
327
|
*/
|
|
328
|
-
|
|
328
|
+
openTermRolloverWindowDurationSeconds: string
|
|
329
329
|
padding1: Array<string>
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -451,8 +451,8 @@ export class LendingMarket {
|
|
|
451
451
|
* Whether the owners can enable the "fixed term borrow rollover" on their obligations.
|
|
452
452
|
*
|
|
453
453
|
* *Note 1:* the actual execution of (different kinds of) rollovers can be disabled by zeroing
|
|
454
|
-
* [Self::
|
|
455
|
-
* [Self::
|
|
454
|
+
* [Self::fixed_term_rollover_window_duration_seconds] and
|
|
455
|
+
* [Self::open_term_rollover_window_duration_seconds].
|
|
456
456
|
*
|
|
457
457
|
* *Note 2:* when this configuration is disabled, the obligation owners can still disable their
|
|
458
458
|
* rollover (i.e. set the obligation's flags to zeroes).
|
|
@@ -472,17 +472,17 @@ export class LendingMarket {
|
|
|
472
472
|
*
|
|
473
473
|
* See [FixedTermBorrowRolloverConfig].
|
|
474
474
|
*/
|
|
475
|
-
readonly
|
|
475
|
+
readonly fixedTermRolloverWindowDurationSeconds: BN
|
|
476
476
|
/**
|
|
477
477
|
* A configurable time window (right before the end of a fixed debt term) during which an
|
|
478
478
|
* auto-rollover into a *variable* (indefinite) rate/term can happen.
|
|
479
479
|
*
|
|
480
480
|
* When zeroed, this rollover mode is effectively disabled.
|
|
481
481
|
*
|
|
482
|
-
* This will typically be shorter than [Self::
|
|
483
|
-
* as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
482
|
+
* This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],
|
|
483
|
+
* acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time.
|
|
484
484
|
*/
|
|
485
|
-
readonly
|
|
485
|
+
readonly openTermRolloverWindowDurationSeconds: BN
|
|
486
486
|
readonly padding1: Array<BN>
|
|
487
487
|
|
|
488
488
|
static readonly discriminator = Buffer.from([
|
|
@@ -530,8 +530,8 @@ export class LendingMarket {
|
|
|
530
530
|
borsh.u8("obligationBorrowRolloverConfigurationEnabled"),
|
|
531
531
|
borsh.array(borsh.u8(), 5, "padding2"),
|
|
532
532
|
borsh.u64("minWithdrawQueuedLiquidityValue"),
|
|
533
|
-
borsh.u64("
|
|
534
|
-
borsh.u64("
|
|
533
|
+
borsh.u64("fixedTermRolloverWindowDurationSeconds"),
|
|
534
|
+
borsh.u64("openTermRolloverWindowDurationSeconds"),
|
|
535
535
|
borsh.array(borsh.u64(), 161, "padding1"),
|
|
536
536
|
])
|
|
537
537
|
|
|
@@ -591,10 +591,10 @@ export class LendingMarket {
|
|
|
591
591
|
this.padding2 = fields.padding2
|
|
592
592
|
this.minWithdrawQueuedLiquidityValue =
|
|
593
593
|
fields.minWithdrawQueuedLiquidityValue
|
|
594
|
-
this.
|
|
595
|
-
fields.
|
|
596
|
-
this.
|
|
597
|
-
fields.
|
|
594
|
+
this.fixedTermRolloverWindowDurationSeconds =
|
|
595
|
+
fields.fixedTermRolloverWindowDurationSeconds
|
|
596
|
+
this.openTermRolloverWindowDurationSeconds =
|
|
597
|
+
fields.openTermRolloverWindowDurationSeconds
|
|
598
598
|
this.padding1 = fields.padding1
|
|
599
599
|
}
|
|
600
600
|
|
|
@@ -695,10 +695,10 @@ export class LendingMarket {
|
|
|
695
695
|
dec.obligationBorrowRolloverConfigurationEnabled,
|
|
696
696
|
padding2: dec.padding2,
|
|
697
697
|
minWithdrawQueuedLiquidityValue: dec.minWithdrawQueuedLiquidityValue,
|
|
698
|
-
|
|
699
|
-
dec.
|
|
700
|
-
|
|
701
|
-
dec.
|
|
698
|
+
fixedTermRolloverWindowDurationSeconds:
|
|
699
|
+
dec.fixedTermRolloverWindowDurationSeconds,
|
|
700
|
+
openTermRolloverWindowDurationSeconds:
|
|
701
|
+
dec.openTermRolloverWindowDurationSeconds,
|
|
702
702
|
padding1: dec.padding1,
|
|
703
703
|
})
|
|
704
704
|
}
|
|
@@ -756,10 +756,10 @@ export class LendingMarket {
|
|
|
756
756
|
padding2: this.padding2,
|
|
757
757
|
minWithdrawQueuedLiquidityValue:
|
|
758
758
|
this.minWithdrawQueuedLiquidityValue.toString(),
|
|
759
|
-
|
|
760
|
-
this.
|
|
761
|
-
|
|
762
|
-
this.
|
|
759
|
+
fixedTermRolloverWindowDurationSeconds:
|
|
760
|
+
this.fixedTermRolloverWindowDurationSeconds.toString(),
|
|
761
|
+
openTermRolloverWindowDurationSeconds:
|
|
762
|
+
this.openTermRolloverWindowDurationSeconds.toString(),
|
|
763
763
|
padding1: this.padding1.map((item) => item.toString()),
|
|
764
764
|
}
|
|
765
765
|
}
|
|
@@ -825,11 +825,11 @@ export class LendingMarket {
|
|
|
825
825
|
minWithdrawQueuedLiquidityValue: new BN(
|
|
826
826
|
obj.minWithdrawQueuedLiquidityValue
|
|
827
827
|
),
|
|
828
|
-
|
|
829
|
-
obj.
|
|
828
|
+
fixedTermRolloverWindowDurationSeconds: new BN(
|
|
829
|
+
obj.fixedTermRolloverWindowDurationSeconds
|
|
830
830
|
),
|
|
831
|
-
|
|
832
|
-
obj.
|
|
831
|
+
openTermRolloverWindowDurationSeconds: new BN(
|
|
832
|
+
obj.openTermRolloverWindowDurationSeconds
|
|
833
833
|
),
|
|
834
834
|
padding1: obj.padding1.map((item) => new BN(item)),
|
|
835
835
|
})
|