@kamino-finance/klend-sdk 7.0.4 → 7.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts +2 -2
  2. package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts.map +1 -1
  3. package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts +2 -2
  4. package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts.map +1 -1
  5. package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts +2 -2
  6. package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts.map +1 -1
  7. package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts +2 -2
  8. package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts.map +1 -1
  9. package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts +2 -2
  10. package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts.map +1 -1
  11. package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts +2 -2
  12. package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts.map +1 -1
  13. package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts +2 -2
  14. package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts.map +1 -1
  15. package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts +2 -2
  16. package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts.map +1 -1
  17. package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts +2 -2
  18. package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts.map +1 -1
  19. package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts +2 -2
  20. package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts.map +1 -1
  21. package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts +2 -2
  22. package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts.map +1 -1
  23. package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts +2 -2
  24. package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts.map +1 -1
  25. package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts +2 -2
  26. package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts.map +1 -1
  27. package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts +2 -2
  28. package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts.map +1 -1
  29. package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts +2 -2
  30. package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts.map +1 -1
  31. package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts +2 -2
  32. package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts.map +1 -1
  33. package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts +2 -2
  34. package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts.map +1 -1
  35. package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts +2 -2
  36. package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts.map +1 -1
  37. package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts +2 -2
  38. package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts.map +1 -1
  39. package/dist/@codegen/jupiter_perps/instructions/init.d.ts +2 -2
  40. package/dist/@codegen/jupiter_perps/instructions/init.d.ts.map +1 -1
  41. package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts +2 -2
  42. package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts.map +1 -1
  43. package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts +2 -2
  44. package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts.map +1 -1
  45. package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts +2 -2
  46. package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts.map +1 -1
  47. package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts +2 -2
  48. package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts.map +1 -1
  49. package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts +2 -2
  50. package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts.map +1 -1
  51. package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts +2 -2
  52. package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts.map +1 -1
  53. package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts +2 -2
  54. package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts.map +1 -1
  55. package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts +2 -2
  56. package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts.map +1 -1
  57. package/dist/@codegen/jupiter_perps/instructions/swap.d.ts +2 -2
  58. package/dist/@codegen/jupiter_perps/instructions/swap.d.ts.map +1 -1
  59. package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts +2 -2
  60. package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts.map +1 -1
  61. package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts +2 -2
  62. package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts.map +1 -1
  63. package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts +2 -2
  64. package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts.map +1 -1
  65. package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts +2 -2
  66. package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts.map +1 -1
  67. package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts +2 -2
  68. package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts.map +1 -1
  69. package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts +2 -2
  70. package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts.map +1 -1
  71. package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts +2 -2
  72. package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts.map +1 -1
  73. package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts +2 -2
  74. package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts.map +1 -1
  75. package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts +2 -2
  76. package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts.map +1 -1
  77. package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts +2 -2
  78. package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts.map +1 -1
  79. package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts +2 -2
  80. package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts.map +1 -1
  81. package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts +2 -2
  82. package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts.map +1 -1
  83. package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts +2 -2
  84. package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts.map +1 -1
  85. package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +2 -2
  86. package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +1 -1
  87. package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +2 -2
  88. package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +1 -1
  89. package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts +2 -2
  90. package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts.map +1 -1
  91. package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts +2 -2
  92. package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts.map +1 -1
  93. package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts +2 -2
  94. package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts.map +1 -1
  95. package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts +2 -2
  96. package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts.map +1 -1
  97. package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts +2 -2
  98. package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts.map +1 -1
  99. package/dist/@codegen/klend/instructions/initLendingMarket.d.ts +2 -2
  100. package/dist/@codegen/klend/instructions/initLendingMarket.d.ts.map +1 -1
  101. package/dist/@codegen/klend/instructions/initObligation.d.ts +2 -2
  102. package/dist/@codegen/klend/instructions/initObligation.d.ts.map +1 -1
  103. package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts +2 -2
  104. package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts.map +1 -1
  105. package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts +2 -2
  106. package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts.map +1 -1
  107. package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts +2 -2
  108. package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts.map +1 -1
  109. package/dist/@codegen/klend/instructions/initReserve.d.ts +2 -2
  110. package/dist/@codegen/klend/instructions/initReserve.d.ts.map +1 -1
  111. package/dist/@codegen/klend/instructions/initUserMetadata.d.ts +2 -2
  112. package/dist/@codegen/klend/instructions/initUserMetadata.d.ts.map +1 -1
  113. package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +2 -2
  114. package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +1 -1
  115. package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +2 -2
  116. package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +1 -1
  117. package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts +2 -2
  118. package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts.map +1 -1
  119. package/dist/@codegen/klend/instructions/redeemFees.d.ts +2 -2
  120. package/dist/@codegen/klend/instructions/redeemFees.d.ts.map +1 -1
  121. package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts +2 -2
  122. package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts.map +1 -1
  123. package/dist/@codegen/klend/instructions/refreshObligation.d.ts +2 -2
  124. package/dist/@codegen/klend/instructions/refreshObligation.d.ts.map +1 -1
  125. package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts +2 -2
  126. package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts.map +1 -1
  127. package/dist/@codegen/klend/instructions/refreshReserve.d.ts +2 -2
  128. package/dist/@codegen/klend/instructions/refreshReserve.d.ts.map +1 -1
  129. package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts +2 -2
  130. package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts.map +1 -1
  131. package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts +2 -2
  132. package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts.map +1 -1
  133. package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts +2 -2
  134. package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts.map +1 -1
  135. package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts +2 -2
  136. package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts.map +1 -1
  137. package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts +2 -2
  138. package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts.map +1 -1
  139. package/dist/@codegen/klend/instructions/setObligationOrder.d.ts +2 -2
  140. package/dist/@codegen/klend/instructions/setObligationOrder.d.ts.map +1 -1
  141. package/dist/@codegen/klend/instructions/socializeLoss.d.ts +2 -2
  142. package/dist/@codegen/klend/instructions/socializeLoss.d.ts.map +1 -1
  143. package/dist/@codegen/klend/instructions/socializeLossV2.d.ts +2 -2
  144. package/dist/@codegen/klend/instructions/socializeLossV2.d.ts.map +1 -1
  145. package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts +2 -2
  146. package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts.map +1 -1
  147. package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts +2 -2
  148. package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts.map +1 -1
  149. package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts +2 -2
  150. package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts.map +1 -1
  151. package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts +2 -2
  152. package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts.map +1 -1
  153. package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts +2 -2
  154. package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts.map +1 -1
  155. package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts +2 -2
  156. package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts.map +1 -1
  157. package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +2 -2
  158. package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +1 -1
  159. package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +2 -2
  160. package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +1 -1
  161. package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts +2 -2
  162. package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts.map +1 -1
  163. package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts +2 -2
  164. package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts.map +1 -1
  165. package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts +2 -2
  166. package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts.map +1 -1
  167. package/dist/@codegen/kvault/instructions/deposit.d.ts +2 -2
  168. package/dist/@codegen/kvault/instructions/deposit.d.ts.map +1 -1
  169. package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts +2 -2
  170. package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts.map +1 -1
  171. package/dist/@codegen/kvault/instructions/initVault.d.ts +2 -2
  172. package/dist/@codegen/kvault/instructions/initVault.d.ts.map +1 -1
  173. package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts +2 -2
  174. package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts.map +1 -1
  175. package/dist/@codegen/kvault/instructions/invest.d.ts +2 -2
  176. package/dist/@codegen/kvault/instructions/invest.d.ts.map +1 -1
  177. package/dist/@codegen/kvault/instructions/removeAllocation.d.ts +2 -2
  178. package/dist/@codegen/kvault/instructions/removeAllocation.d.ts.map +1 -1
  179. package/dist/@codegen/kvault/instructions/updateAdmin.d.ts +2 -2
  180. package/dist/@codegen/kvault/instructions/updateAdmin.d.ts.map +1 -1
  181. package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts +2 -2
  182. package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts.map +1 -1
  183. package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts +2 -2
  184. package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts.map +1 -1
  185. package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts +2 -2
  186. package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts.map +1 -1
  187. package/dist/@codegen/kvault/instructions/withdraw.d.ts +2 -2
  188. package/dist/@codegen/kvault/instructions/withdraw.d.ts.map +1 -1
  189. package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts +2 -2
  190. package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts.map +1 -1
  191. package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts +2 -2
  192. package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts.map +1 -1
  193. package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts +2 -2
  194. package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts.map +1 -1
  195. package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts +2 -2
  196. package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts.map +1 -1
  197. package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts +2 -2
  198. package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts.map +1 -1
  199. package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts +2 -2
  200. package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts.map +1 -1
  201. package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts +2 -2
  202. package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts.map +1 -1
  203. package/dist/@codegen/pyth_rec/instructions/setFee.d.ts +2 -2
  204. package/dist/@codegen/pyth_rec/instructions/setFee.d.ts.map +1 -1
  205. package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts +2 -2
  206. package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts.map +1 -1
  207. package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts +2 -2
  208. package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts.map +1 -1
  209. package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts +2 -2
  210. package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts.map +1 -1
  211. package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts +2 -2
  212. package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts.map +1 -1
  213. package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts +2 -2
  214. package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts.map +1 -1
  215. package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts +2 -2
  216. package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts.map +1 -1
  217. package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts +2 -2
  218. package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts.map +1 -1
  219. package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts +2 -2
  220. package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts.map +1 -1
  221. package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts +2 -2
  222. package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts.map +1 -1
  223. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts +2 -2
  224. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts.map +1 -1
  225. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts +2 -2
  226. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts.map +1 -1
  227. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts +2 -2
  228. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts.map +1 -1
  229. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts +2 -2
  230. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts.map +1 -1
  231. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts +2 -2
  232. package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts.map +1 -1
  233. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts +2 -2
  234. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts.map +1 -1
  235. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts +2 -2
  236. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts.map +1 -1
  237. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts +2 -2
  238. package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts.map +1 -1
  239. package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts +2 -2
  240. package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts.map +1 -1
  241. package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts +2 -2
  242. package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts.map +1 -1
  243. package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts +2 -2
  244. package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts.map +1 -1
  245. package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts +2 -2
  246. package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts.map +1 -1
  247. package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts +2 -2
  248. package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts.map +1 -1
  249. package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts +2 -2
  250. package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts.map +1 -1
  251. package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts +2 -2
  252. package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts.map +1 -1
  253. package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts +2 -2
  254. package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts.map +1 -1
  255. package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts +2 -2
  256. package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts.map +1 -1
  257. package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts +2 -2
  258. package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts.map +1 -1
  259. package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts +2 -2
  260. package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts.map +1 -1
  261. package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts +2 -2
  262. package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts.map +1 -1
  263. package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts +2 -2
  264. package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts.map +1 -1
  265. package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts +2 -2
  266. package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts.map +1 -1
  267. package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts +2 -2
  268. package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts.map +1 -1
  269. package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts +2 -2
  270. package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts.map +1 -1
  271. package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts +2 -2
  272. package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts.map +1 -1
  273. package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts +2 -2
  274. package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts.map +1 -1
  275. package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts +2 -2
  276. package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts.map +1 -1
  277. package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts +2 -2
  278. package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts.map +1 -1
  279. package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts +2 -2
  280. package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts.map +1 -1
  281. package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts +2 -2
  282. package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts.map +1 -1
  283. package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts +2 -2
  284. package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts.map +1 -1
  285. package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts +2 -2
  286. package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts.map +1 -1
  287. package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts +2 -2
  288. package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts.map +1 -1
  289. package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts +2 -2
  290. package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts.map +1 -1
  291. package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts +2 -2
  292. package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts.map +1 -1
  293. package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts +2 -2
  294. package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts.map +1 -1
  295. package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts +2 -2
  296. package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts.map +1 -1
  297. package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts +2 -2
  298. package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts.map +1 -1
  299. package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts +2 -2
  300. package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts.map +1 -1
  301. package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts +2 -2
  302. package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts.map +1 -1
  303. package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts +2 -2
  304. package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts.map +1 -1
  305. package/dist/classes/action.d.ts +2 -2
  306. package/dist/classes/action.d.ts.map +1 -1
  307. package/dist/classes/fraction.d.ts.map +1 -1
  308. package/dist/classes/fraction.js +24 -5
  309. package/dist/classes/fraction.js.map +1 -1
  310. package/dist/classes/manager.d.ts +3 -2
  311. package/dist/classes/manager.d.ts.map +1 -1
  312. package/dist/classes/manager.js +3 -2
  313. package/dist/classes/manager.js.map +1 -1
  314. package/dist/classes/vault.d.ts +7 -6
  315. package/dist/classes/vault.d.ts.map +1 -1
  316. package/dist/classes/vault.js +8 -7
  317. package/dist/classes/vault.js.map +1 -1
  318. package/dist/leverage/instructions.d.ts +4 -4
  319. package/dist/leverage/instructions.d.ts.map +1 -1
  320. package/dist/leverage/operations.d.ts +3 -3
  321. package/dist/referrals/instructions.d.ts +2 -2
  322. package/dist/referrals/instructions.d.ts.map +1 -1
  323. package/dist/utils/ata.d.ts +1 -1
  324. package/dist/utils/ata.d.ts.map +1 -1
  325. package/dist/utils/farmUtils.d.ts +1 -1
  326. package/dist/utils/farmUtils.d.ts.map +1 -1
  327. package/dist/utils/farmUtils.js +3 -3
  328. package/dist/utils/farmUtils.js.map +1 -1
  329. package/package.json +5 -4
  330. package/src/classes/fraction.ts +25 -5
  331. package/src/classes/manager.ts +4 -2
  332. package/src/classes/vault.ts +20 -7
  333. package/src/utils/farmUtils.ts +6 -3
@@ -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 Decimal(2).pow(Fraction.FRACTIONS);
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 Decimal(this.valueSf.toString()).div(Fraction.MULTIPLIER);
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 Decimal(n).mul(Fraction.MULTIPLIER);
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 Decimal(n).div(10000);
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 Decimal(n).div(100);
66
+ const decimal = new FractionDecimal(n).div(100);
47
67
  return Fraction.fromDecimal(decimal);
48
68
  }
49
69
 
@@ -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
  /**
@@ -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(vault, vaultTokenPrice, farmsClient, slotForOverview);
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
 
@@ -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
  }