Skip to main content

Sign

o1js / Modules / Sign

Class: Sign

Deprecated

CircuitValue is deprecated in favor of Struct, which features a simpler API and better typing.

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Sign(...props)

Parameters

NameType
...propsany[]

Inherited from

CircuitValue.constructor

Defined in

lib/circuit_value.ts:78

Properties

value

value: Field

Defined in

lib/int.ts:1048

Accessors

minusOne

Static get minusOne(): Sign

Returns

Sign

Defined in

lib/int.ts:1053


one

Static get one(): Sign

Returns

Sign

Defined in

lib/int.ts:1050

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xSign

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:166


equals

equals(x): Bool

Parameters

NameType
xSign

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:162


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:170


isPositive

isPositive(): Bool

Returns

Bool

Defined in

lib/int.ts:1082


mul

mul(y): Sign

Parameters

NameType
ySign

Returns

Sign

Defined in

lib/int.ts:1079


neg

neg(): Sign

Returns

Sign

Defined in

lib/int.ts:1076


toConstant

toConstant(): Sign

Returns

Sign

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:158


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:150


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:154


toString

toString(): string

Returns

string

Defined in

lib/int.ts:1085


check

Static check(x): void

Parameters

NameType
xSign

Returns

void

Overrides

CircuitValue.check

Defined in

lib/int.ts:1056


empty

Static empty\<T>(): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Returns

InstanceType\<T>

Overrides

CircuitValue.empty

Defined in

lib/int.ts:1060


fromFields

Static fromFields\<T>(this, xs): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
xsField[]

Returns

InstanceType\<T>

Inherited from

CircuitValue.fromFields

Defined in

lib/circuit_value.ts:174


fromJSON

Static fromJSON\<T>(x): InstanceType\<T>

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
x"Positive" | "Negative"

Returns

InstanceType\<T>

Overrides

CircuitValue.fromJSON

Defined in

lib/int.ts:1071


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:95


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:102


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit_value.ts:124


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:213


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:107


toInput

Static toInput(x): HashInput

Parameters

NameType
xSign

Returns

HashInput

Overrides

CircuitValue.toInput

Defined in

lib/int.ts:1063


toJSON

Static toJSON(x): "Positive" | "Negative"

Parameters

NameType
xSign

Returns

"Positive" | "Negative"

Overrides

CircuitValue.toJSON

Defined in

lib/int.ts:1066