@generationsoftware/hyperstructure-react-hooks
v1.25.3
Published
React hooks library for interacting with PoolTogether contracts
Downloads
230
Readme
💻 PoolTogether Hyperstucture React Hooks Library
Client Monorepo | Documentation | Prize Pool Contract | Vault Contract
🏆 Overview
A library of shared React hooks specific to Hyperstructure functionality, using WAGMI.
Many hooks utilize react-query
in order to prevent unecessary refetching. A refetch
function is returned in order to manually refetch if necessary, or alternatively a refetchInterval
may be passed initially in order to automatically refetch every N milliseconds.
💾 Installation
This library is available as an NPM package:
npm install @generationsoftware/hyperstructure-react-hooks
or
pnpm install @generationsoftware/hyperstructure-react-hooks
or
yarn add @generationsoftware/hyperstructure-react-hooks
🐱👤 Available Hooks
App Hooks
useCachedVaultLists
useLastCheckedPrizesTimestamps
useSelectedVaultListIds
useSelectedVaultLists
useSelectedVaults
useSelectedVault
useVaultList
Blockchain Hooks
useBlock
useBlockAtTimestamp
useBlocks
useBlocksAtTimestamps
useClientChainId
useClientChainIds
useClients
useGasAmountEstimate
useGasCostEstimates
useGasPrice
useTxReceipt
useTxReceipts
Event Hooks
useDepositEvents
useDrawAwardedEvents
useDrawFinishedEvents
useDrawStartedEvents
useLiquidationEvents
useManualContributionEvents
usePrizeBackstopEvents
usePromotionCreatedEvents
usePromotionRewardsClaimedEvents
useTransferEvents
useVaultContributionEvents
useWithdrawEvents
Prize Pool Hooks
useAllDrawIds
useAllDrawPeriods
useAllFirstDrawOpenedAt
useAllGrandPrizePeriodDraws
useAllLastAwardedDrawIds
useAllLastPrizeDrawWinners
useAllPrizeDrawWinners
useAllPrizeInfo
useAllPrizeTokenData
useAllPrizeTokenPrices
useAllPrizeValue
useAllUserBalanceUpdates
useAllUserEligibleDraws
useAllUserPrizeOdds
useAllUserPrizePoolWins
useDrawAuctionDuration
useDrawIds
useDrawPeriod
useDrawsToCheckForPrizes
useEstimatedPrizeCount
useFirstDrawOpenedAt
useGrandPrize
useGrandPrizePeriodDraws
useLargestGrandPrize
useLastAwardedDrawId
useLastAwardedDrawTimestamps
useLastPrizeDrawWinners
usePrizeDrawWinners
usePrizeOdds
usePrizePools
usePrizeTokenData
usePrizeTokenPrice
useWalletAddresses
Signature Hooks
useApproveSignature
useGenericApproveSignature
Token Hooks
useHistoricalTokenPrices
useTokenAllowances
useTokenBalances
useTokenNonces
useTokenPermitSupport
useTokenPrices
useTokenPricesAcrossChains
useTokens
useTokenVersion
Transaction Hooks
useSendApproveTransaction
useSendClaimRewardsTransaction
useSendClaimVaultFeesTransaction
useSendCreatePromotionTransaction
useSendDeployLiquidationPairTransaction
useSendDeployVaultTransaction
useSendDepositTransaction
useSendDepositWithPermitTransaction
useSendGenericApproveTransaction
useSendRedeemTransaction
useSendSetClaimerTransaction
useSendSetLiquidationPairTransaction
useSendWithdrawTransaction
Vault Hooks
useAllUserClaimableRewards
useAllUserVaultBalances
useAllUserVaultDelegates
useAllUserVaultDelegationBalances
useAllVaultBalances
useAllVaultContributionAmounts
useAllVaultExchangeRates
useAllVaultHistoricalSharePrices
useAllVaultHistoricalTokenPrices
useAllVaultPercentageContributions
useAllVaultPrizeYields
useAllVaultPromotions
useAllVaultPromotionsApr
useAllVaultShareData
useAllVaultSharePrices
useAllVaultTokenAddresses
useAllVaultTokenData
useAllVaultTokenPrices
useAllVaultTotalDelegateSupplies
useAllVaultTotalSupplyTwabs
useSortedVaults
useUserClaimableRewards
useUserVaultDelegate
useUserVaultDelegationBalance
useUserVaultShareBalance
useUserVaultTokenBalance
useVault
useVaultBalance
useVaultClaimer
useVaultContributionAmount
useVaultExchangeRate
useVaultFeeInfo
useVaultFeesAvailable
useVaultLiquidationPair
useVaultOwner
useVaultPercentageContribution
useVaultPrizeYield
useVaultPromotions
useVaultPromotionsApr
useVaults
useVaultShareData
useVaultSharePrice
useVaultTokenAddress
useVaultTokenData
useVaultTokenPrice
useVaultTotalDelegateSupply
useVaultTotalSupplyTwab
useVaultTwabController
useVaultYieldSource
Zap Hooks
useBeefyVault
useCurveAddLiquidityOutput
useIsCurveLp
useIsVelodromeLp
useLpToken
useSendDepositZapTransaction
useSendWithdrawZapTransaction
useSwapTx
useZapArgs
useZapTokenInfo