• Adds a new owner to a smart account.

    This function prepares and sends a user operation to add a new owner to the specified smart account. It handles the creation of the necessary action data and sends the user operation.

    Type Parameters

    • TModularSmartAccount extends undefined | ModularSmartAccount

      The type of the smart account, which can be a ModularSmartAccount or undefined.

    Parameters

    • client: Client<Transport, undefined | Chain, TModularSmartAccount>

      The client used to interact with the blockchain.

    • parameters: AddOwnerParameters<TModularSmartAccount>

      The parameters for adding the new owner.

    Returns Promise<`0x${string}`>

    A promise that resolves to the hash of the sent user operation.

    If no account is provided and the client doesn't have an associated account.

    If there's an error getting the add owner action.