Skip to content

Types

Glossary of Types in Wallet components & utilities.

ConnectWalletReact

type ConnectWalletReact = {
  children?: React.ReactNode; // Children can be utilized to display customized content when the wallet is connected.
  className?: string; // Optional className override for button element
  text?: string; // Optional text override for button. Note: Prefer using `ConnectWalletText` component instead as this will be deprecated in a future version.
  withWalletAggregator?: boolean; // Optional flag to enable the wallet aggregator like RainbowKit
  onConnect?: () => void; // Optional callback function that is called when the wallet is connected. Can be used to trigger SIWE prompts or other actions.
};

IsValidAAEntrypointOptions

export type IsValidAAEntrypointOptions = {
  entrypoint: string;
};

IsWalletACoinbaseSmartWalletOptions

export type IsWalletACoinbaseSmartWalletOptions = {
  client: PublicClient;
  userOp: UserOperation<'v0.6'>;
};

IsWalletACoinbaseSmartWalletResponse

export type IsWalletACoinbaseSmartWalletResponse =
  | { isCoinbaseSmartWallet: true }
  | { isCoinbaseSmartWallet: false; error: string; code: string };

WalletContextType

type WalletContextType = {
  address?: Address | null; // The Ethereum address to fetch the avatar and name for.
};

WalletReact

type WalletReact = {
  children: React.ReactNode;
};

WalletDropdownBasenameReact

type WalletDropdownBasenameReact = {
  className?: string; // Optional className override for the element
};

WalletDropdownReact

type WalletDropdownReact = {
  children: React.ReactNode;
  className?: string; // Optional className override for top div element
};

WalletDropdownDisconnectReact

export type WalletDropdownDisconnectReact = {
 className?: string; // Optional className override for the element
 text?: string; // Optional text override for the button
};

WalletDropdownFundLinkReact

export type WalletDropdownFundLinkReact = {
  className?: string; // Optional className override for the element
  icon?: ReactNode; // Optional icon override
  openIn?: 'popup' | 'tab'; // Whether to open the funding flow in a tab or a popup window
  popupSize?: 'sm' | 'md' | 'lg'; // Size of the popup window if `openIn` is set to `popup`
  rel?: string; // Specifies the relationship between the current document and the linked document
  target?: string; // Where to open the target if `openIn` is set to tab
  text?: string; // Optional text override
};

WalletDropdownLinkReact

export type WalletDropdownLinkReact = {
  children: string;
  className?: string; // Optional className override for the element
  href: string;
  icon?: 'wallet' & ReactNode;
  rel?: string;
  target?: string;
};