diff --git a/src/sdk/clients/decorators/erc7579/accountId.ts b/src/sdk/clients/decorators/erc7579/accountId.ts index ce527efd..10d8c368 100644 --- a/src/sdk/clients/decorators/erc7579/accountId.ts +++ b/src/sdk/clients/decorators/erc7579/accountId.ts @@ -14,6 +14,21 @@ import { call, readContract } from "viem/actions" import { getAction } from "viem/utils" import { AccountNotFoundError } from "../../../account/utils/AccountNotFound" +/** + * Retrieves the account ID for a given smart account. + * + * @param client - The client instance. + * @param args - Optional parameters for getting the smart account. + * @returns The account ID as a string. + * @throws {AccountNotFoundError} If the account is not found. + * @throws {Error} If the accountId result is empty. + * + * @example + * import { accountId } from '@biconomy/sdk' + * + * const id = await accountId(nexusClient) + * console.log(id) // 'example_account_id' + */ export async function accountId( client: Client, args?: GetSmartAccountParameter