Skip to main content

Class: UInt64

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new UInt64(...props)

Parameters

NameType
...propsany[]

Inherited from

CircuitValue.constructor

Defined in

lib/circuit_value.ts:43

Properties

value

value: Field

Defined in

lib/int.ts:10


NUM_BITS

Static NUM_BITS: number = 64

Defined in

lib/int.ts:11

Accessors

one

Static get one(): UInt64

Returns

UInt64

Defined in

lib/int.ts:17


zero

Static get zero(): UInt64

Returns

UInt64

Defined in

lib/int.ts:13

Methods

add

add(y): UInt64

Addition with overflow checking.

Parameters

NameType
ynumber | UInt64

Returns

UInt64

Defined in

lib/int.ts:135


assertEquals

assertEquals(x): void

Parameters

NameType
xUInt64

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:127


assertGt

assertGt(y): void

Parameters

NameType
yUInt64

Returns

void

Defined in

lib/int.ts:184


assertGte

assertGte(y): void

Parameters

NameType
yUInt64

Returns

void

Defined in

lib/int.ts:192


assertLt

assertLt(y): void

Parameters

NameType
yUInt64

Returns

void

Defined in

lib/int.ts:176


assertLte

assertLte(y): void

Parameters

NameType
yUInt64

Returns

void

Defined in

lib/int.ts:167


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

NameType
ynumber | UInt64

Returns

UInt64

Defined in

lib/int.ts:109


divMod

divMod(y): Object

Parameters

NameType
ystring | number | UInt64

Returns

Object

NameType
quotientUInt64
restUInt64

Defined in

lib/int.ts:66


equals

equals(x): Bool

Parameters

NameType
xUInt64

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:123


gt

gt(y): Bool

Parameters

NameType
yUInt64

Returns

Bool

Defined in

lib/int.ts:180


gte

gte(y): Bool

Parameters

NameType
yUInt64

Returns

Bool

Defined in

lib/int.ts:188


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:131


lt

lt(y): Bool

Parameters

NameType
yUInt64

Returns

Bool

Defined in

lib/int.ts:172


lte

lte(y): Bool

Parameters

NameType
yUInt64

Returns

Bool

Defined in

lib/int.ts:150


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

NameType
ynumber | UInt64

Returns

UInt64

Defined in

lib/int.ts:119


mul

mul(y): UInt64

Multiplication with overflow checking.

Parameters

NameType
ynumber | UInt64

Returns

UInt64

Defined in

lib/int.ts:126


sub

sub(y): UInt64

Subtraction with underflow checking.

Parameters

NameType
ynumber | UInt64

Returns

UInt64

Defined in

lib/int.ts:144


toConstant

toConstant(): UInt64

Returns

UInt64

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:119


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:111


toJSON

toJSON(): JSONValue

Returns

JSONValue

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:115


toString

toString(): string

Returns

string

Defined in

lib/int.ts:21


MAXINT

Static MAXINT(): UInt64

Returns

UInt64

Defined in

lib/int.ts:62


check

Static check(x): void

Parameters

NameType
xUInt64

Returns

void

Overrides

CircuitValue.check

Defined in

lib/int.ts:25


checkConstant

Static Private checkConstant(x): Field

Parameters

NameType
xField

Returns

Field

Defined in

lib/int.ts:36


from

Static from(x): UInt64

Parameters

NameType
xstring | number | bigint | Field | UInt64 | UInt32

Returns

UInt64

Defined in

lib/int.ts:48


fromBigInt

Static fromBigInt(x): UInt64

Parameters

NameType
xbigint

Returns

UInt64

Defined in

lib/int.ts:58


fromJSON

Static fromJSON<T>(this, value): null | InstanceType<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
valueJSONValue

Returns

null | InstanceType<T>

Inherited from

CircuitValue.fromJSON

Defined in

lib/circuit_value.ts:193


fromNumber

Static fromNumber(x): UInt64

Parameters

NameType
xnumber

Returns

UInt64

Defined in

lib/int.ts:52


fromObject

Static fromObject<T>(this, value): InstanceType<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
valueNonMethods<InstanceType<T>>

Returns

InstanceType<T>

Inherited from

CircuitValue.fromObject

Defined in

lib/circuit_value.ts:60


fromString

Static fromString(x): UInt64

Parameters

NameType
xstring

Returns

UInt64

Defined in

lib/int.ts:55


ofFields

Static ofFields<T>(this, xs): InstanceType<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
xsField[]

Returns

InstanceType<T>

Inherited from

CircuitValue.ofFields

Defined in

lib/circuit_value.ts:135


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:67


toConstant

Static toConstant<T>(this, t): InstanceType<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
tInstanceType<T>

Returns

InstanceType<T>

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:171


toFields

Static toFields<T>(this, v): Field[]

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType<T>

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:72


toInput

Static toInput(x): HashInput

Parameters

NameType
xUInt64

Returns

HashInput

Overrides

CircuitValue.toInput

Defined in

lib/int.ts:29


toJSON

Static toJSON(x): string

Parameters

NameType
xUInt64

Returns

string

Overrides

CircuitValue.toJSON

Defined in

lib/int.ts:32