@macalinao/react-quarry
Version:
React hooks for Quarry
28 lines • 870 B
TypeScript
import type { UseDecodedAccountHook, UseDecodedAccountsHook } from "@macalinao/grill";
import type { Quarry } from "@macalinao/quarry";
/**
* Hook to fetch and decode a Quarry account.
* A Quarry represents a mining pool where users can stake tokens to earn rewards.
* Each Quarry is associated with a specific token and reward rate.
*
* @example
* ```tsx
* const { data: quarry } = useQuarry({
* address: quarryAddress
* });
* ```
*/
export declare const useQuarry: UseDecodedAccountHook<Quarry>;
/**
* Hook to fetch and decode multiple Quarry accounts in batch.
* Uses DataLoader for efficient batching of multiple account fetches.
*
* @example
* ```tsx
* const { data: quarries } = useQuarries({
* addresses: quarryAddresses
* });
* ```
*/
export declare const useQuarries: UseDecodedAccountsHook<Quarry>;
//# sourceMappingURL=quarry.d.ts.map