UNPKG

@macalinao/react-quarry

Version:

React hooks for Quarry

28 lines 815 B
import type { UseDecodedAccountHook, UseDecodedAccountsHook } from "@macalinao/grill"; import type { Miner } from "@macalinao/quarry"; /** * Hook to fetch and decode a Miner account. * A Miner represents a user's staking position in a Quarry, * tracking staked balance and accumulated rewards. * * @example * ```tsx * const { data: miner } = useMiner({ * address: minerAddress * }); * ``` */ export declare const useMiner: UseDecodedAccountHook<Miner>; /** * Hook to fetch and decode multiple Miner accounts in batch. * Uses DataLoader for efficient batching of multiple account fetches. * * @example * ```tsx * const { data: miners } = useMiners({ * addresses: minerAddresses * }); * ``` */ export declare const useMiners: UseDecodedAccountsHook<Miner>; //# sourceMappingURL=miner.d.ts.map