@kamino-finance/klend-sdk 7.0.4 → 7.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts.map +1 -1
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts +2 -2
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts +2 -2
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts +2 -2
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts +2 -2
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts +2 -2
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts +2 -2
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initObligation.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initObligation.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initReserve.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts +2 -2
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts +2 -2
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/redeemFees.d.ts +2 -2
- package/dist/@codegen/klend/instructions/redeemFees.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts +2 -2
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts +2 -2
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts +2 -2
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts +2 -2
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts +2 -2
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts +2 -2
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts +2 -2
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts +2 -2
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts +2 -2
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts +2 -2
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts +2 -2
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts +2 -2
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts +2 -2
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts +2 -2
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts.map +1 -1
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts +2 -2
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/deposit.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/deposit.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/initVault.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/initVault.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/invest.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/invest.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/withdraw.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/withdraw.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts.map +1 -1
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts +2 -2
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts.map +1 -1
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts +2 -2
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts.map +1 -1
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts +2 -2
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts.map +1 -1
- package/dist/classes/action.d.ts +2 -2
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/fraction.d.ts.map +1 -1
- package/dist/classes/fraction.js +24 -5
- package/dist/classes/fraction.js.map +1 -1
- package/dist/classes/manager.d.ts +3 -2
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +3 -2
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/vault.d.ts +7 -6
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +8 -7
- package/dist/classes/vault.js.map +1 -1
- package/dist/leverage/instructions.d.ts +4 -4
- package/dist/leverage/instructions.d.ts.map +1 -1
- package/dist/leverage/operations.d.ts +3 -3
- package/dist/referrals/instructions.d.ts +2 -2
- package/dist/referrals/instructions.d.ts.map +1 -1
- package/dist/utils/ata.d.ts +1 -1
- package/dist/utils/ata.d.ts.map +1 -1
- package/dist/utils/farmUtils.d.ts +1 -1
- package/dist/utils/farmUtils.d.ts.map +1 -1
- package/dist/utils/farmUtils.js +3 -3
- package/dist/utils/farmUtils.js.map +1 -1
- package/package.json +5 -4
- package/src/classes/fraction.ts +25 -5
- package/src/classes/manager.ts +4 -2
- package/src/classes/vault.ts +20 -7
- package/src/utils/farmUtils.ts +6 -3
package/src/classes/fraction.ts
CHANGED
|
@@ -3,11 +3,31 @@ import Decimal from 'decimal.js';
|
|
|
3
3
|
import { roundNearest } from './utils';
|
|
4
4
|
import { BigFractionBytes } from '../lib';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The higher-precision {@link Decimal} counterpart that *must* be used by all operations within {@link Fraction}.
|
|
8
|
+
*
|
|
9
|
+
* ## How to use it?
|
|
10
|
+
* Simply do `new FractionDecimal(x)` instead of `new Decimal(x)`.
|
|
11
|
+
*
|
|
12
|
+
* ## Why is this needed?
|
|
13
|
+
* The default {@link Decimal.precision} is 20.
|
|
14
|
+
* Some fractions on which we operate (most notably: the {@link Fraction.MAX_F_BN}) have more than 20 significant
|
|
15
|
+
* digits, and at the same time they must encode to exact representation (e.g. because the smart contract expects an
|
|
16
|
+
* exact `0xffff...ff` which has a speciyaal meaning, like "withdraw *all*").
|
|
17
|
+
*
|
|
18
|
+
* ## Why was this *not* needed before?
|
|
19
|
+
* Some vibe-coded libraries that we use (e.g. `@orca-so/whirlpool-sdk`) statically initialize the global
|
|
20
|
+
* `Decimal.set({ precision: ... })` when loaded. A previous, fortunate import order allowed our {@link Fraction}'s
|
|
21
|
+
* constants to be computed using a sufficiently-high precision. This of course was broken by a random, unrelated
|
|
22
|
+
* refactor, and from that point on we decided to not rely on the thoughtful Orca developers.
|
|
23
|
+
*/
|
|
24
|
+
const FractionDecimal = Decimal.clone({ precision: 40 });
|
|
25
|
+
|
|
6
26
|
export class Fraction {
|
|
7
27
|
static MAX_SIZE_F = 128;
|
|
8
28
|
static MAX_SIZE_BF = 256;
|
|
9
29
|
static FRACTIONS = 60;
|
|
10
|
-
static MULTIPLIER = new
|
|
30
|
+
static MULTIPLIER = new FractionDecimal(2).pow(Fraction.FRACTIONS);
|
|
11
31
|
|
|
12
32
|
static MAX_F_BN = new BN(2).pow(new BN(Fraction.MAX_SIZE_F)).sub(new BN(1));
|
|
13
33
|
static MAX_BF_BN = new BN(2).pow(new BN(Fraction.MAX_SIZE_BF)).sub(new BN(1));
|
|
@@ -24,11 +44,11 @@ export class Fraction {
|
|
|
24
44
|
}
|
|
25
45
|
|
|
26
46
|
toDecimal(): Decimal {
|
|
27
|
-
return new
|
|
47
|
+
return new FractionDecimal(this.valueSf.toString()).div(Fraction.MULTIPLIER);
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
static fromDecimal(n: Decimal | number): Fraction {
|
|
31
|
-
const scaledDecimal = new
|
|
51
|
+
const scaledDecimal = new FractionDecimal(n).mul(Fraction.MULTIPLIER);
|
|
32
52
|
const roundedScaledDecimal = roundNearest(scaledDecimal);
|
|
33
53
|
// Note: the `Decimal.toString()` can return exponential notation (e.g. "1e9") for large numbers. This notation is
|
|
34
54
|
// not accepted by `BN` constructor (i.e. invalid character "e"). Hence, we use `Decimal.toFixed()` (which is
|
|
@@ -38,12 +58,12 @@ export class Fraction {
|
|
|
38
58
|
}
|
|
39
59
|
|
|
40
60
|
static fromBps(n: Decimal | number): Fraction {
|
|
41
|
-
const decimal = new
|
|
61
|
+
const decimal = new FractionDecimal(n).div(10000);
|
|
42
62
|
return Fraction.fromDecimal(decimal);
|
|
43
63
|
}
|
|
44
64
|
|
|
45
65
|
static fromPercent(n: Decimal | number): Fraction {
|
|
46
|
-
const decimal = new
|
|
66
|
+
const decimal = new FractionDecimal(n).div(100);
|
|
47
67
|
return Fraction.fromDecimal(decimal);
|
|
48
68
|
}
|
|
49
69
|
|
package/src/classes/manager.ts
CHANGED
|
@@ -1030,6 +1030,7 @@ export class KaminoManager {
|
|
|
1030
1030
|
* @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
|
|
1031
1031
|
* @param [kaminoMarkets] - a list of all kamino markets. Optional. If provided the function will be significantly faster as it will not have to fetch the markets
|
|
1032
1032
|
* @param [currentSlot] - the latest confirmed slot. Optional. If provided the function will be faster as it will not have to fetch the latest slot
|
|
1033
|
+
* @param [tokensPrices] - a hashmap from a token pubkey to the price of the token in USD. Optional. If some tokens are not in the map, the function will fetch the price
|
|
1033
1034
|
* @returns an VaultOverview object with details about the tokens available and invested in the vault, denominated in tokens and USD, along sie APYs
|
|
1034
1035
|
*/
|
|
1035
1036
|
async getVaultOverview(
|
|
@@ -1038,9 +1039,10 @@ export class KaminoManager {
|
|
|
1038
1039
|
slot?: Slot,
|
|
1039
1040
|
vaultReserves?: Map<Address, KaminoReserve>,
|
|
1040
1041
|
kaminoMarkets?: KaminoMarket[],
|
|
1041
|
-
currentSlot?: Slot
|
|
1042
|
+
currentSlot?: Slot,
|
|
1043
|
+
tokensPrices?: Map<Address, Decimal>
|
|
1042
1044
|
): Promise<VaultOverview> {
|
|
1043
|
-
return this._vaultClient.getVaultOverview(vault, price, slot, vaultReserves, kaminoMarkets, currentSlot);
|
|
1045
|
+
return this._vaultClient.getVaultOverview(vault, price, slot, vaultReserves, kaminoMarkets, currentSlot, tokensPrices);
|
|
1044
1046
|
}
|
|
1045
1047
|
|
|
1046
1048
|
/**
|
package/src/classes/vault.ts
CHANGED
|
@@ -2657,6 +2657,7 @@ export class KaminoVaultClient {
|
|
|
2657
2657
|
* @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
|
|
2658
2658
|
* @param [kaminoMarkets] - a list of all kamino markets. Optional. If provided the function will be significantly faster as it will not have to fetch the markets
|
|
2659
2659
|
* @param [currentSlot] - the latest confirmed slot. Optional. If provided the function will be faster as it will not have to fetch the latest slot
|
|
2660
|
+
* @param [tokensPrices] - a hashmap from a token pubkey to the price of the token in USD. Optional. If some tokens are not in the map, the function will fetch the price
|
|
2660
2661
|
* @returns an VaultOverview object with details about the tokens available and invested in the vault, denominated in tokens and USD, along sie APYs
|
|
2661
2662
|
*/
|
|
2662
2663
|
async getVaultOverview(
|
|
@@ -2665,7 +2666,8 @@ export class KaminoVaultClient {
|
|
|
2665
2666
|
slot?: Slot,
|
|
2666
2667
|
vaultReservesMap?: Map<Address, KaminoReserve>,
|
|
2667
2668
|
kaminoMarkets?: KaminoMarket[],
|
|
2668
|
-
currentSlot?: Slot
|
|
2669
|
+
currentSlot?: Slot,
|
|
2670
|
+
tokensPrices?: Map<Address, Decimal>
|
|
2669
2671
|
): Promise<VaultOverview> {
|
|
2670
2672
|
const vaultReservesState = vaultReservesMap ? vaultReservesMap : await this.loadVaultReserves(vault);
|
|
2671
2673
|
|
|
@@ -2689,13 +2691,20 @@ export class KaminoVaultClient {
|
|
|
2689
2691
|
);
|
|
2690
2692
|
const vaultCollateralsPromise = this.getVaultCollaterals(vault, slotForOverview, vaultReservesState, kaminoMarkets);
|
|
2691
2693
|
const reservesOverviewPromise = this.getVaultReservesDetails(vault, slotForOverview, vaultReservesState);
|
|
2692
|
-
const vaultFarmIncentivesPromise = this.getVaultRewardsAPY(
|
|
2694
|
+
const vaultFarmIncentivesPromise = this.getVaultRewardsAPY(
|
|
2695
|
+
vault,
|
|
2696
|
+
vaultTokenPrice,
|
|
2697
|
+
farmsClient,
|
|
2698
|
+
slotForOverview,
|
|
2699
|
+
tokensPrices
|
|
2700
|
+
);
|
|
2693
2701
|
const vaultReservesFarmIncentivesPromise = this.getVaultReservesFarmsIncentives(
|
|
2694
2702
|
vault,
|
|
2695
2703
|
vaultTokenPrice,
|
|
2696
2704
|
farmsClient,
|
|
2697
2705
|
slotForOverview,
|
|
2698
|
-
vaultReservesState
|
|
2706
|
+
vaultReservesState,
|
|
2707
|
+
tokensPrices
|
|
2699
2708
|
);
|
|
2700
2709
|
|
|
2701
2710
|
// all the async part of the functions above just read the vaultReservesState which is read beforehand, so excepting vaultCollateralsPromise they should do no additional network calls
|
|
@@ -3053,7 +3062,8 @@ export class KaminoVaultClient {
|
|
|
3053
3062
|
vaultOrState: KaminoVault | VaultState,
|
|
3054
3063
|
vaultTokenPrice: Decimal,
|
|
3055
3064
|
farmsClient?: Farms,
|
|
3056
|
-
slot?: Slot
|
|
3065
|
+
slot?: Slot,
|
|
3066
|
+
tokensPrices?: Map<Address, Decimal>
|
|
3057
3067
|
): Promise<FarmIncentives> {
|
|
3058
3068
|
// Determine if we have a KaminoVault or VaultState
|
|
3059
3069
|
const vaultState = 'getState' in vaultOrState ? await vaultOrState.getState(this.getConnection()) : vaultOrState;
|
|
@@ -3069,7 +3079,7 @@ export class KaminoVaultClient {
|
|
|
3069
3079
|
const stakedTokenMintDecimals = vaultState.sharesMintDecimals.toNumber();
|
|
3070
3080
|
|
|
3071
3081
|
const kFarmsClient = farmsClient ? farmsClient : new Farms(this.getConnection());
|
|
3072
|
-
return getFarmIncentives(kFarmsClient, vaultState.vaultFarm, sharePrice, stakedTokenMintDecimals);
|
|
3082
|
+
return getFarmIncentives(kFarmsClient, vaultState.vaultFarm, sharePrice, stakedTokenMintDecimals, tokensPrices);
|
|
3073
3083
|
}
|
|
3074
3084
|
|
|
3075
3085
|
async getVaultReservesFarmsIncentives(
|
|
@@ -3077,7 +3087,8 @@ export class KaminoVaultClient {
|
|
|
3077
3087
|
vaultTokenPrice: Decimal,
|
|
3078
3088
|
farmsClient?: Farms,
|
|
3079
3089
|
slot?: Slot,
|
|
3080
|
-
vaultReservesMap?: Map<Address, KaminoReserve
|
|
3090
|
+
vaultReservesMap?: Map<Address, KaminoReserve>,
|
|
3091
|
+
tokensPrices?: Map<Address, Decimal>
|
|
3081
3092
|
): Promise<VaultReservesFarmsIncentives> {
|
|
3082
3093
|
const vaultState = 'getState' in vaultOrState ? await vaultOrState.getState(this.getConnection()) : vaultOrState;
|
|
3083
3094
|
|
|
@@ -3117,7 +3128,9 @@ export class KaminoVaultClient {
|
|
|
3117
3128
|
this._kaminoLendProgramId,
|
|
3118
3129
|
kFarmsClient,
|
|
3119
3130
|
currentSlot,
|
|
3120
|
-
reserveState.state
|
|
3131
|
+
reserveState.state,
|
|
3132
|
+
undefined,
|
|
3133
|
+
tokensPrices
|
|
3121
3134
|
);
|
|
3122
3135
|
vaultReservesFarmsIncentives.set(reserveAddress, reserveFarmIncentives.collateralFarmIncentives);
|
|
3123
3136
|
|
package/src/utils/farmUtils.ts
CHANGED
|
@@ -21,7 +21,8 @@ export async function getReserveFarmRewardsAPY(
|
|
|
21
21
|
farmsClient: Farms,
|
|
22
22
|
slot: Slot,
|
|
23
23
|
reserveState?: Reserve,
|
|
24
|
-
cTokenMintDecimals?: number
|
|
24
|
+
cTokenMintDecimals?: number,
|
|
25
|
+
tokensPrices?: Map<Address, Decimal>
|
|
25
26
|
): Promise<ReserveIncentives> {
|
|
26
27
|
const reserveIncentives: ReserveIncentives = {
|
|
27
28
|
collateralFarmIncentives: {
|
|
@@ -54,7 +55,8 @@ export async function getReserveFarmRewardsAPY(
|
|
|
54
55
|
farmsClient,
|
|
55
56
|
farmCollateral,
|
|
56
57
|
reserveCtokenPrice,
|
|
57
|
-
cTokenDecimals
|
|
58
|
+
cTokenDecimals,
|
|
59
|
+
tokensPrices
|
|
58
60
|
);
|
|
59
61
|
reserveIncentives.collateralFarmIncentives = farmIncentivesCollateral;
|
|
60
62
|
}
|
|
@@ -64,7 +66,8 @@ export async function getReserveFarmRewardsAPY(
|
|
|
64
66
|
farmsClient,
|
|
65
67
|
farmDebt,
|
|
66
68
|
reserveLiquidityTokenPrice,
|
|
67
|
-
stakedTokenMintDecimals
|
|
69
|
+
stakedTokenMintDecimals,
|
|
70
|
+
tokensPrices
|
|
68
71
|
);
|
|
69
72
|
reserveIncentives.debtFarmIncentives = farmIncentivesDebt;
|
|
70
73
|
}
|