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

primitives/Selector

Type Aliases

SelectorLike

SelectorLike = SelectorType | string | Uint8Array
Defined in: src/primitives/Selector/SelectorType.ts:8

SelectorType

SelectorType = Uint8Array & object
Defined in: src/primitives/Selector/SelectorType.ts:3

Type Declaration

[brand]
readonly [brand]: "Selector"
length
readonly length: 4

Variables

Selector

const Selector: object
Defined in: src/primitives/Selector/index.ts:46

Type Declaration

equals()
equals: (a, b) => boolean
Check if two Selectors are equal
Parameters
a
SelectorType
b
SelectorType
Returns
boolean
from()
from: (value) => SelectorType
Create Selector from various input types
Parameters
value
SelectorLike
Returns
SelectorType
fromHex()
fromHex: (hex) => SelectorType
Create Selector from hex string
Parameters
hex
string
Returns
SelectorType
fromSignature()
fromSignature: (signature) => SelectorType
Compute Selector from function signature
Parameters
signature
string
Returns
SelectorType
toHex()
toHex: (selector) => string
Convert Selector to hex string
Parameters
selector
SelectorType
Returns
string

SIZE

const SIZE: 4 = 4
Defined in: src/primitives/Selector/SelectorType.ts:10

Functions

equals()

equals(a, b): boolean
Defined in: src/primitives/Selector/index.ts:41 Check if two Selectors are equal

Parameters

a
SelectorType
b
SelectorType

Returns

boolean

from()

from(value): SelectorType
Defined in: src/primitives/Selector/index.ts:13 Create Selector from various input types

Parameters

value
SelectorLike

Returns

SelectorType

fromHex()

fromHex(hex): SelectorType
Defined in: src/primitives/Selector/index.ts:20 Create Selector from hex string

Parameters

hex
string

Returns

SelectorType

fromSignature()

fromSignature(signature): SelectorType
Defined in: src/primitives/Selector/index.ts:27 Compute Selector from function signature

Parameters

signature
string

Returns

SelectorType

toHex()

toHex(selector): string
Defined in: src/primitives/Selector/index.ts:34 Convert Selector to hex string

Parameters

selector
SelectorType

Returns

string