Skip to main content

MerkleMapWitness

o1js / Modules / MerkleMapWitness

Class: MerkleMapWitness

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

new MerkleMapWitness(isLefts, siblings)

Parameters

NameType
isLeftsBool[]
siblingsField[]

Overrides

CircuitValue.constructor

Defined in

lib/merkle_map.ts:121

Properties

isLefts

isLefts: Bool[]

Defined in

lib/merkle_map.ts:118


siblings

siblings: Field[]

Defined in

lib/merkle_map.ts:119

Methods

assertEquals

assertEquals(x): void

Parameters

NameType
xMerkleMapWitness

Returns

void

Inherited from

CircuitValue.assertEquals

Defined in

lib/circuit_value.ts:160


computeRootAndKey

computeRootAndKey(value): Field[]

computes the merkle tree root for a given value and the key for this witness

Parameters

NameTypeDescription
valueFieldThe value to compute the root for.

Returns

Field[]

A tuple of the computed merkle root, and the key that is connected to the path updated by this witness.

Defined in

lib/merkle_map.ts:132


equals

equals(x): Bool

Parameters

NameType
xMerkleMapWitness

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


toConstant

toConstant(): MerkleMapWitness

Returns

MerkleMapWitness

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


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


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>(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:226


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


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