import type { ProgramAccount } from "@project-serum/anchor"; import type { Network } from "@saberhq/solana-contrib"; import type { PublicKey } from "@solana/web3.js"; import type { UseQueryOptions, UseQueryResult } from "react-query"; import type { FetchKeysFn } from ".."; import type { ProgramAccountParser } from "./programAccounts"; /** * Result of a parsed account query. */ export declare type ParsedAccountQueryResult = UseQueryResult | null | undefined>; /** * Parses accounts with the given parser. * * *NOTE: the reference to the accounts array is not memoized.* * * @param keys * @param parser * @returns */ export declare const useParsedAccounts: (keys: (PublicKey | null | undefined)[], parser: ProgramAccountParser, options?: Omit | null | undefined, unknown, ProgramAccount | null | undefined, import("react-query").QueryKey>, "queryKey" | "queryFn">) => ParsedAccountQueryResult[]; /** * Makes the query to fetch a parsed account. * @param key * @param fetchKeys * @param parser * @param options * @returns */ export declare const makeParsedAccountQuery: (key: PublicKey | null | undefined, network: Network, fetchKeys: FetchKeysFn, parser: ProgramAccountParser, options?: Omit | null | undefined, unknown, ProgramAccount | null | undefined, import("react-query").QueryKey>, "queryKey" | "queryFn">) => UseQueryOptions | null | undefined, unknown, ProgramAccount | null | undefined, import("react-query").QueryKey>; /** * Fetches and parses a single account with the given parser. * * @param keys * @param parser * @returns */ export declare const useParsedAccount: (key: PublicKey | null | undefined, parser: ProgramAccountParser, options?: Omit | null | undefined, unknown, ProgramAccount | null | undefined, import("react-query").QueryKey>, "queryKey" | "queryFn">) => ParsedAccountQueryResult; //# sourceMappingURL=useParsedAccount.d.ts.map