@kamino-finance/klend-sdk 7.1.4-beta.0 → 7.1.4
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 +3 -144
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/LendingMarket.js +3 -105
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +1 -1
- package/dist/@codegen/klend/accounts/Obligation.d.ts +15 -30
- package/dist/@codegen/klend/accounts/Obligation.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/Obligation.js +21 -31
- package/dist/@codegen/klend/accounts/Obligation.js.map +1 -1
- package/dist/@codegen/klend/accounts/Reserve.d.ts +0 -6
- package/dist/@codegen/klend/accounts/Reserve.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/Reserve.js +2 -9
- package/dist/@codegen/klend/accounts/Reserve.js.map +1 -1
- package/dist/@codegen/klend/accounts/UserState.d.ts +75 -0
- package/dist/@codegen/klend/accounts/UserState.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/UserState.js +25 -0
- package/dist/@codegen/klend/accounts/UserState.js.map +1 -1
- package/dist/@codegen/klend/accounts/index.d.ts +0 -6
- package/dist/@codegen/klend/accounts/index.d.ts.map +1 -1
- package/dist/@codegen/klend/accounts/index.js +1 -7
- package/dist/@codegen/klend/accounts/index.js.map +1 -1
- package/dist/@codegen/klend/errors/custom.d.ts +2 -226
- package/dist/@codegen/klend/errors/custom.d.ts.map +1 -1
- package/dist/@codegen/klend/errors/custom.js +3 -396
- package/dist/@codegen/klend/errors/custom.js.map +1 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts +2 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.js +2 -6
- package/dist/@codegen/klend/instructions/idlMissingTypes.js.map +1 -1
- package/dist/@codegen/klend/instructions/index.d.ts +0 -16
- package/dist/@codegen/klend/instructions/index.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/index.js +1 -18
- package/dist/@codegen/klend/instructions/index.js.map +1 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts +1 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initReserve.js +5 -1
- package/dist/@codegen/klend/instructions/initReserve.js.map +1 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.js +1 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts +1 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js +0 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js.map +1 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts +1 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.js +0 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.js.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js +1 -1
- package/dist/@codegen/klend/types/AssetTier.d.ts +45 -0
- package/dist/@codegen/klend/types/AssetTier.d.ts.map +1 -0
- package/dist/@codegen/klend/types/AssetTier.js +132 -0
- package/dist/@codegen/klend/types/AssetTier.js.map +1 -0
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts +5 -35
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ObligationLiquidity.js +7 -17
- package/dist/@codegen/klend/types/ObligationLiquidity.js.map +1 -1
- package/dist/@codegen/klend/types/ObligationOrder.d.ts +4 -4
- package/dist/@codegen/klend/types/ObligationOrder.js +2 -2
- package/dist/@codegen/klend/types/ReserveConfig.d.ts +29 -141
- package/dist/@codegen/klend/types/ReserveConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveConfig.js +25 -89
- package/dist/@codegen/klend/types/ReserveConfig.js.map +1 -1
- package/dist/@codegen/klend/types/ReserveFees.d.ts +8 -8
- package/dist/@codegen/klend/types/ReserveFees.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveFees.js +8 -8
- package/dist/@codegen/klend/types/ReserveFees.js.map +1 -1
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts +8 -26
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/types/ReserveLiquidity.js +8 -14
- package/dist/@codegen/klend/types/ReserveLiquidity.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts +14 -92
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.js +23 -168
- package/dist/@codegen/klend/types/UpdateConfigMode.js.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts +0 -130
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js +1 -241
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/@codegen/klend/types/index.d.ts +8 -10
- package/dist/@codegen/klend/types/index.d.ts.map +1 -1
- package/dist/@codegen/klend/types/index.js +3 -7
- package/dist/@codegen/klend/types/index.js.map +1 -1
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts +4 -9
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts.map +1 -1
- package/dist/@codegen/klend/zero_padding/ObligationZP.js +13 -22
- package/dist/@codegen/klend/zero_padding/ObligationZP.js.map +1 -1
- package/dist/classes/action.d.ts +3 -30
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +10 -364
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +0 -10
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +2 -6
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +6 -26
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/obligation.js +1 -1
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +7 -13
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/unstakingPool.d.ts +3 -20
- package/dist/classes/unstakingPool.d.ts.map +1 -1
- package/dist/classes/unstakingPool.js +8 -62
- package/dist/classes/unstakingPool.js.map +1 -1
- package/dist/classes/vault.d.ts +1 -1
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +46 -28
- package/dist/classes/vault.js.map +1 -1
- package/dist/idl/klend.json +293 -2186
- package/dist/lending_operations/index.d.ts +0 -1
- package/dist/lending_operations/index.d.ts.map +1 -1
- package/dist/lending_operations/index.js +0 -1
- package/dist/lending_operations/index.js.map +1 -1
- package/dist/manager/client_kamino_manager.js +9 -12
- package/dist/manager/client_kamino_manager.js.map +1 -1
- package/dist/utils/ata.d.ts +10 -1
- package/dist/utils/ata.d.ts.map +1 -1
- package/dist/utils/ata.js +47 -0
- package/dist/utils/ata.js.map +1 -1
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +4 -9
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/seeds.d.ts +14 -10
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +22 -25
- package/dist/utils/seeds.js.map +1 -1
- package/package.json +1 -1
- package/src/@codegen/klend/accounts/LendingMarket.ts +5 -210
- package/src/@codegen/klend/accounts/Obligation.ts +31 -53
- package/src/@codegen/klend/accounts/Reserve.ts +2 -13
- package/src/@codegen/klend/accounts/UserState.ts +75 -0
- package/src/@codegen/klend/accounts/index.ts +0 -6
- package/src/@codegen/klend/errors/custom.ts +2 -427
- package/src/@codegen/klend/instructions/idlMissingTypes.ts +4 -7
- package/src/@codegen/klend/instructions/index.ts +0 -34
- package/src/@codegen/klend/instructions/initReserve.ts +6 -2
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.ts +1 -1
- package/src/@codegen/klend/instructions/updateGlobalConfig.ts +1 -2
- package/src/@codegen/klend/instructions/updateReserveConfig.ts +1 -2
- package/src/@codegen/klend/instructions/withdrawObligationCollateral.ts +1 -1
- package/src/@codegen/klend/instructions/withdrawObligationCollateralV2.ts +1 -1
- package/src/@codegen/klend/types/AssetTier.ts +119 -0
- package/src/@codegen/klend/types/ObligationLiquidity.ts +9 -39
- package/src/@codegen/klend/types/ObligationOrder.ts +4 -4
- package/src/@codegen/klend/types/ReserveConfig.ts +39 -171
- package/src/@codegen/klend/types/ReserveFees.ts +12 -12
- package/src/@codegen/klend/types/ReserveLiquidity.ts +12 -30
- package/src/@codegen/klend/types/UpdateConfigMode.ts +26 -206
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +0 -300
- package/src/@codegen/klend/types/index.ts +16 -45
- package/src/@codegen/klend/zero_padding/ObligationZP.ts +13 -22
- package/src/classes/action.ts +8 -577
- package/src/classes/manager.ts +0 -11
- package/src/classes/market.ts +5 -36
- package/src/classes/obligation.ts +1 -1
- package/src/classes/reserve.ts +8 -13
- package/src/classes/unstakingPool.ts +6 -83
- package/src/classes/vault.ts +57 -38
- package/src/idl/klend.json +294 -2187
- package/src/lending_operations/index.ts +0 -1
- package/src/manager/client_kamino_manager.ts +9 -13
- package/src/utils/ata.ts +79 -0
- package/src/utils/managerTypes.ts +4 -9
- package/src/utils/seeds.ts +26 -28
- package/dist/@codegen/klend/accounts/PoolState.d.ts +0 -53
- package/dist/@codegen/klend/accounts/PoolState.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/PoolState.js +0 -167
- package/dist/@codegen/klend/accounts/PoolState.js.map +0 -1
- package/dist/@codegen/klend/accounts/UnstakeTicket.d.ts +0 -41
- package/dist/@codegen/klend/accounts/UnstakeTicket.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/UnstakeTicket.js +0 -143
- package/dist/@codegen/klend/accounts/UnstakeTicket.js.map +0 -1
- package/dist/@codegen/klend/accounts/WithdrawTicket.d.ts +0 -132
- package/dist/@codegen/klend/accounts/WithdrawTicket.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/WithdrawTicket.js +0 -191
- package/dist/@codegen/klend/accounts/WithdrawTicket.js.map +0 -1
- package/dist/@codegen/klend/instructions/enqueueToWithdraw.d.ts +0 -39
- package/dist/@codegen/klend/instructions/enqueueToWithdraw.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/enqueueToWithdraw.js +0 -67
- package/dist/@codegen/klend/instructions/enqueueToWithdraw.js.map +0 -1
- package/dist/@codegen/klend/instructions/fillBorrowOrder.d.ts +0 -36
- package/dist/@codegen/klend/instructions/fillBorrowOrder.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/fillBorrowOrder.js +0 -49
- package/dist/@codegen/klend/instructions/fillBorrowOrder.js.map +0 -1
- package/dist/@codegen/klend/instructions/recoverInvalidTicketCollateral.d.ts +0 -47
- package/dist/@codegen/klend/instructions/recoverInvalidTicketCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/recoverInvalidTicketCollateral.js +0 -66
- package/dist/@codegen/klend/instructions/recoverInvalidTicketCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/setBorrowOrder.d.ts +0 -31
- package/dist/@codegen/klend/instructions/setBorrowOrder.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/setBorrowOrder.js +0 -64
- package/dist/@codegen/klend/instructions/setBorrowOrder.js.map +0 -1
- package/dist/@codegen/klend/instructions/unstakeLstCollateralEnd.d.ts +0 -53
- package/dist/@codegen/klend/instructions/unstakeLstCollateralEnd.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/unstakeLstCollateralEnd.js +0 -190
- package/dist/@codegen/klend/instructions/unstakeLstCollateralEnd.js.map +0 -1
- package/dist/@codegen/klend/instructions/unstakeLstCollateralStart.d.ts +0 -70
- package/dist/@codegen/klend/instructions/unstakeLstCollateralStart.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/unstakeLstCollateralStart.js +0 -261
- package/dist/@codegen/klend/instructions/unstakeLstCollateralStart.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationUsol.d.ts +0 -41
- package/dist/@codegen/klend/instructions/withdrawObligationUsol.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationUsol.js +0 -135
- package/dist/@codegen/klend/instructions/withdrawObligationUsol.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawQueuedLiquidity.d.ts +0 -51
- package/dist/@codegen/klend/instructions/withdrawQueuedLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawQueuedLiquidity.js +0 -28
- package/dist/@codegen/klend/instructions/withdrawQueuedLiquidity.js.map +0 -1
- package/dist/@codegen/klend/types/BorrowOrder.d.ts +0 -192
- package/dist/@codegen/klend/types/BorrowOrder.d.ts.map +0 -1
- package/dist/@codegen/klend/types/BorrowOrder.js +0 -194
- package/dist/@codegen/klend/types/BorrowOrder.js.map +0 -1
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.d.ts +0 -39
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.d.ts.map +0 -1
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.js +0 -100
- package/dist/@codegen/klend/types/BorrowOrderConfigArgs.js.map +0 -1
- package/dist/@codegen/klend/types/WithdrawQueue.d.ts +0 -64
- package/dist/@codegen/klend/types/WithdrawQueue.d.ts.map +0 -1
- package/dist/@codegen/klend/types/WithdrawQueue.js +0 -104
- package/dist/@codegen/klend/types/WithdrawQueue.js.map +0 -1
- package/dist/lending_operations/unstake_lst_collateral.d.ts +0 -12
- package/dist/lending_operations/unstake_lst_collateral.d.ts.map +0 -1
- package/dist/lending_operations/unstake_lst_collateral.js +0 -104
- package/dist/lending_operations/unstake_lst_collateral.js.map +0 -1
- package/src/@codegen/klend/accounts/PoolState.ts +0 -192
- package/src/@codegen/klend/accounts/UnstakeTicket.ts +0 -160
- package/src/@codegen/klend/accounts/WithdrawTicket.ts +0 -256
- package/src/@codegen/klend/instructions/enqueueToWithdraw.ts +0 -89
- package/src/@codegen/klend/instructions/fillBorrowOrder.ts +0 -96
- package/src/@codegen/klend/instructions/recoverInvalidTicketCollateral.ts +0 -96
- package/src/@codegen/klend/instructions/setBorrowOrder.ts +0 -77
- package/src/@codegen/klend/instructions/unstakeLstCollateralEnd.ts +0 -251
- package/src/@codegen/klend/instructions/unstakeLstCollateralStart.ts +0 -353
- package/src/@codegen/klend/instructions/withdrawObligationUsol.ts +0 -168
- package/src/@codegen/klend/instructions/withdrawQueuedLiquidity.ts +0 -92
- package/src/@codegen/klend/types/BorrowOrder.ts +0 -267
- package/src/@codegen/klend/types/BorrowOrderConfigArgs.ts +0 -87
- package/src/@codegen/klend/types/WithdrawQueue.ts +0 -117
- package/src/lending_operations/unstake_lst_collateral.ts +0 -174
|
@@ -129,34 +129,6 @@ export type CustomError =
|
|
|
129
129
|
| OperationNotPermittedMarketImmutable
|
|
130
130
|
| OrderCreationDisabled
|
|
131
131
|
| NoUpgradeAuthority
|
|
132
|
-
| BorrowOrderDebtLiquidityMintMismatch
|
|
133
|
-
| BorrowOrderMaxBorrowRateExceeded
|
|
134
|
-
| BorrowOrderMinDebtTermInsufficient
|
|
135
|
-
| BorrowOrderFillTimeLimitExceeded
|
|
136
|
-
| ReserveDebtMaturityReached
|
|
137
|
-
| NonUpdatableOrderConfiguration
|
|
138
|
-
| BorrowOrderExecutionDisabled
|
|
139
|
-
| DebtReachedReserveDebtTerm
|
|
140
|
-
| CannotUseSameReserve
|
|
141
|
-
| ObligationShouldBeClosed
|
|
142
|
-
| WithdrawTicketIssuanceDisabled
|
|
143
|
-
| WithdrawTicketRedemptionDisabled
|
|
144
|
-
| WithdrawTicketStillValid
|
|
145
|
-
| WithdrawTicketDestinationLiquidityAtaNotExists
|
|
146
|
-
| UserTokenBalanceMismatch
|
|
147
|
-
| WithdrawQueuedLiquidityValueTooSmall
|
|
148
|
-
| UnstakingSolMintInvalidAction
|
|
149
|
-
| CollateralIsNotLst
|
|
150
|
-
| ObligationIsAlreadyUnstaking
|
|
151
|
-
| UnexpectedUnstakingPool
|
|
152
|
-
| UnexpectedUnstakeTicket
|
|
153
|
-
| InvalidUnstakingAuthority
|
|
154
|
-
| UnstakingSolMintMustBeSet
|
|
155
|
-
| CannotLiquidateWithoutRedeem
|
|
156
|
-
| UnexpectedUsolToLiquidator
|
|
157
|
-
| UnexpectedMint
|
|
158
|
-
| CannotUnstakeWhenSubjectToLiquidation
|
|
159
|
-
| ObligationIsNotUnstaking
|
|
160
132
|
|
|
161
133
|
export class InvalidMarketAuthority extends Error {
|
|
162
134
|
static readonly code = 6000
|
|
@@ -217,10 +189,10 @@ export class InvalidSigner extends Error {
|
|
|
217
189
|
static readonly code = 6005
|
|
218
190
|
readonly code = 6005
|
|
219
191
|
readonly name = "InvalidSigner"
|
|
220
|
-
readonly msg = "
|
|
192
|
+
readonly msg = "Input account must be a signer"
|
|
221
193
|
|
|
222
194
|
constructor(readonly logs?: string[]) {
|
|
223
|
-
super("6005:
|
|
195
|
+
super("6005: Input account must be a signer")
|
|
224
196
|
}
|
|
225
197
|
}
|
|
226
198
|
|
|
@@ -1669,347 +1641,6 @@ export class NoUpgradeAuthority extends Error {
|
|
|
1669
1641
|
}
|
|
1670
1642
|
}
|
|
1671
1643
|
|
|
1672
|
-
export class BorrowOrderDebtLiquidityMintMismatch extends Error {
|
|
1673
|
-
static readonly code = 6130
|
|
1674
|
-
readonly code = 6130
|
|
1675
|
-
readonly name = "BorrowOrderDebtLiquidityMintMismatch"
|
|
1676
|
-
readonly msg = "There is no borrow order requesting debt in the given asset"
|
|
1677
|
-
|
|
1678
|
-
constructor(readonly logs?: string[]) {
|
|
1679
|
-
super("6130: There is no borrow order requesting debt in the given asset")
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
export class BorrowOrderMaxBorrowRateExceeded extends Error {
|
|
1684
|
-
static readonly code = 6131
|
|
1685
|
-
readonly code = 6131
|
|
1686
|
-
readonly name = "BorrowOrderMaxBorrowRateExceeded"
|
|
1687
|
-
readonly msg =
|
|
1688
|
-
"Reserve used for fill exceeds the maximum borrow rate specified by the order"
|
|
1689
|
-
|
|
1690
|
-
constructor(readonly logs?: string[]) {
|
|
1691
|
-
super(
|
|
1692
|
-
"6131: Reserve used for fill exceeds the maximum borrow rate specified by the order"
|
|
1693
|
-
)
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
export class BorrowOrderMinDebtTermInsufficient extends Error {
|
|
1698
|
-
static readonly code = 6132
|
|
1699
|
-
readonly code = 6132
|
|
1700
|
-
readonly name = "BorrowOrderMinDebtTermInsufficient"
|
|
1701
|
-
readonly msg =
|
|
1702
|
-
"Reserve used for fill defines a debt term shorter than specified by the order"
|
|
1703
|
-
|
|
1704
|
-
constructor(readonly logs?: string[]) {
|
|
1705
|
-
super(
|
|
1706
|
-
"6132: Reserve used for fill defines a debt term shorter than specified by the order"
|
|
1707
|
-
)
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
export class BorrowOrderFillTimeLimitExceeded extends Error {
|
|
1712
|
-
static readonly code = 6133
|
|
1713
|
-
readonly code = 6133
|
|
1714
|
-
readonly name = "BorrowOrderFillTimeLimitExceeded"
|
|
1715
|
-
readonly msg = "Borrow order can no longer be filled"
|
|
1716
|
-
|
|
1717
|
-
constructor(readonly logs?: string[]) {
|
|
1718
|
-
super("6133: Borrow order can no longer be filled")
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
export class ReserveDebtMaturityReached extends Error {
|
|
1723
|
-
static readonly code = 6134
|
|
1724
|
-
readonly code = 6134
|
|
1725
|
-
readonly name = "ReserveDebtMaturityReached"
|
|
1726
|
-
readonly msg =
|
|
1727
|
-
"Cannot borrow from a reserve that reached its debt maturity timestamp"
|
|
1728
|
-
|
|
1729
|
-
constructor(readonly logs?: string[]) {
|
|
1730
|
-
super(
|
|
1731
|
-
"6134: Cannot borrow from a reserve that reached its debt maturity timestamp"
|
|
1732
|
-
)
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
export class NonUpdatableOrderConfiguration extends Error {
|
|
1737
|
-
static readonly code = 6135
|
|
1738
|
-
readonly code = 6135
|
|
1739
|
-
readonly name = "NonUpdatableOrderConfiguration"
|
|
1740
|
-
readonly msg =
|
|
1741
|
-
"Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"
|
|
1742
|
-
|
|
1743
|
-
constructor(readonly logs?: string[]) {
|
|
1744
|
-
super(
|
|
1745
|
-
"6135: Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"
|
|
1746
|
-
)
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
export class BorrowOrderExecutionDisabled extends Error {
|
|
1751
|
-
static readonly code = 6136
|
|
1752
|
-
readonly code = 6136
|
|
1753
|
-
readonly name = "BorrowOrderExecutionDisabled"
|
|
1754
|
-
readonly msg = "Execution of borrow orders is disabled"
|
|
1755
|
-
|
|
1756
|
-
constructor(readonly logs?: string[]) {
|
|
1757
|
-
super("6136: Execution of borrow orders is disabled")
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
export class DebtReachedReserveDebtTerm extends Error {
|
|
1762
|
-
static readonly code = 6137
|
|
1763
|
-
readonly code = 6137
|
|
1764
|
-
readonly name = "DebtReachedReserveDebtTerm"
|
|
1765
|
-
readonly msg =
|
|
1766
|
-
"Cannot increase the debt that has reached its end of term configured by the reserve"
|
|
1767
|
-
|
|
1768
|
-
constructor(readonly logs?: string[]) {
|
|
1769
|
-
super(
|
|
1770
|
-
"6137: Cannot increase the debt that has reached its end of term configured by the reserve"
|
|
1771
|
-
)
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
export class CannotUseSameReserve extends Error {
|
|
1776
|
-
static readonly code = 6138
|
|
1777
|
-
readonly code = 6138
|
|
1778
|
-
readonly name = "CannotUseSameReserve"
|
|
1779
|
-
readonly msg = "Cannot call ix with same reserve"
|
|
1780
|
-
|
|
1781
|
-
constructor(readonly logs?: string[]) {
|
|
1782
|
-
super("6138: Cannot call ix with same reserve")
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
export class ObligationShouldBeClosed extends Error {
|
|
1787
|
-
static readonly code = 6139
|
|
1788
|
-
readonly code = 6139
|
|
1789
|
-
readonly name = "ObligationShouldBeClosed"
|
|
1790
|
-
readonly msg = "Obligation expected to be closed"
|
|
1791
|
-
|
|
1792
|
-
constructor(readonly logs?: string[]) {
|
|
1793
|
-
super("6139: Obligation expected to be closed")
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
export class WithdrawTicketIssuanceDisabled extends Error {
|
|
1798
|
-
static readonly code = 6140
|
|
1799
|
-
readonly code = 6140
|
|
1800
|
-
readonly name = "WithdrawTicketIssuanceDisabled"
|
|
1801
|
-
readonly msg = "Issuing new withdraw tickets is disabled by the market"
|
|
1802
|
-
|
|
1803
|
-
constructor(readonly logs?: string[]) {
|
|
1804
|
-
super("6140: Issuing new withdraw tickets is disabled by the market")
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
export class WithdrawTicketRedemptionDisabled extends Error {
|
|
1809
|
-
static readonly code = 6141
|
|
1810
|
-
readonly code = 6141
|
|
1811
|
-
readonly name = "WithdrawTicketRedemptionDisabled"
|
|
1812
|
-
readonly msg = "Redeeming withdraw tickets is disabled by the market"
|
|
1813
|
-
|
|
1814
|
-
constructor(readonly logs?: string[]) {
|
|
1815
|
-
super("6141: Redeeming withdraw tickets is disabled by the market")
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
export class WithdrawTicketStillValid extends Error {
|
|
1820
|
-
static readonly code = 6142
|
|
1821
|
-
readonly code = 6142
|
|
1822
|
-
readonly name = "WithdrawTicketStillValid"
|
|
1823
|
-
readonly msg =
|
|
1824
|
-
"Recovering collateral is only available after the withdraw ticket has been marked invalid"
|
|
1825
|
-
|
|
1826
|
-
constructor(readonly logs?: string[]) {
|
|
1827
|
-
super(
|
|
1828
|
-
"6142: Recovering collateral is only available after the withdraw ticket has been marked invalid"
|
|
1829
|
-
)
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
export class WithdrawTicketDestinationLiquidityAtaNotExists extends Error {
|
|
1834
|
-
static readonly code = 6143
|
|
1835
|
-
readonly code = 6143
|
|
1836
|
-
readonly name = "WithdrawTicketDestinationLiquidityAtaNotExists"
|
|
1837
|
-
readonly msg =
|
|
1838
|
-
"The withdraw ticket owner's ATA for liquidity should be created first"
|
|
1839
|
-
|
|
1840
|
-
constructor(readonly logs?: string[]) {
|
|
1841
|
-
super(
|
|
1842
|
-
"6143: The withdraw ticket owner's ATA for liquidity should be created first"
|
|
1843
|
-
)
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
export class UserTokenBalanceMismatch extends Error {
|
|
1848
|
-
static readonly code = 6144
|
|
1849
|
-
readonly code = 6144
|
|
1850
|
-
readonly name = "UserTokenBalanceMismatch"
|
|
1851
|
-
readonly msg =
|
|
1852
|
-
"The user's token account has changed its balance in an unexpected way"
|
|
1853
|
-
|
|
1854
|
-
constructor(readonly logs?: string[]) {
|
|
1855
|
-
super(
|
|
1856
|
-
"6144: The user's token account has changed its balance in an unexpected way"
|
|
1857
|
-
)
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
export class WithdrawQueuedLiquidityValueTooSmall extends Error {
|
|
1862
|
-
static readonly code = 6145
|
|
1863
|
-
readonly code = 6145
|
|
1864
|
-
readonly name = "WithdrawQueuedLiquidityValueTooSmall"
|
|
1865
|
-
readonly msg =
|
|
1866
|
-
"Available liquidity could not satisfy the minimum required ticketed withdrawal value"
|
|
1867
|
-
|
|
1868
|
-
constructor(readonly logs?: string[]) {
|
|
1869
|
-
super(
|
|
1870
|
-
"6145: Available liquidity could not satisfy the minimum required ticketed withdrawal value"
|
|
1871
|
-
)
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
export class UnstakingSolMintInvalidAction extends Error {
|
|
1876
|
-
static readonly code = 6146
|
|
1877
|
-
readonly code = 6146
|
|
1878
|
-
readonly name = "UnstakingSolMintInvalidAction"
|
|
1879
|
-
readonly msg = "Cannot withdraw or redeem individually using unstaking sol"
|
|
1880
|
-
|
|
1881
|
-
constructor(readonly logs?: string[]) {
|
|
1882
|
-
super("6146: Cannot withdraw or redeem individually using unstaking sol")
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
export class CollateralIsNotLst extends Error {
|
|
1887
|
-
static readonly code = 6147
|
|
1888
|
-
readonly code = 6147
|
|
1889
|
-
readonly name = "CollateralIsNotLst"
|
|
1890
|
-
readonly msg = "Collateral is not an lst and cannot be closed"
|
|
1891
|
-
|
|
1892
|
-
constructor(readonly logs?: string[]) {
|
|
1893
|
-
super("6147: Collateral is not an lst and cannot be closed")
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
export class ObligationIsAlreadyUnstaking extends Error {
|
|
1898
|
-
static readonly code = 6148
|
|
1899
|
-
readonly code = 6148
|
|
1900
|
-
readonly name = "ObligationIsAlreadyUnstaking"
|
|
1901
|
-
readonly msg = "Obligation is already in the process of unstaking"
|
|
1902
|
-
|
|
1903
|
-
constructor(readonly logs?: string[]) {
|
|
1904
|
-
super("6148: Obligation is already in the process of unstaking")
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
export class UnexpectedUnstakingPool extends Error {
|
|
1909
|
-
static readonly code = 6149
|
|
1910
|
-
readonly code = 6149
|
|
1911
|
-
readonly name = "UnexpectedUnstakingPool"
|
|
1912
|
-
readonly msg = "Unstaking pool must match the one in lending market"
|
|
1913
|
-
|
|
1914
|
-
constructor(readonly logs?: string[]) {
|
|
1915
|
-
super("6149: Unstaking pool must match the one in lending market")
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
export class UnexpectedUnstakeTicket extends Error {
|
|
1920
|
-
static readonly code = 6150
|
|
1921
|
-
readonly code = 6150
|
|
1922
|
-
readonly name = "UnexpectedUnstakeTicket"
|
|
1923
|
-
readonly msg = "Unstake ticket must match the one in obligation"
|
|
1924
|
-
|
|
1925
|
-
constructor(readonly logs?: string[]) {
|
|
1926
|
-
super("6150: Unstake ticket must match the one in obligation")
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
export class InvalidUnstakingAuthority extends Error {
|
|
1931
|
-
static readonly code = 6151
|
|
1932
|
-
readonly code = 6151
|
|
1933
|
-
readonly name = "InvalidUnstakingAuthority"
|
|
1934
|
-
readonly msg =
|
|
1935
|
-
"Unstaking authority passed is not the lending market authority"
|
|
1936
|
-
|
|
1937
|
-
constructor(readonly logs?: string[]) {
|
|
1938
|
-
super(
|
|
1939
|
-
"6151: Unstaking authority passed is not the lending market authority"
|
|
1940
|
-
)
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
export class UnstakingSolMintMustBeSet extends Error {
|
|
1945
|
-
static readonly code = 6152
|
|
1946
|
-
readonly code = 6152
|
|
1947
|
-
readonly name = "UnstakingSolMintMustBeSet"
|
|
1948
|
-
readonly msg =
|
|
1949
|
-
"Liquidate requires the unstaking sol mint to be set and correct"
|
|
1950
|
-
|
|
1951
|
-
constructor(readonly logs?: string[]) {
|
|
1952
|
-
super(
|
|
1953
|
-
"6152: Liquidate requires the unstaking sol mint to be set and correct"
|
|
1954
|
-
)
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
export class CannotLiquidateWithoutRedeem extends Error {
|
|
1959
|
-
static readonly code = 6153
|
|
1960
|
-
readonly code = 6153
|
|
1961
|
-
readonly name = "CannotLiquidateWithoutRedeem"
|
|
1962
|
-
readonly msg = "Cannot liquidate obligation without redeeming ctokens"
|
|
1963
|
-
|
|
1964
|
-
constructor(readonly logs?: string[]) {
|
|
1965
|
-
super("6153: Cannot liquidate obligation without redeeming ctokens")
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
export class UnexpectedUsolToLiquidator extends Error {
|
|
1970
|
-
static readonly code = 6154
|
|
1971
|
-
readonly code = 6154
|
|
1972
|
-
readonly name = "UnexpectedUsolToLiquidator"
|
|
1973
|
-
readonly msg = "Gave a different amount to liquidator than expected"
|
|
1974
|
-
|
|
1975
|
-
constructor(readonly logs?: string[]) {
|
|
1976
|
-
super("6154: Gave a different amount to liquidator than expected")
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
export class UnexpectedMint extends Error {
|
|
1981
|
-
static readonly code = 6155
|
|
1982
|
-
readonly code = 6155
|
|
1983
|
-
readonly name = "UnexpectedMint"
|
|
1984
|
-
readonly msg = "Passed mint is different than expected"
|
|
1985
|
-
|
|
1986
|
-
constructor(readonly logs?: string[]) {
|
|
1987
|
-
super("6155: Passed mint is different than expected")
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
export class CannotUnstakeWhenSubjectToLiquidation extends Error {
|
|
1992
|
-
static readonly code = 6156
|
|
1993
|
-
readonly code = 6156
|
|
1994
|
-
readonly name = "CannotUnstakeWhenSubjectToLiquidation"
|
|
1995
|
-
readonly msg = "Cannot unstake when obligation is unhealthy"
|
|
1996
|
-
|
|
1997
|
-
constructor(readonly logs?: string[]) {
|
|
1998
|
-
super("6156: Cannot unstake when obligation is unhealthy")
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
export class ObligationIsNotUnstaking extends Error {
|
|
2003
|
-
static readonly code = 6157
|
|
2004
|
-
readonly code = 6157
|
|
2005
|
-
readonly name = "ObligationIsNotUnstaking"
|
|
2006
|
-
readonly msg = "Cannot unstake when obligation has no USOL deposited"
|
|
2007
|
-
|
|
2008
|
-
constructor(readonly logs?: string[]) {
|
|
2009
|
-
super("6157: Cannot unstake when obligation has no USOL deposited")
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
1644
|
export function fromCode(code: number, logs?: string[]): CustomError | null {
|
|
2014
1645
|
switch (code) {
|
|
2015
1646
|
case 6000:
|
|
@@ -2272,62 +1903,6 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
|
|
|
2272
1903
|
return new OrderCreationDisabled(logs)
|
|
2273
1904
|
case 6129:
|
|
2274
1905
|
return new NoUpgradeAuthority(logs)
|
|
2275
|
-
case 6130:
|
|
2276
|
-
return new BorrowOrderDebtLiquidityMintMismatch(logs)
|
|
2277
|
-
case 6131:
|
|
2278
|
-
return new BorrowOrderMaxBorrowRateExceeded(logs)
|
|
2279
|
-
case 6132:
|
|
2280
|
-
return new BorrowOrderMinDebtTermInsufficient(logs)
|
|
2281
|
-
case 6133:
|
|
2282
|
-
return new BorrowOrderFillTimeLimitExceeded(logs)
|
|
2283
|
-
case 6134:
|
|
2284
|
-
return new ReserveDebtMaturityReached(logs)
|
|
2285
|
-
case 6135:
|
|
2286
|
-
return new NonUpdatableOrderConfiguration(logs)
|
|
2287
|
-
case 6136:
|
|
2288
|
-
return new BorrowOrderExecutionDisabled(logs)
|
|
2289
|
-
case 6137:
|
|
2290
|
-
return new DebtReachedReserveDebtTerm(logs)
|
|
2291
|
-
case 6138:
|
|
2292
|
-
return new CannotUseSameReserve(logs)
|
|
2293
|
-
case 6139:
|
|
2294
|
-
return new ObligationShouldBeClosed(logs)
|
|
2295
|
-
case 6140:
|
|
2296
|
-
return new WithdrawTicketIssuanceDisabled(logs)
|
|
2297
|
-
case 6141:
|
|
2298
|
-
return new WithdrawTicketRedemptionDisabled(logs)
|
|
2299
|
-
case 6142:
|
|
2300
|
-
return new WithdrawTicketStillValid(logs)
|
|
2301
|
-
case 6143:
|
|
2302
|
-
return new WithdrawTicketDestinationLiquidityAtaNotExists(logs)
|
|
2303
|
-
case 6144:
|
|
2304
|
-
return new UserTokenBalanceMismatch(logs)
|
|
2305
|
-
case 6145:
|
|
2306
|
-
return new WithdrawQueuedLiquidityValueTooSmall(logs)
|
|
2307
|
-
case 6146:
|
|
2308
|
-
return new UnstakingSolMintInvalidAction(logs)
|
|
2309
|
-
case 6147:
|
|
2310
|
-
return new CollateralIsNotLst(logs)
|
|
2311
|
-
case 6148:
|
|
2312
|
-
return new ObligationIsAlreadyUnstaking(logs)
|
|
2313
|
-
case 6149:
|
|
2314
|
-
return new UnexpectedUnstakingPool(logs)
|
|
2315
|
-
case 6150:
|
|
2316
|
-
return new UnexpectedUnstakeTicket(logs)
|
|
2317
|
-
case 6151:
|
|
2318
|
-
return new InvalidUnstakingAuthority(logs)
|
|
2319
|
-
case 6152:
|
|
2320
|
-
return new UnstakingSolMintMustBeSet(logs)
|
|
2321
|
-
case 6153:
|
|
2322
|
-
return new CannotLiquidateWithoutRedeem(logs)
|
|
2323
|
-
case 6154:
|
|
2324
|
-
return new UnexpectedUsolToLiquidator(logs)
|
|
2325
|
-
case 6155:
|
|
2326
|
-
return new UnexpectedMint(logs)
|
|
2327
|
-
case 6156:
|
|
2328
|
-
return new CannotUnstakeWhenSubjectToLiquidation(logs)
|
|
2329
|
-
case 6157:
|
|
2330
|
-
return new ObligationIsNotUnstaking(logs)
|
|
2331
1906
|
}
|
|
2332
1907
|
|
|
2333
1908
|
return null
|
|
@@ -19,6 +19,7 @@ export const DISCRIMINATOR = Buffer.from([130, 80, 38, 153, 80, 212, 182, 253])
|
|
|
19
19
|
|
|
20
20
|
export interface IdlMissingTypesArgs {
|
|
21
21
|
reserveFarmKind: types.ReserveFarmKindKind
|
|
22
|
+
assetTier: types.AssetTierKind
|
|
22
23
|
feeCalculation: types.FeeCalculationKind
|
|
23
24
|
reserveStatus: types.ReserveStatusKind
|
|
24
25
|
updateConfigMode: types.UpdateConfigModeKind
|
|
@@ -33,8 +34,9 @@ export interface IdlMissingTypesAccounts {
|
|
|
33
34
|
reserve: Address
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
export const layout = borsh.struct
|
|
37
|
+
export const layout = borsh.struct([
|
|
37
38
|
types.ReserveFarmKind.layout("reserveFarmKind"),
|
|
39
|
+
types.AssetTier.layout("assetTier"),
|
|
38
40
|
types.FeeCalculation.layout("feeCalculation"),
|
|
39
41
|
types.ReserveStatus.layout("reserveStatus"),
|
|
40
42
|
types.UpdateConfigMode.layout("updateConfigMode"),
|
|
@@ -58,18 +60,13 @@ export function idlMissingTypes(
|
|
|
58
60
|
const buffer = Buffer.alloc(1000)
|
|
59
61
|
const len = layout.encode(
|
|
60
62
|
{
|
|
61
|
-
// @ts-ignore
|
|
62
63
|
reserveFarmKind: args.reserveFarmKind.toEncodable(),
|
|
63
|
-
|
|
64
|
+
assetTier: args.assetTier.toEncodable(),
|
|
64
65
|
feeCalculation: args.feeCalculation.toEncodable(),
|
|
65
|
-
// @ts-ignore
|
|
66
66
|
reserveStatus: args.reserveStatus.toEncodable(),
|
|
67
|
-
// @ts-ignore
|
|
68
67
|
updateConfigMode: args.updateConfigMode.toEncodable(),
|
|
69
|
-
// @ts-ignore
|
|
70
68
|
updateLendingMarketConfigValue:
|
|
71
69
|
args.updateLendingMarketConfigValue.toEncodable(),
|
|
72
|
-
// @ts-ignore
|
|
73
70
|
updateLendingMarketConfigMode:
|
|
74
71
|
args.updateLendingMarketConfigMode.toEncodable(),
|
|
75
72
|
},
|
|
@@ -122,11 +122,6 @@ export type {
|
|
|
122
122
|
DepositAndWithdrawArgs,
|
|
123
123
|
DepositAndWithdrawAccounts,
|
|
124
124
|
} from "./depositAndWithdraw"
|
|
125
|
-
export { unstakeLstCollateralStart } from "./unstakeLstCollateralStart"
|
|
126
|
-
export type {
|
|
127
|
-
UnstakeLstCollateralStartArgs,
|
|
128
|
-
UnstakeLstCollateralStartAccounts,
|
|
129
|
-
} from "./unstakeLstCollateralStart"
|
|
130
125
|
export { depositReserveLiquidityAndObligationCollateral } from "./depositReserveLiquidityAndObligationCollateral"
|
|
131
126
|
export type {
|
|
132
127
|
DepositReserveLiquidityAndObligationCollateralArgs,
|
|
@@ -147,11 +142,6 @@ export type {
|
|
|
147
142
|
WithdrawObligationCollateralAndRedeemReserveCollateralV2Args,
|
|
148
143
|
WithdrawObligationCollateralAndRedeemReserveCollateralV2Accounts,
|
|
149
144
|
} from "./withdrawObligationCollateralAndRedeemReserveCollateralV2"
|
|
150
|
-
export { withdrawObligationUsol } from "./withdrawObligationUsol"
|
|
151
|
-
export type {
|
|
152
|
-
WithdrawObligationUsolArgs,
|
|
153
|
-
WithdrawObligationUsolAccounts,
|
|
154
|
-
} from "./withdrawObligationUsol"
|
|
155
145
|
export { liquidateObligationAndRedeemReserveCollateral } from "./liquidateObligationAndRedeemReserveCollateral"
|
|
156
146
|
export type {
|
|
157
147
|
LiquidateObligationAndRedeemReserveCollateralArgs,
|
|
@@ -162,11 +152,6 @@ export type {
|
|
|
162
152
|
LiquidateObligationAndRedeemReserveCollateralV2Args,
|
|
163
153
|
LiquidateObligationAndRedeemReserveCollateralV2Accounts,
|
|
164
154
|
} from "./liquidateObligationAndRedeemReserveCollateralV2"
|
|
165
|
-
export { unstakeLstCollateralEnd } from "./unstakeLstCollateralEnd"
|
|
166
|
-
export type {
|
|
167
|
-
UnstakeLstCollateralEndArgs,
|
|
168
|
-
UnstakeLstCollateralEndAccounts,
|
|
169
|
-
} from "./unstakeLstCollateralEnd"
|
|
170
155
|
export { flashRepayReserveLiquidity } from "./flashRepayReserveLiquidity"
|
|
171
156
|
export type {
|
|
172
157
|
FlashRepayReserveLiquidityArgs,
|
|
@@ -203,25 +188,6 @@ export type {
|
|
|
203
188
|
SetObligationOrderArgs,
|
|
204
189
|
SetObligationOrderAccounts,
|
|
205
190
|
} from "./setObligationOrder"
|
|
206
|
-
export { setBorrowOrder } from "./setBorrowOrder"
|
|
207
|
-
export type {
|
|
208
|
-
SetBorrowOrderArgs,
|
|
209
|
-
SetBorrowOrderAccounts,
|
|
210
|
-
} from "./setBorrowOrder"
|
|
211
|
-
export { fillBorrowOrder } from "./fillBorrowOrder"
|
|
212
|
-
export type { FillBorrowOrderAccounts } from "./fillBorrowOrder"
|
|
213
|
-
export { enqueueToWithdraw } from "./enqueueToWithdraw"
|
|
214
|
-
export type {
|
|
215
|
-
EnqueueToWithdrawArgs,
|
|
216
|
-
EnqueueToWithdrawAccounts,
|
|
217
|
-
} from "./enqueueToWithdraw"
|
|
218
|
-
export { withdrawQueuedLiquidity } from "./withdrawQueuedLiquidity"
|
|
219
|
-
export type { WithdrawQueuedLiquidityAccounts } from "./withdrawQueuedLiquidity"
|
|
220
|
-
export { recoverInvalidTicketCollateral } from "./recoverInvalidTicketCollateral"
|
|
221
|
-
export type {
|
|
222
|
-
RecoverInvalidTicketCollateralArgs,
|
|
223
|
-
RecoverInvalidTicketCollateralAccounts,
|
|
224
|
-
} from "./recoverInvalidTicketCollateral"
|
|
225
191
|
export { initGlobalConfig } from "./initGlobalConfig"
|
|
226
192
|
export type { InitGlobalConfigAccounts } from "./initGlobalConfig"
|
|
227
193
|
export { updateGlobalConfig } from "./updateGlobalConfig"
|
|
@@ -18,7 +18,7 @@ import { PROGRAM_ID } from "../programId"
|
|
|
18
18
|
export const DISCRIMINATOR = Buffer.from([138, 245, 71, 225, 153, 4, 3, 43])
|
|
19
19
|
|
|
20
20
|
export interface InitReserveAccounts {
|
|
21
|
-
|
|
21
|
+
lendingMarketOwner: TransactionSigner
|
|
22
22
|
lendingMarket: Address
|
|
23
23
|
lendingMarketAuthority: Address
|
|
24
24
|
reserve: Address
|
|
@@ -40,7 +40,11 @@ export function initReserve(
|
|
|
40
40
|
programAddress: Address = PROGRAM_ID
|
|
41
41
|
) {
|
|
42
42
|
const keys: Array<AccountMeta | AccountSignerMeta> = [
|
|
43
|
-
{
|
|
43
|
+
{
|
|
44
|
+
address: accounts.lendingMarketOwner.address,
|
|
45
|
+
role: 3,
|
|
46
|
+
signer: accounts.lendingMarketOwner,
|
|
47
|
+
},
|
|
44
48
|
{ address: accounts.lendingMarket, role: 0 },
|
|
45
49
|
{ address: accounts.lendingMarketAuthority, role: 0 },
|
|
46
50
|
{ address: accounts.reserve, role: 1 },
|
|
@@ -67,7 +67,7 @@ export function liquidateObligationAndRedeemReserveCollateral(
|
|
|
67
67
|
},
|
|
68
68
|
{ address: accounts.obligation, role: 1 },
|
|
69
69
|
{ address: accounts.lendingMarket, role: 0 },
|
|
70
|
-
{ address: accounts.lendingMarketAuthority, role:
|
|
70
|
+
{ address: accounts.lendingMarketAuthority, role: 0 },
|
|
71
71
|
{ address: accounts.repayReserve, role: 1 },
|
|
72
72
|
{ address: accounts.repayReserveLiquidityMint, role: 0 },
|
|
73
73
|
{ address: accounts.repayReserveLiquiditySupply, role: 1 },
|
|
@@ -27,7 +27,7 @@ export interface UpdateGlobalConfigAccounts {
|
|
|
27
27
|
globalConfig: Address
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export const layout = borsh.struct
|
|
30
|
+
export const layout = borsh.struct([
|
|
31
31
|
types.UpdateGlobalConfigMode.layout("mode"),
|
|
32
32
|
borsh.vecU8("value"),
|
|
33
33
|
])
|
|
@@ -50,7 +50,6 @@ export function updateGlobalConfig(
|
|
|
50
50
|
const buffer = Buffer.alloc(1000)
|
|
51
51
|
const len = layout.encode(
|
|
52
52
|
{
|
|
53
|
-
// @ts-ignore
|
|
54
53
|
mode: args.mode.toEncodable(),
|
|
55
54
|
value: Buffer.from(
|
|
56
55
|
args.value.buffer,
|
|
@@ -30,7 +30,7 @@ export interface UpdateReserveConfigAccounts {
|
|
|
30
30
|
reserve: Address
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export const layout = borsh.struct
|
|
33
|
+
export const layout = borsh.struct([
|
|
34
34
|
types.UpdateConfigMode.layout("mode"),
|
|
35
35
|
borsh.vecU8("value"),
|
|
36
36
|
borsh.bool("skipConfigIntegrityValidation"),
|
|
@@ -52,7 +52,6 @@ export function updateReserveConfig(
|
|
|
52
52
|
const buffer = Buffer.alloc(1000)
|
|
53
53
|
const len = layout.encode(
|
|
54
54
|
{
|
|
55
|
-
// @ts-ignore
|
|
56
55
|
mode: args.mode.toEncodable(),
|
|
57
56
|
value: Buffer.from(
|
|
58
57
|
args.value.buffer,
|
|
@@ -44,7 +44,7 @@ export function withdrawObligationCollateral(
|
|
|
44
44
|
programAddress: Address = PROGRAM_ID
|
|
45
45
|
) {
|
|
46
46
|
const keys: Array<AccountMeta | AccountSignerMeta> = [
|
|
47
|
-
{ address: accounts.owner.address, role:
|
|
47
|
+
{ address: accounts.owner.address, role: 2, signer: accounts.owner },
|
|
48
48
|
{ address: accounts.obligation, role: 1 },
|
|
49
49
|
{ address: accounts.lendingMarket, role: 0 },
|
|
50
50
|
{ address: accounts.lendingMarketAuthority, role: 0 },
|
|
@@ -55,7 +55,7 @@ export function withdrawObligationCollateralV2(
|
|
|
55
55
|
const keys: Array<AccountMeta | AccountSignerMeta> = [
|
|
56
56
|
{
|
|
57
57
|
address: accounts.withdrawAccounts.owner.address,
|
|
58
|
-
role:
|
|
58
|
+
role: 2,
|
|
59
59
|
signer: accounts.withdrawAccounts.owner,
|
|
60
60
|
},
|
|
61
61
|
{ address: accounts.withdrawAccounts.obligation, role: 1 },
|