@macalinao/react-quarry
Version:
React hooks for Quarry
28 lines • 880 B
TypeScript
import type { UseDecodedAccountHook, UseDecodedAccountsHook } from "@macalinao/grill";
import type { Registry } from "@macalinao/quarry";
/**
* Hook to fetch and decode a Registry account.
* A Registry maintains a list of all Rewarders in the Quarry ecosystem,
* serving as a central directory for reward programs.
*
* @example
* ```tsx
* const { data: registry } = useRegistry({
* address: registryAddress
* });
* ```
*/
export declare const useRegistry: UseDecodedAccountHook<Registry>;
/**
* Hook to fetch and decode multiple Registry accounts in batch.
* Uses DataLoader for efficient batching of multiple account fetches.
*
* @example
* ```tsx
* const { data: registries } = useRegistries({
* addresses: [registry1, registry2]
* });
* ```
*/
export declare const useRegistries: UseDecodedAccountsHook<Registry>;
//# sourceMappingURL=registry.d.ts.map