import type { Prettify } from "../utils/type-utils.js"; type FetchConfig = { requestTimeoutMs?: number; keepalive?: boolean; headers?: HeadersInit; }; type ClientOptions = Prettify<{ /** * The configuration options for the client. */ config?: { /** * The configuration options for the RPC client. */ rpc?: { /** * The configuration options for the fetch function. * @default {} */ fetch?: FetchConfig; /** * The maximum number of requests to batch together. * @default 100 */ maxBatchSize?: number; /** * The maximum time to wait before sending a batch of requests. * @default 0 (no timeout) */ batchTimeoutMs?: number; }; /** * The configuration options for the storage client. */ storage?: { /** * The configuration options for the fetch function. * @default {} */ fetch?: FetchConfig; /** * The IPFS gateway URL. * @default "https://.ipfscdn.io/ipfs/" */ gatewayUrl?: string; }; }; /** * The team ID for thirdweb dashboard usage. * @hidden */ teamId?: string; }>; export type CreateThirdwebClientOptions = Prettify<({ clientId: string; secretKey?: string; } | { clientId?: string; secretKey: string; }) & ClientOptions>; export type ThirdwebClient = { readonly clientId: string; readonly secretKey: string | undefined; } & Readonly; /** * Creates a Thirdweb client using the provided client ID (client-side) or secret key (server-side). * * Get your client ID and secret key from the Thirdweb dashboard [here](https://thirdweb.com/create-api-key). * **Never share your secret key with anyone. * * A client is necessary for most functions in the thirdweb SDK. It provides access to thirdweb APIs including built-in RPC, storage, and more. * * @param options - The options for creating the client. * @param [options.clientId] - The client ID to use for thirdweb services. * @param [options.secretKey] - The secret key to use for thirdweb services. * @returns The created Thirdweb client. * @throws An error if neither `clientId` nor `secretKey` is provided. * * @example * Create a client on the client side (client ID): * ```ts * import { createThirdwebClient } from "thirdweb"; * * const client = createThirdwebClient({ clientId: "..." }); * ``` * * Create a client on the server (secret key): * ```ts * import { createThirdwebClient } from "thirdweb"; * * const client = createThirdwebClient({ secretKey: "..." }); * ``` * @client */ export declare function createThirdwebClient(options: CreateThirdwebClientOptions): ThirdwebClient; export {}; //# sourceMappingURL=client.d.ts.map