Skip to content
Alchemy Logo

getEntryPoint

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.

import { getEntryPoint } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
 
const entryPoint060 = getEntryPoint(sepolia);
const entryPoint070 = getEntryPoint(sepolia, { version: "0.7.0" });

The chain for which the entry point is being retrieved

Options containing the version and address overrides for the entry point

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

Defined in: aa-sdk/core/src/entrypoint/index.ts:40

Type ParameterDefault type

TEntryPointVersion extends keyof EntryPointRegistryBase<unknown>

OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>

TChain extends Chain

Chain

ParameterType

chain

TChain

options

GetEntryPointOptions<TEntryPointVersion>

EntryPointDefRegistry<TChain>[TEntryPointVersion]

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

Defined in: aa-sdk/core/src/entrypoint/index.ts:48

Type ParameterDefault type

TEntryPointVersion extends OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>

OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>

TChain extends Chain

Chain

ParameterType

chain

TChain

options?

GetEntryPointOptions<TEntryPointVersion>

EntryPointDefRegistry<TChain>[TEntryPointVersion]

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

Defined in: aa-sdk/core/src/entrypoint/index.ts:57

Type ParameterDefault type

TChain extends Chain

Chain

ParameterType

chain

TChain

options?

GetEntryPointOptions<OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>>

OneOf<"0.6.0", keyof EntryPointRegistryBase<unknown>>

Was this page helpful?