@stas-b-woof/compound-react 0.0.2 → 1.0.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 +3 -5
- package/dist/cjs/_main_.d.ts +7 -0
- package/dist/cjs/_main_.js +106 -0
- package/dist/{src → cjs}/actions/useActionBuilder.d.ts +0 -1
- package/dist/cjs/actions/useActionBuilder.js +14 -0
- package/dist/{src → cjs}/actions/useActionsBuilder.d.ts +0 -1
- package/dist/cjs/actions/useActionsBuilder.js +14 -0
- package/dist/{src → cjs}/actions/useBorrow.d.ts +0 -1
- package/dist/cjs/actions/useBorrow.js +17 -0
- package/dist/{src → cjs}/actions/usePermitsBuilder.d.ts +0 -1
- package/dist/cjs/actions/usePermitsBuilder.js +14 -0
- package/dist/cjs/actions/usePopulatePermit.d.ts +8 -0
- package/dist/cjs/actions/usePopulatePermit.js +19 -0
- package/dist/{src → cjs}/actions/useRepay.d.ts +0 -1
- package/dist/cjs/actions/useRepay.js +17 -0
- package/dist/{src → cjs}/actions/useSupply.d.ts +0 -1
- package/dist/cjs/actions/useSupply.js +17 -0
- package/dist/{src → cjs}/actions/useWithdraw.d.ts +0 -1
- package/dist/cjs/actions/useWithdraw.js +17 -0
- package/dist/{src → cjs}/actions.d.ts +1 -2
- package/dist/cjs/actions.js +19 -0
- package/dist/cjs/execution/usePopulateTransaction.d.ts +8 -0
- package/dist/cjs/execution/usePopulateTransaction.js +19 -0
- package/dist/cjs/execution/useSendTransaction.d.ts +7 -0
- package/dist/cjs/execution/useSendTransaction.js +17 -0
- package/dist/cjs/execution/useWaitForTransaction.d.ts +5 -0
- package/dist/cjs/execution/useWaitForTransaction.js +17 -0
- package/dist/cjs/execution.d.ts +3 -0
- package/dist/cjs/execution.js +9 -0
- package/dist/{src → cjs}/fetchers/useAccountBasics.d.ts +1 -2
- package/dist/cjs/fetchers/useAccountBasics.js +38 -0
- package/dist/{src → cjs}/fetchers/useAccountCollateralBalance.d.ts +1 -2
- package/dist/cjs/fetchers/useAccountCollateralBalance.js +42 -0
- package/dist/{src → cjs}/fetchers/useAccountLiquidatable.d.ts +1 -2
- package/dist/cjs/fetchers/useAccountLiquidatable.js +35 -0
- package/dist/{src → cjs}/fetchers/useAccountSupplyBalance.d.ts +1 -2
- package/dist/cjs/fetchers/useAccountSupplyBalance.js +38 -0
- package/dist/{src → cjs}/fetchers/useAssetInfo.d.ts +3 -4
- package/dist/cjs/fetchers/useAssetInfo.js +38 -0
- package/dist/{src → cjs}/fetchers/useAssetInfoByAddress.d.ts +1 -2
- package/dist/cjs/fetchers/useAssetInfoByAddress.js +38 -0
- package/dist/{src → cjs}/fetchers/useAssetSupport.d.ts +3 -4
- package/dist/cjs/fetchers/useAssetSupport.js +38 -0
- package/dist/{src → cjs}/fetchers/useBaseAssetReserves.d.ts +1 -2
- package/dist/cjs/fetchers/useBaseAssetReserves.js +34 -0
- package/dist/{src → cjs}/fetchers/useBaseTokenAddress.d.ts +1 -2
- package/dist/cjs/fetchers/useBaseTokenAddress.js +34 -0
- package/dist/{src → cjs}/fetchers/useBaseTokenPriceFeedAddress.d.ts +1 -2
- package/dist/cjs/fetchers/useBaseTokenPriceFeedAddress.js +34 -0
- package/dist/{src → cjs}/fetchers/useBorrowBalance.d.ts +1 -2
- package/dist/cjs/fetchers/useBorrowBalance.js +38 -0
- package/dist/{src → cjs}/fetchers/useBorrowKink.d.ts +1 -2
- package/dist/cjs/fetchers/useBorrowKink.js +34 -0
- package/dist/{src → cjs}/fetchers/useBorrowPerSecondInterestRateBase.d.ts +1 -2
- package/dist/cjs/fetchers/useBorrowPerSecondInterestRateBase.js +34 -0
- package/dist/{src → cjs}/fetchers/useBorrowPerSecondInterestRateSlopeHigh.d.ts +1 -2
- package/dist/cjs/fetchers/useBorrowPerSecondInterestRateSlopeHigh.js +34 -0
- package/dist/{src → cjs}/fetchers/useBorrowPerSecondInterestRateSlopeLow.d.ts +1 -2
- package/dist/cjs/fetchers/useBorrowPerSecondInterestRateSlopeLow.js +34 -0
- package/dist/{src → cjs}/fetchers/useBorrowRate.d.ts +4 -4
- package/dist/cjs/fetchers/useBorrowRate.js +39 -0
- package/dist/{src → cjs}/fetchers/useCollateralQuote.d.ts +4 -5
- package/dist/cjs/fetchers/useCollateralQuote.js +42 -0
- package/dist/{src → cjs}/fetchers/useCollateralReserves.d.ts +1 -2
- package/dist/cjs/fetchers/useCollateralReserves.js +38 -0
- package/dist/{src → cjs}/fetchers/useCollateralSupply.d.ts +1 -2
- package/dist/cjs/fetchers/useCollateralSupply.js +38 -0
- package/dist/{src → cjs}/fetchers/useCollateralsCount.d.ts +1 -2
- package/dist/cjs/fetchers/useCollateralsCount.js +34 -0
- package/dist/{src → cjs}/fetchers/useCometDecimals.d.ts +1 -2
- package/dist/cjs/fetchers/useCometDecimals.js +34 -0
- package/dist/{src → cjs}/fetchers/useFetchers.d.ts +26 -59
- package/dist/cjs/fetchers/useFetchers.js +15 -0
- package/dist/{src → cjs}/fetchers/useLiquidatorPoints.d.ts +1 -2
- package/dist/cjs/fetchers/useLiquidatorPoints.js +38 -0
- package/dist/{src → cjs}/fetchers/useManagerAllowed.d.ts +1 -2
- package/dist/cjs/fetchers/useManagerAllowed.js +42 -0
- package/dist/{src → cjs}/fetchers/useMarket.d.ts +5 -4
- package/dist/cjs/fetchers/useMarket.js +40 -0
- package/dist/{src → cjs}/fetchers/useMarketName.d.ts +1 -2
- package/dist/cjs/fetchers/useMarketName.js +34 -0
- package/dist/{src → cjs}/fetchers/useMarketSymbol.d.ts +1 -2
- package/dist/cjs/fetchers/useMarketSymbol.js +34 -0
- package/dist/{src → cjs}/fetchers/useMarketVersion.d.ts +1 -2
- package/dist/cjs/fetchers/useMarketVersion.js +34 -0
- package/dist/{src → cjs}/fetchers/useMinimalLoanAmount.d.ts +1 -2
- package/dist/cjs/fetchers/useMinimalLoanAmount.js +34 -0
- package/dist/{src → cjs}/fetchers/useSupplyKink.d.ts +1 -2
- package/dist/cjs/fetchers/useSupplyKink.js +34 -0
- package/dist/{src → cjs}/fetchers/useSupplyPerSecondInterestRateBase.d.ts +1 -2
- package/dist/cjs/fetchers/useSupplyPerSecondInterestRateBase.js +34 -0
- package/dist/{src → cjs}/fetchers/useSupplyPerSecondInterestRateSlopeHigh.d.ts +1 -2
- package/dist/cjs/fetchers/useSupplyPerSecondInterestRateSlopeHigh.js +34 -0
- package/dist/{src → cjs}/fetchers/useSupplyPerSecondInterestRateSlopeLow.d.ts +1 -2
- package/dist/cjs/fetchers/useSupplyPerSecondInterestRateSlopeLow.js +34 -0
- package/dist/{src → cjs}/fetchers/useSupplyRate.d.ts +4 -5
- package/dist/cjs/fetchers/useSupplyRate.js +38 -0
- package/dist/{src → cjs}/fetchers/useTotalBorrow.d.ts +1 -2
- package/dist/cjs/fetchers/useTotalBorrow.js +34 -0
- package/dist/{src → cjs}/fetchers/useTotalSupply.d.ts +1 -2
- package/dist/cjs/fetchers/useTotalSupply.js +34 -0
- package/dist/{src → cjs}/fetchers/useTotalsBasic.d.ts +1 -2
- package/dist/cjs/fetchers/useTotalsBasic.js +34 -0
- package/dist/{src → cjs}/fetchers/useUserNonce.d.ts +1 -2
- package/dist/cjs/fetchers/useUserNonce.js +38 -0
- package/dist/{src → cjs}/fetchers/useUtilization.d.ts +1 -2
- package/dist/cjs/fetchers/useUtilization.js +34 -0
- package/dist/{src → cjs}/fetchers.d.ts +0 -7
- package/dist/cjs/fetchers.js +120 -0
- package/dist/{src → cjs}/injection.d.ts +0 -1
- package/dist/cjs/injection.js +16 -0
- package/dist/cjs/package.json +1 -0
- package/dist/{src → cjs}/useCompound.d.ts +2 -3
- package/dist/cjs/useCompound.js +26 -0
- package/dist/{src → cjs}/utils.d.ts +0 -1
- package/dist/cjs/utils.js +41 -0
- package/dist/{src → cjs}/validation/useValidation.d.ts +1 -2
- package/dist/cjs/validation/useValidation.js +50 -0
- package/dist/{src → cjs}/validation.d.ts +0 -1
- package/dist/cjs/validation.js +6 -0
- package/dist/esm/_main_.d.ts +7 -0
- package/dist/esm/_main_.js +7 -0
- package/dist/esm/actions/useActionBuilder.d.ts +5 -0
- package/dist/{src → esm}/actions/useActionBuilder.js +0 -1
- package/dist/esm/actions/useActionsBuilder.d.ts +5 -0
- package/dist/{src → esm}/actions/useActionsBuilder.js +0 -1
- package/dist/esm/actions/useBorrow.d.ts +5 -0
- package/dist/{src → esm}/actions/useBorrow.js +0 -1
- package/dist/esm/actions/usePermitsBuilder.d.ts +5 -0
- package/dist/{src → esm}/actions/usePermitsBuilder.js +0 -1
- package/dist/esm/actions/usePopulatePermit.d.ts +8 -0
- package/dist/{src/actions/useEarn.js → esm/actions/usePopulatePermit.js} +6 -5
- package/dist/esm/actions/useRepay.d.ts +5 -0
- package/dist/{src → esm}/actions/useRepay.js +0 -1
- package/dist/esm/actions/useSupply.d.ts +5 -0
- package/dist/{src → esm}/actions/useSupply.js +0 -1
- package/dist/esm/actions/useWithdraw.d.ts +5 -0
- package/dist/{src → esm}/actions/useWithdraw.js +0 -1
- package/dist/esm/actions.d.ts +8 -0
- package/dist/{src → esm}/actions.js +1 -2
- package/dist/esm/execution/usePopulateTransaction.d.ts +8 -0
- package/dist/esm/execution/usePopulateTransaction.js +16 -0
- package/dist/esm/execution/useSendTransaction.d.ts +7 -0
- package/dist/{src → esm}/execution/useSendTransaction.js +0 -1
- package/dist/esm/execution/useWaitForTransaction.d.ts +5 -0
- package/dist/esm/execution/useWaitForTransaction.js +14 -0
- package/dist/esm/execution.d.ts +3 -0
- package/dist/esm/execution.js +3 -0
- package/dist/esm/fetchers/useAccountBasics.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useAccountBasics.js +1 -1
- package/dist/esm/fetchers/useAccountCollateralBalance.d.ts +16 -0
- package/dist/{src → esm}/fetchers/useAccountCollateralBalance.js +1 -1
- package/dist/esm/fetchers/useAccountLiquidatable.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useAccountLiquidatable.js +1 -1
- package/dist/esm/fetchers/useAccountSupplyBalance.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useAccountSupplyBalance.js +1 -1
- package/dist/esm/fetchers/useAssetInfo.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useAssetInfo.js +3 -3
- package/dist/esm/fetchers/useAssetInfoByAddress.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useAssetInfoByAddress.js +1 -1
- package/dist/esm/fetchers/useAssetSupport.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useAssetSupport.js +3 -3
- package/dist/esm/fetchers/useBaseAssetReserves.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBaseAssetReserves.js +1 -1
- package/dist/esm/fetchers/useBaseTokenAddress.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBaseTokenAddress.js +1 -1
- package/dist/esm/fetchers/useBaseTokenPriceFeedAddress.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBaseTokenPriceFeedAddress.js +1 -1
- package/dist/esm/fetchers/useBorrowBalance.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useBorrowBalance.js +1 -1
- package/dist/esm/fetchers/useBorrowKink.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBorrowKink.js +1 -1
- package/dist/esm/fetchers/useBorrowPerSecondInterestRateBase.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBorrowPerSecondInterestRateBase.js +1 -1
- package/dist/esm/fetchers/useBorrowPerSecondInterestRateSlopeHigh.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBorrowPerSecondInterestRateSlopeHigh.js +1 -1
- package/dist/esm/fetchers/useBorrowPerSecondInterestRateSlopeLow.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useBorrowPerSecondInterestRateSlopeLow.js +1 -1
- package/dist/esm/fetchers/useBorrowRate.d.ts +15 -0
- package/dist/{src → esm}/fetchers/useBorrowRate.js +3 -2
- package/dist/esm/fetchers/useCollateralQuote.d.ts +16 -0
- package/dist/{src → esm}/fetchers/useCollateralQuote.js +1 -1
- package/dist/esm/fetchers/useCollateralReserves.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useCollateralReserves.js +1 -1
- package/dist/esm/fetchers/useCollateralSupply.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useCollateralSupply.js +1 -1
- package/dist/esm/fetchers/useCollateralsCount.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useCollateralsCount.js +1 -1
- package/dist/esm/fetchers/useCometDecimals.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useCometDecimals.js +1 -1
- package/dist/esm/fetchers/useFetchers.d.ts +41 -0
- package/dist/{src → esm}/fetchers/useFetchers.js +0 -1
- package/dist/esm/fetchers/useLiquidatorPoints.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useLiquidatorPoints.js +1 -1
- package/dist/esm/fetchers/useManagerAllowed.d.ts +16 -0
- package/dist/{src → esm}/fetchers/useManagerAllowed.js +1 -1
- package/dist/esm/fetchers/useMarket.d.ts +16 -0
- package/dist/{src → esm}/fetchers/useMarket.js +10 -3
- package/dist/esm/fetchers/useMarketName.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useMarketName.js +1 -1
- package/dist/esm/fetchers/useMarketSymbol.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useMarketSymbol.js +1 -1
- package/dist/esm/fetchers/useMarketVersion.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useMarketVersion.js +1 -1
- package/dist/esm/fetchers/useMinimalLoanAmount.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useMinimalLoanAmount.js +1 -1
- package/dist/esm/fetchers/useSupplyKink.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useSupplyKink.js +1 -1
- package/dist/esm/fetchers/useSupplyPerSecondInterestRateBase.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useSupplyPerSecondInterestRateBase.js +1 -1
- package/dist/esm/fetchers/useSupplyPerSecondInterestRateSlopeHigh.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useSupplyPerSecondInterestRateSlopeHigh.js +1 -1
- package/dist/esm/fetchers/useSupplyPerSecondInterestRateSlopeLow.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useSupplyPerSecondInterestRateSlopeLow.js +1 -1
- package/dist/esm/fetchers/useSupplyRate.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useSupplyRate.js +2 -2
- package/dist/esm/fetchers/useTotalBorrow.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useTotalBorrow.js +1 -1
- package/dist/esm/fetchers/useTotalSupply.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useTotalSupply.js +1 -1
- package/dist/esm/fetchers/useTotalsBasic.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useTotalsBasic.js +1 -1
- package/dist/esm/fetchers/useUserNonce.d.ts +14 -0
- package/dist/{src → esm}/fetchers/useUserNonce.js +1 -1
- package/dist/esm/fetchers/useUtilization.d.ts +12 -0
- package/dist/{src → esm}/fetchers/useUtilization.js +1 -1
- package/dist/esm/fetchers.d.ts +39 -0
- package/dist/{src → esm}/fetchers.js +0 -7
- package/dist/esm/injection.d.ts +11 -0
- package/dist/{src → esm}/injection.js +0 -1
- package/dist/esm/useCompound.d.ts +11 -0
- package/dist/{src → esm}/useCompound.js +2 -3
- package/dist/esm/utils.d.ts +2 -0
- package/dist/{src → esm}/utils.js +0 -5
- package/dist/esm/validation/useValidation.d.ts +15 -0
- package/dist/{src → esm}/validation/useValidation.js +1 -1
- package/dist/esm/validation.d.ts +1 -0
- package/dist/{src → esm}/validation.js +0 -1
- package/package.json +28 -9
- package/dist/src/_main_.d.ts +0 -8
- package/dist/src/_main_.d.ts.map +0 -1
- package/dist/src/_main_.js +0 -8
- package/dist/src/_main_.js.map +0 -1
- package/dist/src/actions/useActionBuilder.d.ts.map +0 -1
- package/dist/src/actions/useActionBuilder.js.map +0 -1
- package/dist/src/actions/useActionsBuilder.d.ts.map +0 -1
- package/dist/src/actions/useActionsBuilder.js.map +0 -1
- package/dist/src/actions/useBorrow.d.ts.map +0 -1
- package/dist/src/actions/useBorrow.js.map +0 -1
- package/dist/src/actions/useEarn.d.ts +0 -6
- package/dist/src/actions/useEarn.d.ts.map +0 -1
- package/dist/src/actions/useEarn.js.map +0 -1
- package/dist/src/actions/usePermitsBuilder.d.ts.map +0 -1
- package/dist/src/actions/usePermitsBuilder.js.map +0 -1
- package/dist/src/actions/useRepay.d.ts.map +0 -1
- package/dist/src/actions/useRepay.js.map +0 -1
- package/dist/src/actions/useSupply.d.ts.map +0 -1
- package/dist/src/actions/useSupply.js.map +0 -1
- package/dist/src/actions/useWithdraw.d.ts.map +0 -1
- package/dist/src/actions/useWithdraw.js.map +0 -1
- package/dist/src/actions.d.ts.map +0 -1
- package/dist/src/actions.js.map +0 -1
- package/dist/src/execution/useSendTransaction.d.ts +0 -7
- package/dist/src/execution/useSendTransaction.d.ts.map +0 -1
- package/dist/src/execution/useSendTransaction.js.map +0 -1
- package/dist/src/execution.d.ts +0 -2
- package/dist/src/execution.d.ts.map +0 -1
- package/dist/src/execution.js +0 -2
- package/dist/src/execution.js.map +0 -1
- package/dist/src/fetchers/useAccountBasics.d.ts.map +0 -1
- package/dist/src/fetchers/useAccountBasics.js.map +0 -1
- package/dist/src/fetchers/useAccountCollateralBalance.d.ts.map +0 -1
- package/dist/src/fetchers/useAccountCollateralBalance.js.map +0 -1
- package/dist/src/fetchers/useAccountLiquidatable.d.ts.map +0 -1
- package/dist/src/fetchers/useAccountLiquidatable.js.map +0 -1
- package/dist/src/fetchers/useAccountSupplyBalance.d.ts.map +0 -1
- package/dist/src/fetchers/useAccountSupplyBalance.js.map +0 -1
- package/dist/src/fetchers/useAssetInfo.d.ts.map +0 -1
- package/dist/src/fetchers/useAssetInfo.js.map +0 -1
- package/dist/src/fetchers/useAssetInfoByAddress.d.ts.map +0 -1
- package/dist/src/fetchers/useAssetInfoByAddress.js.map +0 -1
- package/dist/src/fetchers/useAssetSupport.d.ts.map +0 -1
- package/dist/src/fetchers/useAssetSupport.js.map +0 -1
- package/dist/src/fetchers/useBaseAssetReserves.d.ts.map +0 -1
- package/dist/src/fetchers/useBaseAssetReserves.js.map +0 -1
- package/dist/src/fetchers/useBaseTokenAddress.d.ts.map +0 -1
- package/dist/src/fetchers/useBaseTokenAddress.js.map +0 -1
- package/dist/src/fetchers/useBaseTokenPriceFeedAddress.d.ts.map +0 -1
- package/dist/src/fetchers/useBaseTokenPriceFeedAddress.js.map +0 -1
- package/dist/src/fetchers/useBaseTrackingBorrowSpeed.d.ts +0 -13
- package/dist/src/fetchers/useBaseTrackingBorrowSpeed.d.ts.map +0 -1
- package/dist/src/fetchers/useBaseTrackingBorrowSpeed.js +0 -30
- package/dist/src/fetchers/useBaseTrackingBorrowSpeed.js.map +0 -1
- package/dist/src/fetchers/useBaseTrackingSupplySpeed.d.ts +0 -13
- package/dist/src/fetchers/useBaseTrackingSupplySpeed.d.ts.map +0 -1
- package/dist/src/fetchers/useBaseTrackingSupplySpeed.js +0 -30
- package/dist/src/fetchers/useBaseTrackingSupplySpeed.js.map +0 -1
- package/dist/src/fetchers/useBorrowBalance.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowBalance.js.map +0 -1
- package/dist/src/fetchers/useBorrowKink.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowKink.js.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateBase.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateBase.js.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateSlopeHigh.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateSlopeHigh.js.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateSlopeLow.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowPerSecondInterestRateSlopeLow.js.map +0 -1
- package/dist/src/fetchers/useBorrowRate.d.ts.map +0 -1
- package/dist/src/fetchers/useBorrowRate.js.map +0 -1
- package/dist/src/fetchers/useCollateralQuote.d.ts.map +0 -1
- package/dist/src/fetchers/useCollateralQuote.js.map +0 -1
- package/dist/src/fetchers/useCollateralReserves.d.ts.map +0 -1
- package/dist/src/fetchers/useCollateralReserves.js.map +0 -1
- package/dist/src/fetchers/useCollateralSupply.d.ts.map +0 -1
- package/dist/src/fetchers/useCollateralSupply.js.map +0 -1
- package/dist/src/fetchers/useCollateralsCount.d.ts.map +0 -1
- package/dist/src/fetchers/useCollateralsCount.js.map +0 -1
- package/dist/src/fetchers/useCometDecimals.d.ts.map +0 -1
- package/dist/src/fetchers/useCometDecimals.js.map +0 -1
- package/dist/src/fetchers/useFetchers.d.ts.map +0 -1
- package/dist/src/fetchers/useFetchers.js.map +0 -1
- package/dist/src/fetchers/useLiquidatorPoints.d.ts.map +0 -1
- package/dist/src/fetchers/useLiquidatorPoints.js.map +0 -1
- package/dist/src/fetchers/useManagerAllowed.d.ts.map +0 -1
- package/dist/src/fetchers/useManagerAllowed.js.map +0 -1
- package/dist/src/fetchers/useMarket.d.ts.map +0 -1
- package/dist/src/fetchers/useMarket.js.map +0 -1
- package/dist/src/fetchers/useMarketName.d.ts.map +0 -1
- package/dist/src/fetchers/useMarketName.js.map +0 -1
- package/dist/src/fetchers/useMarketSymbol.d.ts.map +0 -1
- package/dist/src/fetchers/useMarketSymbol.js.map +0 -1
- package/dist/src/fetchers/useMarketVersion.d.ts.map +0 -1
- package/dist/src/fetchers/useMarketVersion.js.map +0 -1
- package/dist/src/fetchers/useMinimalLoanAmount.d.ts.map +0 -1
- package/dist/src/fetchers/useMinimalLoanAmount.js.map +0 -1
- package/dist/src/fetchers/usePosition.d.ts +0 -17
- package/dist/src/fetchers/usePosition.d.ts.map +0 -1
- package/dist/src/fetchers/usePosition.js +0 -32
- package/dist/src/fetchers/usePosition.js.map +0 -1
- package/dist/src/fetchers/useRewardAccrued.d.ts +0 -15
- package/dist/src/fetchers/useRewardAccrued.d.ts.map +0 -1
- package/dist/src/fetchers/useRewardAccrued.js +0 -34
- package/dist/src/fetchers/useRewardAccrued.js.map +0 -1
- package/dist/src/fetchers/useRewardOwed.d.ts +0 -17
- package/dist/src/fetchers/useRewardOwed.d.ts.map +0 -1
- package/dist/src/fetchers/useRewardOwed.js +0 -38
- package/dist/src/fetchers/useRewardOwed.js.map +0 -1
- package/dist/src/fetchers/useSupplyKink.d.ts.map +0 -1
- package/dist/src/fetchers/useSupplyKink.js.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateBase.d.ts.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateBase.js.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateSlopeHigh.d.ts.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateSlopeHigh.js.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateSlopeLow.d.ts.map +0 -1
- package/dist/src/fetchers/useSupplyPerSecondInterestRateSlopeLow.js.map +0 -1
- package/dist/src/fetchers/useSupplyRate.d.ts.map +0 -1
- package/dist/src/fetchers/useSupplyRate.js.map +0 -1
- package/dist/src/fetchers/useTotalBorrow.d.ts.map +0 -1
- package/dist/src/fetchers/useTotalBorrow.js.map +0 -1
- package/dist/src/fetchers/useTotalSupply.d.ts.map +0 -1
- package/dist/src/fetchers/useTotalSupply.js.map +0 -1
- package/dist/src/fetchers/useTotalsBasic.d.ts.map +0 -1
- package/dist/src/fetchers/useTotalsBasic.js.map +0 -1
- package/dist/src/fetchers/useTrackingIndexScale.d.ts +0 -13
- package/dist/src/fetchers/useTrackingIndexScale.d.ts.map +0 -1
- package/dist/src/fetchers/useTrackingIndexScale.js +0 -30
- package/dist/src/fetchers/useTrackingIndexScale.js.map +0 -1
- package/dist/src/fetchers/useUserNonce.d.ts.map +0 -1
- package/dist/src/fetchers/useUserNonce.js.map +0 -1
- package/dist/src/fetchers/useUtilization.d.ts.map +0 -1
- package/dist/src/fetchers/useUtilization.js.map +0 -1
- package/dist/src/fetchers.d.ts.map +0 -1
- package/dist/src/fetchers.js.map +0 -1
- package/dist/src/injection.d.ts.map +0 -1
- package/dist/src/injection.js.map +0 -1
- package/dist/src/useCompound.d.ts.map +0 -1
- package/dist/src/useCompound.js.map +0 -1
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js.map +0 -1
- package/dist/src/validation/useValidation.d.ts.map +0 -1
- package/dist/src/validation/useValidation.js.map +0 -1
- package/dist/src/validation.d.ts.map +0 -1
- package/dist/src/validation.js.map +0 -1
|
@@ -4,10 +4,9 @@ export type ToAccountLiquidatableQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
account?: Optional<Address>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toAccountLiquidatableQueryKey(args: ToAccountLiquidatableQueryKeyArgs): readonly ["market" | `0x${string}`, `0x${string}` | "account"];
|
|
7
|
+
export declare function toAccountLiquidatableQueryKey(args: ToAccountLiquidatableQueryKeyArgs): readonly ["useAccountLiquidatable", "market" | `0x${string}`, `0x${string}` | "account"];
|
|
8
8
|
export type UseAccountLiquidatableArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
account?: Optional<Address>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useAccountLiquidatable(args?: Optional<UseAccountLiquidatableArgs>): UseQueryResult<Awaited<ReturnType<typeof checkIsAccountLiquidatable>>>;
|
|
13
|
-
//# sourceMappingURL=useAccountLiquidatable.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAccountLiquidatableQueryKey = toAccountLiquidatableQueryKey;
|
|
4
|
+
exports.useAccountLiquidatable = useAccountLiquidatable;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toAccountLiquidatableQueryKey(args) {
|
|
9
|
+
const { market, account } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useAccountLiquidatable',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${account ?? 'account'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useAccountLiquidatable(args) {
|
|
17
|
+
const { market, account } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toAccountLiquidatableQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
account: account,
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
(0, compound_1.asserts)(account, 'Account address must be defined');
|
|
27
|
+
return (0, compound_1.checkIsAccountLiquidatable)({
|
|
28
|
+
client: client,
|
|
29
|
+
market: market,
|
|
30
|
+
account: account,
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
enabled: market !== undefined && account !== undefined,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -5,11 +5,10 @@ export type ToAccountSupplyBalanceQueryKeyArgs = {
|
|
|
5
5
|
account?: Optional<Address>;
|
|
6
6
|
block?: Optional<Block>;
|
|
7
7
|
};
|
|
8
|
-
export declare function toAccountSupplyBalanceQueryKey(args: ToAccountSupplyBalanceQueryKeyArgs): readonly ["market" | `0x${string}`, `0x${string}` | "account",
|
|
8
|
+
export declare function toAccountSupplyBalanceQueryKey(args: ToAccountSupplyBalanceQueryKeyArgs): readonly ["useAccountSupplyBalance", "market" | `0x${string}`, `0x${string}` | "account", string];
|
|
9
9
|
export type UseAccountSupplyBalanceArgs = {
|
|
10
10
|
market?: Optional<Address>;
|
|
11
11
|
account?: Optional<Address>;
|
|
12
12
|
block?: Optional<Block>;
|
|
13
13
|
};
|
|
14
14
|
export declare function useAccountSupplyBalance(args?: Optional<UseAccountSupplyBalanceArgs>): UseQueryResult<Awaited<ReturnType<typeof getAccountSupplyBalance>>>;
|
|
15
|
-
//# sourceMappingURL=useAccountSupplyBalance.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAccountSupplyBalanceQueryKey = toAccountSupplyBalanceQueryKey;
|
|
4
|
+
exports.useAccountSupplyBalance = useAccountSupplyBalance;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toAccountSupplyBalanceQueryKey(args) {
|
|
9
|
+
const { market, account, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useAccountSupplyBalance',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${account ?? 'account'}`,
|
|
14
|
+
`${block ?? 'block'}`,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useAccountSupplyBalance(args) {
|
|
18
|
+
const { market, account, block } = args ?? {};
|
|
19
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
20
|
+
return (0, react_query_1.useQuery)({
|
|
21
|
+
queryKey: toAccountSupplyBalanceQueryKey({
|
|
22
|
+
market: market,
|
|
23
|
+
account: account,
|
|
24
|
+
...(block !== undefined ? { block } : {}),
|
|
25
|
+
}),
|
|
26
|
+
queryFn: () => {
|
|
27
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
28
|
+
(0, compound_1.asserts)(account, 'Account address must be defined');
|
|
29
|
+
return (0, compound_1.getAccountSupplyBalance)({
|
|
30
|
+
client: client,
|
|
31
|
+
market: market,
|
|
32
|
+
account: account,
|
|
33
|
+
...(block !== undefined ? { block } : {}),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled: market !== undefined && account !== undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
-
import { type Address, type Optional, type Block,
|
|
2
|
+
import { type Address, type Optional, type Block, getAssetInfoByIndex } from "@stas-b-woof/compound";
|
|
3
3
|
export type ToAssetInfoQueryKeyArgs = {
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
index?: Optional<number>;
|
|
6
6
|
block?: Optional<Block>;
|
|
7
7
|
};
|
|
8
|
-
export declare function toAssetInfoQueryKey(args: ToAssetInfoQueryKeyArgs): readonly ["market" | `0x${string}`, `${number}` | "index",
|
|
8
|
+
export declare function toAssetInfoQueryKey(args: ToAssetInfoQueryKeyArgs): readonly ["useAssetInfo", "market" | `0x${string}`, `${number}` | "index", string];
|
|
9
9
|
export type UseAssetInfoArgs = {
|
|
10
10
|
market?: Optional<Address>;
|
|
11
11
|
index?: Optional<number>;
|
|
12
12
|
block?: Optional<Block>;
|
|
13
13
|
};
|
|
14
|
-
export declare function useAssetInfo(args?: Optional<UseAssetInfoArgs>): UseQueryResult<Awaited<ReturnType<typeof
|
|
15
|
-
//# sourceMappingURL=useAssetInfo.d.ts.map
|
|
14
|
+
export declare function useAssetInfo(args?: Optional<UseAssetInfoArgs>): UseQueryResult<Awaited<ReturnType<typeof getAssetInfoByIndex>>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAssetInfoQueryKey = toAssetInfoQueryKey;
|
|
4
|
+
exports.useAssetInfo = useAssetInfo;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toAssetInfoQueryKey(args) {
|
|
9
|
+
const { market, index, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useAssetInfo',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${index ?? 'index'}`,
|
|
14
|
+
`${block ?? 'block'}`,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useAssetInfo(args) {
|
|
18
|
+
const { market, index, block } = args ?? {};
|
|
19
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
20
|
+
return (0, react_query_1.useQuery)({
|
|
21
|
+
queryKey: toAssetInfoQueryKey({
|
|
22
|
+
market: market,
|
|
23
|
+
index: index,
|
|
24
|
+
...(block !== undefined ? { block } : {}),
|
|
25
|
+
}),
|
|
26
|
+
queryFn: () => {
|
|
27
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
28
|
+
(0, compound_1.asserts)(index, 'Index must be defined');
|
|
29
|
+
return (0, compound_1.getAssetInfoByIndex)({
|
|
30
|
+
client: client,
|
|
31
|
+
market: market,
|
|
32
|
+
index: index,
|
|
33
|
+
...(block !== undefined ? { block } : {}),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled: market !== undefined && index !== undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -5,11 +5,10 @@ export type ToAssetInfoByAddressQueryKeyArgs = {
|
|
|
5
5
|
asset?: Optional<Address>;
|
|
6
6
|
block?: Optional<Block>;
|
|
7
7
|
};
|
|
8
|
-
export declare function toAssetInfoByAddressQueryKey(args: ToAssetInfoByAddressQueryKeyArgs): readonly ["market" | `0x${string}`, `0x${string}` | "asset",
|
|
8
|
+
export declare function toAssetInfoByAddressQueryKey(args: ToAssetInfoByAddressQueryKeyArgs): readonly ["useAssetInfoByAddress", "market" | `0x${string}`, `0x${string}` | "asset", string];
|
|
9
9
|
export type UseAssetInfoByAddressArgs = {
|
|
10
10
|
market?: Optional<Address>;
|
|
11
11
|
asset?: Optional<Address>;
|
|
12
12
|
block?: Optional<Block>;
|
|
13
13
|
};
|
|
14
14
|
export declare function useAssetInfoByAddress(args?: Optional<UseAssetInfoByAddressArgs>): UseQueryResult<Awaited<ReturnType<typeof getAssetInfoByAddress>>>;
|
|
15
|
-
//# sourceMappingURL=useAssetInfoByAddress.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAssetInfoByAddressQueryKey = toAssetInfoByAddressQueryKey;
|
|
4
|
+
exports.useAssetInfoByAddress = useAssetInfoByAddress;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toAssetInfoByAddressQueryKey(args) {
|
|
9
|
+
const { market, asset, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useAssetInfoByAddress',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${asset ?? 'asset'}`,
|
|
14
|
+
`${block ?? 'block'}`,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useAssetInfoByAddress(args) {
|
|
18
|
+
const { market, asset, block } = args ?? {};
|
|
19
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
20
|
+
return (0, react_query_1.useQuery)({
|
|
21
|
+
queryKey: toAssetInfoByAddressQueryKey({
|
|
22
|
+
market: market,
|
|
23
|
+
asset: asset,
|
|
24
|
+
...(block !== undefined ? { block } : {}),
|
|
25
|
+
}),
|
|
26
|
+
queryFn: () => {
|
|
27
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
28
|
+
(0, compound_1.asserts)(asset, 'Asset address must be defined');
|
|
29
|
+
return (0, compound_1.getAssetInfoByAddress)({
|
|
30
|
+
client: client,
|
|
31
|
+
market: market,
|
|
32
|
+
asset: asset,
|
|
33
|
+
...(block !== undefined ? { block } : {}),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled: market !== undefined && asset !== undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
-
import { type Address, type Optional, type Block,
|
|
2
|
+
import { type Address, type Optional, type Block, checkIsAssetSupported } from "@stas-b-woof/compound";
|
|
3
3
|
export type ToAssetSupportQueryKeyArgs = {
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
asset?: Optional<Address>;
|
|
6
6
|
block?: Optional<Block>;
|
|
7
7
|
};
|
|
8
|
-
export declare function toAssetSupportQueryKey(args: ToAssetSupportQueryKeyArgs): readonly ["market" | `0x${string}`, `0x${string}` | "asset",
|
|
8
|
+
export declare function toAssetSupportQueryKey(args: ToAssetSupportQueryKeyArgs): readonly ["useAssetSupport", "market" | `0x${string}`, `0x${string}` | "asset", string];
|
|
9
9
|
export type UseAssetSupportArgs = {
|
|
10
10
|
market?: Optional<Address>;
|
|
11
11
|
asset?: Optional<Address>;
|
|
12
12
|
block?: Optional<Block>;
|
|
13
13
|
};
|
|
14
|
-
export declare function useAssetSupport(args?: Optional<UseAssetSupportArgs>): UseQueryResult<Awaited<ReturnType<typeof
|
|
15
|
-
//# sourceMappingURL=useAssetSupport.d.ts.map
|
|
14
|
+
export declare function useAssetSupport(args?: Optional<UseAssetSupportArgs>): UseQueryResult<Awaited<ReturnType<typeof checkIsAssetSupported>>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAssetSupportQueryKey = toAssetSupportQueryKey;
|
|
4
|
+
exports.useAssetSupport = useAssetSupport;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toAssetSupportQueryKey(args) {
|
|
9
|
+
const { market, asset, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useAssetSupport',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${asset ?? 'asset'}`,
|
|
14
|
+
`${block ?? 'block'}`,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useAssetSupport(args) {
|
|
18
|
+
const { market, asset, block } = args ?? {};
|
|
19
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
20
|
+
return (0, react_query_1.useQuery)({
|
|
21
|
+
queryKey: toAssetSupportQueryKey({
|
|
22
|
+
market: market,
|
|
23
|
+
asset: asset,
|
|
24
|
+
...(block !== undefined ? { block } : {}),
|
|
25
|
+
}),
|
|
26
|
+
queryFn: () => {
|
|
27
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
28
|
+
(0, compound_1.asserts)(asset, 'Asset address must be defined');
|
|
29
|
+
return (0, compound_1.checkIsAssetSupported)({
|
|
30
|
+
client: client,
|
|
31
|
+
market: market,
|
|
32
|
+
asset: asset,
|
|
33
|
+
...(block !== undefined ? { block } : {}),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled: market !== undefined && asset !== undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBaseAssetReservesQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBaseAssetReservesQueryKey(args: ToBaseAssetReservesQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBaseAssetReservesQueryKey(args: ToBaseAssetReservesQueryKeyArgs): readonly ["useBaseAssetReserves", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBaseAssetReservesArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBaseAssetReserves(args?: Optional<UseBaseAssetReservesArgs>): UseQueryResult<Awaited<ReturnType<typeof getBaseAssetReserves>>>;
|
|
13
|
-
//# sourceMappingURL=useBaseAssetReserves.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBaseAssetReservesQueryKey = toBaseAssetReservesQueryKey;
|
|
4
|
+
exports.useBaseAssetReserves = useBaseAssetReserves;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBaseAssetReservesQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBaseAssetReserves',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBaseAssetReserves(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBaseAssetReservesQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBaseAssetReserves)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBaseTokenAddressQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBaseTokenAddressQueryKey(args: ToBaseTokenAddressQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBaseTokenAddressQueryKey(args: ToBaseTokenAddressQueryKeyArgs): readonly ["useBaseTokenAddress", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBaseTokenAddressArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBaseTokenAddress(args?: Optional<UseBaseTokenAddressArgs>): UseQueryResult<Awaited<ReturnType<typeof getBaseTokenAddress>>>;
|
|
13
|
-
//# sourceMappingURL=useBaseTokenAddress.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBaseTokenAddressQueryKey = toBaseTokenAddressQueryKey;
|
|
4
|
+
exports.useBaseTokenAddress = useBaseTokenAddress;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBaseTokenAddressQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBaseTokenAddress',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBaseTokenAddress(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBaseTokenAddressQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBaseTokenAddress)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBaseTokenPriceFeedAddressQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBaseTokenPriceFeedAddressQueryKey(args: ToBaseTokenPriceFeedAddressQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBaseTokenPriceFeedAddressQueryKey(args: ToBaseTokenPriceFeedAddressQueryKeyArgs): readonly ["useBaseTokenPriceFeedAddress", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBaseTokenPriceFeedAddressArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBaseTokenPriceFeedAddress(args?: Optional<UseBaseTokenPriceFeedAddressArgs>): UseQueryResult<Awaited<ReturnType<typeof getBaseTokenPriceFeedAddress>>>;
|
|
13
|
-
//# sourceMappingURL=useBaseTokenPriceFeedAddress.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBaseTokenPriceFeedAddressQueryKey = toBaseTokenPriceFeedAddressQueryKey;
|
|
4
|
+
exports.useBaseTokenPriceFeedAddress = useBaseTokenPriceFeedAddress;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBaseTokenPriceFeedAddressQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBaseTokenPriceFeedAddress',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBaseTokenPriceFeedAddress(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBaseTokenPriceFeedAddressQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBaseTokenPriceFeedAddress)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -5,11 +5,10 @@ export type ToBorrowBalanceQueryKeyArgs = {
|
|
|
5
5
|
account?: Optional<Address>;
|
|
6
6
|
block?: Optional<Block>;
|
|
7
7
|
};
|
|
8
|
-
export declare function toBorrowBalanceQueryKey(args: ToBorrowBalanceQueryKeyArgs): readonly ["market" | `0x${string}`, `0x${string}` | "account",
|
|
8
|
+
export declare function toBorrowBalanceQueryKey(args: ToBorrowBalanceQueryKeyArgs): readonly ["useBorrowBalance", "market" | `0x${string}`, `0x${string}` | "account", string];
|
|
9
9
|
export type UseBorrowBalanceArgs = {
|
|
10
10
|
market?: Optional<Address>;
|
|
11
11
|
account?: Optional<Address>;
|
|
12
12
|
block?: Optional<Block>;
|
|
13
13
|
};
|
|
14
14
|
export declare function useBorrowBalance(args?: Optional<UseBorrowBalanceArgs>): UseQueryResult<Awaited<ReturnType<typeof getBorrowBalanceOf>>>;
|
|
15
|
-
//# sourceMappingURL=useBorrowBalance.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBorrowBalanceQueryKey = toBorrowBalanceQueryKey;
|
|
4
|
+
exports.useBorrowBalance = useBorrowBalance;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBorrowBalanceQueryKey(args) {
|
|
9
|
+
const { market, account, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBorrowBalance',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${account ?? 'account'}`,
|
|
14
|
+
`${block ?? 'block'}`,
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useBorrowBalance(args) {
|
|
18
|
+
const { market, account, block } = args ?? {};
|
|
19
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
20
|
+
return (0, react_query_1.useQuery)({
|
|
21
|
+
queryKey: toBorrowBalanceQueryKey({
|
|
22
|
+
market: market,
|
|
23
|
+
account: account,
|
|
24
|
+
...(block !== undefined ? { block } : {}),
|
|
25
|
+
}),
|
|
26
|
+
queryFn: () => {
|
|
27
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
28
|
+
(0, compound_1.asserts)(account, 'Account address must be defined');
|
|
29
|
+
return (0, compound_1.getBorrowBalanceOf)({
|
|
30
|
+
client: client,
|
|
31
|
+
market: market,
|
|
32
|
+
account: account,
|
|
33
|
+
...(block !== undefined ? { block } : {}),
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
enabled: market !== undefined && account !== undefined,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBorrowKinkQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBorrowKinkQueryKey(args: ToBorrowKinkQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBorrowKinkQueryKey(args: ToBorrowKinkQueryKeyArgs): readonly ["useBorrowKink", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBorrowKinkArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBorrowKink(args?: Optional<UseBorrowKinkArgs>): UseQueryResult<Awaited<ReturnType<typeof getBorrowKink>>>;
|
|
13
|
-
//# sourceMappingURL=useBorrowKink.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBorrowKinkQueryKey = toBorrowKinkQueryKey;
|
|
4
|
+
exports.useBorrowKink = useBorrowKink;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBorrowKinkQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBorrowKink',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBorrowKink(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBorrowKinkQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBorrowKink)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBorrowPerSecondInterestRateBaseQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBorrowPerSecondInterestRateBaseQueryKey(args: ToBorrowPerSecondInterestRateBaseQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBorrowPerSecondInterestRateBaseQueryKey(args: ToBorrowPerSecondInterestRateBaseQueryKeyArgs): readonly ["useBorrowPerSecondInterestRateBase", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBorrowPerSecondInterestRateBaseArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBorrowPerSecondInterestRateBase(args?: Optional<UseBorrowPerSecondInterestRateBaseArgs>): UseQueryResult<Awaited<ReturnType<typeof getBorrowPerSecondInterestRateBase>>>;
|
|
13
|
-
//# sourceMappingURL=useBorrowPerSecondInterestRateBase.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBorrowPerSecondInterestRateBaseQueryKey = toBorrowPerSecondInterestRateBaseQueryKey;
|
|
4
|
+
exports.useBorrowPerSecondInterestRateBase = useBorrowPerSecondInterestRateBase;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBorrowPerSecondInterestRateBaseQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBorrowPerSecondInterestRateBase',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBorrowPerSecondInterestRateBase(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBorrowPerSecondInterestRateBaseQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBorrowPerSecondInterestRateBase)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBorrowPerSecondInterestRateSlopeHighQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBorrowPerSecondInterestRateSlopeHighQueryKey(args: ToBorrowPerSecondInterestRateSlopeHighQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBorrowPerSecondInterestRateSlopeHighQueryKey(args: ToBorrowPerSecondInterestRateSlopeHighQueryKeyArgs): readonly ["useBorrowPerSecondInterestRateSlopeHigh", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBorrowPerSecondInterestRateSlopeHighArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBorrowPerSecondInterestRateSlopeHigh(args?: Optional<UseBorrowPerSecondInterestRateSlopeHighArgs>): UseQueryResult<Awaited<ReturnType<typeof getBorrowPerSecondInterestRateSlopeHigh>>>;
|
|
13
|
-
//# sourceMappingURL=useBorrowPerSecondInterestRateSlopeHigh.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBorrowPerSecondInterestRateSlopeHighQueryKey = toBorrowPerSecondInterestRateSlopeHighQueryKey;
|
|
4
|
+
exports.useBorrowPerSecondInterestRateSlopeHigh = useBorrowPerSecondInterestRateSlopeHigh;
|
|
5
|
+
const useCompound_js_1 = require("../useCompound.js");
|
|
6
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
7
|
+
const compound_1 = require("@stas-b-woof/compound");
|
|
8
|
+
function toBorrowPerSecondInterestRateSlopeHighQueryKey(args) {
|
|
9
|
+
const { market, block } = args;
|
|
10
|
+
return [
|
|
11
|
+
'useBorrowPerSecondInterestRateSlopeHigh',
|
|
12
|
+
`${market ?? 'market'}`,
|
|
13
|
+
`${block ?? 'block'}`,
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
function useBorrowPerSecondInterestRateSlopeHigh(args) {
|
|
17
|
+
const { market, block } = args ?? {};
|
|
18
|
+
const { client } = (0, useCompound_js_1.useCompound)();
|
|
19
|
+
return (0, react_query_1.useQuery)({
|
|
20
|
+
queryKey: toBorrowPerSecondInterestRateSlopeHighQueryKey({
|
|
21
|
+
market: market,
|
|
22
|
+
...(block !== undefined ? { block } : {}),
|
|
23
|
+
}),
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
(0, compound_1.asserts)(market, 'Market address must be defined');
|
|
26
|
+
return (0, compound_1.getBorrowPerSecondInterestRateSlopeHigh)({
|
|
27
|
+
client: client,
|
|
28
|
+
market: market,
|
|
29
|
+
...(block !== undefined ? { block } : {}),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
enabled: market !== undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -4,10 +4,9 @@ export type ToBorrowPerSecondInterestRateSlopeLowQueryKeyArgs = {
|
|
|
4
4
|
market?: Optional<Address>;
|
|
5
5
|
block?: Optional<Block>;
|
|
6
6
|
};
|
|
7
|
-
export declare function toBorrowPerSecondInterestRateSlopeLowQueryKey(args: ToBorrowPerSecondInterestRateSlopeLowQueryKeyArgs): readonly ["market" | `0x${string}`,
|
|
7
|
+
export declare function toBorrowPerSecondInterestRateSlopeLowQueryKey(args: ToBorrowPerSecondInterestRateSlopeLowQueryKeyArgs): readonly ["useBorrowPerSecondInterestRateSlopeLow", "market" | `0x${string}`, string];
|
|
8
8
|
export type UseBorrowPerSecondInterestRateSlopeLowArgs = {
|
|
9
9
|
market?: Optional<Address>;
|
|
10
10
|
block?: Optional<Block>;
|
|
11
11
|
};
|
|
12
12
|
export declare function useBorrowPerSecondInterestRateSlopeLow(args?: Optional<UseBorrowPerSecondInterestRateSlopeLowArgs>): UseQueryResult<Awaited<ReturnType<typeof getBorrowPerSecondInterestRateSlopeLow>>>;
|
|
13
|
-
//# sourceMappingURL=useBorrowPerSecondInterestRateSlopeLow.d.ts.map
|