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?: { 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 type is supported.

    If the account is not found.

    import { supportsModule } from '@biconomy/abstractjs'

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