Function supportsModule

  • Checks if a smart account supports a specific module type.

    Type Parameters

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

    Parameters

    Returns Promise<boolean>

    A boolean indicating whether the module type is supported.

    Throws

    If the account is not found.

    Example

    import { supportsModule } from '@biconomy/abstractjs'

    const isSupported = await supportsModule(nexusClient, {
    type: 'executor'
    })
    console.log(isSupported) // true or false