• Removes an owner from a smart account.

    This function prepares and sends a user operation to remove an existing owner from the specified smart account. It handles the creation of the necessary action data and sends the user operation.

    Type Parameters

    • TModularSmartAccount extends undefined | ModularSmartAccount

      Type of the smart account, extending SmartAccount or undefined.

    Parameters

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

      The client used to interact with the blockchain.

    • parameters: RemoveOwnerParameters<TModularSmartAccount>

      The parameters for removing the owner.

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

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

    If no account is provide

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

    import { removeOwner } from '@biconomy/abstractjs'

    const userOpHash = await removeOwner(nexusClient, {
    owner: '0x...'
    })
    console.log(userOpHash) // '0x...'