hyperstructure-react-hooks
v0.1.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
2
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
useSelectedVaultListIds
useSelectedVaultLists
useSelectedVaults
useSelectedVault
useVaultList
Blockchain Hooks
useClientChainId
useClientChainIds
useClients
useGasCostEstimates
useGasPrices
Prize Pool Hooks
useAllPrizeInfo
useAllUserPrizeOdds
useAllUserPrizePoolWins
useDrawPeriod
useEstimatedPrizeCount
useLargestGrandPrize
useNextDrawTimestamps
usePrizeDrawWinners
usePrizeOdds
usePrizePools
usePrizeTokenData
usePrizeTokenPrice
Token Hooks
useAllTokenPrices
useTokenAllowances
useTokenBalances
useTokenPrices
useTokens
Transaction Hooks
useSendApproveTransaction
useSendDepositTransaction
useSendRedeemTransaction
useSendWithdrawTransaction
Vault Hooks
useAllUserVaultBalances
useAllVaultBalances
useAllVaultExchangeRates
useAllVaultPercentageContributions
useAllVaultPrizePowers
useAllVaultShareData
useAllVaultTokenAddresses
useAllVaultTokenData
useSortedVaults
useUserTotalBalance
useUserVaultShareBalance
useUserVaultTokenBalance
useVault
useVaultBalance
useVaultExchangeRate
useVaultPercentageContribution
useVaultPrizePower
useVaults
useVaultShareData
useVaultSharePrice
useVaultTokenAddress
useVaultTokenData
useVaultTokenPrice