Skip to main content

Class: CircuitString

Deprecated

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

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Private new CircuitString(values)

Parameters

NameType
valuesCharacter[]

Overrides

CircuitValue.constructor

Defined in

lib/string.ts:44

Properties

values

values: Character[]

Defined in

lib/string.ts:39


maxLength

Static maxLength: number = DEFAULT_STRING_LENGTH

Defined in

lib/string.ts:38

Methods

append

append(str): CircuitString

appends another string to this one, returns the result and proves that it fits within the maxLength of this string (the other string can have a different maxLength)

Parameters

NameType
strCircuitString

Returns

CircuitString

Defined in

lib/string.ts:87


assertEquals

assertEquals(x): void

Parameters

NameType
xCircuitString

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:152


computeLengthAndMask

Private computeLengthAndMask(): Object

Returns

Object

NameType
lengthField
maskBool[]

Defined in

lib/string.ts:57


equals

equals(x): Bool

Parameters

NameType
xCircuitString

Returns

Bool

Inherited from

CircuitValue.equals

Defined in

lib/circuit_value.ts:148


hash

hash(): Field

returns true if str is found in this CircuitString

Returns

Field

Defined in

lib/string.ts:123


isConstant

isConstant(): boolean

Returns

boolean

Inherited from

CircuitValue.isConstant

Defined in

lib/circuit_value.ts:156


length

Private length(): Field

Returns

Field

Defined in

lib/string.ts:79


lengthMask

Private lengthMask(): Bool[]

Returns

Bool[]

Defined in

lib/string.ts:76


maxLength

Private maxLength(): number

Returns

number

Defined in

lib/string.ts:52


substring

substring(start, end): CircuitString

Parameters

NameType
startnumber
endnumber

Returns

CircuitString

Defined in

lib/string.ts:127


toConstant

toConstant(): CircuitString

Returns

CircuitString

Inherited from

CircuitValue.toConstant

Defined in

lib/circuit_value.ts:144


toFields

toFields(): Field[]

Returns

Field[]

Inherited from

CircuitValue.toFields

Defined in

lib/circuit_value.ts:136


toJSON

toJSON(): any

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:140


toString

toString(): string

Returns

string

Defined in

lib/string.ts:131


check

Static check<T>(this, v): void

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType<T>

Returns

void

Inherited from

CircuitValue.check

Defined in

lib/circuit_value.ts:185


fromCharacters

Static fromCharacters(chars): CircuitString

Parameters

NameType
charsCharacter[]

Returns

CircuitString

Defined in

lib/string.ts:48


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


fromJSON

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

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
valueany

Returns

InstanceType<T>

Inherited from

CircuitValue.fromJSON

Defined in

lib/circuit_value.ts:218


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


fromString

Static fromString(str): CircuitString

Parameters

NameType
strstring

Returns

CircuitString

Defined in

lib/string.ts:138


sizeInFields

Static sizeInFields(): number

Returns

number

Inherited from

CircuitValue.sizeInFields

Defined in

lib/circuit_value.ts:88


toAuxiliary

Static toAuxiliary(): []

Returns

[]

Inherited from

CircuitValue.toAuxiliary

Defined in

lib/circuit_value.ts:110


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


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


toInput

Static toInput<T>(this, v): HashInput

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType<T>

Returns

HashInput

Inherited from

CircuitValue.toInput

Defined in

lib/circuit_value.ts:114


toJSON

Static toJSON<T>(this, v): any

Type parameters

NameType
Textends AnyConstructor

Parameters

NameType
thisT
vInstanceType<T>

Returns

any

Inherited from

CircuitValue.toJSON

Defined in

lib/circuit_value.ts:207