Function uninstallModule

  • Uninstalls a module from a smart account.

    Type Parameters

    • TSmartAccount extends
          | undefined
          | object & Assign_<
              SmartAccountImplementation<Abi, EntryPointVersion, object>,
              {
                  address: `0x${string}`;
                  getNonce: (parameters?: { key?: bigint }) => Promise<bigint>;
                  isDeployed: () => Promise<boolean>;
                  type: "smart";
              },
          > & {
              address: `0x${string}`;
              getNonce: (parameters?: { key?: bigint }) => Promise<bigint>;
              isDeployed: () => Promise<boolean>;
              type: "smart";
          }

    Parameters

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

    The hash of the user operation as a hexadecimal string.

    If the account is not found.

    import { uninstallModule } from '@biconomy/abstractjs'

    const userOpHash = await uninstallModule(nexusClient, {
    module: {
    type: 'executor',
    address: '0x...',
    context: '0x'
    }
    })
    console.log(userOpHash) // '0x...'