import type { Mint, Token } from "@solana-program/token-2022"; import type { Account, Address, GetAccountInfoApi, GetTokenAccountsByOwnerApi, Rpc } from "@solana/kit"; import type { Simplify } from "../../types"; type OriginalConfigParam = NonNullable[2]>; export type FetchTokenAccountsConfig = Simplify & { abortSignal?: AbortSignal; }>; /** * Fetch all the the token accounts for a given `mint` and `owner` Address. Automatically fetching * the Mint account itself and calculating the total balance of all the `owner`'s token accounts. * * @example * ```typescript * const { mint, accounts, totalBalance } = await fetchTokenAccounts( * rpc, * "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" as Address, // (mint for USDC on mainnet) * "nick6zJc6HpW3kfBm4xS2dmbuVRyb5F3AnUvj5ymzR5" as Address, // owner address * ); * ``` */ export declare function fetchTokenAccounts(rpc: Rpc, mint: Address | Account, owner: Address, config?: FetchTokenAccountsConfig): Promise<{ accounts: Account[]; mint: Account; totalBalance: bigint; }>; export {}; //# sourceMappingURL=fetch-token-accounts.d.ts.map