Class: UInt64
Hierarchy
↳
UInt64
Table of contents
Constructors
Properties
Accessors
Methods
- add
- assertEquals
- assertGt
- assertGte
- assertLt
- assertLte
- div
- divMod
- equals
- gt
- gte
- isConstant
- lt
- lte
- mod
- mul
- sub
- toConstant
- toFields
- toJSON
- toString
- MAXINT
- check
- checkConstant
- from
- fromBigInt
- fromJSON
- fromNumber
- fromObject
- fromString
- ofFields
- sizeInFields
- toConstant
- toFields
- toInput
- toJSON
Constructors
constructor
• new UInt64(...props
)
Parameters
Name | Type |
---|---|
...props | any [] |
Inherited from
Defined in
Properties
value
• value: Field
Defined in
NUM_BITS
▪ Static
NUM_BITS: number
= 64
Defined in
Accessors
one
• Static
get
one(): UInt64
Returns
Defined in
zero
• Static
get
zero(): UInt64
Returns
Defined in
Methods
add
▸ add(y
): UInt64
Addition with overflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
assertEquals
▸ assertEquals(x
): void
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
void
Inherited from
Defined in
assertGt
▸ assertGt(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
assertGte
▸ assertGte(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
assertLt
▸ assertLt(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
assertLte
▸ assertLte(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
div
▸ div(y
): UInt64
Integer division.
x.div(y)
returns the floor of x / y
, that is, the greatest
z
such that x * y <= x
.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
divMod
▸ divMod(y
): Object
Parameters
Name | Type |
---|---|
y | string | number | UInt64 |
Returns
Object
Name | Type |
---|---|
quotient | UInt64 |
rest | UInt64 |
Defined in
equals
▸ equals(x
): Bool
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
Inherited from
Defined in
gt
▸ gt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
gte
▸ gte(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
isConstant
▸ isConstant(): boolean
Returns
boolean
Inherited from
Defined in
lt
▸ lt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
lte
▸ lte(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
mod
▸ mod(y
): UInt64
Integer remainder.
x.mod(y)
returns the value z
such that 0 <= z < y
and
x - z
is divisble by y
.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
mul
▸ mul(y
): UInt64
Multiplication with overflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
sub
▸ sub(y
): UInt64
Subtraction with underflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
toConstant
▸ toConstant(): UInt64
Returns
Inherited from
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
JSONValue
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
MAXINT
▸ Static
MAXINT(): UInt64
Returns
Defined in
check
▸ Static
check(x
): void
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
void
Overrides
Defined in
checkConstant
▸ Static
Private
checkConstant(x
): Field
Parameters
Name | Type |
---|---|
x | Field |
Returns
Defined in
from
▸ Static
from(x
): UInt64
Parameters
Name | Type |
---|---|
x | string | number | bigint | Field | UInt64 | UInt32 |
Returns
Defined in
fromBigInt
▸ Static
fromBigInt(x
): UInt64
Parameters
Name | Type |
---|---|
x | bigint |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | JSONValue |
Returns
null
| InstanceType
<T
>
Inherited from
Defined in
fromNumber
▸ Static
fromNumber(x
): UInt64
Parameters
Name | Type |
---|---|
x | number |
Returns
Defined in
fromObject
▸ Static
fromObject<T
>(this
, value
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | NonMethods <InstanceType <T >> |
Returns
InstanceType
<T
>
Inherited from
Defined in
fromString
▸ Static
fromString(x
): UInt64
Parameters
Name | Type |
---|---|
x | string |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
xs | Field [] |
Returns
InstanceType
<T
>
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): InstanceType
<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
t | InstanceType <T > |
Returns
InstanceType
<T
>
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType <T > |
Returns
Field
[]
Inherited from
Defined in
toInput
▸ Static
toInput(x
): HashInput
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
HashInput
Overrides
Defined in
toJSON
▸ Static
toJSON(x
): string
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
string