# getAccountAddress | @aa-sdk/core

> Overview of the getAccountAddress function from @aa-sdk/core

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function getAccountAddress(params): Promise<`0x${string}`>;
```

Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:225](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/account/smartContractAccount.ts#L225)

Retrieves the account address. Uses a provided `accountAddress` if available; otherwise, it computes the address using the entry point contract and the initial code.

## Example

```ts
import { getEntryPoint, getAccountAddress } from "@aa-sdk/core";

const accountAddress = await getAccountAddress({
  client,
  entryPoint: getEntryPoint(chain),
  getAccountInitCode: async () => "0x{factoryAddress}{factoryCallData}",
});
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `params`
      </td>

      <td>
        [`GetAccountAddressParams`](../type-aliases/GetAccountAddressParams)
      </td>

      <td>
        The configuration object
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<`` `0x${string}` ``>

A promise that resolves to the account address