Skip to main content
@tevm/voltaire
@tevm/voltaire / primitives/EntryPoint

primitives/EntryPoint

Type Aliases

EntryPointType

EntryPointType = Uint8Array & object
Defined in: src/primitives/EntryPoint/EntryPointType.ts:10 EntryPoint address type - ERC-4337 entry point contract

Type Declaration

[brand]
readonly [brand]: "EntryPoint"

See

Since

0.0.0

Variables

EntryPoint

const EntryPoint: object
Defined in: src/primitives/EntryPoint/index.ts:34

Type Declaration

equals()
equals: (entryPoint1, entryPoint2) => boolean
Parameters
entryPoint1
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType
entryPoint2
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType
Returns
boolean
from()
from: (value) => EntryPointType
Create EntryPoint from address input
Parameters
value
Address value string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType
Returns
EntryPointType EntryPoint address
Throws
If address format is invalid
Example
const entryPoint = EntryPoint.from("0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789");
const entryPoint2 = EntryPoint.from(ENTRYPOINT_V07);
toHex()
toHex: (entryPoint) => string
Parameters
entryPoint
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType
Returns
string

ENTRYPOINT_V06

const ENTRYPOINT_V06: EntryPointType
Defined in: src/primitives/EntryPoint/constants.js:7 EntryPoint v0.6.0 address

ENTRYPOINT_V07

const ENTRYPOINT_V07: EntryPointType
Defined in: src/primitives/EntryPoint/constants.js:15 EntryPoint v0.7.0 address

Functions

_equals()

_equals(a, b): boolean
Defined in: src/primitives/EntryPoint/equals.js:15 Check if two EntryPoint addresses are equal

Parameters

a
EntryPointType First EntryPoint
b
EntryPointType Second EntryPoint

Returns

boolean True if addresses are equal

Example

const isEqual = EntryPoint.equals(entryPoint1, entryPoint2);

_toHex()

_toHex(entryPoint): string
Defined in: src/primitives/EntryPoint/toHex.js:15 Convert EntryPoint to hex string

Parameters

entryPoint
EntryPointType EntryPoint address

Returns

string Hex string (0x-prefixed)

Example

const hex = EntryPoint.toHex(entryPoint);
console.log(hex); // "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789"

equals()

equals(entryPoint1, entryPoint2): boolean
Defined in: src/primitives/EntryPoint/index.ts:23

Parameters

entryPoint1
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType
entryPoint2
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType

Returns

boolean

from()

from(value): EntryPointType
Defined in: src/primitives/EntryPoint/from.js:16 Create EntryPoint from address input

Parameters

value
Address value string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType

Returns

EntryPointType EntryPoint address

Throws

If address format is invalid

Example

const entryPoint = EntryPoint.from("0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789");
const entryPoint2 = EntryPoint.from(ENTRYPOINT_V07);

toHex()

toHex(entryPoint): string
Defined in: src/primitives/EntryPoint/index.ts:17

Parameters

entryPoint
string | number | bigint | Uint8Array<ArrayBufferLike> | AddressType

Returns

string