import type { Abi, AbiFunction, Address } from "abitype"; import type { AccessList, Hex } from "viem"; import type { Chain } from "../chains/types.js"; import type { ThirdwebClient } from "../client/client.js"; import type { ThirdwebContract } from "../contract/contract.js"; import type { PreparedMethod } from "../utils/abi/prepare-method.js"; import type { PromisedObject } from "../utils/promise/resolve-promised-value.js"; import type { SignedAuthorization } from "./actions/eip7702/authorization.js"; export type StaticPrepareTransactionOptions = { accessList?: AccessList | undefined; to?: Address | undefined; data?: Hex | undefined; value?: bigint | undefined; gas?: bigint | undefined; gasPrice?: bigint | undefined; maxFeePerGas?: bigint | undefined; maxPriorityFeePerGas?: bigint | undefined; maxFeePerBlobGas?: bigint | undefined; type?: undefined | TransactionType; nonce?: number | undefined; extraGas?: bigint | undefined; authorizationList?: SignedAuthorization[] | undefined; eip712?: EIP712TransactionOptions | undefined; chain: Chain; client: ThirdwebClient; extraCallData?: Hex; erc20Value?: { amountWei: bigint; tokenAddress: Address; }; }; type TransactionType = "legacy" | "eip1559" | "eip2930" | "eip4844" | "eip7702"; export declare const TransactionTypeMap: Record; export type EIP712TransactionOptions = { gasPerPubdata?: bigint | undefined; customSignature?: Hex | undefined; factoryDeps?: Hex[] | undefined; paymaster?: Address | undefined; paymasterInput?: Hex | undefined; }; export type EIP712SerializedTransaction = { txType: bigint; from: bigint; to: bigint; gasLimit: bigint; gasPerPubdataByteLimit: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: bigint; value: bigint; data: Hex; factoryDeps: Hex[]; paymaster: bigint; paymasterInput: Hex; }; export type PrepareTransactionOptions = { chain: Chain; client: ThirdwebClient; } & PromisedObject>; type Additional = { preparedMethod: () => Promise>; contract: ThirdwebContract; }; export type PreparedTransaction = Readonly & { __preparedMethod?: () => Promise>; __contract?: ThirdwebContract; }; /** * Prepares a transaction with the given options. * @param options - The options for preparing the transaction. * @param info - Additional information about the ABI function. * @returns The prepared transaction. * @transaction * @example * ```ts * import { prepareTransaction, toWei } from "thirdweb"; * import { ethereum } from "thirdweb/chains"; * const transaction = prepareTransaction({ * to: "0x1234567890123456789012345678901234567890", * chain: ethereum, * client: thirdwebClient, * value: toWei("1.0"), * gasPrice: 30n * }); * ``` */ export declare function prepareTransaction(options: PrepareTransactionOptions, info?: Additional): PreparedTransaction; export {}; //# sourceMappingURL=prepare-transaction.d.ts.map