Namespace: Experimental
This module exposes APIs that are unstable, in the sense that the API surface is expected to change. (Not unstable in the sense that they are less functional or tested than other parts.)
Table of contents
Type Aliases
Variables
Functions
- MerkleWitness
- Reducer
- ZkProgram
- accountUpdateFromCallback
- createChildAccountUpdate
- makeChildAccountUpdate
- memoizeWitness
Type Aliases
AsFieldsAndAux
Ƭ AsFieldsAndAux<T
, TJson
>: AsFieldsAndAux_
<T
, TJson
>
Type parameters
Name |
---|
T |
TJson |
Defined in
Callback
Ƭ Callback<Result
>: Callback_
<Result
>
Type parameters
Name |
---|
Result |
Defined in
Variables
Callback
• Callback: typeof Callback
= Experimental_.Callback
Defined in
MerkleTree
• MerkleTree: typeof MerkleTree
= Experimental_.MerkleTree
Defined in
Functions
MerkleWitness
▸ MerkleWitness(height
): typeof BaseMerkleWitness
Returns a circuit-compatible Witness for a specific Tree height.
Parameters
Name | Type | Description |
---|---|---|
height | number | Height of the Merkle Tree that this Witness belongs to. |
Returns
typeof BaseMerkleWitness
A circuit-compatible Merkle Witness.
Defined in
Reducer
▸ Reducer<T
, A
>(reducer
): ReducerReturn
<A
>
Type parameters
Name | Type |
---|---|
T | extends AsFieldElements <any , T > |
A | extends any |
Parameters
Name | Type |
---|---|
reducer | Object |
reducer.actionType | T |
Returns
ReducerReturn
<A
>
Defined in
ZkProgram
▸ ZkProgram<PublicInputType
, Types
>(__namedParameters
): { compile
: () => Promise
<{ verificationKey
: string
}> ; digest
: () => string
; name
: string
; publicInputType
: PublicInputType
; verify
: (proof
: Proof
<InferInstance
<PublicInputType
>>) => Promise
<boolean
> } & { [I in keyof Types]: Prover<InferInstance<PublicInputType>, Types[I]> }
Type parameters
Name | Type |
---|---|
PublicInputType | extends AsFieldElements <any , PublicInputType > |
Types | extends Object |
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.methods | { [I in string | number | symbol]: Method<InferInstance<PublicInputType>, Types[I]> } |
__namedParameters.publicInput | PublicInputType |
Returns
{ compile
: () => Promise
<{ verificationKey
: string
}> ; digest
: () => string
; name
: string
; publicInputType
: PublicInputType
; verify
: (proof
: Proof
<InferInstance
<PublicInputType
>>) => Promise
<boolean
> } & { [I in keyof Types]: Prover<InferInstance<PublicInputType>, Types[I]> }
Defined in
accountUpdateFromCallback
▸ accountUpdateFromCallback(parentZkapp
, childLayout
, callback
): AccountUpdate
Parameters
Name | Type |
---|---|
parentZkapp | SmartContract |
childLayout | AccountUpdatesLayout |
callback | Callback <any > |
Returns
Defined in
createChildAccountUpdate
▸ createChildAccountUpdate(parent
, childAddress
, tokenId?
): AccountUpdate
Parameters
Name | Type |
---|---|
parent | AccountUpdate |
childAddress | PublicKey |
tokenId? | Field |
Returns
Defined in
makeChildAccountUpdate
▸ makeChildAccountUpdate(parent
, child
): void
Parameters
Name | Type |
---|---|
parent | AccountUpdate |
child | AccountUpdate |
Returns
void
Defined in
memoizeWitness
▸ memoizeWitness<T
>(type
, compute
): T
Like Circuit.witness, but memoizes the witness during transaction construction for reuse by the prover. This is needed to witness non-deterministic values.
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
type | AsFieldElements <T > |
compute | () => T |
Returns
T