MerkleMapWitness
o1js / Modules / MerkleMapWitness
Class: MerkleMapWitness
Deprecated
CircuitValue
is deprecated in favor of Struct, which features a simpler API and better typing.
Hierarchy
↳
MerkleMapWitness
Table of contents
Constructors
Properties
Methods
- assertEquals
- computeRootAndKey
- equals
- isConstant
- toConstant
- toFields
- toJSON
- check
- empty
- fromFields
- fromJSON
- fromObject
- sizeInFields
- toAuxiliary
- toConstant
- toFields
- toInput
- toJSON
Constructors
constructor
• new MerkleMapWitness(isLefts
, siblings
)
Parameters
Name | Type |
---|---|
isLefts | Bool [] |
siblings | Field [] |
Overrides
Defined in
Properties
isLefts
• isLefts: Bool
[]
Defined in
siblings
• siblings: Field
[]
Defined in
Methods
assertEquals
▸ assertEquals(x
): void
Parameters
Name | Type |
---|---|
x | MerkleMapWitness |
Returns
void
Inherited from
Defined in
computeRootAndKey
▸ computeRootAndKey(value
): Field
[]
computes the merkle tree root for a given value and the key for this witness
Parameters
Name | Type | Description |
---|---|---|
value | Field | The 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
equals
▸ equals(x
): Bool
Parameters
Name | Type |
---|---|
x | MerkleMapWitness |
Returns
Inherited from
Defined in
isConstant
▸ isConstant(): boolean
Returns
boolean
Inherited from
Defined in
toConstant
▸ toConstant(): MerkleMapWitness
Returns
Inherited from
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): any
Returns
any
Inherited from
Defined in
check
▸ Static
check\<T
>(this
, v
): void
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType \<T > |
Returns
void
Inherited from
Defined in
empty
▸ Static
empty\<T
>(): InstanceType
\<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Returns
InstanceType
\<T
>
Inherited from
Defined in
fromFields
▸ Static
fromFields\<T
>(this
, xs
): InstanceType
\<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
xs | Field [] |
Returns
InstanceType
\<T
>
Inherited from
Defined in
fromJSON
▸ Static
fromJSON\<T
>(this
, value
): InstanceType
\<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | any |
Returns
InstanceType
\<T
>
Inherited from
Defined in
fromObject
▸ Static
fromObject\<T
>(this
, value
): InstanceType
\<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
value | NonMethods \<InstanceType \<T >> |
Returns
InstanceType
\<T
>
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toAuxiliary
▸ Static
toAuxiliary(): []
Returns
[]
Inherited from
Defined in
toConstant
▸ Static
toConstant\<T
>(this
, t
): InstanceType
\<T
>
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
t | InstanceType \<T > |
Returns
InstanceType
\<T
>
Inherited from
Defined in
toFields
▸ Static
toFields\<T
>(this
, v
): Field
[]
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType \<T > |
Returns
Field
[]
Inherited from
Defined in
toInput
▸ Static
toInput\<T
>(this
, v
): HashInput
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType \<T > |
Returns
HashInput
Inherited from
Defined in
toJSON
▸ Static
toJSON\<T
>(this
, v
): any
Type parameters
Name | Type |
---|---|
T | extends AnyConstructor |
Parameters
Name | Type |
---|---|
this | T |
v | InstanceType \<T > |
Returns
any