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

Properties

value

value: Field

Defined in

lib/int.ts:714

Accessors

minusOne

Static get minusOne(): Sign

Returns

Sign

Defined in

lib/int.ts:719


one

Static get one(): Sign

Returns

Sign

Defined in

lib/int.ts:716

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xSign

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:160


equals

equals(x): Bool

Parameters

NameType
xSign

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:156


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:164


isPositive

isPositive(): Bool

Returns

Bool

Defined in

lib/int.ts:748


mul

mul(y): Sign

Parameters

NameType
ySign

Returns

Sign

Defined in

lib/int.ts:745


neg

neg(): Sign

Returns

Sign

Defined in

lib/int.ts:742


toConstant

toConstant(): Sign

Returns

Sign

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:152


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:144


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:148


toString

toString(): string

Returns

string

Defined in

lib/int.ts:751


check

Static check(x): void

Parameters

NameType
xSign

Returns

void

Overrides

CircuitValue.check

Defined in

lib/int.ts:722


emptyValue

Static emptyValue(): Sign

Returns

Sign

Defined in

lib/int.ts:726


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


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


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


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:96


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit_value.ts:118


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


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


toInput

Static toInput(x): HashInput

Parameters

NameType
xSign

Returns

HashInput

Overrides

CircuitValue.toInput

Defined in

lib/int.ts:729


toJSON

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

Parameters

NameType
xSign

Returns

"Positive" | "Negative"

Overrides

CircuitValue.toJSON

Defined in

lib/int.ts:732