From 140f9dca7a8307d9b819c72d8563dc1d83c3eebe Mon Sep 17 00:00:00 2001 From: Joe Pegler Date: Thu, 19 Sep 2024 12:16:27 +0100 Subject: [PATCH] chore: tsdoc - getActiveHook --- src/sdk/clients/decorators/erc7579/accountId.ts | 2 +- .../clients/decorators/erc7579/getActiveHook.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/sdk/clients/decorators/erc7579/accountId.ts b/src/sdk/clients/decorators/erc7579/accountId.ts index 10d8c368..7068e960 100644 --- a/src/sdk/clients/decorators/erc7579/accountId.ts +++ b/src/sdk/clients/decorators/erc7579/accountId.ts @@ -25,7 +25,7 @@ import { AccountNotFoundError } from "../../../account/utils/AccountNotFound" * * @example * import { accountId } from '@biconomy/sdk' - * + * * const id = await accountId(nexusClient) * console.log(id) // 'example_account_id' */ diff --git a/src/sdk/clients/decorators/erc7579/getActiveHook.ts b/src/sdk/clients/decorators/erc7579/getActiveHook.ts index 0e4dbb8b..d13a2787 100644 --- a/src/sdk/clients/decorators/erc7579/getActiveHook.ts +++ b/src/sdk/clients/decorators/erc7579/getActiveHook.ts @@ -11,6 +11,20 @@ export type GetActiveHookParameters< TSmartAccount extends SmartAccount | undefined > = GetSmartAccountParameter +/** + * Retrieves the active hook for a given smart account. + * + * @param client - The client instance. + * @param parameters - Parameters for getting the smart account. + * @returns The address of the active hook as a hexadecimal string. + * @throws {AccountNotFoundError} If the account is not found. + * + * @example + * import { getActiveHook } from '@biconomy/sdk' + * + * const activeHook = await getActiveHook(nexusClient) + * console.log(activeHook) // '0x...' + */ export async function getActiveHook< TSmartAccount extends SmartAccount | undefined >(