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.

Example

1import { getEntryPoint } from "@aa-sdk/core";
2import { sepolia } from "viem/chains";
3
4const entryPoint060 = getEntryPoint(sepolia);
5const 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

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

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

Type Parameters

Type ParameterDefault type

TEntryPointVersion extends keyof EntryPointRegistryBase<unknown>

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

TChain extends Chain

Chain

Parameters

ParameterType

chain

TChain

options

GetEntryPointOptions<TEntryPointVersion>

Returns

EntryPointDefRegistry<TChain>[TEntryPointVersion]

Call Signature

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

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

Type Parameters

Type ParameterDefault type

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

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

TChain extends Chain

Chain

Parameters

ParameterType

chain

TChain

options?

GetEntryPointOptions<TEntryPointVersion>

Returns

EntryPointDefRegistry<TChain>[TEntryPointVersion]

Call Signature

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

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

Type Parameters

Type ParameterDefault type

TChain extends Chain

Chain

Parameters

ParameterType

chain

TChain

options?

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

Returns

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