Sentre
Search…
πŸͺ
Hooks
Hook utilities for conveniently combining the essential data in functional components.

Prerequisites: MintProvider​
Params: mintAddress​
import useMintDecimals from 'shared/hooks/useMintDecimals'
​
const Component = () => {
const decimals = useMintDecimals('SENBBKVCM7homnf5RX9zqpf1GFe935hnbU4uVzY1Y6M')
}

Prerequisites: MintProvider​
Params: mintAddress​
import useMintSupply from 'shared/hooks/useMintSupply'
​
const Component = () => {
const supply = useMintSupply('SENBBKVCM7homnf5RX9zqpf1GFe935hnbU4uVzY1Y6M')
}

Params: accountAddress​
import useAccountBalance from 'shared/hooks/useAccountBalance'
​
const Component = () => {
const {
amount, // <bigint> balance with decimals
balance, // <number> balance without decimals
decimals, // <number> mint decimals
mintAddress, // <string> mint address
} = useAccountBalance('H2yPHiZm2U53GN93iUhQAwMwkjKHRSN7BGZpLLHv7d1m')
}

Params: mintAddress​
import { useAccountBalanceByMintAddress } from 'shared/hooks/useAccountBalance'
​
const Component = () => {
const {
amount, // <bigint> balance with decimals
balance, // <number> balance without decimals
decimals, // <number> mint decimals
mintAddress, // <string> mint address
} = useAccountBalanceByMintAddress('SENBBKVCM7homnf5RX9zqpf1GFe935hnbU4uVzY1Y6M')
}
Copy link
On this page
useMintDecimals
useMintSupply
useAccountBalance
useAccountBalanceByMintAddress