@tevm/voltaire / primitives/Uint128
primitives/Uint128
Type Aliases
Uint128Type
Uint128Type =Defined in: src/primitives/Uint128/Uint128Type.ts:9 Uint128 typebigint&object
Type Declaration
[brand]
readonly[brand]:"Uint128"
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Variables
bitLength()
Defined in: src/primitives/Uint128/index.ts:120constbitLength: (uint) =>number=_bitLength
Parameters
uint
Uint128Type
Returns
number
bitwiseAnd()
Defined in: src/primitives/Uint128/index.ts:88constbitwiseAnd: (uint,b) =>Uint128Type=_bitwiseAnd
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
bitwiseNot()
Defined in: src/primitives/Uint128/index.ts:94constbitwiseNot: (uint) =>Uint128Type=_bitwiseNot
Parameters
uint
Uint128Type
Returns
Uint128Type
bitwiseOr()
Defined in: src/primitives/Uint128/index.ts:90constbitwiseOr: (uint,b) =>Uint128Type=_bitwiseOr
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
bitwiseXor()
Defined in: src/primitives/Uint128/index.ts:92constbitwiseXor: (uint,b) =>Uint128Type=_bitwiseXor
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
BrandedUint128
Defined in: src/primitives/Uint128/index.ts:134constBrandedUint128:object
Type Declaration
bitLength()
bitLength: (uint) =>number
Parameters
uint
Uint128Type
Returns
number
bitwiseAnd()
bitwiseAnd: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
bitwiseNot()
bitwiseNot: (uint) =>Uint128Type
Parameters
uint
Uint128Type
Returns
Uint128Type
bitwiseOr()
bitwiseOr: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
bitwiseXor()
bitwiseXor: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
clone()
clone: (uint) =>Uint128Type
Parameters
uint
Uint128Type
Returns
Uint128Type
dividedBy()
dividedBy: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
equals()
equals: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
from()
from: (value) =>Uint128Type
Parameters
value
string | number | bigint
Returns
Uint128Type
fromAbiEncoded()
fromAbiEncoded: (bytes) =>Uint128Type
Parameters
bytes
Uint8Array
Returns
Uint128Type
fromBigInt()
fromBigInt: (value) =>Uint128Type
Parameters
value
bigint
Returns
Uint128Type
fromBytes()
fromBytes: (bytes) =>Uint128Type
Parameters
bytes
Uint8Array
Returns
Uint128Type
fromHex()
fromHex: (hex) =>Uint128Type
Parameters
hex
string
Returns
Uint128Type
fromNumber()
fromNumber: (value) =>Uint128Type
Parameters
value
number
Returns
Uint128Type
gcd()
gcd: (a,b) =>Uint128Type
Parameters
a
Uint128Type
b
Uint128Type
Returns
Uint128Type
greaterThan()
greaterThan: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
greaterThanOrEqual()
greaterThanOrEqual: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
isPowerOf2()
isPowerOf2: (uint) =>boolean
Parameters
uint
Uint128Type
Returns
boolean
isValid()
isValid: (value) =>boolean
Parameters
value
string | number | bigint
Returns
boolean
isZero()
isZero: (uint) =>boolean
Parameters
uint
Uint128Type
Returns
boolean
lcm()
lcm: (a,b) =>Uint128Type
Parameters
a
Uint128Type
b
Uint128Type
Returns
Uint128Type
leadingZeros()
leadingZeros: (uint) =>number
Parameters
uint
Uint128Type
Returns
number
lessThan()
lessThan: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
lessThanOrEqual()
lessThanOrEqual: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
max()
max: (values) =>Uint128Type
Parameters
values
Uint128Type[]
Returns
Uint128Type
MAX
MAX: Uint128Type
Maximum Uint128 value: 2^128 - 1
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
maximum()
maximum: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
min()
min: (values) =>Uint128Type
Parameters
values
Uint128Type[]
Returns
Uint128Type
MIN
MIN: Uint128Type
Minimum Uint128 value: 0
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
minimum()
minimum: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
minus()
minus: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
modulo()
modulo: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
notEquals()
notEquals: (uint,b) =>boolean
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
ONE
ONE: Uint128Type
One value
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
plus()
plus: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
popCount()
popCount: (uint) =>number
Parameters
uint
Uint128Type
Returns
number
product()
product: (values) =>Uint128Type
Parameters
values
Uint128Type[]
Returns
Uint128Type
shiftLeft()
shiftLeft: (uint,bits) =>Uint128Type
Parameters
uint
Uint128Type
bits
number
Returns
Uint128Type
shiftRight()
shiftRight: (uint,bits) =>Uint128Type
Parameters
uint
Uint128Type
bits
number
Returns
Uint128Type
SIZE
SIZE: 16
Size in bytes (16 bytes for Uint128)
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
sum()
sum: (values) =>Uint128Type
Parameters
values
Uint128Type[]
Returns
Uint128Type
times()
times: (uint,b) =>Uint128Type
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
toAbiEncoded()
toAbiEncoded: (uint) =>Uint8Array
Parameters
uint
Uint128Type
Returns
Uint8Array
toBigInt()
toBigInt: (uint) =>bigint
Parameters
uint
Uint128Type
Returns
bigint
toBytes()
toBytes: (uint) =>Uint8Array
Parameters
uint
Uint128Type
Returns
Uint8Array
toHex()
toHex: (uint) =>string
Parameters
uint
Uint128Type
Returns
string
toNumber()
toNumber: (uint) =>number
Parameters
uint
Uint128Type
Returns
number
toPower()
toPower: (uint,exponent) =>Uint128Type
Parameters
uint
Uint128Type
exponent
Uint128Type
Returns
Uint128Type
toString()
toString: (uint,radix?) =>string
Parameters
uint
Uint128Type
radix?
number
Returns
string
tryFrom()
tryFrom: (value) =>Uint128Type|null
Parameters
value
string | number | bigint
Returns
Uint128Type | null
ZERO
ZERO: Uint128Type
Zero value
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
clone()
Defined in: src/primitives/Uint128/index.ts:74constclone: (uint) =>Uint128Type=_clone
Parameters
uint
Uint128Type
Returns
Uint128Type
dividedBy()
Defined in: src/primitives/Uint128/index.ts:79constdividedBy: (uint,b) =>Uint128Type=_dividedBy
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
equals()
Defined in: src/primitives/Uint128/index.ts:100constequals: (uint,b) =>boolean=_equals
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
from()
Defined in: src/primitives/Uint128/index.ts:54constfrom: (value) =>Uint128Type=_from
Parameters
value
bigint | number | string
Returns
Uint128Type
fromAbiEncoded()
Defined in: src/primitives/Uint128/index.ts:59constfromAbiEncoded: (bytes) =>Uint128Type=_fromAbiEncoded
Parameters
bytes
Uint8Array
Returns
Uint128Type
fromBigInt()
Defined in: src/primitives/Uint128/index.ts:56constfromBigInt: (value) =>Uint128Type=_fromBigInt
Parameters
value
bigint
Returns
Uint128Type
fromBytes()
Defined in: src/primitives/Uint128/index.ts:58constfromBytes: (bytes) =>Uint128Type=_fromBytes
Parameters
bytes
Uint8Array
Returns
Uint128Type
fromHex()
Defined in: src/primitives/Uint128/index.ts:55constfromHex: (hex) =>Uint128Type=_fromHex
Parameters
hex
string
Returns
Uint128Type
fromNumber()
Defined in: src/primitives/Uint128/index.ts:57constfromNumber: (value) =>Uint128Type=_fromNumber
Parameters
value
number
Returns
Uint128Type
gcd()
Defined in: src/primitives/Uint128/index.ts:129constgcd: (a,b) =>Uint128Type=_gcd
Parameters
a
Uint128Type
b
Uint128Type
Returns
Uint128Type
greaterThan()
Defined in: src/primitives/Uint128/index.ts:107constgreaterThan: (uint,b) =>boolean=_greaterThan
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
greaterThanOrEqual()
Defined in: src/primitives/Uint128/index.ts:109constgreaterThanOrEqual: (uint,b) =>boolean=_greaterThanOrEqual
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
isPowerOf2()
Defined in: src/primitives/Uint128/index.ts:131constisPowerOf2: (uint) =>boolean=_isPowerOf2
Parameters
uint
Uint128Type
Returns
boolean
isValid()
Defined in: src/primitives/Uint128/index.ts:63constisValid: (value) =>boolean=_isValid
Parameters
value
bigint | number | string
Returns
boolean
isZero()
Defined in: src/primitives/Uint128/index.ts:113constisZero: (uint) =>boolean=_isZero
Parameters
uint
Uint128Type
Returns
boolean
lcm()
Defined in: src/primitives/Uint128/index.ts:130constlcm: (a,b) =>Uint128Type=_lcm
Parameters
a
Uint128Type
b
Uint128Type
Returns
Uint128Type
leadingZeros()
Defined in: src/primitives/Uint128/index.ts:121constleadingZeros: (uint) =>number=_leadingZeros
Parameters
uint
Uint128Type
Returns
number
lessThan()
Defined in: src/primitives/Uint128/index.ts:103constlessThan: (uint,b) =>boolean=_lessThan
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
lessThanOrEqual()
Defined in: src/primitives/Uint128/index.ts:105constlessThanOrEqual: (uint,b) =>boolean=_lessThanOrEqual
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
max()
Defined in: src/primitives/Uint128/index.ts:127constmax: (values) =>Uint128Type=_max
Parameters
values
Uint128Type[]
Returns
Uint128Type
MAX
Defined in: src/primitives/Uint128/constants.js:34 Maximum Uint128 value: 2^128 - 1constMAX:Uint128Type
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
maximum()
Defined in: src/primitives/Uint128/index.ts:117constmaximum: (uint,b) =>Uint128Type=_maximum
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
min()
Defined in: src/primitives/Uint128/index.ts:126constmin: (values) =>Uint128Type=_min
Parameters
values
Uint128Type[]
Returns
Uint128Type
MIN
Defined in: src/primitives/Uint128/constants.js:50 Minimum Uint128 value: 0constMIN:Uint128Type
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
minimum()
Defined in: src/primitives/Uint128/index.ts:115constminimum: (uint,b) =>Uint128Type=_minimum
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
minus()
Defined in: src/primitives/Uint128/index.ts:77constminus: (uint,b) =>Uint128Type=_minus
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
modulo()
Defined in: src/primitives/Uint128/index.ts:81constmodulo: (uint,b) =>Uint128Type=_modulo
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
notEquals()
Defined in: src/primitives/Uint128/index.ts:101constnotEquals: (uint,b) =>boolean=_notEquals
Parameters
uint
Uint128Type
b
Uint128Type
Returns
boolean
ONE
Defined in: src/primitives/Uint128/constants.js:78 One valueconstONE:Uint128Type
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
plus()
Defined in: src/primitives/Uint128/index.ts:76constplus: (uint,b) =>Uint128Type=_plus
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
popCount()
Defined in: src/primitives/Uint128/index.ts:122constpopCount: (uint) =>number=_popCount
Parameters
uint
Uint128Type
Returns
number
product()
Defined in: src/primitives/Uint128/index.ts:125constproduct: (values) =>Uint128Type=_product
Parameters
values
Uint128Type[]
Returns
Uint128Type
shiftLeft()
Defined in: src/primitives/Uint128/index.ts:95constshiftLeft: (uint,bits) =>Uint128Type=_shiftLeft
Parameters
uint
Uint128Type
bits
number
Returns
Uint128Type
shiftRight()
Defined in: src/primitives/Uint128/index.ts:97constshiftRight: (uint,bits) =>Uint128Type=_shiftRight
Parameters
uint
Uint128Type
bits
number
Returns
Uint128Type
SIZE
Defined in: src/primitives/Uint128/constants.js:20 Size in bytes (16 bytes for Uint128)constSIZE:16=16
See
https://voltaire.tevm.sh/primitives/uint128 for Uint128 documentationSince
0.0.0Example
sum()
Defined in: src/primitives/Uint128/index.ts:124constsum: (values) =>Uint128Type=_sum
Parameters
values
Uint128Type[]
Returns
Uint128Type
times()
Defined in: src/primitives/Uint128/index.ts:78consttimes: (uint,b) =>Uint128Type=_times
Parameters
uint
Uint128Type
b
Uint128Type
Returns
Uint128Type
toAbiEncoded()
Defined in: src/primitives/Uint128/index.ts:69consttoAbiEncoded: (uint) =>Uint8Array=_toAbiEncoded
Parameters
uint
Uint128Type
Returns
Uint8Array
toBigInt()
Defined in: src/primitives/Uint128/index.ts:66consttoBigInt: (uint) =>bigint=_toBigInt
Parameters
uint
Uint128Type
Returns
bigint
toBytes()
Defined in: src/primitives/Uint128/index.ts:68consttoBytes: (uint) =>Uint8Array=_toBytes
Parameters
uint
Uint128Type
Returns
Uint8Array
toHex()
Defined in: src/primitives/Uint128/index.ts:65consttoHex: (uint) =>string=_toHex
Parameters
uint
Uint128Type
Returns
string
toNumber()
Defined in: src/primitives/Uint128/index.ts:67consttoNumber: (uint) =>number=_toNumber
Parameters
uint
Uint128Type
Returns
number
toPower()
Defined in: src/primitives/Uint128/index.ts:83consttoPower: (uint,exponent) =>Uint128Type=_toPower
Parameters
uint
Uint128Type
exponent
Uint128Type
Returns
Uint128Type
toString()
Defined in: src/primitives/Uint128/index.ts:71consttoString: (uint,radix?) =>string=_toString
Parameters
uint
Uint128Type
radix?
number
Returns
string
tryFrom()
Defined in: src/primitives/Uint128/index.ts:61consttryFrom: (value) =>Uint128Type|null=_tryFrom
Parameters
value
bigint | number | string
Returns
Uint128Type | null
ZERO
Defined in: src/primitives/Uint128/constants.js:64 Zero valueconstZERO:Uint128Type

