DOCS

useSmartWallet

function useSmartWallet<W extends WalletInstance>(
  personalWallet: WalletConfig<W>,
  options: SmartWalletConfig,
): {
  connect: (args?: {
    connectPersonalWallet?: (wallet: W) => Promise<void>;
    connectionArgs?: Omit<
      SmartWalletConnectionArgs,
      "personalWallet"
    >;
  }) => Promise<SmartWallet>;
  predictAddress: (args: {
    data?: BytesLike;
    personalWalletAddress: string;
  }) => Promise<string>;
};

Parameters

Returns

type ReturnType = {
  connect: (args?: {
    connectPersonalWallet?: (wallet: W) => Promise<void>;
    connectionArgs?: Omit<
      SmartWalletConnectionArgs,
      "personalWallet"
    >;
  }) => Promise<SmartWallet>;
  predictAddress: (args: {
    data?: BytesLike;
    personalWalletAddress: string;
  }) => Promise<string>;
};