UNPKG

@macalinao/grill

Version:

Modern Solana development kit for React applications with automatic account batching, caching, and transaction notifications

34 lines 1.15 kB
import type { Address } from "@solana/kit"; export declare const GRILL_REACT_QUERY_NAMESPACE: "solana"; export type AccountQueryKey = readonly ["solana", "account", Address]; export type TokenInfoQueryKey = readonly [ "solana", "tokenInfo", Address | null | undefined ]; export type PdaQueryKey<TArgs> = readonly [ "solana", "pda", string, TArgs | null | undefined ]; /** * Create a query key for the account query * @param address - The address of the account * @returns The query key */ export declare const createAccountQueryKey: (address: Address) => AccountQueryKey; /** * Create a query key for token info query * @param mint - The mint address * @returns The query key */ export declare const createTokenInfoQueryKey: (mint: Address | null | undefined) => TokenInfoQueryKey; /** * Create a query key for PDA queries * @param queryKeyPrefix - The PDA type prefix * @param args - The arguments for the PDA * @returns The query key */ export declare const createPdaQueryKey: <TArgs>(queryKeyPrefix: string, args: TArgs | null | undefined) => PdaQueryKey<TArgs>; //# sourceMappingURL=query-keys.d.ts.map