import { Wallet, WalletDetailsParams } from "@rainbow-me/rainbowkit";
//#region src/connector.d.ts
/**
 * Options for creating a wagmi connector for a Privy cross-app wallet
 */
interface CreatePrivyConnectorOptions {
  /**
   * The Privy app ID of the cross-app wallet provider.
   */
  id: string;
  /**
   * Will show up as the wallet's name in RainbowKit UIs
   */
  name: string;
  /**
   * Will show up as the wallet's image in RainbowKit UIs
   */
  iconUrl: string;
  /**
   * @experimental Interfaces are subject to change in the future.
   * Informs the wagmi connector to use the smart wallet and
   * transforms the connector functions.
   */
  smartWalletMode?: boolean;
  /**
   * @experimental Interfaces are subject to change in the future.
   *
   * Configure the default amount of time before a wallet request is closed with
   * a timeout error.
   */
  defaultPopupTimeout?: number;
  /**
   * Override the default connect URL for the cross-app wallet provider.
   * When set, this URL will be used instead of the URL returned by the API.
   */
  overrideConnectUrl?: string;
  /**
   * Override the default transact URL for the cross-app wallet provider.
   * When set, this URL will be used instead of the URL returned by the API.
   */
  overrideTransactUrl?: string;
}
/**
 * Create a wagmi connector for the Privy cross-app wallet provider.
 *
 * Adapted from wagmi injected connector as a reference implementation:
 * https://github.com/wevm/wagmi/blob/main/packages/core/src/connectors/injected.ts#L94
 *
 * @example
 * import { createConfig, http } from "wagmi";
 * import { mainnet } from "wagmi/chains";
 *
 * const privyWalletConnector = toPrivyWalletConnector({
 *   providerAppId: <your-app-id>,
 *   providerName: 'Your app',
 *   providerIconUrl: 'https://example.com/image.png',
 * })
 *
 * export const wagmiConfig = createConfig({
 *   chains: [mainnet],
 *   transports: {
 *     [mainnet.id]: http(),
 *   },
 *   connectors: [privyWalletConnector],
 *   ssr: true,
 * });
 */
declare function toPrivyWalletConnector(params: CreatePrivyConnectorOptions, rkDetails?: WalletDetailsParams): import("@wagmi/core").CreateConnectorFn<{
  request: import("viem").EIP1193RequestFn<import("viem").EIP1474Methods>;
  on: <event extends keyof import("viem").EIP1193EventMap>(event: event, listener: import("viem").EIP1193EventMap[event]) => void;
  removeListener: <event extends keyof import("viem").EIP1193EventMap>(event: event, listener: import("viem").EIP1193EventMap[event]) => void;
}, Record<string, unknown>, Record<string, unknown>>;
//#endregion
//#region src/wallet.d.ts
/**
 * Options for creating a RainbowKit wallet for a Privy cross-app wallet
 */
interface CreatePrivyWalletOptions {
  /**
   * The Privy app ID of the cross-app wallet provider.
   */
  id: string;
  /**
   * Will show up as the wallet's name in RainbowKit UIs
   */
  name: string;
  /**
   * Will show up as the wallet's image in RainbowKit UIs
   */
  iconUrl: string;
  /**
   * Will show up as the wallet's image background in RainbowKit UIs.
   *
   * @default '#000000'
   */
  iconBackground?: string;
  /**
   * @experimental Interfaces are subject to change in the future.
   *
   * Configure the default amount of time before a wallet request is closed with
   * a timeout error.
   */
  defaultPopupTimeout?: number;
  /**
   * Override the default connect URL for the cross-app wallet provider.
   * When set, this URL will be used instead of the URL returned by the API.
   */
  overrideConnectUrl?: string;
  /**
   * Override the default transact URL for the cross-app wallet provider.
   * When set, this URL will be used instead of the URL returned by the API.
   */
  overrideTransactUrl?: string;
}
/**
 * Create a RainbowKit wallet for a Privy cross-app waller
 *
 * @example
 * import { connectorsForWallets } from "@rainbow-me/rainbowkit";
 *
 * const privyWallet = toPrivyWallet({
 *   id: <privy-wallet-app-id>,
 *   name: 'Privy wallet app',
 *   iconUrl: 'https://example.com/image.png',
 * })
 *
 * const connectors = connectorsForWallets(
 *  [
 *    {
 *      groupName: "Privy",
 *      wallets: [privyWallet],
 *    },
 *  ],
 *  {
 *    appName: "Privy",
 *    projectId: "Example",
 *  }
 * );
 */
declare const toPrivyWallet: (opts: CreatePrivyWalletOptions) => () => Wallet;
//#endregion
export { type CreatePrivyConnectorOptions, type CreatePrivyWalletOptions, toPrivyWallet, toPrivyWalletConnector };