Function installModule

  • Installs a module on a given smart account.

    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<Hex>

    The hash of the user operation as a hexadecimal string.

    Throws

    If the account is not found.

    Example

    import { installModule } from '@biconomy/abstractjs'

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