DocsReference@proto-kit/protocolClassesProvableReductionHashList

@proto-kit/protocolDocs


Documentation / @proto-kit/protocol / ProvableReductionHashList

Class: ProvableReductionHashList<Value>

Extended by

Type Parameters

Value

Constructors

new ProvableReductionHashList()

new ProvableReductionHashList<Value>(valueType, commitment): ProvableReductionHashList<Value>

Parameters

valueType: ProvablePure<Value>

commitment: Field = ...

Returns

ProvableReductionHashList<Value>

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:6

Properties

commitment

commitment: Field

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:8


unconstrainedList

unconstrainedList: Value[] = []

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:11


valueType

protected readonly valueType: ProvablePure<Value>

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:7

Methods

getUnconstrainedValues()

getUnconstrainedValues(): NonMethods<Value>[]

Returns

NonMethods<Value>[]

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:74


hash()

hash(elements): Field

Parameters

elements: Field[]

Returns

Field

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:70


pushAndReduce()

pushAndReduce(value, reduce): object

Parameters

value: Value

reduce

Returns

object

popLast

popLast: Bool

value

value: Value

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:17


pushIf()

pushIf(value, condition): ProvableReductionHashList<Value>

Parameters

value: Value

condition: Bool

Returns

ProvableReductionHashList<Value>

Defined in

packages/protocol/src/utils/ProvableReductionHashList.ts:64