Function getActiveHook

  • Retrieves the active hook for 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<`0x${string}`>

    The address of the active hook as a hexadecimal string.

    If the account is not found.

    import { getActiveHook } from '@biconomy/abstractjs'

    const activeHook = await getActiveHook(nexusClient)
    console.log(activeHook) // '0x...'