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

primitives/Ens

Classes

DisallowedCharacterError

Defined in: src/primitives/Ens/errors.ts:74 Disallowed character error (prohibited ENS character)

Throws

Extends

Constructors

Constructor
new DisallowedCharacterError(options): DisallowedCharacterError
Defined in: src/primitives/Ens/errors.ts:75
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
DisallowedCharacterError
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

EmptyLabelError

Defined in: src/primitives/Ens/errors.ts:96 Empty label error (zero-length label segment)

Throws

Extends

Constructors

Constructor
new EmptyLabelError(options): EmptyLabelError
Defined in: src/primitives/Ens/errors.ts:97
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
EmptyLabelError
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

IllegalMixtureError

Defined in: src/primitives/Ens/errors.ts:30 Illegal mixture error (incompatible script combinations)

Throws

Extends

Constructors

Constructor
new IllegalMixtureError(options): IllegalMixtureError
Defined in: src/primitives/Ens/errors.ts:31
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
IllegalMixtureError
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

InvalidLabelExtensionError

Defined in: src/primitives/Ens/errors.ts:8 Invalid label extension error (double-dash at positions 2-3)

Throws

Extends

Constructors

Constructor
new InvalidLabelExtensionError(options): InvalidLabelExtensionError
Defined in: src/primitives/Ens/errors.ts:9
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
InvalidLabelExtensionError
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

InvalidUtf8Error

Defined in: src/primitives/Ens/errors.ts:118 Invalid UTF-8 error (malformed UTF-8 encoding)

Throws

Extends

Constructors

Constructor
new InvalidUtf8Error(options): InvalidUtf8Error
Defined in: src/primitives/Ens/errors.ts:119
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
InvalidUtf8Error
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

WholeConfusableError

Defined in: src/primitives/Ens/errors.ts:52 Whole confusable error (name resembles different script)

Throws

Extends

Constructors

Constructor
new WholeConfusableError(options): WholeConfusableError
Defined in: src/primitives/Ens/errors.ts:53
Parameters
options
cause?
Error
code?
string
context?
Record<string, unknown>
docsPath?
string
value
string
Returns
WholeConfusableError
Overrides
InvalidFormatError.constructor

Properties

cause?
optional cause: Error
Defined in: src/primitives/errors/AbstractError.ts:56 Root cause of this error (for error chaining)
Inherited from
InvalidFormatError.cause
code
code: string
Defined in: src/primitives/errors/AbstractError.ts:39 Machine-readable error code for programmatic handling
Example
'INVALID_FORMAT', 'INVALID_LENGTH'
Inherited from
InvalidFormatError.code
context?
optional context: Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:45 Additional context metadata for debugging
Example
{ value: '0x123', expected: '20 bytes' }
Inherited from
InvalidFormatError.context
docsPath?
optional docsPath: string
Defined in: src/primitives/errors/AbstractError.ts:51 Path to documentation for this error
Example
'/primitives/address/from-hex#error-handling'
Inherited from
InvalidFormatError.docsPath
expected
expected: string
Defined in: src/primitives/errors/ValidationError.ts:19
Inherited from
InvalidFormatError.expected
value
value: unknown
Defined in: src/primitives/errors/ValidationError.ts:18
Inherited from
InvalidFormatError.value

Methods

getErrorChain()
getErrorChain(): string
Defined in: src/primitives/errors/AbstractError.ts:94 Get full error chain as string for logging
Returns
string
Inherited from
InvalidFormatError.getErrorChain
toJSON()
toJSON(): Record<string, unknown>
Defined in: src/primitives/errors/AbstractError.ts:110 Serialize error to JSON for logging/telemetry
Returns
Record<string, unknown>
Inherited from
InvalidFormatError.toJSON

Type Aliases

Ens

Ens = string & object
Defined in: src/primitives/Ens/EnsType.ts:3

Type Declaration

[brand]
readonly [brand]: "Ens"

Variables

_beautify()

const _beautify: (name) => Ens = _beautifyImpl
Defined in: src/primitives/Ens/index.ts:18

Parameters

name
Ens

Returns

Ens

_labelhash()

const _labelhash: (label) => Uint8Array
Defined in: src/primitives/Ens/index.ts:38

Parameters

label
Ens

Returns

Uint8Array

_namehash()

const _namehash: (name) => Uint8Array
Defined in: src/primitives/Ens/index.ts:37

Parameters

name
Ens

Returns

Uint8Array

_normalize()

const _normalize: (name) => Ens = _normalizeImpl
Defined in: src/primitives/Ens/index.ts:28

Parameters

name
Ens

Returns

Ens

from()

const from: (name) => Ens = fromImpl
Defined in: src/primitives/Ens/index.ts:19

Parameters

name
string

Returns

Ens

is()

const is: (value) => value is Ens = isImpl
Defined in: src/primitives/Ens/index.ts:20

Parameters

value
unknown

Returns

value is Ens

isValid()

const isValid: (name) => boolean = isValidImpl
Defined in: src/primitives/Ens/index.ts:21

Parameters

name
string

Returns

boolean

Labelhash()

const Labelhash: (deps) => (label) => Uint8Array = LabelhashImpl
Defined in: src/primitives/Ens/index.ts:22

Parameters

deps
keccak256
(data) => Uint8Array

Returns

(label): Uint8Array
Parameters
label
Ens
Returns
Uint8Array

Namehash()

const Namehash: (deps) => (name) => Uint8Array = NamehashImpl
Defined in: src/primitives/Ens/index.ts:25

Parameters

deps
keccak256
(data) => Uint8Array

Returns

(name): Uint8Array
Parameters
name
Ens
Returns
Uint8Array

toString()

const toString: (name) => string = toStringImpl
Defined in: src/primitives/Ens/index.ts:30

Parameters

name
Ens

Returns

string

validate()

const validate: (name) => void = validateImpl
Defined in: src/primitives/Ens/index.ts:31

Parameters

name
string

Returns

void

Functions

beautify()

beautify(name): Ens
Defined in: src/primitives/Ens/index.ts:58

Parameters

name
string | Ens

Returns

Ens

labelhash()

labelhash(label): Uint8Array
Defined in: src/primitives/Ens/index.ts:66

Parameters

label
string | Ens

Returns

Uint8Array

namehash()

namehash(name): Uint8Array
Defined in: src/primitives/Ens/index.ts:62

Parameters

name
string | Ens

Returns

Uint8Array

normalize()

normalize(name): Ens
Defined in: src/primitives/Ens/index.ts:54

Parameters

name
string | Ens

Returns

Ens