import { type BuildUserOpOptions } from "../utils"; import type { FeeQuotesOrDataResponse, Transaction } from "@biconomy/account"; import type { UseQueryParameters } from "wagmi/query"; export type { FeeQuotesOrDataResponse } from "@biconomy/account"; export type UseTokenFeesProps = { /** The transactions to be batched. */ transactions: Transaction | Transaction[]; /** The BuildUserOpOptions options. See https://bcnmy.github.io/biconomy-client-sdk/types/BuildUserOpOptions.html for further detail */ options?: BuildUserOpOptions; }; /** @description This function will retrieve fees from the paymaster in erc20 mode @example ```tsx import { useTokenFees, useUserOpWait, Options } from "@biconomy/useAA" import { polygonAmoy } from "viem/chains" import { encodeFunctionData, parseAbi } from "wagmi" export const TokenFees = () => { const { smartAccountAddress } = useSmartAccount(); const mintTx: Transaction = { to: "0x1758f42Af7026fBbB559Dc60EcE0De3ef81f665e", data: encodeFunctionData({ abi: parseAbi(["function safeMint(address _to)"]), functionName: "safeMint", args: [smartAccountAddress], }), } const { mutate, data: feeData, error, isLoading, } = useTokenFees({ transactions: mintTx }); return (
{isLoading ? (
Loading...
) : (
{feeData?.feeQuotes.map((quote) => (
{quote.token}: {quote.amount}
))}
)} }
); }; ``` */ export declare const useTokenFees: (params: UseTokenFeesProps, queryParams?: UseQueryParameters) => import("@tanstack/react-query").UseQueryResult; //# sourceMappingURL=useTokenFees.d.ts.map