@tevm/voltaire / primitives/BlockHash
primitives/BlockHash
Classes
InvalidBlockHashFormatError
Defined in: src/primitives/BlockHash/errors.js:18Extends
Error
Constructors
Constructor
new InvalidBlockHashFormatError(Defined in: src/primitives/BlockHash/errors.js:25message,details?):InvalidBlockHashFormatError
Parameters
message
string
details?
expected?
string
value?
unknown
Returns
InvalidBlockHashFormatError
Overrides
Error.constructor
Properties
details
details: {Defined in: src/primitives/BlockHash/errors.js:29expected?:string;value?:unknown; } |undefined
name
name: string
Defined in: src/primitives/BlockHash/errors.js:27
Inherited from
Error.name
InvalidBlockHashLengthError
Defined in: src/primitives/BlockHash/errors.js:1Extends
Error
Constructors
Constructor
new InvalidBlockHashLengthError(Defined in: src/primitives/BlockHash/errors.js:9message,details?):InvalidBlockHashLengthError
Parameters
message
string
details?
context?
Record<string, unknown>
expected?
string
value?
unknown
Returns
InvalidBlockHashLengthError
Overrides
Error.constructor
Properties
details
details: {Defined in: src/primitives/BlockHash/errors.js:13context?:Record<string,unknown>;expected?:string;value?:unknown; } |undefined
name
name: string
Defined in: src/primitives/BlockHash/errors.js:11
Inherited from
Error.name
Type Aliases
BlockHashType
BlockHashType =Defined in: src/primitives/BlockHash/BlockHashType.ts:6 Block hash (32-byte identifier)Uint8Array&object
Type Declaration
[brand]
readonly[brand]:"BlockHash"
length
readonlylength:32
Variables
equals()
Defined in: src/primitives/BlockHash/index.ts:14 Check if two BlockHashes are equalconstequals: (a,b) =>boolean=_equals
Parameters
a
BlockHashType
b
BlockHashType
Returns
boolean
from()
Defined in: src/primitives/BlockHash/index.ts:10 Create BlockHash from various input typesconstfrom: (value) =>BlockHashType=_from
Parameters
value
string | Uint8Array<ArrayBufferLike>
Returns
BlockHashType
Throws
fromBytes()
Defined in: src/primitives/BlockHash/index.ts:11 Create BlockHash from bytesconstfromBytes: (bytes) =>BlockHashType=_fromBytes
Parameters
bytes
Uint8Array<ArrayBufferLike>
Returns
BlockHashType
Throws
fromHex()
Defined in: src/primitives/BlockHash/index.ts:12 Create BlockHash from hex stringconstfromHex: (hex) =>BlockHashType=_fromHex
Parameters
hex
string
Returns
BlockHashType
Throws
toHex()
Defined in: src/primitives/BlockHash/index.ts:13 Convert BlockHash to hex stringconsttoHex: (hash) =>string=_toHex
Parameters
hash
BlockHashType
Returns
string
