Skip to content

Commit

Permalink
chore: tsdoc - accountId
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Sep 19, 2024
1 parent 453a58f commit ba9897c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/sdk/clients/decorators/erc7579/accountId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TSmartAccount extends SmartAccount | undefined>(
client: Client<Transport, Chain | undefined, TSmartAccount>,
args?: GetSmartAccountParameter<TSmartAccount>
Expand Down

0 comments on commit ba9897c

Please sign in to comment.