Function isModuleInstalled

  • Checks if a specific module is installed on a given 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<boolean>

    A boolean indicating whether the module is installed.

    If the account is not found.

    If the accountId result is empty.

    import { isModuleInstalled } from '@biconomy/abstractjs'

    const isInstalled = await isModuleInstalled(nexusClient, {
    module: {
    type: 'executor',
    address: '0x...',
    context: '0x'
    }
    })
    console.log(isInstalled) // true or false