@pooltogether/hyperstructure-react-hooks
v1.0.2
Published
<p align="center"> <a href="https://github.com/pooltogether/pooltogether--brand-assets"> <img src="https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?r
Downloads
42
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 @pooltogether/hyperstructure-react-hooks
or
pnpm install @pooltogether/hyperstructure-react-hooks
or
yarn add @pooltogether/hyperstructure-react-hooks
🐱👤 Available Hooks
App Hooks
useCachedVaultLists
useLastCheckedDrawIds
useSelectedVaultListIds
useSelectedVaultLists
useSelectedVaults
useSelectedVault
useVaultList
Blockchain Hooks
useClientChainId
useClientChainIds
useClients
useGasCostEstimates
useGasPrices
Prize Pool Hooks
useAllDrawPeriods
useAllPrizeDrawTimestamps
useAllPrizeDrawWinners
useAllPrizeInfo
useAllUserBalanceUpdates
useAllUserEligibleDraws
useAllUserPrizeOdds
useAllUserPrizePoolWins
useDrawPeriod
useDrawsToCheckForPrizes
useEstimatedPrizeCount
useFirstDrawStartTimestamp
useGrandPrize
useLargestGrandPrize
useLastDrawTimestamps
useNextDrawTimestamps
usePrizeDrawTimestamps
usePrizeDrawWinners
usePrizeOdds
usePrizePools
usePrizeTokenData
usePrizeTokenPrice
Token Hooks
useTokenAllowances
useTokenBalances
useTokenPrices
useTokenPricesAcrossChains
useTokens
Transaction Hooks
useSendApproveTransaction
useSendDepositTransaction
useSendRedeemTransaction
useSendWithdrawTransaction
Vault Hooks
useAllUserVaultBalances
useAllUserVaultDelegationBalances
useAllVaultBalances
useAllVaultExchangeRates
useAllVaultPercentageContributions
useAllVaultPrizePowers
useAllVaultShareData
useAllVaultTokenAddresses
useAllVaultTokenData
useAllVaultTokenPrices
useSortedVaults
useUserTotalBalance
useUserVaultShareBalance
useUserVaultTokenBalance
useVault
useVaultBalance
useVaultClaimer
useVaultExchangeRate
useVaultFeeInfo
useVaultLiquidationPair
useVaultOwner
useVaultPercentageContribution
useVaultPrizePower
useVaults
useVaultShareData
useVaultSharePrice
useVaultTokenAddress
useVaultTokenData
useVaultTokenPrice
useVaultYieldSource