@tevm/voltaire / index / BrandedBytes64
BrandedBytes64
Type Aliases
Bytes64Like
Bytes64Like =Defined in: src/primitives/Bytes/Bytes64/Bytes64Type.ts:11 Inputs that can be converted to Bytes64Bytes64Type|string|Uint8Array
Variables
SIZE
Defined in: src/primitives/Bytes/Bytes64/Bytes64Type.ts:13constSIZE:64=64
ZERO
Defined in: src/primitives/Bytes/Bytes64/constants.js:10 Zero Bytes64 constant (64 zero bytes)constZERO:Bytes64Type
Functions
Bytes64()
Bytes64(Defined in: src/primitives/Bytes/Bytes64/index.ts:39value):Bytes64Type
Parameters
value
Bytes64Like
Returns
Bytes64Type
clone()
clone(Defined in: src/primitives/Bytes/Bytes64/clone.js:14 Clone a Bytes64 valuebytes):Bytes64Type
Parameters
bytes
Bytes64Type
Value to clone
Returns
Bytes64Type
Cloned value
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
compare()
compare(Defined in: src/primitives/Bytes/Bytes64/compare.js:15 Compare two Bytes64 valuesa,b):number
Parameters
a
Bytes64Type
First value
b
Bytes64Type
Second value
Returns
number
-1 if a < b, 0 if equal, 1 if a > b
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
equals()
equals(Defined in: src/primitives/Bytes/Bytes64/equals.js:15 Check if two Bytes64 values are equala,b):boolean
Parameters
a
Bytes64Type
First value
b
Bytes64Type
Second value
Returns
boolean
True if equal
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
from()
from(Defined in: src/primitives/Bytes/Bytes64/from.js:19 Create Bytes64 from string or bytesvalue):Bytes64Type
Parameters
value
Hex string with optional 0x prefix or Uint8Arraystring | Uint8Array<ArrayBufferLike>
Returns
Bytes64Type
Bytes64
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Throws
If input is invalid or wrong lengthExample
fromBytes()
fromBytes(Defined in: src/primitives/Bytes/Bytes64/fromBytes.js:18 Create Bytes64 from raw bytesbytes):Bytes64Type
Parameters
bytes
Uint8Array<ArrayBufferLike>
Raw bytes (must be 64 bytes)
Returns
Bytes64Type
Bytes64
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Throws
If bytes is wrong lengthExample
fromHex()
fromHex(Defined in: src/primitives/Bytes/Bytes64/fromHex.js:19 Create Bytes64 from hex stringhex):Bytes64Type
Parameters
hex
string
Hex string with optional 0x prefix
Returns
Bytes64Type
Bytes64
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Throws
If hex is wrong lengthThrows
If hex contains invalid charactersExample
isZero()
isZero(Defined in: src/primitives/Bytes/Bytes64/isZero.js:14 Check if Bytes64 is all zerosbytes):boolean
Parameters
bytes
Bytes64Type
Value to check
Returns
boolean
True if all zeros
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
size()
size(Defined in: src/primitives/Bytes/Bytes64/size.js:16 Get size of Bytes64 (always 64)_bytes):64
Parameters
_bytes
Bytes64Type
Bytes64 value
Returns
64
Size in bytes
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
toHex()
toHex(Defined in: src/primitives/Bytes/Bytes64/toHex.js:14 Convert Bytes64 to hex stringbytes):string
Parameters
bytes
Bytes64Type
Bytes64 to convert
Returns
string
Hex string with 0x prefix
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
toUint8Array()
toUint8Array(Defined in: src/primitives/Bytes/Bytes64/toUint8Array.js:14 Convert Bytes64 to Uint8Arraybytes):Uint8Array<ArrayBufferLike>
Parameters
bytes
Bytes64Type
Bytes64 to convert
Returns
Uint8Array<ArrayBufferLike>
Raw bytes
See
https://voltaire.tevm.sh/primitives/bytes/bytes64 for documentationSince
0.0.0Example
zero()
zero(): Bytes64Type
Defined in: src/primitives/Bytes/Bytes64/zero.js:15
Create a zero-filled Bytes64
Returns
Bytes64Type
Zero-filled Bytes64

