@kamino-finance/klend-sdk 6.0.4 → 6.0.5-beta.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.
- package/README.md +1 -1
- package/README_KAMINO_MANAGER.md +1 -1
- package/dist/classes/action.d.ts +78 -80
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +707 -671
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/curve.d.ts +1 -1
- package/dist/classes/curve.d.ts.map +1 -1
- package/dist/classes/curve.js +1 -1
- package/dist/classes/curve.js.map +1 -1
- package/dist/classes/farm_utils.d.ts +14 -14
- package/dist/classes/farm_utils.d.ts.map +1 -1
- package/dist/classes/farm_utils.js +41 -34
- package/dist/classes/farm_utils.js.map +1 -1
- package/dist/classes/jupiterPerps.d.ts +2 -2
- package/dist/classes/jupiterPerps.d.ts.map +1 -1
- package/dist/classes/jupiterPerps.js +1 -1
- package/dist/classes/jupiterPerps.js.map +1 -1
- package/dist/classes/manager.d.ts +88 -122
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +157 -237
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +77 -68
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +273 -236
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/obligation.d.ts +51 -52
- package/dist/classes/obligation.d.ts.map +1 -1
- package/dist/classes/obligation.js +38 -44
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/obligationOrder.d.ts +1 -1
- package/dist/classes/obligationOrder.d.ts.map +1 -1
- package/dist/classes/obligationOrder.js +3 -3
- package/dist/classes/obligationOrder.js.map +1 -1
- package/dist/classes/reserve.d.ts +36 -44
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +68 -92
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/shared.d.ts +3 -3
- package/dist/classes/shared.d.ts.map +1 -1
- package/dist/classes/utils.d.ts +5 -5
- package/dist/classes/utils.d.ts.map +1 -1
- package/dist/classes/utils.js +9 -4
- package/dist/classes/utils.js.map +1 -1
- package/dist/classes/vault.d.ts +87 -113
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +386 -418
- package/dist/classes/vault.js.map +1 -1
- package/dist/classes/vault_types.d.ts +23 -23
- package/dist/classes/vault_types.d.ts.map +1 -1
- package/dist/client_kamino_manager.d.ts +13 -0
- package/dist/client_kamino_manager.d.ts.map +1 -0
- package/dist/client_kamino_manager.js +1202 -0
- package/dist/client_kamino_manager.js.map +1 -0
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts +40 -0
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/GlobalConfig.js +116 -0
- package/dist/idl_codegen/accounts/GlobalConfig.js.map +1 -0
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +252 -0
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/LendingMarket.js +333 -0
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -0
- package/dist/idl_codegen/accounts/Obligation.d.ts +199 -0
- package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/Obligation.js +292 -0
- package/dist/idl_codegen/accounts/Obligation.js.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerState.d.ts +22 -0
- package/dist/idl_codegen/accounts/ReferrerState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerState.js +100 -0
- package/dist/idl_codegen/accounts/ReferrerState.js.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts +51 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.js +134 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.js.map +1 -0
- package/dist/idl_codegen/accounts/Reserve.d.ts +90 -0
- package/dist/idl_codegen/accounts/Reserve.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/Reserve.js +189 -0
- package/dist/idl_codegen/accounts/Reserve.js.map +1 -0
- package/dist/idl_codegen/accounts/ShortUrl.d.ts +22 -0
- package/dist/idl_codegen/accounts/ShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ShortUrl.js +100 -0
- package/dist/idl_codegen/accounts/ShortUrl.js.map +1 -0
- package/dist/idl_codegen/accounts/UserMetadata.d.ts +48 -0
- package/dist/idl_codegen/accounts/UserMetadata.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/UserMetadata.js +133 -0
- package/dist/idl_codegen/accounts/UserMetadata.js.map +1 -0
- package/dist/idl_codegen/accounts/UserState.d.ts +143 -0
- package/dist/idl_codegen/accounts/UserState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/UserState.js +219 -0
- package/dist/idl_codegen/accounts/UserState.js.map +1 -0
- package/dist/idl_codegen/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/index.js.map +1 -0
- package/dist/idl_codegen/errors/anchor.d.ts.map +1 -0
- package/dist/idl_codegen/errors/anchor.js.map +1 -0
- package/dist/idl_codegen/errors/custom.d.ts.map +1 -0
- package/dist/idl_codegen/errors/custom.js.map +1 -0
- package/dist/idl_codegen/errors/index.d.ts +6 -0
- package/dist/idl_codegen/errors/index.d.ts.map +1 -0
- package/dist/idl_codegen/errors/index.js +80 -0
- package/dist/idl_codegen/errors/index.js.map +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts +22 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.js +90 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.js.map +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.d.ts +29 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.js +125 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.js.map +1 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts +10 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js +19 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js.map +1 -0
- package/dist/idl_codegen/instructions/depositAndWithdraw.d.ts +52 -0
- package/dist/idl_codegen/instructions/depositAndWithdraw.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositAndWithdraw.js +219 -0
- package/dist/idl_codegen/instructions/depositAndWithdraw.js.map +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts +18 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.js +74 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.d.ts +26 -0
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.js +110 -0
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.js.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts +22 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.js +98 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.js.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +24 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js +104 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +31 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.js +135 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +1 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts +22 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js +90 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js.map +1 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts +23 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js +90 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js.map +1 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts +20 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.js +73 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.js.map +1 -0
- package/dist/idl_codegen/instructions/index.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/index.js.map +1 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts +19 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.js +72 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.js.map +1 -0
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts +10 -0
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initGlobalConfig.js +19 -0
- package/dist/idl_codegen/instructions/initGlobalConfig.js.map +1 -0
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts +14 -0
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initLendingMarket.js +65 -0
- package/dist/idl_codegen/instructions/initLendingMarket.js.map +1 -0
- package/dist/idl_codegen/instructions/initObligation.d.ts +19 -0
- package/dist/idl_codegen/instructions/initObligation.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initObligation.js +64 -0
- package/dist/idl_codegen/instructions/initObligation.js.map +1 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts +20 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js +69 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts +15 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js +64 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts +12 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.js +21 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.js.map +1 -0
- package/dist/idl_codegen/instructions/initReserve.d.ts +19 -0
- package/dist/idl_codegen/instructions/initReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReserve.js +60 -0
- package/dist/idl_codegen/instructions/initReserve.js.map +1 -0
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts +15 -0
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initUserMetadata.js +64 -0
- package/dist/idl_codegen/instructions/initUserMetadata.js.map +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +32 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js +136 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +43 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +181 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.js.map +1 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts +12 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js +57 -0
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js.map +1 -0
- package/dist/idl_codegen/instructions/redeemFees.d.ts +12 -0
- package/dist/idl_codegen/instructions/redeemFees.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/redeemFees.js +37 -0
- package/dist/idl_codegen/instructions/redeemFees.js.map +1 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts +22 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.js +102 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligation.d.ts +7 -0
- package/dist/idl_codegen/instructions/refreshObligation.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligation.js +16 -0
- package/dist/idl_codegen/instructions/refreshObligation.js.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts +21 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js +88 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js.map +1 -0
- package/dist/idl_codegen/instructions/refreshReserve.d.ts +11 -0
- package/dist/idl_codegen/instructions/refreshReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshReserve.js +28 -0
- package/dist/idl_codegen/instructions/refreshReserve.js.map +1 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts +7 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.js +53 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.js.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts +47 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js +190 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.d.ts +49 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.js +205 -0
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.js.map +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts +19 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.js +75 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.js.map +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.d.ts +27 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.js +111 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.js.map +1 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts +12 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.js +57 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.js.map +1 -0
- package/dist/idl_codegen/instructions/setObligationOrder.d.ts +14 -0
- package/dist/idl_codegen/instructions/setObligationOrder.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/setObligationOrder.js +62 -0
- package/dist/idl_codegen/instructions/setObligationOrder.js.map +1 -0
- package/dist/idl_codegen/instructions/socializeLoss.d.ts +15 -0
- package/dist/idl_codegen/instructions/socializeLoss.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/socializeLoss.js +63 -0
- package/dist/idl_codegen/instructions/socializeLoss.js.map +1 -0
- package/dist/idl_codegen/instructions/socializeLossV2.d.ts +23 -0
- package/dist/idl_codegen/instructions/socializeLossV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/socializeLossV2.js +95 -0
- package/dist/idl_codegen/instructions/socializeLossV2.js.map +1 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts +14 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.js +61 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.js.map +1 -0
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts +13 -0
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateGlobalConfig.js +61 -0
- package/dist/idl_codegen/instructions/updateGlobalConfig.js.map +1 -0
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts +7 -0
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js +16 -0
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts +13 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.js +60 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.js.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts +7 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.js +20 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.js.map +1 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +16 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.js +65 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.js.map +1 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts +15 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.js +63 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts +19 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js +79 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +24 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +108 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +31 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +135 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.d.ts +26 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.js +110 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts +18 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js +70 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js.map +1 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts +14 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.js +39 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.js.map +1 -0
- package/dist/idl_codegen/programId.d.ts +5 -0
- package/dist/idl_codegen/programId.d.ts.map +1 -0
- package/dist/idl_codegen/programId.js +13 -0
- package/dist/idl_codegen/programId.js.map +1 -0
- package/dist/idl_codegen/types/AssetTier.d.ts.map +1 -0
- package/dist/idl_codegen/types/AssetTier.js.map +1 -0
- package/dist/idl_codegen/types/BigFractionBytes.d.ts +28 -0
- package/dist/idl_codegen/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/idl_codegen/types/BigFractionBytes.js.map +1 -0
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts +28 -0
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/idl_codegen/types/BorrowRateCurve.js.map +1 -0
- package/dist/idl_codegen/types/CurvePoint.d.ts +27 -0
- package/dist/idl_codegen/types/CurvePoint.d.ts.map +1 -0
- package/dist/idl_codegen/types/CurvePoint.js.map +1 -0
- package/dist/idl_codegen/types/ElevationGroup.d.ts +67 -0
- package/dist/idl_codegen/types/ElevationGroup.d.ts.map +1 -0
- package/dist/idl_codegen/types/ElevationGroup.js +136 -0
- package/dist/idl_codegen/types/ElevationGroup.js.map +1 -0
- package/dist/idl_codegen/types/FeeCalculation.d.ts.map +1 -0
- package/dist/idl_codegen/types/FeeCalculation.js.map +1 -0
- package/dist/idl_codegen/types/InitObligationArgs.d.ts +27 -0
- package/dist/idl_codegen/types/InitObligationArgs.d.ts.map +1 -0
- package/dist/idl_codegen/types/InitObligationArgs.js.map +1 -0
- package/dist/idl_codegen/types/LastUpdate.d.ts +48 -0
- package/dist/idl_codegen/types/LastUpdate.d.ts.map +1 -0
- package/dist/idl_codegen/types/LastUpdate.js.map +1 -0
- package/dist/idl_codegen/types/ObligationCollateral.d.ts +72 -0
- package/dist/idl_codegen/types/ObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/types/ObligationCollateral.js +118 -0
- package/dist/idl_codegen/types/ObligationCollateral.js.map +1 -0
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts +84 -0
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/types/ObligationLiquidity.js +140 -0
- package/dist/idl_codegen/types/ObligationLiquidity.js.map +1 -0
- package/dist/idl_codegen/types/ObligationOrder.d.ts +284 -0
- package/dist/idl_codegen/types/ObligationOrder.d.ts.map +1 -0
- package/dist/idl_codegen/types/ObligationOrder.js.map +1 -0
- package/dist/idl_codegen/types/PriceHeuristic.d.ts +42 -0
- package/dist/idl_codegen/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/idl_codegen/types/PriceHeuristic.js.map +1 -0
- package/dist/idl_codegen/types/PythConfiguration.d.ts +26 -0
- package/dist/idl_codegen/types/PythConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/PythConfiguration.js +74 -0
- package/dist/idl_codegen/types/PythConfiguration.js.map +1 -0
- package/dist/idl_codegen/types/ReserveCollateral.d.ts +54 -0
- package/dist/idl_codegen/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveCollateral.js +111 -0
- package/dist/idl_codegen/types/ReserveCollateral.js.map +1 -0
- package/dist/idl_codegen/types/ReserveConfig.d.ts +438 -0
- package/dist/idl_codegen/types/ReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveConfig.js.map +1 -0
- package/dist/idl_codegen/types/ReserveFarmKind.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveFarmKind.js.map +1 -0
- package/dist/idl_codegen/types/ReserveFees.d.ts +79 -0
- package/dist/idl_codegen/types/ReserveFees.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveFees.js.map +1 -0
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts +182 -0
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveLiquidity.js +224 -0
- package/dist/idl_codegen/types/ReserveLiquidity.js.map +1 -0
- package/dist/idl_codegen/types/ReserveStatus.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveStatus.js.map +1 -0
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts +42 -0
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/ScopeConfiguration.js +92 -0
- package/dist/idl_codegen/types/ScopeConfiguration.js.map +1 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts +31 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.js +80 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.js.map +1 -0
- package/dist/idl_codegen/types/TokenInfo.d.ts +118 -0
- package/dist/idl_codegen/types/TokenInfo.d.ts.map +1 -0
- package/dist/idl_codegen/types/TokenInfo.js.map +1 -0
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -0
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.js.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +198 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +354 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -0
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts +39 -0
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/idl_codegen/types/WithdrawalCaps.js.map +1 -0
- package/dist/idl_codegen/types/index.d.ts.map +1 -0
- package/dist/idl_codegen/types/index.js.map +1 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +76 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts.map +1 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.js +225 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -0
- package/dist/idl_codegen/zero_padding/index.d.ts.map +1 -0
- package/dist/idl_codegen/zero_padding/index.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts +48 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js +151 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts +3 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.js +6 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/programId.d.ts +4 -0
- package/dist/idl_codegen_jupiter_perps/programId.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/programId.js +9 -0
- package/dist/idl_codegen_jupiter_perps/programId.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts +63 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.js +134 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts +33 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.js +88 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts +33 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js +88 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts +7 -0
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/index.js +10 -0
- package/dist/idl_codegen_jupiter_perps/types/index.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +90 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +189 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +126 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +309 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts +6 -0
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/index.js +80 -0
- package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +23 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js +67 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +13 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +57 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +16 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js +25 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.d.ts +19 -0
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.js +68 -0
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +22 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.js +50 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.d.ts +8 -0
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.js +17 -0
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +7 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +16 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +20 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +72 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.d.ts +16 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.js +65 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +14 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +62 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +38 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +166 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.d.ts +23 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.js +67 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +22 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +50 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/programId.d.ts +6 -0
- package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/programId.js +15 -0
- package/dist/idl_codegen_kamino_vault/programId.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +28 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +28 -0
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +27 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +48 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +42 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +26 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +74 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +54 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +111 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +438 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +79 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +182 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +224 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +42 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +92 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +31 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +80 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +118 -0
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +72 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +143 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts +39 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -0
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts +5 -5
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_calcs.js +5 -5
- package/dist/lending_operations/repay_with_collateral_calcs.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.d.ts +12 -14
- package/dist/lending_operations/repay_with_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.js +15 -17
- package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -1
- package/dist/lending_operations/swap_collateral_operations.d.ts +8 -10
- package/dist/lending_operations/swap_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/swap_collateral_operations.js +31 -33
- package/dist/lending_operations/swap_collateral_operations.js.map +1 -1
- package/dist/leverage/calcs.d.ts +16 -16
- package/dist/leverage/calcs.d.ts.map +1 -1
- package/dist/leverage/calcs.js +7 -6
- package/dist/leverage/calcs.js.map +1 -1
- package/dist/leverage/instructions.d.ts +29 -28
- package/dist/leverage/instructions.d.ts.map +1 -1
- package/dist/leverage/instructions.js +48 -18
- package/dist/leverage/instructions.js.map +1 -1
- package/dist/leverage/operations.d.ts +7 -7
- package/dist/leverage/operations.d.ts.map +1 -1
- package/dist/leverage/operations.js +71 -104
- package/dist/leverage/operations.js.map +1 -1
- package/dist/leverage/types.d.ts +30 -31
- package/dist/leverage/types.d.ts.map +1 -1
- package/dist/leverage/utils.d.ts +8 -8
- package/dist/leverage/utils.d.ts.map +1 -1
- package/dist/leverage/utils.js +14 -14
- package/dist/leverage/utils.js.map +1 -1
- package/dist/lib.d.ts +8 -8
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +12 -11
- package/dist/lib.js.map +1 -1
- package/dist/obligation_orders/price_based.d.ts +2 -2
- package/dist/obligation_orders/price_based.d.ts.map +1 -1
- package/dist/obligation_orders/price_based.js +5 -4
- package/dist/obligation_orders/price_based.js.map +1 -1
- package/dist/pyth/accounts/PriceUpdateV2.d.ts +30 -0
- package/dist/pyth/accounts/PriceUpdateV2.d.ts.map +1 -0
- package/dist/pyth/accounts/PriceUpdateV2.js +114 -0
- package/dist/pyth/accounts/PriceUpdateV2.js.map +1 -0
- package/dist/pyth/accounts/index.d.ts +3 -0
- package/dist/pyth/accounts/index.d.ts.map +1 -0
- package/dist/pyth/accounts/index.js +6 -0
- package/dist/pyth/accounts/index.js.map +1 -0
- package/dist/pyth/types/PriceFeedMessage.d.ts +58 -0
- package/dist/pyth/types/PriceFeedMessage.d.ts.map +1 -0
- package/dist/pyth/types/PriceFeedMessage.js +128 -0
- package/dist/pyth/types/PriceFeedMessage.js.map +1 -0
- package/dist/pyth/types/VerificationLevel.d.ts +45 -0
- package/dist/pyth/types/VerificationLevel.d.ts.map +1 -0
- package/dist/pyth/types/VerificationLevel.js +115 -0
- package/dist/pyth/types/VerificationLevel.js.map +1 -0
- package/dist/pyth/types/index.d.ts +7 -0
- package/dist/pyth/types/index.d.ts.map +1 -0
- package/dist/pyth/types/index.js +41 -0
- package/dist/pyth/types/index.js.map +1 -0
- package/dist/referrals/instructions.d.ts +13 -13
- package/dist/referrals/instructions.d.ts.map +1 -1
- package/dist/referrals/instructions.js +27 -29
- package/dist/referrals/instructions.js.map +1 -1
- package/dist/referrals/operations.d.ts +49 -16
- package/dist/referrals/operations.d.ts.map +1 -1
- package/dist/referrals/operations.js +93 -45
- package/dist/referrals/operations.js.map +1 -1
- package/dist/utils/ObligationType.d.ts +22 -22
- package/dist/utils/ObligationType.d.ts.map +1 -1
- package/dist/utils/ObligationType.js +14 -34
- package/dist/utils/ObligationType.js.map +1 -1
- package/dist/utils/accountListing.d.ts +5 -5
- package/dist/utils/accountListing.d.ts.map +1 -1
- package/dist/utils/accountListing.js +27 -38
- package/dist/utils/accountListing.js.map +1 -1
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/ata.d.ts +24 -23
- package/dist/utils/ata.d.ts.map +1 -1
- package/dist/utils/ata.js +71 -70
- package/dist/utils/ata.js.map +1 -1
- package/dist/utils/constants.d.ts +5 -4
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +6 -5
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/idl.js +2 -2
- package/dist/utils/idl.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/instruction.d.ts +24 -7
- package/dist/utils/instruction.d.ts.map +1 -1
- package/dist/utils/instruction.js +191 -21
- package/dist/utils/instruction.js.map +1 -1
- package/dist/utils/kamino.d.ts +2 -2
- package/dist/utils/kamino.d.ts.map +1 -1
- package/dist/utils/kamino.js +6 -11
- package/dist/utils/kamino.js.map +1 -1
- package/dist/utils/lookupTable.d.ts +14 -15
- package/dist/utils/lookupTable.d.ts.map +1 -1
- package/dist/utils/lookupTable.js +42 -41
- package/dist/utils/lookupTable.js.map +1 -1
- package/dist/utils/managerTypes.d.ts +30 -30
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +2 -3
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/metadata.d.ts +5 -5
- package/dist/utils/metadata.d.ts.map +1 -1
- package/dist/utils/metadata.js +8 -9
- package/dist/utils/metadata.js.map +1 -1
- package/dist/utils/multisig.d.ts +3 -3
- package/dist/utils/multisig.d.ts.map +1 -1
- package/dist/utils/multisig.js +2 -2
- package/dist/utils/multisig.js.map +1 -1
- package/dist/utils/oracle.d.ts +13 -11
- package/dist/utils/oracle.d.ts.map +1 -1
- package/dist/utils/oracle.js +30 -30
- package/dist/utils/oracle.js.map +1 -1
- package/dist/utils/pubkey.d.ts +71 -6
- package/dist/utils/pubkey.d.ts.map +1 -1
- package/dist/utils/pubkey.js +230 -7
- package/dist/utils/pubkey.js.map +1 -1
- package/dist/utils/rpc.d.ts +10 -8
- package/dist/utils/rpc.d.ts.map +1 -1
- package/dist/utils/rpc.js +65 -23
- package/dist/utils/rpc.js.map +1 -1
- package/dist/utils/seeds.d.ts +23 -24
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +38 -91
- package/dist/utils/seeds.js.map +1 -1
- package/dist/utils/sendTransactionsUtils.d.ts +41 -0
- package/dist/utils/sendTransactionsUtils.d.ts.map +1 -0
- package/dist/utils/sendTransactionsUtils.js +154 -0
- package/dist/utils/sendTransactionsUtils.js.map +1 -0
- package/dist/utils/userMetadata.d.ts +9 -9
- package/dist/utils/userMetadata.d.ts.map +1 -1
- package/dist/utils/userMetadata.js +63 -67
- package/dist/utils/userMetadata.js.map +1 -1
- package/dist/utils/vault.d.ts +1 -1
- package/dist/utils/vault.d.ts.map +1 -1
- package/dist/utils/vault.js +2 -2
- package/dist/utils/vault.js.map +1 -1
- package/package.json +17 -23
- package/src/classes/action.ts +1041 -1004
- package/src/classes/curve.ts +1 -1
- package/src/classes/farm_utils.ts +75 -77
- package/src/classes/jupiterPerps.ts +3 -3
- package/src/classes/manager.ts +249 -465
- package/src/classes/market.ts +467 -416
- package/src/classes/obligation.ts +120 -120
- package/src/classes/obligationOrder.ts +3 -3
- package/src/classes/reserve.ts +137 -180
- package/src/classes/shared.ts +3 -3
- package/src/classes/utils.ts +15 -9
- package/src/classes/vault.ts +634 -668
- package/src/classes/vault_types.ts +23 -23
- package/src/client.ts +523 -0
- package/src/client_kamino_manager.ts +1895 -0
- package/src/idl_codegen/accounts/GlobalConfig.ts +125 -0
- package/src/idl_codegen/accounts/LendingMarket.ts +506 -0
- package/src/idl_codegen/accounts/Obligation.ts +433 -0
- package/src/idl_codegen/accounts/ReferrerState.ts +97 -0
- package/src/idl_codegen/accounts/ReferrerTokenState.ts +145 -0
- package/src/idl_codegen/accounts/Reserve.ts +248 -0
- package/src/idl_codegen/accounts/ShortUrl.ts +97 -0
- package/src/idl_codegen/accounts/UserMetadata.ts +142 -0
- package/src/idl_codegen/accounts/UserState.ts +301 -0
- package/src/idl_codegen/errors/index.ts +62 -0
- package/src/idl_codegen/instructions/borrowObligationLiquidity.ts +82 -0
- package/src/idl_codegen/instructions/borrowObligationLiquidityV2.ts +124 -0
- package/src/idl_codegen/instructions/deleteReferrerStateAndShortUrl.ts +30 -0
- package/src/idl_codegen/instructions/depositAndWithdraw.ts +241 -0
- package/src/idl_codegen/instructions/depositObligationCollateral.ts +62 -0
- package/src/idl_codegen/instructions/depositObligationCollateralV2.ts +106 -0
- package/src/idl_codegen/instructions/depositReserveLiquidity.ts +90 -0
- package/src/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.ts +98 -0
- package/src/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +136 -0
- package/src/idl_codegen/instructions/flashBorrowReserveLiquidity.ts +82 -0
- package/src/idl_codegen/instructions/flashRepayReserveLiquidity.ts +83 -0
- package/src/idl_codegen/instructions/idlMissingTypes.ts +64 -0
- package/src/idl_codegen/instructions/initFarmsForReserve.ts +62 -0
- package/src/idl_codegen/instructions/initGlobalConfig.ts +30 -0
- package/src/idl_codegen/instructions/initLendingMarket.ts +50 -0
- package/src/idl_codegen/instructions/initObligation.ts +52 -0
- package/src/idl_codegen/instructions/initObligationFarmsForReserve.ts +60 -0
- package/src/idl_codegen/instructions/initReferrerStateAndShortUrl.ts +50 -0
- package/src/idl_codegen/instructions/initReferrerTokenState.ts +34 -0
- package/src/idl_codegen/instructions/initReserve.ts +80 -0
- package/src/idl_codegen/instructions/initUserMetadata.ts +50 -0
- package/src/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.ts +139 -0
- package/src/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +195 -0
- package/src/idl_codegen/instructions/markObligationForDeleveraging.ts +40 -0
- package/src/idl_codegen/instructions/redeemFees.ts +50 -0
- package/src/idl_codegen/instructions/redeemReserveCollateral.ts +94 -0
- package/src/idl_codegen/instructions/refreshObligation.ts +24 -0
- package/src/idl_codegen/instructions/refreshObligationFarmsForReserve.ts +80 -0
- package/src/idl_codegen/instructions/refreshReserve.ts +40 -0
- package/src/idl_codegen/instructions/refreshReservesBatch.ts +29 -0
- package/src/idl_codegen/instructions/repayAndWithdrawAndRedeem.ts +207 -0
- package/src/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.ts +239 -0
- package/src/idl_codegen/instructions/repayObligationLiquidity.ts +64 -0
- package/src/idl_codegen/instructions/repayObligationLiquidityV2.ts +108 -0
- package/src/idl_codegen/instructions/requestElevationGroup.ts +40 -0
- package/src/idl_codegen/instructions/setObligationOrder.ts +45 -0
- package/src/idl_codegen/instructions/socializeLoss.ts +48 -0
- package/src/idl_codegen/instructions/socializeLossV2.ts +88 -0
- package/src/idl_codegen/instructions/updateEntireReserveConfig.ts +45 -0
- package/src/idl_codegen/instructions/updateGlobalConfig.ts +47 -0
- package/src/idl_codegen/instructions/updateGlobalConfigAdmin.ts +24 -0
- package/src/idl_codegen/instructions/updateLendingMarket.ts +43 -0
- package/src/idl_codegen/instructions/updateLendingMarketOwner.ts +28 -0
- package/src/idl_codegen/instructions/updateReserveConfig.ts +54 -0
- package/src/idl_codegen/instructions/updateSingleReserveConfig.ts +48 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateral.ts +68 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +102 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +136 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateralV2.ts +106 -0
- package/src/idl_codegen/instructions/withdrawProtocolFee.ts +58 -0
- package/src/idl_codegen/instructions/withdrawReferrerFees.ts +54 -0
- package/src/idl_codegen/programId.ts +13 -0
- package/src/idl_codegen/types/AssetTier.ts +118 -0
- package/src/idl_codegen/types/BigFractionBytes.ts +67 -0
- package/src/idl_codegen/types/BorrowRateCurve.ts +60 -0
- package/src/idl_codegen/types/CurvePoint.ts +64 -0
- package/src/idl_codegen/types/ElevationGroup.ts +133 -0
- package/src/idl_codegen/types/FeeCalculation.ts +90 -0
- package/src/idl_codegen/types/InitObligationArgs.ts +61 -0
- package/src/idl_codegen/types/LastUpdate.ts +95 -0
- package/src/idl_codegen/types/ObligationCollateral.ts +128 -0
- package/src/idl_codegen/types/ObligationLiquidity.ts +159 -0
- package/src/idl_codegen/types/ObligationOrder.ts +347 -0
- package/src/idl_codegen/types/PriceHeuristic.ts +81 -0
- package/src/idl_codegen/types/PythConfiguration.ts +56 -0
- package/src/idl_codegen/types/ReserveCollateral.ts +104 -0
- package/src/idl_codegen/types/ReserveConfig.ts +556 -0
- package/src/idl_codegen/types/ReserveFarmKind.ts +90 -0
- package/src/idl_codegen/types/ReserveFees.ts +122 -0
- package/src/idl_codegen/types/ReserveLiquidity.ts +287 -0
- package/src/idl_codegen/types/ReserveStatus.ts +120 -0
- package/src/idl_codegen/types/ScopeConfiguration.ts +85 -0
- package/src/idl_codegen/types/SwitchboardConfiguration.ts +67 -0
- package/src/idl_codegen/types/TokenInfo.ts +190 -0
- package/src/idl_codegen/types/UpdateConfigMode.ts +1530 -0
- package/src/idl_codegen/types/UpdateGlobalConfigMode.ts +90 -0
- package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +419 -0
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +780 -0
- package/src/idl_codegen/types/WithdrawalCaps.ts +86 -0
- package/src/idl_codegen/zero_padding/ObligationZP.ts +229 -0
- package/src/idl_codegen_jupiter_perps/accounts/Pool.ts +155 -0
- package/src/idl_codegen_jupiter_perps/accounts/index.ts +2 -0
- package/src/idl_codegen_jupiter_perps/programId.ts +7 -0
- package/src/idl_codegen_jupiter_perps/types/Fees.ts +130 -0
- package/src/idl_codegen_jupiter_perps/types/Limit.ts +72 -0
- package/src/idl_codegen_jupiter_perps/types/PoolApr.ts +69 -0
- package/src/idl_codegen_jupiter_perps/types/index.ts +6 -0
- package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +248 -0
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +379 -0
- package/src/idl_codegen_kamino_vault/errors/index.ts +62 -0
- package/src/idl_codegen_kamino_vault/instructions/deposit.ts +60 -0
- package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +40 -0
- package/src/idl_codegen_kamino_vault/instructions/initVault.ts +42 -0
- package/src/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.ts +58 -0
- package/src/idl_codegen_kamino_vault/instructions/invest.ts +73 -0
- package/src/idl_codegen_kamino_vault/instructions/removeAllocation.ts +26 -0
- package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +24 -0
- package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +62 -0
- package/src/idl_codegen_kamino_vault/instructions/updateSharesMetadata.ts +52 -0
- package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +49 -0
- package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +175 -0
- package/src/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.ts +60 -0
- package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +73 -0
- package/src/idl_codegen_kamino_vault/programId.ts +14 -0
- package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +67 -0
- package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +60 -0
- package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +64 -0
- package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +95 -0
- package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +81 -0
- package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +56 -0
- package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +104 -0
- package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +556 -0
- package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +122 -0
- package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +287 -0
- package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +85 -0
- package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +67 -0
- package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +190 -0
- package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +142 -0
- package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +390 -0
- package/src/idl_codegen_kamino_vault/types/WithdrawalCaps.ts +86 -0
- package/src/lending_operations/repay_with_collateral_calcs.ts +11 -11
- package/src/lending_operations/repay_with_collateral_operations.ts +23 -31
- package/src/lending_operations/swap_collateral_operations.ts +62 -66
- package/src/leverage/calcs.ts +25 -25
- package/src/leverage/instructions.ts +36 -37
- package/src/leverage/operations.ts +156 -173
- package/src/leverage/types.ts +30 -31
- package/src/leverage/utils.ts +38 -45
- package/src/lib.ts +9 -9
- package/src/obligation_orders/price_based.ts +8 -7
- package/src/pyth/accounts/PriceUpdateV2.ts +110 -0
- package/src/pyth/accounts/index.ts +2 -0
- package/src/pyth/types/PriceFeedMessage.ts +120 -0
- package/src/pyth/types/VerificationLevel.ts +98 -0
- package/src/pyth/types/index.ts +9 -0
- package/src/referrals/instructions.ts +41 -44
- package/src/referrals/operations.ts +165 -83
- package/src/utils/ObligationType.ts +38 -59
- package/src/utils/accountListing.ts +55 -69
- package/src/utils/api.ts +2 -2
- package/src/utils/ata.ts +122 -146
- package/src/utils/constants.ts +7 -5
- package/src/utils/idl.ts +1 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/instruction.ts +283 -33
- package/src/utils/kamino.ts +9 -12
- package/src/utils/lookupTable.ts +57 -62
- package/src/utils/managerTypes.ts +31 -32
- package/src/utils/metadata.ts +20 -20
- package/src/utils/multisig.ts +5 -5
- package/src/utils/oracle.ts +50 -49
- package/src/utils/pubkey.ts +272 -7
- package/src/utils/rpc.ts +93 -46
- package/src/utils/seeds.ts +73 -121
- package/src/utils/sendTransactionsUtils.ts +207 -0
- package/src/utils/userMetadata.ts +126 -129
- package/src/utils/vault.ts +2 -2
- package/dist/@codegen/jupiter_perps/accounts/Custody.d.ts +0 -57
- package/dist/@codegen/jupiter_perps/accounts/Custody.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Custody.js +0 -176
- package/dist/@codegen/jupiter_perps/accounts/Custody.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.d.ts +0 -36
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.js +0 -132
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Pool.d.ts +0 -48
- package/dist/@codegen/jupiter_perps/accounts/Pool.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Pool.js +0 -156
- package/dist/@codegen/jupiter_perps/accounts/Pool.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Position.d.ts +0 -60
- package/dist/@codegen/jupiter_perps/accounts/Position.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/Position.js +0 -180
- package/dist/@codegen/jupiter_perps/accounts/Position.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.d.ts +0 -84
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.js +0 -228
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.d.ts +0 -29
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.js +0 -118
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.js.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/index.d.ts +0 -13
- package/dist/@codegen/jupiter_perps/accounts/index.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/accounts/index.js +0 -16
- package/dist/@codegen/jupiter_perps/accounts/index.js.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/anchor.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/anchor.js.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/custom.d.ts +0 -339
- package/dist/@codegen/jupiter_perps/errors/custom.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/custom.js +0 -598
- package/dist/@codegen/jupiter_perps/errors/custom.js.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/index.d.ts +0 -6
- package/dist/@codegen/jupiter_perps/errors/index.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/errors/index.js +0 -86
- package/dist/@codegen/jupiter_perps/errors/index.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts +0 -20
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addCustody.js +0 -64
- package/dist/@codegen/jupiter_perps/instructions/addCustody.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.js +0 -67
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts +0 -18
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/addPool.js +0 -62
- package/dist/@codegen/jupiter_perps/instructions/addPool.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts +0 -20
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.js +0 -76
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts +0 -27
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.js +0 -77
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts +0 -27
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.js +0 -77
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.js +0 -78
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.js +0 -61
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.js +0 -61
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts +0 -17
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.js +0 -63
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.js +0 -62
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts +0 -17
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.js +0 -67
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.js +0 -62
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts +0 -9
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.js +0 -17
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getPnl.js +0 -60
- package/dist/@codegen/jupiter_perps/instructions/getPnl.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.js +0 -61
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.js +0 -62
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts +0 -24
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.js +0 -70
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts +0 -21
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.js +0 -67
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/index.d.ts +0 -71
- package/dist/@codegen/jupiter_perps/instructions/index.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/index.js +0 -74
- package/dist/@codegen/jupiter_perps/instructions/index.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts +0 -18
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/init.js +0 -66
- package/dist/@codegen/jupiter_perps/instructions/init.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts +0 -25
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.js +0 -71
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.js +0 -69
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts +0 -13
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.js +0 -59
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts +0 -12
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.js +0 -58
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts +0 -12
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.js +0 -58
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts +0 -13
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.js +0 -57
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.js +0 -62
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts +0 -12
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.js +0 -56
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts +0 -25
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/swap.js +0 -69
- package/dist/@codegen/jupiter_perps/instructions/swap.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts +0 -25
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.js +0 -69
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts +0 -16
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/testInit.js +0 -64
- package/dist/@codegen/jupiter_perps/instructions/testInit.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts +0 -13
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.js +0 -57
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts +0 -17
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.js +0 -63
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts +0 -17
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.js +0 -63
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.js.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts +0 -19
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.js +0 -63
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.js.map +0 -1
- package/dist/@codegen/jupiter_perps/programId.d.ts +0 -4
- package/dist/@codegen/jupiter_perps/programId.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/programId.js +0 -9
- package/dist/@codegen/jupiter_perps/programId.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.d.ts +0 -101
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.js +0 -114
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.d.ts +0 -33
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.js +0 -92
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.d.ts +0 -66
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.js +0 -100
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.d.ts +0 -33
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.js +0 -88
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Assets.d.ts +0 -48
- package/dist/@codegen/jupiter_perps/types/Assets.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Assets.js +0 -113
- package/dist/@codegen/jupiter_perps/types/Assets.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.d.ts +0 -71
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.js +0 -135
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.d.ts +0 -83
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.js +0 -135
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.d.ts +0 -58
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.js +0 -127
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Fees.d.ts +0 -63
- package/dist/@codegen/jupiter_perps/types/Fees.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Fees.js +0 -134
- package/dist/@codegen/jupiter_perps/types/Fees.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/FundingRateState.d.ts +0 -33
- package/dist/@codegen/jupiter_perps/types/FundingRateState.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/FundingRateState.js +0 -92
- package/dist/@codegen/jupiter_perps/types/FundingRateState.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.js +0 -76
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.js +0 -76
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.d.ts +0 -45
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.js +0 -93
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.js +0 -76
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.js +0 -76
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.d.ts +0 -38
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.js +0 -99
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/InitParams.d.ts +0 -52
- package/dist/@codegen/jupiter_perps/types/InitParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/InitParams.js +0 -116
- package/dist/@codegen/jupiter_perps/types/InitParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Limit.d.ts +0 -33
- package/dist/@codegen/jupiter_perps/types/Limit.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Limit.js +0 -92
- package/dist/@codegen/jupiter_perps/types/Limit.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OracleParams.d.ts +0 -51
- package/dist/@codegen/jupiter_perps/types/OracleParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OracleParams.js +0 -102
- package/dist/@codegen/jupiter_perps/types/OracleParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OraclePrice.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/OraclePrice.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OraclePrice.js +0 -82
- package/dist/@codegen/jupiter_perps/types/OraclePrice.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.d.ts +0 -48
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.js +0 -113
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OracleType.d.ts +0 -45
- package/dist/@codegen/jupiter_perps/types/OracleType.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/OracleType.js +0 -132
- package/dist/@codegen/jupiter_perps/types/OracleType.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Permissions.d.ts +0 -52
- package/dist/@codegen/jupiter_perps/types/Permissions.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Permissions.js +0 -116
- package/dist/@codegen/jupiter_perps/types/Permissions.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.d.ts +0 -48
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.js +0 -113
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PoolApr.d.ts +0 -33
- package/dist/@codegen/jupiter_perps/types/PoolApr.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PoolApr.js +0 -92
- package/dist/@codegen/jupiter_perps/types/PoolApr.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.d.ts +0 -45
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.js +0 -132
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PricingParams.d.ts +0 -48
- package/dist/@codegen/jupiter_perps/types/PricingParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/PricingParams.js +0 -113
- package/dist/@codegen/jupiter_perps/types/PricingParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RequestChange.d.ts +0 -45
- package/dist/@codegen/jupiter_perps/types/RequestChange.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RequestChange.js +0 -132
- package/dist/@codegen/jupiter_perps/types/RequestChange.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RequestType.d.ts +0 -32
- package/dist/@codegen/jupiter_perps/types/RequestType.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/RequestType.js +0 -108
- package/dist/@codegen/jupiter_perps/types/RequestType.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.d.ts +0 -96
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.js +0 -107
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.d.ts +0 -38
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.js +0 -73
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.d.ts +0 -61
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.js +0 -93
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.d.ts +0 -38
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.js +0 -99
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.d.ts +0 -23
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.js +0 -76
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Side.d.ts +0 -45
- package/dist/@codegen/jupiter_perps/types/Side.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/Side.js +0 -132
- package/dist/@codegen/jupiter_perps/types/Side.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.d.ts +0 -38
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.js +0 -99
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/SwapParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/SwapParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/SwapParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/TestInitParams.d.ts +0 -52
- package/dist/@codegen/jupiter_perps/types/TestInitParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/TestInitParams.js +0 -116
- package/dist/@codegen/jupiter_perps/types/TestInitParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.d.ts +0 -28
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.js +0 -82
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.d.ts +0 -15
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.js +0 -61
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.js.map +0 -1
- package/dist/@codegen/jupiter_perps/types/index.d.ts +0 -119
- package/dist/@codegen/jupiter_perps/types/index.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/types/index.js +0 -146
- package/dist/@codegen/jupiter_perps/types/index.js.map +0 -1
- package/dist/@codegen/jupiter_perps/utils/borshAddress.d.ts +0 -4
- package/dist/@codegen/jupiter_perps/utils/borshAddress.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/utils/borshAddress.js +0 -30
- package/dist/@codegen/jupiter_perps/utils/borshAddress.js.map +0 -1
- package/dist/@codegen/jupiter_perps/utils/index.d.ts +0 -2
- package/dist/@codegen/jupiter_perps/utils/index.d.ts.map +0 -1
- package/dist/@codegen/jupiter_perps/utils/index.js +0 -18
- package/dist/@codegen/jupiter_perps/utils/index.js.map +0 -1
- package/dist/@codegen/klend/accounts/GlobalConfig.d.ts +0 -40
- package/dist/@codegen/klend/accounts/GlobalConfig.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/GlobalConfig.js +0 -118
- package/dist/@codegen/klend/accounts/GlobalConfig.js.map +0 -1
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts +0 -252
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/LendingMarket.js +0 -336
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +0 -1
- package/dist/@codegen/klend/accounts/Obligation.d.ts +0 -199
- package/dist/@codegen/klend/accounts/Obligation.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/Obligation.js +0 -295
- package/dist/@codegen/klend/accounts/Obligation.js.map +0 -1
- package/dist/@codegen/klend/accounts/ReferrerState.d.ts +0 -22
- package/dist/@codegen/klend/accounts/ReferrerState.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/ReferrerState.js +0 -102
- package/dist/@codegen/klend/accounts/ReferrerState.js.map +0 -1
- package/dist/@codegen/klend/accounts/ReferrerTokenState.d.ts +0 -51
- package/dist/@codegen/klend/accounts/ReferrerTokenState.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/ReferrerTokenState.js +0 -137
- package/dist/@codegen/klend/accounts/ReferrerTokenState.js.map +0 -1
- package/dist/@codegen/klend/accounts/Reserve.d.ts +0 -90
- package/dist/@codegen/klend/accounts/Reserve.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/Reserve.js +0 -192
- package/dist/@codegen/klend/accounts/Reserve.js.map +0 -1
- package/dist/@codegen/klend/accounts/ShortUrl.d.ts +0 -22
- package/dist/@codegen/klend/accounts/ShortUrl.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/ShortUrl.js +0 -102
- package/dist/@codegen/klend/accounts/ShortUrl.js.map +0 -1
- package/dist/@codegen/klend/accounts/UserMetadata.d.ts +0 -48
- package/dist/@codegen/klend/accounts/UserMetadata.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/UserMetadata.js +0 -136
- package/dist/@codegen/klend/accounts/UserMetadata.js.map +0 -1
- package/dist/@codegen/klend/accounts/UserState.d.ts +0 -143
- package/dist/@codegen/klend/accounts/UserState.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/UserState.js +0 -222
- package/dist/@codegen/klend/accounts/UserState.js.map +0 -1
- package/dist/@codegen/klend/accounts/index.d.ts.map +0 -1
- package/dist/@codegen/klend/accounts/index.js.map +0 -1
- package/dist/@codegen/klend/errors/anchor.d.ts.map +0 -1
- package/dist/@codegen/klend/errors/anchor.js.map +0 -1
- package/dist/@codegen/klend/errors/custom.d.ts.map +0 -1
- package/dist/@codegen/klend/errors/custom.js.map +0 -1
- package/dist/@codegen/klend/errors/index.d.ts +0 -6
- package/dist/@codegen/klend/errors/index.d.ts.map +0 -1
- package/dist/@codegen/klend/errors/index.js +0 -86
- package/dist/@codegen/klend/errors/index.js.map +0 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts +0 -22
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.js +0 -69
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.js.map +0 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts +0 -29
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.js +0 -86
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts +0 -10
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.js +0 -18
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts +0 -52
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositAndWithdraw.js +0 -134
- package/dist/@codegen/klend/instructions/depositAndWithdraw.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts +0 -18
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateral.js +0 -61
- package/dist/@codegen/klend/instructions/depositObligationCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts +0 -26
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.js +0 -78
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts +0 -22
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.js +0 -65
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +0 -24
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.js +0 -74
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +0 -31
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.js +0 -91
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts +0 -22
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.js +0 -75
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.js.map +0 -1
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts +0 -23
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.js +0 -79
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.js.map +0 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts +0 -20
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.js +0 -72
- package/dist/@codegen/klend/instructions/idlMissingTypes.js.map +0 -1
- package/dist/@codegen/klend/instructions/index.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/index.js.map +0 -1
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts +0 -19
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initFarmsForReserve.js +0 -67
- package/dist/@codegen/klend/instructions/initFarmsForReserve.js.map +0 -1
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts +0 -10
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initGlobalConfig.js +0 -18
- package/dist/@codegen/klend/instructions/initGlobalConfig.js.map +0 -1
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts +0 -14
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initLendingMarket.js +0 -64
- package/dist/@codegen/klend/instructions/initLendingMarket.js.map +0 -1
- package/dist/@codegen/klend/instructions/initObligation.d.ts +0 -19
- package/dist/@codegen/klend/instructions/initObligation.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initObligation.js +0 -67
- package/dist/@codegen/klend/instructions/initObligation.js.map +0 -1
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts +0 -20
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.js +0 -64
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.js.map +0 -1
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts +0 -15
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.js +0 -59
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.js.map +0 -1
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts +0 -12
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initReferrerTokenState.js +0 -20
- package/dist/@codegen/klend/instructions/initReferrerTokenState.js.map +0 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts +0 -19
- package/dist/@codegen/klend/instructions/initReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initReserve.js +0 -31
- package/dist/@codegen/klend/instructions/initReserve.js.map +0 -1
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts +0 -15
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/initUserMetadata.js +0 -64
- package/dist/@codegen/klend/instructions/initUserMetadata.js.map +0 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +0 -32
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.js +0 -83
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +0 -43
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +0 -137
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts +0 -12
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.js +0 -60
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.js.map +0 -1
- package/dist/@codegen/klend/instructions/redeemFees.d.ts +0 -12
- package/dist/@codegen/klend/instructions/redeemFees.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/redeemFees.js +0 -20
- package/dist/@codegen/klend/instructions/redeemFees.js.map +0 -1
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts +0 -22
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.js +0 -65
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts +0 -7
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/refreshObligation.js +0 -15
- package/dist/@codegen/klend/instructions/refreshObligation.js.map +0 -1
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts +0 -21
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.js +0 -63
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.js.map +0 -1
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts +0 -11
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/refreshReserve.js +0 -29
- package/dist/@codegen/klend/instructions/refreshReserve.js.map +0 -1
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts +0 -7
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/refreshReservesBatch.js +0 -52
- package/dist/@codegen/klend/instructions/refreshReservesBatch.js.map +0 -1
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts +0 -47
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.js +0 -118
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.js.map +0 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts +0 -19
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.js +0 -62
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.js.map +0 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts +0 -27
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.js +0 -79
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts +0 -12
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/requestElevationGroup.js +0 -56
- package/dist/@codegen/klend/instructions/requestElevationGroup.js.map +0 -1
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts +0 -14
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/setObligationOrder.js +0 -61
- package/dist/@codegen/klend/instructions/setObligationOrder.js.map +0 -1
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts +0 -15
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/socializeLoss.js +0 -62
- package/dist/@codegen/klend/instructions/socializeLoss.js.map +0 -1
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts +0 -23
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/socializeLossV2.js +0 -78
- package/dist/@codegen/klend/instructions/socializeLossV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts +0 -13
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js +0 -64
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js.map +0 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts +0 -7
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.js +0 -19
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.js.map +0 -1
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts +0 -13
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/updateLendingMarket.js +0 -63
- package/dist/@codegen/klend/instructions/updateLendingMarket.js.map +0 -1
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts +0 -7
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.js +0 -19
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.js.map +0 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts +0 -16
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.js +0 -64
- package/dist/@codegen/klend/instructions/updateReserveConfig.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts +0 -19
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js +0 -62
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +0 -24
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +0 -74
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +0 -31
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +0 -89
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts +0 -26
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js +0 -78
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts +0 -18
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.js +0 -61
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.js.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts +0 -14
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts.map +0 -1
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.js +0 -22
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.js.map +0 -1
- package/dist/@codegen/klend/programId.d.ts +0 -4
- package/dist/@codegen/klend/programId.d.ts.map +0 -1
- package/dist/@codegen/klend/programId.js +0 -9
- package/dist/@codegen/klend/programId.js.map +0 -1
- package/dist/@codegen/klend/types/AssetTier.d.ts.map +0 -1
- package/dist/@codegen/klend/types/AssetTier.js.map +0 -1
- package/dist/@codegen/klend/types/BigFractionBytes.d.ts +0 -28
- package/dist/@codegen/klend/types/BigFractionBytes.d.ts.map +0 -1
- package/dist/@codegen/klend/types/BigFractionBytes.js.map +0 -1
- package/dist/@codegen/klend/types/BorrowRateCurve.d.ts +0 -28
- package/dist/@codegen/klend/types/BorrowRateCurve.d.ts.map +0 -1
- package/dist/@codegen/klend/types/BorrowRateCurve.js.map +0 -1
- package/dist/@codegen/klend/types/CurvePoint.d.ts +0 -27
- package/dist/@codegen/klend/types/CurvePoint.d.ts.map +0 -1
- package/dist/@codegen/klend/types/CurvePoint.js.map +0 -1
- package/dist/@codegen/klend/types/ElevationGroup.d.ts +0 -67
- package/dist/@codegen/klend/types/ElevationGroup.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ElevationGroup.js +0 -137
- package/dist/@codegen/klend/types/ElevationGroup.js.map +0 -1
- package/dist/@codegen/klend/types/FeeCalculation.d.ts.map +0 -1
- package/dist/@codegen/klend/types/FeeCalculation.js.map +0 -1
- package/dist/@codegen/klend/types/InitObligationArgs.d.ts +0 -27
- package/dist/@codegen/klend/types/InitObligationArgs.d.ts.map +0 -1
- package/dist/@codegen/klend/types/InitObligationArgs.js.map +0 -1
- package/dist/@codegen/klend/types/LastUpdate.d.ts +0 -48
- package/dist/@codegen/klend/types/LastUpdate.d.ts.map +0 -1
- package/dist/@codegen/klend/types/LastUpdate.js.map +0 -1
- package/dist/@codegen/klend/types/ObligationCollateral.d.ts +0 -72
- package/dist/@codegen/klend/types/ObligationCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ObligationCollateral.js +0 -119
- package/dist/@codegen/klend/types/ObligationCollateral.js.map +0 -1
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts +0 -84
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ObligationLiquidity.js +0 -141
- package/dist/@codegen/klend/types/ObligationLiquidity.js.map +0 -1
- package/dist/@codegen/klend/types/ObligationOrder.d.ts +0 -284
- package/dist/@codegen/klend/types/ObligationOrder.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ObligationOrder.js.map +0 -1
- package/dist/@codegen/klend/types/PriceHeuristic.d.ts +0 -42
- package/dist/@codegen/klend/types/PriceHeuristic.d.ts.map +0 -1
- package/dist/@codegen/klend/types/PriceHeuristic.js.map +0 -1
- package/dist/@codegen/klend/types/PythConfiguration.d.ts +0 -26
- package/dist/@codegen/klend/types/PythConfiguration.d.ts.map +0 -1
- package/dist/@codegen/klend/types/PythConfiguration.js +0 -75
- package/dist/@codegen/klend/types/PythConfiguration.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveCollateral.d.ts +0 -54
- package/dist/@codegen/klend/types/ReserveCollateral.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveCollateral.js +0 -112
- package/dist/@codegen/klend/types/ReserveCollateral.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveConfig.d.ts +0 -438
- package/dist/@codegen/klend/types/ReserveConfig.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveConfig.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveFarmKind.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveFarmKind.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveFees.d.ts +0 -79
- package/dist/@codegen/klend/types/ReserveFees.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveFees.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts +0 -182
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveLiquidity.js +0 -225
- package/dist/@codegen/klend/types/ReserveLiquidity.js.map +0 -1
- package/dist/@codegen/klend/types/ReserveStatus.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ReserveStatus.js.map +0 -1
- package/dist/@codegen/klend/types/ScopeConfiguration.d.ts +0 -42
- package/dist/@codegen/klend/types/ScopeConfiguration.d.ts.map +0 -1
- package/dist/@codegen/klend/types/ScopeConfiguration.js +0 -93
- package/dist/@codegen/klend/types/ScopeConfiguration.js.map +0 -1
- package/dist/@codegen/klend/types/SwitchboardConfiguration.d.ts +0 -31
- package/dist/@codegen/klend/types/SwitchboardConfiguration.d.ts.map +0 -1
- package/dist/@codegen/klend/types/SwitchboardConfiguration.js +0 -81
- package/dist/@codegen/klend/types/SwitchboardConfiguration.js.map +0 -1
- package/dist/@codegen/klend/types/TokenInfo.d.ts +0 -118
- package/dist/@codegen/klend/types/TokenInfo.d.ts.map +0 -1
- package/dist/@codegen/klend/types/TokenInfo.js.map +0 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts.map +0 -1
- package/dist/@codegen/klend/types/UpdateConfigMode.js.map +0 -1
- package/dist/@codegen/klend/types/UpdateGlobalConfigMode.d.ts.map +0 -1
- package/dist/@codegen/klend/types/UpdateGlobalConfigMode.js.map +0 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.d.ts +0 -198
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.d.ts.map +0 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.js +0 -355
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.js.map +0 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +0 -1
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js.map +0 -1
- package/dist/@codegen/klend/types/WithdrawalCaps.d.ts +0 -39
- package/dist/@codegen/klend/types/WithdrawalCaps.d.ts.map +0 -1
- package/dist/@codegen/klend/types/WithdrawalCaps.js.map +0 -1
- package/dist/@codegen/klend/types/index.d.ts.map +0 -1
- package/dist/@codegen/klend/types/index.js.map +0 -1
- package/dist/@codegen/klend/utils/borshAddress.d.ts +0 -4
- package/dist/@codegen/klend/utils/borshAddress.d.ts.map +0 -1
- package/dist/@codegen/klend/utils/borshAddress.js +0 -30
- package/dist/@codegen/klend/utils/borshAddress.js.map +0 -1
- package/dist/@codegen/klend/utils/index.d.ts +0 -2
- package/dist/@codegen/klend/utils/index.d.ts.map +0 -1
- package/dist/@codegen/klend/utils/index.js +0 -18
- package/dist/@codegen/klend/utils/index.js.map +0 -1
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts +0 -73
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts.map +0 -1
- package/dist/@codegen/klend/zero_padding/ObligationZP.js +0 -225
- package/dist/@codegen/klend/zero_padding/ObligationZP.js.map +0 -1
- package/dist/@codegen/klend/zero_padding/index.d.ts.map +0 -1
- package/dist/@codegen/klend/zero_padding/index.js.map +0 -1
- package/dist/@codegen/kvault/accounts/Reserve.d.ts +0 -90
- package/dist/@codegen/kvault/accounts/Reserve.d.ts.map +0 -1
- package/dist/@codegen/kvault/accounts/Reserve.js +0 -192
- package/dist/@codegen/kvault/accounts/Reserve.js.map +0 -1
- package/dist/@codegen/kvault/accounts/VaultState.d.ts +0 -126
- package/dist/@codegen/kvault/accounts/VaultState.d.ts.map +0 -1
- package/dist/@codegen/kvault/accounts/VaultState.js +0 -312
- package/dist/@codegen/kvault/accounts/VaultState.js.map +0 -1
- package/dist/@codegen/kvault/accounts/index.d.ts.map +0 -1
- package/dist/@codegen/kvault/accounts/index.js.map +0 -1
- package/dist/@codegen/kvault/errors/anchor.d.ts +0 -435
- package/dist/@codegen/kvault/errors/anchor.d.ts.map +0 -1
- package/dist/@codegen/kvault/errors/anchor.js +0 -767
- package/dist/@codegen/kvault/errors/anchor.js.map +0 -1
- package/dist/@codegen/kvault/errors/custom.d.ts.map +0 -1
- package/dist/@codegen/kvault/errors/custom.js.map +0 -1
- package/dist/@codegen/kvault/errors/index.d.ts +0 -6
- package/dist/@codegen/kvault/errors/index.d.ts.map +0 -1
- package/dist/@codegen/kvault/errors/index.js +0 -86
- package/dist/@codegen/kvault/errors/index.js.map +0 -1
- package/dist/@codegen/kvault/instructions/deposit.d.ts +0 -23
- package/dist/@codegen/kvault/instructions/deposit.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/deposit.js +0 -66
- package/dist/@codegen/kvault/instructions/deposit.js.map +0 -1
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts +0 -13
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.js +0 -60
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.js.map +0 -1
- package/dist/@codegen/kvault/instructions/index.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/index.js.map +0 -1
- package/dist/@codegen/kvault/instructions/initVault.d.ts +0 -16
- package/dist/@codegen/kvault/instructions/initVault.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/initVault.js +0 -28
- package/dist/@codegen/kvault/instructions/initVault.js.map +0 -1
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts +0 -19
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.js +0 -71
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.js.map +0 -1
- package/dist/@codegen/kvault/instructions/invest.d.ts +0 -22
- package/dist/@codegen/kvault/instructions/invest.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/invest.js +0 -29
- package/dist/@codegen/kvault/instructions/invest.js.map +0 -1
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts +0 -8
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/removeAllocation.js +0 -20
- package/dist/@codegen/kvault/instructions/removeAllocation.js.map +0 -1
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts +0 -7
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/updateAdmin.js +0 -19
- package/dist/@codegen/kvault/instructions/updateAdmin.js.map +0 -1
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts +0 -20
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.js +0 -63
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.js.map +0 -1
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts +0 -16
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.js +0 -68
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.js.map +0 -1
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts +0 -14
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/updateVaultConfig.js +0 -65
- package/dist/@codegen/kvault/instructions/updateVaultConfig.js.map +0 -1
- package/dist/@codegen/kvault/instructions/withdraw.d.ts +0 -38
- package/dist/@codegen/kvault/instructions/withdraw.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/withdraw.js +0 -96
- package/dist/@codegen/kvault/instructions/withdraw.js.map +0 -1
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts +0 -23
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.js +0 -66
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.js.map +0 -1
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts +0 -22
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts.map +0 -1
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.js +0 -33
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.js.map +0 -1
- package/dist/@codegen/kvault/programId.d.ts +0 -4
- package/dist/@codegen/kvault/programId.d.ts.map +0 -1
- package/dist/@codegen/kvault/programId.js +0 -9
- package/dist/@codegen/kvault/programId.js.map +0 -1
- package/dist/@codegen/kvault/types/BigFractionBytes.d.ts +0 -28
- package/dist/@codegen/kvault/types/BigFractionBytes.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/BigFractionBytes.js.map +0 -1
- package/dist/@codegen/kvault/types/BorrowRateCurve.d.ts +0 -28
- package/dist/@codegen/kvault/types/BorrowRateCurve.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/BorrowRateCurve.js.map +0 -1
- package/dist/@codegen/kvault/types/CurvePoint.d.ts +0 -27
- package/dist/@codegen/kvault/types/CurvePoint.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/CurvePoint.js.map +0 -1
- package/dist/@codegen/kvault/types/LastUpdate.d.ts +0 -48
- package/dist/@codegen/kvault/types/LastUpdate.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/LastUpdate.js.map +0 -1
- package/dist/@codegen/kvault/types/PriceHeuristic.d.ts +0 -42
- package/dist/@codegen/kvault/types/PriceHeuristic.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/PriceHeuristic.js.map +0 -1
- package/dist/@codegen/kvault/types/PythConfiguration.d.ts +0 -26
- package/dist/@codegen/kvault/types/PythConfiguration.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/PythConfiguration.js +0 -75
- package/dist/@codegen/kvault/types/PythConfiguration.js.map +0 -1
- package/dist/@codegen/kvault/types/ReserveCollateral.d.ts +0 -54
- package/dist/@codegen/kvault/types/ReserveCollateral.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/ReserveCollateral.js +0 -112
- package/dist/@codegen/kvault/types/ReserveCollateral.js.map +0 -1
- package/dist/@codegen/kvault/types/ReserveConfig.d.ts +0 -438
- package/dist/@codegen/kvault/types/ReserveConfig.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/ReserveConfig.js.map +0 -1
- package/dist/@codegen/kvault/types/ReserveFees.d.ts +0 -79
- package/dist/@codegen/kvault/types/ReserveFees.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/ReserveFees.js.map +0 -1
- package/dist/@codegen/kvault/types/ReserveLiquidity.d.ts +0 -182
- package/dist/@codegen/kvault/types/ReserveLiquidity.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/ReserveLiquidity.js +0 -225
- package/dist/@codegen/kvault/types/ReserveLiquidity.js.map +0 -1
- package/dist/@codegen/kvault/types/ScopeConfiguration.d.ts +0 -42
- package/dist/@codegen/kvault/types/ScopeConfiguration.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/ScopeConfiguration.js +0 -93
- package/dist/@codegen/kvault/types/ScopeConfiguration.js.map +0 -1
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.d.ts +0 -31
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.js +0 -81
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.js.map +0 -1
- package/dist/@codegen/kvault/types/TokenInfo.d.ts +0 -118
- package/dist/@codegen/kvault/types/TokenInfo.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/TokenInfo.js.map +0 -1
- package/dist/@codegen/kvault/types/VaultAllocation.d.ts +0 -72
- package/dist/@codegen/kvault/types/VaultAllocation.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/VaultAllocation.js +0 -144
- package/dist/@codegen/kvault/types/VaultAllocation.js.map +0 -1
- package/dist/@codegen/kvault/types/VaultConfigField.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/VaultConfigField.js.map +0 -1
- package/dist/@codegen/kvault/types/WithdrawalCaps.d.ts +0 -39
- package/dist/@codegen/kvault/types/WithdrawalCaps.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/WithdrawalCaps.js.map +0 -1
- package/dist/@codegen/kvault/types/index.d.ts.map +0 -1
- package/dist/@codegen/kvault/types/index.js.map +0 -1
- package/dist/@codegen/kvault/utils/borshAddress.d.ts +0 -4
- package/dist/@codegen/kvault/utils/borshAddress.d.ts.map +0 -1
- package/dist/@codegen/kvault/utils/borshAddress.js +0 -30
- package/dist/@codegen/kvault/utils/borshAddress.js.map +0 -1
- package/dist/@codegen/kvault/utils/index.d.ts +0 -2
- package/dist/@codegen/kvault/utils/index.d.ts.map +0 -1
- package/dist/@codegen/kvault/utils/index.js +0 -18
- package/dist/@codegen/kvault/utils/index.js.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/Config.d.ts +0 -36
- package/dist/@codegen/pyth_rec/accounts/Config.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/Config.js +0 -134
- package/dist/@codegen/pyth_rec/accounts/Config.js.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/index.d.ts +0 -7
- package/dist/@codegen/pyth_rec/accounts/index.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/index.js +0 -10
- package/dist/@codegen/pyth_rec/accounts/index.js.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.d.ts +0 -30
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.js +0 -120
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.js.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.d.ts +0 -23
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.js +0 -103
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.js.map +0 -1
- package/dist/@codegen/pyth_rec/errors/anchor.d.ts +0 -435
- package/dist/@codegen/pyth_rec/errors/anchor.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/errors/anchor.js +0 -767
- package/dist/@codegen/pyth_rec/errors/anchor.js.map +0 -1
- package/dist/@codegen/pyth_rec/errors/custom.d.ts +0 -179
- package/dist/@codegen/pyth_rec/errors/custom.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/errors/custom.js +0 -318
- package/dist/@codegen/pyth_rec/errors/custom.js.map +0 -1
- package/dist/@codegen/pyth_rec/errors/index.d.ts +0 -6
- package/dist/@codegen/pyth_rec/errors/index.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/errors/index.js +0 -86
- package/dist/@codegen/pyth_rec/errors/index.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts +0 -7
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.js +0 -15
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/index.d.ts +0 -17
- package/dist/@codegen/pyth_rec/instructions/index.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/index.js +0 -20
- package/dist/@codegen/pyth_rec/instructions/index.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts +0 -7
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.js +0 -15
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts +0 -7
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.js +0 -15
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts +0 -11
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.js +0 -56
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts +0 -12
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setDataSources.js +0 -58
- package/dist/@codegen/pyth_rec/instructions/setDataSources.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts +0 -12
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setFee.js +0 -55
- package/dist/@codegen/pyth_rec/instructions/setFee.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts +0 -11
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.js +0 -55
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.js.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts +0 -11
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.js +0 -56
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.js.map +0 -1
- package/dist/@codegen/pyth_rec/programId.d.ts +0 -4
- package/dist/@codegen/pyth_rec/programId.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/programId.js +0 -9
- package/dist/@codegen/pyth_rec/programId.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/DataSource.d.ts +0 -28
- package/dist/@codegen/pyth_rec/types/DataSource.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/DataSource.js +0 -80
- package/dist/@codegen/pyth_rec/types/DataSource.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.d.ts +0 -27
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.js +0 -78
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.d.ts +0 -44
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.js +0 -93
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.d.ts +0 -38
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.js +0 -91
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.d.ts +0 -33
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.js +0 -84
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.d.ts +0 -58
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.js +0 -127
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/TwapPrice.d.ts +0 -69
- package/dist/@codegen/pyth_rec/types/TwapPrice.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/TwapPrice.js +0 -128
- package/dist/@codegen/pyth_rec/types/TwapPrice.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/VerificationLevel.d.ts +0 -45
- package/dist/@codegen/pyth_rec/types/VerificationLevel.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/VerificationLevel.js +0 -124
- package/dist/@codegen/pyth_rec/types/VerificationLevel.js.map +0 -1
- package/dist/@codegen/pyth_rec/types/index.d.ts +0 -24
- package/dist/@codegen/pyth_rec/types/index.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/types/index.js +0 -53
- package/dist/@codegen/pyth_rec/types/index.js.map +0 -1
- package/dist/@codegen/pyth_rec/utils/borshAddress.d.ts +0 -4
- package/dist/@codegen/pyth_rec/utils/borshAddress.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/utils/borshAddress.js +0 -30
- package/dist/@codegen/pyth_rec/utils/borshAddress.js.map +0 -1
- package/dist/@codegen/pyth_rec/utils/index.d.ts +0 -2
- package/dist/@codegen/pyth_rec/utils/index.d.ts.map +0 -1
- package/dist/@codegen/pyth_rec/utils/index.js +0 -18
- package/dist/@codegen/pyth_rec/utils/index.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.d.ts +0 -123
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.js +0 -312
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.d.ts +0 -50
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.js +0 -159
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.d.ts +0 -40
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.js +0 -138
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.d.ts +0 -47
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.js +0 -155
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.d.ts +0 -47
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.js +0 -155
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.d.ts +0 -45
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.js +0 -150
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.d.ts +0 -87
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.js +0 -238
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.d.ts +0 -35
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.js +0 -131
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.js +0 -93
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/SbState.d.ts +0 -31
- package/dist/@codegen/switchboard_v2/accounts/SbState.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/SbState.js +0 -120
- package/dist/@codegen/switchboard_v2/accounts/SbState.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.d.ts +0 -26
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.js +0 -108
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.js +0 -96
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.d.ts +0 -54
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.js +0 -168
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.d.ts +0 -69
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.js +0 -198
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.d.ts +0 -43
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.js +0 -142
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/index.d.ts +0 -31
- package/dist/@codegen/switchboard_v2/accounts/index.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/accounts/index.js +0 -34
- package/dist/@codegen/switchboard_v2/accounts/index.js.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/anchor.d.ts +0 -435
- package/dist/@codegen/switchboard_v2/errors/anchor.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/anchor.js +0 -767
- package/dist/@codegen/switchboard_v2/errors/anchor.js.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/custom.d.ts +0 -801
- package/dist/@codegen/switchboard_v2/errors/custom.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/custom.js +0 -1409
- package/dist/@codegen/switchboard_v2/errors/custom.js.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/index.d.ts +0 -6
- package/dist/@codegen/switchboard_v2/errors/index.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/errors/index.js +0 -86
- package/dist/@codegen/switchboard_v2/errors/index.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts +0 -14
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.js +0 -60
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts +0 -21
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.js +0 -67
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts +0 -23
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.js +0 -73
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts +0 -23
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.js +0 -73
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.js +0 -65
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.js +0 -68
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts +0 -16
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts +0 -21
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.js +0 -71
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankInit.js +0 -59
- package/dist/@codegen/switchboard_v2/instructions/crankInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPop.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/crankPop.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPush.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/crankPush.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/index.d.ts +0 -97
- package/dist/@codegen/switchboard_v2/instructions/index.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/index.js +0 -100
- package/dist/@codegen/switchboard_v2/instructions/index.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/jobInit.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/jobInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.js +0 -60
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts +0 -21
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.js +0 -65
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.js +0 -67
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts +0 -17
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.js +0 -67
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts +0 -17
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.js +0 -61
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts +0 -16
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.js +0 -66
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.js +0 -70
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts +0 -16
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.js +0 -60
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/programConfig.js +0 -61
- package/dist/@codegen/switchboard_v2/instructions/programConfig.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts +0 -18
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/programInit.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/programInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.js +0 -63
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.js +0 -68
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts +0 -16
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.js +0 -60
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.js +0 -68
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts +0 -23
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.js +0 -67
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.js +0 -69
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.js +0 -70
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.js +0 -59
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts +0 -21
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.js +0 -65
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts +0 -13
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.js +0 -61
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts +0 -20
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.js +0 -70
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts +0 -19
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.js +0 -69
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.js +0 -76
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.js.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts +0 -12
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.js +0 -62
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.js.map +0 -1
- package/dist/@codegen/switchboard_v2/programId.d.ts +0 -4
- package/dist/@codegen/switchboard_v2/programId.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/programId.js +0 -9
- package/dist/@codegen/switchboard_v2/programId.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.d.ts +0 -33
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.js +0 -90
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.d.ts +0 -33
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.js +0 -90
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.d.ts +0 -34
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.js +0 -83
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.d.ts +0 -84
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.js +0 -158
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.d.ts +0 -37
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.js +0 -95
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.d.ts +0 -32
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.js +0 -108
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.d.ts +0 -119
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.js +0 -172
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.d.ts +0 -86
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.js +0 -138
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.d.ts +0 -97
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.js +0 -145
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.d.ts +0 -84
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.js +0 -161
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.d.ts +0 -29
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.js +0 -75
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.d.ts +0 -28
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.js +0 -82
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.d.ts +0 -32
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.js +0 -88
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.d.ts +0 -27
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.js +0 -78
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.d.ts +0 -44
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.js +0 -108
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.d.ts +0 -37
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.js +0 -95
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Callback.d.ts +0 -41
- package/dist/@codegen/switchboard_v2/types/Callback.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Callback.js +0 -91
- package/dist/@codegen/switchboard_v2/types/Callback.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CallbackZC.d.ts +0 -51
- package/dist/@codegen/switchboard_v2/types/CallbackZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CallbackZC.js +0 -105
- package/dist/@codegen/switchboard_v2/types/CallbackZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.d.ts +0 -54
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.js +0 -96
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.d.ts +0 -32
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.js +0 -84
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.d.ts +0 -42
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.js +0 -102
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.d.ts +0 -47
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.js +0 -109
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.d.ts +0 -32
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.js +0 -88
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankRow.d.ts +0 -29
- package/dist/@codegen/switchboard_v2/types/CrankRow.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/CrankRow.js +0 -84
- package/dist/@codegen/switchboard_v2/types/CrankRow.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.d.ts +0 -63
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.js +0 -103
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.d.ts +0 -67
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.js +0 -89
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.d.ts +0 -54
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.js +0 -96
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Error.d.ts +0 -58
- package/dist/@codegen/switchboard_v2/types/Error.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Error.js +0 -156
- package/dist/@codegen/switchboard_v2/types/Error.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.d.ts +0 -23
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.js +0 -76
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Hash.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/Hash.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Hash.js +0 -72
- package/dist/@codegen/switchboard_v2/types/Hash.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/JobInitParams.d.ts +0 -43
- package/dist/@codegen/switchboard_v2/types/JobInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/JobInitParams.js +0 -106
- package/dist/@codegen/switchboard_v2/types/JobInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.d.ts +0 -27
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.js +0 -78
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.d.ts +0 -38
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.js +0 -99
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.d.ts +0 -44
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.js +0 -108
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.d.ts +0 -33
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.js +0 -88
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.d.ts +0 -37
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.js +0 -95
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.d.ts +0 -63
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.js +0 -134
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.d.ts +0 -94
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.js +0 -172
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.d.ts +0 -84
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.js +0 -175
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.d.ts +0 -23
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.js +0 -76
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.d.ts +0 -58
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.js +0 -156
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.d.ts +0 -33
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.js +0 -88
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.d.ts +0 -39
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.js +0 -79
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.d.ts +0 -33
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.js +0 -86
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.js +0 -72
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.d.ts +0 -45
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.js +0 -89
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Scalar.d.ts +0 -22
- package/dist/@codegen/switchboard_v2/types/Scalar.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/Scalar.js +0 -72
- package/dist/@codegen/switchboard_v2/types/Scalar.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.d.ts +0 -45
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.js +0 -102
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.d.ts +0 -28
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.js +0 -82
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.d.ts +0 -45
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.js +0 -132
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.d.ts +0 -28
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.js +0 -82
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.d.ts +0 -661
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.js +0 -338
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.d.ts +0 -27
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.js +0 -78
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.d.ts +0 -44
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.js +0 -79
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.d.ts +0 -50
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.js +0 -95
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.d.ts +0 -38
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.js +0 -99
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.d.ts +0 -39
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.js +0 -75
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.d.ts +0 -32
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.js +0 -84
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.d.ts +0 -15
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.js +0 -61
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.d.ts +0 -39
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.js +0 -75
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.d.ts +0 -29
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.js +0 -84
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.d.ts +0 -48
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.js +0 -113
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.d.ts +0 -27
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.js +0 -78
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.d.ts +0 -27
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.js +0 -78
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfRound.d.ts +0 -53
- package/dist/@codegen/switchboard_v2/types/VrfRound.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfRound.js +0 -120
- package/dist/@codegen/switchboard_v2/types/VrfRound.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.d.ts +0 -39
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.js +0 -73
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfStatus.d.ts +0 -84
- package/dist/@codegen/switchboard_v2/types/VrfStatus.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/VrfStatus.js +0 -204
- package/dist/@codegen/switchboard_v2/types/VrfStatus.js.map +0 -1
- package/dist/@codegen/switchboard_v2/types/index.d.ts +0 -179
- package/dist/@codegen/switchboard_v2/types/index.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/types/index.js +0 -207
- package/dist/@codegen/switchboard_v2/types/index.js.map +0 -1
- package/dist/@codegen/switchboard_v2/utils/borshAddress.d.ts +0 -4
- package/dist/@codegen/switchboard_v2/utils/borshAddress.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/utils/borshAddress.js +0 -30
- package/dist/@codegen/switchboard_v2/utils/borshAddress.js.map +0 -1
- package/dist/@codegen/switchboard_v2/utils/index.d.ts +0 -2
- package/dist/@codegen/switchboard_v2/utils/index.d.ts.map +0 -1
- package/dist/@codegen/switchboard_v2/utils/index.js +0 -18
- package/dist/@codegen/switchboard_v2/utils/index.js.map +0 -1
- package/dist/client/commands/borrow.d.ts +0 -4
- package/dist/client/commands/borrow.d.ts.map +0 -1
- package/dist/client/commands/borrow.js +0 -20
- package/dist/client/commands/borrow.js.map +0 -1
- package/dist/client/commands/deposit.d.ts +0 -4
- package/dist/client/commands/deposit.d.ts.map +0 -1
- package/dist/client/commands/deposit.js +0 -20
- package/dist/client/commands/deposit.js.map +0 -1
- package/dist/client/commands/initFarmsForReserve.d.ts +0 -4
- package/dist/client/commands/initFarmsForReserve.d.ts.map +0 -1
- package/dist/client/commands/initFarmsForReserve.js +0 -49
- package/dist/client/commands/initFarmsForReserve.js.map +0 -1
- package/dist/client/commands/printAllReserveAccounts.d.ts +0 -3
- package/dist/client/commands/printAllReserveAccounts.d.ts.map +0 -1
- package/dist/client/commands/printAllReserveAccounts.js +0 -20
- package/dist/client/commands/printAllReserveAccounts.js.map +0 -1
- package/dist/client/commands/printReserve.d.ts +0 -3
- package/dist/client/commands/printReserve.d.ts.map +0 -1
- package/dist/client/commands/printReserve.js +0 -16
- package/dist/client/commands/printReserve.js.map +0 -1
- package/dist/client/commands/repay.d.ts +0 -4
- package/dist/client/commands/repay.d.ts.map +0 -1
- package/dist/client/commands/repay.js +0 -20
- package/dist/client/commands/repay.js.map +0 -1
- package/dist/client/commands/withdraw.d.ts +0 -4
- package/dist/client/commands/withdraw.d.ts.map +0 -1
- package/dist/client/commands/withdraw.js +0 -20
- package/dist/client/commands/withdraw.js.map +0 -1
- package/dist/client/services/market.d.ts +0 -6
- package/dist/client/services/market.d.ts.map +0 -1
- package/dist/client/services/market.js +0 -28
- package/dist/client/services/market.js.map +0 -1
- package/dist/client/services/userMetadata.d.ts +0 -4
- package/dist/client/services/userMetadata.d.ts.map +0 -1
- package/dist/client/services/userMetadata.js +0 -23
- package/dist/client/services/userMetadata.js.map +0 -1
- package/dist/client/tx/CliConnectionPool.d.ts +0 -17
- package/dist/client/tx/CliConnectionPool.d.ts.map +0 -1
- package/dist/client/tx/CliConnectionPool.js +0 -39
- package/dist/client/tx/CliConnectionPool.js.map +0 -1
- package/dist/client/tx/CliEnv.d.ts +0 -27
- package/dist/client/tx/CliEnv.d.ts.map +0 -1
- package/dist/client/tx/CliEnv.js +0 -114
- package/dist/client/tx/CliEnv.js.map +0 -1
- package/dist/client/tx/keypair.d.ts +0 -4
- package/dist/client/tx/keypair.d.ts.map +0 -1
- package/dist/client/tx/keypair.js +0 -20
- package/dist/client/tx/keypair.js.map +0 -1
- package/dist/client/tx/multisig.d.ts +0 -4
- package/dist/client/tx/multisig.d.ts.map +0 -1
- package/dist/client/tx/multisig.js +0 -22
- package/dist/client/tx/multisig.js.map +0 -1
- package/dist/client/tx/priorityFee.d.ts +0 -7
- package/dist/client/tx/priorityFee.d.ts.map +0 -1
- package/dist/client/tx/priorityFee.js +0 -25
- package/dist/client/tx/priorityFee.js.map +0 -1
- package/dist/client/tx/processor.d.ts +0 -6
- package/dist/client/tx/processor.d.ts.map +0 -1
- package/dist/client/tx/processor.js +0 -25
- package/dist/client/tx/processor.js.map +0 -1
- package/dist/client/tx/rpc.d.ts +0 -30
- package/dist/client/tx/rpc.d.ts.map +0 -1
- package/dist/client/tx/rpc.js +0 -89
- package/dist/client/tx/rpc.js.map +0 -1
- package/dist/client/tx/simulate.d.ts +0 -7
- package/dist/client/tx/simulate.d.ts.map +0 -1
- package/dist/client/tx/simulate.js +0 -36
- package/dist/client/tx/simulate.js.map +0 -1
- package/dist/client/tx/tx.d.ts +0 -16
- package/dist/client/tx/tx.d.ts.map +0 -1
- package/dist/client/tx/tx.js +0 -115
- package/dist/client/tx/tx.js.map +0 -1
- package/dist/client/utils/modifiers.d.ts +0 -7
- package/dist/client/utils/modifiers.d.ts.map +0 -1
- package/dist/client/utils/modifiers.js +0 -3
- package/dist/client/utils/modifiers.js.map +0 -1
- package/dist/manager/client_kamino_manager.d.ts +0 -2
- package/dist/manager/client_kamino_manager.d.ts.map +0 -1
- package/dist/manager/client_kamino_manager.js +0 -1353
- package/dist/manager/client_kamino_manager.js.map +0 -1
- package/dist/manager/tx/ManagerConnectionPool.d.ts +0 -17
- package/dist/manager/tx/ManagerConnectionPool.d.ts.map +0 -1
- package/dist/manager/tx/ManagerConnectionPool.js +0 -39
- package/dist/manager/tx/ManagerConnectionPool.js.map +0 -1
- package/dist/manager/tx/ManagerEnv.d.ts +0 -37
- package/dist/manager/tx/ManagerEnv.d.ts.map +0 -1
- package/dist/manager/tx/ManagerEnv.js +0 -151
- package/dist/manager/tx/ManagerEnv.js.map +0 -1
- package/dist/manager/tx/keypair.d.ts +0 -4
- package/dist/manager/tx/keypair.d.ts.map +0 -1
- package/dist/manager/tx/keypair.js +0 -20
- package/dist/manager/tx/keypair.js.map +0 -1
- package/dist/manager/tx/multisig.d.ts +0 -4
- package/dist/manager/tx/multisig.d.ts.map +0 -1
- package/dist/manager/tx/multisig.js +0 -22
- package/dist/manager/tx/multisig.js.map +0 -1
- package/dist/manager/tx/priorityFee.d.ts +0 -7
- package/dist/manager/tx/priorityFee.d.ts.map +0 -1
- package/dist/manager/tx/priorityFee.js +0 -25
- package/dist/manager/tx/priorityFee.js.map +0 -1
- package/dist/manager/tx/processor.d.ts +0 -6
- package/dist/manager/tx/processor.d.ts.map +0 -1
- package/dist/manager/tx/processor.js +0 -22
- package/dist/manager/tx/processor.js.map +0 -1
- package/dist/manager/tx/rpc.d.ts +0 -30
- package/dist/manager/tx/rpc.d.ts.map +0 -1
- package/dist/manager/tx/rpc.js +0 -89
- package/dist/manager/tx/rpc.js.map +0 -1
- package/dist/manager/tx/simulate.d.ts +0 -7
- package/dist/manager/tx/simulate.d.ts.map +0 -1
- package/dist/manager/tx/simulate.js +0 -36
- package/dist/manager/tx/simulate.js.map +0 -1
- package/dist/manager/tx/tx.d.ts +0 -16
- package/dist/manager/tx/tx.d.ts.map +0 -1
- package/dist/manager/tx/tx.js +0 -114
- package/dist/manager/tx/tx.js.map +0 -1
- package/dist/manager/utils/consts.d.ts +0 -3
- package/dist/manager/utils/consts.d.ts.map +0 -1
- package/dist/manager/utils/consts.js +0 -6
- package/dist/manager/utils/consts.js.map +0 -1
- package/dist/manager/utils/modifiers.d.ts +0 -7
- package/dist/manager/utils/modifiers.d.ts.map +0 -1
- package/dist/manager/utils/modifiers.js +0 -3
- package/dist/manager/utils/modifiers.js.map +0 -1
- package/dist/utils/bigint.d.ts +0 -2
- package/dist/utils/bigint.d.ts.map +0 -1
- package/dist/utils/bigint.js +0 -7
- package/dist/utils/bigint.js.map +0 -1
- package/dist/utils/compat.d.ts +0 -6
- package/dist/utils/compat.d.ts.map +0 -1
- package/dist/utils/compat.js +0 -19
- package/dist/utils/compat.js.map +0 -1
- package/dist/utils/consts.d.ts +0 -4
- package/dist/utils/consts.d.ts.map +0 -1
- package/dist/utils/consts.js +0 -7
- package/dist/utils/consts.js.map +0 -1
- package/dist/utils/option.d.ts +0 -3
- package/dist/utils/option.d.ts.map +0 -1
- package/dist/utils/option.js +0 -12
- package/dist/utils/option.js.map +0 -1
- package/dist/utils/signer.d.ts +0 -4
- package/dist/utils/signer.d.ts.map +0 -1
- package/dist/utils/signer.js +0 -20
- package/dist/utils/signer.js.map +0 -1
- package/dist/utils/switchboard.d.ts +0 -4
- package/dist/utils/switchboard.d.ts.map +0 -1
- package/dist/utils/switchboard.js +0 -26
- package/dist/utils/switchboard.js.map +0 -1
- package/src/@codegen/jupiter_perps/accounts/Custody.ts +0 -200
- package/src/@codegen/jupiter_perps/accounts/Perpetuals.ts +0 -140
- package/src/@codegen/jupiter_perps/accounts/Pool.ts +0 -172
- package/src/@codegen/jupiter_perps/accounts/Position.ts +0 -204
- package/src/@codegen/jupiter_perps/accounts/PositionRequest.ts +0 -272
- package/src/@codegen/jupiter_perps/accounts/TestOracle.ts +0 -124
- package/src/@codegen/jupiter_perps/accounts/index.ts +0 -15
- package/src/@codegen/jupiter_perps/errors/custom.ts +0 -596
- package/src/@codegen/jupiter_perps/errors/index.ts +0 -68
- package/src/@codegen/jupiter_perps/instructions/addCustody.ts +0 -65
- package/src/@codegen/jupiter_perps/instructions/addLiquidity.ts +0 -71
- package/src/@codegen/jupiter_perps/instructions/addPool.ts +0 -61
- package/src/@codegen/jupiter_perps/instructions/closePositionRequest.ts +0 -75
- package/src/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.ts +0 -85
- package/src/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.ts +0 -85
- package/src/@codegen/jupiter_perps/instructions/decreasePosition.ts +0 -85
- package/src/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.ts +0 -57
- package/src/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.ts +0 -57
- package/src/@codegen/jupiter_perps/instructions/getDecreasePosition.ts +0 -61
- package/src/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.ts +0 -59
- package/src/@codegen/jupiter_perps/instructions/getIncreasePosition.ts +0 -63
- package/src/@codegen/jupiter_perps/instructions/getLiquidationState.ts +0 -59
- package/src/@codegen/jupiter_perps/instructions/getOraclePrice.ts +0 -39
- package/src/@codegen/jupiter_perps/instructions/getPnl.ts +0 -57
- package/src/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.ts +0 -59
- package/src/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.ts +0 -59
- package/src/@codegen/jupiter_perps/instructions/increasePosition.ts +0 -75
- package/src/@codegen/jupiter_perps/instructions/increasePositionPreSwap.ts +0 -69
- package/src/@codegen/jupiter_perps/instructions/index.ts +0 -136
- package/src/@codegen/jupiter_perps/instructions/init.ts +0 -65
- package/src/@codegen/jupiter_perps/instructions/liquidatePosition.ts +0 -77
- package/src/@codegen/jupiter_perps/instructions/removeLiquidity.ts +0 -73
- package/src/@codegen/jupiter_perps/instructions/setCustodyConfig.ts +0 -53
- package/src/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.ts +0 -51
- package/src/@codegen/jupiter_perps/instructions/setPerpetualsConfig.ts +0 -51
- package/src/@codegen/jupiter_perps/instructions/setPoolConfig.ts +0 -51
- package/src/@codegen/jupiter_perps/instructions/setTestOraclePrice.ts +0 -59
- package/src/@codegen/jupiter_perps/instructions/setTestTime.ts +0 -49
- package/src/@codegen/jupiter_perps/instructions/swap.ts +0 -75
- package/src/@codegen/jupiter_perps/instructions/swapExactOut.ts +0 -75
- package/src/@codegen/jupiter_perps/instructions/testInit.ts +0 -61
- package/src/@codegen/jupiter_perps/instructions/transferAdmin.ts +0 -51
- package/src/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.ts +0 -63
- package/src/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.ts +0 -63
- package/src/@codegen/jupiter_perps/instructions/withdrawFees.ts +0 -63
- package/src/@codegen/jupiter_perps/programId.ts +0 -9
- package/src/@codegen/jupiter_perps/types/AddCustodyParams.ts +0 -104
- package/src/@codegen/jupiter_perps/types/AddLiquidityParams.ts +0 -79
- package/src/@codegen/jupiter_perps/types/AddPoolParams.ts +0 -86
- package/src/@codegen/jupiter_perps/types/AmountAndFee.ts +0 -73
- package/src/@codegen/jupiter_perps/types/Assets.ts +0 -104
- package/src/@codegen/jupiter_perps/types/ClosePositionRequestParams.ts +0 -40
- package/src/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.ts +0 -136
- package/src/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.ts +0 -136
- package/src/@codegen/jupiter_perps/types/DecreasePositionInfo.ts +0 -122
- package/src/@codegen/jupiter_perps/types/DecreasePositionParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.ts +0 -40
- package/src/@codegen/jupiter_perps/types/Fees.ts +0 -131
- package/src/@codegen/jupiter_perps/types/FundingRateState.ts +0 -77
- package/src/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.ts +0 -56
- package/src/@codegen/jupiter_perps/types/GetDecreasePositionParams.ts +0 -67
- package/src/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.ts +0 -56
- package/src/@codegen/jupiter_perps/types/GetIncreasePositionParams.ts +0 -79
- package/src/@codegen/jupiter_perps/types/GetLiquidationStateParams.ts +0 -40
- package/src/@codegen/jupiter_perps/types/GetPnlAndFeeParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.ts +0 -56
- package/src/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.ts +0 -56
- package/src/@codegen/jupiter_perps/types/IncreasePositionInfo.ts +0 -86
- package/src/@codegen/jupiter_perps/types/IncreasePositionParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.ts +0 -40
- package/src/@codegen/jupiter_perps/types/InitParams.ts +0 -113
- package/src/@codegen/jupiter_perps/types/Limit.ts +0 -77
- package/src/@codegen/jupiter_perps/types/LiquidatePositionParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/OracleParams.ts +0 -86
- package/src/@codegen/jupiter_perps/types/OraclePrice.ts +0 -62
- package/src/@codegen/jupiter_perps/types/OraclePriceInfo.ts +0 -104
- package/src/@codegen/jupiter_perps/types/OracleType.ts +0 -119
- package/src/@codegen/jupiter_perps/types/Permissions.ts +0 -113
- package/src/@codegen/jupiter_perps/types/PnlAndFee.ts +0 -104
- package/src/@codegen/jupiter_perps/types/PoolApr.ts +0 -77
- package/src/@codegen/jupiter_perps/types/PriceCalcMode.ts +0 -121
- package/src/@codegen/jupiter_perps/types/PricingParams.ts +0 -104
- package/src/@codegen/jupiter_perps/types/RemoveLiquidityParams.ts +0 -65
- package/src/@codegen/jupiter_perps/types/RequestChange.ts +0 -121
- package/src/@codegen/jupiter_perps/types/RequestType.ts +0 -89
- package/src/@codegen/jupiter_perps/types/SetCustodyConfigParams.ts +0 -95
- package/src/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.ts +0 -67
- package/src/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.ts +0 -56
- package/src/@codegen/jupiter_perps/types/SetPoolConfigParams.ts +0 -77
- package/src/@codegen/jupiter_perps/types/SetTestOraclePriceParams.ts +0 -86
- package/src/@codegen/jupiter_perps/types/SetTestTimeParams.ts +0 -54
- package/src/@codegen/jupiter_perps/types/Side.ts +0 -119
- package/src/@codegen/jupiter_perps/types/SwapAmountAndFees.ts +0 -86
- package/src/@codegen/jupiter_perps/types/SwapExactOutParams.ts +0 -65
- package/src/@codegen/jupiter_perps/types/SwapParams.ts +0 -65
- package/src/@codegen/jupiter_perps/types/TestInitParams.ts +0 -113
- package/src/@codegen/jupiter_perps/types/TransferAdminParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.ts +0 -67
- package/src/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.ts +0 -67
- package/src/@codegen/jupiter_perps/types/WithdrawFeesParams.ts +0 -38
- package/src/@codegen/jupiter_perps/types/index.ts +0 -248
- package/src/@codegen/jupiter_perps/utils/borshAddress.ts +0 -43
- package/src/@codegen/jupiter_perps/utils/index.ts +0 -1
- package/src/@codegen/klend/accounts/GlobalConfig.ts +0 -136
- package/src/@codegen/klend/accounts/LendingMarket.ts +0 -517
- package/src/@codegen/klend/accounts/Obligation.ts +0 -444
- package/src/@codegen/klend/accounts/ReferrerState.ts +0 -108
- package/src/@codegen/klend/accounts/ReferrerTokenState.ts +0 -156
- package/src/@codegen/klend/accounts/Reserve.ts +0 -259
- package/src/@codegen/klend/accounts/ShortUrl.ts +0 -108
- package/src/@codegen/klend/accounts/UserMetadata.ts +0 -153
- package/src/@codegen/klend/accounts/UserState.ts +0 -312
- package/src/@codegen/klend/errors/index.ts +0 -68
- package/src/@codegen/klend/instructions/borrowObligationLiquidity.ts +0 -71
- package/src/@codegen/klend/instructions/borrowObligationLiquidityV2.ts +0 -95
- package/src/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.ts +0 -41
- package/src/@codegen/klend/instructions/depositAndWithdraw.ts +0 -168
- package/src/@codegen/klend/instructions/depositObligationCollateral.ts +0 -61
- package/src/@codegen/klend/instructions/depositObligationCollateralV2.ts +0 -84
- package/src/@codegen/klend/instructions/depositReserveLiquidity.ts +0 -69
- package/src/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.ts +0 -78
- package/src/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +0 -103
- package/src/@codegen/klend/instructions/flashBorrowReserveLiquidity.ts +0 -77
- package/src/@codegen/klend/instructions/flashRepayReserveLiquidity.ts +0 -82
- package/src/@codegen/klend/instructions/idlMissingTypes.ts +0 -75
- package/src/@codegen/klend/instructions/initFarmsForReserve.ts +0 -69
- package/src/@codegen/klend/instructions/initGlobalConfig.ts +0 -41
- package/src/@codegen/klend/instructions/initLendingMarket.ts +0 -61
- package/src/@codegen/klend/instructions/initObligation.ts +0 -67
- package/src/@codegen/klend/instructions/initObligationFarmsForReserve.ts +0 -67
- package/src/@codegen/klend/instructions/initReferrerStateAndShortUrl.ts +0 -57
- package/src/@codegen/klend/instructions/initReferrerTokenState.ts +0 -45
- package/src/@codegen/klend/instructions/initReserve.ts +0 -63
- package/src/@codegen/klend/instructions/initUserMetadata.ts +0 -59
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.ts +0 -98
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +0 -162
- package/src/@codegen/klend/instructions/markObligationForDeleveraging.ts +0 -55
- package/src/@codegen/klend/instructions/redeemFees.ts +0 -45
- package/src/@codegen/klend/instructions/redeemReserveCollateral.ts +0 -69
- package/src/@codegen/klend/instructions/refreshObligation.ts +0 -35
- package/src/@codegen/klend/instructions/refreshObligationFarmsForReserve.ts +0 -67
- package/src/@codegen/klend/instructions/refreshReserve.ts +0 -51
- package/src/@codegen/klend/instructions/refreshReservesBatch.ts +0 -40
- package/src/@codegen/klend/instructions/repayAndWithdrawAndRedeem.ts +0 -147
- package/src/@codegen/klend/instructions/repayObligationLiquidity.ts +0 -63
- package/src/@codegen/klend/instructions/repayObligationLiquidityV2.ts +0 -86
- package/src/@codegen/klend/instructions/requestElevationGroup.ts +0 -51
- package/src/@codegen/klend/instructions/setObligationOrder.ts +0 -56
- package/src/@codegen/klend/instructions/socializeLoss.ts +0 -59
- package/src/@codegen/klend/instructions/socializeLossV2.ts +0 -81
- package/src/@codegen/klend/instructions/updateGlobalConfig.ts +0 -62
- package/src/@codegen/klend/instructions/updateGlobalConfigAdmin.ts +0 -39
- package/src/@codegen/klend/instructions/updateLendingMarket.ts +0 -58
- package/src/@codegen/klend/instructions/updateLendingMarketOwner.ts +0 -39
- package/src/@codegen/klend/instructions/updateReserveConfig.ts +0 -65
- package/src/@codegen/klend/instructions/withdrawObligationCollateral.ts +0 -63
- package/src/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +0 -78
- package/src/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +0 -101
- package/src/@codegen/klend/instructions/withdrawObligationCollateralV2.ts +0 -84
- package/src/@codegen/klend/instructions/withdrawProtocolFee.ts +0 -61
- package/src/@codegen/klend/instructions/withdrawReferrerFees.ts +0 -49
- package/src/@codegen/klend/programId.ts +0 -9
- package/src/@codegen/klend/types/AssetTier.ts +0 -119
- package/src/@codegen/klend/types/BigFractionBytes.ts +0 -68
- package/src/@codegen/klend/types/BorrowRateCurve.ts +0 -61
- package/src/@codegen/klend/types/CurvePoint.ts +0 -65
- package/src/@codegen/klend/types/ElevationGroup.ts +0 -134
- package/src/@codegen/klend/types/FeeCalculation.ts +0 -91
- package/src/@codegen/klend/types/InitObligationArgs.ts +0 -62
- package/src/@codegen/klend/types/LastUpdate.ts +0 -96
- package/src/@codegen/klend/types/ObligationCollateral.ts +0 -129
- package/src/@codegen/klend/types/ObligationLiquidity.ts +0 -160
- package/src/@codegen/klend/types/ObligationOrder.ts +0 -348
- package/src/@codegen/klend/types/PriceHeuristic.ts +0 -82
- package/src/@codegen/klend/types/PythConfiguration.ts +0 -57
- package/src/@codegen/klend/types/ReserveCollateral.ts +0 -105
- package/src/@codegen/klend/types/ReserveConfig.ts +0 -557
- package/src/@codegen/klend/types/ReserveFarmKind.ts +0 -91
- package/src/@codegen/klend/types/ReserveFees.ts +0 -123
- package/src/@codegen/klend/types/ReserveLiquidity.ts +0 -288
- package/src/@codegen/klend/types/ReserveStatus.ts +0 -121
- package/src/@codegen/klend/types/ScopeConfiguration.ts +0 -86
- package/src/@codegen/klend/types/SwitchboardConfiguration.ts +0 -68
- package/src/@codegen/klend/types/TokenInfo.ts +0 -191
- package/src/@codegen/klend/types/UpdateConfigMode.ts +0 -1531
- package/src/@codegen/klend/types/UpdateGlobalConfigMode.ts +0 -91
- package/src/@codegen/klend/types/UpdateLendingMarketConfigValue.ts +0 -420
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +0 -781
- package/src/@codegen/klend/types/WithdrawalCaps.ts +0 -87
- package/src/@codegen/klend/utils/borshAddress.ts +0 -43
- package/src/@codegen/klend/utils/index.ts +0 -1
- package/src/@codegen/klend/zero_padding/ObligationZP.ts +0 -237
- package/src/@codegen/kvault/accounts/Reserve.ts +0 -259
- package/src/@codegen/kvault/accounts/VaultState.ts +0 -390
- package/src/@codegen/kvault/errors/anchor.ts +0 -773
- package/src/@codegen/kvault/errors/index.ts +0 -68
- package/src/@codegen/kvault/instructions/deposit.ts +0 -71
- package/src/@codegen/kvault/instructions/giveUpPendingFees.ts +0 -55
- package/src/@codegen/kvault/instructions/initVault.ts +0 -57
- package/src/@codegen/kvault/instructions/initializeSharesMetadata.ts +0 -73
- package/src/@codegen/kvault/instructions/invest.ts +0 -64
- package/src/@codegen/kvault/instructions/removeAllocation.ts +0 -41
- package/src/@codegen/kvault/instructions/updateAdmin.ts +0 -39
- package/src/@codegen/kvault/instructions/updateReserveAllocation.ts +0 -65
- package/src/@codegen/kvault/instructions/updateSharesMetadata.ts +0 -67
- package/src/@codegen/kvault/instructions/updateVaultConfig.ts +0 -64
- package/src/@codegen/kvault/instructions/withdraw.ts +0 -117
- package/src/@codegen/kvault/instructions/withdrawFromAvailable.ts +0 -71
- package/src/@codegen/kvault/instructions/withdrawPendingFees.ts +0 -68
- package/src/@codegen/kvault/programId.ts +0 -9
- package/src/@codegen/kvault/types/BigFractionBytes.ts +0 -68
- package/src/@codegen/kvault/types/BorrowRateCurve.ts +0 -61
- package/src/@codegen/kvault/types/CurvePoint.ts +0 -65
- package/src/@codegen/kvault/types/LastUpdate.ts +0 -96
- package/src/@codegen/kvault/types/PriceHeuristic.ts +0 -82
- package/src/@codegen/kvault/types/PythConfiguration.ts +0 -57
- package/src/@codegen/kvault/types/ReserveCollateral.ts +0 -105
- package/src/@codegen/kvault/types/ReserveConfig.ts +0 -557
- package/src/@codegen/kvault/types/ReserveFees.ts +0 -123
- package/src/@codegen/kvault/types/ReserveLiquidity.ts +0 -288
- package/src/@codegen/kvault/types/ScopeConfiguration.ts +0 -86
- package/src/@codegen/kvault/types/SwitchboardConfiguration.ts +0 -68
- package/src/@codegen/kvault/types/TokenInfo.ts +0 -191
- package/src/@codegen/kvault/types/VaultAllocation.ts +0 -143
- package/src/@codegen/kvault/types/VaultConfigField.ts +0 -391
- package/src/@codegen/kvault/types/WithdrawalCaps.ts +0 -87
- package/src/@codegen/kvault/utils/borshAddress.ts +0 -43
- package/src/@codegen/kvault/utils/index.ts +0 -1
- package/src/@codegen/pyth_rec/accounts/Config.ts +0 -151
- package/src/@codegen/pyth_rec/accounts/index.ts +0 -6
- package/src/@codegen/pyth_rec/accounts/priceUpdateV2.ts +0 -128
- package/src/@codegen/pyth_rec/accounts/twapUpdate.ts +0 -108
- package/src/@codegen/pyth_rec/errors/anchor.ts +0 -773
- package/src/@codegen/pyth_rec/errors/custom.ts +0 -331
- package/src/@codegen/pyth_rec/errors/index.ts +0 -68
- package/src/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.ts +0 -35
- package/src/@codegen/pyth_rec/instructions/index.ts +0 -28
- package/src/@codegen/pyth_rec/instructions/reclaimRent.ts +0 -35
- package/src/@codegen/pyth_rec/instructions/reclaimTwapRent.ts +0 -35
- package/src/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.ts +0 -49
- package/src/@codegen/pyth_rec/instructions/setDataSources.ts +0 -53
- package/src/@codegen/pyth_rec/instructions/setFee.ts +0 -49
- package/src/@codegen/pyth_rec/instructions/setMinimumSignatures.ts +0 -49
- package/src/@codegen/pyth_rec/instructions/setWormholeAddress.ts +0 -49
- package/src/@codegen/pyth_rec/programId.ts +0 -9
- package/src/@codegen/pyth_rec/types/DataSource.ts +0 -62
- package/src/@codegen/pyth_rec/types/MerklePriceUpdate.ts +0 -73
- package/src/@codegen/pyth_rec/types/PostTwapUpdateParams.ts +0 -93
- package/src/@codegen/pyth_rec/types/PostUpdateAtomicParams.ts +0 -89
- package/src/@codegen/pyth_rec/types/PostUpdateParams.ts +0 -76
- package/src/@codegen/pyth_rec/types/PriceFeedMessage.ts +0 -122
- package/src/@codegen/pyth_rec/types/TwapPrice.ts +0 -129
- package/src/@codegen/pyth_rec/types/VerificationLevel.ts +0 -118
- package/src/@codegen/pyth_rec/types/index.ts +0 -44
- package/src/@codegen/pyth_rec/utils/borshAddress.ts +0 -43
- package/src/@codegen/pyth_rec/utils/index.ts +0 -1
- package/src/@codegen/switchboard_v2/accounts/AggregatorAccountData.ts +0 -398
- package/src/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.ts +0 -190
- package/src/@codegen/switchboard_v2/accounts/CrankAccountData.ts +0 -156
- package/src/@codegen/switchboard_v2/accounts/JobAccountData.ts +0 -176
- package/src/@codegen/switchboard_v2/accounts/LeaseAccountData.ts +0 -172
- package/src/@codegen/switchboard_v2/accounts/OracleAccountData.ts +0 -164
- package/src/@codegen/switchboard_v2/accounts/OracleQueueAccountData.ts +0 -287
- package/src/@codegen/switchboard_v2/accounts/PermissionAccountData.ts +0 -140
- package/src/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.ts +0 -100
- package/src/@codegen/switchboard_v2/accounts/SbState.ts +0 -132
- package/src/@codegen/switchboard_v2/accounts/SlidingResultAccountData.ts +0 -122
- package/src/@codegen/switchboard_v2/accounts/TaskSpecRecord.ts +0 -100
- package/src/@codegen/switchboard_v2/accounts/VrfAccountData.ts +0 -194
- package/src/@codegen/switchboard_v2/accounts/VrfLiteAccountData.ts +0 -228
- package/src/@codegen/switchboard_v2/accounts/VrfPoolAccountData.ts +0 -162
- package/src/@codegen/switchboard_v2/accounts/index.ts +0 -63
- package/src/@codegen/switchboard_v2/errors/anchor.ts +0 -773
- package/src/@codegen/switchboard_v2/errors/custom.ts +0 -1436
- package/src/@codegen/switchboard_v2/errors/index.ts +0 -68
- package/src/@codegen/switchboard_v2/instructions/aggregatorAddJob.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/aggregatorInit.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/aggregatorLock.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/aggregatorOpenRound.ts +0 -69
- package/src/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/aggregatorSaveResult.ts +0 -77
- package/src/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.ts +0 -77
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetConfig.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetQueue.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.ts +0 -61
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerInit.ts +0 -71
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.ts +0 -59
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.ts +0 -73
- package/src/@codegen/switchboard_v2/instructions/crankInit.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/crankPop.ts +0 -63
- package/src/@codegen/switchboard_v2/instructions/crankPopV2.ts +0 -63
- package/src/@codegen/switchboard_v2/instructions/crankPush.ts +0 -63
- package/src/@codegen/switchboard_v2/instructions/index.ts +0 -183
- package/src/@codegen/switchboard_v2/instructions/jobInit.ts +0 -59
- package/src/@codegen/switchboard_v2/instructions/jobSetData.ts +0 -53
- package/src/@codegen/switchboard_v2/instructions/leaseExtend.ts +0 -63
- package/src/@codegen/switchboard_v2/instructions/leaseInit.ts +0 -67
- package/src/@codegen/switchboard_v2/instructions/leaseSetAuthority.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/leaseWithdraw.ts +0 -67
- package/src/@codegen/switchboard_v2/instructions/oracleHeartbeat.ts +0 -65
- package/src/@codegen/switchboard_v2/instructions/oracleInit.ts +0 -59
- package/src/@codegen/switchboard_v2/instructions/oracleQueueInit.ts +0 -63
- package/src/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/oracleWithdraw.ts +0 -71
- package/src/@codegen/switchboard_v2/instructions/permissionInit.ts +0 -59
- package/src/@codegen/switchboard_v2/instructions/permissionSet.ts +0 -53
- package/src/@codegen/switchboard_v2/instructions/programConfig.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/programInit.ts +0 -61
- package/src/@codegen/switchboard_v2/instructions/vaultTransfer.ts +0 -59
- package/src/@codegen/switchboard_v2/instructions/vrfCloseAction.ts +0 -69
- package/src/@codegen/switchboard_v2/instructions/vrfInit.ts +0 -57
- package/src/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.ts +0 -69
- package/src/@codegen/switchboard_v2/instructions/vrfLiteInit.ts +0 -71
- package/src/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.ts +0 -69
- package/src/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.ts +0 -71
- package/src/@codegen/switchboard_v2/instructions/vrfPoolAdd.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/vrfPoolInit.ts +0 -67
- package/src/@codegen/switchboard_v2/instructions/vrfPoolRemove.ts +0 -55
- package/src/@codegen/switchboard_v2/instructions/vrfPoolRequest.ts +0 -71
- package/src/@codegen/switchboard_v2/instructions/vrfProveAndVerify.ts +0 -69
- package/src/@codegen/switchboard_v2/instructions/vrfRequestRandomness.ts +0 -79
- package/src/@codegen/switchboard_v2/instructions/vrfSetCallback.ts +0 -55
- package/src/@codegen/switchboard_v2/programId.ts +0 -9
- package/src/@codegen/switchboard_v2/types/AccountMetaBorsh.ts +0 -77
- package/src/@codegen/switchboard_v2/types/AccountMetaZC.ts +0 -77
- package/src/@codegen/switchboard_v2/types/AggregatorAddJobParams.ts +0 -54
- package/src/@codegen/switchboard_v2/types/AggregatorHistoryRow.ts +0 -65
- package/src/@codegen/switchboard_v2/types/AggregatorInitParams.ts +0 -162
- package/src/@codegen/switchboard_v2/types/AggregatorLockParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.ts +0 -88
- package/src/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorResolutionMode.ts +0 -91
- package/src/@codegen/switchboard_v2/types/AggregatorRound.ts +0 -186
- package/src/@codegen/switchboard_v2/types/AggregatorSaveResultParams.ts +0 -142
- package/src/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.ts +0 -161
- package/src/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.ts +0 -40
- package/src/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetConfigParams.ts +0 -173
- package/src/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.ts +0 -40
- package/src/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetQueueParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.ts +0 -63
- package/src/@codegen/switchboard_v2/types/BorshDecimal.ts +0 -62
- package/src/@codegen/switchboard_v2/types/BufferRelayerInitParams.ts +0 -77
- package/src/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.ts +0 -67
- package/src/@codegen/switchboard_v2/types/BufferRelayerRound.ts +0 -95
- package/src/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.ts +0 -96
- package/src/@codegen/switchboard_v2/types/Callback.ts +0 -95
- package/src/@codegen/switchboard_v2/types/CallbackZC.ts +0 -103
- package/src/@codegen/switchboard_v2/types/CompletedPointZC.ts +0 -86
- package/src/@codegen/switchboard_v2/types/CrankInitParams.ts +0 -89
- package/src/@codegen/switchboard_v2/types/CrankPopParams.ts +0 -111
- package/src/@codegen/switchboard_v2/types/CrankPopParamsV2.ts +0 -120
- package/src/@codegen/switchboard_v2/types/CrankPushParams.ts +0 -77
- package/src/@codegen/switchboard_v2/types/CrankRow.ts +0 -65
- package/src/@codegen/switchboard_v2/types/EcvrfIntermediate.ts +0 -95
- package/src/@codegen/switchboard_v2/types/EcvrfProofZC.ts +0 -77
- package/src/@codegen/switchboard_v2/types/EdwardsPointZC.ts +0 -86
- package/src/@codegen/switchboard_v2/types/Error.ts +0 -149
- package/src/@codegen/switchboard_v2/types/FieldElementZC.ts +0 -54
- package/src/@codegen/switchboard_v2/types/Hash.ts +0 -54
- package/src/@codegen/switchboard_v2/types/JobInitParams.ts +0 -103
- package/src/@codegen/switchboard_v2/types/JobSetDataParams.ts +0 -70
- package/src/@codegen/switchboard_v2/types/LeaseExtendParams.ts +0 -94
- package/src/@codegen/switchboard_v2/types/LeaseInitParams.ts +0 -103
- package/src/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/LeaseWithdrawParams.ts +0 -73
- package/src/@codegen/switchboard_v2/types/OracleHeartbeatParams.ts +0 -54
- package/src/@codegen/switchboard_v2/types/OracleInitParams.ts +0 -102
- package/src/@codegen/switchboard_v2/types/OracleMetrics.ts +0 -131
- package/src/@codegen/switchboard_v2/types/OracleQueueInitParams.ts +0 -185
- package/src/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.ts +0 -190
- package/src/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.ts +0 -56
- package/src/@codegen/switchboard_v2/types/OracleResponseType.ts +0 -151
- package/src/@codegen/switchboard_v2/types/OracleWithdrawParams.ts +0 -73
- package/src/@codegen/switchboard_v2/types/PermissionInitParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/PermissionSetParams.ts +0 -65
- package/src/@codegen/switchboard_v2/types/ProgramConfigParams.ts +0 -73
- package/src/@codegen/switchboard_v2/types/ProgramInitParams.ts +0 -54
- package/src/@codegen/switchboard_v2/types/ProjectivePointZC.ts +0 -77
- package/src/@codegen/switchboard_v2/types/Scalar.ts +0 -54
- package/src/@codegen/switchboard_v2/types/SlidingWindowElement.ts +0 -86
- package/src/@codegen/switchboard_v2/types/SwitchboardDecimal.ts +0 -62
- package/src/@codegen/switchboard_v2/types/SwitchboardPermission.ts +0 -121
- package/src/@codegen/switchboard_v2/types/VaultTransferParams.ts +0 -62
- package/src/@codegen/switchboard_v2/types/VrfBuilder.ts +0 -404
- package/src/@codegen/switchboard_v2/types/VrfCloseParams.ts +0 -65
- package/src/@codegen/switchboard_v2/types/VrfInitParams.ts +0 -65
- package/src/@codegen/switchboard_v2/types/VrfLiteCloseParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/VrfLiteInitParams.ts +0 -81
- package/src/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.ts +0 -96
- package/src/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.ts +0 -63
- package/src/@codegen/switchboard_v2/types/VrfPoolAddParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/VrfPoolInitParams.ts +0 -73
- package/src/@codegen/switchboard_v2/types/VrfPoolRemoveParams.ts +0 -38
- package/src/@codegen/switchboard_v2/types/VrfPoolRequestParams.ts +0 -61
- package/src/@codegen/switchboard_v2/types/VrfPoolRow.ts +0 -65
- package/src/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.ts +0 -112
- package/src/@codegen/switchboard_v2/types/VrfProveParams.ts +0 -70
- package/src/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.ts +0 -67
- package/src/@codegen/switchboard_v2/types/VrfRound.ts +0 -113
- package/src/@codegen/switchboard_v2/types/VrfSetCallbackParams.ts +0 -54
- package/src/@codegen/switchboard_v2/types/VrfStatus.ts +0 -209
- package/src/@codegen/switchboard_v2/types/index.ts +0 -495
- package/src/@codegen/switchboard_v2/utils/borshAddress.ts +0 -43
- package/src/@codegen/switchboard_v2/utils/index.ts +0 -1
- package/src/client/client.ts +0 -345
- package/src/client/commands/borrow.ts +0 -28
- package/src/client/commands/deposit.ts +0 -28
- package/src/client/commands/initFarmsForReserve.ts +0 -71
- package/src/client/commands/printAllReserveAccounts.ts +0 -18
- package/src/client/commands/printReserve.ts +0 -13
- package/src/client/commands/repay.ts +0 -29
- package/src/client/commands/withdraw.ts +0 -28
- package/src/client/services/market.ts +0 -23
- package/src/client/services/userMetadata.ts +0 -25
- package/src/client/tx/CliConnectionPool.ts +0 -55
- package/src/client/tx/CliEnv.ts +0 -149
- package/src/client/tx/keypair.ts +0 -29
- package/src/client/tx/multisig.ts +0 -47
- package/src/client/tx/priorityFee.ts +0 -34
- package/src/client/tx/processor.ts +0 -31
- package/src/client/tx/rpc.ts +0 -152
- package/src/client/tx/simulate.ts +0 -73
- package/src/client/tx/tx.ts +0 -184
- package/src/client/utils/modifiers.ts +0 -6
- package/src/idl/pyth_rec.json +0 -574
- package/src/idl/switchboard_v2.json +0 -6943
- package/src/manager/client_kamino_manager.ts +0 -2144
- package/src/manager/tx/ManagerConnectionPool.ts +0 -55
- package/src/manager/tx/ManagerEnv.ts +0 -211
- package/src/manager/tx/keypair.ts +0 -29
- package/src/manager/tx/multisig.ts +0 -47
- package/src/manager/tx/priorityFee.ts +0 -34
- package/src/manager/tx/processor.ts +0 -29
- package/src/manager/tx/rpc.ts +0 -152
- package/src/manager/tx/simulate.ts +0 -73
- package/src/manager/tx/tx.ts +0 -183
- package/src/manager/utils/consts.ts +0 -3
- package/src/manager/utils/modifiers.ts +0 -6
- package/src/utils/bigint.ts +0 -3
- package/src/utils/compat.ts +0 -17
- package/src/utils/consts.ts +0 -5
- package/src/utils/option.ts +0 -9
- package/src/utils/signer.ts +0 -26
- package/src/utils/switchboard.ts +0 -23
- /package/dist/{idl/klend.json → idl.json} +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/accounts/index.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/accounts/index.js +0 -0
- /package/dist/{@codegen/jupiter_perps → idl_codegen}/errors/anchor.d.ts +0 -0
- /package/dist/{@codegen/jupiter_perps → idl_codegen}/errors/anchor.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/errors/custom.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/errors/custom.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/instructions/index.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/instructions/index.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/AssetTier.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/AssetTier.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/BigFractionBytes.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/BorrowRateCurve.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/CurvePoint.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/FeeCalculation.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/FeeCalculation.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/InitObligationArgs.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/LastUpdate.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ObligationOrder.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/PriceHeuristic.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveConfig.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveFarmKind.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveFarmKind.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveFees.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveStatus.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/ReserveStatus.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/TokenInfo.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateConfigMode.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateConfigMode.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateGlobalConfigMode.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateGlobalConfigMode.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateLendingMarketMode.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/UpdateLendingMarketMode.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/WithdrawalCaps.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/index.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/types/index.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/zero_padding/index.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen}/zero_padding/index.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/accounts/index.d.ts +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/accounts/index.js +0 -0
- /package/dist/{@codegen/klend → idl_codegen_kamino_vault}/errors/anchor.d.ts +0 -0
- /package/dist/{@codegen/klend → idl_codegen_kamino_vault}/errors/anchor.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/errors/custom.d.ts +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/errors/custom.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/instructions/index.d.ts +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/instructions/index.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/BigFractionBytes.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/BorrowRateCurve.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/CurvePoint.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/LastUpdate.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/PriceHeuristic.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/ReserveConfig.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/ReserveFees.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/TokenInfo.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/VaultConfigField.d.ts +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/VaultConfigField.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/WithdrawalCaps.js +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/index.d.ts +0 -0
- /package/dist/{@codegen/kvault → idl_codegen_kamino_vault}/types/index.js +0 -0
- /package/src/{idl/klend.json → idl.json} +0 -0
- /package/src/{@codegen/klend → idl_codegen}/accounts/index.ts +0 -0
- /package/src/{@codegen/jupiter_perps → idl_codegen}/errors/anchor.ts +0 -0
- /package/src/{@codegen/klend → idl_codegen}/errors/custom.ts +0 -0
- /package/src/{@codegen/klend → idl_codegen}/instructions/index.ts +0 -0
- /package/src/{@codegen/klend → idl_codegen}/types/index.ts +0 -0
- /package/src/{@codegen/klend → idl_codegen}/zero_padding/index.ts +0 -0
- /package/src/{@codegen/kvault → idl_codegen_kamino_vault}/accounts/index.ts +0 -0
- /package/src/{@codegen/klend → idl_codegen_kamino_vault}/errors/anchor.ts +0 -0
- /package/src/{@codegen/kvault → idl_codegen_kamino_vault}/errors/custom.ts +0 -0
- /package/src/{@codegen/kvault → idl_codegen_kamino_vault}/instructions/index.ts +0 -0
- /package/src/{@codegen/kvault → idl_codegen_kamino_vault}/types/index.ts +0 -0
- /package/src/{idl/kvault.json → idl_kamino_vault.json} +0 -0
- /package/src/{idl/jupiter_perps.json → jupiter_perps_idl.json} +0 -0
package/dist/classes/action.js
CHANGED
|
@@ -4,21 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.KaminoAction = void 0;
|
|
7
|
-
const
|
|
7
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
8
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
8
9
|
const bn_js_1 = __importDefault(require("bn.js"));
|
|
9
10
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
10
|
-
const instructions_1 = require("
|
|
11
|
+
const instructions_1 = require("../idl_codegen/instructions");
|
|
11
12
|
const utils_1 = require("../utils");
|
|
12
13
|
const market_1 = require("./market");
|
|
13
14
|
const obligation_1 = require("./obligation");
|
|
14
|
-
const types_1 = require("
|
|
15
|
-
const
|
|
15
|
+
const types_1 = require("../idl_codegen/types");
|
|
16
|
+
const farms_sdk_1 = require("@kamino-finance/farms-sdk");
|
|
16
17
|
const ObligationType_1 = require("../utils/ObligationType");
|
|
17
|
-
const
|
|
18
|
-
const sysvars_1 = require("@solana/sysvars");
|
|
19
|
-
const token_2022_1 = require("@solana-program/token-2022");
|
|
20
|
-
const system_1 = require("@solana-program/system");
|
|
21
|
-
const signer_1 = require("../utils/signer");
|
|
18
|
+
const lib_1 = require("../lib");
|
|
22
19
|
class KaminoAction {
|
|
23
20
|
kaminoMarket;
|
|
24
21
|
reserve;
|
|
@@ -52,7 +49,7 @@ class KaminoAction {
|
|
|
52
49
|
borrowReserves;
|
|
53
50
|
preLoadedDepositReservesSameTx;
|
|
54
51
|
currentSlot;
|
|
55
|
-
constructor(kaminoMarket, owner, obligation, mint, positions, amount, depositReserves, borrowReserves, reserveState, currentSlot, secondaryMint, outflowReserveState, outflowAmount, referrer
|
|
52
|
+
constructor(kaminoMarket, owner, obligation, mint, positions, amount, depositReserves, borrowReserves, reserveState, currentSlot, secondaryMint, outflowReserveState, outflowAmount, referrer, payer) {
|
|
56
53
|
this.kaminoMarket = kaminoMarket;
|
|
57
54
|
this.obligation = obligation;
|
|
58
55
|
this.owner = owner;
|
|
@@ -79,23 +76,21 @@ class KaminoAction {
|
|
|
79
76
|
this.outflowReserve = outflowReserveState;
|
|
80
77
|
this.outflowAmount = outflowAmount ? new bn_js_1.default(outflowAmount) : undefined;
|
|
81
78
|
this.preLoadedDepositReservesSameTx = [];
|
|
82
|
-
this.referrer = referrer;
|
|
79
|
+
this.referrer = referrer ? referrer : web3_js_1.PublicKey.default;
|
|
83
80
|
this.currentSlot = currentSlot;
|
|
84
81
|
}
|
|
85
|
-
static async initialize(action, amount, mint, owner, kaminoMarket, obligation, referrer =
|
|
82
|
+
static async initialize(action, amount, mint, owner, kaminoMarket, obligation, referrer = web3_js_1.PublicKey.default, currentSlot = 0, payer) {
|
|
86
83
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
87
84
|
if (reserve === undefined) {
|
|
88
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
85
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress().toBase58()}`);
|
|
89
86
|
}
|
|
90
|
-
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, owner
|
|
91
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket, owner
|
|
87
|
+
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, owner, reserve.address, obligation);
|
|
88
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer);
|
|
92
89
|
return new KaminoAction(kaminoMarket, owner, kaminoObligation || obligation, mint, distinctReserveCount, amount, depositReserves, borrowReserves, reserve, currentSlot, undefined, undefined, undefined, referrerKey, payer);
|
|
93
90
|
}
|
|
94
|
-
static
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
(0, utils_1.getAssociatedTokenAddress)(reserve.collateral.mintPubkey, owner, token_1.TOKEN_PROGRAM_ADDRESS, token_1.ASSOCIATED_TOKEN_PROGRAM_ADDRESS),
|
|
98
|
-
]);
|
|
91
|
+
static getUserAccountAddresses(owner, reserve) {
|
|
92
|
+
const userTokenAccountAddress = (0, utils_1.getAssociatedTokenAddress)(reserve.liquidity.mintPubkey, owner, true, reserve.liquidity.tokenProgram, spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID);
|
|
93
|
+
const userCollateralAccountAddress = (0, utils_1.getAssociatedTokenAddress)(reserve.collateral.mintPubkey, owner, true, spl_token_1.TOKEN_PROGRAM_ID, spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID);
|
|
99
94
|
return { userTokenAccountAddress, userCollateralAccountAddress };
|
|
100
95
|
}
|
|
101
96
|
static async loadObligation(action, kaminoMarket, owner, reserve, obligation, outflowReserve) {
|
|
@@ -106,7 +101,7 @@ class KaminoAction {
|
|
|
106
101
|
kaminoObligation = obligation;
|
|
107
102
|
}
|
|
108
103
|
else {
|
|
109
|
-
const obligationAddress =
|
|
104
|
+
const obligationAddress = obligation.toPda(kaminoMarket.getAddress(), owner);
|
|
110
105
|
kaminoObligation = await obligation_1.KaminoObligation.load(kaminoMarket, obligationAddress);
|
|
111
106
|
}
|
|
112
107
|
if (kaminoObligation !== null) {
|
|
@@ -117,16 +112,16 @@ class KaminoAction {
|
|
|
117
112
|
throw new Error(`Outflow reserve has not been set for depositAndBorrow`);
|
|
118
113
|
}
|
|
119
114
|
// Union of addresses
|
|
120
|
-
const distinctReserveCount = new
|
|
115
|
+
const distinctReserveCount = new utils_1.PublicKeySet([
|
|
121
116
|
...borrowReserves.map((e) => e),
|
|
122
117
|
...(action === 'borrow' ? [reserve] : []),
|
|
123
118
|
...(action === 'depositAndBorrow' ? [reserve] : []),
|
|
124
|
-
]).
|
|
125
|
-
new
|
|
119
|
+
]).toArray().length +
|
|
120
|
+
new utils_1.PublicKeySet([
|
|
126
121
|
...depositReserves.map((e) => e),
|
|
127
122
|
...(action === 'deposit' ? [reserve] : []),
|
|
128
123
|
...(action === 'depositAndBorrow' ? [outflowReserve] : []),
|
|
129
|
-
]).
|
|
124
|
+
]).toArray().length;
|
|
130
125
|
return {
|
|
131
126
|
kaminoObligation,
|
|
132
127
|
depositReserves,
|
|
@@ -135,34 +130,33 @@ class KaminoAction {
|
|
|
135
130
|
};
|
|
136
131
|
}
|
|
137
132
|
static async buildRefreshObligationTxns(kaminoMarket, payer, obligation, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
138
|
-
currentSlot =
|
|
133
|
+
currentSlot = 0) {
|
|
139
134
|
// placeholder for action initialization
|
|
140
135
|
const firstReserve = obligation.getDeposits()[0].reserveAddress;
|
|
141
136
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
142
137
|
if (!firstKaminoReserve) {
|
|
143
|
-
throw new Error(`Reserve ${firstReserve} not found`);
|
|
138
|
+
throw new Error(`Reserve ${firstReserve.toBase58()} not found`);
|
|
144
139
|
}
|
|
145
|
-
const axn = await KaminoAction.initialize('refreshObligation', '0', firstKaminoReserve?.getLiquidityMint(),
|
|
146
|
-
kaminoMarket, obligation, undefined, currentSlot);
|
|
140
|
+
const axn = await KaminoAction.initialize('refreshObligation', '0', firstKaminoReserve?.getLiquidityMint(), obligation.state.owner, kaminoMarket, obligation, undefined, currentSlot);
|
|
147
141
|
if (extraComputeBudget > 0) {
|
|
148
142
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
149
143
|
}
|
|
150
|
-
|
|
144
|
+
axn.addRefreshObligation(payer);
|
|
151
145
|
return axn;
|
|
152
146
|
}
|
|
153
|
-
static async buildRequestElevationGroupTxns(kaminoMarket,
|
|
154
|
-
currentSlot =
|
|
155
|
-
const firstReserve = obligation.state.deposits.find((x) => x.depositReserve
|
|
147
|
+
static async buildRequestElevationGroupTxns(kaminoMarket, payer, obligation, elevationGroup, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
148
|
+
currentSlot = 0) {
|
|
149
|
+
const firstReserve = obligation.state.deposits.find((x) => !x.depositReserve.equals(web3_js_1.PublicKey.default)).depositReserve;
|
|
156
150
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
157
151
|
if (!firstKaminoReserve) {
|
|
158
|
-
throw new Error(`Reserve ${firstReserve} not found`);
|
|
152
|
+
throw new Error(`Reserve ${firstReserve.toBase58()} not found`);
|
|
159
153
|
}
|
|
160
|
-
const axn = await KaminoAction.initialize('requestElevationGroup', '0', firstKaminoReserve?.getLiquidityMint(), owner, kaminoMarket, obligation, undefined, currentSlot);
|
|
154
|
+
const axn = await KaminoAction.initialize('requestElevationGroup', '0', firstKaminoReserve?.getLiquidityMint(), obligation.state.owner, kaminoMarket, obligation, undefined, currentSlot);
|
|
161
155
|
if (extraComputeBudget > 0) {
|
|
162
156
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
163
157
|
}
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
axn.addRefreshObligation(payer);
|
|
159
|
+
axn.addRequestElevationIx(elevationGroup, 'setup');
|
|
166
160
|
return axn;
|
|
167
161
|
}
|
|
168
162
|
static async buildDepositTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -171,7 +165,7 @@ class KaminoAction {
|
|
|
171
165
|
initUserMetadata = {
|
|
172
166
|
skipInitialization: false,
|
|
173
167
|
skipLutCreation: false,
|
|
174
|
-
}, referrer =
|
|
168
|
+
}, referrer = web3_js_1.PublicKey.default, currentSlot = 0, overrideElevationGroupRequest = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
175
169
|
) {
|
|
176
170
|
const axn = await KaminoAction.initialize('deposit', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
177
171
|
const addInitObligationForFarm = true;
|
|
@@ -180,10 +174,10 @@ class KaminoAction {
|
|
|
180
174
|
}
|
|
181
175
|
await axn.addSupportIxs('deposit', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, undefined, overrideElevationGroupRequest);
|
|
182
176
|
if (useV2Ixs) {
|
|
183
|
-
|
|
177
|
+
axn.addDepositIxV2();
|
|
184
178
|
}
|
|
185
179
|
else {
|
|
186
|
-
|
|
180
|
+
axn.addDepositIx();
|
|
187
181
|
}
|
|
188
182
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
189
183
|
return axn;
|
|
@@ -199,53 +193,53 @@ class KaminoAction {
|
|
|
199
193
|
requestElevationGroup = false, initUserMetadata = {
|
|
200
194
|
skipInitialization: false,
|
|
201
195
|
skipLutCreation: false,
|
|
202
|
-
}, referrer =
|
|
196
|
+
}, referrer = web3_js_1.PublicKey.default, currentSlot = 0, overrideElevationGroupRequest = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
203
197
|
) {
|
|
204
198
|
const axn = await KaminoAction.initialize('borrow', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
205
199
|
const addInitObligationForFarm = true;
|
|
206
200
|
if (extraComputeBudget > 0) {
|
|
207
201
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
208
202
|
}
|
|
209
|
-
if (
|
|
210
|
-
const referrerTokenState =
|
|
211
|
-
const account = await
|
|
212
|
-
if (!account
|
|
203
|
+
if (!axn.referrer.equals(web3_js_1.PublicKey.default)) {
|
|
204
|
+
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.reserve.address, axn.kaminoMarket.programId)[0];
|
|
205
|
+
const account = await axn.kaminoMarket.getConnection().getAccountInfo(referrerTokenState);
|
|
206
|
+
if (!account) {
|
|
213
207
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
214
208
|
}
|
|
215
209
|
}
|
|
216
210
|
await axn.addSupportIxs('borrow', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, undefined, overrideElevationGroupRequest);
|
|
217
211
|
if (useV2Ixs) {
|
|
218
|
-
|
|
212
|
+
axn.addBorrowIxV2();
|
|
219
213
|
}
|
|
220
214
|
else {
|
|
221
|
-
|
|
215
|
+
axn.addBorrowIx();
|
|
222
216
|
}
|
|
223
217
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
224
218
|
return axn;
|
|
225
219
|
}
|
|
226
220
|
static async buildDepositReserveLiquidityTxns(kaminoMarket, amount, mint, owner, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
227
221
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas
|
|
228
|
-
requestElevationGroup = false, referrer =
|
|
222
|
+
requestElevationGroup = false, referrer = web3_js_1.PublicKey.default, currentSlot = 0) {
|
|
229
223
|
const axn = await KaminoAction.initialize('mint', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
230
224
|
const addInitObligationForFarm = true;
|
|
231
225
|
if (extraComputeBudget > 0) {
|
|
232
226
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
233
227
|
}
|
|
234
228
|
await axn.addSupportIxs('mint', includeAtaIxs, requestElevationGroup, false, addInitObligationForFarm, scopeRefreshConfig, { skipInitialization: true, skipLutCreation: true });
|
|
235
|
-
|
|
229
|
+
axn.addDepositReserveLiquidityIx();
|
|
236
230
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
237
231
|
return axn;
|
|
238
232
|
}
|
|
239
233
|
static async buildRedeemReserveCollateralTxns(kaminoMarket, amount, mint, owner, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
240
234
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas
|
|
241
|
-
requestElevationGroup = false, referrer =
|
|
235
|
+
requestElevationGroup = false, referrer = web3_js_1.PublicKey.default, currentSlot = 0) {
|
|
242
236
|
const axn = await KaminoAction.initialize('redeem', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
243
237
|
const addInitObligationForFarm = true;
|
|
244
238
|
if (extraComputeBudget > 0) {
|
|
245
239
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
246
240
|
}
|
|
247
241
|
await axn.addSupportIxs('redeem', includeAtaIxs, requestElevationGroup, false, addInitObligationForFarm, scopeRefreshConfig, { skipInitialization: true, skipLutCreation: true });
|
|
248
|
-
|
|
242
|
+
axn.addRedeemReserveCollateralIx();
|
|
249
243
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
250
244
|
return axn;
|
|
251
245
|
}
|
|
@@ -254,7 +248,7 @@ class KaminoAction {
|
|
|
254
248
|
requestElevationGroup = false, initUserMetadata = {
|
|
255
249
|
skipInitialization: false,
|
|
256
250
|
skipLutCreation: false,
|
|
257
|
-
}, referrer =
|
|
251
|
+
}, referrer = web3_js_1.PublicKey.default, currentSlot = 0) {
|
|
258
252
|
const axn = await KaminoAction.initialize('depositCollateral', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
259
253
|
const addInitObligationForFarm = true;
|
|
260
254
|
if (extraComputeBudget > 0) {
|
|
@@ -262,31 +256,31 @@ class KaminoAction {
|
|
|
262
256
|
}
|
|
263
257
|
await axn.addSupportIxs('depositCollateral', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata);
|
|
264
258
|
if (useV2Ixs) {
|
|
265
|
-
|
|
259
|
+
axn.addDepositObligationCollateralIxV2();
|
|
266
260
|
}
|
|
267
261
|
else {
|
|
268
|
-
|
|
262
|
+
axn.addDepositObligationCollateralIx();
|
|
269
263
|
}
|
|
270
264
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
271
265
|
return axn;
|
|
272
266
|
}
|
|
273
|
-
static async buildDepositAndBorrowTxns(kaminoMarket, depositAmount, depositMint, borrowAmount, borrowMint,
|
|
267
|
+
static async buildDepositAndBorrowTxns(kaminoMarket, depositAmount, depositMint, borrowAmount, borrowMint, payer, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
274
268
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas,
|
|
275
269
|
requestElevationGroup = false, initUserMetadata = {
|
|
276
270
|
skipInitialization: false,
|
|
277
271
|
skipLutCreation: false,
|
|
278
|
-
}, referrer =
|
|
279
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndBorrow', depositAmount, depositMint, borrowMint,
|
|
272
|
+
}, referrer = web3_js_1.PublicKey.default, currentSlot = 0) {
|
|
273
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndBorrow', depositAmount, depositMint, borrowMint, payer, payer, obligation, borrowAmount, referrer, currentSlot);
|
|
280
274
|
const addInitObligationForFarmForDeposit = true;
|
|
281
275
|
const addInitObligationForFarmForBorrow = false;
|
|
282
276
|
const twoTokenAction = true;
|
|
283
277
|
if (extraComputeBudget > 0) {
|
|
284
278
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
285
279
|
}
|
|
286
|
-
if (
|
|
287
|
-
const referrerTokenState =
|
|
288
|
-
const account = await
|
|
289
|
-
if (!account
|
|
280
|
+
if (!axn.referrer.equals(web3_js_1.PublicKey.default)) {
|
|
281
|
+
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.outflowReserve.address, axn.kaminoMarket.programId)[0];
|
|
282
|
+
const account = await axn.kaminoMarket.getConnection().getAccountInfo(referrerTokenState);
|
|
283
|
+
if (!account) {
|
|
290
284
|
axn.addInitReferrerTokenStateIx(axn.outflowReserve, referrerTokenState);
|
|
291
285
|
}
|
|
292
286
|
}
|
|
@@ -299,29 +293,27 @@ class KaminoAction {
|
|
|
299
293
|
}
|
|
300
294
|
await axn.addInBetweenIxs('depositAndBorrow', includeAtaIxs, requestElevationGroup, addInitObligationForFarmForBorrow, useV2Ixs);
|
|
301
295
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
302
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
303
|
-
const allReserves = [
|
|
304
|
-
...
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
]),
|
|
311
|
-
];
|
|
296
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the txn
|
|
297
|
+
const allReserves = new utils_1.PublicKeySet([
|
|
298
|
+
...axn.depositReserves,
|
|
299
|
+
...axn.borrowReserves,
|
|
300
|
+
axn.reserve.address,
|
|
301
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
302
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
303
|
+
]).toArray();
|
|
312
304
|
const tokenIds = (0, market_1.getTokenIdsForScopeRefresh)(axn.kaminoMarket, allReserves);
|
|
313
305
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
314
306
|
await axn.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, scopeRefreshConfig.scopeFeed);
|
|
315
307
|
}
|
|
316
308
|
return axn;
|
|
317
309
|
}
|
|
318
|
-
static async buildDepositAndWithdrawV2Txns(kaminoMarket, depositAmount, depositMint, withdrawAmount, withdrawMint,
|
|
310
|
+
static async buildDepositAndWithdrawV2Txns(kaminoMarket, depositAmount, depositMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
319
311
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas,
|
|
320
312
|
requestElevationGroup = false, initUserMetadata = {
|
|
321
313
|
skipInitialization: false,
|
|
322
314
|
skipLutCreation: false,
|
|
323
|
-
}, referrer =
|
|
324
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndWithdraw', depositAmount, depositMint, withdrawMint,
|
|
315
|
+
}, referrer = web3_js_1.PublicKey.default) {
|
|
316
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndWithdraw', depositAmount, depositMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
325
317
|
const addInitObligationForFarm = true;
|
|
326
318
|
const twoTokenAction = true;
|
|
327
319
|
if (extraComputeBudget > 0) {
|
|
@@ -329,7 +321,7 @@ class KaminoAction {
|
|
|
329
321
|
}
|
|
330
322
|
await axn.addSupportIxs('depositAndWithdraw', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, true, scopeRefreshConfig, initUserMetadata, twoTokenAction);
|
|
331
323
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve, axn.outflowAmount);
|
|
332
|
-
|
|
324
|
+
axn.addDepositAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
333
325
|
return axn;
|
|
334
326
|
}
|
|
335
327
|
static async buildRepayAndWithdrawV2Txns(kaminoMarket, repayAmount, repayMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -337,8 +329,8 @@ class KaminoAction {
|
|
|
337
329
|
requestElevationGroup = false, initUserMetadata = {
|
|
338
330
|
skipInitialization: false,
|
|
339
331
|
skipLutCreation: false,
|
|
340
|
-
}, referrer =
|
|
341
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdrawV2', repayAmount, repayMint, withdrawMint, payer, payer
|
|
332
|
+
}, referrer = web3_js_1.PublicKey.default) {
|
|
333
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdrawV2', repayAmount, repayMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
342
334
|
const addInitObligationForFarm = true;
|
|
343
335
|
const twoTokenAction = true;
|
|
344
336
|
if (extraComputeBudget > 0) {
|
|
@@ -346,7 +338,7 @@ class KaminoAction {
|
|
|
346
338
|
}
|
|
347
339
|
await axn.addSupportIxs('repayAndWithdrawV2', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, true, scopeRefreshConfig, initUserMetadata, twoTokenAction);
|
|
348
340
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve, axn.outflowAmount);
|
|
349
|
-
|
|
341
|
+
axn.addRepayAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
350
342
|
return axn;
|
|
351
343
|
}
|
|
352
344
|
static async buildRepayAndWithdrawTxns(kaminoMarket, repayAmount, repayMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -354,8 +346,8 @@ class KaminoAction {
|
|
|
354
346
|
requestElevationGroup = false, initUserMetadata = {
|
|
355
347
|
skipInitialization: false,
|
|
356
348
|
skipLutCreation: false,
|
|
357
|
-
}, referrer =
|
|
358
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdraw', repayAmount, repayMint, withdrawMint, payer, payer
|
|
349
|
+
}, referrer = web3_js_1.PublicKey.default) {
|
|
350
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdraw', repayAmount, repayMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
359
351
|
const addInitObligationForFarmForRepay = true;
|
|
360
352
|
const addInitObligationForFarmForWithdraw = false;
|
|
361
353
|
const twoTokenAction = true;
|
|
@@ -372,16 +364,14 @@ class KaminoAction {
|
|
|
372
364
|
}
|
|
373
365
|
await axn.addInBetweenIxs('repayAndWithdraw', includeAtaIxs, requestElevationGroup, addInitObligationForFarmForWithdraw, useV2Ixs);
|
|
374
366
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
375
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
376
|
-
const allReserves = [
|
|
377
|
-
...
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
]),
|
|
384
|
-
];
|
|
367
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the txn
|
|
368
|
+
const allReserves = new utils_1.PublicKeySet([
|
|
369
|
+
...axn.depositReserves,
|
|
370
|
+
...axn.borrowReserves,
|
|
371
|
+
axn.reserve.address,
|
|
372
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
373
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
374
|
+
]).toArray();
|
|
385
375
|
const tokenIds = (0, market_1.getTokenIdsForScopeRefresh)(axn.kaminoMarket, allReserves);
|
|
386
376
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
387
377
|
await axn.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, scopeRefreshConfig.scopeFeed);
|
|
@@ -394,7 +384,7 @@ class KaminoAction {
|
|
|
394
384
|
initUserMetadata = {
|
|
395
385
|
skipInitialization: false,
|
|
396
386
|
skipLutCreation: false,
|
|
397
|
-
}, referrer =
|
|
387
|
+
}, referrer = web3_js_1.PublicKey.default, currentSlot = 0, overrideElevationGroupRequest,
|
|
398
388
|
// Optional customizations which may be needed if the obligation was mutated by some previous ix.
|
|
399
389
|
obligationCustomizations) {
|
|
400
390
|
const axn = await KaminoAction.initialize('withdraw', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
@@ -421,20 +411,18 @@ class KaminoAction {
|
|
|
421
411
|
* @param mint
|
|
422
412
|
* @param owner
|
|
423
413
|
* @param obligation - obligation to repay or the PDA seeds
|
|
424
|
-
* @param useV2Ixs
|
|
425
|
-
* @param scopeRefreshConfig
|
|
426
414
|
* @param currentSlot
|
|
427
415
|
* @param payer - if not set then owner is used
|
|
428
416
|
* @param extraComputeBudget - if > 0 then adds the ix
|
|
429
417
|
* @param includeAtaIxs - if true it includes create and close wsol and token atas
|
|
430
418
|
* @param requestElevationGroup
|
|
431
|
-
* @param
|
|
419
|
+
* @param includeUserMetadata - if true it includes user metadata
|
|
432
420
|
* @param referrer
|
|
433
421
|
*/
|
|
434
|
-
static async buildRepayTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, currentSlot, payer =
|
|
422
|
+
static async buildRepayTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, currentSlot, payer = undefined, extraComputeBudget = 1_000_000, includeAtaIxs = true, requestElevationGroup = false, initUserMetadata = {
|
|
435
423
|
skipInitialization: false,
|
|
436
424
|
skipLutCreation: false,
|
|
437
|
-
}, referrer =
|
|
425
|
+
}, referrer = web3_js_1.PublicKey.default) {
|
|
438
426
|
const axn = await KaminoAction.initialize('repay', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot, payer);
|
|
439
427
|
const addInitObligationForFarm = true;
|
|
440
428
|
if (extraComputeBudget > 0) {
|
|
@@ -455,7 +443,7 @@ class KaminoAction {
|
|
|
455
443
|
requestElevationGroup = false, initUserMetadata = {
|
|
456
444
|
skipInitialization: false,
|
|
457
445
|
skipLutCreation: false,
|
|
458
|
-
}, referrer =
|
|
446
|
+
}, referrer = web3_js_1.PublicKey.default, maxAllowedLtvOverridePercent = 0, currentSlot = 0) {
|
|
459
447
|
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'liquidate', amount, repayTokenMint, withdrawTokenMint, liquidator, obligationOwner, obligation, minCollateralReceiveAmount, referrer, currentSlot);
|
|
460
448
|
const addInitObligationForFarm = true;
|
|
461
449
|
if (extraComputeBudget > 0) {
|
|
@@ -471,19 +459,19 @@ class KaminoAction {
|
|
|
471
459
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
472
460
|
return axn;
|
|
473
461
|
}
|
|
474
|
-
static async buildWithdrawReferrerFeeTxns(owner, tokenMint, kaminoMarket, currentSlot =
|
|
462
|
+
static async buildWithdrawReferrerFeeTxns(owner, tokenMint, kaminoMarket, currentSlot = 0) {
|
|
475
463
|
const { axn, createAtaIxs } = await KaminoAction.initializeWithdrawReferrerFees(tokenMint, owner, kaminoMarket, currentSlot);
|
|
476
464
|
axn.setupIxs.push(...createAtaIxs);
|
|
477
465
|
axn.setupIxsLabels.push(`createAtasIxs[${axn.owner.toString()}]`);
|
|
478
|
-
if (
|
|
479
|
-
const referrerTokenState =
|
|
480
|
-
const account = await
|
|
481
|
-
if (!account
|
|
466
|
+
if (!axn.referrer.equals(web3_js_1.PublicKey.default)) {
|
|
467
|
+
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.reserve.address, axn.kaminoMarket.programId)[0];
|
|
468
|
+
const account = await axn.kaminoMarket.getConnection().getAccountInfo(referrerTokenState);
|
|
469
|
+
if (!account) {
|
|
482
470
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
483
471
|
}
|
|
484
472
|
}
|
|
485
473
|
axn.addRefreshReserveIxs([axn.reserve.address]);
|
|
486
|
-
|
|
474
|
+
axn.addWithdrawReferrerFeesIxs();
|
|
487
475
|
return axn;
|
|
488
476
|
}
|
|
489
477
|
/**
|
|
@@ -492,207 +480,263 @@ class KaminoAction {
|
|
|
492
480
|
* In other words: it will overwrite the given slot in the {@link Obligation.orders} array. This possibly includes
|
|
493
481
|
* setting the `null` state (i.e. cancelling the order).
|
|
494
482
|
*/
|
|
495
|
-
static buildSetObligationOrderIxn(
|
|
483
|
+
static buildSetObligationOrderIxn(kaminoMarket, obligation, orderAtIndex) {
|
|
496
484
|
return (0, instructions_1.setObligationOrder)({
|
|
497
485
|
index: orderAtIndex.index,
|
|
498
486
|
order: orderAtIndex.orderState(),
|
|
499
487
|
}, {
|
|
500
488
|
lendingMarket: kaminoMarket.getAddress(),
|
|
501
489
|
obligation: obligation.obligationAddress,
|
|
502
|
-
owner,
|
|
490
|
+
owner: obligation.state.owner,
|
|
503
491
|
}, kaminoMarket.programId);
|
|
504
492
|
}
|
|
505
|
-
async
|
|
493
|
+
async getTransactions() {
|
|
494
|
+
let txns;
|
|
495
|
+
if (this.lendingIxs.length === 2) {
|
|
496
|
+
txns = new web3_js_1.Transaction({
|
|
497
|
+
feePayer: this.owner,
|
|
498
|
+
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
499
|
+
}).add(...this.setupIxs, ...[this.lendingIxs[0]], ...this.inBetweenIxs, ...[this.lendingIxs[1]], ...this.cleanupIxs);
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
txns = new web3_js_1.Transaction({
|
|
503
|
+
feePayer: this.owner,
|
|
504
|
+
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
505
|
+
}).add(...this.setupIxs, ...this.lendingIxs, ...this.cleanupIxs);
|
|
506
|
+
}
|
|
507
|
+
return txns;
|
|
508
|
+
}
|
|
509
|
+
async sendTransactions(sendTransaction) {
|
|
510
|
+
const txns = await this.getTransactions();
|
|
511
|
+
const signature = await this.sendSingleTransaction(txns, sendTransaction);
|
|
512
|
+
return signature;
|
|
513
|
+
}
|
|
514
|
+
async sendSingleTransaction(txn, sendTransaction) {
|
|
515
|
+
if (!txn)
|
|
516
|
+
return '';
|
|
517
|
+
const signature = await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
518
|
+
await this.kaminoMarket.getConnection().confirmTransaction(signature);
|
|
519
|
+
return signature;
|
|
520
|
+
}
|
|
521
|
+
async simulateTransactions(sendTransaction) {
|
|
522
|
+
const txns = await this.getTransactions();
|
|
523
|
+
const signature = await this.simulateSingleTransaction(txns, sendTransaction);
|
|
524
|
+
return signature;
|
|
525
|
+
}
|
|
526
|
+
async simulateSingleTransaction(txn, sendTransaction) {
|
|
527
|
+
if (!txn)
|
|
528
|
+
return '';
|
|
529
|
+
return await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
530
|
+
}
|
|
531
|
+
addDepositReserveLiquidityIx() {
|
|
506
532
|
this.lendingIxsLabels.push(`depositReserveLiquidity`);
|
|
507
533
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidity)({
|
|
508
534
|
liquidityAmount: this.amount,
|
|
509
535
|
}, {
|
|
510
536
|
owner: this.owner,
|
|
511
537
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
512
|
-
lendingMarketAuthority:
|
|
538
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
513
539
|
reserve: this.reserve.address,
|
|
514
540
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
515
541
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
516
542
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
517
|
-
userSourceLiquidity:
|
|
518
|
-
userDestinationCollateral:
|
|
519
|
-
collateralTokenProgram:
|
|
543
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
544
|
+
userDestinationCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
545
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
520
546
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
521
|
-
instructionSysvarAccount:
|
|
547
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
522
548
|
}, this.kaminoMarket.programId));
|
|
523
549
|
}
|
|
524
|
-
|
|
550
|
+
addRedeemReserveCollateralIx() {
|
|
525
551
|
this.lendingIxsLabels.push(`redeemReserveCollateral`);
|
|
526
552
|
this.lendingIxs.push((0, instructions_1.redeemReserveCollateral)({
|
|
527
553
|
collateralAmount: this.amount,
|
|
528
554
|
}, {
|
|
529
555
|
owner: this.owner,
|
|
530
556
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
531
|
-
lendingMarketAuthority:
|
|
557
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
532
558
|
reserve: this.reserve.address,
|
|
533
559
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
534
560
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
535
561
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
536
|
-
userSourceCollateral:
|
|
537
|
-
userDestinationLiquidity:
|
|
538
|
-
collateralTokenProgram:
|
|
562
|
+
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
563
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
564
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
539
565
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
540
|
-
instructionSysvarAccount:
|
|
566
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
541
567
|
}, this.kaminoMarket.programId));
|
|
542
568
|
}
|
|
543
569
|
// @deprecated -- use addDepositIxV2 instead
|
|
544
|
-
|
|
570
|
+
addDepositIx() {
|
|
545
571
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateral`);
|
|
546
572
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateral)({
|
|
547
573
|
liquidityAmount: this.amount,
|
|
548
574
|
}, {
|
|
549
575
|
owner: this.owner,
|
|
550
|
-
obligation:
|
|
576
|
+
obligation: this.getObligationPda(),
|
|
551
577
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
552
|
-
lendingMarketAuthority:
|
|
578
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
553
579
|
reserve: this.reserve.address,
|
|
554
580
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
555
581
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
556
582
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
557
583
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
558
|
-
userSourceLiquidity:
|
|
559
|
-
placeholderUserDestinationCollateral:
|
|
560
|
-
collateralTokenProgram:
|
|
584
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
585
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
586
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
561
587
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
562
|
-
instructionSysvarAccount:
|
|
588
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
563
589
|
}, this.kaminoMarket.programId));
|
|
564
590
|
}
|
|
565
|
-
|
|
566
|
-
const
|
|
591
|
+
addDepositIxV2() {
|
|
592
|
+
const farmsAccounts = this.reserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
593
|
+
? {
|
|
594
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
595
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
596
|
+
}
|
|
597
|
+
: {
|
|
598
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
599
|
+
reserveFarmState: this.reserve.state.farmCollateral,
|
|
600
|
+
};
|
|
567
601
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
568
602
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateralV2)({
|
|
569
603
|
liquidityAmount: this.amount,
|
|
570
604
|
}, {
|
|
571
605
|
depositAccounts: {
|
|
572
606
|
owner: this.owner,
|
|
573
|
-
obligation:
|
|
607
|
+
obligation: this.getObligationPda(),
|
|
574
608
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
575
|
-
lendingMarketAuthority:
|
|
609
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
576
610
|
reserve: this.reserve.address,
|
|
577
611
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
578
612
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
579
613
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
580
614
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
581
|
-
userSourceLiquidity:
|
|
582
|
-
placeholderUserDestinationCollateral:
|
|
583
|
-
collateralTokenProgram:
|
|
615
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
616
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
617
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
584
618
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
585
|
-
instructionSysvarAccount:
|
|
619
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
586
620
|
},
|
|
587
621
|
farmsAccounts,
|
|
588
|
-
farmsProgram:
|
|
622
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
589
623
|
}, this.kaminoMarket.programId));
|
|
590
624
|
}
|
|
591
625
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
592
|
-
|
|
626
|
+
addDepositObligationCollateralIx() {
|
|
593
627
|
this.lendingIxsLabels.push(`depositObligationCollateral`);
|
|
594
628
|
this.lendingIxs.push((0, instructions_1.depositObligationCollateral)({
|
|
595
629
|
collateralAmount: this.amount,
|
|
596
630
|
}, {
|
|
597
631
|
owner: this.owner,
|
|
598
|
-
obligation:
|
|
632
|
+
obligation: this.getObligationPda(),
|
|
599
633
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
600
634
|
depositReserve: this.reserve.address,
|
|
601
635
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
602
|
-
userSourceCollateral:
|
|
603
|
-
tokenProgram:
|
|
604
|
-
instructionSysvarAccount:
|
|
636
|
+
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
637
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
638
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
605
639
|
}, this.kaminoMarket.programId));
|
|
606
640
|
}
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
|
|
641
|
+
addDepositObligationCollateralIxV2() {
|
|
642
|
+
const farmsAccounts = this.reserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
643
|
+
? {
|
|
644
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
645
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
646
|
+
}
|
|
647
|
+
: {
|
|
648
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
649
|
+
reserveFarmState: this.reserve.state.farmCollateral,
|
|
650
|
+
};
|
|
610
651
|
this.lendingIxsLabels.push(`depositObligationCollateralV2`);
|
|
611
652
|
this.lendingIxs.push((0, instructions_1.depositObligationCollateralV2)({
|
|
612
653
|
collateralAmount: this.amount,
|
|
613
654
|
}, {
|
|
614
655
|
depositAccounts: {
|
|
615
656
|
owner: this.owner,
|
|
616
|
-
obligation:
|
|
657
|
+
obligation: this.getObligationPda(),
|
|
617
658
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
618
659
|
depositReserve: this.reserve.address,
|
|
619
660
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
620
|
-
userSourceCollateral:
|
|
621
|
-
tokenProgram:
|
|
622
|
-
instructionSysvarAccount:
|
|
661
|
+
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
662
|
+
tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
663
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
623
664
|
},
|
|
624
|
-
lendingMarketAuthority:
|
|
665
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
625
666
|
farmsAccounts,
|
|
626
|
-
farmsProgram:
|
|
667
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
627
668
|
}, this.kaminoMarket.programId));
|
|
628
669
|
}
|
|
629
670
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
630
|
-
|
|
671
|
+
addBorrowIx() {
|
|
631
672
|
this.lendingIxsLabels.push(`borrowObligationLiquidity`);
|
|
632
673
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
633
674
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
634
|
-
return {
|
|
675
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
635
676
|
});
|
|
636
|
-
|
|
677
|
+
const borrowIx = (0, instructions_1.borrowObligationLiquidity)({
|
|
637
678
|
liquidityAmount: this.amount,
|
|
638
679
|
}, {
|
|
639
680
|
owner: this.owner,
|
|
640
|
-
obligation:
|
|
681
|
+
obligation: this.getObligationPda(),
|
|
641
682
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
642
|
-
lendingMarketAuthority:
|
|
683
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
643
684
|
borrowReserve: this.reserve.address,
|
|
644
685
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
645
686
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
646
|
-
userDestinationLiquidity:
|
|
687
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
647
688
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
648
|
-
referrerTokenState:
|
|
689
|
+
referrerTokenState: (0, utils_1.referrerTokenStatePda)(this.referrer, this.reserve.address, this.kaminoMarket.programId)[0],
|
|
649
690
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
650
|
-
instructionSysvarAccount:
|
|
691
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
651
692
|
}, this.kaminoMarket.programId);
|
|
652
|
-
borrowIx =
|
|
653
|
-
|
|
654
|
-
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
693
|
+
borrowIx.keys =
|
|
694
|
+
(0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
655
695
|
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
656
|
-
? borrowIx.
|
|
657
|
-
: borrowIx.
|
|
658
|
-
};
|
|
696
|
+
? borrowIx.keys.concat([...depositReserveAccountMetas])
|
|
697
|
+
: borrowIx.keys;
|
|
659
698
|
this.lendingIxs.push(borrowIx);
|
|
660
699
|
}
|
|
661
|
-
|
|
700
|
+
addBorrowIxV2() {
|
|
662
701
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
663
702
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
664
703
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
665
|
-
return {
|
|
704
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
666
705
|
});
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
706
|
+
const farmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
707
|
+
? {
|
|
708
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
709
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
710
|
+
}
|
|
711
|
+
: {
|
|
712
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
713
|
+
reserveFarmState: this.reserve.state.farmDebt,
|
|
714
|
+
};
|
|
715
|
+
const borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
670
716
|
liquidityAmount: this.amount,
|
|
671
717
|
}, {
|
|
672
718
|
borrowAccounts: {
|
|
673
719
|
owner: this.owner,
|
|
674
|
-
obligation:
|
|
720
|
+
obligation: this.getObligationPda(),
|
|
675
721
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
676
|
-
lendingMarketAuthority:
|
|
722
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
677
723
|
borrowReserve: this.reserve.address,
|
|
678
724
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
679
725
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
680
|
-
userDestinationLiquidity:
|
|
726
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
681
727
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
682
|
-
referrerTokenState:
|
|
728
|
+
referrerTokenState: (0, utils_1.referrerTokenStatePda)(this.referrer, this.reserve.address, this.kaminoMarket.programId)[0],
|
|
683
729
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
684
|
-
instructionSysvarAccount:
|
|
730
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
685
731
|
},
|
|
686
732
|
farmsAccounts,
|
|
687
|
-
farmsProgram:
|
|
733
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
688
734
|
}, this.kaminoMarket.programId);
|
|
689
|
-
borrowIx =
|
|
690
|
-
|
|
691
|
-
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
735
|
+
borrowIx.keys =
|
|
736
|
+
(0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
692
737
|
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
693
|
-
? borrowIx.
|
|
694
|
-
: borrowIx.
|
|
695
|
-
};
|
|
738
|
+
? borrowIx.keys.concat([...depositReserveAccountMetas])
|
|
739
|
+
: borrowIx.keys;
|
|
696
740
|
this.lendingIxs.push(borrowIx);
|
|
697
741
|
}
|
|
698
742
|
/// @deprecated -- use addWithdrawIxV2 instead
|
|
@@ -702,121 +746,129 @@ class KaminoAction {
|
|
|
702
746
|
collateralAmount,
|
|
703
747
|
}, {
|
|
704
748
|
owner: this.owner,
|
|
705
|
-
obligation:
|
|
749
|
+
obligation: this.getObligationPda(),
|
|
706
750
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
707
|
-
lendingMarketAuthority:
|
|
751
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
708
752
|
withdrawReserve: this.reserve.address,
|
|
709
753
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
710
754
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
711
755
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
712
756
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
713
|
-
userDestinationLiquidity:
|
|
714
|
-
placeholderUserDestinationCollateral:
|
|
715
|
-
collateralTokenProgram:
|
|
757
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
758
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
759
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
716
760
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
717
|
-
instructionSysvarAccount:
|
|
761
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
718
762
|
}, this.kaminoMarket.programId));
|
|
719
763
|
}
|
|
720
764
|
async addWithdrawIxV2(collateralAmount) {
|
|
721
|
-
const
|
|
722
|
-
|
|
765
|
+
const farmsAccounts = this.reserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
766
|
+
? {
|
|
767
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
768
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
769
|
+
}
|
|
770
|
+
: {
|
|
771
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
772
|
+
reserveFarmState: this.reserve.state.farmCollateral,
|
|
773
|
+
};
|
|
723
774
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
724
775
|
this.lendingIxs.push((0, instructions_1.withdrawObligationCollateralAndRedeemReserveCollateralV2)({
|
|
725
776
|
collateralAmount,
|
|
726
777
|
}, {
|
|
727
778
|
withdrawAccounts: {
|
|
728
779
|
owner: this.owner,
|
|
729
|
-
obligation:
|
|
780
|
+
obligation: this.getObligationPda(),
|
|
730
781
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
731
|
-
lendingMarketAuthority:
|
|
782
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
732
783
|
withdrawReserve: this.reserve.address,
|
|
733
784
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
734
785
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
735
786
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
736
787
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
737
|
-
userDestinationLiquidity:
|
|
738
|
-
placeholderUserDestinationCollateral:
|
|
739
|
-
collateralTokenProgram:
|
|
788
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
789
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
790
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
740
791
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
741
|
-
instructionSysvarAccount:
|
|
792
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
742
793
|
},
|
|
743
794
|
farmsAccounts: farmsAccounts,
|
|
744
|
-
farmsProgram:
|
|
795
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
745
796
|
}, this.kaminoMarket.programId));
|
|
746
797
|
}
|
|
747
798
|
/// @deprecated -- use addRepayIxV2 instead
|
|
748
799
|
async addRepayIx() {
|
|
749
|
-
|
|
750
|
-
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
800
|
+
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${this.getObligationPda()})`);
|
|
751
801
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
752
802
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
753
|
-
return {
|
|
803
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
754
804
|
});
|
|
755
|
-
|
|
805
|
+
const repayIx = (0, instructions_1.repayObligationLiquidity)({
|
|
756
806
|
liquidityAmount: this.amount,
|
|
757
807
|
}, {
|
|
758
808
|
owner: this.payer,
|
|
759
|
-
obligation:
|
|
809
|
+
obligation: this.getObligationPda(),
|
|
760
810
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
761
811
|
repayReserve: this.reserve.address,
|
|
762
812
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
763
|
-
userSourceLiquidity:
|
|
813
|
+
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
764
814
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
765
815
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
766
|
-
instructionSysvarAccount:
|
|
816
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
767
817
|
}, this.kaminoMarket.programId);
|
|
768
|
-
repayIx =
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
: repayIx.accounts,
|
|
773
|
-
};
|
|
818
|
+
repayIx.keys =
|
|
819
|
+
(0, obligation_1.isKaminoObligation)(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
820
|
+
? repayIx.keys.concat([...depositReserveAccountMetas])
|
|
821
|
+
: repayIx.keys;
|
|
774
822
|
this.lendingIxs.push(repayIx);
|
|
775
823
|
}
|
|
776
824
|
async addRepayIxV2() {
|
|
777
|
-
|
|
778
|
-
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
825
|
+
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${this.getObligationPda()})`);
|
|
779
826
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
780
|
-
const
|
|
827
|
+
const farmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
828
|
+
? {
|
|
829
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
830
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
831
|
+
}
|
|
832
|
+
: {
|
|
833
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
834
|
+
reserveFarmState: this.reserve.state.farmDebt,
|
|
835
|
+
};
|
|
781
836
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
782
|
-
return {
|
|
837
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
783
838
|
});
|
|
784
|
-
|
|
839
|
+
const repayIx = (0, instructions_1.repayObligationLiquidityV2)({
|
|
785
840
|
liquidityAmount: this.amount,
|
|
786
841
|
}, {
|
|
787
842
|
repayAccounts: {
|
|
788
843
|
owner: this.payer,
|
|
789
|
-
obligation:
|
|
844
|
+
obligation: this.getObligationPda(),
|
|
790
845
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
791
846
|
repayReserve: this.reserve.address,
|
|
792
847
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
793
|
-
userSourceLiquidity:
|
|
848
|
+
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
794
849
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
795
850
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
796
|
-
instructionSysvarAccount:
|
|
851
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
797
852
|
},
|
|
798
|
-
lendingMarketAuthority:
|
|
853
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
799
854
|
farmsAccounts,
|
|
800
|
-
farmsProgram:
|
|
855
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
801
856
|
}, this.kaminoMarket.programId);
|
|
802
|
-
repayIx =
|
|
803
|
-
...repayIx,
|
|
857
|
+
repayIx.keys =
|
|
804
858
|
// TODO: potential elev group update?
|
|
805
|
-
|
|
806
|
-
? repayIx.
|
|
807
|
-
: repayIx.
|
|
808
|
-
};
|
|
859
|
+
(0, obligation_1.isKaminoObligation)(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
860
|
+
? repayIx.keys.concat([...depositReserveAccountMetas])
|
|
861
|
+
: repayIx.keys;
|
|
809
862
|
this.lendingIxs.push(repayIx);
|
|
810
863
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
this.lendingIxsLabels.push(`repayAndWithdrawAndRedeem(repayReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${obligationAddress})`);
|
|
864
|
+
addRepayAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
865
|
+
this.lendingIxsLabels.push(`repayAndWithdrawAndRedeem(repayReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${this.getObligationPda()})`);
|
|
814
866
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
815
867
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
816
|
-
return {
|
|
868
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
817
869
|
});
|
|
818
870
|
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
819
|
-
return {
|
|
871
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
820
872
|
});
|
|
821
873
|
if (!this.outflowAmount) {
|
|
822
874
|
throw new Error(`outflowAmount not set`);
|
|
@@ -824,58 +876,73 @@ class KaminoAction {
|
|
|
824
876
|
if (!this.outflowReserve) {
|
|
825
877
|
throw new Error(`outflowReserve not set`);
|
|
826
878
|
}
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
|
|
879
|
+
const collateralFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
880
|
+
? {
|
|
881
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
882
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
883
|
+
}
|
|
884
|
+
: {
|
|
885
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
886
|
+
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
887
|
+
};
|
|
888
|
+
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
889
|
+
? {
|
|
890
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
891
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
892
|
+
}
|
|
893
|
+
: {
|
|
894
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
895
|
+
reserveFarmState: this.reserve.state.farmDebt,
|
|
896
|
+
};
|
|
897
|
+
const repayAndWithdrawIx = (0, instructions_1.repayAndWithdrawAndRedeem)({
|
|
830
898
|
repayAmount: this.amount,
|
|
831
899
|
withdrawCollateralAmount,
|
|
832
900
|
}, {
|
|
833
901
|
repayAccounts: {
|
|
834
902
|
owner: this.owner,
|
|
835
|
-
obligation:
|
|
903
|
+
obligation: this.getObligationPda(),
|
|
836
904
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
837
905
|
repayReserve: this.reserve.address,
|
|
838
906
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
839
|
-
userSourceLiquidity:
|
|
907
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
840
908
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
841
909
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
842
|
-
instructionSysvarAccount:
|
|
910
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
843
911
|
},
|
|
844
912
|
withdrawAccounts: {
|
|
845
913
|
owner: this.owner,
|
|
846
|
-
obligation:
|
|
914
|
+
obligation: this.getObligationPda(),
|
|
847
915
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
848
|
-
lendingMarketAuthority:
|
|
916
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
849
917
|
withdrawReserve: this.outflowReserve.address,
|
|
850
918
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
851
919
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
852
920
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
853
921
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
854
|
-
userDestinationLiquidity:
|
|
855
|
-
placeholderUserDestinationCollateral:
|
|
856
|
-
collateralTokenProgram:
|
|
922
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
923
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
924
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
857
925
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
858
|
-
instructionSysvarAccount:
|
|
926
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
859
927
|
},
|
|
860
|
-
collateralFarmsAccounts
|
|
861
|
-
debtFarmsAccounts
|
|
862
|
-
farmsProgram:
|
|
928
|
+
collateralFarmsAccounts,
|
|
929
|
+
debtFarmsAccounts,
|
|
930
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
863
931
|
}, this.kaminoMarket.programId);
|
|
864
|
-
repayAndWithdrawIx =
|
|
865
|
-
...
|
|
866
|
-
|
|
867
|
-
|
|
932
|
+
repayAndWithdrawIx.keys = repayAndWithdrawIx.keys.concat([
|
|
933
|
+
...depositReserveAccountMetas,
|
|
934
|
+
...borrowReserveAccountMetas,
|
|
935
|
+
]);
|
|
868
936
|
this.lendingIxs.push(repayAndWithdrawIx);
|
|
869
937
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
this.lendingIxsLabels.push(`depositAndWithdrawV2(depositReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${obligationAddress})`);
|
|
938
|
+
addDepositAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
939
|
+
this.lendingIxsLabels.push(`depositAndWithdrawV2(depositReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${this.getObligationPda()})`);
|
|
873
940
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
874
941
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
875
|
-
return {
|
|
942
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
876
943
|
});
|
|
877
944
|
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
878
|
-
return {
|
|
945
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
879
946
|
});
|
|
880
947
|
if (!this.outflowAmount) {
|
|
881
948
|
throw new Error(`outflowAmount not set`);
|
|
@@ -883,53 +950,68 @@ class KaminoAction {
|
|
|
883
950
|
if (!this.outflowReserve) {
|
|
884
951
|
throw new Error(`outflowReserve not set`);
|
|
885
952
|
}
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
953
|
+
const depositFarmsAccounts = this.reserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
954
|
+
? {
|
|
955
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
956
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
957
|
+
}
|
|
958
|
+
: {
|
|
959
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
960
|
+
reserveFarmState: this.reserve.state.farmCollateral,
|
|
961
|
+
};
|
|
962
|
+
const withdrawFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
963
|
+
? {
|
|
964
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
965
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
966
|
+
}
|
|
967
|
+
: {
|
|
968
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
969
|
+
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
970
|
+
};
|
|
971
|
+
const depositAndWithdrawIx = (0, instructions_1.depositAndWithdraw)({
|
|
890
972
|
liquidityAmount: this.amount,
|
|
891
973
|
withdrawCollateralAmount,
|
|
892
974
|
}, {
|
|
893
975
|
depositAccounts: {
|
|
894
976
|
owner: this.owner,
|
|
895
|
-
obligation:
|
|
977
|
+
obligation: this.getObligationPda(),
|
|
896
978
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
897
|
-
lendingMarketAuthority,
|
|
979
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
898
980
|
reserve: this.reserve.address,
|
|
899
981
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
900
982
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
901
983
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
902
984
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
903
|
-
userSourceLiquidity:
|
|
904
|
-
placeholderUserDestinationCollateral:
|
|
905
|
-
collateralTokenProgram:
|
|
985
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
986
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
987
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
906
988
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
907
|
-
instructionSysvarAccount:
|
|
989
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
908
990
|
},
|
|
909
991
|
withdrawAccounts: {
|
|
910
992
|
owner: this.owner,
|
|
911
|
-
obligation:
|
|
993
|
+
obligation: this.getObligationPda(),
|
|
912
994
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
913
|
-
lendingMarketAuthority,
|
|
995
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
914
996
|
withdrawReserve: this.outflowReserve.address,
|
|
915
997
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
916
998
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
917
999
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
918
1000
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
919
|
-
userDestinationLiquidity:
|
|
920
|
-
placeholderUserDestinationCollateral:
|
|
921
|
-
collateralTokenProgram:
|
|
1001
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1002
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
1003
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
922
1004
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
923
|
-
instructionSysvarAccount:
|
|
1005
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
924
1006
|
},
|
|
925
1007
|
depositFarmsAccounts,
|
|
926
1008
|
withdrawFarmsAccounts,
|
|
927
|
-
farmsProgram:
|
|
1009
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
928
1010
|
}, this.kaminoMarket.programId);
|
|
929
|
-
depositAndWithdrawIx =
|
|
930
|
-
...
|
|
931
|
-
|
|
932
|
-
|
|
1011
|
+
depositAndWithdrawIx.keys = depositAndWithdrawIx.keys.concat([
|
|
1012
|
+
...depositReserveAccountMetas,
|
|
1013
|
+
...borrowReserveAccountMetas,
|
|
1014
|
+
]);
|
|
933
1015
|
this.lendingIxs.push(depositAndWithdrawIx);
|
|
934
1016
|
}
|
|
935
1017
|
async addDepositAndBorrowIx() {
|
|
@@ -939,19 +1021,19 @@ class KaminoAction {
|
|
|
939
1021
|
liquidityAmount: this.amount,
|
|
940
1022
|
}, {
|
|
941
1023
|
owner: this.owner,
|
|
942
|
-
obligation:
|
|
1024
|
+
obligation: this.getObligationPda(),
|
|
943
1025
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
944
|
-
lendingMarketAuthority:
|
|
1026
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
945
1027
|
reserve: this.reserve.address,
|
|
946
1028
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
947
1029
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
948
1030
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
949
1031
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
950
|
-
userSourceLiquidity:
|
|
951
|
-
placeholderUserDestinationCollateral:
|
|
952
|
-
collateralTokenProgram:
|
|
1032
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1033
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
1034
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
953
1035
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
954
|
-
instructionSysvarAccount:
|
|
1036
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
955
1037
|
}, this.kaminoMarket.programId));
|
|
956
1038
|
if (!this.outflowReserve) {
|
|
957
1039
|
throw new Error(`outflowReserve not set`);
|
|
@@ -964,33 +1046,37 @@ class KaminoAction {
|
|
|
964
1046
|
depositReservesList.push(this.reserve.address);
|
|
965
1047
|
}
|
|
966
1048
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
967
|
-
return {
|
|
1049
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
968
1050
|
});
|
|
969
|
-
|
|
1051
|
+
const borrowIx = (0, instructions_1.borrowObligationLiquidity)({
|
|
970
1052
|
liquidityAmount: this.outflowAmount,
|
|
971
1053
|
}, {
|
|
972
1054
|
owner: this.owner,
|
|
973
|
-
obligation:
|
|
1055
|
+
obligation: this.getObligationPda(),
|
|
974
1056
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
975
|
-
lendingMarketAuthority:
|
|
1057
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
976
1058
|
borrowReserve: this.outflowReserve.address,
|
|
977
1059
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
978
1060
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
979
|
-
userDestinationLiquidity:
|
|
1061
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
980
1062
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
981
|
-
referrerTokenState:
|
|
1063
|
+
referrerTokenState: (0, utils_1.referrerTokenStatePda)(this.referrer, this.outflowReserve.address, this.kaminoMarket.programId)[0],
|
|
982
1064
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
983
|
-
instructionSysvarAccount:
|
|
1065
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
984
1066
|
}, this.kaminoMarket.programId);
|
|
985
|
-
borrowIx =
|
|
986
|
-
...borrowIx,
|
|
987
|
-
accounts: borrowIx.accounts.concat(depositReserveAccountMetas),
|
|
988
|
-
};
|
|
1067
|
+
borrowIx.keys = borrowIx.keys.concat([...depositReserveAccountMetas]);
|
|
989
1068
|
this.lendingIxs.push(borrowIx);
|
|
990
1069
|
}
|
|
991
1070
|
async addDepositAndBorrowIxV2() {
|
|
992
|
-
const
|
|
993
|
-
|
|
1071
|
+
const collateralFarmsAccounts = this.reserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
1072
|
+
? {
|
|
1073
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1074
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1075
|
+
}
|
|
1076
|
+
: {
|
|
1077
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1078
|
+
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1079
|
+
};
|
|
994
1080
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
995
1081
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
996
1082
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateralV2)({
|
|
@@ -998,22 +1084,22 @@ class KaminoAction {
|
|
|
998
1084
|
}, {
|
|
999
1085
|
depositAccounts: {
|
|
1000
1086
|
owner: this.owner,
|
|
1001
|
-
obligation:
|
|
1087
|
+
obligation: this.getObligationPda(),
|
|
1002
1088
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1003
|
-
lendingMarketAuthority:
|
|
1089
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1004
1090
|
reserve: this.reserve.address,
|
|
1005
1091
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1006
1092
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1007
1093
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1008
1094
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1009
|
-
userSourceLiquidity:
|
|
1010
|
-
placeholderUserDestinationCollateral:
|
|
1011
|
-
collateralTokenProgram:
|
|
1095
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1096
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
1097
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
1012
1098
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1013
|
-
instructionSysvarAccount:
|
|
1099
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1014
1100
|
},
|
|
1015
1101
|
farmsAccounts: collateralFarmsAccounts,
|
|
1016
|
-
farmsProgram:
|
|
1102
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1017
1103
|
}, this.kaminoMarket.programId));
|
|
1018
1104
|
if (!this.outflowReserve) {
|
|
1019
1105
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1026,60 +1112,61 @@ class KaminoAction {
|
|
|
1026
1112
|
depositReservesList.push(this.reserve.address);
|
|
1027
1113
|
}
|
|
1028
1114
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1029
|
-
return {
|
|
1115
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1030
1116
|
});
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1117
|
+
const debtFarmsAccounts = this.outflowReserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
1118
|
+
? {
|
|
1119
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1120
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1121
|
+
}
|
|
1122
|
+
: {
|
|
1123
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmDebt, this.getObligationPda()),
|
|
1124
|
+
reserveFarmState: this.outflowReserve.state.farmDebt,
|
|
1125
|
+
};
|
|
1126
|
+
const borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
1033
1127
|
liquidityAmount: this.outflowAmount,
|
|
1034
1128
|
}, {
|
|
1035
1129
|
borrowAccounts: {
|
|
1036
1130
|
owner: this.owner,
|
|
1037
|
-
obligation:
|
|
1131
|
+
obligation: this.getObligationPda(),
|
|
1038
1132
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1039
|
-
lendingMarketAuthority:
|
|
1133
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1040
1134
|
borrowReserve: this.outflowReserve.address,
|
|
1041
1135
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1042
1136
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
1043
|
-
userDestinationLiquidity:
|
|
1137
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1044
1138
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1045
|
-
referrerTokenState:
|
|
1139
|
+
referrerTokenState: (0, utils_1.referrerTokenStatePda)(this.referrer, this.outflowReserve.address, this.kaminoMarket.programId)[0],
|
|
1046
1140
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1047
|
-
instructionSysvarAccount:
|
|
1141
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1048
1142
|
},
|
|
1049
1143
|
farmsAccounts: debtFarmsAccounts,
|
|
1050
|
-
farmsProgram:
|
|
1144
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1051
1145
|
}, this.kaminoMarket.programId);
|
|
1052
|
-
borrowIx =
|
|
1053
|
-
...borrowIx,
|
|
1054
|
-
accounts: borrowIx.accounts.concat(depositReserveAccountMetas),
|
|
1055
|
-
};
|
|
1146
|
+
borrowIx.keys = borrowIx.keys.concat([...depositReserveAccountMetas]);
|
|
1056
1147
|
this.lendingIxs.push(borrowIx);
|
|
1057
1148
|
}
|
|
1058
1149
|
async addRepayAndWithdrawIxs(withdrawCollateralAmount) {
|
|
1059
|
-
|
|
1060
|
-
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
1150
|
+
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${this.getObligationPda()})`);
|
|
1061
1151
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateral`);
|
|
1062
1152
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1063
1153
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1064
|
-
return {
|
|
1154
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1065
1155
|
});
|
|
1066
|
-
|
|
1156
|
+
const repayIx = (0, instructions_1.repayObligationLiquidity)({
|
|
1067
1157
|
liquidityAmount: this.amount,
|
|
1068
1158
|
}, {
|
|
1069
1159
|
owner: this.owner,
|
|
1070
|
-
obligation:
|
|
1160
|
+
obligation: this.getObligationPda(),
|
|
1071
1161
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1072
1162
|
repayReserve: this.reserve.address,
|
|
1073
1163
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1074
|
-
userSourceLiquidity:
|
|
1164
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1075
1165
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1076
1166
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1077
|
-
instructionSysvarAccount:
|
|
1167
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1078
1168
|
}, this.kaminoMarket.programId);
|
|
1079
|
-
repayIx =
|
|
1080
|
-
...repayIx,
|
|
1081
|
-
accounts: repayIx.accounts.concat(depositReserveAccountMetas),
|
|
1082
|
-
};
|
|
1169
|
+
repayIx.keys = repayIx.keys.concat([...depositReserveAccountMetas]);
|
|
1083
1170
|
this.lendingIxs.push(repayIx);
|
|
1084
1171
|
if (!this.outflowReserve) {
|
|
1085
1172
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1091,57 +1178,60 @@ class KaminoAction {
|
|
|
1091
1178
|
collateralAmount: withdrawCollateralAmount,
|
|
1092
1179
|
}, {
|
|
1093
1180
|
owner: this.owner,
|
|
1094
|
-
obligation:
|
|
1181
|
+
obligation: this.getObligationPda(),
|
|
1095
1182
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1096
|
-
lendingMarketAuthority:
|
|
1183
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1097
1184
|
withdrawReserve: this.outflowReserve.address,
|
|
1098
1185
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1099
1186
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1100
1187
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1101
1188
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1102
|
-
userDestinationLiquidity:
|
|
1103
|
-
placeholderUserDestinationCollateral:
|
|
1104
|
-
collateralTokenProgram:
|
|
1189
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1190
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
1191
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
1105
1192
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1106
|
-
instructionSysvarAccount:
|
|
1193
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1107
1194
|
}, this.kaminoMarket.programId));
|
|
1108
1195
|
}
|
|
1109
1196
|
async addRepayAndWithdrawIxsV2(withdrawCollateralAmount) {
|
|
1110
|
-
|
|
1111
|
-
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
1197
|
+
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${this.getObligationPda()})`);
|
|
1112
1198
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
1113
1199
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1114
1200
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
1115
1201
|
}
|
|
1116
1202
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1117
1203
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1118
|
-
return {
|
|
1204
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1119
1205
|
});
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1206
|
+
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
1207
|
+
? {
|
|
1208
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1209
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1210
|
+
}
|
|
1211
|
+
: {
|
|
1212
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1213
|
+
reserveFarmState: this.reserve.state.farmDebt,
|
|
1214
|
+
};
|
|
1215
|
+
const repayIx = (0, instructions_1.repayObligationLiquidityV2)({
|
|
1122
1216
|
liquidityAmount: this.amount,
|
|
1123
1217
|
}, {
|
|
1124
1218
|
repayAccounts: {
|
|
1125
1219
|
owner: this.owner,
|
|
1126
|
-
obligation:
|
|
1220
|
+
obligation: this.getObligationPda(),
|
|
1127
1221
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1128
1222
|
repayReserve: this.reserve.address,
|
|
1129
1223
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1130
|
-
userSourceLiquidity:
|
|
1224
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1131
1225
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1132
1226
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1133
|
-
instructionSysvarAccount:
|
|
1227
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1134
1228
|
},
|
|
1135
|
-
lendingMarketAuthority:
|
|
1229
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1136
1230
|
farmsAccounts: debtFarmsAccounts,
|
|
1137
|
-
farmsProgram:
|
|
1231
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1138
1232
|
}, this.kaminoMarket.programId);
|
|
1139
|
-
repayIx =
|
|
1140
|
-
...repayIx
|
|
1141
|
-
accounts: this.obligation.state.elevationGroup > 0
|
|
1142
|
-
? repayIx.accounts.concat(depositReserveAccountMetas)
|
|
1143
|
-
: repayIx.accounts,
|
|
1144
|
-
};
|
|
1233
|
+
repayIx.keys =
|
|
1234
|
+
this.obligation.state.elevationGroup > 0 ? repayIx.keys.concat([...depositReserveAccountMetas]) : repayIx.keys;
|
|
1145
1235
|
this.lendingIxs.push(repayIx);
|
|
1146
1236
|
if (!this.outflowReserve) {
|
|
1147
1237
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1149,31 +1239,39 @@ class KaminoAction {
|
|
|
1149
1239
|
if (!this.outflowAmount) {
|
|
1150
1240
|
throw new Error(`outflowAmount not set`);
|
|
1151
1241
|
}
|
|
1152
|
-
const
|
|
1242
|
+
const collateralFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
1243
|
+
? {
|
|
1244
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1245
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1246
|
+
}
|
|
1247
|
+
: {
|
|
1248
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
1249
|
+
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1250
|
+
};
|
|
1153
1251
|
this.lendingIxs.push((0, instructions_1.withdrawObligationCollateralAndRedeemReserveCollateralV2)({
|
|
1154
1252
|
collateralAmount: withdrawCollateralAmount,
|
|
1155
1253
|
}, {
|
|
1156
1254
|
withdrawAccounts: {
|
|
1157
1255
|
owner: this.owner,
|
|
1158
|
-
obligation:
|
|
1256
|
+
obligation: this.getObligationPda(),
|
|
1159
1257
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1160
|
-
lendingMarketAuthority:
|
|
1258
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1161
1259
|
withdrawReserve: this.outflowReserve.address,
|
|
1162
1260
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1163
1261
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1164
1262
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1165
1263
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1166
|
-
userDestinationLiquidity:
|
|
1167
|
-
placeholderUserDestinationCollateral:
|
|
1168
|
-
collateralTokenProgram:
|
|
1264
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1265
|
+
placeholderUserDestinationCollateral: this.kaminoMarket.programId,
|
|
1266
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
1169
1267
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1170
|
-
instructionSysvarAccount:
|
|
1268
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1171
1269
|
},
|
|
1172
1270
|
farmsAccounts: collateralFarmsAccounts,
|
|
1173
|
-
farmsProgram:
|
|
1271
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1174
1272
|
}, this.kaminoMarket.programId));
|
|
1175
1273
|
}
|
|
1176
|
-
|
|
1274
|
+
addLiquidateIx(maxAllowedLtvOverridePercent = 0) {
|
|
1177
1275
|
this.lendingIxsLabels.push(`liquidateObligationAndRedeemReserveCollateral`);
|
|
1178
1276
|
if (!this.outflowReserve) {
|
|
1179
1277
|
throw Error(`Withdraw reserve during liquidation is not defined`);
|
|
@@ -1183,18 +1281,18 @@ class KaminoAction {
|
|
|
1183
1281
|
}
|
|
1184
1282
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1185
1283
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1186
|
-
return {
|
|
1284
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1187
1285
|
});
|
|
1188
|
-
|
|
1286
|
+
const liquidateIx = (0, instructions_1.liquidateObligationAndRedeemReserveCollateral)({
|
|
1189
1287
|
liquidityAmount: this.amount,
|
|
1190
1288
|
// TODO: Configure this when updating liquidator with new interface
|
|
1191
1289
|
minAcceptableReceivedLiquidityAmount: this.outflowAmount || new bn_js_1.default(0),
|
|
1192
1290
|
maxAllowedLtvOverridePercent: new bn_js_1.default(maxAllowedLtvOverridePercent),
|
|
1193
1291
|
}, {
|
|
1194
1292
|
liquidator: this.owner,
|
|
1195
|
-
obligation:
|
|
1293
|
+
obligation: this.getObligationPda(),
|
|
1196
1294
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1197
|
-
lendingMarketAuthority:
|
|
1295
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1198
1296
|
repayReserve: this.reserve.address,
|
|
1199
1297
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1200
1298
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -1203,21 +1301,19 @@ class KaminoAction {
|
|
|
1203
1301
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1204
1302
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
1205
1303
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1206
|
-
userSourceLiquidity:
|
|
1207
|
-
userDestinationCollateral:
|
|
1208
|
-
userDestinationLiquidity:
|
|
1304
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1305
|
+
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1306
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1209
1307
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1210
|
-
collateralTokenProgram:
|
|
1308
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
1211
1309
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1212
1310
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1213
|
-
instructionSysvarAccount:
|
|
1311
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1214
1312
|
}, this.kaminoMarket.programId);
|
|
1215
|
-
liquidateIx =
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
: liquidateIx.accounts,
|
|
1220
|
-
};
|
|
1313
|
+
liquidateIx.keys =
|
|
1314
|
+
this.obligation.state.elevationGroup > 0
|
|
1315
|
+
? liquidateIx.keys.concat([...depositReserveAccountMetas])
|
|
1316
|
+
: liquidateIx.keys;
|
|
1221
1317
|
this.lendingIxs.push(liquidateIx);
|
|
1222
1318
|
}
|
|
1223
1319
|
async addLiquidateIxV2(maxAllowedLtvOverridePercent = 0) {
|
|
@@ -1230,12 +1326,27 @@ class KaminoAction {
|
|
|
1230
1326
|
}
|
|
1231
1327
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1232
1328
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1233
|
-
return {
|
|
1329
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1234
1330
|
});
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1331
|
+
const collateralFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
1332
|
+
? {
|
|
1333
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1334
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1335
|
+
}
|
|
1336
|
+
: {
|
|
1337
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
1338
|
+
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1339
|
+
};
|
|
1340
|
+
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
1341
|
+
? {
|
|
1342
|
+
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1343
|
+
reserveFarmState: this.kaminoMarket.programId,
|
|
1344
|
+
}
|
|
1345
|
+
: {
|
|
1346
|
+
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1347
|
+
reserveFarmState: this.reserve.state.farmDebt,
|
|
1348
|
+
};
|
|
1349
|
+
const liquidateIx = (0, instructions_1.liquidateObligationAndRedeemReserveCollateralV2)({
|
|
1239
1350
|
liquidityAmount: this.amount,
|
|
1240
1351
|
// TODO: Configure this when updating liquidator with new interface
|
|
1241
1352
|
minAcceptableReceivedLiquidityAmount: this.outflowAmount || new bn_js_1.default(0),
|
|
@@ -1243,9 +1354,9 @@ class KaminoAction {
|
|
|
1243
1354
|
}, {
|
|
1244
1355
|
liquidationAccounts: {
|
|
1245
1356
|
liquidator: this.owner,
|
|
1246
|
-
obligation:
|
|
1357
|
+
obligation: this.getObligationPda(),
|
|
1247
1358
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1248
|
-
lendingMarketAuthority:
|
|
1359
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1249
1360
|
repayReserve: this.reserve.address,
|
|
1250
1361
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1251
1362
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -1254,39 +1365,37 @@ class KaminoAction {
|
|
|
1254
1365
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1255
1366
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
1256
1367
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1257
|
-
userSourceLiquidity:
|
|
1258
|
-
userDestinationCollateral:
|
|
1259
|
-
userDestinationLiquidity:
|
|
1368
|
+
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1369
|
+
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1370
|
+
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1260
1371
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1261
|
-
collateralTokenProgram:
|
|
1372
|
+
collateralTokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
|
|
1262
1373
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1263
1374
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1264
|
-
instructionSysvarAccount:
|
|
1375
|
+
instructionSysvarAccount: web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY,
|
|
1265
1376
|
},
|
|
1266
1377
|
debtFarmsAccounts,
|
|
1267
1378
|
collateralFarmsAccounts,
|
|
1268
|
-
farmsProgram:
|
|
1379
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1269
1380
|
}, this.kaminoMarket.programId);
|
|
1270
|
-
liquidateIx =
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
: liquidateIx.accounts,
|
|
1275
|
-
};
|
|
1381
|
+
liquidateIx.keys =
|
|
1382
|
+
this.obligation.state.elevationGroup > 0
|
|
1383
|
+
? liquidateIx.keys.concat([...depositReserveAccountMetas])
|
|
1384
|
+
: liquidateIx.keys;
|
|
1276
1385
|
this.lendingIxs.push(liquidateIx);
|
|
1277
1386
|
}
|
|
1278
1387
|
async addInBetweenIxs(action, includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs) {
|
|
1279
1388
|
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, 'inBetween', requestElevationGroup, addInitObligationForFarm);
|
|
1280
1389
|
}
|
|
1281
|
-
|
|
1282
|
-
const uniqueReserveAddresses =
|
|
1390
|
+
addRefreshObligation(crank) {
|
|
1391
|
+
const uniqueReserveAddresses = new utils_1.PublicKeySet(this.depositReserves.concat(this.borrowReserves)).toArray();
|
|
1283
1392
|
const addAllToSetupIxs = 'setup';
|
|
1284
1393
|
// Union of addresses
|
|
1285
1394
|
const allReservesExcludingCurrent = [...uniqueReserveAddresses];
|
|
1286
1395
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAllToSetupIxs);
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1396
|
+
this.addRefreshFarmsForReserve(this.depositReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Collateral, crank);
|
|
1397
|
+
this.addRefreshFarmsForReserve(this.borrowReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Debt, crank);
|
|
1398
|
+
this.addRefreshObligationIx(addAllToSetupIxs);
|
|
1290
1399
|
}
|
|
1291
1400
|
async addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, addAsSupportIx = 'setup', requestElevationGroup = false, addInitObligationForFarm = false, twoTokenAction = false, overrideElevationGroupRequest) {
|
|
1292
1401
|
// TODO: why are we not doing this first?
|
|
@@ -1341,7 +1450,7 @@ class KaminoAction {
|
|
|
1341
1450
|
}
|
|
1342
1451
|
}
|
|
1343
1452
|
}
|
|
1344
|
-
else if (action === 'liquidate' && this.outflowReserve.address
|
|
1453
|
+
else if (action === 'liquidate' && !this.outflowReserve.address.equals(this.reserve.address)) {
|
|
1345
1454
|
currentReserves = [this.outflowReserve, this.reserve];
|
|
1346
1455
|
}
|
|
1347
1456
|
else {
|
|
@@ -1351,10 +1460,10 @@ class KaminoAction {
|
|
|
1351
1460
|
else {
|
|
1352
1461
|
currentReserves = [this.reserve];
|
|
1353
1462
|
}
|
|
1354
|
-
const uniqueReserveAddresses = new
|
|
1355
|
-
const currentReserveAddresses = new
|
|
1463
|
+
const uniqueReserveAddresses = new utils_1.PublicKeySet(this.depositReserves.concat(this.borrowReserves));
|
|
1464
|
+
const currentReserveAddresses = new utils_1.PublicKeySet(currentReserves.map((reserve) => reserve.address));
|
|
1356
1465
|
// Union of addresses
|
|
1357
|
-
const allReservesExcludingCurrent = [...uniqueReserveAddresses].filter((address) => !currentReserveAddresses.
|
|
1466
|
+
const allReservesExcludingCurrent = [...uniqueReserveAddresses.toArray()].filter((address) => !currentReserveAddresses.contains(address));
|
|
1358
1467
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1359
1468
|
if (addInitObligationForFarm) {
|
|
1360
1469
|
if (action === 'liquidate') {
|
|
@@ -1390,7 +1499,7 @@ class KaminoAction {
|
|
|
1390
1499
|
}
|
|
1391
1500
|
}
|
|
1392
1501
|
}
|
|
1393
|
-
this.addRefreshReserveIxs(
|
|
1502
|
+
this.addRefreshReserveIxs(currentReserveAddresses.toArray(), addAsSupportIx);
|
|
1394
1503
|
if (action === 'repayAndWithdraw' && addAsSupportIx === 'inBetween') {
|
|
1395
1504
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1396
1505
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
@@ -1402,10 +1511,10 @@ class KaminoAction {
|
|
|
1402
1511
|
const repaidBorrowReservesToSkip = repayObligationLiquidity.amount.lte(new decimal_js_1.default(this.amount.toString()))
|
|
1403
1512
|
? [repayObligationLiquidity.reserveAddress]
|
|
1404
1513
|
: [];
|
|
1405
|
-
|
|
1514
|
+
this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
1406
1515
|
}
|
|
1407
1516
|
else {
|
|
1408
|
-
|
|
1517
|
+
this.addRefreshObligationIx(addAsSupportIx);
|
|
1409
1518
|
}
|
|
1410
1519
|
if (requestElevationGroup) {
|
|
1411
1520
|
if (action === 'repay' || action === 'repayAndWithdrawV2') {
|
|
@@ -1421,8 +1530,8 @@ class KaminoAction {
|
|
|
1421
1530
|
this.obligation.state.elevationGroup !== 0) {
|
|
1422
1531
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, 'cleanup');
|
|
1423
1532
|
// Skip the borrow reserve, since we repay in the same tx
|
|
1424
|
-
|
|
1425
|
-
|
|
1533
|
+
this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
1534
|
+
this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
1426
1535
|
}
|
|
1427
1536
|
}
|
|
1428
1537
|
else if (action === 'depositAndBorrow' || action === 'borrow') {
|
|
@@ -1469,10 +1578,10 @@ class KaminoAction {
|
|
|
1469
1578
|
}
|
|
1470
1579
|
if (newElevationGroup >= 0 &&
|
|
1471
1580
|
newElevationGroup !== ((0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.elevationGroup : 0)) {
|
|
1472
|
-
|
|
1581
|
+
this.addRequestElevationIx(newElevationGroup, addAsSupportIx);
|
|
1473
1582
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1474
|
-
this.addRefreshReserveIxs(
|
|
1475
|
-
|
|
1583
|
+
this.addRefreshReserveIxs(currentReserveAddresses.toArray(), addAsSupportIx);
|
|
1584
|
+
this.addRefreshObligationIx(addAsSupportIx);
|
|
1476
1585
|
if (action === 'borrow') {
|
|
1477
1586
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1478
1587
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
@@ -1487,10 +1596,10 @@ class KaminoAction {
|
|
|
1487
1596
|
((0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.elevationGroup : 0)) {
|
|
1488
1597
|
const addAsSupportIx = 'setup';
|
|
1489
1598
|
console.log('Deposit: Requesting elevation group', overrideElevationGroupRequest);
|
|
1490
|
-
|
|
1599
|
+
this.addRequestElevationIx(overrideElevationGroupRequest, addAsSupportIx);
|
|
1491
1600
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1492
|
-
this.addRefreshReserveIxs(
|
|
1493
|
-
|
|
1601
|
+
this.addRefreshReserveIxs(currentReserveAddresses.toArray(), addAsSupportIx);
|
|
1602
|
+
this.addRefreshObligationIx(addAsSupportIx);
|
|
1494
1603
|
}
|
|
1495
1604
|
else if (action === 'withdraw' &&
|
|
1496
1605
|
overrideElevationGroupRequest !== undefined
|
|
@@ -1499,8 +1608,8 @@ class KaminoAction {
|
|
|
1499
1608
|
console.log('Withdraw: Requesting elevation group', overrideElevationGroupRequest);
|
|
1500
1609
|
// Skip the withdrawn reserve if we are in the process of closing it:
|
|
1501
1610
|
const skipReserveIfClosing = this.amount.eq(new bn_js_1.default(utils_1.U64_MAX)) ? [this.reserve.address] : [];
|
|
1502
|
-
|
|
1503
|
-
|
|
1611
|
+
this.addRefreshObligationIx('cleanup', skipReserveIfClosing);
|
|
1612
|
+
this.addRequestElevationIx(overrideElevationGroupRequest, 'cleanup', skipReserveIfClosing);
|
|
1504
1613
|
}
|
|
1505
1614
|
}
|
|
1506
1615
|
if (!useV2Ixs) {
|
|
@@ -1508,17 +1617,17 @@ class KaminoAction {
|
|
|
1508
1617
|
// If this is an setup ix (therefore not an in-between), it means it's either a one off action
|
|
1509
1618
|
// or the first of a two-token-action
|
|
1510
1619
|
if (action === 'liquidate') {
|
|
1511
|
-
|
|
1512
|
-
|
|
1620
|
+
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1621
|
+
this.addRefreshFarmsForReserve([this.reserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1513
1622
|
}
|
|
1514
1623
|
else if (action === 'depositAndBorrow' ||
|
|
1515
1624
|
action === 'depositCollateral' ||
|
|
1516
1625
|
action === 'withdraw' ||
|
|
1517
1626
|
action === 'deposit') {
|
|
1518
|
-
|
|
1627
|
+
this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Collateral, undefined, twoTokenAction);
|
|
1519
1628
|
}
|
|
1520
1629
|
else if (action === 'repayAndWithdraw' || action === 'borrow' || action === 'repay') {
|
|
1521
|
-
|
|
1630
|
+
this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Debt, undefined, twoTokenAction);
|
|
1522
1631
|
}
|
|
1523
1632
|
else {
|
|
1524
1633
|
throw new Error(`Could not decide on refresh farm for action ${action}`);
|
|
@@ -1529,10 +1638,10 @@ class KaminoAction {
|
|
|
1529
1638
|
// so we skip the refresh farm obligation of the first reserve as that operation already happened
|
|
1530
1639
|
// add added to 'setup' ixs
|
|
1531
1640
|
if (action === 'depositAndBorrow') {
|
|
1532
|
-
|
|
1641
|
+
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1533
1642
|
}
|
|
1534
1643
|
else if (action === 'repayAndWithdraw') {
|
|
1535
|
-
|
|
1644
|
+
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1536
1645
|
}
|
|
1537
1646
|
else {
|
|
1538
1647
|
throw new Error(`Could not decide on refresh farm for action ${action}`);
|
|
@@ -1543,40 +1652,38 @@ class KaminoAction {
|
|
|
1543
1652
|
}
|
|
1544
1653
|
async addSupportIxs(action, includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, twoTokenAction = false, overrideElevationGroupRequest) {
|
|
1545
1654
|
if (!['mint', 'redeem'].includes(action)) {
|
|
1546
|
-
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner
|
|
1655
|
+
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner);
|
|
1547
1656
|
if (!ownerUserMetadata && !initUserMetadata.skipInitialization) {
|
|
1548
|
-
let lookupTable =
|
|
1657
|
+
let lookupTable = web3_js_1.PublicKey.default;
|
|
1549
1658
|
if (!initUserMetadata.skipLutCreation) {
|
|
1550
|
-
const [createLutIx, lookupTableAddress] = await (0, utils_1.createLookupTableIx)(this.kaminoMarket.
|
|
1659
|
+
const [createLutIx, lookupTableAddress] = await (0, utils_1.createLookupTableIx)(this.kaminoMarket.getConnection(), this.owner);
|
|
1551
1660
|
lookupTable = lookupTableAddress;
|
|
1552
1661
|
this.setupIxs.push(createLutIx);
|
|
1553
|
-
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress}]`);
|
|
1662
|
+
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress.toString()}]`);
|
|
1554
1663
|
}
|
|
1555
|
-
|
|
1664
|
+
this.addInitUserMetadataIxs(lookupTable);
|
|
1556
1665
|
}
|
|
1557
1666
|
await this.addInitObligationIxs();
|
|
1558
1667
|
}
|
|
1559
1668
|
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, 'setup', requestElevationGroup, addInitObligationForFarm, twoTokenAction, overrideElevationGroupRequest);
|
|
1560
|
-
const allReserves = [
|
|
1561
|
-
...
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
]),
|
|
1568
|
-
];
|
|
1669
|
+
const allReserves = new utils_1.PublicKeySet([
|
|
1670
|
+
...this.depositReserves,
|
|
1671
|
+
...this.borrowReserves,
|
|
1672
|
+
this.reserve.address,
|
|
1673
|
+
...(this.outflowReserve ? [this.outflowReserve.address] : []),
|
|
1674
|
+
...(this.preLoadedDepositReservesSameTx ? this.preLoadedDepositReservesSameTx : []),
|
|
1675
|
+
]).toArray();
|
|
1569
1676
|
const tokenIds = (0, market_1.getTokenIdsForScopeRefresh)(this.kaminoMarket, allReserves);
|
|
1570
1677
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
1571
1678
|
await this.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, scopeRefreshConfig.scopeFeed);
|
|
1572
1679
|
}
|
|
1573
1680
|
}
|
|
1574
|
-
static optionalAccount(pubkey) {
|
|
1681
|
+
static optionalAccount(pubkey, programId = lib_1.PROGRAM_ID) {
|
|
1575
1682
|
if ((0, utils_1.isNotNullPubkey)(pubkey)) {
|
|
1576
|
-
return
|
|
1683
|
+
return pubkey;
|
|
1577
1684
|
}
|
|
1578
1685
|
else {
|
|
1579
|
-
return
|
|
1686
|
+
return programId;
|
|
1580
1687
|
}
|
|
1581
1688
|
}
|
|
1582
1689
|
addRefreshReserveIxs(reserves, addAsSupportIx = 'setup') {
|
|
@@ -1589,10 +1696,10 @@ class KaminoAction {
|
|
|
1589
1696
|
const refreshReserveIx = (0, instructions_1.refreshReserve)({
|
|
1590
1697
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1591
1698
|
reserve: reserveAddress,
|
|
1592
|
-
pythOracle: KaminoAction.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
1593
|
-
switchboardPriceOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator),
|
|
1594
|
-
switchboardTwapOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator),
|
|
1595
|
-
scopePrices: KaminoAction.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
1699
|
+
pythOracle: KaminoAction.optionalAccount(state.config.tokenInfo.pythConfiguration.price, this.kaminoMarket.programId),
|
|
1700
|
+
switchboardPriceOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator, this.kaminoMarket.programId),
|
|
1701
|
+
switchboardTwapOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator, this.kaminoMarket.programId),
|
|
1702
|
+
scopePrices: KaminoAction.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed, this.kaminoMarket.programId),
|
|
1596
1703
|
}, this.kaminoMarket.programId);
|
|
1597
1704
|
if (addAsSupportIx === 'setup') {
|
|
1598
1705
|
this.setupIxs.push(refreshReserveIx);
|
|
@@ -1618,43 +1725,43 @@ class KaminoAction {
|
|
|
1618
1725
|
return (0, instructions_1.refreshReserve)({
|
|
1619
1726
|
reserve: reserveAddress,
|
|
1620
1727
|
lendingMarket: state.lendingMarket,
|
|
1621
|
-
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
1622
|
-
switchboardPriceOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator),
|
|
1623
|
-
switchboardTwapOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator),
|
|
1624
|
-
scopePrices: this.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
1728
|
+
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price, kaminoMarket.programId),
|
|
1729
|
+
switchboardPriceOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator, kaminoMarket.programId),
|
|
1730
|
+
switchboardTwapOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator, kaminoMarket.programId),
|
|
1731
|
+
scopePrices: this.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed, kaminoMarket.programId),
|
|
1625
1732
|
}, kaminoMarket.programId);
|
|
1626
1733
|
});
|
|
1627
1734
|
}
|
|
1628
|
-
|
|
1735
|
+
addRefreshObligationIx(addAsSupportIx = 'setup', skipReserves = []) {
|
|
1629
1736
|
const marketAddress = this.kaminoMarket.getAddress();
|
|
1630
|
-
const obligationPda =
|
|
1631
|
-
|
|
1737
|
+
const obligationPda = this.getObligationPda();
|
|
1738
|
+
const refreshObligationIx = (0, instructions_1.refreshObligation)({
|
|
1632
1739
|
lendingMarket: marketAddress,
|
|
1633
1740
|
obligation: obligationPda,
|
|
1634
1741
|
}, this.kaminoMarket.programId);
|
|
1635
|
-
const skipReservesSet = new
|
|
1636
|
-
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.
|
|
1742
|
+
const skipReservesSet = new utils_1.PublicKeySet(skipReserves);
|
|
1743
|
+
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.contains(reserve));
|
|
1637
1744
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1638
|
-
return {
|
|
1745
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1639
1746
|
});
|
|
1640
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
1747
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.contains(reserve));
|
|
1641
1748
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1642
|
-
return {
|
|
1749
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1643
1750
|
});
|
|
1644
|
-
const borrowReservesReferrerTokenStates =
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
return this.
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1751
|
+
const borrowReservesReferrerTokenStates = borrowReservesList
|
|
1752
|
+
.map((reserve) => {
|
|
1753
|
+
if (this.referrer.equals(web3_js_1.PublicKey.default)) {
|
|
1754
|
+
return { pubkey: this.kaminoMarket.programId, isSigner: false, isWritable: false };
|
|
1755
|
+
}
|
|
1756
|
+
const referrerTokenStateAddress = (0, utils_1.referrerTokenStatePda)(this.referrer, reserve, this.kaminoMarket.programId)[0];
|
|
1757
|
+
return { pubkey: referrerTokenStateAddress, isSigner: false, isWritable: true };
|
|
1758
|
+
})
|
|
1759
|
+
.filter((x) => !x.pubkey.equals(this.kaminoMarket.programId));
|
|
1760
|
+
refreshObligationIx.keys = refreshObligationIx.keys.concat([
|
|
1761
|
+
...depositReserveAccountMetas,
|
|
1762
|
+
...borrowReserveAccountMetas,
|
|
1763
|
+
...borrowReservesReferrerTokenStates,
|
|
1764
|
+
]);
|
|
1658
1765
|
if (addAsSupportIx === 'setup') {
|
|
1659
1766
|
this.setupIxs.push(refreshObligationIx);
|
|
1660
1767
|
this.setupIxsLabels.push(`RefreshObligation[${obligationPda.toString()}]`);
|
|
@@ -1668,8 +1775,8 @@ class KaminoAction {
|
|
|
1668
1775
|
this.cleanupIxsLabels.push(`RefreshObligation[${obligationPda.toString()}]`);
|
|
1669
1776
|
}
|
|
1670
1777
|
}
|
|
1671
|
-
|
|
1672
|
-
const obligationPda =
|
|
1778
|
+
addRequestElevationIx(elevationGroup, addAsSupportIx, skipReserves = []) {
|
|
1779
|
+
const obligationPda = this.getObligationPda();
|
|
1673
1780
|
const args = {
|
|
1674
1781
|
elevationGroup,
|
|
1675
1782
|
};
|
|
@@ -1678,30 +1785,31 @@ class KaminoAction {
|
|
|
1678
1785
|
obligation: obligationPda,
|
|
1679
1786
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1680
1787
|
};
|
|
1681
|
-
|
|
1682
|
-
const skipReservesSet = new
|
|
1683
|
-
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.
|
|
1788
|
+
const requestElevationGroupIx = (0, instructions_1.requestElevationGroup)(args, accounts, this.kaminoMarket.programId);
|
|
1789
|
+
const skipReservesSet = new utils_1.PublicKeySet(skipReserves);
|
|
1790
|
+
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.contains(reserve));
|
|
1684
1791
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1685
|
-
return {
|
|
1792
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1686
1793
|
});
|
|
1687
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
1794
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.contains(reserve));
|
|
1688
1795
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1689
|
-
return {
|
|
1796
|
+
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1690
1797
|
});
|
|
1691
|
-
const borrowReservesReferrerTokenStates =
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
return this.
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1798
|
+
const borrowReservesReferrerTokenStates = borrowReservesList
|
|
1799
|
+
.map((reserve) => {
|
|
1800
|
+
if (this.referrer.equals(web3_js_1.PublicKey.default)) {
|
|
1801
|
+
return { pubkey: this.kaminoMarket.programId, isSigner: false, isWritable: false };
|
|
1802
|
+
}
|
|
1803
|
+
const reserveState = this.kaminoMarket.getReserveByAddress(reserve);
|
|
1804
|
+
const referrerTokenStateAddress = (0, utils_1.referrerTokenStatePda)(this.referrer, reserveState.address, this.kaminoMarket.programId)[0];
|
|
1805
|
+
return { pubkey: referrerTokenStateAddress, isSigner: false, isWritable: true };
|
|
1806
|
+
})
|
|
1807
|
+
.filter((x) => !x.pubkey.equals(this.kaminoMarket.programId));
|
|
1808
|
+
requestElevationGroupIx.keys = requestElevationGroupIx.keys.concat([
|
|
1809
|
+
...depositReserveAccountMetas,
|
|
1810
|
+
...borrowReserveAccountMetas,
|
|
1811
|
+
...borrowReservesReferrerTokenStates,
|
|
1812
|
+
]);
|
|
1705
1813
|
if (addAsSupportIx === 'setup') {
|
|
1706
1814
|
this.setupIxs.push(requestElevationGroupIx);
|
|
1707
1815
|
this.setupIxsLabels.push(`RequestElevation[${obligationPda}], elevation_group:${elevationGroup}`);
|
|
@@ -1715,65 +1823,63 @@ class KaminoAction {
|
|
|
1715
1823
|
this.cleanupIxsLabels.push(`RequestElevation[${obligationPda}], elevation_group:${elevationGroup}`);
|
|
1716
1824
|
}
|
|
1717
1825
|
}
|
|
1718
|
-
|
|
1826
|
+
addRefreshFarmsForReserve(reserves, addAsSupportIx = 'setup', mode, crank = this.payer, twoTokenAction = false) {
|
|
1719
1827
|
const farms = [];
|
|
1720
|
-
const obligationAddress = await this.getObligationPda();
|
|
1721
1828
|
for (const kaminoReserve of reserves) {
|
|
1722
|
-
if (mode === types_1.ReserveFarmKind.Collateral && kaminoReserve.state.farmCollateral
|
|
1829
|
+
if (mode === types_1.ReserveFarmKind.Collateral && !kaminoReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)) {
|
|
1723
1830
|
farms.push([
|
|
1724
1831
|
types_1.ReserveFarmKind.Collateral,
|
|
1725
1832
|
kaminoReserve.state.farmCollateral,
|
|
1726
|
-
|
|
1833
|
+
(0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmCollateral, this.getObligationPda()),
|
|
1727
1834
|
kaminoReserve,
|
|
1728
1835
|
]);
|
|
1729
1836
|
}
|
|
1730
|
-
if (mode === types_1.ReserveFarmKind.Debt && kaminoReserve.state.farmDebt
|
|
1837
|
+
if (mode === types_1.ReserveFarmKind.Debt && !kaminoReserve.state.farmDebt.equals(web3_js_1.PublicKey.default)) {
|
|
1731
1838
|
farms.push([
|
|
1732
1839
|
types_1.ReserveFarmKind.Debt,
|
|
1733
1840
|
kaminoReserve.state.farmDebt,
|
|
1734
|
-
|
|
1841
|
+
(0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmDebt, this.getObligationPda()),
|
|
1735
1842
|
kaminoReserve,
|
|
1736
1843
|
]);
|
|
1737
1844
|
}
|
|
1738
1845
|
}
|
|
1739
|
-
|
|
1740
|
-
for (const arg of farms) {
|
|
1846
|
+
farms.forEach((arg) => {
|
|
1741
1847
|
const args = { mode: arg[0].discriminator };
|
|
1742
1848
|
const accounts = {
|
|
1743
1849
|
crank,
|
|
1744
1850
|
baseAccounts: {
|
|
1745
|
-
obligation:
|
|
1746
|
-
lendingMarketAuthority,
|
|
1851
|
+
obligation: this.getObligationPda(),
|
|
1852
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1747
1853
|
reserve: arg[3].address,
|
|
1748
1854
|
reserveFarmState: arg[1],
|
|
1749
1855
|
obligationFarmUserState: arg[2],
|
|
1750
1856
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1751
1857
|
},
|
|
1752
|
-
farmsProgram:
|
|
1753
|
-
rent:
|
|
1754
|
-
systemProgram:
|
|
1858
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1859
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
1860
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
1755
1861
|
};
|
|
1756
1862
|
const refreshFarmForObligationix = (0, instructions_1.refreshObligationFarmsForReserve)(args, accounts, this.kaminoMarket.programId);
|
|
1757
1863
|
if (addAsSupportIx === 'setup') {
|
|
1758
1864
|
this.setupIxs.push(refreshFarmForObligationix);
|
|
1759
|
-
this.setupIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${
|
|
1865
|
+
this.setupIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`);
|
|
1760
1866
|
if (twoTokenAction) {
|
|
1761
1867
|
// If two token action, this refresh needs to be the first inbetween ix
|
|
1762
1868
|
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
1763
|
-
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${
|
|
1869
|
+
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`);
|
|
1764
1870
|
}
|
|
1765
1871
|
else {
|
|
1766
1872
|
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
1767
|
-
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${
|
|
1873
|
+
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`);
|
|
1768
1874
|
}
|
|
1769
1875
|
}
|
|
1770
1876
|
else if (addAsSupportIx === 'inBetween') {
|
|
1771
1877
|
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
1772
|
-
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${
|
|
1878
|
+
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`);
|
|
1773
1879
|
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
1774
|
-
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${
|
|
1880
|
+
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`);
|
|
1775
1881
|
}
|
|
1776
|
-
}
|
|
1882
|
+
});
|
|
1777
1883
|
}
|
|
1778
1884
|
addRefreshFarmsCleanupTxnIxsToCleanupIxs() {
|
|
1779
1885
|
this.cleanupIxs.splice(0, 0, ...this.refreshFarmsCleanupTxnIxs);
|
|
@@ -1781,52 +1887,50 @@ class KaminoAction {
|
|
|
1781
1887
|
}
|
|
1782
1888
|
async addInitObligationForFarm(reserve, mode, addAsSupportIx = 'setup') {
|
|
1783
1889
|
const farms = [];
|
|
1784
|
-
const obligationAddress = await this.getObligationPda();
|
|
1785
1890
|
if (mode === types_1.ReserveFarmKind.Collateral && (0, utils_1.isNotNullPubkey)(reserve.state.farmCollateral)) {
|
|
1786
|
-
const pda =
|
|
1787
|
-
const account = await
|
|
1788
|
-
if (!account
|
|
1891
|
+
const pda = (0, utils_1.obligationFarmStatePda)(reserve.state.farmCollateral, this.getObligationPda());
|
|
1892
|
+
const account = await this.kaminoMarket.getConnection().getAccountInfo(pda);
|
|
1893
|
+
if (!account) {
|
|
1789
1894
|
farms.push([types_1.ReserveFarmKind.Collateral.discriminator, reserve.state.farmCollateral, pda]);
|
|
1790
1895
|
}
|
|
1791
1896
|
}
|
|
1792
1897
|
if (mode === types_1.ReserveFarmKind.Debt && (0, utils_1.isNotNullPubkey)(reserve.state.farmDebt)) {
|
|
1793
|
-
const pda =
|
|
1794
|
-
const account = await
|
|
1795
|
-
if (!account
|
|
1898
|
+
const pda = (0, utils_1.obligationFarmStatePda)(reserve.state.farmDebt, this.getObligationPda());
|
|
1899
|
+
const account = await this.kaminoMarket.getConnection().getAccountInfo(pda);
|
|
1900
|
+
if (!account) {
|
|
1796
1901
|
farms.push([types_1.ReserveFarmKind.Debt.discriminator, reserve.state.farmDebt, pda]);
|
|
1797
1902
|
}
|
|
1798
1903
|
}
|
|
1799
|
-
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
1800
1904
|
farms.forEach((arg) => {
|
|
1801
1905
|
const args = { mode: arg[0] };
|
|
1802
1906
|
const accounts = {
|
|
1803
|
-
owner: (0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.owner : this.owner
|
|
1907
|
+
owner: (0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.owner : this.owner,
|
|
1804
1908
|
payer: this.owner,
|
|
1805
|
-
obligation:
|
|
1806
|
-
lendingMarketAuthority,
|
|
1909
|
+
obligation: this.getObligationPda(),
|
|
1910
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1807
1911
|
reserve: reserve.address,
|
|
1808
1912
|
reserveFarmState: arg[1],
|
|
1809
1913
|
obligationFarm: arg[2],
|
|
1810
1914
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1811
|
-
farmsProgram:
|
|
1812
|
-
rent:
|
|
1813
|
-
systemProgram:
|
|
1915
|
+
farmsProgram: farms_sdk_1.farmsId,
|
|
1916
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
1917
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
1814
1918
|
};
|
|
1815
1919
|
const initObligationForFarm = (0, instructions_1.initObligationFarmsForReserve)(args, accounts, this.kaminoMarket.programId);
|
|
1816
1920
|
if (addAsSupportIx === 'setup') {
|
|
1817
1921
|
this.setupIxs.push(initObligationForFarm);
|
|
1818
|
-
this.setupIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
1922
|
+
this.setupIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${this.getObligationPda().toString()}]`);
|
|
1819
1923
|
}
|
|
1820
1924
|
else if (addAsSupportIx === 'inBetween') {
|
|
1821
1925
|
this.inBetweenIxs.push(initObligationForFarm);
|
|
1822
|
-
this.inBetweenIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
1926
|
+
this.inBetweenIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${this.getObligationPda().toString()}]`);
|
|
1823
1927
|
}
|
|
1824
1928
|
});
|
|
1825
1929
|
}
|
|
1826
|
-
|
|
1930
|
+
addInitObligationIxs() {
|
|
1827
1931
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1828
|
-
const obligationPda =
|
|
1829
|
-
const [userMetadataAddress] =
|
|
1932
|
+
const obligationPda = this.getObligationPda();
|
|
1933
|
+
const [userMetadataAddress, _bump] = (0, utils_1.userMetadataPda)(this.owner, this.kaminoMarket.programId);
|
|
1830
1934
|
const initObligationIx = (0, instructions_1.initObligation)({
|
|
1831
1935
|
args: {
|
|
1832
1936
|
tag: this.obligation.toArgs().tag,
|
|
@@ -1840,16 +1944,18 @@ class KaminoAction {
|
|
|
1840
1944
|
seed1Account: this.obligation.toArgs().seed1,
|
|
1841
1945
|
seed2Account: this.obligation.toArgs().seed2,
|
|
1842
1946
|
ownerUserMetadata: userMetadataAddress,
|
|
1843
|
-
rent:
|
|
1844
|
-
systemProgram:
|
|
1947
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
1948
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
1845
1949
|
}, this.kaminoMarket.programId);
|
|
1846
1950
|
this.setupIxs.push(initObligationIx);
|
|
1847
1951
|
this.setupIxsLabels.push(`InitObligation[${obligationPda.toString()}]`);
|
|
1848
1952
|
}
|
|
1849
1953
|
}
|
|
1850
|
-
|
|
1851
|
-
const [userMetadataAddress] =
|
|
1852
|
-
const referrerUserMetadataAddress =
|
|
1954
|
+
addInitUserMetadataIxs(lookupTableAddress) {
|
|
1955
|
+
const [userMetadataAddress, _bump] = (0, utils_1.userMetadataPda)(this.owner, this.kaminoMarket.programId);
|
|
1956
|
+
const referrerUserMetadataAddress = this.referrer.equals(web3_js_1.PublicKey.default)
|
|
1957
|
+
? this.kaminoMarket.programId
|
|
1958
|
+
: (0, utils_1.userMetadataPda)(this.referrer, this.kaminoMarket.programId)[0];
|
|
1853
1959
|
const initUserMetadataIx = (0, instructions_1.initUserMetadata)({
|
|
1854
1960
|
userLookupTable: lookupTableAddress,
|
|
1855
1961
|
}, {
|
|
@@ -1857,30 +1963,27 @@ class KaminoAction {
|
|
|
1857
1963
|
feePayer: this.payer,
|
|
1858
1964
|
userMetadata: userMetadataAddress,
|
|
1859
1965
|
referrerUserMetadata: referrerUserMetadataAddress,
|
|
1860
|
-
rent:
|
|
1861
|
-
systemProgram:
|
|
1966
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
1967
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
1862
1968
|
}, this.kaminoMarket.programId);
|
|
1863
1969
|
this.setupIxs.push(initUserMetadataIx);
|
|
1864
1970
|
this.setupIxsLabels.push(`initUserMetadata[${userMetadataAddress.toString()}]`);
|
|
1865
1971
|
}
|
|
1866
1972
|
addInitReferrerTokenStateIx(reserve, referrerTokenState) {
|
|
1867
|
-
if ((0, kit_1.isNone)(this.referrer)) {
|
|
1868
|
-
throw new Error('Referrer is not set');
|
|
1869
|
-
}
|
|
1870
1973
|
const initReferrerTokenStateIx = (0, instructions_1.initReferrerTokenState)({
|
|
1871
1974
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1872
1975
|
payer: this.owner,
|
|
1873
1976
|
reserve: reserve.address,
|
|
1874
|
-
referrer: this.referrer
|
|
1977
|
+
referrer: this.referrer,
|
|
1875
1978
|
referrerTokenState,
|
|
1876
|
-
rent:
|
|
1877
|
-
systemProgram:
|
|
1979
|
+
rent: web3_js_1.SYSVAR_RENT_PUBKEY,
|
|
1980
|
+
systemProgram: web3_js_1.SystemProgram.programId,
|
|
1878
1981
|
}, this.kaminoMarket.programId);
|
|
1879
1982
|
this.setupIxs.unshift(initReferrerTokenStateIx);
|
|
1880
1983
|
this.setupIxsLabels.unshift(`InitReferrerTokenState[${referrerTokenState.toString()} res=${reserve.address}]`);
|
|
1881
1984
|
}
|
|
1882
|
-
|
|
1883
|
-
const referrerTokenStateAddress =
|
|
1985
|
+
addWithdrawReferrerFeesIxs() {
|
|
1986
|
+
const referrerTokenStateAddress = (0, utils_1.referrerTokenStatePda)(this.owner, this.reserve.address, this.kaminoMarket.programId)[0];
|
|
1884
1987
|
const withdrawReferrerFeesIx = (0, instructions_1.withdrawReferrerFees)({
|
|
1885
1988
|
referrer: this.owner,
|
|
1886
1989
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
@@ -1888,8 +1991,8 @@ class KaminoAction {
|
|
|
1888
1991
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1889
1992
|
referrerTokenState: referrerTokenStateAddress,
|
|
1890
1993
|
reserveSupplyLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1891
|
-
referrerTokenAccount:
|
|
1892
|
-
lendingMarketAuthority:
|
|
1994
|
+
referrerTokenAccount: this.getUserTokenAccountAddress(this.reserve),
|
|
1995
|
+
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1893
1996
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1894
1997
|
}, this.kaminoMarket.programId);
|
|
1895
1998
|
this.lendingIxs.push(withdrawReferrerFeesIx);
|
|
@@ -1900,51 +2003,48 @@ class KaminoAction {
|
|
|
1900
2003
|
this.computeBudgetIxsLabels.push(`AddComputeBudget[${units}]`);
|
|
1901
2004
|
}
|
|
1902
2005
|
async addAtaIxs(action) {
|
|
1903
|
-
if (this.mint
|
|
2006
|
+
if (this.mint.equals(spl_token_1.NATIVE_MINT) || this.secondaryMint?.equals(spl_token_1.NATIVE_MINT)) {
|
|
1904
2007
|
await this.updateWSOLAccount(action);
|
|
1905
2008
|
}
|
|
1906
|
-
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') && this.mint
|
|
1907
|
-
const
|
|
1908
|
-
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner.address, this.reserve.getLiquidityTokenProgram(), reserveAta);
|
|
2009
|
+
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') && !this.mint.equals(spl_token_1.NATIVE_MINT)) {
|
|
2010
|
+
const [, createUserTokenAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner, this.reserve.getLiquidityTokenProgram(), this.getUserTokenAccountAddress(this.reserve));
|
|
1909
2011
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
1910
|
-
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${
|
|
2012
|
+
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${this.owner}]`);
|
|
1911
2013
|
}
|
|
1912
2014
|
if (action === 'liquidate') {
|
|
1913
2015
|
if (!this.outflowReserve) {
|
|
1914
2016
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
1915
2017
|
}
|
|
1916
|
-
const
|
|
1917
|
-
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner.address, this.outflowReserve.getLiquidityTokenProgram(), outflowReserveAta);
|
|
2018
|
+
const [, createUserTokenAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner, this.outflowReserve.getLiquidityTokenProgram(), this.getUserTokenAccountAddress(this.outflowReserve));
|
|
1918
2019
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
1919
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
1920
|
-
const
|
|
1921
|
-
const [, createUserCollateralAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getCTokenMint(), this.owner.address, token_1.TOKEN_PROGRAM_ADDRESS, ctokenAta);
|
|
2020
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${this.getUserTokenAccountAddress(this.outflowReserve).toBase58()}]`);
|
|
2021
|
+
const [, createUserCollateralAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getCTokenMint(), this.owner, spl_token_1.TOKEN_PROGRAM_ID, this.getUserCollateralAccountAddress(this.outflowReserve));
|
|
1922
2022
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
1923
|
-
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${
|
|
2023
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${this.getUserCollateralAccountAddress(this.outflowReserve).toString()}]`);
|
|
1924
2024
|
}
|
|
1925
|
-
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' && this.secondaryMint
|
|
2025
|
+
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' && !this.secondaryMint?.equals(spl_token_1.NATIVE_MINT))) {
|
|
1926
2026
|
if (!this.outflowReserve) {
|
|
1927
2027
|
throw new Error(`Outflow reserve state not found ${this.mint}`);
|
|
1928
2028
|
}
|
|
1929
|
-
const additionalUserTokenAccountAddress =
|
|
1930
|
-
const additionalUserTokenAccountInfo = await
|
|
1931
|
-
|
|
1932
|
-
|
|
2029
|
+
const additionalUserTokenAccountAddress = this.getUserTokenAccountAddress(this.outflowReserve);
|
|
2030
|
+
const additionalUserTokenAccountInfo = await this.kaminoMarket
|
|
2031
|
+
.getConnection()
|
|
2032
|
+
.getAccountInfo(additionalUserTokenAccountAddress);
|
|
2033
|
+
if (!additionalUserTokenAccountInfo) {
|
|
2034
|
+
const [, createUserTokenAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner, this.outflowReserve.getLiquidityTokenProgram(), additionalUserTokenAccountAddress);
|
|
1933
2035
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
1934
2036
|
this.setupIxsLabels.unshift(`CreateAdditionalUserTokenAta[${this.owner}]`);
|
|
1935
2037
|
}
|
|
1936
2038
|
}
|
|
1937
2039
|
if (action === 'withdraw' || action === 'mint' || action === 'deposit' || action === 'repayAndWithdraw') {
|
|
1938
|
-
const
|
|
1939
|
-
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner.address, this.reserve.getLiquidityTokenProgram(), reserveAta);
|
|
2040
|
+
const [, createUserTokenAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner, this.reserve.getLiquidityTokenProgram(), this.getUserTokenAccountAddress(this.reserve));
|
|
1940
2041
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
1941
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
2042
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${this.getUserTokenAccountAddress(this.reserve).toBase58()}]`);
|
|
1942
2043
|
}
|
|
1943
2044
|
if (action === 'mint') {
|
|
1944
|
-
const
|
|
1945
|
-
const [, createUserCollateralAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getCTokenMint(), this.owner.address, token_1.TOKEN_PROGRAM_ADDRESS, ctokenAta);
|
|
2045
|
+
const [, createUserCollateralAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getCTokenMint(), this.owner, spl_token_1.TOKEN_PROGRAM_ID, this.getUserCollateralAccountAddress(this.reserve));
|
|
1946
2046
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
1947
|
-
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${
|
|
2047
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${this.getUserCollateralAccountAddress(this.reserve).toString()}]`);
|
|
1948
2048
|
}
|
|
1949
2049
|
}
|
|
1950
2050
|
async updateWSOLAccount(action) {
|
|
@@ -1961,7 +2061,7 @@ class KaminoAction {
|
|
|
1961
2061
|
this.amount.eq(new bn_js_1.default(utils_1.U64_MAX))) {
|
|
1962
2062
|
const borrow = this.obligation.state.borrows.find((borrow) => borrow.borrowReserve.toString() === this.reserve.address.toString());
|
|
1963
2063
|
if (!borrow) {
|
|
1964
|
-
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner}`);
|
|
2064
|
+
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner.toBase58()}`);
|
|
1965
2065
|
}
|
|
1966
2066
|
const cumulativeBorrowRateObligation = obligation_1.KaminoObligation.getCumulativeBorrowRate(borrow);
|
|
1967
2067
|
const cumulativeBorrowRateReserve = this.reserve.getEstimatedCumulativeBorrowRate(this.currentSlot, this.kaminoMarket.state.referralFeeBps);
|
|
@@ -1971,37 +2071,32 @@ class KaminoAction {
|
|
|
1971
2071
|
.add(new decimal_js_1.default(utils_1.SOL_PADDING_FOR_INTEREST.toString()))
|
|
1972
2072
|
.toNumber()).toString());
|
|
1973
2073
|
}
|
|
1974
|
-
let userTokenAccountAddress =
|
|
1975
|
-
if (this.secondaryMint
|
|
2074
|
+
let userTokenAccountAddress = this.getUserTokenAccountAddress(this.reserve);
|
|
2075
|
+
if (this.secondaryMint?.equals(spl_token_1.NATIVE_MINT)) {
|
|
1976
2076
|
if (!this.outflowReserve) {
|
|
1977
2077
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
1978
2078
|
}
|
|
1979
|
-
|
|
2079
|
+
const additionalUserTokenAccountAddress = this.getUserTokenAccountAddress(this.outflowReserve);
|
|
2080
|
+
userTokenAccountAddress = additionalUserTokenAccountAddress;
|
|
1980
2081
|
}
|
|
1981
|
-
const userWSOLAccountInfo = await
|
|
1982
|
-
const
|
|
2082
|
+
const userWSOLAccountInfo = await this.kaminoMarket.getConnection().getAccountInfo(userTokenAccountAddress);
|
|
2083
|
+
const rentExempt = await this.kaminoMarket.getConnection().getMinimumBalanceForRentExemption(165);
|
|
1983
2084
|
// Add rent exemption lamports for WSOL accounts that need to be pre-funded for inflow/send transactions
|
|
1984
2085
|
const sendAction = action === 'deposit' ||
|
|
1985
2086
|
action === 'repay' ||
|
|
1986
2087
|
action === 'repayAndWithdrawV2' ||
|
|
1987
2088
|
action === 'mint' ||
|
|
1988
|
-
(action === 'liquidate' && this.mint
|
|
1989
|
-
const transferLamportsIx =
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2089
|
+
(action === 'liquidate' && this.mint?.equals(spl_token_1.NATIVE_MINT)); // only sync WSOL amount if liquidator repays SOL which is secondaryMint
|
|
2090
|
+
const transferLamportsIx = web3_js_1.SystemProgram.transfer({
|
|
2091
|
+
fromPubkey: this.owner,
|
|
2092
|
+
toPubkey: userTokenAccountAddress,
|
|
2093
|
+
lamports: (userWSOLAccountInfo ? 0 : rentExempt) + (sendAction ? parseInt(safeRepay.toString(), 10) : 0),
|
|
1993
2094
|
});
|
|
1994
2095
|
preIxs.push(transferLamportsIx);
|
|
1995
2096
|
preIxsLabels.push(`TransferLamportsToUserAtaSOL[${userTokenAccountAddress}]`);
|
|
1996
|
-
const closeWSOLAccountIx = (0,
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
destination: this.owner.address,
|
|
2000
|
-
}, { programAddress: token_1.TOKEN_PROGRAM_ADDRESS });
|
|
2001
|
-
const syncIx = (0, token_2022_1.getSyncNativeInstruction)({
|
|
2002
|
-
account: userTokenAccountAddress,
|
|
2003
|
-
}, { programAddress: token_1.TOKEN_PROGRAM_ADDRESS });
|
|
2004
|
-
if (userWSOLAccountInfo.exists) {
|
|
2097
|
+
const closeWSOLAccountIx = (0, spl_token_1.createCloseAccountInstruction)(userTokenAccountAddress, this.owner, this.owner, [], spl_token_1.TOKEN_PROGRAM_ID);
|
|
2098
|
+
const syncIx = (0, spl_token_1.createSyncNativeInstruction)(userTokenAccountAddress);
|
|
2099
|
+
if (userWSOLAccountInfo) {
|
|
2005
2100
|
if (sendAction) {
|
|
2006
2101
|
preIxs.push(syncIx);
|
|
2007
2102
|
preIxsLabels.push(`SyncUserAtaSOL[${userTokenAccountAddress}]`);
|
|
@@ -2012,7 +2107,7 @@ class KaminoAction {
|
|
|
2012
2107
|
}
|
|
2013
2108
|
}
|
|
2014
2109
|
else {
|
|
2015
|
-
const [, createUserWSOLAccountIx] =
|
|
2110
|
+
const [, createUserWSOLAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, spl_token_1.NATIVE_MINT, this.owner, spl_token_1.TOKEN_PROGRAM_ID, userTokenAccountAddress);
|
|
2016
2111
|
preIxs.push(createUserWSOLAccountIx);
|
|
2017
2112
|
preIxsLabels.push(`CreateUserAtaSOL[${userTokenAccountAddress}]`);
|
|
2018
2113
|
preIxs.push(syncIx);
|
|
@@ -2025,11 +2120,14 @@ class KaminoAction {
|
|
|
2025
2120
|
this.cleanupIxs.push(...postIxs);
|
|
2026
2121
|
this.cleanupIxsLabels.push(...postIxsLabels);
|
|
2027
2122
|
}
|
|
2028
|
-
static async initializeMultiTokenAction(kaminoMarket, action, inflowAmount, inflowTokenMint, outflowTokenMint,
|
|
2029
|
-
const inflowReserve = kaminoMarket.
|
|
2030
|
-
const outflowReserve = kaminoMarket.
|
|
2123
|
+
static async initializeMultiTokenAction(kaminoMarket, action, inflowAmount, inflowTokenMint, outflowTokenMint, payer, obligationOwner, obligation, outflowAmount, referrer = web3_js_1.PublicKey.default, currentSlot = 0) {
|
|
2124
|
+
const inflowReserve = kaminoMarket.getReserveByMint(inflowTokenMint);
|
|
2125
|
+
const outflowReserve = kaminoMarket.getReserveByMint(outflowTokenMint);
|
|
2126
|
+
if (!outflowReserve || !inflowReserve) {
|
|
2127
|
+
throw new Error('reserve states are not fetched');
|
|
2128
|
+
}
|
|
2031
2129
|
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, obligationOwner, inflowReserve.address, obligation, outflowReserve.address);
|
|
2032
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket,
|
|
2130
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, payer, kaminoObligation, referrer);
|
|
2033
2131
|
let secondaryMint;
|
|
2034
2132
|
let primaryMint;
|
|
2035
2133
|
if (action === 'liquidate' ||
|
|
@@ -2042,14 +2140,14 @@ class KaminoAction {
|
|
|
2042
2140
|
else {
|
|
2043
2141
|
throw new Error('Invalid action');
|
|
2044
2142
|
}
|
|
2045
|
-
return new KaminoAction(kaminoMarket,
|
|
2143
|
+
return new KaminoAction(kaminoMarket, payer, kaminoObligation || obligation, primaryMint, distinctReserveCount, inflowAmount, depositReserves, borrowReserves, inflowReserve, currentSlot, secondaryMint, outflowReserve, outflowAmount, referrerKey);
|
|
2046
2144
|
}
|
|
2047
|
-
static async initializeWithdrawReferrerFees(mint, owner, kaminoMarket, currentSlot =
|
|
2145
|
+
static async initializeWithdrawReferrerFees(mint, owner, kaminoMarket, currentSlot = 0) {
|
|
2048
2146
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
2049
2147
|
if (reserve === undefined) {
|
|
2050
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
2148
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress().toBase58()}`);
|
|
2051
2149
|
}
|
|
2052
|
-
const [{ createAtaIx }] =
|
|
2150
|
+
const [{ createAtaIx }] = (0, utils_1.createAtasIdempotent)(owner, [
|
|
2053
2151
|
{
|
|
2054
2152
|
mint: reserve.getLiquidityMint(),
|
|
2055
2153
|
tokenProgram: reserve.getLiquidityTokenProgram(),
|
|
@@ -2066,10 +2164,10 @@ class KaminoAction {
|
|
|
2066
2164
|
? amount
|
|
2067
2165
|
: new bn_js_1.default(new decimal_js_1.default(amount.toString()).mul(collateralExchangeRate).ceil().toString());
|
|
2068
2166
|
}
|
|
2069
|
-
|
|
2167
|
+
getObligationPda() {
|
|
2070
2168
|
return (0, obligation_1.isKaminoObligation)(this.obligation)
|
|
2071
2169
|
? this.obligation.obligationAddress
|
|
2072
|
-
:
|
|
2170
|
+
: this.obligation.toPda(this.kaminoMarket.getAddress(), this.owner);
|
|
2073
2171
|
}
|
|
2074
2172
|
isObligationInitialized() {
|
|
2075
2173
|
return this.obligation instanceof obligation_1.KaminoObligation;
|
|
@@ -2082,7 +2180,7 @@ class KaminoAction {
|
|
|
2082
2180
|
const preloadedDepositReserve = this.preLoadedDepositReservesSameTx[i];
|
|
2083
2181
|
// Check if the depositReserves array contains the current preloadedDepositReserve
|
|
2084
2182
|
const found = this.depositReserves.some((depositReserve) => {
|
|
2085
|
-
return depositReserve
|
|
2183
|
+
return depositReserve.equals(preloadedDepositReserve);
|
|
2086
2184
|
});
|
|
2087
2185
|
// If not found, push the current preloadedDepositReserve to the depositReserves array
|
|
2088
2186
|
if (!found) {
|
|
@@ -2091,39 +2189,29 @@ class KaminoAction {
|
|
|
2091
2189
|
}
|
|
2092
2190
|
return depositReservesList;
|
|
2093
2191
|
}
|
|
2094
|
-
static async
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
role: writable ? kit_1.AccountRole.WRITABLE : kit_1.AccountRole.READONLY,
|
|
2107
|
-
};
|
|
2108
|
-
}
|
|
2109
|
-
else {
|
|
2110
|
-
return {
|
|
2111
|
-
address: this.kaminoMarket.programId,
|
|
2112
|
-
role: kit_1.AccountRole.READONLY,
|
|
2113
|
-
};
|
|
2192
|
+
static async getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer) {
|
|
2193
|
+
let referrerKey = referrer;
|
|
2194
|
+
if (!referrer || referrer.equals(web3_js_1.PublicKey.default)) {
|
|
2195
|
+
if (kaminoObligation === null) {
|
|
2196
|
+
const [_, userMetadata] = await kaminoMarket.getUserMetadata(owner);
|
|
2197
|
+
if (userMetadata) {
|
|
2198
|
+
referrerKey = userMetadata.referrer;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
else {
|
|
2202
|
+
referrerKey = kaminoObligation.state.referrer;
|
|
2203
|
+
}
|
|
2114
2204
|
}
|
|
2115
|
-
|
|
2116
|
-
async getReferrerTokenStateAddress(reserve) {
|
|
2117
|
-
return KaminoAction.getReferrerTokenStateAddressImpl(this.referrer, reserve, this.kaminoMarket.programId);
|
|
2205
|
+
return referrerKey;
|
|
2118
2206
|
}
|
|
2119
2207
|
getUserTokenAccountAddress(reserve) {
|
|
2120
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), this.owner
|
|
2208
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), this.owner, true, reserve.getLiquidityTokenProgram());
|
|
2121
2209
|
}
|
|
2122
2210
|
getTokenAccountAddressByUser(reserve, user) {
|
|
2123
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), user, reserve.getLiquidityTokenProgram());
|
|
2211
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), user, true, reserve.getLiquidityTokenProgram());
|
|
2124
2212
|
}
|
|
2125
2213
|
getUserCollateralAccountAddress(reserve) {
|
|
2126
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getCTokenMint(), this.owner
|
|
2214
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getCTokenMint(), this.owner, true);
|
|
2127
2215
|
}
|
|
2128
2216
|
static actionToIxs(action) {
|
|
2129
2217
|
const ixs = [...action.computeBudgetIxs, ...action.setupIxs];
|
|
@@ -2157,58 +2245,6 @@ class KaminoAction {
|
|
|
2157
2245
|
}
|
|
2158
2246
|
return labels;
|
|
2159
2247
|
}
|
|
2160
|
-
static async getFarmAccountsForReserve(obligationAddress, reserve) {
|
|
2161
|
-
const collateralFarmAddress = reserve.getCollateralFarmAddress();
|
|
2162
|
-
let collateralFarmAccounts = {
|
|
2163
|
-
obligationFarmUserState: (0, kit_1.none)(),
|
|
2164
|
-
reserveFarmState: (0, kit_1.none)(),
|
|
2165
|
-
};
|
|
2166
|
-
if ((0, kit_1.isSome)(collateralFarmAddress)) {
|
|
2167
|
-
collateralFarmAccounts = {
|
|
2168
|
-
obligationFarmUserState: (0, kit_1.some)(await (0, utils_1.obligationFarmStatePda)(collateralFarmAddress.value, obligationAddress)),
|
|
2169
|
-
reserveFarmState: collateralFarmAddress,
|
|
2170
|
-
};
|
|
2171
|
-
}
|
|
2172
|
-
let debtFarmAccounts = {
|
|
2173
|
-
obligationFarmUserState: (0, kit_1.none)(),
|
|
2174
|
-
reserveFarmState: (0, kit_1.none)(),
|
|
2175
|
-
};
|
|
2176
|
-
const debtFarmAddress = reserve.getDebtFarmAddress();
|
|
2177
|
-
if ((0, kit_1.isSome)(debtFarmAddress)) {
|
|
2178
|
-
debtFarmAccounts = {
|
|
2179
|
-
obligationFarmUserState: (0, kit_1.some)(await (0, utils_1.obligationFarmStatePda)(debtFarmAddress.value, obligationAddress)),
|
|
2180
|
-
reserveFarmState: debtFarmAddress,
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
return {
|
|
2184
|
-
debtFarmAccounts,
|
|
2185
|
-
collateralFarmAccounts,
|
|
2186
|
-
};
|
|
2187
|
-
}
|
|
2188
|
-
static async getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer) {
|
|
2189
|
-
let referrerKey = (0, kit_1.none)();
|
|
2190
|
-
if ((0, kit_1.isNone)(referrer) || referrer.value === utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2191
|
-
if (kaminoObligation === null) {
|
|
2192
|
-
const [_, userMetadata] = await kaminoMarket.getUserMetadata(owner);
|
|
2193
|
-
if (userMetadata && userMetadata.referrer !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2194
|
-
referrerKey = (0, kit_1.some)(userMetadata.referrer);
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
else if (kaminoObligation.state.referrer !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2198
|
-
referrerKey = (0, kit_1.some)(kaminoObligation.state.referrer);
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
else {
|
|
2202
|
-
referrerKey = referrer;
|
|
2203
|
-
}
|
|
2204
|
-
return referrerKey;
|
|
2205
|
-
}
|
|
2206
|
-
static async getReferrerTokenStateAddressImpl(referrer, reserve, programId) {
|
|
2207
|
-
if ((0, kit_1.isSome)(referrer)) {
|
|
2208
|
-
return (0, kit_1.some)(await (0, utils_1.referrerTokenStatePda)(referrer.value, reserve, programId));
|
|
2209
|
-
}
|
|
2210
|
-
return (0, kit_1.none)();
|
|
2211
|
-
}
|
|
2212
2248
|
}
|
|
2213
2249
|
exports.KaminoAction = KaminoAction;
|
|
2214
2250
|
//# sourceMappingURL=action.js.map
|