# getEntryPoint | @aa-sdk/core

> Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found.

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

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

Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found.

## Example

```ts
import { getEntryPoint } from "@aa-sdk/core";
import { sepolia } from "viem/chains";

const entryPoint060 = getEntryPoint(sepolia);
const entryPoint070 = getEntryPoint(sepolia, { version: "0.7.0" });
```

## Param

The chain for which the entry point is being retrieved

## Param

Options containing the version and address overrides for the entry point

## Call Signature

```ts
function getEntryPoint<TEntryPointVersion, TChain>(
  chain,
  options,
): EntryPointDefRegistry<TChain>[TEntryPointVersion];
```

Defined in: [aa-sdk/core/src/entrypoint/index.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/entrypoint/index.ts#L40)

### Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>
      </td>

      <td>
        `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* [`Chain`](https://viem.sh)
      </td>

      <td>
        [`Chain`](https://viem.sh)
      </td>
    </tr>

  </tbody>
</table>

### Parameters

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

  <tbody>
    <tr>
      <td>
        `chain`
      </td>

      <td>
        `TChain`
      </td>
    </tr>

    <tr>
      <td>
        `options`
      </td>

      <td>
        [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`TEntryPointVersion`>
      </td>
    </tr>

  </tbody>
</table>

### Returns

[`EntryPointDefRegistry`](../interfaces/EntryPointDefRegistry)\<`TChain`>\[`TEntryPointVersion`]

## Call Signature

```ts
function getEntryPoint<TEntryPointVersion, TChain>(
  chain,
  options?,
): EntryPointDefRegistry<TChain>[TEntryPointVersion];
```

Defined in: [aa-sdk/core/src/entrypoint/index.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/entrypoint/index.ts#L48)

### Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TEntryPointVersion` *extends* `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>
      </td>

      <td>
        `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* [`Chain`](https://viem.sh)
      </td>

      <td>
        [`Chain`](https://viem.sh)
      </td>
    </tr>

  </tbody>
</table>

### Parameters

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

  <tbody>
    <tr>
      <td>
        `chain`
      </td>

      <td>
        `TChain`
      </td>
    </tr>

    <tr>
      <td>
        `options?`
      </td>

      <td>
        [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`TEntryPointVersion`>
      </td>
    </tr>

  </tbody>
</table>

### Returns

[`EntryPointDefRegistry`](../interfaces/EntryPointDefRegistry)\<`TChain`>\[`TEntryPointVersion`]

## Call Signature

```ts
function getEntryPoint<TChain>(
  chain,
  options?,
): OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>;
```

Defined in: [aa-sdk/core/src/entrypoint/index.ts:57](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/entrypoint/index.ts#L57)

### Type Parameters

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

  <tbody>
    <tr>
      <td>
        `TChain` *extends* [`Chain`](https://viem.sh)
      </td>

      <td>
        [`Chain`](https://viem.sh)
      </td>
    </tr>

  </tbody>
</table>

### Parameters

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

  <tbody>
    <tr>
      <td>
        `chain`
      </td>

      <td>
        `TChain`
      </td>
    </tr>

    <tr>
      <td>
        `options?`
      </td>

      <td>
        [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>>
      </td>
    </tr>

  </tbody>
</table>

### Returns

`OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>